@emailmaker/emailmaker 1.0.70 → 1.0.72-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/README.md +1 -1
  2. package/asset-manifest.json +13 -11
  3. package/emailmaker-esm.js +1 -1
  4. package/emailmaker.js +1 -1
  5. package/iframe/429.js +1 -1
  6. package/iframe/766.js +1 -1
  7. package/iframe/{iframe-eblock.11c6f31dfff503763bf9.html → iframe-eblock.8aa10c4f52f0546dc847.html} +1 -1
  8. package/iframe/iframe.8aa10c4f52f0546dc847.html +1 -0
  9. package/iframe/js/882.543394b2.js +1 -0
  10. package/iframe/js/97.e9efd865.js +1 -0
  11. package/iframe/sandbox-eblock.js +1 -1
  12. package/package.json +1 -1
  13. package/plugin.html +2 -2
  14. package/plugin_blocks_test.html +1 -1
  15. package/plugin_default.html +1 -1
  16. package/plugin_idigital.html +1 -1
  17. package/plugin_s.html +1 -1
  18. package/static/css/{7327.aba2da0b.chunk.css → 9259.0ff59443.chunk.css} +1 -1
  19. package/static/js/{1538.e13a140c.chunk.js → 1538.f72d3446.chunk.js} +2 -2
  20. package/static/js/{3017.de375fc8.chunk.js → 3017.a7a7e6d7.chunk.js} +1 -1
  21. package/static/js/8344.64ed55cf.js +1 -0
  22. package/static/js/{7327.54656928.chunk.js → 9259.b109f7be.chunk.js} +2 -2
  23. package/static/js/9924.5916ce85.js +2 -0
  24. package/static/js/9924.5916ce85.js.LICENSE.txt +41 -0
  25. package/static/js/emailmaker_core.4303dd58.js +2 -0
  26. package/translations.pot +579 -539
  27. package/iframe/iframe.11c6f31dfff503763bf9.html +0 -1
  28. package/iframe/js/882.ee2ad9bb.js +0 -1
  29. package/iframe/js/97.47be42e4.js +0 -1
  30. package/static/js/9449.626d10ac.js +0 -1
  31. package/static/js/emailmaker_core.83ff409c.js +0 -2
  32. /package/iframe/js/{882.ee2ad9bb.js.LICENSE.txt → 882.543394b2.js.LICENSE.txt} +0 -0
  33. /package/static/js/{1538.e13a140c.chunk.js.LICENSE.txt → 1538.f72d3446.chunk.js.LICENSE.txt} +0 -0
  34. /package/static/js/{7327.54656928.chunk.js.LICENSE.txt → 9259.b109f7be.chunk.js.LICENSE.txt} +0 -0
  35. /package/static/js/{emailmaker_core.83ff409c.js.LICENSE.txt → emailmaker_core.4303dd58.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[]).push([[8344],{77778:(e,t,a)=>{var l={"./ar_EG.js":[66864,4607],"./az_AZ.js":[98980,3816],"./bg_BG.js":[20740,2844],"./bn_BD.js":[86085,6428],"./by_BY.js":[66660,9200],"./ca_ES.js":[20840,1626],"./context.js":[34962],"./cs_CZ.js":[79178,1377],"./da_DK.js":[56965,2066],"./de_DE.js":[56615,8796],"./el_GR.js":[74295,7288],"./en_GB.js":[14278,1502],"./en_US.js":[94609],"./es_ES.js":[6368,2114],"./et_EE.js":[54452,6135],"./eu_ES.js":[5153,9716],"./fa_IR.js":[39990,5322],"./fi_FI.js":[81264,6552],"./fr_BE.js":[73323,3411],"./fr_CA.js":[96235,494],"./fr_FR.js":[24113,1330],"./ga_IE.js":[32046,1872],"./gl_ES.js":[14314,3711],"./he_IL.js":[13205,7974],"./hi_IN.js":[32885,1332],"./hr_HR.js":[36886,1510],"./hu_HU.js":[1462,6764],"./hy_AM.js":[25907,737],"./id_ID.js":[76426,3624],"./index.js":[33733],"./is_IS.js":[45856,7426],"./it_IT.js":[59905,2408],"./ja_JP.js":[37148,8839],"./ka_GE.js":[46792,1454],"./kk_KZ.js":[56099,4425],"./km_KH.js":[52968,6033],"./kmr_IQ.js":[99784,9508],"./kn_IN.js":[63882,3914],"./ko_KR.js":[49656,5261],"./ku_IQ.js":[1414,5108],"./lt_LT.js":[94408,2438],"./lv_LV.js":[12173,3302],"./mk_MK.js":[81609,8466],"./ml_IN.js":[65643,290],"./mn_MN.js":[51320,6832],"./ms_MY.js":[15806,5980],"./my_MM.js":[91097,6618],"./nb_NO.js":[95370,2917],"./ne_NP.js":[71121,5827],"./nl_BE.js":[50627,5653],"./nl_NL.js":[16489,5466],"./pl_PL.js":[99842,5862],"./pt_BR.js":[93764,4702],"./pt_PT.js":[95746,8534],"./ro_RO.js":[13731,2988],"./ru_RU.js":[41735],"./si_LK.js":[57860,4823],"./sk_SK.js":[5011,6418],"./sl_SI.js":[16273,2827],"./sr_RS.js":[75748,8682],"./sv_SE.js":[51685,77],"./ta_IN.js":[39009,1640],"./th_TH.js":[62651,5902],"./tk_TK.js":[98442,5864],"./tr_TR.js":[94887,4686],"./uk_UA.js":[37224,1788],"./ur_PK.js":[68095,8590],"./useLocale.js":[46555],"./vi_VN.js":[43142,1241],"./zh_CN.js":[56721,9169],"./zh_HK.js":[29319,197],"./zh_TW.js":[85180,4813]};function o(e){if(!a.o(l,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=l[e],o=t[0];return Promise.all(t.slice(1).map(a.e)).then((()=>a(o)))}o.keys=()=>Object.keys(l),o.id=77778,e.exports=o},81509:(e,t,a)=>{"use strict";function l(e,t,a){const l=[];if(a&&(t=t.filter((e=>e.isVariable))),t.length){const a=function(e,t){const a=t.reduce(((e,{mapFn:t,start:a,end:l,syntax:o})=>(e[a]?e[a].push({value:l,mapFn:t,syntax:o}):e[a]=[{value:l,mapFn:t,syntax:o}],e)),Object.create(null)),l=new RegExp(t.map((({start:e})=>`(${e.replace(/[-[\]{}()*+?.,\\^$|]/g,"\\$&")})`)).join("|"),"g");return[...e.matchAll(l)].map((e=>({start:e.index,startToken:e[0],endTokens:a[e[0]]})))}(e,t);for(let t=0,o=a.length;t<o;t++){const{start:n,startToken:r,endTokens:i}=a[t];for(const{mapFn:s,value:d,syntax:m}of i){let r=e.indexOf(d,n);if(r>=0){for(let l=t+1;l<o;l++){const{start:t,startToken:o,endTokens:n}=a[l];n.some((e=>e.syntax===m))&&t<r&&(r=e.indexOf(d,r+1))}if(r>=0){const i=r+d.length,m=e.substring(n,i),c=s(m);!1!==c&&m!==c&&l.push({text:c,range:{start:n,end:i}});const u=a.findIndex((({start:e})=>e>=i));t=u>t?u-1:o;break}}}}}return l}function o(e,t){const a=[e];for(let l=t.length-1;l>=0;l--){const{text:e,range:o}=t[l],n=a[0];a.splice(0,1,n.substring(0,o.start),e,n.substring(o.end))}return a.join("")}function n(e){return`\x3c!--${e}--\x3e`}function r(e){return e.substring(4,e.length-3)}a.d(t,{Hk:()=>d,uI:()=>m});const i=/#set\s*\(\s*.*=.*\)/gm,s=/<!--#set\s*\(\s*.*=.*\)-->/gm,d=e=>{e.escape("\x3c!--","--\x3e",(e=>e),!1),e.escape("<style","</style>",(e=>e),!1),e.escape("<script","<\/script>",(e=>e),!1),e.escape("@{","}",n,!0).unescape("\x3c!--@{","}--\x3e",r,!0),e.unescape("\x3c!--%%%{{{","}}}%%%--\x3e",(e=>e.substring(10,e.length-9)),!1),e.escape("{%","%}",n,!0).unescape("\x3c!--{%","%}--\x3e",r,!0),e.escape("{#","#}",n,!0).unescape("\x3c!--{#","#}--\x3e",r,!0),e.escape("[[","]]",n,!0).unescape("\x3c!--[[","]]--\x3e",r,!0),e.createSyntax("ExpertSender").escape("<if",">",n).escape("</if",">",n).escape("<else",">",n).escape("</else",">",n).escape("<var ",">",n,!0).unescape("\x3c!--<if ",">--\x3e",r).unescape("\x3c!--</if",">--\x3e",r).unescape("\x3c!--<else ",">--\x3e",r).unescape("\x3c!--</else",">--\x3e",r).unescape("\x3c!--<var",">--\x3e",r,!0),e.createSyntax("velocity").escape("#if","#end",n).escape("#set",")",(e=>!!e.match(i)&&n(e)),!0).escape("#foreach","#end",n).escape("#macro","#end",n).unescape("\x3c!--#if","#end--\x3e",r).unescape("\x3c!--#set",")--\x3e",(e=>!!e.match(s)&&r(e)),!0).unescape("\x3c!--#foreach","#end--\x3e",r).unescape("\x3c!--#macro","#end--\x3e",r),e.escape("*|","|*",n,!0).unescape("\x3c!--*|","|*--\x3e",r,!0)};class m{constructor(e=d){this._disposables=[],this._escapes=[],this._unescapes=[];const{_escapes:t,_unescapes:a}=this;e({createSyntax(e){return{...this,syntax:e}},escape(e,a,l,o){return t.push({start:e,end:a,mapFn:l,isVariable:o,syntax:this.syntax||e}),this},unescape(e,t,l,o){return a.push({start:e,end:t,mapFn:l,isVariable:o,syntax:this.syntax||e}),this}})}getMappings(e,t){return l(e,this._escapes,t)}getRevertMappings(e,t){return l(e,this._unescapes,t)}getEscapedText(e,t){return o(e,this.getMappings(e,t))}getUnescapedText(e,t){return o(e,this.getRevertMappings(e,t))}addDisposable(e){this._disposables.push(e)}dispose(){for(const e of this._disposables)e.dispose()}}},9008:(e,t,a)=>{"use strict";let l;async function o(){return l||(l=await a.e(1729).then(a.t.bind(a,1729,19)).then((e=>e.default)))}a.d(t,{F:()=>o})},44779:(e,t,a)=>{"use strict";a.d(t,{C:()=>n,R:()=>o});var l=a(90717);function o(e){const t=(0,l.xy)(e);if(!e.querySelector("style[amp4email-boilerplate]")){const a=e.createElement("style");a.setAttribute("amp4email-boilerplate",""),a.innerHTML="body{visibility:hidden}",t.prepend(a)}}function n(e){const t=e.querySelector("style[amp4email-boilerplate]");t&&t.remove()}},1511:(e,t,a)=>{"use strict";a.d(t,{Vq:()=>n,gP:()=>l,zq:()=>o});const l="https://cdn.ampproject.org/v0",o=`${l}.js`,n=`script[src='${o}']`},46496:(e,t,a)=>{"use strict";a.d(t,{C:()=>o});var l=a(90717);function o(e){let t=e.querySelectorAll("meta");for(const l of t){const e=l.getAttribute("charset");if(e)return void("utf-8"!==e&&l.setAttribute("charset","utf-8"))}const a=(0,l.xy)(e),o=e.createElement("meta");o.setAttribute("charset","utf-8"),a.insertBefore(o,a.firstChild)}},16341:(e,t,a)=>{"use strict";function l(e,t,a){const l=a('script:not([type="application/ld+json"])'),o=e.querySelectorAll(l);for(const r of o){var n;null!==(n=r.getAttribute("src"))&&void 0!==n&&n.startsWith("https://cdn.ampproject.org/")||r.closest("amp-state")&&"application/json"===r.getAttribute("type")||r.remove()}}a.d(t,{y:()=>l})},90717:(e,t,a)=>{"use strict";function l(e){let t=e.documentElement;return t||(t=e.createElement("html"),e.appendChild(t)),t}function o(e){let t=e.head;if(!t){t=e.createElement("head");let a=l(e);a.insertBefore(t,a.firstChild)}return t}function n(e){const t=Object.create(null),a=e.getAttributeNames();for(const l of a)t[l]=e.getAttribute(l);return t}function r(e){for(const t of document.querySelectorAll("iframe"))if(t.contentDocument===e.ownerDocument)return t}a.d(t,{ep:()=>l,gu:()=>n,xm:()=>r,xy:()=>o})},80599:(e,t,a)=>{"use strict";a.d(t,{H:()=>l});class l{constructor(e){this._voidElements=void 0,this._voidElements=new Set(e)}isVoidElement(e,t){return this._voidElements.has(e.toLowerCase())}}},39244:(e,t,a)=>{"use strict";a.d(t,{X:()=>w});var l=a(83304);let o;!function(e){e[e.StartCommentTag=0]="StartCommentTag",e[e.Comment=1]="Comment",e[e.EndCommentTag=2]="EndCommentTag",e[e.StartTagOpen=3]="StartTagOpen",e[e.StartTagClose=4]="StartTagClose",e[e.StartTagSelfClose=5]="StartTagSelfClose",e[e.StartTag=6]="StartTag",e[e.EndTagOpen=7]="EndTagOpen",e[e.EndTagClose=8]="EndTagClose",e[e.EndTag=9]="EndTag",e[e.DelimiterAssign=10]="DelimiterAssign",e[e.AttributeName=11]="AttributeName",e[e.AttributeValue=12]="AttributeValue",e[e.StartDoctypeTag=13]="StartDoctypeTag",e[e.Doctype=14]="Doctype",e[e.EndDoctypeTag=15]="EndDoctypeTag",e[e.Content=16]="Content",e[e.Whitespace=17]="Whitespace",e[e.Unknown=18]="Unknown",e[e.Script=19]="Script",e[e.Styles=20]="Styles",e[e.EOS=21]="EOS",e[e.AdvancedStart=100]="AdvancedStart",e[e.AdvancedEnd=101]="AdvancedEnd"}(o||(o={}));class n{constructor(e,t){this.source=void 0,this.len=void 0,this.position=void 0,this.source=e,this.len=e.length,this.position=t}eos(){return this.len<=this.position}getSource(){return this.source}pos(){return this.position}goBackTo(e){this.position=e}goBack(e){this.position-=e}advance(e){this.position+=e}goToEnd(){this.position=this.source.length}nextChar(){return this.source.charCodeAt(this.position++)||0}peekChar(e=0){return this.source.charCodeAt(this.position+e)||0}advanceIfChar(e){return e===this.source.charCodeAt(this.position)&&(this.position++,!0)}advanceIfChars(e){let t;if(this.position+e.length>this.source.length)return!1;for(t=0;t<e.length;t++)if(this.source.charCodeAt(this.position+t)!==e[t])return!1;return this.advance(t),!0}advanceIfRegExp(e){const t=this.source.substr(this.position).match(e);return t?(this.position=this.position+t.index+t[0].length,t[0]):""}advanceUntilRegExp(e){const t=this.source.substr(this.position).match(e);return t?(this.position=this.position+t.index,t[0]):(this.goToEnd(),"")}advanceUntilChar(e){for(;this.position<this.source.length;){if(this.source.charCodeAt(this.position)===e)return!0;this.advance(1)}return!1}advanceUntilChars(e){for(;this.position+e.length<=this.source.length;){let t=0;for(;t<e.length&&this.source.charCodeAt(this.position+t)===e[t];t++);if(t===e.length)return!0;this.advance(1)}return this.goToEnd(),!1}skipWhitespace(){return this.advanceWhileChar((e=>e===E||e===f||e===g||e===h||e===b))>0}advanceWhileChar(e){const t=this.position;for(;this.position<this.len&&e(this.source.charCodeAt(this.position));)this.position++;return this.position-t}}const r="!".charCodeAt(0),i="-".charCodeAt(0),s="<".charCodeAt(0),d=">".charCodeAt(0),m="/".charCodeAt(0),c="=".charCodeAt(0),u='"'.charCodeAt(0),p="'".charCodeAt(0),g="\n".charCodeAt(0),b="\r".charCodeAt(0),h="\f".charCodeAt(0),E=" ".charCodeAt(0),f="\t".charCodeAt(0),v={"text/x-handlebars-template":!0,"text/html":!0};function y(e,t=0,a=l.S5.WithinContent,g=!1){const b=new n(e,t);let h,E,f,y,A,_=a,C=0,S=o.Unknown;function w(){return b.advanceIfRegExp(/^[_:a-zA-Z][_:\w-.\d]*/).toLowerCase()}function k(e,t,a){return S=t,C=e,h=a,t}function x(){const e=b.pos();if(b.eos())return k(e,o.EOS);let t;switch(_){case l.S5.WithinComment:return b.advanceIfChars([i,i,d])?(_=l.S5.WithinContent,k(e,o.EndCommentTag)):(b.advanceUntilChars([i,i,d]),k(e,o.Comment));case l.S5.WithinDoctype:return b.advanceIfChar(d)?(_=l.S5.WithinContent,k(e,o.EndDoctypeTag)):(b.advanceUntilChar(d),k(e,o.Doctype));case l.S5.WithinContent:if(b.advanceIfChar(s)){if(!b.eos()&&b.peekChar()===r){if(b.advanceIfChars([r,i,i]))return _=l.S5.WithinComment,k(e,o.StartCommentTag);if(b.advanceIfRegExp(/^!doctype/i))return _=l.S5.WithinDoctype,k(e,o.StartDoctypeTag)}return b.advanceIfChar(m)?(_=l.S5.AfterOpeningEndTag,k(e,o.EndTagOpen)):(_=l.S5.AfterOpeningStartTag,k(e,o.StartTagOpen))}return b.advanceUntilChar(s),k(e,o.Content);case l.S5.AfterOpeningEndTag:return w().length>0?(_=l.S5.WithinEndTag,k(e,o.EndTag)):b.skipWhitespace()?k(e,o.Whitespace,"Tag name must directly follow the open bracket."):(_=l.S5.WithinEndTag,b.advanceUntilChar(d),e<b.pos()?k(e,o.Unknown,"End tag name expected."):x());case l.S5.WithinEndTag:if(b.skipWhitespace())return k(e,o.Whitespace);if(b.advanceIfChar(d))return _=l.S5.WithinContent,k(e,o.EndTagClose);if(g&&b.peekChar()===s)return _=l.S5.WithinContent,k(e,o.EndTagClose,"Closing bracket missing.");t="Closing bracket expected.";break;case l.S5.AfterOpeningStartTag:return f=w(),A=void 0,y=void 0,f.length>0?(E=!1,_=l.S5.WithinTag,k(e,o.StartTag)):b.skipWhitespace()?k(e,o.Whitespace,"Tag name must directly follow the open bracket."):(_=l.S5.WithinTag,b.advanceUntilChar(d),e<b.pos()?k(e,o.Unknown,"Start tag name expected."):x());case l.S5.WithinTag:return b.skipWhitespace()?(E=!0,k(e,o.Whitespace)):E&&(y=b.advanceIfRegExp(/^[^\s"'></=\x00-\x0F\x7F\x80-\x9F]*/).toLowerCase(),y.length>0)?(_=l.S5.AfterAttributeName,E=!1,k(e,o.AttributeName)):b.advanceIfChars([m,d])?(_=l.S5.WithinContent,k(e,o.StartTagSelfClose)):b.advanceIfChar(d)?(_="script"===f?A&&v[A]?l.S5.WithinContent:l.S5.WithinScriptContent:"style"===f?l.S5.WithinStyleContent:l.S5.WithinContent,k(e,o.StartTagClose)):g&&b.peekChar()===s?(_=l.S5.WithinContent,k(e,o.StartTagClose,"Closing bracket missing.")):(b.advance(1),k(e,o.Unknown,"Unexpected character in tag."));case l.S5.AfterAttributeName:return b.skipWhitespace()?(E=!0,k(e,o.Whitespace)):b.advanceIfChar(c)?(_=l.S5.BeforeAttributeValue,k(e,o.DelimiterAssign)):(_=l.S5.WithinTag,x());case l.S5.BeforeAttributeValue:if(b.skipWhitespace())return k(e,o.Whitespace);let a=b.advanceIfRegExp(/^[^\s"'`=<>]+/);if(a.length>0)return b.peekChar()===d&&b.peekChar(-1)===m&&(b.goBack(1),a=a.substr(0,a.length-1)),"type"===y&&(A=a),_=l.S5.WithinTag,E=!1,k(e,o.AttributeValue);const n=b.peekChar();return n===p||n===u?(b.advance(1),b.advanceUntilChar(n)&&b.advance(1),"type"===y&&(A=b.getSource().substring(e+1,b.pos()-1)),_=l.S5.WithinTag,E=!1,k(e,o.AttributeValue)):(_=l.S5.WithinTag,E=!1,x());case l.S5.WithinScriptContent:let h=1;for(;!b.eos();){const t=b.advanceIfRegExp(/<!--|-->|<\/?script\s*\/?>?/i);if(0===t.length)return b.goToEnd(),k(e,o.Script);if("\x3c!--"===t)1===h&&(h=2);else if("--\x3e"===t)h=1;else if("/"!==t[1])2===h&&(h=3);else{if(3!==h){b.goBack(t.length);break}h=2}}return _=l.S5.WithinContent,e<b.pos()?k(e,o.Script):x();case l.S5.WithinStyleContent:return b.advanceUntilRegExp(/<\/style/i),_=l.S5.WithinContent,e<b.pos()?k(e,o.Styles):x()}return b.advance(1),_=l.S5.WithinContent,k(e,o.Unknown,t)}return{scan:function(){const e=b.pos(),t=x();return t===o.EOS||e!==b.pos()||g&&(t===o.StartTagClose||t===o.EndTagClose)?t:(b.advance(1),k(e,o.Unknown))},getTokenType:()=>S,getTokenOffset:()=>C,getTokenLength:()=>b.pos()-C,getTokenEnd:()=>b.pos(),getTokenText:()=>b.getSource().substring(C,b.pos()),getScannerState:()=>_,getTokenError:()=>h}}var A=a(80599),_=a(37918);function C(e){if("string"===typeof e){const t=e.startsWith("'")||e.startsWith('"')?1:0,a=e.endsWith("'")||e.endsWith('"')?e.length-1:e.length;return e.substring(t,a)}return e}class S{constructor(e,t){this.text=e,this.type=t,this.node=void 0,this.replaces=void 0}get hasNode(){return!!this.node}addReplace(e){var t;null===(t=this.replaces)||void 0===t||t.push(e)}start(e,t,a){if(!this.node){const l=this.node=new _.b(e,this.text.length,[],a);l.type=this.type,l.startTagEnd=t,this.replaces=[]}}finish(e,t){const a=this.replaces,l=this.node,o=e+(t||0);if(a){for(const e of a){const t=e.parent;if(!t)throw new Error("parent not defined");const a=t.children.indexOf(e);t.children.splice(a,1)}this.replaces=void 0}if(l){const a=l.parent;if(!a)throw new Error("parent not defined");a.children.push(l),l.closed=void 0!==t,l.endTagStart=e,l.end=o,l.content=this.text.substring(l.startTagEnd,e),this.node=void 0}}}class w{constructor(e){this.dataManager=e}parse(e,t=[]){var a;const l=y(e,void 0,void 0,!0),n=new _.b(0,e.length,[],void 0);n.type=_.Z.ROOT;let r,i=n,s=-1,d=null,m=l.scan();const c=()=>{if(!i.tag){const t=i.parent.children,a=t[t.length-2],l=e.substring(i.start,i.end);(null===a||void 0===a?void 0:a.type)===_.Z.HTML?(a.content=(a.content||"")+l,a.end=i.end,t.splice(t.length-1,1)):(i.type=_.Z.HTML,i.content=l,i.children=[]),i.type=_.Z.HTML}i=i.parent},u=new S(e,_.Z.COMMENT),p=new S(e,_.Z.DOCTYPE),g=e=>{i.children.push(e)};for(;m!==o.EOS;){switch(m){case o.StartDoctypeTag:p.start(l.getTokenOffset(),l.getTokenEnd(),i);break;case o.EndDoctypeTag:{const t=i.lastChild,a=p.node;if(!a)throw new Error("");const o=t?t.end:void 0!==i.startTagEnd?i.startTagEnd:i.start;if(o!==a.start){const t=e.substring(o,a.start);if(t){const e=new _.b(o,a.start,[],i);e.type=_.Z.HTML,e.content=t,g(e)}}p.finish(l.getTokenOffset(),l.getTokenLength());break}case o.StartCommentTag:u.start(l.getTokenOffset(),l.getTokenEnd(),i);break;case o.EndCommentTag:{const t=i.lastChild,a=u.node;if(!a)throw new Error("");const o=t?t.end:void 0!==i.startTagEnd?i.startTagEnd:i.start;if(o!==a.start){const t=e.substring(o,a.start);if(t){const e=new _.b(o,a.start,[],i);e.type=_.Z.HTML,e.content=t,g(e)}}u.finish(l.getTokenOffset(),l.getTokenLength());break}case o.StartTagOpen:const a=i.lastChild,n=new _.b(l.getTokenOffset(),e.length,[],i),m=a?a.end:void 0!==i.startTagEnd?i.startTagEnd:i.start;if(m!==n.start){const t=e.substring(m,n.start);if(t){const e=new _.b(m,n.start,[],i);e.type=_.Z.HTML,e.content=t,g(e)}}g(n),i=n;break;case o.StartTag:i.tag=l.getTokenText();break;case o.StartTagClose:i.parent&&(i.end=l.getTokenEnd(),l.getTokenLength()?(i.startTagEnd=l.getTokenEnd(),i.tag&&this.dataManager.isVoidElement(i.tag,t)&&(i.closed=!0,c())):c());break;case o.StartTagSelfClose:i.parent&&(i.closed=!0,i.end=l.getTokenEnd(),i.startTagEnd=l.getTokenEnd(),c());break;case o.EndTagOpen:s=l.getTokenOffset(),r=void 0;break;case o.EndTag:r=l.getTokenText().toLowerCase();break;case o.EndTagClose:let b=i;for(;!b.isSameTag(r)&&b.parent;)b=b.parent;if(b.parent){const t=i.lastChild,a=t?t.end:void 0===i.startTagEnd?i.start:i.startTagEnd;if(a!==s){const t=e.substring(a,s);if(t){const e=new _.b(a,s,[],i);e.type=_.Z.HTML,e.content=t,g(e)}}for(;i!==b;)i.end=s,i.closed=!1,c();i.closed=!0,i.endTagStart=s,i.end=l.getTokenEnd(),c()}break;case o.AttributeName:{d=l.getTokenText();let e=i.attributes;e||(i.attributes=e={}),e[d]=null;break}case o.AttributeValue:{const e=l.getTokenText(),t=i.attributes;t&&d&&(t[d]=C(e),d=null);break}}m=l.scan()}for(;i.parent;)i.end=e.length,i.closed=!1,c();u.hasNode,u.finish(e.length);const b=(null===(a=n.lastChild)||void 0===a?void 0:a.end)||0;if(b<e.length){const t=e.substring(b);if(t){const a=new _.b(b,e.length,[],n);a.type=_.Z.HTML,a.content=t,g(a)}}return{roots:n.children,findNodeBefore:n.findNodeBefore.bind(n),findNodeAt:n.findNodeAt.bind(n)}}}const k=["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"];new w(new A.H(k))},37918:(e,t,a)=>{"use strict";a.d(t,{b:()=>r,Z:()=>o});new Set(["area","br","col","embed","hr","img","input","link","meta","param"]);Object.create(null);function l(e,t){let a=0,l=e.length;if(0===l)return 0;for(;a<l;){let o=Math.floor((a+l)/2);t(e[o])?l=o:a=o+1}return a}let o;!function(e){e[e.HTML=0]="HTML",e[e.ELEMENT=1]="ELEMENT",e[e.ROOT=2]="ROOT",e[e.COMMENT=3]="COMMENT",e[e.DOCTYPE=4]="DOCTYPE",e[e.ADVANCED=5]="ADVANCED"}(o||(o={}));const n=e=>e.type===o.HTML?e.start-1:e.start;class r{get attributeNames(){return this.attributes?Object.keys(this.attributes):[]}get root(){return this.parent?this.parent.root:this}constructor(e,t,a,l){this.start=e,this.end=t,this.children=a,this.parent=l,this.content=void 0,this.type=o.ELEMENT,this.tag=void 0,this.closed=!1,this.startTagEnd=void 0,this.endTagStart=void 0,this.attributes=void 0,this.createdBy=void 0,this.isDirty=void 0}isSameTag(e){return void 0===this.tag?void 0===e:void 0!==e&&this.tag.length===e.length&&this.tag.toLowerCase()===e}get firstChild(){return this.children[0]}get lastChild(){return this.children.length?this.children[this.children.length-1]:void 0}findNodeBefore(e){const t=l(this.children,(t=>e<=n(t)))-1;if(t>=0){const a=this.children[t];if(e>n(a)){if(e<a.end)return a.findNodeBefore(e);const t=a.lastChild;return t&&t.end===a.end?a.findNodeBefore(e):a}}return this}findNodeAt(e){const t=l(this.children,(t=>e<=n(t)))-1;if(t>=0){const l=this.children[t];if(e>=n(l)&&e<=((a=l).type===o.HTML?a.end+1:a.end))return l.findNodeAt(e)}var a;return this}find(e){if(e(this))return this;for(const t of this.children){let a=t.find(e);if(a)return a}}closest(e){let t=this;do{if(e(t))return t}while(t=t.parent)}parents(){return this.parent?[this.parent,...this.parent.parents()]:[]}closestFromRoot(e,t=!0){const a=t?[this,...this.parents()]:this.parents();for(let l=a.length-1;l>=0;l--){const t=a[l];if(e(t))return t}}contains(e){return Boolean(e.closest((e=>e===this)))}clone(e=this.parent,t=this.start,a=!0){const l=this.start-t,o=new r(t,this.end-l,[],e);return o.children=a?this.children.map((e=>e.clone(o,e.start-l))):[],o.attributes={...this.attributes},o.closed=this.closed,o.content=this.content,o.startTagEnd=this.startTagEnd,o.endTagStart=this.endTagStart,o.tag=this.tag,o.type=this.type,o}}},65053:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});const l=(e,t)=>t.some((t=>t instanceof RegExp?t.test(e):t===e)),o=new Set(["https:","http:","file:"]),n=e=>{try{const{protocol:t}=new URL(e);return t.endsWith(":")&&!t.includes(".")&&!o.has(t)}catch{return!1}},r=(e,{stripHash:t})=>{var a,l;const o=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(e);if(!o)throw new Error(`Invalid URL: ${e}`);let{type:n,data:r,hash:i}=o.groups;const s=n.split(";");i=t?"":i;let d=!1;"base64"===s[s.length-1]&&(s.pop(),d=!0);const m=null!==(a=null===(l=s.shift())||void 0===l?void 0:l.toLowerCase())&&void 0!==a?a:"",c=[...s.map((e=>{let[t,a=""]=e.split("=").map((e=>e.trim()));return"charset"===t&&(a=a.toLowerCase(),"us-ascii"===a)?"":`${t}${a?`=${a}`:""}`})).filter(Boolean)];return d&&c.push("base64"),(c.length>0||m&&"text/plain"!==m)&&c.unshift(m),`data:${c.join(";")},${d?r.trim():r}${i?`#${i}`:""}`};function i(e,t){if("string"!==typeof(t={defaultProtocol:"http",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0,...t}).defaultProtocol||t.defaultProtocol.endsWith(":")||(t.defaultProtocol=`${t.defaultProtocol}:`),e=e.trim(),/^data:/i.test(e))return r(e,t);if(n(e))return e;const a=e.startsWith("//");!a&&/^\.*\//.test(e)||(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));const o=new URL(e);if(t.forceHttp&&t.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&"https:"===o.protocol&&(o.protocol="http:"),t.forceHttps&&"http:"===o.protocol&&(o.protocol="https:"),t.stripAuthentication&&(o.username="",o.password=""),t.stripHash?o.hash="":t.stripTextFragment&&(o.hash=o.hash.replace(/#?:~:text.*?$/i,"")),o.pathname){const e=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g;let t=0,a="";for(;;){const l=e.exec(o.pathname);if(!l)break;const n=l[0],r=l.index;a+=o.pathname.slice(t,r).replace(/\/{2,}/g,"/"),a+=n,t=r+n.length}a+=o.pathname.slice(t,o.pathname.length).replace(/\/{2,}/g,"/"),o.pathname=a}if(o.pathname)try{o.pathname=decodeURI(o.pathname)}catch{}if(!0===t.removeDirectoryIndex&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let e=o.pathname.split("/");const a=e[e.length-1];l(a,t.removeDirectoryIndex)&&(e=e.slice(0,-1),o.pathname=e.slice(1).join("/")+"/")}if(o.hostname&&(o.hostname=o.hostname.replace(/\.$/,""),t.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(o.hostname)&&(o.hostname=o.hostname.replace(/^www\./,""))),Array.isArray(t.removeQueryParameters))for(const n of[...o.searchParams.keys()])l(n,t.removeQueryParameters)&&o.searchParams.delete(n);if(Array.isArray(t.keepQueryParameters)||!0!==t.removeQueryParameters||(o.search=""),Array.isArray(t.keepQueryParameters)&&t.keepQueryParameters.length>0)for(const n of[...o.searchParams.keys()])l(n,t.keepQueryParameters)||o.searchParams.delete(n);if(t.sortQueryParameters){o.searchParams.sort();try{o.search=decodeURIComponent(o.search)}catch{}}t.removeTrailingSlash&&(o.pathname=o.pathname.replace(/\/$/,"")),t.removeExplicitPort&&o.port&&(o.port="");const i=e;return e=o.toString(),t.removeSingleSlash||"/"!==o.pathname||i.endsWith("/")||""!==o.hash||(e=e.replace(/\/$/,"")),(t.removeTrailingSlash||"/"===o.pathname)&&""===o.hash&&t.removeSingleSlash&&(e=e.replace(/\/$/,"")),a&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,"//")),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,"")),e}},58521:(e,t,a)=>{"use strict";a.d(t,{hI:()=>b,u$:()=>g,KU:()=>p});var l=a(96651),o=a(3792),n=a(76233);let r,i,s,d;!function(e){let t,a,l,o;t||(t=e.TasksControllerCreateTask||(e.TasksControllerCreateTask={})),a||(a=e.TasksControllerGetTask||(e.TasksControllerGetTask={})),l||(l=e.TasksControllerGetEmail||(e.TasksControllerGetEmail={})),o||(o=e.TasksControllerGetEmailHtml||(e.TasksControllerGetEmailHtml={}))}(r||(r={})),function(e){let t,a,l,o,n,r;t||(t=e.ManParseControllerLogoGen||(e.ManParseControllerLogoGen={})),a||(a=e.ManParseControllerSite||(e.ManParseControllerSite={})),l||(l=e.ManParseControllerColor||(e.ManParseControllerColor={})),o||(o=e.ManParseControllerStyle||(e.ManParseControllerStyle={})),n||(n=e.ManParseControllerColorScheme||(e.ManParseControllerColorScheme={})),r||(r=e.ManParseControllerImage||(e.ManParseControllerImage={}))}(i||(i={})),function(e){let t,a;t||(t=e.MaintenanceControllerReloadBlocks||(e.MaintenanceControllerReloadBlocks={})),a||(a=e.MaintenanceControllerReloadUnsplashTopics||(e.MaintenanceControllerReloadUnsplashTopics={}))}(s||(s={})),function(e){e.Json="application/json",e.FormData="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Text="text/plain"}(d||(d={}));class m{constructor(e={}){this.baseUrl="",this.securityData=null,this.securityWorker=void 0,this.abortControllers=new Map,this.customFetch=(...e)=>fetch(...e),this.baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"},this.setSecurityData=e=>{this.securityData=e},this.contentFormatters={[d.Json]:e=>null===e||"object"!==typeof e&&"string"!==typeof e?e:JSON.stringify(e),[d.Text]:e=>null!==e&&"string"!==typeof e?JSON.stringify(e):e,[d.FormData]:e=>Object.keys(e||{}).reduce(((t,a)=>{const l=e[a];return t.append(a,l instanceof Blob?l:"object"===typeof l&&null!==l?JSON.stringify(l):`${l}`),t}),new FormData),[d.UrlEncoded]:e=>this.toQueryString(e)},this.createAbortSignal=e=>{if(this.abortControllers.has(e)){const t=this.abortControllers.get(e);return t?t.signal:void 0}const t=new AbortController;return this.abortControllers.set(e,t),t.signal},this.abortRequest=e=>{const t=this.abortControllers.get(e);t&&(t.abort(),this.abortControllers.delete(e))},this.request=async({body:e,secure:t,path:a,type:l,query:o,format:n,baseUrl:r,cancelToken:i,extraQuery:s,...m})=>{const c=("boolean"===typeof t?t:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},u=this.mergeRequestParams(m,c);s&&(o=o?{...o,...s}:s);const p=o&&this.toQueryString(o),g=this.contentFormatters[l||d.Json],b=n||u.format,h=new Request(`${r||this.baseUrl||""}${a}${p?`?${p}`:""}`,{...u,headers:{...u.headers||{},...l&&l!==d.FormData?{"Content-Type":l}:{}},signal:(i?this.createAbortSignal(i):u.signal)||null,body:"undefined"===typeof e||null===e?null:g(e)});return this.customFetch(h).then((async e=>{const t=e;t.data=null,t.error=null,t.meta={request:h,response:t};const a=b?await e[b]().then((e=>(t.ok?t.data=e:t.error={data:e},t))).catch((e=>(t.error=e,t))):t;return i&&this.abortControllers.delete(i),a}))},Object.assign(this,e)}encodeQueryParam(e,t){return`${encodeURIComponent(e)}=${encodeURIComponent("number"===typeof t?t:`${t}`)}`}addQueryParam(e,t){return this.encodeQueryParam(t,e[t])}addArrayQueryParam(e,t){return e[t].map((e=>this.encodeQueryParam(t,e))).join("&")}toQueryString(e){const t=e||{};return Object.keys(t).filter((e=>"undefined"!==typeof t[e])).map((e=>Array.isArray(t[e])?this.addArrayQueryParam(t,e):this.addQueryParam(t,e))).join("&")}addQueryParams(e){const t=this.toQueryString(e);return t?`?${t}`:""}mergeRequestParams(e,t){return{...this.baseApiParams,...e,...t||{},headers:{...this.baseApiParams.headers||{},...e.headers||{},...t&&t.headers||{}}}}}class c extends m{constructor(...e){super(...e),this.tasks={tasksControllerCreateTask:(e,t={})=>this.request({path:"/tasks",method:"POST",body:e,type:d.Json,...t}),tasksControllerGetTask:(e,t={})=>this.request({path:`/tasks/${e}`,method:"GET",...t}),tasksControllerGetEmail:(e,t={})=>this.request({path:`/tasks/${e}/email`,method:"GET",...t}),tasksControllerGetEmailHtml:(e,t={})=>this.request({path:`/tasks/${e}/html`,method:"GET",...t})},this.parsing={manParseControllerLogoGen:(e,t={})=>this.request({path:"/parsing/logo-gen",method:"GET",query:e,...t}),manParseControllerSite:(e,t={})=>this.request({path:"/parsing/site",method:"GET",query:e,...t}),manParseControllerColor:(e,t={})=>this.request({path:"/parsing/color",method:"GET",query:e,...t}),manParseControllerStyle:(e,t={})=>this.request({path:"/parsing/style",method:"GET",query:e,...t}),manParseControllerColorScheme:(e,t={})=>this.request({path:"/parsing/color-scheme",method:"GET",query:e,...t}),manParseControllerImage:(e,t={})=>this.request({path:"/parsing/image",method:"GET",query:e,...t})},this.maintenance={maintenanceControllerReloadBlocks:(e={})=>this.request({path:"/maintenance/reload-blocks",method:"GET",...e}),maintenanceControllerReloadUnsplashTopics:(e={})=>this.request({path:"/maintenance/reload-unsplash-topics",method:"GET",...e})}}}var u=a(74029);const p=e=>o.di.getInstance(e,u.Pz),g=e=>o.di.getOrCreateInstance(e,u.Bl,(()=>new c({baseUrl:"https://ai-mail.emcdn.ru"})));function b(e){return(t,a,r)=>{const i=o.di.getInstance(a,n.no);return(0,l.fetchBaseQuery)({...e,fetchFn:(null===i||void 0===i?void 0:i.execute)||fetch})(t,a,r)}}},13668:(e,t,a)=>{"use strict";a.d(t,{Kp:()=>l,Sb:()=>n,_1:()=>o});const l="SAVE",o="SHOW",n="NOTIFY"},66330:(e,t,a)=>{"use strict";a.d(t,{Y:()=>B});var l=a(98173),o=a(94043),n=a(12543),r=a(28973),i=a(12005),s=a(2604),d=a(61334),m=a.n(d),c=a(47014),u=a(32947),p=a(16390),g=a(64909),b=a(73180),h=a(90614),E=a(15626),f=a(3326);const v=a(41735).default;var y=a(80148),A=a(76550);const _="em_locale",C="em_ant_locale",S="em_mergeTags_locale",w=e=>{try{return JSON.parse(localStorage.getItem(e)||"")}catch{return null}},k=(e,t)=>{const a=w(e);return a?(localStorage.removeItem(e),localStorage.setItem(t,JSON.stringify(a)),a):null},x=()=>{var e,t;return(null===(e=w(C))||void 0===e?void 0:e.data)||(null===(t=k("ant_locale",C))||void 0===t?void 0:t.data)||v},B=({children:e})=>{const t=(0,y.NF)(),d=(0,s.wA)(),v=(0,g.hN)(),B=(0,s.d4)(c.B),[T,R]=(0,i.HO)(),[N,L]=(0,i.Yj)(),P=(0,h.ml)(E.AZ.READ_LOCALE),I=B||(u.EW.isPlugin?void 0:"ru_RU"),[M,O]=(0,l.useState)((()=>(0,o.hU)())),[V,F]=(0,l.useState)(x),[D,H]=(0,l.useState)(!0),[j,z]=(0,l.useState)(!1);return(0,l.useEffect)((()=>{const e=w(_)||k("locale",_);if(null!==e&&void 0!==e&&e.data&&(O((0,o.hU)(e.data)),H(!1)),!u.EW.isPlugin){const e=w(S);null!==e&&void 0!==e&&e.data&&d((0,p.Kj)(e.data))}}),[]),(0,l.useEffect)((()=>{I&&a(77778)(`./${"uk"===I?"uk_UA":I}.js`).then((e=>{const t=e.default;F((a=>a.locale!==t.locale?(localStorage.setItem(C,JSON.stringify(e.default)),t):a))})).catch((e=>{}))}),[I]),(0,l.useEffect)((()=>{!u.EW.isPlugin&&I&&a(93718)(`./${"uk"===I?"uk_UA":I}.ts`).then((e=>{d((0,p.Kj)(e.default)),localStorage.setItem(S,JSON.stringify(e.default))}))}),[I,d]),(0,b.Z)((([e])=>{!e&&R.error&&v.fromError("GET_LOCALES_ERROR",void 0,R.error)}),[R.error,v]),(0,b.Z)((([e])=>{I&&e!==I&&P.fire(I).then((([e])=>{if(e){var a;const t=null===(a=m()(e,{format:"jed",fuzzy:!0,domain:"default"}))||void 0===a?void 0:a.locale_data.default;O((0,o.hU)(t)),z(!0)}else u.EW.isPlugin&&t.getInstance(A.Ef)?z(!0):R.isSuccess?N({id:I}):T()}))}),[I,P]),(0,l.useEffect)((()=>{if(R.isSuccess&&I){const e=R.data.find((([e])=>e===I));if(!e)return void z(!0);const t=w(_);(null===t||void 0===t?void 0:t.id)===I&&e[1]<=t.time?z(!0):N({id:I})}}),[I,R,N]),(0,b.Z)((([e])=>{!e&&L.isError&&v.fromError("GET_LOCALE_ERROR",void 0,L.isError)}),[L.isError,v]),(0,l.useEffect)((()=>{if(R.isSuccess&&L.isSuccess){var e,t;if((null===(e=L.originalArgs)||void 0===e?void 0:e.id)!==I)return;const a=L.data,l=R.data.find((([e])=>e===I)),n=null===(t=m()(a,{format:"jed",fuzzy:!0,domain:"default"}))||void 0===t?void 0:t.locale_data.default;localStorage.setItem(_,JSON.stringify({id:I,time:(null===l||void 0===l?void 0:l[1])||Date.now(),data:n})),O((0,o.hU)(n)),z(!0)}}),[L,I,R]),l.createElement(n.CY,{i18n:M},l.createElement(f.r4.Provider,{value:!D||j},l.createElement(r.Ay,{locale:V},e)))}},3326:(e,t,a)=>{"use strict";a.d(t,{LG:()=>i,ZU:()=>d,cR:()=>n,fh:()=>r,or:()=>o,r4:()=>s});var l=a(98173);const o=(0,l.createContext)({element:void 0}),n=()=>{var e;return null===(e=(0,l.useContext)(o))||void 0===e?void 0:e.element},r=(0,l.createContext)(void 0),i=()=>(0,l.useContext)(r),s=(0,l.createContext)(!1),d=()=>(0,l.useContext)(s)},63233:(e,t,a)=>{"use strict";a.d(t,{A:()=>Y});var l=a(16791),o=a(78915),n=a(46767),r=a(52779),i=a(92485),s=a(98119),d=a(65716),m=a(83027),c=a(98845),u=a(40835),p=a(19992),g=a(73668),b=a(79965),h=a(94160),E=a(6193),f=a(47491),v=a(90925),y=a(30397),A=a(64706),_=a(38251),C=a(23424),S=a(79253),w=a(15812),k=a(1047),x=a(54838),B=a(22536),T=a(12741),R=a(39206),N=a(47014),L=a(38540),P=a(61058),I=a(68984),M=a(12005),O=a(8111),V=a(705),F=a(92960),D=a(33932),H=a(12744),j=a(59089),z=a(871),W=a(2952),G=a(80772),U=a(84572),q=a(16390),Z=a(3792),X=a(80148);const K=(0,l.HY)({[Z.di.reducerPath]:Z.di.reducer,[F.Z8.reducerPath]:F.Z8.reducer,[M.Ad.reducerPath]:M.Ad.reducer,[o.Q2.reducerPath]:o.Q2.reducer,[r.S.reducerPath]:r.S.reducer,[i.k.reducerPath]:i.k.reducer,[n.OV.reducerPath]:n.OV.reducer,[s.yR.reducerPath]:s.yR.reducer,[d.Nq.reducerPath]:d.Nq.reducer,[m.kE.reducerPath]:m.kE.reducer,[c.GY.reducerPath]:c.GY.reducer,[I.VM.reducerPath]:I.VM.reducer,[u.yH.reducerPath]:u.yH.reducer,[p.B.reducerPath]:p.B.reducer,[g.f.reducerPath]:g.f.reducer,[O.Jg.reducerPath]:O.Jg.reducer,[z.CL.reducerPath]:z.CL.reducer,[W.tO.reducerPath]:W.tO.reducer,[V.vx.reducerPath]:V.vx.reducer,[b.M.reducerPath]:b.M.reducer,[h.F.reducerPath]:h.F.reducer,[E.KA.reducerPath]:E.KA.reducer,[f.Sd.reducerPath]:f.Sd.reducer,[v.y.reducerPath]:v.y.reducer,[C.Ay.name]:C.Ay.reducer,[S.Ay.name]:S.Ay.reducer,[w.Ay.name]:w.Ay.reducer,[k.Ay.name]:k.Ay.reducer,[x.Ay.name]:x.Ay.reducer,[B.Ay.name]:B.Ay.reducer,[T.Ay.name]:T.Ay.reducer,[R.Ay.name]:R.Ay.reducer,[N.Ay.name]:N.Ay.reducer,[L.Ay.name]:L.Ay.reducer,[G.Ay.name]:G.Ay.reducer,[P.Ay.name]:P.Ay.reducer,[D.Zs.reducerPath]:D.Zs.reducer,[H.Uu.reducerPath]:H.Uu.reducer,[U.Ay.name]:U.Ay.reducer,[j.So.reducerPath]:j.So.reducer,[q.Ay.name]:q.Ay.reducer,[y.C.reducerPath]:y.C.reducer,[A.N.reducerPath]:A.N.reducer,[_.U8.reducerPath]:_.U8.reducer}),Y=(e,t)=>"authorizationApi/resetApiState"===t.type?K({[X.IP]:e[X.IP],[M.Ad.reducerPath]:e[M.Ad.reducerPath]},t):K(e,t)},12133:e=>{e.exports=({__:e})=>`<style em="styles">\n amp-accordion > section > * {\n background: none !important;\n padding: 0 !important;\n border: none !important;\n overflow: visible !important;\n }\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td>\n <amp-accordion animate expand-single-section>\n <section>\n <header>\n <table cellpadding="0" cellspacing="0" border="0" width="100%">\n <tr>\n <td style="padding: 10px 0; border-bottom: 1px solid #CCCCCC;">\n <div style="font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; font-size: 16px; line-height: 21px; color: #5A5A5A;"><strong>${e("Section title")}</strong></div>\n </td>\n </tr>\n </table>\n </header>\n <div>\n <table cellpadding="0" cellspacing="0" border="0" width="100%" em="atom">\n <tr>\n <td style="padding: 10px 0;">\n <div style="font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; font-size: 16px; line-height: 21px; color: #5A5A5A;">${e("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")}</div>\n </td>\n </tr>\n </table>\n </div>\n </section>\n </amp-accordion>\n</td></tr></table>`},67558:e=>{e.exports=({__:e})=>`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td style="padding: 10px 0;">\n <table cellpadding="0" cellspacing="0" border="0" width="200" class="em-mob-width-100perc">\n <tr>\n <td align="center" valign="middle" height="41" style="background-color: #1C52DC; border-radius: 5px; height: 41px;">\n <a href="" target="_blank" style="display: block; height: 41px; font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; color: #FFFFFF; font-size: 16px; line-height: 41px; text-decoration: none; white-space: nowrap;">\n ${e("Button")}\n </a>\n </td>\n </tr>\n </table>\n</td></tr></table>`},74372:e=>{e.exports=({__:e})=>`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td>\n <amp-carousel width="800" height="600" layout="responsive" type="slides" controls>\n <amp-img src="${e("https://cdn.useblocks.io/1351/241031_18_JoH0f3E.png")}" width="800" height="600" layout="responsive" alt=""></amp-img>\n <amp-img src="${e("https://cdn.useblocks.io/1351/241031_18_aJAY1Xz.png")}" width="800" height="600" layout="responsive" alt=""></amp-img>\n <amp-img src="${e("https://cdn.useblocks.io/1351/241031_18_OQEyMEF.png")}" width="800" height="600" layout="responsive" alt=""></amp-img>\n </amp-carousel>\n</td></tr></table>`},40845:e=>{e.exports='<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td height="0" style="padding: 20px 0 0; border-top: 1px solid #EEEEEE;">&nbsp;</td></tr></table>'},62315:e=>{e.exports=({__:e})=>`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td style="padding: 20px 0 10px;">\n <div style="font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; font-size: 24px; line-height: 32px; color: #333333;"><strong>${e("Header text")}</strong></div>\n</td></tr></table>`},80465:e=>{e.exports=({__:e})=>`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td>\n <table cellpadding="0" cellspacing="0" border="0" width="100%">\n <tr>\n <td align="left" valign="top" width="20">\n <div style="font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; font-size: 16px; line-height: 21px; color: #5A5A5A;">1.</div>\n </td>\n <td align="left" valign="top" style="padding-bottom: 10px;">\n <div style="font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; font-size: 16px; line-height: 21px; color: #5A5A5A;">${e("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")}</div>\n </td>\n </tr>\n </table>\n</td></tr></table>`},75995:e=>{e.exports=({__:e})=>`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td>\n <table cellpadding="0" cellspacing="0" border="0" width="100%">\n <tr>\n <td align="left" valign="top" width="20">\n <div style="font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; font-size: 16px; line-height: 21px; color: #5A5A5A;">&bull;</div>\n </td>\n <td align="left" valign="top" style="padding-bottom: 10px;">\n <div style="font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; font-size: 16px; line-height: 21px; color: #5A5A5A;">${e("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")}</div>\n </td>\n </tr>\n </table>\n</td></tr></table>`},66930:e=>{e.exports='<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td height="20"></td></tr></table>'},45848:e=>{e.exports=({__:e})=>`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom">\n <tr>\n <td align="center" valign="top">\n <div style="font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; font-size: 16px; line-height: 21px; color: #5A5A5A;">${e("Column")} 1</div>\n </td>\n <td align="center" valign="top">\n <div style="font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; font-size: 16px; line-height: 21px; color: #5A5A5A;">${e("Column")} 2</div>\n </td>\n <td align="center" valign="top">\n <div style="font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; font-size: 16px; line-height: 21px; color: #5A5A5A;">${e("Column")} 3</div>\n </td>\n </tr>\n</table>`},34021:e=>{e.exports=({__:e})=>`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td style="padding-bottom: 10px;">\n <div style="font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; font-size: 16px; line-height: 21px; color: #5A5A5A;">${e("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")}</div>\n</td></tr></table>`},92048:e=>{e.exports='<tr em="block" class="empty-structure">\n\t<td align="center">\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t<table cellpadding="0" cellspacing="0" border="0" width="660"><tr><td>\n\t\t<![endif]--\x3e\n\t\t<table align="center" cellpadding="0" cellspacing="0" border="0" width="100%" style="max-width: 660px;">\n\t\t\t<tr>\n\t\t\t\t<td align="center">\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="30" ></td></tr></table>\n\t\t\t\t\t<table align="center" cellpadding="0" cellspacing="0" border="0" width="91%">\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="30" ></td></tr></table>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t</td></tr></table>\n\t\t<![endif]--\x3e\n\t</td>\n</tr>\n'},31557:e=>{e.exports='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n<html>\n<head>\n <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n <meta name="viewport" content="width=device-width, initial-scale=1">\n <title></title>\n <style type="text/css">\n html {\n -webkit-text-size-adjust: none;\n -ms-text-size-adjust: none;\n }\n </style>\n <style em="styles">\n@media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-narrow-table {\n width: 100%!important;\n max-width: 660px!important;\n min-width: 320px!important;\n }\n}\n</style>\n</head>\n<body style="margin: 0; padding: 0;">\n <span class="preheader" style="display: none !important; visibility: hidden; opacity: 0; color: #F8F8F8; height: 0; width: 0; font-size: 1px;">&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;\u200c&nbsp;</span>\n \x3c!--[if !mso]>\x3c!--\x3e\n <div style="font-size:0px;color:transparent;opacity:0;">\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800</div>\n \x3c!--<![endif]--\x3e\n <table cellpadding="0" cellspacing="0" border="0" width="100%" style="font-size: 1px; line-height: normal;">\n <tr em="group">\n <td align="center" bgcolor="#F8F8F8">\n \x3c!--[if (gte mso 9)|(IE)]>\n <table cellpadding="0" cellspacing="0" border="0" width="660"><tr><td>\n <![endif]--\x3e\n <table cellpadding="0" cellspacing="0" width="100%" border="0" style="max-width: 660px; min-width: 660px; width: 660px;" class="em-narrow-table"></table>\n \x3c!--[if (gte mso 9)|(IE)]>\n </td></tr></table>\n <![endif]--\x3e\n </td>\n </tr>\n </table>\n</body>\n</html>'},7549:e=>{e.exports='<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n\n .em-mob-wrap {\n display: block!important;\n }\n\n .em-mob-padding_right-20 {\n padding-right: 20px!important;\n }\n \n .em-mob-padding_left-20 {\n padding-left: 20px!important;\n }\n }\n</style>\n<tr em="block" class="em-structure">\n <td align="center" style="padding: 30px 40px;" class="em-mob-padding_left-20 em-mob-padding_right-20">\n <table border="0" cellspacing="0" cellpadding="0" class="em-mob-width-100perc">\n <tr>\n <td width="580" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n </tr>\n </table>\n </td>\n</tr>'},29539:e=>{e.exports='<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n\n .em-mob-wrap {\n display: block!important;\n }\n\n .em-mob-padding_right-20 {\n padding-right: 20px!important;\n }\n \n .em-mob-padding_left-20 {\n padding-left: 20px!important;\n }\n\n .em-mob-height-20px {\n height: 20px!important;\n }\n }\n</style>\n<tr em="block" class="em-structure">\n <td align="center" style="padding: 30px 40px;" class="em-mob-padding_left-20 em-mob-padding_right-20">\n <table border="0" cellspacing="0" cellpadding="0" class="em-mob-width-100perc">\n <tr>\n <td width="180" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n <td width="20" class="em-mob-wrap em-mob-height-20px"></td>\n <td width="380" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n </tr>\n </table>\n </td>\n</tr>'},75424:e=>{e.exports='<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n\n .em-mob-wrap {\n display: block!important;\n }\n\n .em-mob-padding_right-20 {\n padding-right: 20px!important;\n }\n \n .em-mob-padding_left-20 {\n padding-left: 20px!important;\n }\n\n .em-mob-height-20px {\n height: 20px!important;\n }\n }\n</style>\n<tr em="block" class="em-structure">\n <td align="center" style="padding: 30px 40px;" class="em-mob-padding_left-20 em-mob-padding_right-20">\n <table border="0" cellspacing="0" cellpadding="0" class="em-mob-width-100perc">\n <tr>\n <td width="280" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n <td width="20" class="em-mob-wrap em-mob-height-20px"></td>\n <td width="280" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n </tr>\n </table>\n </td>\n</tr>'},6573:e=>{e.exports='<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n\n .em-mob-wrap {\n display: block!important;\n }\n\n .em-mob-padding_right-20 {\n padding-right: 20px!important;\n }\n \n .em-mob-padding_left-20 {\n padding-left: 20px!important;\n }\n\n .em-mob-height-20px {\n height: 20px!important;\n }\n }\n</style>\n<tr em="block" class="em-structure">\n <td align="center" dir="rtl" style="padding: 30px 40px;" class="em-mob-padding_left-20 em-mob-padding_right-20">\n <table border="0" cellspacing="0" cellpadding="0" class="em-mob-width-100perc">\n <tr>\n <td width="180" dir="ltr" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n <td width="20" class="em-mob-wrap em-mob-height-20px"></td>\n <td width="380" dir="ltr" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n </tr>\n </table>\n </td>\n</tr>'},43643:e=>{e.exports='<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n\n .em-mob-wrap {\n display: block!important;\n }\n\n .em-mob-padding_right-20 {\n padding-right: 20px!important;\n }\n \n .em-mob-padding_left-20 {\n padding-left: 20px!important;\n }\n\n .em-mob-height-20px {\n height: 20px!important;\n }\n }\n</style>\n<tr em="block" class="em-structure">\n <td align="center" style="padding: 30px 40px;" class="em-mob-padding_left-20 em-mob-padding_right-20">\n <table border="0" cellspacing="0" cellpadding="0" class="em-mob-width-100perc">\n <tr>\n <td width="180" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n <td width="20" class="em-mob-wrap em-mob-height-20px"></td>\n <td width="180" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n <td width="20" class="em-mob-wrap em-mob-height-20px"></td>\n <td width="180" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n </tr>\n </table>\n </td>\n</tr>'},96786:e=>{e.exports='<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n\n .em-mob-wrap {\n display: block!important;\n }\n\n .em-mob-padding_right-20 {\n padding-right: 20px!important;\n }\n \n .em-mob-padding_left-20 {\n padding-left: 20px!important;\n }\n\n .em-mob-height-20px {\n height: 20px!important;\n }\n }\n</style>\n<tr em="block" class="em-structure">\n <td align="center" style="padding: 30px 40px;" class="em-mob-padding_left-20 em-mob-padding_right-20">\n <table border="0" cellspacing="0" cellpadding="0" class="em-mob-width-100perc">\n <tr>\n <td width="130" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n <td width="20" class="em-mob-wrap em-mob-height-20px"></td>\n <td width="130" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n <td width="20" class="em-mob-wrap em-mob-height-20px"></td>\n <td width="130" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n <td width="20" class="em-mob-wrap em-mob-height-20px"></td>\n <td width="130" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n </tr>\n </table>\n </td>\n</tr>'},10750:e=>{e.exports='\n<style>\n\t@media only screen and (max-device-width: 660px), only screen and (max-width: 660px) {\n\t\t.em-mob-width-100perc {\n\t\t\twidth: 100% !important;\n\t\t\tmax-width: 100% !important;\n\t\t}\n\n\t\t.em-mob-width-91perc {\n\t\t\twidth: 91% !important;\n\t\t\tmax-width: 91% !important;\n\t\t}\n\t}\n</style>\n<tr em="block" class="em-structure">\n\t<td align="center">\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t<table cellpadding="0" cellspacing="0" border="0" width="660"><tr><td>\n\t\t<![endif]--\x3e\n\t\t<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0" style="max-width: 660px;">\n\t\t\t<tr>\n\t\t\t\t<td align="center" valign="top">\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="30"></td></tr></table>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t<table border="0" cellspacing="0" cellpadding="0">\n\t\t\t\t\t<tr><td width="660" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 100%; max-width: 660px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="602" border="0" cellspacing="0" cellpadding="0" style="width: 91%; max-width: 602px;" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t</table><![endif]--\x3e\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="10"></td></tr></table>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t</td></tr></table>\n\t\t<![endif]--\x3e\n\t</td>\n</tr>\n\n'},97946:e=>{e.exports='\n<style>\n\t@media only screen and (max-device-width: 660px), only screen and (max-width: 660px) {\n\t\t.em-mob-width-100perc {\n\t\t\twidth: 100% !important;\n\t\t\tmax-width: 100% !important;\n\t\t}\n\n\t\t.em-mob-width-91perc {\n\t\t\twidth: 91% !important;\n\t\t\tmax-width: 91% !important;\n\t\t}\n\t}\n</style>\n<tr em="block" class="em-structure">\n\t<td align="center">\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t<table cellpadding="0" cellspacing="0" border="0" width="660"><tr><td>\n\t\t<![endif]--\x3e\n\t\t<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0" style="max-width: 660px;">\n\t\t\t<tr>\n\t\t\t\t<td align="center" valign="top">\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="30"></td></tr></table>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t<table border="0" cellspacing="0" cellpadding="0">\n\t\t\t\t\t<tr><td width="207" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 207px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="187" border="0" cellspacing="0" cellpadding="0" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]></td><td width="413" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 413px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="393" border="0" cellspacing="0" cellpadding="0" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t</table><![endif]--\x3e\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="10"></td></tr></table>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t</td></tr></table>\n\t\t<![endif]--\x3e\n\t</td>\n</tr>\n\n'},36529:e=>{e.exports='\n<style>\n\t@media only screen and (max-device-width: 660px), only screen and (max-width: 660px) {\n\t\t.em-mob-width-100perc {\n\t\t\twidth: 100% !important;\n\t\t\tmax-width: 100% !important;\n\t\t}\n\n\t\t.em-mob-width-91perc {\n\t\t\twidth: 91% !important;\n\t\t\tmax-width: 91% !important;\n\t\t}\n\t}\n</style>\n<tr em="block" class="em-structure">\n\t<td align="center">\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t<table cellpadding="0" cellspacing="0" border="0" width="660"><tr><td>\n\t\t<![endif]--\x3e\n\t\t<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0" style="max-width: 660px;">\n\t\t\t<tr>\n\t\t\t\t<td align="center" valign="top">\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="30"></td></tr></table>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t<table border="0" cellspacing="0" cellpadding="0">\n\t\t\t\t\t<tr><td width="311" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 311px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="291" border="0" cellspacing="0" cellpadding="0" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]></td><td width="311" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 311px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="291" border="0" cellspacing="0" cellpadding="0" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t</table><![endif]--\x3e\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="10"></td></tr></table>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t</td></tr></table>\n\t\t<![endif]--\x3e\n\t</td>\n</tr>\n\n'},50664:e=>{e.exports='\n<style>\n\t@media only screen and (max-device-width: 660px), only screen and (max-width: 660px) {\n\t\t.em-mob-width-100perc {\n\t\t\twidth: 100% !important;\n\t\t\tmax-width: 100% !important;\n\t\t}\n\n\t\t.em-mob-width-91perc {\n\t\t\twidth: 91% !important;\n\t\t\tmax-width: 91% !important;\n\t\t}\n\t}\n</style>\n<tr em="block" class="em-structure">\n\t<td align="center">\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t<table cellpadding="0" cellspacing="0" border="0" width="660"><tr><td>\n\t\t<![endif]--\x3e\n\t\t<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0" style="max-width: 660px;">\n\t\t\t<tr>\n\t\t\t\t<td align="center" valign="top">\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="30"></td></tr></table>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t<table border="0" cellspacing="0" cellpadding="0">\n\t\t\t\t\t<tr><td width="413" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 413px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="393" border="0" cellspacing="0" cellpadding="0" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]></td><td width="207" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 207px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="187" border="0" cellspacing="0" cellpadding="0" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t</table><![endif]--\x3e\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="10"></td></tr></table>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t</td></tr></table>\n\t\t<![endif]--\x3e\n\t</td>\n</tr>\n\n'},22548:e=>{e.exports='\n<style>\n\t@media only screen and (max-device-width: 660px), only screen and (max-width: 660px) {\n\t\t.em-mob-width-100perc {\n\t\t\twidth: 100% !important;\n\t\t\tmax-width: 100% !important;\n\t\t}\n\n\t\t.em-mob-width-91perc {\n\t\t\twidth: 91% !important;\n\t\t\tmax-width: 91% !important;\n\t\t}\n\t}\n</style>\n<tr em="block" class="em-structure">\n\t<td align="center">\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t<table cellpadding="0" cellspacing="0" border="0" width="660"><tr><td>\n\t\t<![endif]--\x3e\n\t\t<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0" style="max-width: 660px;">\n\t\t\t<tr>\n\t\t\t\t<td align="center" valign="top">\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="30"></td></tr></table>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t<table border="0" cellspacing="0" cellpadding="0">\n\t\t\t\t\t<tr><td width="207" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 207px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="187" border="0" cellspacing="0" cellpadding="0" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]></td><td width="207" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 207px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="187" border="0" cellspacing="0" cellpadding="0" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]></td><td width="207" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 207px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="187" border="0" cellspacing="0" cellpadding="0" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t</table><![endif]--\x3e\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="10"></td></tr></table>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t</td></tr></table>\n\t\t<![endif]--\x3e\n\t</td>\n</tr>\n\n'},20065:e=>{e.exports='\n<style>\n\t@media only screen and (max-device-width: 660px), only screen and (max-width: 660px) {\n\t\t.em-mob-width-100perc {\n\t\t\twidth: 100% !important;\n\t\t\tmax-width: 100% !important;\n\t\t}\n\n\t\t.em-mob-width-91perc {\n\t\t\twidth: 91% !important;\n\t\t\tmax-width: 91% !important;\n\t\t}\n\t}\n</style>\n<tr em="block" class="em-structure">\n\t<td align="center">\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t<table cellpadding="0" cellspacing="0" border="0" width="660"><tr><td>\n\t\t<![endif]--\x3e\n\t\t<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0" style="max-width: 660px;">\n\t\t\t<tr>\n\t\t\t\t<td align="center" valign="top">\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="30"></td></tr></table>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t<table border="0" cellspacing="0" cellpadding="0">\n\t\t\t\t\t<tr><td width="310" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 310px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="290" border="0" cellspacing="0" cellpadding="0" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t\t<td width="20">&nbsp;</td>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]></td><td width="310" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 310px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="290" border="0" cellspacing="0" cellpadding="0" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t\t<td width="20">&nbsp;</td>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t</table><![endif]--\x3e\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="10"></td></tr></table>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t</td></tr></table>\n\t\t<![endif]--\x3e\n\t</td>\n</tr>\n\n'},27941:(e,t,a)=>{"use strict";a.d(t,{Mu:()=>r,cM:()=>s,rD:()=>i});var l=a(2604),o=a(16390),n=a(39218);function r(e){if(e){const{type:t,project:a,isNew:l,id:o}=e;return`/projects/${a}/${"block"===t?"blocks":"emails"}/${l?`new?template=${o}`:o}`}return""}function i(){return(0,l.d4)(o.zg)}function s(e,t,a){return null!==e&&void 0!==e&&e.length?e.map(((e,l)=>function(e){return e.hasOwnProperty("children")}(e)?{key:(0,n.l)(),value:e.value,label:e.label,children:s(e.children,t,a),type:e.type}:{key:(0,n.l)(),label:e.label,value:e.value,onClick:t=>{a(e.value,t.domEvent)}})):void 0}},96734:(e,t,a)=>{"use strict";a.d(t,{p:()=>n});var l=a(74029),o=a(3792);const n=()=>o.di.useInstance(l.Zw)},3792:(e,t,a)=>{"use strict";a.d(t,{di:()=>r});var l=a(74568),o=a(88296),n=a(80148);const r={getContainer:n.My,createIdentifier:o.Q,reducer:n.Ff,reducerPath:n.IP,getInstance:function(e,t){return(e instanceof l.m?e:(0,n.My)(e)).getInstance(t)},getInstanceAsync:function(e,t){return(e instanceof l.m?e:(0,n.My)(e)).getInstanceAsync(t)},getOrCreateInstance:function(e,t,a){return(e instanceof l.m?e:(0,n.My)(e)).getOrCreateInstance(t,a)},inject:function(e,t,a,l){return(0,n.My)(e).inject(t,a)},addService:function(e,t,a){return(0,n.My)(e).addService(t,a)},getServices:function(e,t){return(0,n.My)(e).getServices(t)},useInject:n.lg,useInstance:n.Nj,useInstanceAsync:n.rl,useServices:n.A$}},81551:(e,t,a)=>{"use strict";a.d(t,{Q:()=>l.Q});var l=a(74568)},80148:(e,t,a)=>{"use strict";a.d(t,{A$:()=>g,Ff:()=>d,IP:()=>s,My:()=>i.My,NF:()=>m,Nj:()=>u,lg:()=>c,rl:()=>p});var l=a(98173),o=a(2604),n=a(88296),r=a(74568),i=a(73942);const s=i.if,d=(e,t)=>{if(!e){const e=r.Q.createChild(),t=(0,n.Q)();return r.Q.inject(t,e),t}return e};function m(){const e=(0,o.Pj)();return(0,l.useMemo)((()=>(0,i.My)(e)),[e])}function c(){const e=(0,o.Pj)(),t=(0,i.My)(e);return function(e,a){t.inject(e,a)}}function u(e){const t=(0,o.Pj)();return(0,i.My)(t).getInstance(e)}function p(e){const[t,a]=(0,l.useState)(),n=(0,o.Pj)(),r=(0,l.useRef)(Promise.resolve()),s=(0,i.My)(n);return(0,l.useEffect)((()=>{const t=r.current=r.current.then((()=>s.getInstanceAsync(e))).then((e=>{t===r.current&&a(e)}),(e=>{}))}),[a,e,n,s]),t}function g(e){const t=(0,o.Pj)();return(0,i.My)(t).getServices(e)}},50861:(e,t,a)=>{"use strict";a.d(t,{p:()=>o});var l=a(80148);function o(e){return(t,a,o,n)=>{const r=(0,l.My)(a);return e(r)(t,a,o,n)}}},52919:(e,t,a)=>{"use strict";a.d(t,{K9:()=>u,QC:()=>m,XW:()=>c,ur:()=>d});var l=a(35306),o=a(3792),n=a(2604),r=a(88296),i=a(98173);const s=(0,r.Q)("MESSAGE_SERVICE");function d(){const e=m();return(0,i.useCallback)((t=>{e.setTarget(t instanceof Element?t.contentWindow:t)}),[e])}function m(){const e=(0,n.Pj)();return(0,i.useMemo)((()=>function(e){return o.di.getOrCreateInstance(e,s,(()=>new l.bg))}(e)),[e])}function c(){const e=m();return(0,i.useCallback)((function(t){e.send(t)}),[e])}function u(){const e=m();return(0,i.useCallback)((function(t,a){e.send(t,a)}),[e])}},89613:(e,t,a)=>{"use strict";a.d(t,{u:()=>n});var l=a(98173),o=a(27941);const n=()=>{const e=(0,o.rD)();return(0,l.useCallback)(((t,a)=>{!1!==e.pushToGTM&&((e,t)=>{const a=()=>{try{const t={...e,appLabel:"blocks_app"};window.dataLayer&&"function"===typeof window.dataLayer.push&&window.dataLayer.push(t)}catch(t){}};t?setTimeout(a,t):a()})(t,a)}),[e.pushToGTM])}},72762:(e,t,a)=>{"use strict";a.d(t,{f:()=>b});var l=a(32947),o=a(15626),n=a(52919),r=a(90614),i=a(86095),s=a(70687),d=a(73180),m=a(98173),c=a(1047),u=a(12741),p=a(2604),g=a(12279);const b=(e,t)=>{var a,b,h,E,f;const v=(0,p.wA)(),y=(0,i.fn)(),A=(0,n.QC)(),_=(0,r.ml)(o.AZ.WILL_EMAIL_INIT_ID),C=(0,r.ml)(o.AZ.ON_EMAIL_INIT_ID),S=(0,r.ml)(o.AZ.ON_CONTENT_CHANGED_ID),w=(0,r.ml)(o.AZ.ON_EMAIL_CHANGED_ID),k=(0,r.ml)(o.AZ.ON_MODEL_CHANGE),x=(0,m.useRef)(!1),B=(0,m.useRef)();B.current=e,(0,m.useEffect)((()=>{const a=B.current;if(l.EW.isPlugin&&!x.current&&(null===e||void 0===e?void 0:e.renderGuid)===(null===a||void 0===a?void 0:a.renderGuid)&&null!==a&&void 0!==a&&a.is_inited&&a){const e=y.getValue();w.fire({...a,id:t||a.isNew?void 0:a.id,html:e})}}),[y,null===e||void 0===e?void 0:e.preheader,null===e||void 0===e?void 0:e.common_styles,null===e||void 0===e?void 0:e.subject,(null===e||void 0===e||null===(a=e.utm_parameters)||void 0===a?void 0:a.utm_campaign)||"",(null===e||void 0===e||null===(b=e.utm_parameters)||void 0===b?void 0:b.utm_content)||"",(null===e||void 0===e||null===(h=e.utm_parameters)||void 0===h?void 0:h.utm_medium)||"",(null===e||void 0===e||null===(E=e.utm_parameters)||void 0===E?void 0:E.utm_source)||"",(null===e||void 0===e||null===(f=e.utm_parameters)||void 0===f?void 0:f.utm_term)||"",w,t]),(0,d.Z)((([e])=>{e!==y&&k.fire(y)}),[y,k]),(0,m.useEffect)((()=>{if(l.EW.isPlugin){const a=y.onDidChangeContent((()=>{const a=B.current;if(!x.current&&(null===e||void 0===e?void 0:e.renderGuid)===(null===a||void 0===a?void 0:a.renderGuid)&&a){const e=y.getValue();S.fire(e),w.fire({...a,id:t||a.isNew?void 0:a.id,html:e})}}));return()=>a.dispose()}}),[y,S,w,e,t]);const T=(0,m.useCallback)((async()=>{const e=B.current;try{var t;(0,s.po)(y),y.setValue((null===e||void 0===e||null===(t=e.html)||void 0===t?void 0:t.replaceAll("\r\n","\n"))||"")}finally{(0,s.SF)(y)}const a=y.getValue();await A.sendAsync(l.Ru.SANDBOX_SET_ENTITY,{html:a,guid:e.renderGuid})}),[y,A]),R=(0,m.useCallback)((async()=>{const e=B.current;await A.sendAsync(l.Ru.SANDBOX_SET_ENTITY,{html:y.getValue(),guid:e.renderGuid})}),[y,A]),N=(0,m.useCallback)((async()=>{const e=B.current;void 0!==e.preheader&&await A.sendAsync(l.Ru.SANDBOX_PREHEADER_UPDATE,{value:e.preheader,guid:e.renderGuid,force:!0})}),[A]),L=(0,m.useCallback)((async()=>{const e=B.current;void 0!==e.subject&&await A.sendAsync(l.Ru.SANDBOX_SUBJECT_UPDATE,{value:e.subject,guid:e.renderGuid,force:!0})}),[A]),P=(0,m.useCallback)((()=>{const e=B.current;return A.sendAsync(l.Ru.SANDBOX_INITED,{guid:e.renderGuid})}),[A]),I=(0,m.useCallback)((e=>{const a=B.current;v(void 0===a.id?(0,u.Uh)(!0):(0,c.Wm)(!0));const l={...a,id:t||a.isNew?void 0:a.id,html:y.getValue()};return e&&(l.reset=!0),C.fire(l)}),[v,C,y,t]),M=(0,m.useCallback)((()=>{const e=B.current;return A.sendAsync(l.Ru.SANDBOX_INIT_START,{guid:e.renderGuid})}),[A]),O=(0,m.useCallback)((()=>{const e=B.current;return _.fire({...e,id:t||e.isNew?void 0:e.id,html:y.getValue()})}),[_,y,t]),[V]=(0,d.c)((function*(){try{x.current=!0,yield*(0,g.T1)(M),yield*(0,g.T1)(O),yield*(0,g.T1)(T),yield*(0,g.T1)(N),yield*(0,g.T1)(L),yield*(0,g.T1)(P),yield*(0,g.T1)(I)}finally{x.current=!1}}),[T,N,L,I,O,M,P]),[F]=(0,d.c)((function*(){try{yield*(0,g.T1)(M),yield*(0,g.T1)(O),yield*(0,g.T1)(R),yield*(0,g.T1)(N),yield*(0,g.T1)(L),yield*(0,g.T1)(P),yield*(0,g.T1)(I)}catch(e){}}),[T,N,L,I,O,M,P]);(0,d.Z)((async([t])=>{const a=null===e||void 0===e?void 0:e.renderGuid;a&&a!==t&&V()}),[null===e||void 0===e?void 0:e.renderGuid,V]),(0,m.useEffect)((()=>{const e=A.addListenerAsync(l.Ru.RELOAD,(async()=>{await F()}));return()=>e.dispose()}),[A,F])}},71854:(e,t,a)=>{"use strict";a.d(t,{$K:()=>g,QM:()=>i,Qm:()=>p,q2:()=>c,zn:()=>u});var l=a(94049),o=a.n(l),n=a(23928),r=a(65053);function i(e,t){const a=document.createElement("input");a.type="file",a.accept=e,a.multiple=!1,a.setAttribute("data-testid","uploadFile"),a.style.position="absolute",a.style.opacity="0",a.style.pointerEvents="none",document.body.appendChild(a),a.onchange=()=>{var e;null!==(e=a.files)&&void 0!==e&&e.length&&t(a.files),document.body.removeChild(a)},a.click()}const s="index.html";function d(e,t){return e.find((function(e){return e.name.toLowerCase().endsWith(t)}))}async function m(e,t,a){return await(0,n.bc)(e,(async e=>{e=e.replace("\\","/");const a=(0,n.$l)(e);return t(e,a)}),a)}async function c(e,t,l){if(!e)return;switch(function(e){const t=e.split(".");return t[t.length-1].toLowerCase()}(e.name)){case"zip":return async function(e,t,a){const l=new(o()),{files:r}=await l.loadAsync(e),i=Object.keys(r).map((e=>r[e])),m=r[s]||d(i,s)||d(i,".html")||d(i,".htm");if(m){const e=m.name.split("/"),l=document.location.pathname.split("/"),o=document.location.origin+l.slice(0,l.length-e.length).join("/")+"/",i=await m.async("text"),s=e.slice(0,e.length-1).join("/");return await(0,n.bc)(i,(async e=>{(e=e.replace("\\","/")).startsWith(".")&&(e=e.substring(1)),e.startsWith("/")&&(e=e.substring(1)),e.startsWith(o)&&(e=e.substring(o.length)),s&&!e.match("^(ht|f)tp(s?)://")&&(e=`${s}/${e}`);const a=r[e];if(a){const e=a.name,l=await a.async("blob");return t(l,e)}const l=(0,n.$l)(e);return t(e,l)}),a)}}(e,t,l);case"eml":{const o=await e.text(),{readEml:n}=await a.e(4309).then(a.bind(a,84309)),r=n(o);if(r instanceof Error)throw r;const i="string"===typeof r?r:r.html;if("undefined"===typeof i){throw new Error("Eml does not contain text/html")}return m(i,t,l)}default:return m(await e.text(),t,l)}}async function u(e,t){if("string"!==typeof e)return e;const a=(0,r.A)(e),l=await t({url:a});return null===l||void 0===l||l.data,(null===l||void 0===l?void 0:l.data)||null}function p(e,t,a){if(!e||"string"!==typeof e)return`default.${a.extension(t)||"bin"}`;if(e.split(".").length<2){const l=a.extension(t);if(l)return`${e}.${l}`}return e}function g(e,t){var a,l,o,n;return!e||e.error||400===(null===(a=e.data)||void 0===a||null===(l=a.data)||void 0===l?void 0:l.status)?"string"===typeof t?t:"":null!==(o=e.data)&&void 0!==o&&null!==(n=o[0])&&void 0!==n&&n.file_url?e.data[0].file_url:"string"===typeof t?t:""}},70687:(e,t,a)=>{"use strict";a.d(t,{Og:()=>r,SF:()=>n,po:()=>o});const l=new Set;function o(e){return l.add(e),{dispose(){n(e)}}}function n(e){l.delete(e)}function r(e,t){let a=e.getVersionId();const o=[],n=e.onDidChangeContent((n=>{if(n.versionId>a+1){const r=e.onDidChangeContent((i=>{if(n.versionId===a+1)try{l.has(e)||t(n)}catch(s){}finally{a=n.versionId;const e=o.indexOf(r);e>=0&&o.splice(e,1),r.dispose()}}));o.push(r)}else try{l.has(e)||t(n)}catch(r){}finally{a=n.versionId}}));return{dispose:()=>{n.dispose(),o.forEach((e=>e.dispose()))}}}},81843:(e,t,a)=>{"use strict";a.d(t,{OI:()=>i,yc:()=>r});var l=a(28618),o=a(33105),n=a(83238);function r(){return l.QE.get(o.$D)}function i(){return l.QE.get(n.L)}},64909:(e,t,a)=>{"use strict";a.d(t,{Gy:()=>c,O5:()=>g,hN:()=>p,x_:()=>u});var l=a(15626),o=a(90614),n=a(98173),r=a(71446),i=a(90121),s=a(13668),d=a(31926);const m="bottomRight";function c(e){return{id:e.id,code:e.html,title:e.title,subject:e.subject,preheader:e.preheader}}function u(e){return{id:e.id,code:e.html,title:e.title}}function p(){const e=(0,o.ml)(l.AZ.ON_NOTIFICATION),{notification:t}=r.A.useApp(),a=(0,n.useCallback)(((a,l)=>{a.type||(a={...a,type:"info"}),e.fire((0,d.TB)({id:a.id,type:a.type,data:a.data,innerException:a.innerException})).then((e=>{if(e.every((e=>!1!==e))){a={...a};for(const t of e)"object"===typeof t&&Object.assign(a,t,t.style?{style:{...t.style,...a.style}}:{},t.props?{props:{...t.props,...a.props}}:{},t.className?{className:a.className?`${a.className} ${t.className}`:t.className}:{});l||((a=Object.assign(a,...e.filter((e=>"object"===typeof e)))).placement||(a.placement=m),t[a.type]?t[a.type](a):a.message)}}))}),[t,e]),i=(0,n.useCallback)(((e,t)=>a({...e,type:"error"},t)),[a]),s=(0,n.useCallback)(((e,t)=>a({...e,type:"success"},t)),[a]),c=(0,n.useCallback)(((e,t)=>a({...e,type:"warning"},t)),[a]),u=(0,n.useCallback)(((e,t)=>a({...e,type:"info"},t)),[a]),p=(0,n.useCallback)(((e,t,a,l,o=m)=>{var r,s;a&&i({id:e,data:t,message:a.data instanceof Error?"":n.createElement("div",{dangerouslySetInnerHTML:{__html:(null===(r=a.data)||void 0===r?void 0:r.code)||a.status||a}}),description:n.createElement("div",{dangerouslySetInnerHTML:{__html:(null===(s=a.data)||void 0===s?void 0:s.message)||a.error}}),placement:o,innerException:(null===a||void 0===a?void 0:a.data)instanceof Error?a.data:a},l)}),[i]);return(0,n.useMemo)((()=>({notify:a,success:s,error:i,warning:c,fromError:p,info:u})),[a,s,i,c,p,u])}function g(){const{notify:e}=p();(0,i.D3)(s.Sb,e)}},12543:(e,t,a)=>{"use strict";a.d(t,{CY:()=>i,s9:()=>s});var l=a(98173),o=a(94043);function n(e){return{__:e.__.bind(e),_x:e._x.bind(e),_n:e._n.bind(e),_nx:e._nx.bind(e),sprintf:o.nv,isRTL:e.isRTL.bind(e),hasTranslation:e.hasTranslation.bind(e)}}const r=(0,l.createContext)(n(o.y3));function i(e){const{children:t,i18n:a=o.y3}=e,[,i]=(0,l.useReducer)((()=>[]),[]);(0,l.useEffect)((()=>a.subscribe(i)),[a]);const s=(0,l.useMemo)((()=>n(a)),[a]);return(0,l.createElement)(r.Provider,{value:s},t)}const s=()=>(0,l.useContext)(r)},73180:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n,c:()=>r});var l=a(98173),o=a(12279);const n=(e,t)=>{const a=(0,l.useRef)();a.current=e;const o=(0,l.useRef)(void 0);(0,l.useEffect)((()=>{null!==o.current&&a.current(o.current||[]),o.current=t}),t)};function r(e,t){const a=(0,l.useRef)(),n=(0,l.useCallback)((()=>{const e=a.current;e&&(0,o.eF)(e.halt)}),[]);(0,l.useEffect)((()=>()=>n()),[n]);const r=(0,l.useCallback)(e,t);return[(0,l.useCallback)(((...e)=>{n();const t=(0,o.eF)((()=>r(...e)));return a.current=t,t}),[n,r]),n]}},39420:(e,t,a)=>{"use strict";a.d(t,{A5:()=>m,FN:()=>d,Hk:()=>s,c8:()=>c});var l=a(98173),o=a(32947),n=a(52919);const r=document.querySelectorAll("link[rel=stylesheet][media*=prefers-color-scheme][media*=dark]"),i=document.querySelectorAll("link[rel=stylesheet][media*=prefers-color-scheme][media*=light]"),s=e=>{let t,a;e===o.IJ?(t=o.vd,a=o.F3):(t=e===o.T?o.y2:o.CJ,a=e===o.nd?o.y2:o.CJ),[...i].forEach((e=>{e.media=t})),[...r].forEach((e=>{e.media=a}))},d=(e={})=>{const t=document.querySelector("head"),a=document.createElement("style");if(a.type="text/css",a.dataset.themeVaribalse=!0,a.setAttribute("data-emailmaker","true"),Object.entries(e).length){let l="";Object.entries(e).forEach((([e,t])=>{"object"!==typeof t&&(l+=`\t--${e}: ${t};\n`)})),l=`.blocks-body, .blocks-app, .ant-modal-root, .ant-tooltip, .ant-notification {\n${l}}`,a.appendChild(document.createTextNode(l));const o=t.querySelector('[data-theme-varibalse="true"]');o?t.replaceChild(a,o):t.insertBefore(a,t.firstChild)}},m=e=>{const t=document.body;t.classList.contains(e)||setTimeout((()=>{t.classList.remove(e===o.nd?o.T:o.nd),t.classList.add(e)}),200)},c=()=>{const e=(0,n.XW)();return(0,l.useCallback)((()=>{const t=window.localStorage.getItem(o.V0.em_color_scheme),a=matchMedia(o.F3).matches?o.nd:o.T,l=t||a;e({operation:o.Ru.UPDATE_PREVIEW,theme:l})}),[e])}},93778:(e,t,a)=>{"use strict";function l(e){return e}function o({data:e,...t},a){return t.error?t:{data:a(e,t.meta),...t}}function n(e){return t=>o(t,e)}function r(e){return t=>o(t,((t,a)=>t.hasOwnProperty("previous")?e(t.previous,a):e(t,a)))}function i(e){return t=>function({data:e,...t},a){return t.error?t:{data:e.map((e=>a(e,t.meta))),...t}}(t,e)}a.d(t,{Ih:()=>i,PI:()=>r,SA:()=>o,SC:()=>n,ur:()=>l})},95669:(e,t,a)=>{"use strict";function l(e,t){if(e!==t){if(!e||!t||"object"!==typeof e||"object"!==typeof t)return!1;const a=t instanceof Array;if(e instanceof Array){if(!a)return!1;const o=e.length;if(t.length!==o)return!1;for(let a=0;a<o;a++)if(!l(e[a],t[a]))return!1}else if(a)return!1;const o=Object.keys(e),n=Object.keys(t),r=o.length;if(r!==n.length)return!1;for(let i=0;i<r;i++){const a=o[i];if(!t.hasOwnProperty(a)||!l(e[a],t[a]))return!1}}return!0}a.d(t,{b:()=>l})},22560:(e,t,a)=>{"use strict";a.d(t,{e:()=>o});var l=a(19504);async function o(e,t){if("amp"===t){for(const t of e.querySelectorAll(".em-amp-show-disabled"))t.remove();await(0,l.Sc)(e,{mappedTags:{script:"___script"}})}else if("html"===t){for(const t of e.querySelectorAll(".em-amp-show-only"))t.remove();(0,l.Km)(e,{mappedTags:{script:"___script"}})}}},62093:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var l=a(98173),o=a(52919);function n(e,t){const a=(0,o.QC)();(0,l.useEffect)((()=>{const l=a.addListener(e,t);return()=>{l.dispose()}}),[a,e,t])}},80223:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var l=a(98173),o=a(30150),n=a(2604),r=a(47014),i=a(65716);const s=e=>{const t=(0,n.d4)(r.C1),[a,s]=(0,l.useState)({owner:!1,admin:!1}),d=(0,o.KC)(),{data:m}=(0,i.fo)(e,{skip:!e||!t.id||!(null!==d&&void 0!==d&&d.isUninitialized)}),c=(null===d||void 0===d?void 0:d.data)||m;return(0,l.useEffect)((()=>{if(c){var e,a;const{owner:l,admins:o,users:n}=c.members,r=o?o.map((e=>e.ID)):o,i=n?n.map((e=>e.ID)):n;s({owner:(null===(e=l.ID)||void 0===e?void 0:e.toString())===(null===(a=t.id)||void 0===a?void 0:a.toString()),admin:r&&r.includes(t.id),user:i&&i.includes(t.id)})}}),[c,t.id]),a}},54125:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var l=a(32947);const o=e=>{if(!l.EW.isPlugin){let t="";t="EmailMaker",document.title=e+" - "+t}}},79890:(e,t,a)=>{"use strict";a.d(t,{A:()=>B});var l=a(98173),o=a(40120),n=a(27499),r=a(201),i=a(8218),s=a(49823),d=a(80293),m=a(67107),c=a(2604),u=a(30150),p=a(12543),g=a(65716),b=a(98845),h=a(68984),E=a(22536),f=a(1047),v=a(40277),y=a(32947),A=a(84572);const{useToken:_}=o.A,{name:C,type:S,tags:w,group:k}={name:"name",type:"type",tags:"tags",group:"group"},x={[C]:"",[S]:[],[w]:[],[k]:[]},B=({isBlocks:e=!1,templateEmailId:t=!1})=>{const{__:a}=(0,p.s9)(),{projectId:o}=(0,u.g)(),[B]=n.A.useForm(),{data:T}=(0,h.h1)(),R=(0,c.wA)(),N=(0,c.d4)(E.b9),L=(0,c.d4)(f.CT),P=(0,c.d4)(A.GD),{token:I}=_(),M=(0,c.Pj)(),O=e?N:L,{isSuccess:V,data:F}=g.Nq.endpoints.getProject.select(+o)(M.getState(),{skip:t}),{isSuccess:D,data:H}=(0,b.sl)(+t,{skip:!t}),j=(0,l.useCallback)((()=>{R(e?(0,E.om)({}):(0,f.om)({}))}),[R,e]);(0,l.useEffect)((()=>{j()}),[j]),(0,l.useEffect)((()=>{}),[D,H,t]),(0,l.useEffect)((()=>{}),[V,F,e,t]);const[z,W]=(0,l.useState)([]);let G;(0,l.useEffect)((()=>{if(T){const e=T.schema.properties.acf.properties.type.items.enum;let t=[];for(let l in e)t.push({label:a(y.jg[e[l]]),value:e[l]});W(t)}}),[T,a]);const[U,q]=(0,l.useState)(!1);return(0,l.useEffect)((()=>{const a=t?D&&(0,v._q)(H,y.zh).filter((e=>{var t;return null===O||void 0===O||null===(t=O.tags)||void 0===t?void 0:t.includes(e.id)})).map((e=>e.name))||[]:V&&(0,v._q)(F,e?y.YY:y.zh).filter((e=>{var t;return null===O||void 0===O||null===(t=O.tags)||void 0===t?void 0:t.includes(e.id)})).map((e=>e.name))||[];B.setFieldsValue({tags:a})}),[V,O,e,B,F,D,H,t]),(0,l.useEffect)((()=>{B.setFieldsValue({group:P})}),[B,P]),l.createElement("div",{className:"cards-search"},l.createElement(n.A,{form:B,name:"cards_search_form",initialValues:{...x},onValuesChange:a=>{const l=Object.keys(a)[0],o=B.getFieldsValue(!0);switch(l){case w:const n=t?(0,v._q)(H,y.zh).filter((e=>a[l].includes(e.name))).map((e=>e.id))||null:(0,v._q)(F,e?y.YY:y.zh).filter((e=>a[l].includes(e.name))).map((e=>e.id))||null;R(e?(0,E.om)({...O,tags:n}):(0,f.om)({...O,tags:n}));break;case S:R(e?(0,E.om)({...O,type:o.type||null}):(0,f.om)({...O,type:o.type||null}));break;case C:G&&window.clearTimeout(G),G=window.setTimeout((function(){R(e?(0,E.om)({...O,name:o.name}):(0,f.om)({...O,name:o.name}))}),100);break;case k:R(e?(0,E.om)({...O,group:o.group||null}):(0,f.om)({...O,group:o.group||null}))}},autoComplete:"off"},l.createElement(r.A,{wrap:!1,gutter:0},l.createElement(n.A.Item,{className:"cards-search__by-title",name:C},l.createElement(i.A,{placeholder:a("Search by title"),allowClear:!0,bordered:!1,size:"large",prefix:l.createElement(d.A,{className:"cards-search__search-icon, input-icon",style:{cursor:"pointer",fontSize:20}})})),e&&l.createElement(n.A.Item,{className:"cards-search__type-select",name:S,rules:[{message:a("Please choose the block type")}]},l.createElement(s.A,{placeholder:a("Filter by type"),options:z,getPopupContainer:e=>e.parentNode,suffixIcon:l.createElement(m.A,{style:{fontSize:"16px",color:I.colorText},onClick:()=>q(!U),className:"input-icon"}),allowClear:!0,open:U,onDropdownVisibleChange:e=>{q(e)}})))))}},37507:(e,t,a)=>{"use strict";a.d(t,{b:()=>r});var l=a(98173),o=a(13785),n=a(32947);const r=({users:e,isEditor:t,isPlugin:a,token:r})=>{const[i,s]=(0,l.useState)(!1),d=window.localStorage.getItem(n.V0.em_color_scheme),m=e=>{const t=(e=>{const{first_name:t,last_name:a,email:l}=e.user.name;return t&&a?`${t} ${a}`:t||l})(e);return l.createElement("span",null,t)};return l.createElement(l.Fragment,null,e.length>0&&t&&l.createElement("div",{className:"user-list "+(i?"open":""),style:a?{left:"60px",bottom:"10px"}:{},onMouseOver:()=>s(!0),onMouseOut:()=>s(!1)},e.map((e=>l.createElement("div",{key:e.user.color,className:"user",style:{"--user-color":e.user.color,"--border-color":null===r||void 0===r?void 0:r.colorBgContainer,"--text-color":"dark"===d?null===r||void 0===r?void 0:r.colorIconHover:null===r||void 0===r?void 0:r.colorWhite}},l.createElement(o.A,{title:m(e),placement:"topLeft",trigger:"hover",color:null===r||void 0===r?void 0:r.colorBgSpotlight},l.createElement("div",null,(e=>{const{first_name:t,last_name:a,email:l}=e.user.name;if(t)return`${t.split("")[0]}${a?`${a.split("")[0]}`:""}`;return(null===l||void 0===l?void 0:l.split("")[0].toUpperCase())||" "})(e))))))))}},55835:(e,t,a)=>{"use strict";a.d(t,{LA:()=>i,LJ:()=>s,Pp:()=>n,Q9:()=>r,ZW:()=>l,k0:()=>d,pX:()=>o});const l="wss://yjs.emailmaker.ru",o=500,n=5e3,r=2e4,i="3769995",s="Not available for collaborative editing",d="Problem with internet connection"},55760:(e,t,a)=>{"use strict";a.d(t,{A:()=>A});var l=a(98173),o=a(40120),n=a(28973),r=a(71446),i=a(2604),s=a(95349),d=a(47014),m=a(1047),c=a(32947),u=a(39420),p=a(27941),g=a(16390),b=a(25389),h=a(3326);function E(e,t){if("object"===typeof e&&e){t(e);for(const a of Object.values(e))E(a,t)}}const f=function(e=".blocks-app"){e=`${e} &`;const t=new WeakSet;return{visit:a=>{if(!t.has(a)){const l={};let o;for(const n of Object.keys(a)){const r=a[n];"object"===typeof r&&r?(r._keyframe&&E(r,(e=>t.add(e))),l[n]=r):(o||(o=l[e]={},t.add(o)),o[n]=r)}return l}return a}}}(),v={hashed:!1,algorithm:o.A.defaultAlgorithm,token:{colorLink:"#1677ff",colorInfo:"#722ed1",colorTextBase:"#000000",colorBgLayout:"#f0f2f5",borderRadiusXL:16,borderRadiusLG:12,borderRadius:8,borderRadiusSM:6,colorDarken1:"rgba(0, 0, 0, 0.08)",colorFillSecondaryDarken:"rgba(0, 0, 0, 0.1)",formControlHeight:34,borderWidth:1,borderColorHover:"#C5C5C5",formItemMarginBottomMD:20,formItemMarginBottomXS:8,colorSecondaryH:265.03,colorSecondaryS:"63.92%",colorSecondaryL:"50%",colorSecondaryBgH:273,colorSecondaryBgS:"100%",colorSecondaryBgL:"93%",appZoom:1},components:{Progress:{colorFillSecondary:"#ffffff"},Tabs:{titleFontSize:16,titleFontSizeSM:16,fontSize:16,fontSizeLG:16}}},y={hashed:!1,algorithm:o.A.darkAlgorithm,token:{colorBgBase:"#1F1F1F",colorInfo:"#9254de",colorLink:"#1890ff",colorLinkHover:"#69c0ff",wireframe:!1,borderRadiusXL:16,borderRadiusLG:12,borderRadius:8,borderRadiusSM:6,borderWidth:1,colorDarken1:"rgba(0, 0, 0, 0.9)",colorFillSecondaryDarken:"rgba(255, 255, 255, 0.16)",formControlHeight:34,borderColorHover:"rgba(255, 255, 255, 0.3)",formItemMarginBottomMD:20,formItemMarginBottomXS:8,appZoom:1},components:{Tabs:{titleFontSize:16,titleFontSizeSM:16,fontSize:16,fontSizeLG:16}}};const A=function({children:e}){const t=(0,i.d4)(m.Up),a=(0,i.d4)(d.C1),o=window.localStorage.getItem(c.V0.em_color_scheme),E=matchMedia(c.F3).matches?c.nd:c.T,[A,_]=(0,l.useState)(o||E),C=(0,p.rD)(),S=(0,i.wA)(),w=(0,u.c8)();(0,l.useEffect)((()=>{const e=c.EW.isPlugin?null===a||void 0===a?void 0:a.theme:o||E;_(e),(0,u.A5)(e),S((0,m.eX)(e===c.nd?`vs-${e}`:c.T)),w()}),[o,t,E,null===a||void 0===a?void 0:a.theme,C.pathEnabled,S,w]);const k=(0,l.useCallback)((e=>{e&&e!==c.IJ?((0,u.Hk)(e),localStorage.setItem(c.V0.em_color_scheme,e)):localStorage.removeItem(c.V0.em_color_scheme)}),[]);(0,l.useEffect)((()=>{const e=null===a||void 0===a?void 0:a.theme,t=localStorage.getItem(c.V0.em_color_scheme);e&&e!==t&&k(e)}),[a,k]);const x=(0,l.useCallback)((()=>{const e=localStorage.getItem(c.V0.em_color_scheme);k(e)}),[k]);(0,l.useEffect)((()=>{x()}),[x]);const B=(0,i.d4)(g.RP),[T,R]=(0,l.useState)("light"===A?v:y),[N]=(0,l.useState)(1);(0,l.useEffect)((()=>{const e="light"===A?v:y,t=B[A],a=t?(0,b.TJ)(e,t):e;R({...a,token:{...a.token,appZoom:N}})}),[R,A,B,N]);const L=(0,h.LG)(),P=(0,l.useCallback)((()=>L),[L]);return l.createElement(n.Ay,{theme:T,getPopupContainer:P},l.createElement(s.N7,{transformers:[f]},l.createElement(r.A,null,e)))}},54880:(e,t,a)=>{"use strict";a.d(t,{A:()=>V});var l=a(98173),o=a(40120),n=a(8218),r=a(71446),i=a(5553),s=a(38976),d=a(38927),m=a(27499),c=a(49856),u=a(53361),p=a(37969),g=a(13785),b=a(76047),h=a(2604),E=a(85086),f=a(80703),v=a(38256),y=a(6969),A=a(40186),_=a(12543),C=a(32947),S=a(47014),w=a(62093),k=a(8807),x=a(8111),B=a(98845),T=a(68984),R=a(52919),N=a(40277),L=a(86095),P=a(26298),I=a.n(P);const{useToken:M}=o.A,{TextArea:O}=n.A,V=({comments:e,subjectId:t,isLoggedIn:a,projectTitle:o="",emailElementType:P,email:V})=>{const{__:F,_n:D}=(0,_.s9)(),H=(0,R.XW)(),{modal:j}=r.A.useApp(),{error:z,notification:W}=j,{token:G}=M(),U=(0,l.useRef)(null),[q,Z]=(0,l.useState)(""),[X,K]=(0,l.useState)("ADD"),[Y,$]=(0,l.useState)(!1),[Q,J]=(0,l.useState)(null),[ee,te]=(0,l.useState)(null),[ae,le]=(0,l.useState)(""),[oe,ne]=(0,l.useState)(""),[re,ie]=(0,l.useState)(!1),[se,de]=(0,l.useState)(""),[me,ce]=(0,x.z2)(),[ue,pe]=(0,x.HI)(),[ge,be]=(0,x.kk)(),[he,Ee]=(0,x.vn)(),[fe]=(0,B.LX)(),[ve]=(0,T.yW)(),ye=(0,h.d4)(S.C1),Ae=(0,L.fn)(),_e=()=>{const e={title:null===V||void 0===V?void 0:V.title,emailId:null===V||void 0===V?void 0:V.id,project:null===V||void 0===V?void 0:V.project,html:null===Ae||void 0===Ae?void 0:Ae.getValue(),excerpt:null===V||void 0===V?void 0:V.date_gmt};"email"===P?fe({emailId:null===V||void 0===V?void 0:V.id,body:e}).catch((e=>{})):ve({blockId:null===V||void 0===V?void 0:V.id,body:e}).catch((e=>{}))};function Ce(e){te(Q),le(""),K("REPLY")}const Se=()=>{z({maskClosable:!0,centered:!0,title:F("Please log in"),content:F("To leave comments you must be logged into EmailMaker and added to the project ")+`${o}.`,okText:F("Okay. I'll log in.")})};async function we(){a?(await ge({commentId:ee,content:oe,targetId:se}).unwrap(),K("ADD"),ne(""),te(0),ie(!1),$(!1),de(""),H({operation:C.Ru.SANDBOX_DISCUSS_RESET})):Se()}const ke=e=>{K("ADD"),ne(""),te(0),ie(!1),$(!1),de(""),H({operation:C.Ru.SANDBOX_DISCUSS_RESET})},xe=async()=>{a?((q||ae)&&await me({subjectId:t,author:ye.id,parent:"ADD"===X?"0":ee,content:q||ae,author_name:ye.name,author_email:ye.email,targetId:se}).then((e=>{e.error&&W.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:e.error.data.code}}),description:l.createElement("div",{dangerouslySetInnerHTML:{__html:e.error.data.message}}),placement:"bottomRight"})})),de(""),K("ADD"),le(""),Z(""),te(0),ie(!1),$(!1),H({operation:C.Ru.SANDBOX_DISCUSS_RESET})):Se()};function Be(){re?($(!1),ie(!1),H({operation:C.Ru.SANDBOX_DISCUSS_REMOVE_TARGET,value:se})):($(!Y),H({operation:C.Ru.SANDBOX_DISCUSS_SET_TARGET,value:!Y}),Y&&ie(!1))}(0,w.A)((e=>{const t=e.data.operation;if(t===C.Ru.APPLICATION_DISCUSS_SET_ID&&(de(e.data.settings.value),""!==e.data.settings.value?(ie(!0),$(!1)):(ie(!1),$(!0))),t===C.Ru.APPLICATION_DISCUSS_SAVE_TARGET&&_e(),t===C.Ru.APPLICATION_DISCUSS_GET_COMMENT)if(document.querySelector('.comment-icon-target[target-id="'+e.data.settings.targetId+'"]')){let t=document.querySelector('.comment-icon-target[target-id="'+e.data.settings.targetId+'"]').closest(".ant-comment");document.querySelector(".comment-block")?document.querySelector(".comment-block").scrollTo(0,t.offsetTop):document.querySelector(".em-analytics__email-tab-discuss .ant-tabs-content").scrollTo(0,t.offsetTop),t.classList.add("active"),setTimeout((()=>{t.classList.remove("active")}),2e3)}else H({operation:C.Ru.SANDBOX_DISCUSS_REMOVE_TARGET,value:e.data.settings.targetId}),W.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:F("There's no such comment.")}}),placement:"bottomRight"});t===C.Ru.APPLICATION_DISCUSS_NO_COMMENT&&W.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:F("There's no such element in the email.")}}),placement:"bottomRight"})}));const Te=e=>{H({operation:C.Ru.SANDBOX_DISCUSS_GET_TARGET,value:e})},Re=e=>(null===e||void 0===e||e.sort(((e,t)=>e.date>t.date?1:-1)),l.createElement(l.Fragment,null,e&&!!e.length&&l.createElement(i.A,{className:"comment-list",itemLayout:"horizontal",dataSource:e,renderItem:e=>l.createElement(l.Fragment,null,l.createElement("li",{id:e.id},l.createElement(l.Fragment,null,"deleted"===e.status&&e.clildren&&l.createElement(b.A,{className:"deletedComment",content:l.createElement(s.A,{description:F("Comment was removed."),type:"info"}),children:Re(e.children)}),"deleted"!==e.status&&l.createElement(l.Fragment,null,l.createElement(b.A,{author_id:e.author_id,author:e.author_name,avatar:e.author_avatar_urls&&e.author_avatar_urls[48]||"",className:I()(e.target_id&&"targetted-comment-item",(!e.author_avatar_urls||!e.author_avatar_urls[48])&&"comment-item-noavatar"),content:l.createElement(d.A,{key:"commenMenu",placement:"left",onOpenChange:()=>J(e.id),menu:{items:e.author===ye.id?Pe:Ie},overlayStyle:{minWidth:"auto",paddingRight:6}},l.createElement("div",{dangerouslySetInnerHTML:{__html:e.content}})),datetime:l.createElement(l.Fragment,null,l.createElement("span",{dangerouslySetInnerHTML:{__html:e.date&&(0,N.Yq)((0,N.Cl)(e.date),D,!0)}}),e.target_id&&l.createElement("span",{className:"comment-icon-target","target-id":e.target_id,onClick:()=>Te(e.target_id)},l.createElement(E.A,{style:{color:G.colorInfo,top:-2,position:"relative"}}))),children:l.createElement(l.Fragment,null,"REPLY"===X&&ee===e.id&&Le,"EDIT"===X&&ee===e.id&&Ne,Re(e.children))})))))}))),Ne=l.createElement(m.A,{onFinish:we,className:"commentForm"},l.createElement(m.A.Item,{style:{marginBottom:10}},l.createElement(O,{className:"textarea-reply",value:oe,onChange:e=>ne(e.target.value),rows:4,placeholder:F("Editing comments"),onKeyDown:e=>"Escape"===e.key&&ke(),onPressEnter:e=>"Enter"===e.key&&e.ctrlKey&&we(),ref:U})),l.createElement(m.A.Item,{className:"buttons"},l.createElement(c.A,null,re?l.createElement(u.A,{title:F("Are you sure?"),okText:F("Yes"),cancelText:F("No"),onConfirm:function(e){he(ee),ie(!1),de(""),H({operation:C.Ru.SANDBOX_DISCUSS_REMOVE_TARGET,value:se})}},l.createElement(p.Ay,{loading:Ee.isLoading,type:Y||re&&"EDIT"===X&&""!==se?"primary":"default",className:"button-target "+(Y&&!re?"button-target_choose":""),style:re&&"EDIT"===X&&""!==se?{background:G.colorInfo}:{}},l.createElement(E.A,{className:"icon-target"}))):l.createElement(p.Ay,{onClick:Be,loading:Ee.isLoading,type:Y||re&&"EDIT"===X&&""!==se?"primary":"default",className:"button-target "+(Y&&!re?"button-target_choose":""),style:re&&"EDIT"===X&&""!==se?{background:G.colorInfo}:{}},l.createElement(E.A,{className:"icon-target"})),l.createElement(p.Ay,{className:"button-reply",type:"primary",loading:be.isLoading,htmlType:"submit"},F("Save")," ",l.createElement(f.A,null)),l.createElement(p.Ay,{onClick:ke,className:"button-reply"},F("Cancel"))))),Le=l.createElement(m.A,{name:"reply",className:"commentForm",onFinish:xe},l.createElement(m.A.Item,{style:{marginBottom:10}},l.createElement(O,{className:"textarea-reply",value:ae,onChange:e=>le(e.target.value),rows:4,placeholder:F("Reply to the comment"),onKeyDown:e=>"Escape"===e.key&&ke(),onPressEnter:e=>"Enter"===e.key&&e.ctrlKey&&xe(),ref:U})),l.createElement(m.A.Item,{hidden:!0,name:"targetId"},l.createElement(n.A,{type:"hidden"})),l.createElement(m.A.Item,{className:"buttons"},l.createElement(c.A,null,l.createElement(g.A,{placement:"top",title:F("Add a note"),overlayStyle:{maxWidth:"150px"}},l.createElement(p.Ay,{onClick:Be,type:Y||re&&"REPLY"===X&&""!==se?"primary":"default",className:"button-target "+(Y&&!re?"button-target_choose":""),style:re&&"REPLY"===X&&""!==se?{background:G.colorInfo}:{}},l.createElement(E.A,{className:"icon-target"}))),l.createElement(p.Ay,{className:"button-reply",type:"primary",loading:"REPLY"===X&&ce.isLoading,htmlType:"submit"},F("Reply")," ",l.createElement(k.A,{icon:"SendOutlined"})),l.createElement(p.Ay,{onClick:ke,className:"button-reply",ghost:!0,type:"primary"},F("Cancel")))));(0,l.useEffect)((()=>{"REPLY"===X&&U.current.focus({cursor:"start"}),"EDIT"===X&&U.current.focus({cursor:"end"})}),[X]);let Pe=[];Pe.push({key:"Reply to comment",icon:l.createElement(v.A,{style:{fontSize:"16px"}}),label:F("Reply"),onClick:Ce},{key:"Edit comment",icon:l.createElement(y.A,{style:{fontSize:"16px"}}),label:F("Edit"),onClick:function(t){var a,l,o,n,r;te(Q),ie(Boolean(null===(a=e.find((e=>{var t;return(null===(t=e.id)||void 0===t?void 0:t.toString())===Q})))||void 0===a||null===(l=a.target_id)||void 0===l?void 0:l.toString())),ne(null===(o=e.find((e=>{var t;return(null===(t=e.id)||void 0===t?void 0:t.toString())===Q})))||void 0===o||null===(n=o.content)||void 0===n||null===(r=n.slice(3,-5))||void 0===r?void 0:r.toString()),K("EDIT")}},{key:"Delete comment",icon:l.createElement(A.A,{style:{fontSize:"16px"}}),label:F("Delete"),style:{color:G.colorError},onClick:function(){var t,a;te(Q),e.filter((e=>e.parent===Q)).length?ge({commentId:Q,status:"deleted"}).unwrap():ue(Q),(null===(t=document.querySelector('.discuss-main li[id="'+Q+'"] .comment-icon-target'))||void 0===t?void 0:t.getAttribute("target-id"))&&H({operation:C.Ru.SANDBOX_DISCUSS_REMOVE_TARGET,value:null===(a=document.querySelector('.discuss-main li[id="'+Q+'"] .comment-icon-target'))||void 0===a?void 0:a.getAttribute("target-id")}),_e(),de("")}});let Ie=[];return Ie.push({key:"Reply to comment",icon:l.createElement(v.A,{style:{fontSize:"16px"}}),label:F("Reply"),onClick:Ce}),l.createElement("div",{className:"discuss-main"},e.length>0&&l.createElement(i.A,{className:"comment-list",itemLayout:"horizontal",dataSource:function(e){let t=JSON.parse(JSON.stringify(e));if(!t||!t.length)return[];let a=[],l=new Map;for(let o=0,n=t.length;o<n;++o){let e=t[o],n=l.get(e.id);if(n&&!Array.isArray(n)||(n&&(e.children=n),l.set(e.id,e)),"0"===String(e.parent))a.push(e);else{let t=l.get(e.parent);if(t){(Array.isArray(t)?t:t.children=t.children||[]).push(e)}else l.set(e.parent,[e])}}return a.forEach((e=>{"deleted"!==e.status||e.children||!pe.isUninitialized&&!pe.isSuccess||ue(e.id).unwrap().catch((e=>{}))})),a}(e),renderItem:e=>l.createElement("li",{id:e.id},"deleted"===e.comment_status&&l.createElement(b.A,{className:"deletedComment",content:l.createElement(s.A,{description:F("Comment was removed."),type:"info"}),children:Re(e.children)}),"deleted"!==e.comment_status&&l.createElement(l.Fragment,null,l.createElement(b.A,{author_id:e.author_id,author:e.author_name,avatar:e.author_avatar_urls&&e.author_avatar_urls[48]||"",className:I()(e.target_id&&"targetted-comment-item",(!e.author_avatar_urls||!e.author_avatar_urls[48])&&"comment-item-noavatar"),content:l.createElement(d.A,{key:"commenMenu",placement:"left",destroyPopupOnHide:!0,onOpenChange:()=>J(e.id),menu:{items:e.author===ye.id?Pe:Ie},overlayStyle:{minWidth:"auto"}},l.createElement("div",{dangerouslySetInnerHTML:{__html:e.content}})),datetime:l.createElement(l.Fragment,null,l.createElement("span",{dangerouslySetInnerHTML:{__html:e.date&&(0,N.Yq)((0,N.Cl)(e.date),D,!0)}}),e.target_id&&l.createElement("span",{className:"comment-icon-target","target-id":e.target_id,onClick:()=>Te(e.target_id)},l.createElement(E.A,{style:{color:G.colorInfo,top:-2,position:"relative"}}))),children:l.createElement(l.Fragment,null,"REPLY"===X&&ee===e.id&&Le,"EDIT"===X&&ee===e.id&&Ne,Re(e.children))})))}),l.createElement(m.A,{onFinish:xe,className:"ADD"===X?"addMode":"replyEditMode"},l.createElement(m.A.Item,{style:{marginBottom:10}},l.createElement(O,{value:q,onChange:e=>Z(e.target.value),rows:4,placeholder:F("Leave your comment"),className:"textarea-comment",onPressEnter:e=>"Enter"===e.key&&e.ctrlKey&&xe()})),l.createElement(m.A.Item,null,l.createElement(g.A,{placement:"top",title:F("Add a note"),overlayStyle:{maxWidth:"150px"}},l.createElement(p.Ay,{onClick:Be,type:Y||re&&"ADD"===X&&""!==se?"primary":"default",className:"button-target "+(Y&&!re?"button-target_choose":""),style:re&&"ADD"===X&&""!==se?{background:G.colorInfo}:{}},l.createElement(E.A,{className:"icon-target"}))),l.createElement(p.Ay,{className:"button-add",type:"primary",loading:"ADD"===X&&ce.isLoading,htmlType:"submit"},F("Send")," ",l.createElement(k.A,{icon:"SendOutlined"})))))}},80877:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var l=a(98173),o=a(42490);const n=l.forwardRef(((e,t)=>{const[a,n]=(0,l.useState)(!1),[r,i]=(0,l.useState)(0),[s,d]=(0,l.useState)(e.value||e.defaultValue),[m,c]=(0,l.useState)(e.value||e.defaultValue),u=()=>n(!1),p=(0,l.useCallback)((t=>{if(a){const a=t.clientX-r;let l=(s||0)+a*e.dragspeed;l=Math.max(0,Math.round(l)),e.max&&(l=Math.min(l,e.max)),c(l),e.onChange&&e.onChange(l)}}),[a,e,s,r]);return(0,l.useEffect)((()=>{e.value||0===e.value?c(e.value):e.defaultValue||0===e.defaultValue?c(e.defaultValue):c(null)}),[e.value,e.defaultValue]),(0,l.useEffect)((()=>(document.addEventListener("mouseup",u),document.addEventListener("mousemove",p),()=>{document.removeEventListener("mouseup",u),document.removeEventListener("mousemove",p)})),[a,r,s,p]),l.createElement("div",{onMouseDown:e=>{var t,a;e.target.hasAttribute("class")&&null!==(t=e.target)&&void 0!==t&&null!==(a=t.className)&&void 0!==a&&a.includes("ant-input-number-affix-wrapper")&&(n(!0),i(e.clientX),d(m))}},l.createElement(o.A,Object.assign({},e,{ref:t,value:m,className:"input-draggable"})),a&&l.createElement("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",cursor:"ew-resize"},onMouseUp:u}))}));n.defaultProps={dragspeed:1};const r=n},63837:(e,t,a)=>{"use strict";a.d(t,{A:()=>T});var l=a(98173),o=a(27499),n=a(201),r=a(66964),i=a(8218),s=a(38),d=a(48753),m=a(37969),c=a(93511),u=a(64909),p=a(2604),g=a(12543),b=a(12910),h=a(6302),E=a(67756),f=a(62041),v=a(1549),y=a(65716),A=a(23424),_=a(84572),C=a(32947),S=a(40277);const w="mainsettings",k="ftpsettings",x="webhooksettings",B=({isModalVisible:e,selectedProject:t=null})=>{const{__:a}=(0,g.s9)(),B=(0,p.wA)(),[T]=o.A.useForm(),R=(0,l.useRef)(null),N=(0,l.useRef)(null),L=(0,l.useRef)(null),P=(0,p.d4)(_.yN),I=(0,p.d4)(A.gU),M=(0,u.hN)(),O=(0,p.d4)(A.cL),[V,F]=(0,l.useState)(w),[D,H]=(0,l.useState)(!1),j=t||P,z=[k,w,x].includes(I),[W,G]=(0,y.OD)();(0,l.useEffect)((()=>{if(O===C.lx.EDIT_PROJECT_MODAL){const e={mainsettings:R,ftpsettings:N,webhooksettings:L};setTimeout((()=>{var t;return null===(t=e[V].current)||void 0===t?void 0:t.focus({cursor:"end"})}),200)}}),[O,V]),(0,l.useEffect)((()=>{z&&F(I)}),[I,z,F,B]);let U=[{label:l.createElement(l.Fragment,null,l.createElement(b.A,null),a("Main settings")),key:w,className:"em-analytics__mainsettings-project",children:l.createElement(l.Fragment,null,l.createElement(n.A,{gutter:24},l.createElement(r.A,{span:24},l.createElement(o.A.Item,{label:a("Project name"),name:"name",extra:a("This can be\xa0the name of\xa0your company, department, website, project, marketing campaign, or\xa0other activity."),rules:[{required:!0,message:a("Please type the project name.")}]},l.createElement(i.A,{ref:R,placeholder:a("Type the project name"),style:{marginBottom:5}})))))},{label:l.createElement(l.Fragment,null,l.createElement(h.A,null),a("FTP settings")),key:k,className:"em-analytics__ftpsettings-project",children:l.createElement(l.Fragment,null,l.createElement(n.A,{gutter:24},l.createElement(r.A,{span:12},l.createElement(o.A.Item,{label:a("Host"),name:["ftpSettings","host"]},l.createElement(i.A,{ref:N,placeholder:a("Type the FTP host"),disabled:D}))),l.createElement(r.A,{span:12},l.createElement(o.A.Item,{label:a("Port"),name:["ftpSettings","port"]},l.createElement(i.A,{placeholder:a("Type the FTP port"),disabled:D})))),l.createElement(n.A,{gutter:24},l.createElement(r.A,{span:12},l.createElement(o.A.Item,{label:a("Directory"),name:["ftpSettings","directory"]},l.createElement(i.A,{placeholder:a("Type the file directory"),disabled:D}))),l.createElement(r.A,{span:12},l.createElement(o.A.Item,{label:a("URL catalog"),name:["ftpSettings","domain"]},l.createElement(i.A,{placeholder:a("Type the URL catalog"),disabled:D})))),l.createElement(n.A,{gutter:24},l.createElement(r.A,{span:12},l.createElement(o.A.Item,{label:a("Login"),name:["ftpSettings","login"]},l.createElement(i.A,{placeholder:a("Type the FTP login"),disabled:D}))),l.createElement(r.A,{span:12},l.createElement(o.A.Item,{label:a("Password"),name:["ftpSettings","password"]},l.createElement(i.A.Password,{placeholder:a("Type the FTP password"),disabled:D,iconRender:e=>e?l.createElement(E.A,null):l.createElement(f.A,null)})))),l.createElement(n.A,{gutter:24},l.createElement(r.A,{span:24},l.createElement(o.A.Item,{noStyle:!0},l.createElement(s.A,{checked:D,onChange:e=>H(Boolean(e.target.checked))},a("Use default CDN"))))))},{label:l.createElement(l.Fragment,null,l.createElement(b.A,null),a("Webhook settings")),key:x,className:"em-analytics__mainsettings-project",children:l.createElement(l.Fragment,null,l.createElement(n.A,{gutter:24},l.createElement(r.A,{span:24},l.createElement(o.A.Item,{label:a("Webhook settings"),name:"webhook",extra:a("Before exporting the project, make sure to provide the URL where the webhook request will be sent"),rules:[{type:"url",message:a("Please enter the correct URL.")},z&&{required:!0,message:a("Please type the webhook URL.")}]},l.createElement(i.A,{ref:L,placeholder:a("Type in the project's webhook"),style:{marginBottom:5}})))))}];(0,l.useEffect)((()=>{if(e&&j){const e=j.ftp_settings;H(e.use_default_cdn),T.setFieldsValue({name:j.title,webhook:j.webhook||"",ftpSettings:{host:e.host||"",port:e.port||"",directory:e.directory||"",domain:e.domain||"",login:e.login||"",password:e.password||""}})}}),[T,j,e]);const q=()=>{T.validateFields().then((e=>{const t=e.ftpSettings;j&&W({projectId:j.id,title:e.name,webhook:e.webhook?e.webhook:"",ftp_settings:t?{host:t.host,port:t.port,directory:t.directory,domain:t.domain,login:t.login,password:t.password,use_default_cdn:D}:null}).then((({data:e,error:t})=>{e?e.title!==j.title?M.success({message:a("The project \u201c")+j.title+a("\u201d was successfully changed to \u201c")+e.title+a("\u201d."),placement:"bottomRight"}):M.success({message:a("The project settings was successfully saved."),placement:"bottomRight"}):t&&(0,S.p6)({error:t},M),B((0,A.YF)("")),B((0,A.Oo)())}))}))};return l.createElement(d.A,{title:l.createElement("div",null,l.createElement(v.A,null)," ",a("Project settings")),className:"blocks-modal",open:e,onOk:q,onCancel:()=>{B((0,A.YF)("")),B((0,A.Oo)())},centered:!0,footer:[l.createElement(m.Ay,{key:"submit",size:"large",className:"em-analytics__project-save",type:"primary",loading:G.isLoading,onClick:q},a("Update"))]},l.createElement(o.A,{form:T,layout:"vertical",name:`edit_project_form_${null===j||void 0===j?void 0:j.id}`,onFinish:q,initialValues:{remember:!1,name:""},autoComplete:"off"},l.createElement(c.A,{activeKey:V,onChange:F,items:U})))};B.defaultProps={selectedProject:null};const T=B},50209:(e,t,a)=>{"use strict";a.d(t,{A:()=>O});var l=a(98173),o=a(30150),n=a(79245),r=a(40120),i=a(10423),s=a(59010),d=a(49856),m=a(67034),c=a(38927),u=a(37969),p=a(10267),g=a(82648),b=a(47214),h=a(78446),E=a(35076),f=a(38256),v=a(40186),y=a(71879),A=a(83612),_=a(2604),C=a(26298),S=a.n(C),w=a(52218),k=a.n(w),x=a(68984),B=a(98845),T=a(47014),R=a(45271),N=a(80223),L=a(40277),P=a(12543),I=a(32947);const{useToken:M}=r.A,O=({element:e,setSearchFilters:t=()=>{},isTrash:a=!1,foldersList:r,projectTags:C=[],foldersHandlers:w={}})=>{var O,V,F,D,H,j,z,W,G,U,q,Z,X,K,Y;const{__:$}=(0,P.s9)();let Q=(0,o.zy)();const{projectId:J}=(0,o.g)(),{owner:ee,admin:te}=(0,N.A)(),ae=(0,_.d4)(T.C1),le=(0,l.useRef)(null),{token:oe}=M(),{handleRecover:ne,handleClone:re,handlerChangeFolder:ie,handleRemove:se}=w,de=e.hasOwnProperty("type")?I.IE:I.Tm,me=de===I.Tm?I.zh:I.YY,ce=de===I.Tm?$("New emails"):$("New blocks"),ue=(e,t)=>`${e.pathname}/${t.id}`,[pe]=(0,x.pP)(),[ge]=(0,B.Kh)(),be=(e,t=J,a)=>{const l=a?`&cacheControl=true&cache-hash=${k()(a)}`:"";return`https://scr.emcdn.ru/screenshot?${"block"===de?"":"minHeight=620&"}delay=1000&width=800&fullPage=true&deviceScaleFactor=0.755&format=jpg&force=false${l}&url=${encodeURIComponent(`https://app.emailmaker.ru/get${de}/${e}?secret_hash=${k()(`${t}${e}${I.KI}`)}&raw=true`)}`},he=(null===(O=e[de===I.IE?"blockfolder":"folder"])||void 0===O?void 0:O[0])||null,Ee={icon:l.createElement(p.A,{style:{fontSize:18}}),label:ce,key:I.y2,onClick:t=>ie(t,e)},fe=null===r||void 0===r?void 0:r.map((t=>({icon:l.createElement(g.A,{style:{fontSize:18}}),label:t.name,key:t.id,className:t.id,onClick:t=>ie(t,e)}))),ve=(null===fe||void 0===fe?void 0:fe.filter((e=>!he||e.key!==he)))||[];he&&(null===ve||void 0===ve||ve.unshift(Ee));let ye=[];return(ee||te||(null===(V=ae.id)||void 0===V?void 0:V.toString())===(null===(F=e.author)||void 0===F?void 0:F.toString()))&&!a&&ye.push({label:l.createElement(R.A,{key:"Lock",element:e}),icon:e.lock?l.createElement(b.A,{style:{fontSize:"16px"}}):l.createElement(h.A,{style:{fontSize:"16px"}})}),(ee||te||(null===(D=ae.id)||void 0===D?void 0:D.toString())===(null===(H=e.author)||void 0===H?void 0:H.toString()))&&!a&&ve.length>0&&ye.push({label:$("Transfer to folder"),icon:l.createElement(g.A,{style:{fontSize:"16px"}}),children:ve}),!a&&ye.push({label:$("Clone"),icon:l.createElement(E.A,{style:{fontSize:"16px"}}),key:"Clone",className:de===I.IE?"em-analytics__block-clone":"em-analytics__email-clone",disabled:de===I.IE?pe.isLoading:ge.isLoading,onClick:()=>re(e)}),(ee||te||(null===(j=ae.id)||void 0===j?void 0:j.toString())===(null===(z=e.author)||void 0===z?void 0:z.toString()))&&a&&ye.push({label:$("Recover"),icon:l.createElement(f.A,{style:{fontSize:"16px"}}),key:"Recover",onClick:()=>ne(e)}),(ee||te||(null===(W=ae.id)||void 0===W?void 0:W.toString())===(null===(G=e.author)||void 0===G?void 0:G.toString()))&&ye.push({label:$("Remove"),icon:l.createElement(v.A,{style:{fontSize:"16px"}}),key:"Remove",style:{color:"#ff4d4f"},className:de===I.IE?"em-analytics__block-remove":"em-analytics__email-remove",onClick:()=>se(e)}),l.createElement(i.A,{className:`element-card element-card_${de}`,hoverable:!0,"data-testid":e.id,cover:l.createElement(l.Fragment,null,l.createElement(s.A,{loading:"true",active:!0,avatar:!0,style:{position:"absolute",width:"83%",margin:"50px 10% 0 7%"}}),l.createElement(n.N_,{ref:le,className:"element-card__img-wrapper",to:a?"":ue(Q,e),onMouseMove:e=>(0,L.Hy)(e,le.current),style:{cursor:a?"default":"pointer"},onMouseLeave:L.Tr},be(e.id,e.project,e.modified)&&l.createElement("img",{className:"element-card__img",alt:e.title,src:be(e.id,e.project,e.modified)})),(e.is_template||(null===(U=e.acf)||void 0===U?void 0:U.is_template))&&l.createElement("div",{className:"element-card__is-template-wrapper"},$("Template")),(null===(q=e[me])||void 0===q?void 0:q.length)&&l.createElement("div",{className:"element-card__tags-wrapper"},l.createElement(d.A,{wrap:!0,size:8},e[me].map((e=>{const a=null===C||void 0===C?void 0:C.find((t=>{var a;return(null===(a=t.id)||void 0===a?void 0:a.toString())===(null===e||void 0===e?void 0:e.toString())}));return a&&l.createElement(m.A,{color:oe.colorPrimary,style:{borderRadius:6},key:a.id,onClick:()=>t(null,a.id)},a.name)})))))},l.createElement("div",{className:"ant-card-body__left"},l.createElement(n.N_,{to:a?"":ue(Q,e),style:{cursor:a?"default":"pointer"}},l.createElement("span",{className:"element-card__title"},e.lock&&l.createElement(h.A,{className:S()("lock-icon",{"lock-icon__disabled":!(ee||te||(null===(Z=ae.id)||void 0===Z?void 0:Z.toString())===(null===(X=e.author)||void 0===X?void 0:X.toString()))})}),(null===(K=e.title)||void 0===K?void 0:K.trim())||(null===(Y=e.subject)||void 0===Y?void 0:Y.trim()))),l.createElement("p",{className:"element-card__date"},$("Last update: ")," ",(0,L.Yq)((0,A.A)(e.modified),$))),l.createElement("div",{className:"ant-card-body__right"},l.createElement(c.A,{menu:{items:ye},arrow:"true",placement:"bottom",trigger:["hover"]},l.createElement(u.Ay,{type:"default",className:"element-card_menu",onClick:()=>{}},l.createElement(y.A,{key:"menu-button",style:{fontSize:"16px"}})))))}},8807:(e,t,a)=>{"use strict";a.d(t,{A:()=>El});var l=a(98173),o=a(5558),n=a(27941);const r=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"chat-gpt",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M11.1396 4.91121C11.2741 4.50723 11.3208 4.07922 11.2764 3.65577C11.2321 3.23232 11.0979 2.82323 10.8827 2.45587C10.5636 1.90021 10.0763 1.46028 9.49105 1.19955C8.90578 0.938823 8.2528 0.870777 7.62631 1.00523C7.34374 0.68679 6.99643 0.432375 6.60757 0.259023C6.21871 0.0856726 5.79733 -0.00261924 5.3716 5.91632e-05C4.7311 -0.00148674 4.10665 0.200409 3.58828 0.576642C3.06991 0.952872 2.68442 1.484 2.48737 2.09345C2.07011 2.17886 1.67592 2.35242 1.33117 2.60252C0.98642 2.85261 0.699078 3.17346 0.488376 3.5436C0.166798 4.09773 0.02953 4.73964 0.0963679 5.37684C0.163206 6.01401 0.430694 6.61347 0.860259 7.08879C0.725757 7.49277 0.679098 7.92078 0.723405 8.34423C0.767712 8.76768 0.901962 9.17676 1.11717 9.54414C1.43623 10.0998 1.92355 10.5397 2.50882 10.8004C3.09409 11.0611 3.74707 11.1292 4.37353 10.9948C4.6561 11.3132 5.00344 11.5676 5.39227 11.741C5.78113 11.9143 6.20251 12.0026 6.62824 11.9999C7.26907 12.0016 7.89385 11.7996 8.4124 11.4232C8.93098 11.0467 9.31654 10.5152 9.51343 9.90537C9.93067 9.81996 10.3249 9.64641 10.6696 9.3963C11.0144 9.14622 11.3017 8.82534 11.5124 8.4552C11.8336 7.90113 11.9705 7.25937 11.9035 6.62244C11.8365 5.98551 11.569 5.38632 11.1396 4.91121ZM6.6292 11.2155C6.10315 11.2162 5.59363 11.032 5.18968 10.695C5.20789 10.6851 5.23984 10.6676 5.26066 10.6548L7.64998 9.27468C7.70995 9.24057 7.75975 9.1911 7.79425 9.13134C7.82878 9.07158 7.84675 9.00372 7.84633 8.93475V5.56626L8.85625 6.1494C8.86153 6.15204 8.86609 6.15594 8.86954 6.16077C8.87296 6.1656 8.87512 6.17121 8.87587 6.17706V8.96667C8.87512 9.5625 8.63824 10.1337 8.21713 10.5552C7.79602 10.9768 7.225 11.2142 6.6292 11.2155ZM1.79754 9.15192C1.53405 8.69664 1.43908 8.16321 1.52927 7.64496C1.54701 7.65561 1.578 7.67454 1.60024 7.68732L3.98956 9.06744C4.04911 9.10224 4.11685 9.1206 4.18582 9.1206C4.25476 9.1206 4.3225 9.10224 4.38205 9.06744L7.29916 7.38309V8.54937C7.29949 8.55531 7.29835 8.56128 7.29583 8.56668C7.29331 8.57208 7.2895 8.57679 7.28473 8.58036L4.86937 9.97491C4.35274 10.2725 3.73915 10.3529 3.16327 10.1986C2.58738 10.0443 2.09621 9.66789 1.79754 9.15192ZM1.16898 3.93582C1.43133 3.47994 1.8457 3.13092 2.33951 2.94981C2.33951 2.97039 2.33833 3.00684 2.33833 3.03213V5.7924C2.33791 5.86134 2.35586 5.92914 2.39033 5.98887C2.42479 6.04857 2.47454 6.09801 2.53445 6.13212L5.45155 7.81626L4.44166 8.39937C4.43668 8.40267 4.43095 8.40465 4.42501 8.40519C4.41907 8.40573 4.41307 8.4048 4.40758 8.40246L1.992 7.00671C1.47626 6.70803 1.10001 6.21705 0.945726 5.64138C0.791445 5.06574 0.871731 4.45239 1.16898 3.93582ZM9.46636 5.86668L6.54922 4.18233L7.55914 3.59943C7.56412 3.59616 7.56985 3.59415 7.57579 3.59361C7.58173 3.59307 7.5877 3.59403 7.59319 3.59637L10.0088 4.99092C10.3789 5.2047 10.6804 5.51946 10.878 5.89839C11.0757 6.27732 11.1613 6.7047 11.1248 7.13052C11.0884 7.55634 10.9313 7.96296 10.6721 8.30277C10.4129 8.64258 10.0623 8.90151 9.66127 9.04923C9.66127 9.02841 9.66127 8.99199 9.66127 8.96667V6.2064C9.66184 6.13758 9.64408 6.06984 9.60982 6.01014C9.57556 5.95044 9.52606 5.90094 9.46636 5.86668ZM10.4715 4.35384C10.4538 4.34295 10.4228 4.32426 10.4006 4.31151L8.01121 2.93136C7.95166 2.89662 7.88395 2.87829 7.81498 2.87829C7.74604 2.87829 7.6783 2.89662 7.61875 2.93136L4.70164 4.61574V3.44946C4.70131 3.44349 4.70245 3.43755 4.70497 3.43215C4.70749 3.42675 4.7113 3.42204 4.71607 3.41847L7.13143 2.02508C7.50145 1.81171 7.9246 1.70813 8.35135 1.72645C8.7781 1.74477 9.19078 1.88423 9.54118 2.12852C9.89155 2.37282 10.1651 2.71184 10.3299 3.10593C10.4946 3.50001 10.5438 3.93285 10.4715 4.35384ZM4.15258 6.43257L3.14242 5.84943C3.13714 5.84679 3.13255 5.84289 3.12913 5.83806C3.12571 5.83323 3.12352 5.82762 3.1228 5.82174V3.03213C3.12307 2.60489 3.24505 2.18654 3.47443 1.82609C3.70384 1.46563 4.03117 1.17798 4.41811 0.996792C4.80505 0.815607 5.23558 0.748392 5.65933 0.80301C6.08311 0.857628 6.48253 1.03182 6.81088 1.3052C6.79267 1.31514 6.76096 1.33265 6.7399 1.34542L4.35058 2.72555C4.29061 2.75963 4.24084 2.80907 4.20631 2.86878C4.17181 2.92848 4.15384 2.99631 4.15423 3.06525L4.15258 6.43257ZM4.70116 5.24973L6.0004 4.49934L7.29961 5.24925V6.74955L6.0004 7.49949L4.70116 6.74955V5.24973Z"})),i=({props:e})=>l.createElement(o.A,Object.assign({component:r},e)),s=()=>l.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"arrow-left",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"})),d=({props:e})=>l.createElement(o.A,Object.assign({component:s},e)),m=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"styles-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M10.6725 11.5528C11.4031 11.5528 12 10.9475 12 10.2069C12 9.31236 10.6725 7.85275 10.6725 7.85275C10.6725 7.85275 9.34494 9.31236 9.34494 10.2069C9.34494 10.9475 9.94183 11.5528 10.6725 11.5528ZM4.36755 10.8154C4.48626 10.9342 4.67853 10.9342 4.79557 10.8154L9.07743 6.53525C9.19614 6.41654 9.19614 6.22427 9.07743 6.10723L4.79724 1.82704C4.78721 1.81701 4.77551 1.80698 4.7638 1.79862L3.45634 0.491154C3.42783 0.463014 3.38939 0.447235 3.34933 0.447235C3.30928 0.447235 3.27083 0.463014 3.24233 0.491154L2.43979 1.29369C2.41165 1.3222 2.39587 1.36064 2.39587 1.40069C2.39587 1.44075 2.41165 1.47919 2.43979 1.5077L3.56334 2.63125L0.0890313 6.10723C-0.0296771 6.22594 -0.0296771 6.41822 0.0890313 6.53525L4.36755 10.8154ZM4.58323 3.31508L7.57435 6.30619H1.59379L4.58323 3.31508Z"})),c=({props:e})=>l.createElement(o.A,Object.assign({component:m},e)),u=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"close-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M1.94975 10.9497L1.24264 10.2426L5.48528 6L1.24264 1.75736L1.94975 1.05025L6.19239 5.29289L10.435 1.05025L11.1421 1.75736L6.89949 6L11.1421 10.2426L10.435 10.9497L6.19239 6.70711L1.94975 10.9497Z"})),p=({props:e})=>l.createElement(o.A,Object.assign({component:u},e)),g=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"drop-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M6 0L5.61832 0.458015C5.61832 0.458015 4.64123 1.6355 3.64886 3.09924C3.15268 3.83206 2.64123 4.63168 2.25955 5.40458C1.87787 6.17748 1.60306 6.91794 1.60306 7.60305C1.60306 10.0191 3.58397 12 6 12C8.41603 12 10.397 10.0191 10.397 7.60305C10.397 6.91794 10.1221 6.17748 9.74046 5.40458C9.35878 4.63168 8.84733 3.83206 8.35115 3.09924C7.35878 1.6355 6.38168 0.458015 6.38168 0.458015L6 0ZM6 1.57252C6.27291 1.91031 6.78436 2.50954 7.55726 3.64885C8.03817 4.35687 8.50382 5.1374 8.85497 5.84733C9.20611 6.55725 9.41985 7.21374 9.41985 7.60305C9.41985 9.48664 7.88359 11.0229 6 11.0229C4.11642 11.0229 2.58016 9.48664 2.58016 7.60305C2.58016 7.21374 2.7939 6.55725 3.14504 5.84733C3.49619 5.1374 3.96184 4.35687 4.44275 3.64885C5.21565 2.50954 5.7271 1.91031 6 1.57252ZM3.55726 7.60305C3.55726 8.94466 4.6584 10.0458 6 10.0458V9.0687C5.19084 9.0687 4.53436 8.41221 4.53436 7.60305H3.55726Z"})),b=({props:e})=>l.createElement(o.A,Object.assign({component:g},e)),h=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"dark-white",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M0 6C0 2.68629 2.68629 0 6 0C9.31339 0 12 2.68661 12 6C12 9.31339 9.31339 12 6 12C2.68629 12 0 9.31371 0 6ZM6 10.9821C8.75089 10.9821 10.9821 8.75089 10.9821 6C10.9821 3.24911 8.75089 1.01786 6 1.01786V10.9821Z"})),E=({props:e})=>l.createElement(o.A,Object.assign({component:h},e)),f=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"min-width-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M1.35714 1.07143H0.607143C0.548214 1.07143 0.5 1.11964 0.5 1.17857V1.92857C0.5 1.9875 0.548214 2.03571 0.607143 2.03571H1.35714C1.41607 2.03571 1.46429 1.9875 1.46429 1.92857V1.17857C1.46429 1.11964 1.41607 1.07143 1.35714 1.07143ZM1.35714 3.29464H0.607143C0.548214 3.29464 0.5 3.34286 0.5 3.40178V4.15178C0.5 4.21071 0.548214 4.25893 0.607143 4.25893H1.35714C1.41607 4.25893 1.46429 4.21071 1.46429 4.15178V3.40178C1.46429 3.34286 1.41607 3.29464 1.35714 3.29464ZM1.35714 7.74107H0.607143C0.548214 7.74107 0.5 7.78928 0.5 7.84821V8.59821C0.5 8.65714 0.548214 8.70536 0.607143 8.70536H1.35714C1.41607 8.70536 1.46429 8.65714 1.46429 8.59821V7.84821C1.46429 7.78928 1.41607 7.74107 1.35714 7.74107ZM1.35714 9.96428H0.607143C0.548214 9.96428 0.5 10.0125 0.5 10.0714V10.8214C0.5 10.8804 0.548214 10.9286 0.607143 10.9286H1.35714C1.41607 10.9286 1.46429 10.8804 1.46429 10.8214V10.0714C1.46429 10.0125 1.41607 9.96428 1.35714 9.96428ZM1.35714 5.51786H0.607143C0.548214 5.51786 0.5 5.56607 0.5 5.625V6.375C0.5 6.43393 0.548214 6.48214 0.607143 6.48214H1.35714C1.41607 6.48214 1.46429 6.43393 1.46429 6.375V5.625C1.46429 5.56607 1.41607 5.51786 1.35714 5.51786Z"}),l.createElement("path",{d:"M11.3571 1.07143H10.6071C10.5482 1.07143 10.5 1.11964 10.5 1.17857V1.92857C10.5 1.9875 10.5482 2.03571 10.6071 2.03571H11.3571C11.4161 2.03571 11.4643 1.9875 11.4643 1.92857V1.17857C11.4643 1.11964 11.4161 1.07143 11.3571 1.07143ZM11.3571 3.29464H10.6071C10.5482 3.29464 10.5 3.34286 10.5 3.40178V4.15178C10.5 4.21071 10.5482 4.25893 10.6071 4.25893H11.3571C11.4161 4.25893 11.4643 4.21071 11.4643 4.15178V3.40178C11.4643 3.34286 11.4161 3.29464 11.3571 3.29464ZM11.3571 7.74107H10.6071C10.5482 7.74107 10.5 7.78928 10.5 7.84821V8.59821C10.5 8.65714 10.5482 8.70536 10.6071 8.70536H11.3571C11.4161 8.70536 11.4643 8.65714 11.4643 8.59821V7.84821C11.4643 7.78928 11.4161 7.74107 11.3571 7.74107ZM11.3571 9.96428H10.6071C10.5482 9.96428 10.5 10.0125 10.5 10.0714V10.8214C10.5 10.8804 10.5482 10.9286 10.6071 10.9286H11.3571C11.4161 10.9286 11.4643 10.8804 11.4643 10.8214V10.0714C11.4643 10.0125 11.4161 9.96428 11.3571 9.96428ZM11.3571 5.51786H10.6071C10.5482 5.51786 10.5 5.56607 10.5 5.625V6.375C10.5 6.43393 10.5482 6.48214 10.6071 6.48214H11.3571C11.4161 6.48214 11.4643 6.43393 11.4643 6.375V5.625C11.4643 5.56607 11.4161 5.51786 11.3571 5.51786Z"}),l.createElement("path",{d:"M11 5.51786H8.20535V4.67679C8.20535 4.59644 8.1116 4.5509 8.04865 4.60045L6.33973 5.95045C6.32816 5.95939 6.3188 5.97086 6.31236 5.98397C6.30592 5.99709 6.30257 6.01151 6.30257 6.02612C6.30257 6.04074 6.30592 6.05516 6.31236 6.06827C6.3188 6.08139 6.32816 6.09286 6.33973 6.10179L8.04732 7.45179C8.11026 7.50135 8.20401 7.45715 8.20401 7.37545V6.48215H11V5.51786Z"}),l.createElement("path",{d:"M1 5.51786H3.79465V4.67679C3.79465 4.59644 3.8884 4.5509 3.95135 4.60045L5.66027 5.95045C5.67184 5.95939 5.6812 5.97086 5.68764 5.98397C5.69408 5.99709 5.69743 6.01151 5.69743 6.02612C5.69743 6.04074 5.69408 6.05516 5.68764 6.06827C5.6812 6.08139 5.67184 6.09286 5.66027 6.10179L3.95268 7.45179C3.88974 7.50135 3.79599 7.45715 3.79599 7.37545V6.48215H1V5.51786Z"})),v=({props:e})=>l.createElement(o.A,Object.assign({component:f},e)),y=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"max-width-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M1.35714 1.07143H0.607143C0.548214 1.07143 0.5 1.11964 0.5 1.17857V1.92857C0.5 1.9875 0.548214 2.03571 0.607143 2.03571H1.35714C1.41607 2.03571 1.46429 1.9875 1.46429 1.92857V1.17857C1.46429 1.11964 1.41607 1.07143 1.35714 1.07143ZM1.35714 3.29464H0.607143C0.548214 3.29464 0.5 3.34286 0.5 3.40178V4.15178C0.5 4.21071 0.548214 4.25893 0.607143 4.25893H1.35714C1.41607 4.25893 1.46429 4.21071 1.46429 4.15178V3.40178C1.46429 3.34286 1.41607 3.29464 1.35714 3.29464ZM1.35714 7.74107H0.607143C0.548214 7.74107 0.5 7.78928 0.5 7.84821V8.59821C0.5 8.65714 0.548214 8.70536 0.607143 8.70536H1.35714C1.41607 8.70536 1.46429 8.65714 1.46429 8.59821V7.84821C1.46429 7.78928 1.41607 7.74107 1.35714 7.74107ZM1.35714 9.96428H0.607143C0.548214 9.96428 0.5 10.0125 0.5 10.0714V10.8214C0.5 10.8804 0.548214 10.9286 0.607143 10.9286H1.35714C1.41607 10.9286 1.46429 10.8804 1.46429 10.8214V10.0714C1.46429 10.0125 1.41607 9.96428 1.35714 9.96428ZM1.35714 5.51786H0.607143C0.548214 5.51786 0.5 5.56607 0.5 5.625V6.375C0.5 6.43393 0.548214 6.48214 0.607143 6.48214H1.35714C1.41607 6.48214 1.46429 6.43393 1.46429 6.375V5.625C1.46429 5.56607 1.41607 5.51786 1.35714 5.51786Z"}),l.createElement("path",{d:"M11.3571 1.07143H10.6071C10.5482 1.07143 10.5 1.11964 10.5 1.17857V1.92857C10.5 1.9875 10.5482 2.03571 10.6071 2.03571H11.3571C11.4161 2.03571 11.4643 1.9875 11.4643 1.92857V1.17857C11.4643 1.11964 11.4161 1.07143 11.3571 1.07143ZM11.3571 3.29464H10.6071C10.5482 3.29464 10.5 3.34286 10.5 3.40178V4.15178C10.5 4.21071 10.5482 4.25893 10.6071 4.25893H11.3571C11.4161 4.25893 11.4643 4.21071 11.4643 4.15178V3.40178C11.4643 3.34286 11.4161 3.29464 11.3571 3.29464ZM11.3571 7.74107H10.6071C10.5482 7.74107 10.5 7.78928 10.5 7.84821V8.59821C10.5 8.65714 10.5482 8.70536 10.6071 8.70536H11.3571C11.4161 8.70536 11.4643 8.65714 11.4643 8.59821V7.84821C11.4643 7.78928 11.4161 7.74107 11.3571 7.74107ZM11.3571 9.96428H10.6071C10.5482 9.96428 10.5 10.0125 10.5 10.0714V10.8214C10.5 10.8804 10.5482 10.9286 10.6071 10.9286H11.3571C11.4161 10.9286 11.4643 10.8804 11.4643 10.8214V10.0714C11.4643 10.0125 11.4161 9.96428 11.3571 9.96428ZM11.3571 5.51786H10.6071C10.5482 5.51786 10.5 5.56607 10.5 5.625V6.375C10.5 6.43393 10.5482 6.48214 10.6071 6.48214H11.3571C11.4161 6.48214 11.4643 6.43393 11.4643 6.375V5.625C11.4643 5.56607 11.4161 5.51786 11.3571 5.51786Z"}),l.createElement("path",{d:"M7.95133 4.54822L9.66026 5.89688C9.70848 5.93572 9.70848 6.01072 9.65758 6.04956L7.94999 7.39956C7.88705 7.44911 7.7933 7.40358 7.7933 7.32322V6.48215H4.20401V7.37545C4.20401 7.45715 4.11026 7.50135 4.04732 7.45179L2.33973 6.10179C2.32816 6.09286 2.3188 6.08139 2.31236 6.06827C2.30592 6.05516 2.30257 6.04074 2.30257 6.02612C2.30257 6.01151 2.30592 5.99709 2.31236 5.98397C2.3188 5.97085 2.32816 5.95939 2.33973 5.95045L4.04865 4.60045C4.1116 4.5509 4.20535 4.59644 4.20535 4.67679V5.51786H7.79464V4.62456C7.79459 4.60637 7.79967 4.58853 7.8093 4.57309C7.81892 4.55766 7.8327 4.54524 7.84906 4.53728C7.86541 4.52931 7.88368 4.52611 7.90177 4.52805C7.91986 4.52998 7.93703 4.53697 7.95133 4.54822Z"})),A=({props:e})=>l.createElement(o.A,Object.assign({component:y},e)),_=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"bg-position-horizontal",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("g",null,l.createElement("path",{opacity:"0.3",d:"M10.9286 0.85734H1.07142C0.834371 0.85734 0.642853 1.04886 0.642853 1.28591V11.1431C0.642853 11.3801 0.834371 11.5716 1.07142 11.5716H2.5958C2.65473 11.5716 2.70295 11.5234 2.70295 11.4645V10.7145C2.70295 10.6556 2.65473 10.6073 2.5958 10.6073H1.60714V1.82163H10.3929V5.10734C10.3929 5.16627 10.4411 5.21448 10.5 5.21448H11.25C11.3089 5.21448 11.3571 5.16627 11.3571 5.10734V1.28591C11.3571 1.04886 11.1656 0.85734 10.9286 0.85734Z"}),l.createElement("path",{d:"M10.9286 5.95536H3.85715C3.62009 5.95536 3.42857 6.14688 3.42857 6.38393V10.9286C3.42857 11.1656 3.62009 11.3571 3.85715 11.3571H10.9286C11.1656 11.3571 11.3571 11.1656 11.3571 10.9286V6.38393C11.3571 6.14688 11.1656 5.95536 10.9286 5.95536ZM10.3393 10.3393H4.44643V6.97322H10.3393V10.3393Z"}),l.createElement("path",{d:"M3.15129 3.31274H6.94594V2.47167C6.94594 2.39132 7.03969 2.34578 7.10264 2.39533L8.81157 3.74533C8.82313 3.75427 8.83249 3.76574 8.83893 3.77885C8.84537 3.79197 8.84872 3.80639 8.84872 3.821C8.84872 3.83562 8.84537 3.85004 8.83893 3.86315C8.83249 3.87627 8.82313 3.88774 8.81157 3.89667L7.10398 5.24667C7.04103 5.29623 6.94728 5.25203 6.94728 5.17033V4.27703H3.15129V3.31274Z"}))),C=({props:e})=>l.createElement(o.A,Object.assign({component:_},e)),S=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"bg-position-vertical",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("g",null,l.createElement("path",{opacity:"0.3",d:"M0.642854 11.143L0.642854 1.2859C0.642854 1.04885 0.834372 0.85733 1.07143 0.85733L10.9286 0.857331C11.1656 0.857331 11.3571 1.04885 11.3571 1.2859L11.3571 2.81028C11.3571 2.86921 11.3089 2.91742 11.25 2.91742L10.5 2.91742C10.4411 2.91742 10.3929 2.86921 10.3929 2.81028L10.3929 1.82162L1.60714 1.82162L1.60714 10.6073L4.89285 10.6073C4.95178 10.6073 5 10.6555 5 10.7145L5 11.4645C5 11.5234 4.95178 11.5716 4.89285 11.5716L1.07143 11.5716C0.834372 11.5716 0.642854 11.3801 0.642854 11.143Z"}),l.createElement("path",{d:"M5.74087 11.1431L5.74088 4.07162C5.74088 3.83457 5.93239 3.64305 6.16945 3.64305L10.7141 3.64305C10.9511 3.64305 11.1427 3.83457 11.1427 4.07162L11.1427 11.1431C11.1427 11.3801 10.9511 11.5716 10.7141 11.5716L6.16945 11.5716C5.93239 11.5716 5.74087 11.3801 5.74087 11.1431ZM10.1248 10.5538L10.1248 4.66091L6.75873 4.66091L6.75873 10.5538L10.1248 10.5538Z"}),l.createElement("path",{d:"M3.09827 3.36576L3.09827 7.1604L2.2572 7.1604C2.17684 7.1604 2.1313 7.25415 2.18086 7.3171L3.53086 9.02603C3.53979 9.03759 3.55126 9.04695 3.56438 9.0534C3.57749 9.05984 3.59191 9.06319 3.60653 9.06319C3.62114 9.06319 3.63556 9.05984 3.64868 9.0534C3.66179 9.04695 3.67326 9.03759 3.6822 9.02603L5.0322 7.31844C5.08175 7.25549 5.03755 7.16174 4.95586 7.16174L4.06255 7.16174L4.06255 3.36576L3.09827 3.36576Z"}))),w=({props:e})=>l.createElement(o.A,Object.assign({component:S},e)),k=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"up-to-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("g",null,l.createElement("path",{d:"M11.3571 1.07142L11.3571 10.9286C11.3571 11.1656 11.1656 11.3571 10.9286 11.3571H1.07142C0.834364 11.3571 0.642846 11.1656 0.642846 10.9286V6.10714C0.642846 6.04821 0.69106 6 0.749989 6H1.49999C1.55892 6 1.60713 6.04821 1.60713 6.10714V10.3929H10.3928L10.3928 1.60714L6.10713 1.60714C6.0482 1.60714 5.99999 1.55892 5.99999 1.5V0.749995C5.99999 0.691067 6.0482 0.642853 6.10713 0.642853L10.9286 0.642853C11.1656 0.642853 11.3571 0.834371 11.3571 1.07142Z"}),l.createElement("path",{d:"M1.80978 2.53298L1.11067 3.23209C1.09644 3.24625 1.07852 3.25614 1.05895 3.26062C1.03938 3.2651 1.01894 3.264 0.999964 3.25744C0.980987 3.25088 0.964231 3.23913 0.951603 3.22352C0.938975 3.20791 0.93098 3.18907 0.928529 3.16914L0.647279 0.766466C0.639243 0.698162 0.696833 0.639233 0.766476 0.647269L3.16916 0.928519C3.25755 0.939233 3.29505 1.04772 3.2321 1.11066L2.53032 1.81245L5.96156 5.2437C6.00308 5.28522 6.00308 5.35352 5.96156 5.39504L5.39371 5.96289C5.35219 6.00441 5.28389 6.00441 5.24237 5.96289L1.80978 2.53298Z"}))),x=({props:e})=>l.createElement(o.A,Object.assign({component:k},e)),B=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"vertical-offset-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M4.92856 10.4987L4.92856 1.17859C4.92856 1.11966 4.88034 1.07144 4.82141 1.07144L4.01784 1.07144C3.95891 1.07144 3.9107 1.11966 3.9107 1.17859L3.9107 9.28394L1.45981 7.35135C1.39016 7.29644 1.2857 7.346 1.2857 7.43573L1.2857 8.40671C1.2857 8.47234 1.31516 8.53394 1.3674 8.57546L4.23481 10.8362C4.51606 11.0572 4.92856 10.8576 4.92856 10.4987ZM8.08927 10.8214L8.08927 2.71609L10.5402 4.64868C10.6098 4.70359 10.7143 4.65403 10.7143 4.5643L10.7143 3.59332C10.7143 3.52769 10.6848 3.46609 10.6326 3.42457L7.76516 1.16385C7.48391 0.942871 7.07141 1.14243 7.07141 1.50001L7.07141 10.8214C7.07141 10.8804 7.11963 10.9286 7.17856 10.9286L7.98213 10.9286C8.04106 10.9286 8.08927 10.8804 8.08927 10.8214Z"})),T=({props:e})=>l.createElement(o.A,Object.assign({component:B},e)),R=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"align-horizontal-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M1.85714 1.07143H1.10714C1.04821 1.07143 1 1.11964 1 1.17857V10.8214C1 10.8804 1.04821 10.9286 1.10714 10.9286H1.85714C1.91607 10.9286 1.96429 10.8804 1.96429 10.8214V1.17857C1.96429 1.11964 1.91607 1.07143 1.85714 1.07143Z"}),l.createElement("path",{d:"M7.85714 7H3.10714C3.04821 7 3 7.04821 3 7.10714V8.85714C3 8.91607 3.04821 8.96429 3.10714 8.96429H7.85714C7.91607 8.96429 7.96429 8.91607 7.96429 8.85714V7.10714C7.96429 7.04821 7.91607 7 7.85714 7Z"}),l.createElement("path",{d:"M10.8571 3H3.10714C3.04821 3 3 3.04821 3 3.10714V4.85714C3 4.91607 3.04821 4.96429 3.10714 4.96429H10.8571C10.9161 4.96429 10.9643 4.91607 10.9643 4.85714V3.10714C10.9643 3.04821 10.9161 3 10.8571 3Z"})),N=({props:e})=>l.createElement(o.A,Object.assign({component:R},e)),L=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"align-horizontal-center-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M6.375 1.07143H5.625C5.56607 1.07143 5.51786 1.11964 5.51786 1.17857V10.8214C5.51786 10.8804 5.56607 10.9286 5.625 10.9286H6.375C6.43393 10.9286 6.48214 10.8804 6.48214 10.8214V1.17857C6.48214 1.11964 6.43393 1.07143 6.375 1.07143Z"}),l.createElement("path",{d:"M8.85714 7H3.10714C3.04821 7 3 7.04821 3 7.10714V8.85714C3 8.91607 3.04821 8.96429 3.10714 8.96429H8.85714C8.91607 8.96429 8.96429 8.91607 8.96429 8.85714V7.10714C8.96429 7.04821 8.91607 7 8.85714 7Z"}),l.createElement("path",{d:"M10.8571 3H1.10714C1.04821 3 1 3.04821 1 3.10714V4.85714C1 4.91607 1.04821 4.96429 1.10714 4.96429H10.8571C10.9161 4.96429 10.9643 4.91607 10.9643 4.85714V3.10714C10.9643 3.04821 10.9161 3 10.8571 3Z"})),P=({props:e})=>l.createElement(o.A,Object.assign({component:L},e)),I=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"align-horizontal-right-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M10.1429 1.07143H10.8929C10.9518 1.07143 11 1.11964 11 1.17857V10.8214C11 10.8804 10.9518 10.9286 10.8929 10.9286H10.1429C10.0839 10.9286 10.0357 10.8804 10.0357 10.8214V1.17857C10.0357 1.11964 10.0839 1.07143 10.1429 1.07143Z"}),l.createElement("path",{d:"M4.14286 7H8.89286C8.95179 7 9 7.04821 9 7.10714V8.85714C9 8.91607 8.95179 8.96429 8.89286 8.96429H4.14286C4.08393 8.96429 4.03571 8.91607 4.03571 8.85714V7.10714C4.03571 7.04821 4.08393 7 4.14286 7Z"}),l.createElement("path",{d:"M1.14286 3H8.89286C8.95179 3 9 3.04821 9 3.10714V4.85714C9 4.91607 8.95179 4.96429 8.89286 4.96429H1.14286C1.08393 4.96429 1.03571 4.91607 1.03571 4.85714V3.10714C1.03571 3.04821 1.08393 3 1.14286 3Z"})),M=({props:e})=>l.createElement(o.A,Object.assign({component:I},e)),O=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"align-vertical-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M1.07143 1.85714L1.07143 1.10714C1.07143 1.04821 1.11964 1 1.17857 1L10.8214 1C10.8804 1 10.9286 1.04821 10.9286 1.10714L10.9286 1.85714C10.9286 1.91607 10.8804 1.96429 10.8214 1.96429L1.17857 1.96429C1.11964 1.96429 1.07143 1.91607 1.07143 1.85714Z"}),l.createElement("path",{d:"M7 7.85714L7 3.10714C7 3.04821 7.04821 3 7.10714 3L8.85714 3C8.91607 3 8.96429 3.04821 8.96429 3.10714L8.96429 7.85714C8.96429 7.91607 8.91607 7.96429 8.85714 7.96429L7.10714 7.96429C7.04821 7.96429 7 7.91607 7 7.85714Z"}),l.createElement("path",{d:"M3 10.8571L3 3.10714C3 3.04821 3.04821 3 3.10714 3L4.85714 3C4.91607 3 4.96429 3.04821 4.96429 3.10714L4.96429 10.8571C4.96429 10.9161 4.91607 10.9643 4.85714 10.9643L3.10714 10.9643C3.04821 10.9643 3 10.9161 3 10.8571Z"})),V=({props:e})=>l.createElement(o.A,Object.assign({component:O},e)),F=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"align-vertical-center-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M1.07143 5.625L1.07143 6.375C1.07143 6.43393 1.11964 6.48215 1.17857 6.48215L10.8214 6.48215C10.8804 6.48215 10.9286 6.43393 10.9286 6.375L10.9286 5.625C10.9286 5.56608 10.8804 5.51786 10.8214 5.51786L1.17857 5.51786C1.11964 5.51786 1.07143 5.56608 1.07143 5.625Z"}),l.createElement("path",{d:"M7 3.14286L7 8.89286C7 8.95179 7.04821 9 7.10714 9L8.85714 9C8.91607 9 8.96429 8.95179 8.96429 8.89286L8.96429 3.14286C8.96429 3.08393 8.91607 3.03571 8.85714 3.03571L7.10714 3.03571C7.04821 3.03571 7 3.08393 7 3.14286Z"}),l.createElement("path",{d:"M3 1.14286L3 10.8929C3 10.9518 3.04821 11 3.10714 11L4.85714 11C4.91607 11 4.96429 10.9518 4.96429 10.8929L4.96429 1.14286C4.96429 1.08393 4.91607 1.03571 4.85714 1.03571L3.10714 1.03571C3.04821 1.03571 3 1.08393 3 1.14286Z"})),D=({props:e})=>l.createElement(o.A,Object.assign({component:F},e)),H=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"align-vertical-bottom-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M1.07143 10.1429L1.07143 10.8929C1.07143 10.9518 1.11964 11 1.17857 11L10.8214 11C10.8804 11 10.9286 10.9518 10.9286 10.8929L10.9286 10.1429C10.9286 10.0839 10.8804 10.0357 10.8214 10.0357L1.17857 10.0357C1.11964 10.0357 1.07143 10.0839 1.07143 10.1429Z"}),l.createElement("path",{d:"M7 4.14286L7 8.89286C7 8.95179 7.04821 9 7.10714 9L8.85714 9C8.91607 9 8.96429 8.95179 8.96429 8.89286L8.96429 4.14286C8.96429 4.08393 8.91607 4.03571 8.85714 4.03571L7.10714 4.03571C7.04821 4.03571 7 4.08393 7 4.14286Z"}),l.createElement("path",{d:"M3 1.14286L3 8.89286C3 8.95179 3.04821 9 3.10714 9L4.85714 9C4.91607 9 4.96429 8.95179 4.96429 8.89286L4.96429 1.14286C4.96429 1.08393 4.91607 1.03571 4.85714 1.03571L3.10714 1.03571C3.04821 1.03571 3 1.08393 3 1.14286Z"})),j=({props:e})=>l.createElement(o.A,Object.assign({component:H},e)),z=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"mixed-view-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M12.0357 11.6071L12.0357 4.42857C12.0357 4.19152 11.8442 4 11.6071 4L7.42857 4C7.19151 4 7 4.19152 7 4.42857L7 11.6071C7 11.8442 7.19151 12.0357 7.42857 12.0357L11.6071 12.0357C11.8442 12.0357 12.0357 11.8442 12.0357 11.6071ZM8.01785 11.0179L8.01785 5.01786L11.0178 5.01786L11.0178 11.0179L8.01785 11.0179Z"}),l.createElement("path",{d:"M6.03571 11.6071L6.0357 6.42857C6.0357 6.19152 5.84419 6 5.60713 6L0.428567 6C0.191514 6 -4.29991e-06 6.19152 -4.31027e-06 6.42857L-4.05979e-06 11.6071C-4.07016e-06 11.8442 0.191514 12.0357 0.428568 12.0357L5.60713 12.0357C5.84419 12.0357 6.03571 11.8442 6.03571 11.6071ZM1.01785 11.0179L1.01785 7.01786L5.01785 7.01786L5.01785 11.0179L1.01785 11.0179Z"}),l.createElement("path",{d:"M5.99999 5.03571L0.428572 5.03571C0.191518 5.03571 0 4.84419 0 4.60714L2.45825e-06 0.428573C2.43753e-06 0.191519 0.191521 0 0.428574 0H7.60714C7.84419 0 8.03571 0.191518 8.03571 0.428572L8.03571 3H7.01785L7.01786 1.01786L1.01786 1.01786L1.01786 4.01785L5.99999 4.01785V5.03571Z"})),W=({props:e})=>l.createElement(o.A,Object.assign({component:z},e)),G=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"landscape-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M0.392859 10.0357L11.5714 10.0357C11.8085 10.0357 12 9.84419 12 9.60714L12 2.42858C12 2.19152 11.8085 2 11.5714 2L0.392862 2C0.155808 2 -0.0357096 2.19152 -0.0357097 2.42857L-0.0357132 9.60714C-0.0357132 9.84419 0.155805 10.0357 0.392859 10.0357ZM0.982149 3.01786L10.9821 3.01786L10.9821 9.01786L0.982145 9.01786L0.982149 3.01786Z"})),U=({props:e})=>l.createElement(o.A,Object.assign({component:G},e)),q=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"portrait-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M10 11.6071L10 0.428574C10 0.191521 9.80848 2.46721e-06 9.57143 2.45684e-06L2.39286 -3.32519e-07C2.15581 -3.42881e-07 1.96429 0.191518 1.96429 0.428571L1.96429 11.6071C1.96429 11.8442 2.15581 12.0357 2.39286 12.0357L9.57143 12.0357C9.80848 12.0357 10 11.8442 10 11.6071ZM2.98215 11.0179L2.98215 1.01786L8.98214 1.01786L8.98214 11.0179L2.98215 11.0179Z"})),Z=({props:e})=>l.createElement(o.A,Object.assign({component:q},e)),X=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"square-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M1 1.42857L1 10.5893C1 10.8263 1.19152 11.0179 1.42857 11.0179L10.5605 11.0179C10.7976 11.0179 10.9891 10.8263 10.9891 10.5893L10.9891 1.42857C10.9891 1.19151 10.7976 0.999997 10.5605 0.999997L1.42857 0.999997C1.19152 0.999997 1 1.19151 1 1.42857ZM9.97123 2.01785L9.97123 10L2.01786 10L2.01786 2.01785L9.97123 2.01785Z"})),K=({props:e})=>l.createElement(o.A,Object.assign({component:X},e)),Y=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"panel-left",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M10.9286 0.64286H1.07143C0.834378 0.64286 0.64286 0.834378 0.64286 1.07143V10.9286C0.64286 11.1656 0.834378 11.3571 1.07143 11.3571H10.9286C11.1656 11.3571 11.3571 11.1656 11.3571 10.9286V1.07143C11.3571 0.834378 11.1656 0.64286 10.9286 0.64286ZM10.3929 10.3929H4.64315V1.60715H10.3929V10.3929Z"})),$=({props:e})=>l.createElement(o.A,Object.assign({component:Y},e)),Q=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"sun-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M5.53842 -2.28882e-05V2.30768H6.4615V-2.28882e-05H5.53842ZM2.07687 1.42787L1.42783 2.07691L3.05764 3.72115L3.72111 3.05768L2.07687 1.42787ZM9.92305 1.42787L8.27882 3.05768L8.94228 3.72115L10.5721 2.07691L9.92305 1.42787ZM5.99996 2.76922C4.22051 2.76922 2.76918 4.22055 2.76918 6C2.76918 7.77945 4.22051 9.23078 5.99996 9.23078C7.77942 9.23078 9.23074 7.77945 9.23074 6C9.23074 4.22055 7.77942 2.76922 5.99996 2.76922ZM5.99996 3.6923C7.28002 3.6923 8.30766 4.71995 8.30766 6C8.30766 7.28005 7.28002 8.3077 5.99996 8.3077C4.71991 8.3077 3.69226 7.28005 3.69226 6C3.69226 4.71995 4.71991 3.6923 5.99996 3.6923ZM-6.10352e-05 5.53846V6.46154H2.30764V5.53846H-6.10352e-05ZM9.69228 5.53846V6.46154H12V5.53846H9.69228ZM3.05764 8.27885L1.42783 9.92309L2.07687 10.5721L3.72111 8.94232L3.05764 8.27885ZM8.94228 8.27885L8.27882 8.94232L9.92305 10.5721L10.5721 9.92309L8.94228 8.27885ZM5.53842 9.69232V12H6.4615V9.69232H5.53842Z"})),J=({props:e})=>l.createElement(o.A,Object.assign({component:Q},e)),ee=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"crescent-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M6 1C6.112 1 6.22266 1.00383 6.332 1.0115C6.11066 1.48817 6 1.98433 6 2.5C6 2.974 6.0925 3.42717 6.2775 3.8595C6.4625 4.29183 6.71116 4.66417 7.0235 4.9765C7.33583 5.28883 7.70816 5.5375 8.1405 5.7225C8.57283 5.9075 9.026 6 9.5 6C10.0157 6 10.5118 5.88933 10.9885 5.668C10.9962 5.77733 11 5.888 11 6C11 6.453 10.9402 6.89567 10.8205 7.328C10.7008 7.76033 10.5335 8.1595 10.3185 8.5255C10.1035 8.8915 9.8425 9.22816 9.5355 9.5355C9.2285 9.84283 8.89183 10.1038 8.5255 10.3185C8.15916 10.5332 7.76 10.7005 7.328 10.8205C6.896 10.9405 6.45333 11.0003 6 11C5.54666 10.9997 5.104 10.9398 4.672 10.8205C4.24 10.7012 3.84083 10.5338 3.4745 10.3185C3.10817 10.1032 2.7715 9.84216 2.4645 9.5355C2.1575 9.22883 1.8965 8.89216 1.6815 8.5255C1.4665 8.15883 1.29917 7.75967 1.1795 7.328C1.05983 6.89633 1 6.45366 1 6C1 5.54633 1.05983 5.10367 1.1795 4.672C1.29917 4.24033 1.4665 3.84117 1.6815 3.4745C1.8965 3.10783 2.1575 2.77117 2.4645 2.4645C2.7715 2.15783 3.10817 1.89683 3.4745 1.6815C3.84083 1.46617 4.24 1.29883 4.672 1.1795C5.104 1.06017 5.54666 1.00033 6 1ZM5.0155 2.121C4.58583 2.23033 4.1855 2.40733 3.8145 2.652C3.4435 2.89667 3.1245 3.187 2.8575 3.523C2.5905 3.859 2.38083 4.24117 2.2285 4.6695C2.07617 5.09783 2 5.54117 2 5.9995C2 6.54116 2.1055 7.05866 2.3165 7.552C2.5275 8.04533 2.812 8.47116 3.17 8.8295C3.528 9.18783 3.95383 9.47233 4.4475 9.683C4.94116 9.89366 5.45866 9.99916 6 9.9995C6.45833 9.9995 6.90166 9.92333 7.33 9.771C7.75833 9.61866 8.1405 9.409 8.4765 9.142C8.8125 8.875 9.10283 8.556 9.3475 8.185C9.59216 7.814 9.76916 7.41366 9.8785 6.984C9.7665 6.99433 9.64016 6.9995 9.4995 6.9995C8.89016 6.9995 8.30816 6.88033 7.7535 6.642C7.19883 6.40366 6.72033 6.08333 6.318 5.681C5.91566 5.27867 5.59533 4.80017 5.357 4.2455C5.11867 3.69083 4.9995 3.10883 4.9995 2.4995C4.9995 2.35883 5.00516 2.233 5.0155 2.121Z"})),te=({props:e})=>l.createElement(o.A,Object.assign({component:ee},e)),ae=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"vimeo-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M10.9952 3.66719C10.9513 4.59967 10.2888 5.87689 9.00665 7.49794C7.68113 9.19101 6.55939 10.0376 5.64191 10.0376C5.07348 10.0376 4.59281 9.52102 4.19988 8.48818L3.41305 5.64743C3.12152 4.61411 2.80855 4.09732 2.47363 4.09732C2.40051 4.09732 2.14554 4.24829 1.70874 4.54983L1.25 3.96878C1.73068 3.55248 2.20404 3.13609 2.6701 2.72027C3.31116 2.1748 3.79184 1.88809 4.11213 1.85928C4.86971 1.78774 5.33576 2.29679 5.51077 3.38725C5.69992 4.56414 5.83106 5.29554 5.90419 5.58268C6.12259 6.55838 6.36293 7.04614 6.6252 7.04614C6.82898 7.04614 7.13513 6.73064 7.54268 6.09922C7.95072 5.46781 8.16913 4.98707 8.19838 4.65719C8.25639 4.11172 8.03799 3.83953 7.54268 3.83953C7.30966 3.83953 7.06932 3.88961 6.82167 3.98997C7.30235 2.45487 8.22031 1.70847 9.57508 1.75169C10.5798 1.7805 11.0537 2.41875 10.9952 3.66719Z"})),le=({props:e})=>l.createElement(o.A,Object.assign({component:ae},e)),oe=()=>l.createElement("svg",{viewBox:"0 0 20 20",focusable:"false","data-icon":"image-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M3.75 17.5C3.41667 17.5 3.125 17.375 2.875 17.125C2.625 16.875 2.5 16.5833 2.5 16.25V3.75C2.5 3.41667 2.625 3.125 2.875 2.875C3.125 2.625 3.41667 2.5 3.75 2.5H16.25C16.5833 2.5 16.875 2.625 17.125 2.875C17.375 3.125 17.5 3.41667 17.5 3.75V16.25C17.5 16.5833 17.375 16.875 17.125 17.125C16.875 17.375 16.5833 17.5 16.25 17.5H3.75ZM3.75 16.25H16.25V3.75H3.75V16.25ZM4.91667 14.2292H15.1042L12.0417 10.1458L9.29167 13.7083L7.35417 11.0625L4.91667 14.2292Z"})),ne=({props:e})=>l.createElement(o.A,Object.assign({component:oe},e)),re=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"blur-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M0.326321 7.56842C0.235089 7.56842 0.157895 7.53684 0.0947368 7.47368C0.0315789 7.41052 0 7.33333 0 7.24211C0 7.15088 0.0315789 7.07368 0.0947368 7.01053C0.157895 6.94737 0.235089 6.91579 0.326321 6.91579C0.417542 6.91579 0.494731 6.94737 0.557889 7.01053C0.621047 7.07368 0.652626 7.15088 0.652626 7.24211C0.652626 7.33333 0.621047 7.41052 0.557889 7.47368C0.494731 7.53684 0.417542 7.56842 0.326321 7.56842ZM0.326321 5.08421C0.235089 5.08421 0.157895 5.05263 0.0947368 4.98947C0.0315789 4.92632 0 4.84912 0 4.75789C0 4.66667 0.0315789 4.58948 0.0947368 4.52632C0.157895 4.46316 0.235089 4.43158 0.326321 4.43158C0.417542 4.43158 0.494731 4.46316 0.557889 4.52632C0.621047 4.58948 0.652626 4.66667 0.652626 4.75789C0.652626 4.84912 0.621047 4.92632 0.557889 4.98947C0.494731 5.05263 0.417542 5.08421 0.326321 5.08421ZM2.21163 10.4C2.03897 10.4 1.89386 10.3416 1.77632 10.2248C1.65877 10.108 1.59999 9.96325 1.59999 9.79058C1.59999 9.61792 1.6584 9.47281 1.77521 9.35526C1.89201 9.23772 2.03675 9.17894 2.20942 9.17894C2.38208 9.17894 2.52719 9.23735 2.64474 9.35416C2.76228 9.47096 2.82106 9.61569 2.82106 9.78837C2.82106 9.96103 2.76265 10.1061 2.64584 10.2237C2.52904 10.3412 2.38431 10.4 2.21163 10.4ZM2.21163 7.85263C2.03897 7.85263 1.89386 7.79423 1.77632 7.67743C1.65877 7.56062 1.59999 7.41588 1.59999 7.24322C1.59999 7.07054 1.6584 6.92544 1.77521 6.8079C1.89201 6.69035 2.03675 6.63158 2.20942 6.63158C2.38208 6.63158 2.52719 6.68998 2.64474 6.80678C2.76228 6.92359 2.82106 7.06833 2.82106 7.24099C2.82106 7.41366 2.76265 7.55877 2.64584 7.67632C2.52904 7.79386 2.38431 7.85263 2.21163 7.85263ZM2.21163 5.36842C2.03897 5.36842 1.89386 5.31002 1.77632 5.19322C1.65877 5.07641 1.59999 4.93167 1.59999 4.75901C1.59999 4.58634 1.6584 4.44123 1.77521 4.32368C1.89201 4.20614 2.03675 4.14737 2.20942 4.14737C2.38208 4.14737 2.52719 4.20577 2.64474 4.32257C2.76228 4.43938 2.82106 4.58412 2.82106 4.75678C2.82106 4.92946 2.76265 5.07456 2.64584 5.1921C2.52904 5.30965 2.38431 5.36842 2.21163 5.36842ZM2.21163 2.82106C2.03897 2.82106 1.89386 2.76265 1.77632 2.64584C1.65877 2.52904 1.59999 2.38431 1.59999 2.21163C1.59999 2.03897 1.6584 1.89386 1.77521 1.77632C1.89201 1.65877 2.03675 1.59999 2.20942 1.59999C2.38208 1.59999 2.52719 1.6584 2.64474 1.77521C2.76228 1.89201 2.82106 2.03675 2.82106 2.20942C2.82106 2.38208 2.76265 2.52719 2.64584 2.64474C2.52904 2.76228 2.38431 2.82106 2.21163 2.82106ZM4.75789 8.12632C4.51228 8.12632 4.30351 8.04035 4.13158 7.86842C3.95965 7.69649 3.87368 7.48772 3.87368 7.24211C3.87368 6.99649 3.95965 6.78772 4.13158 6.61579C4.30351 6.44386 4.51228 6.3579 4.75789 6.3579C5.00351 6.3579 5.21228 6.44386 5.38421 6.61579C5.55614 6.78772 5.6421 6.99649 5.6421 7.24211C5.6421 7.48772 5.55614 7.69649 5.38421 7.86842C5.21228 8.04035 5.00351 8.12632 4.75789 8.12632ZM4.75789 5.6421C4.51228 5.6421 4.30351 5.55614 4.13158 5.38421C3.95965 5.21228 3.87368 5.00351 3.87368 4.75789C3.87368 4.51228 3.95965 4.30351 4.13158 4.13158C4.30351 3.95965 4.51228 3.87368 4.75789 3.87368C5.00351 3.87368 5.21228 3.95965 5.38421 4.13158C5.55614 4.30351 5.6421 4.51228 5.6421 4.75789C5.6421 5.00351 5.55614 5.21228 5.38421 5.38421C5.21228 5.55614 5.00351 5.6421 4.75789 5.6421ZM4.75901 10.4C4.58634 10.4 4.44123 10.3416 4.32368 10.2248C4.20614 10.108 4.14737 9.96325 4.14737 9.79058C4.14737 9.61792 4.20577 9.47281 4.32257 9.35526C4.43938 9.23772 4.58412 9.17894 4.75678 9.17894C4.92946 9.17894 5.07456 9.23735 5.1921 9.35416C5.30965 9.47096 5.36842 9.61569 5.36842 9.78837C5.36842 9.96103 5.31002 10.1061 5.19322 10.2237C5.07641 10.3412 4.93167 10.4 4.75901 10.4ZM4.75901 2.82106C4.58634 2.82106 4.44123 2.76265 4.32368 2.64584C4.20614 2.52904 4.14737 2.38431 4.14737 2.21163C4.14737 2.03897 4.20577 1.89386 4.32257 1.77632C4.43938 1.65877 4.58412 1.59999 4.75678 1.59999C4.92946 1.59999 5.07456 1.6584 5.1921 1.77521C5.30965 1.89201 5.36842 2.03675 5.36842 2.20942C5.36842 2.38208 5.31002 2.52719 5.19322 2.64474C5.07641 2.76228 4.93167 2.82106 4.75901 2.82106ZM4.75789 12C4.66667 12 4.58948 11.9684 4.52632 11.9053C4.46316 11.8421 4.43158 11.7649 4.43158 11.6737C4.43158 11.5825 4.46316 11.5053 4.52632 11.4421C4.58948 11.379 4.66667 11.3474 4.75789 11.3474C4.84912 11.3474 4.92632 11.379 4.98947 11.4421C5.05263 11.5053 5.08421 11.5825 5.08421 11.6737C5.08421 11.7649 5.05263 11.8421 4.98947 11.9053C4.92632 11.9684 4.84912 12 4.75789 12ZM4.75789 0.652626C4.66667 0.652626 4.58948 0.621047 4.52632 0.55789C4.46316 0.494732 4.43158 0.417542 4.43158 0.326321C4.43158 0.235089 4.46316 0.157895 4.52632 0.0947368C4.58948 0.0315789 4.66667 0 4.75789 0C4.84912 0 4.92632 0.0315789 4.98947 0.0947368C5.05263 0.157895 5.08421 0.235089 5.08421 0.326321C5.08421 0.417542 5.05263 0.494732 4.98947 0.55789C4.92632 0.621047 4.84912 0.652626 4.75789 0.652626ZM7.24211 8.12632C6.99649 8.12632 6.78772 8.04035 6.61579 7.86842C6.44386 7.69649 6.3579 7.48772 6.3579 7.24211C6.3579 6.99649 6.44386 6.78772 6.61579 6.61579C6.78772 6.44386 6.99649 6.3579 7.24211 6.3579C7.48772 6.3579 7.69649 6.44386 7.86842 6.61579C8.04035 6.78772 8.12632 6.99649 8.12632 7.24211C8.12632 7.48772 8.04035 7.69649 7.86842 7.86842C7.69649 8.04035 7.48772 8.12632 7.24211 8.12632ZM7.24211 5.6421C6.99649 5.6421 6.78772 5.55614 6.61579 5.38421C6.44386 5.21228 6.3579 5.00351 6.3579 4.75789C6.3579 4.51228 6.44386 4.30351 6.61579 4.13158C6.78772 3.95965 6.99649 3.87368 7.24211 3.87368C7.48772 3.87368 7.69649 3.95965 7.86842 4.13158C8.04035 4.30351 8.12632 4.51228 8.12632 4.75789C8.12632 5.00351 8.04035 5.21228 7.86842 5.38421C7.69649 5.55614 7.48772 5.6421 7.24211 5.6421ZM7.24322 10.4C7.07054 10.4 6.92544 10.3416 6.8079 10.2248C6.69035 10.108 6.63158 9.96325 6.63158 9.79058C6.63158 9.61792 6.68998 9.47281 6.80678 9.35526C6.92359 9.23772 7.06833 9.17894 7.24099 9.17894C7.41366 9.17894 7.55877 9.23735 7.67632 9.35416C7.79386 9.47096 7.85263 9.61569 7.85263 9.78837C7.85263 9.96103 7.79423 10.1061 7.67743 10.2237C7.56062 10.3412 7.41588 10.4 7.24322 10.4ZM7.24322 2.82106C7.07054 2.82106 6.92544 2.76265 6.8079 2.64584C6.69035 2.52904 6.63158 2.38431 6.63158 2.21163C6.63158 2.03897 6.68998 1.89386 6.80678 1.77632C6.92359 1.65877 7.06833 1.59999 7.24099 1.59999C7.41366 1.59999 7.55877 1.6584 7.67632 1.77521C7.79386 1.89201 7.85263 2.03675 7.85263 2.20942C7.85263 2.38208 7.79423 2.52719 7.67743 2.64474C7.56062 2.76228 7.41588 2.82106 7.24322 2.82106ZM7.30527 12C7.21404 12 7.13684 11.9684 7.07368 11.9053C7.01053 11.8421 6.97895 11.7649 6.97895 11.6737C6.97895 11.5825 7.01053 11.5053 7.07368 11.4421C7.13684 11.379 7.21404 11.3474 7.30527 11.3474C7.39649 11.3474 7.47368 11.379 7.53684 11.4421C7.59999 11.5053 7.63157 11.5825 7.63157 11.6737C7.63157 11.7649 7.59999 11.8421 7.53684 11.9053C7.47368 11.9684 7.39649 12 7.30527 12ZM7.24211 0.652626C7.15088 0.652626 7.07368 0.621047 7.01053 0.55789C6.94737 0.494732 6.91579 0.417542 6.91579 0.326321C6.91579 0.235089 6.94737 0.157895 7.01053 0.0947368C7.07368 0.0315789 7.15088 0 7.24211 0C7.33333 0 7.41052 0.0315789 7.47368 0.0947368C7.53684 0.157895 7.56842 0.235089 7.56842 0.326321C7.56842 0.417542 7.53684 0.494732 7.47368 0.55789C7.41052 0.621047 7.33333 0.652626 7.24211 0.652626ZM9.79058 10.4C9.61792 10.4 9.47281 10.3416 9.35526 10.2248C9.23772 10.108 9.17894 9.96325 9.17894 9.79058C9.17894 9.61792 9.23735 9.47281 9.35416 9.35526C9.47096 9.23772 9.61569 9.17894 9.78837 9.17894C9.96103 9.17894 10.1061 9.23735 10.2237 9.35416C10.3412 9.47096 10.4 9.61569 10.4 9.78837C10.4 9.96103 10.3416 10.1061 10.2248 10.2237C10.108 10.3412 9.96325 10.4 9.79058 10.4ZM9.79058 7.85263C9.61792 7.85263 9.47281 7.79423 9.35526 7.67743C9.23772 7.56062 9.17894 7.41588 9.17894 7.24322C9.17894 7.07054 9.23735 6.92544 9.35416 6.8079C9.47096 6.69035 9.61569 6.63158 9.78837 6.63158C9.96103 6.63158 10.1061 6.68998 10.2237 6.80678C10.3412 6.92359 10.4 7.06833 10.4 7.24099C10.4 7.41366 10.3416 7.55877 10.2248 7.67632C10.108 7.79386 9.96325 7.85263 9.79058 7.85263ZM9.79058 5.36842C9.61792 5.36842 9.47281 5.31002 9.35526 5.19322C9.23772 5.07641 9.17894 4.93167 9.17894 4.75901C9.17894 4.58634 9.23735 4.44123 9.35416 4.32368C9.47096 4.20614 9.61569 4.14737 9.78837 4.14737C9.96103 4.14737 10.1061 4.20577 10.2237 4.32257C10.3412 4.43938 10.4 4.58412 10.4 4.75678C10.4 4.92946 10.3416 5.07456 10.2248 5.1921C10.108 5.30965 9.96325 5.36842 9.79058 5.36842ZM9.79058 2.82106C9.61792 2.82106 9.47281 2.76265 9.35526 2.64584C9.23772 2.52904 9.17894 2.38431 9.17894 2.21163C9.17894 2.03897 9.23735 1.89386 9.35416 1.77632C9.47096 1.65877 9.61569 1.59999 9.78837 1.59999C9.96103 1.59999 10.1061 1.6584 10.2237 1.77521C10.3412 1.89201 10.4 2.03675 10.4 2.20942C10.4 2.38208 10.3416 2.52719 10.2248 2.64474C10.108 2.76228 9.96325 2.82106 9.79058 2.82106ZM11.6737 7.56842C11.5825 7.56842 11.5053 7.53684 11.4421 7.47368C11.379 7.41052 11.3474 7.33333 11.3474 7.24211C11.3474 7.15088 11.379 7.07368 11.4421 7.01053C11.5053 6.94737 11.5825 6.91579 11.6737 6.91579C11.7649 6.91579 11.8421 6.94737 11.9053 7.01053C11.9684 7.07368 12 7.15088 12 7.24211C12 7.33333 11.9684 7.41052 11.9053 7.47368C11.8421 7.53684 11.7649 7.56842 11.6737 7.56842ZM11.6737 5.08421C11.5825 5.08421 11.5053 5.05263 11.4421 4.98947C11.379 4.92632 11.3474 4.84912 11.3474 4.75789C11.3474 4.66667 11.379 4.58948 11.4421 4.52632C11.5053 4.46316 11.5825 4.43158 11.6737 4.43158C11.7649 4.43158 11.8421 4.46316 11.9053 4.52632C11.9684 4.58948 12 4.66667 12 4.75789C12 4.84912 11.9684 4.92632 11.9053 4.98947C11.8421 5.05263 11.7649 5.08421 11.6737 5.08421Z"})),ie=({props:e})=>l.createElement(o.A,Object.assign({component:re},e)),se=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"zoom-out-map",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M0.650002 11.35V7.88241H1.64073V9.65585L3.7213 7.57528L4.42472 8.2787L2.34415 10.3593H4.11759V11.35H0.650002ZM7.88241 11.35V10.3593H9.65585L7.58519 8.28861L8.28861 7.58519L10.3593 9.65585V7.88241H11.35V11.35H7.88241ZM3.71139 4.41481L1.64073 2.34415V4.11759H0.650002V0.65H4.11759V1.64073H2.34415L4.41481 3.71139L3.71139 4.41481ZM8.28861 4.41481L7.58519 3.71139L9.65585 1.64073H7.88241V0.65H11.35V4.11759H10.3593V2.34415L8.28861 4.41481Z"})),de=({props:e})=>l.createElement(o.A,Object.assign({component:se},e)),me=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"paragraph-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M5.01104 12V7.61696H4.94805C4.12998 7.61696 3.43412 7.29507 2.86047 6.65128C2.28682 6.00748 2 5.22655 2 4.30848C2 3.39041 2.28682 2.60947 2.86047 1.96568C3.43412 1.32189 4.12998 1 4.94805 1H10V2.10281H8.68975V12H7.70709V2.10281H5.99371V12H5.01104Z"})),ce=({props:e})=>l.createElement(o.A,Object.assign({component:me},e)),ue=()=>l.createElement("svg",{viewBox:"0 0 30 30",focusable:"false","data-icon":"element-image-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M6.63463 25.6249C6.00321 25.6249 5.46875 25.4062 5.03125 24.9687C4.59375 24.5312 4.375 23.9967 4.375 23.3653V6.63463C4.375 6.00321 4.59375 5.46875 5.03125 5.03125C5.46875 4.59375 6.00321 4.375 6.63463 4.375H23.3653C23.9967 4.375 24.5312 4.59375 24.9687 5.03125C25.4062 5.46875 25.6249 6.00321 25.6249 6.63463V23.3653C25.6249 23.9967 25.4062 24.5312 24.9687 24.9687C24.5312 25.4062 23.9967 25.6249 23.3653 25.6249H6.63463ZM6.63463 23.75H23.3653C23.4615 23.75 23.5496 23.7099 23.6298 23.6298C23.7099 23.5496 23.75 23.4615 23.75 23.3653V6.63463C23.75 6.53846 23.7099 6.4503 23.6298 6.37016C23.5496 6.29003 23.4615 6.24997 23.3653 6.24997H6.63463C6.53846 6.24997 6.4503 6.29003 6.37016 6.37016C6.29003 6.4503 6.24997 6.53846 6.24997 6.63463V23.3653C6.24997 23.4615 6.29003 23.5496 6.37016 23.6298C6.4503 23.7099 6.53846 23.75 6.63463 23.75ZM8.43753 20.9374H21.6586L17.548 15.4567L14.0384 20.024L11.5384 16.8269L8.43753 20.9374ZM10.625 12.1874C11.0577 12.1874 11.4262 12.0352 11.7307 11.7307C12.0352 11.4262 12.1874 11.0577 12.1874 10.625C12.1874 10.1923 12.0352 9.8237 11.7307 9.51922C11.4262 9.21474 11.0577 9.0625 10.625 9.0625C10.1923 9.0625 9.8237 9.21474 9.51922 9.51922C9.21474 9.8237 9.0625 10.1923 9.0625 10.625C9.0625 11.0577 9.21474 11.4262 9.51922 11.7307C9.8237 12.0352 10.1923 12.1874 10.625 12.1874Z"})),pe=({props:e})=>l.createElement(o.A,Object.assign({component:ue},e)),ge=()=>l.createElement("svg",{viewBox:"0 0 30 30",focusable:"false","data-icon":"element-image-ai",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M6.63463 25.2499C6.00321 25.2499 5.46875 25.0312 5.03125 24.5937C4.59375 24.1562 4.375 23.6217 4.375 22.9903V6.25963C4.375 5.62821 4.59375 5.09375 5.03125 4.65625C5.46875 4.21875 6.00321 4 6.63463 4H23.3653C23.9967 4 24.5312 4.21875 24.9687 4.65625C25.4062 5.09375 25.6249 5.62821 25.6249 6.25963V22.9903C25.6249 23.6217 25.4062 24.1562 24.9687 24.5937C24.5312 25.0312 23.9967 25.2499 23.3653 25.2499H6.63463ZM6.63463 23.375H23.3653C23.4615 23.375 23.5496 23.3349 23.6298 23.2548C23.7099 23.1746 23.75 23.0865 23.75 22.9903V6.25963C23.75 6.16346 23.7099 6.0753 23.6298 5.99516C23.5496 5.91503 23.4615 5.87497 23.3653 5.87497H6.63463C6.53846 5.87497 6.4503 5.91503 6.37016 5.99516C6.29003 6.0753 6.24997 6.16346 6.24997 6.25963V22.9903C6.24997 23.0865 6.29003 23.1746 6.37016 23.2548C6.4503 23.3349 6.53846 23.375 6.63463 23.375Z"}),l.createElement("path",{d:"M11 21C11 21 10.6521 19.5906 10.0308 18.9692C9.40939 18.3479 8 18 8 18C8 18 9.40939 17.6521 10.0308 17.0308C10.6521 16.4094 11 15 11 15C11 15 11.3479 16.4094 11.9692 17.0308C12.5906 17.6521 14 18 14 18C14 18 12.5906 18.3479 11.9692 18.9692C11.3479 19.5906 11 21 11 21Z"}),l.createElement("path",{d:"M17 18C17 18 16.4202 15.651 15.3846 14.6154C14.349 13.5798 12 13 12 13C12 13 14.349 12.4202 15.3846 11.3846C16.4202 10.349 17 8 17 8C17 8 17.5798 10.349 18.6154 11.3846C19.651 12.4202 22 13 22 13C22 13 19.651 13.5798 18.6154 14.6154C17.5798 15.651 17 18 17 18Z"}),l.createElement("path",{d:"M10 12C10 12 9.7681 11.0604 9.35385 10.6462C8.93959 10.2319 8 10 8 10C8 10 8.93959 9.7681 9.35385 9.35385C9.7681 8.93959 10 8 10 8C10 8 10.2319 8.93959 10.6462 9.35385C11.0604 9.7681 12 10 12 10C12 10 11.0604 10.2319 10.6462 10.6462C10.2319 11.0604 10 12 10 12Z"}),l.createElement("path",{d:"M20.5 21C20.5 21 20.3261 20.2953 20.0154 19.9846C19.7047 19.6739 19 19.5 19 19.5C19 19.5 19.7047 19.3261 20.0154 19.0154C20.3261 18.7047 20.5 18 20.5 18C20.5 18 20.6739 18.7047 20.9846 19.0154C21.2953 19.3261 22 19.5 22 19.5C22 19.5 21.2953 19.6739 20.9846 19.9846C20.6739 20.2953 20.5 21 20.5 21Z"})),be=({props:e})=>l.createElement(o.A,Object.assign({component:ge},e)),he=()=>l.createElement("svg",{viewBox:"0 0 30 30",focusable:"false","data-icon":"element-text",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M4.375 22.0865V20.2115H18.1249V22.0865H4.375ZM4.375 15.9807V14.1058H25.6249V15.9807H4.375ZM4.375 9.87497V8H25.6249V9.87497H4.375Z"})),Ee=({props:e})=>l.createElement(o.A,Object.assign({component:he},e)),fe=()=>l.createElement("svg",{viewBox:"0 0 30 30",focusable:"false","data-icon":"element-title",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M13.678 24.3749V8.28119H6.88708V5.625H23.125V8.28119H16.3341V24.3749H13.678Z"})),ve=({props:e})=>l.createElement(o.A,Object.assign({component:fe},e)),ye=()=>l.createElement("svg",{viewBox:"0 0 30 30",focusable:"false","data-icon":"element-button",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.03131 19.9687C4.46881 20.4062 5.00327 20.6249 5.63469 20.6249H7V18.75H5.63469C5.53852 18.75 5.45036 18.7099 5.37022 18.6298C5.29009 18.5496 5.25003 18.4615 5.25003 18.3653V7.63463C5.25003 7.53846 5.29009 7.4503 5.37022 7.37016C5.45036 7.29003 5.53852 7.24997 5.63469 7.24997H24.3654C24.4615 7.24997 24.5497 7.29003 24.6298 7.37016C24.71 7.4503 24.75 7.53846 24.75 7.63463V18.3653C24.75 18.4615 24.71 18.5496 24.6298 18.6298C24.5497 18.7099 24.4615 18.75 24.3654 18.75H23V20.6249H24.3654C24.9968 20.6249 25.5312 20.4062 25.9688 19.9687C26.4062 19.5312 26.625 18.9967 26.625 18.3653V7.63463C26.625 7.00321 26.4062 6.46875 25.9688 6.03125C25.5312 5.59375 24.9968 5.375 24.3654 5.375H5.63469C5.00327 5.375 4.46881 5.59375 4.03131 6.03125C3.59381 6.46875 3.37506 7.00321 3.37506 7.63463V18.3653C3.37506 18.9967 3.59381 19.5312 4.03131 19.9687Z"}),l.createElement("path",{d:"M14.225 28C13.825 28 13.4417 27.925 13.075 27.775C12.7083 27.625 12.3833 27.4083 12.1 27.125L7 22L7.825 21.15C8.05833 20.9167 8.34167 20.7583 8.675 20.675C9.00833 20.5917 9.34167 20.5917 9.675 20.675L11.4 21.175V13C11.4 12.7167 11.4958 12.4792 11.6875 12.2875C11.8792 12.0958 12.1167 12 12.4 12C12.6833 12 12.9208 12.0958 13.1125 12.2875C13.3042 12.4792 13.4 12.7167 13.4 13V23.825L10.95 23.125L13.525 25.7C13.625 25.8 13.7333 25.875 13.85 25.925C13.9667 25.975 14.0917 26 14.225 26H18.4C18.95 26 19.4208 25.8042 19.8125 25.4125C20.2042 25.0208 20.4 24.55 20.4 24V20C20.4 19.7167 20.4958 19.4792 20.6875 19.2875C20.8792 19.0958 21.1167 19 21.4 19C21.6833 19 21.9208 19.0958 22.1125 19.2875C22.3042 19.4792 22.4 19.7167 22.4 20V24C22.4 25.1 22.0083 26.0417 21.225 26.825C20.4417 27.6083 19.5 28 18.4 28H14.225ZM14.4 21V17C14.4 16.7167 14.4958 16.4792 14.6875 16.2875C14.8792 16.0958 15.1167 16 15.4 16C15.6833 16 15.9208 16.0958 16.1125 16.2875C16.3042 16.4792 16.4 16.7167 16.4 17V21H14.4ZM17.4 21V18C17.4 17.7167 17.4958 17.4792 17.6875 17.2875C17.8792 17.0958 18.1167 17 18.4 17C18.6833 17 18.9208 17.0958 19.1125 17.2875C19.3042 17.4792 19.4 17.7167 19.4 18V21H17.4Z"})),Ae=({props:e})=>l.createElement(o.A,Object.assign({component:ye},e)),_e=()=>l.createElement("svg",{viewBox:"0 0 30 30",focusable:"false","data-icon":"element-spacer",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M6 4V5.65H24V4H6ZM15.0562 6.75L10.7812 10.93L11.9906 12.1125L14.2125 9.94V20.06L11.9906 17.8875L10.7812 19.07L15.0562 23.25L19.3312 19.07L18.1219 17.8875L15.9 20.06V9.94L18.1219 12.1125L19.3312 10.93L15.0562 6.75ZM6 24.35V26H24V24.35H6Z"})),Ce=({props:e})=>l.createElement(o.A,Object.assign({component:_e},e)),Se=()=>l.createElement("svg",{viewBox:"0 0 30 30",focusable:"false","data-icon":"element-list",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M11.6346 23.4376V21.5627H25.6249V23.4376H11.6346ZM11.6346 15.9376V14.0627H25.6249V15.9376H11.6346ZM11.6346 8.43765V6.56271H25.6249V8.43765H11.6346ZM6.45431 24.5795C5.8825 24.5795 5.393 24.3759 4.98581 23.9687C4.5786 23.5615 4.375 23.072 4.375 22.5002C4.375 21.9284 4.5786 21.4389 4.98581 21.0317C5.393 20.6245 5.8825 20.4209 6.45431 20.4209C7.02613 20.4209 7.51563 20.6245 7.92281 21.0317C8.33 21.4389 8.53359 21.9284 8.53359 22.5002C8.53359 23.072 8.33 23.5615 7.92281 23.9687C7.51563 24.3759 7.02613 24.5795 6.45431 24.5795ZM6.45431 17.0795C5.8825 17.0795 5.393 16.8759 4.98581 16.4687C4.5786 16.0615 4.375 15.572 4.375 15.0002C4.375 14.4284 4.5786 13.9389 4.98581 13.5317C5.393 13.1245 5.8825 12.9209 6.45431 12.9209C7.02613 12.9209 7.51563 13.1245 7.92281 13.5317C8.33 13.9389 8.53359 14.4284 8.53359 15.0002C8.53359 15.572 8.33 16.0615 7.92281 16.4687C7.51563 16.8759 7.02613 17.0795 6.45431 17.0795ZM6.45431 9.57946C5.8825 9.57946 5.393 9.37587 4.98581 8.96868C4.5786 8.56149 4.375 8.07199 4.375 7.50018C4.375 6.92837 4.5786 6.43887 4.98581 6.03168C5.393 5.62449 5.8825 5.4209 6.45431 5.4209C7.02613 5.4209 7.51563 5.62449 7.92281 6.03168C8.33 6.43887 8.53359 6.92837 8.53359 7.50018C8.53359 8.07199 8.33 8.56149 7.92281 8.96868C7.51563 9.37587 7.02613 9.57946 6.45431 9.57946Z"})),we=({props:e})=>l.createElement(o.A,Object.assign({component:Se},e)),ke=()=>l.createElement("svg",{viewBox:"0 0 30 30",focusable:"false","data-icon":"element-list-ol",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M4.375 26.8749V25.3846H7.5V24.0624H5.625V22.5721H7.5V21.2499H4.375V19.7596H7.93269C8.23238 19.7596 8.48357 19.8609 8.68628 20.0637C8.88901 20.2664 8.99038 20.5176 8.99038 20.8173V22.3077C8.99038 22.6073 8.88901 22.8585 8.68628 23.0613C8.48357 23.264 8.23238 23.3653 7.93269 23.3653C8.23238 23.3653 8.48357 23.4667 8.68628 23.6694C8.88901 23.8721 8.99038 24.1233 8.99038 24.423V25.8173C8.99038 26.1169 8.88901 26.3681 8.68628 26.5708C8.48357 26.7736 8.23238 26.8749 7.93269 26.8749H4.375ZM4.375 18.5577V15.3125C4.375 15.0128 4.47636 14.7616 4.67909 14.5589C4.88182 14.3561 5.13302 14.2548 5.43269 14.2548H7.5V12.9327H4.375V11.4423H7.93269C8.23238 11.4423 8.48357 11.5436 8.68628 11.7464C8.88901 11.9491 8.99038 12.2003 8.99038 12.5V14.6875C8.99038 14.9871 8.88901 15.2383 8.68628 15.4411C8.48357 15.6438 8.23238 15.7452 7.93269 15.7452H5.86537V17.0673H8.99038V18.5577H4.375ZM6.25 10.2404V4.61538H4.375V3.125H7.74038V10.2404H6.25ZM11.6346 23.4374V21.5625H25.6249V23.4374H11.6346ZM11.6346 15.9374V14.0625H25.6249V15.9374H11.6346ZM11.6346 8.43744V6.5625H25.6249V8.43744H11.6346Z"})),xe=({props:e})=>l.createElement(o.A,Object.assign({component:ke},e)),Be=()=>l.createElement("svg",{viewBox:"0 0 30 30",focusable:"false","data-icon":"element-devider",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M6 14.35V16H24V14.35H6Z"}),l.createElement("path",{d:"M11.2596 10.6249C10.6282 10.6249 10.0938 10.4062 9.65625 9.96869C9.21875 9.53119 9 8.99673 9 8.36531V6.63463C9 6.00321 9.21875 5.46875 9.65625 5.03125C10.0938 4.59375 10.6282 4.375 11.2596 4.375H18.9903C19.6217 4.375 20.1562 4.59375 20.5937 5.03125C21.0312 5.46875 21.2499 6.00321 21.2499 6.63463V8.36531C21.2499 8.99673 21.0312 9.53119 20.5937 9.96869C20.1562 10.4062 19.6217 10.6249 18.9903 10.6249H11.2596ZM11.2596 9H18.9903C19.0865 9 19.1746 8.95994 19.2548 8.87981C19.3349 8.79967 19.375 8.71151 19.375 8.61534V6.38466C19.375 6.28849 19.3349 6.20033 19.2548 6.12019C19.1746 6.04006 19.0865 6 18.9903 6H11.2596C11.1635 6 11.0753 6.04006 10.9952 6.12019C10.915 6.20033 10.875 6.28849 10.875 6.38466V8.61534C10.875 8.71151 10.915 8.79967 10.9952 8.87981C11.0753 8.95994 11.1635 9 11.2596 9Z"}),l.createElement("path",{d:"M11.2596 26.2499C10.6282 26.2499 10.0938 26.0312 9.65625 25.5937C9.21875 25.1562 9 24.6217 9 23.9903V22.2596C9 21.6282 9.21875 21.0938 9.65625 20.6562C10.0938 20.2188 10.6282 20 11.2596 20H18.9903C19.6217 20 20.1562 20.2188 20.5937 20.6562C21.0312 21.0938 21.2499 21.6282 21.2499 22.2596V23.9903C21.2499 24.6217 21.0312 25.1562 20.5937 25.5937C20.1562 26.0312 19.6217 26.2499 18.9903 26.2499H11.2596ZM11.2596 24.625H18.9903C19.0865 24.625 19.1746 24.5849 19.2548 24.5048C19.3349 24.4247 19.375 24.3365 19.375 24.2403V22.0097C19.375 21.9135 19.3349 21.8253 19.2548 21.7452C19.1746 21.6651 19.0865 21.625 18.9903 21.625H11.2596C11.1635 21.625 11.0753 21.6651 10.9952 21.7452C10.915 21.8253 10.875 21.9135 10.875 22.0097V24.2403C10.875 24.3365 10.915 24.4247 10.9952 24.5048C11.0753 24.5849 11.1635 24.625 11.2596 24.625Z"})),Te=({props:e})=>l.createElement(o.A,Object.assign({component:Be},e)),Re=()=>l.createElement("svg",{viewBox:"0 0 30 30",focusable:"false","data-icon":"element-social",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M22.5014 27.1875C21.5469 27.1875 20.7352 26.8533 20.0661 26.1848C19.397 25.5164 19.0625 24.7048 19.0625 23.75C19.0625 23.5939 19.0749 23.4323 19.0998 23.2652C19.1246 23.098 19.1618 22.9439 19.2115 22.8028L9.96631 17.3894C9.63619 17.7179 9.26039 17.9747 8.83891 18.1598C8.41743 18.3449 7.97111 18.4374 7.49997 18.4374C6.54511 18.4374 5.73349 18.1034 5.06509 17.4353C4.3967 16.7671 4.0625 15.9558 4.0625 15.0014C4.0625 14.0469 4.3967 13.2352 5.06509 12.5661C5.73349 11.897 6.54511 11.5625 7.49997 11.5625C7.97111 11.5625 8.41743 11.655 8.83891 11.8401C9.26039 12.0252 9.63619 12.282 9.96631 12.6106L19.2115 7.19709C19.1618 7.05607 19.1246 6.90197 19.0998 6.73478C19.0749 6.56761 19.0625 6.40601 19.0625 6.24997C19.0625 5.29512 19.3966 4.48349 20.0647 3.81509C20.7328 3.1467 21.5441 2.8125 22.4986 2.8125C23.453 2.8125 24.2648 3.14656 24.9338 3.81469C25.6029 4.48281 25.9374 5.29411 25.9374 6.24856C25.9374 7.20302 25.6032 8.01478 24.9348 8.68384C24.2665 9.35291 23.4548 9.68744 22.5 9.68744C22.0288 9.68744 21.5825 9.5949 21.161 9.40981C20.7396 9.22471 20.3638 8.9679 20.0336 8.63938L10.7884 14.0528C10.8381 14.1939 10.8754 14.3477 10.9002 14.5143C10.925 14.6809 10.9374 14.842 10.9374 14.9975C10.9374 15.153 10.925 15.3149 10.9002 15.4832C10.8754 15.6514 10.8381 15.8061 10.7884 15.9471L20.0336 21.3606C20.3638 21.032 20.7396 20.7752 21.161 20.5901C21.5825 20.405 22.0288 20.3125 22.5 20.3125C23.4548 20.3125 24.2665 20.6466 24.9348 21.3147C25.6032 21.9828 25.9374 22.7941 25.9374 23.7486C25.9374 24.703 25.6034 25.5148 24.9353 26.1838C24.2671 26.8529 23.4558 27.1875 22.5014 27.1875ZM22.5 7.81247C22.9343 7.81247 23.3033 7.66062 23.607 7.35694C23.9107 7.05323 24.0625 6.68423 24.0625 6.24994C24.0625 5.81565 23.9107 5.44665 23.607 5.14294C23.3033 4.83927 22.9343 4.68744 22.5 4.68744C22.0657 4.68744 21.6967 4.83928 21.393 5.14297C21.0893 5.44668 20.9374 5.81568 20.9374 6.24997C20.9374 6.68426 21.0893 7.05326 21.393 7.35697C21.6967 7.66066 22.0657 7.81247 22.5 7.81247ZM7.49997 16.5625C7.93426 16.5625 8.30326 16.4106 8.60697 16.1069C8.91066 15.8032 9.0625 15.4342 9.0625 14.9999C9.0625 14.5656 8.91066 14.1966 8.60697 13.8929C8.30326 13.5893 7.93426 13.4374 7.49997 13.4374C7.06568 13.4374 6.69668 13.5893 6.39297 13.893C6.08928 14.1967 5.93744 14.5657 5.93744 15C5.93744 15.4343 6.08928 15.8033 6.39297 16.107C6.69668 16.4107 7.06568 16.5625 7.49997 16.5625V16.5625ZM22.5 25.3125C22.9343 25.3125 23.3033 25.1606 23.607 24.8569C23.9107 24.5532 24.0625 24.1842 24.0625 23.7499C24.0625 23.3156 23.9107 22.9466 23.607 22.6429C23.3033 22.3393 22.9343 22.1874 22.5 22.1874C22.0657 22.1874 21.6967 22.3393 21.393 22.643C21.0893 22.9467 20.9374 23.3157 20.9374 23.75C20.9374 24.1843 21.0893 24.5533 21.393 24.857C21.6967 25.1607 22.0657 25.3125 22.5 25.3125Z"})),Ne=({props:e})=>l.createElement(o.A,Object.assign({component:Re},e)),Le=()=>l.createElement("svg",{viewBox:"0 0 30 30",focusable:"false","data-icon":"element-table",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M24.6153 25.6249H6.63463C6.00321 25.6249 5.46875 25.4062 5.03125 24.9687C4.59375 24.5312 4.375 23.9967 4.375 23.3653V6.63463C4.375 6.00321 4.59375 5.46875 5.03125 5.03125C5.46875 4.59375 6.00321 4.375 6.63463 4.375H24.6153C25.2467 4.375 25.7812 4.59375 26.2187 5.03125C26.6562 5.46875 26.8749 6.00321 26.8749 6.63463V23.3653C26.8749 23.9967 26.6562 24.5312 26.2187 24.9687C25.7812 25.4062 25.2467 25.6249 24.6153 25.6249ZM6.24997 10.3125H25V6.63463C25 6.53846 24.9599 6.4503 24.8798 6.37016C24.7996 6.29003 24.7115 6.24997 24.6153 6.24997H6.63463C6.53846 6.24997 6.4503 6.29003 6.37016 6.37016C6.29003 6.4503 6.24997 6.53846 6.24997 6.63463V10.3125ZM10.2404 12.1874H6.24997V23.3653C6.24997 23.4615 6.29003 23.5496 6.37016 23.6298C6.4503 23.7099 6.53846 23.75 6.63463 23.75H10.2404V12.1874ZM21.0096 12.1874V23.75H24.6153C24.7115 23.75 24.7996 23.7099 24.8798 23.6298C24.9599 23.5496 25 23.4615 25 23.3653V12.1874H21.0096ZM19.1346 12.1874H12.1153V23.75H19.1346V12.1874Z"})),Pe=({props:e})=>l.createElement(o.A,Object.assign({component:Le},e)),Ie=()=>l.createElement("svg",{viewBox:"0 0 30 30",focusable:"false","data-icon":"element-countdown",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M19.3413 20.6586L20.6586 19.3413L15.9374 14.6199V8.74997H14.0625V15.3798L19.3413 20.6586ZM15.0021 26.8749C13.3596 26.8749 11.8159 26.5633 10.3707 25.9399C8.9255 25.3166 7.6684 24.4707 6.59938 23.4021C5.53033 22.3336 4.68401 21.077 4.06041 19.6325C3.4368 18.188 3.125 16.6445 3.125 15.0021C3.125 13.3596 3.43667 11.8159 4.06 10.3707C4.68333 8.9255 5.52927 7.6684 6.59781 6.59938C7.66638 5.53034 8.92293 4.68401 10.3675 4.06041C11.812 3.4368 13.3555 3.125 14.9979 3.125C16.6403 3.125 18.1841 3.43667 19.6293 4.06C21.0744 4.68333 22.3315 5.52927 23.4006 6.59781C24.4696 7.66638 25.3159 8.92293 25.9395 10.3675C26.5631 11.812 26.8749 13.3555 26.8749 14.9979C26.8749 16.6403 26.5633 18.1841 25.9399 19.6293C25.3166 21.0744 24.4707 22.3315 23.4021 23.4006C22.3336 24.4696 21.077 25.3159 19.6325 25.9395C18.188 26.5631 16.6445 26.8749 15.0021 26.8749ZM15 25C17.7708 25 20.1302 24.026 22.0781 22.0781C24.026 20.1302 25 17.7708 25 15C25 12.2291 24.026 9.86976 22.0781 7.92184C20.1302 5.97393 17.7708 4.99997 15 4.99997C12.2291 4.99997 9.86976 5.97393 7.92184 7.92184C5.97393 9.86976 4.99997 12.2291 4.99997 15C4.99997 17.7708 5.97393 20.1302 7.92184 22.0781C9.86976 24.026 12.2291 25 15 25Z"})),Me=({props:e})=>l.createElement(o.A,Object.assign({component:Ie},e)),Oe=()=>l.createElement("svg",{viewBox:"0 0 30 30",focusable:"false","data-icon":"element-video",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M12.1154 20.048L19.9759 15L12.1154 9.95194V20.048ZM6.63463 25.6249C6.00321 25.6249 5.46875 25.4062 5.03125 24.9687C4.59375 24.5312 4.375 23.9967 4.375 23.3653V6.63463C4.375 6.00321 4.59375 5.46875 5.03125 5.03125C5.46875 4.59375 6.00321 4.375 6.63463 4.375H23.3653C23.9967 4.375 24.5312 4.59375 24.9687 5.03125C25.4062 5.46875 25.6249 6.00321 25.6249 6.63463V23.3653C25.6249 23.9967 25.4062 24.5312 24.9687 24.9687C24.5312 25.4062 23.9967 25.6249 23.3653 25.6249H6.63463ZM6.63463 23.75H23.3653C23.4615 23.75 23.5496 23.7099 23.6298 23.6298C23.7099 23.5496 23.75 23.4615 23.75 23.3653V6.63463C23.75 6.53846 23.7099 6.4503 23.6298 6.37016C23.5496 6.29003 23.4615 6.24997 23.3653 6.24997H6.63463C6.53846 6.24997 6.4503 6.29003 6.37016 6.37016C6.29003 6.4503 6.24997 6.53846 6.24997 6.63463V23.3653C6.24997 23.4615 6.29003 23.5496 6.37016 23.6298C6.4503 23.7099 6.53846 23.75 6.63463 23.75Z"})),Ve=({props:e})=>l.createElement(o.A,Object.assign({component:Oe},e)),Fe=()=>l.createElement("svg",{viewBox:"0 0 30 30",focusable:"false","data-icon":"element-text-ai",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M4.375 22.0865V20.2115H18.1249V22.0865H4.375ZM4.375 15.9807V14.1058H25.6249V15.9807H4.375ZM4.375 9.87497V8H11V9.87497H4.375Z"}),l.createElement("path",{d:"M17 13C17 13 16.6521 11.5906 16.0308 10.9692C15.4094 10.3479 14 10 14 10C14 10 15.4094 9.65215 16.0308 9.03077C16.6521 8.40939 17 7 17 7C17 7 17.3479 8.40939 17.9692 9.03077C18.5906 9.65215 20 10 20 10C20 10 18.5906 10.3479 17.9692 10.9692C17.3479 11.5906 17 13 17 13Z"}),l.createElement("path",{d:"M22.5 11C22.5 11 21.8623 8.41612 20.7231 7.27692C19.5839 6.13773 17 5.5 17 5.5C17 5.5 19.5839 4.86227 20.7231 3.72308C21.8623 2.58388 22.5 0 22.5 0C22.5 0 23.1377 2.58388 24.2769 3.72308C25.4161 4.86227 28 5.5 28 5.5C28 5.5 25.4161 6.13773 24.2769 7.27692C23.1377 8.41612 22.5 11 22.5 11Z"}),l.createElement("path",{d:"M15 5C15 5 14.7681 4.06041 14.3538 3.64615C13.9396 3.2319 13 3 13 3C13 3 13.9396 2.7681 14.3538 2.35385C14.7681 1.93959 15 1 15 1C15 1 15.2319 1.93959 15.6462 2.35385C16.0604 2.7681 17 3 17 3C17 3 16.0604 3.2319 15.6462 3.64615C15.2319 4.06041 15 5 15 5Z"}),l.createElement("path",{d:"M27 13C27 13 26.7681 12.0604 26.3538 11.6462C25.9396 11.2319 25 11 25 11C25 11 25.9396 10.7681 26.3538 10.3538C26.7681 9.93959 27 9 27 9C27 9 27.2319 9.93959 27.6462 10.3538C28.0604 10.7681 29 11 29 11C29 11 28.0604 11.2319 27.6462 11.6462C27.2319 12.0604 27 13 27 13Z"})),De=({props:e})=>l.createElement(o.A,Object.assign({component:Fe},e)),He=()=>l.createElement("svg",{viewBox:"0 0 30 30",focusable:"false","data-icon":"element-form",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M6.63463 25.6251C6.00321 25.6251 5.46875 25.4064 5.03125 24.9689C4.59375 24.5314 4.375 23.9969 4.375 23.3655V6.63484C4.375 6.00342 4.59375 5.46896 5.03125 5.03146C5.46875 4.59396 6.00321 4.37521 6.63463 4.37521H17.4543L15.5793 6.25018H6.63463C6.53846 6.25018 6.4503 6.29024 6.37016 6.37037C6.29003 6.45051 6.24997 6.53867 6.24997 6.63484V23.3655C6.24997 23.4617 6.29003 23.5498 6.37016 23.63C6.4503 23.7101 6.53846 23.7502 6.63463 23.7502H23.3653C23.4615 23.7502 23.5496 23.7101 23.6298 23.63C23.7099 23.5498 23.75 23.4617 23.75 23.3655V14.3415L25.6249 12.4665V23.3655C25.6249 23.9969 25.4062 24.5314 24.9687 24.9689C24.5312 25.4064 23.9967 25.6251 23.3653 25.6251H6.63463ZM11.875 18.1251V13.8343L23.1995 2.50984C23.3934 2.31592 23.6066 2.17449 23.8389 2.08555C24.0713 1.99662 24.3077 1.95215 24.5481 1.95215C24.7932 1.95215 25.0288 1.99662 25.2548 2.08555C25.4807 2.17449 25.6866 2.31191 25.8725 2.4978L27.4422 4.06271C27.6233 4.25661 27.7623 4.47054 27.8593 4.70452C27.9562 4.93848 28.0047 5.17565 28.0047 5.41602C28.0047 5.65642 27.9635 5.8896 27.8809 6.11555C27.7984 6.34149 27.6602 6.55142 27.4663 6.74533L16.1057 18.1251H11.875ZM13.75 16.2502H15.3077L23.0986 8.45927L22.3197 7.68043L21.4856 6.87755L13.75 14.6132V16.2502Z"})),je=({props:e})=>l.createElement(o.A,Object.assign({component:He},e)),ze=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"ai-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M2.45454 11.7273C2.45454 11.7273 2.16994 10.446 1.66154 9.88113C1.15314 9.31625 0 9 0 9C0 9 1.15314 8.68374 1.66154 8.11887C2.16994 7.554 2.45454 6.27273 2.45454 6.27273C2.45454 6.27273 2.73915 7.554 3.24755 8.11887C3.75594 8.68374 4.90909 9 4.90909 9C4.90909 9 3.75594 9.31625 3.24755 9.88113C2.73915 10.446 2.45454 11.7273 2.45454 11.7273Z"}),l.createElement("path",{d:"M7.63636 9C7.63636 9 7.1304 6.94996 6.22658 6.04614C5.32276 5.14233 3.27273 4.63636 3.27273 4.63636C3.27273 4.63636 5.32276 4.1304 6.22658 3.22657C7.1304 2.32275 7.63636 0.272728 7.63636 0.272728C7.63636 0.272728 8.14233 2.32275 9.04615 3.22657C9.94996 4.1304 12 4.63636 12 4.63636C12 4.63636 9.94996 5.14233 9.04615 6.04614C8.14233 6.94996 7.63636 9 7.63636 9Z"}),l.createElement("path",{d:"M1.63636 4.09091C1.63636 4.09091 1.44663 3.19402 1.10769 2.7986C0.768758 2.40318 0 2.18182 0 2.18182C0 2.18182 0.768758 1.96046 1.10769 1.56503C1.44663 1.16961 1.63636 0.272728 1.63636 0.272728C1.63636 0.272728 1.8261 1.16961 2.16503 1.56503C2.50397 1.96046 3.27273 2.18182 3.27273 2.18182C3.27273 2.18182 2.50397 2.40318 2.16503 2.7986C1.8261 3.19402 1.63636 4.09091 1.63636 4.09091Z"}),l.createElement("path",{d:"M10.6364 11.7273C10.6364 11.7273 10.4782 11.0866 10.1958 10.8042C9.91336 10.5218 9.27273 10.3636 9.27273 10.3636C9.27273 10.3636 9.91336 10.2055 10.1958 9.92307C10.4782 9.64064 10.6364 9 10.6364 9C10.6364 9 10.7945 9.64064 11.0769 9.92307C11.3594 10.2055 12 10.3636 12 10.3636C12 10.3636 11.3594 10.5218 11.0769 10.8042C10.7945 11.0866 10.6364 11.7273 10.6364 11.7273Z"})),We=({props:e})=>l.createElement(o.A,Object.assign({component:ze},e)),Ge=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"typorgaf-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M6.65333 7.21508H5.1671L3.00719 4.63822L5.1671 2H6.65333L4.44481 4.63822L6.65333 7.21508ZM3.64614 7.21508H2.17379L0 4.63822L2.17379 2H3.63919L1.43762 4.63822L3.64614 7.21508Z"}),l.createElement("path",{d:"M12 6.43338L11.1167 9.98246H9.94694L11.069 6.43338H12ZM9.58089 6.43338L8.72148 9.98246H7.52784L8.6419 6.43338H9.58089Z"})),Ue=({props:e})=>l.createElement(o.A,Object.assign({component:Ge},e)),qe=()=>l.createElement("svg",{width:"42",height:"43",viewBox:"0 0 42 43",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("rect",{x:"0.00830078",y:"0.173828",width:"42",height:"42",rx:"21",fill:"#4597F7"}),l.createElement("g",{clipPath:"url(#clip0_2193_1178)"},l.createElement("path",{d:"M14.0083 30.1739C13.4583 30.1739 12.9875 29.9781 12.5958 29.5864C12.2041 29.1948 12.0083 28.7239 12.0083 28.1739V14.1739C12.0083 13.6239 12.2041 13.1531 12.5958 12.7614C12.9875 12.3698 13.4583 12.1739 14.0083 12.1739H22.9333L20.9333 14.1739H14.0083V28.1739H28.0083V21.2239L30.0083 19.2239V28.1739C30.0083 28.7239 29.8125 29.1948 29.4208 29.5864C29.0291 29.9781 28.5583 30.1739 28.0083 30.1739H14.0083ZM18.0083 24.1739V19.9239L27.1833 10.7489C27.3833 10.5489 27.6083 10.3989 27.8583 10.2989C28.1083 10.1989 28.3583 10.1489 28.6083 10.1489C28.875 10.1489 29.1291 10.1989 29.3708 10.2989C29.6125 10.3989 29.8333 10.5489 30.0333 10.7489L31.4333 12.1739C31.6166 12.3739 31.7583 12.5948 31.8583 12.8364C31.9583 13.0781 32.0083 13.3239 32.0083 13.5739C32.0083 13.8239 31.9625 14.0698 31.8708 14.3114C31.7791 14.5531 31.6333 14.7739 31.4333 14.9739L22.2583 24.1739H18.0083ZM20.0083 22.1739H21.4083L27.2083 16.3739L26.5083 15.6739L25.7833 14.9739L20.0083 20.7489V22.1739Z",fill:"white"}),l.createElement("path",{d:"M14.0083 30.1739C13.4583 30.1739 12.9875 29.9781 12.5958 29.5864C12.2041 29.1948 12.0083 28.7239 12.0083 28.1739V14.1739C12.0083 13.6239 12.2041 13.1531 12.5958 12.7614C12.9875 12.3698 13.4583 12.1739 14.0083 12.1739H22.9333L20.9333 14.1739H14.0083V28.1739H28.0083V21.2239L30.0083 19.2239V28.1739C30.0083 28.7239 29.8125 29.1948 29.4208 29.5864C29.0291 29.9781 28.5583 30.1739 28.0083 30.1739H14.0083ZM18.0083 24.1739V19.9239L27.1833 10.7489C27.3833 10.5489 27.6083 10.3989 27.8583 10.2989C28.1083 10.1989 28.3583 10.1489 28.6083 10.1489C28.875 10.1489 29.1291 10.1989 29.3708 10.2989C29.6125 10.3989 29.8333 10.5489 30.0333 10.7489L31.4333 12.1739C31.6166 12.3739 31.7583 12.5948 31.8583 12.8364C31.9583 13.0781 32.0083 13.3239 32.0083 13.5739C32.0083 13.8239 31.9625 14.0698 31.8708 14.3114C31.7791 14.5531 31.6333 14.7739 31.4333 14.9739L22.2583 24.1739H18.0083ZM20.0083 22.1739H21.4083L27.2083 16.3739L26.5083 15.6739L25.7833 14.9739L20.0083 20.7489V22.1739Z",fill:"white"})),l.createElement("defs",null,l.createElement("clipPath",{id:"clip0_2193_1178"},l.createElement("rect",{width:"24",height:"24",fill:"white",transform:"translate(9.0083 9.17383)"})))),Ze=({props:e})=>l.createElement(o.A,Object.assign({component:qe},e)),Xe=()=>l.createElement("svg",{width:"42",height:"43",viewBox:"0 0 42 43",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("rect",{x:"0.00830078",y:"0.173828",width:"42",height:"42",rx:"21",fill:"#6A32C9"}),l.createElement("path",{d:"M12.0083 14.0129C12.0083 13.5629 12.1736 13.1726 12.5041 12.8419C12.8347 12.5114 13.225 12.3462 13.6751 12.3462L18.5083 12.3462L18.5083 14.0129L13.6751 14.0129L13.6751 28.6794L28.3416 28.6794L28.3416 14.0129L23.5083 14.0129L23.5083 12.3462L28.3416 12.3462C28.7916 12.3462 29.1819 12.5114 29.5126 12.8419C29.8431 13.1726 30.0083 13.5629 30.0083 14.0129L30.0083 28.6794C30.0083 29.1294 29.843 29.5198 29.5125 29.8504C29.1819 30.1809 28.7916 30.3462 28.3416 30.3462L13.675 30.3462C13.225 30.3462 12.8347 30.1809 12.5041 29.8504C12.1736 29.5198 12.0083 29.1294 12.0083 28.6794L12.0083 14.0129ZM16.1251 19.7294L17.3583 18.5129L20.1751 21.3294L20.1751 12.3462L21.8416 12.3462L21.8416 21.3294L24.6583 18.5129L25.8916 19.7294L21.0083 24.6129L16.1251 19.7294Z",fill:"white"})),Ke=({props:e})=>l.createElement(o.A,Object.assign({component:Xe},e)),Ye=()=>l.createElement("svg",{width:"42",height:"43",viewBox:"0 0 42 43",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("rect",{x:"0.00830078",y:"0.173828",width:"42",height:"42",rx:"21",fill:"#72C240"}),l.createElement("path",{d:"M15.0669 30.9687C15.0669 30.9687 14.59 28.8216 13.738 27.875C12.886 26.9284 10.9536 26.3984 10.9536 26.3984C10.9536 26.3984 12.886 25.8684 13.738 24.9218C14.59 23.9752 15.0669 21.8281 15.0669 21.8281C15.0669 21.8281 15.5438 23.9752 16.3958 24.9218C17.2478 25.8684 19.1802 26.3984 19.1802 26.3984C19.1802 26.3984 17.2478 26.9284 16.3958 27.875C15.5438 28.8216 15.0669 30.9687 15.0669 30.9687Z",fill:"white"}),l.createElement("path",{d:"M23.7505 26.0037C23.7505 26.0037 22.9026 22.5682 21.388 21.0536C19.8734 19.539 16.438 18.6912 16.438 18.6912C16.438 18.6912 19.8734 17.8433 21.388 16.3287C22.9026 14.8141 23.7505 11.3787 23.7505 11.3787C23.7505 11.3787 24.5984 14.8141 26.113 16.3287C27.6276 17.8433 31.063 18.6912 31.063 18.6912C31.063 18.6912 27.6276 19.539 26.113 21.0536C24.5984 22.5682 23.7505 26.0037 23.7505 26.0037Z",fill:"white"}),l.createElement("path",{d:"M13.6958 17.7771C13.6958 17.7771 13.3778 16.2741 12.8099 15.6115C12.2419 14.9488 10.9536 14.5779 10.9536 14.5779C10.9536 14.5779 12.2419 14.2069 12.8099 13.5443C13.3778 12.8816 13.6958 11.3787 13.6958 11.3787C13.6958 11.3787 14.0138 12.8816 14.5817 13.5443C15.1497 14.2069 16.438 14.5779 16.438 14.5779C16.438 14.5779 15.1497 14.9488 14.5817 15.6115C14.0138 16.2741 13.6958 17.7771 13.6958 17.7771Z",fill:"white"}),l.createElement("path",{d:"M28.7144 30.2357C28.7144 30.2357 28.4494 29.1622 27.9761 28.6889C27.5028 28.2156 26.4293 27.9506 26.4293 27.9506C26.4293 27.9506 27.5028 27.6856 27.9761 27.2123C28.4494 26.739 28.7144 25.6654 28.7144 25.6654C28.7144 25.6654 28.9794 26.739 29.4527 27.2123C29.926 27.6856 30.9996 27.9506 30.9996 27.9506C30.9996 27.9506 29.926 28.2156 29.4527 28.6889C28.9794 29.1622 28.7144 30.2357 28.7144 30.2357Z",fill:"white"})),$e=({props:e})=>l.createElement(o.A,Object.assign({component:Ye},e)),Qe=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"padding-top-bottom-icon",width:"1em",height:"1em","aria-hidden":"true",fill:"currentColor"},l.createElement("path",{d:"M7.43866e-05 1.03733V0L12 0.0407197V1.07805L7.43866e-05 1.03733ZM0 11.9593V10.922L12 10.9627V12L0 11.9593Z"}),l.createElement("rect",{x:"3.5",y:"3.5",width:"5",height:"5",fill:"none",stroke:"currentColor"})),Je=({props:e})=>l.createElement(o.A,Object.assign({component:Qe},e)),et=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"padding-left-right-icon",width:"1em",height:"1em","aria-hidden":"true",fill:"currentColor"},l.createElement("path",{d:"M10.9626 7.43413e-05L11.9999 7.43866e-05L11.9592 12L10.9218 12L10.9626 7.43413e-05ZM0.0405974 -5.22757e-07L1.07792 -4.77414e-07L1.0372 12L-0.00012271 12L0.0405974 -5.22757e-07Z"}),l.createElement("rect",{x:"8.5",y:"3.5",width:"5",height:"5",transform:"rotate(90 8.5 3.5)",fill:"none",stroke:"currentColor"})),tt=({props:e})=>l.createElement(o.A,Object.assign({component:et},e)),at=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"padding-switcher",fill:"currentColor",width:"1em",height:"1em","aria-hidden":"true"},l.createElement("path",{d:"M10.959 2.00007L11.9999 2.00007L11.959 10L10.9181 10L10.959 2.00007ZM-0.00012207 2L1.04074 2L0.999842 10L-0.041016 10L-0.00012207 2Z"}),l.createElement("path",{d:"M9.99993 10.9797L9.99993 12.0205L1.99995 11.9796L1.99995 10.9387L9.99993 10.9797ZM10 0.0205078L10 1.06137L1.99995 1.02043L1.99995 -0.0204332L10 0.0205078Z"})),lt=({props:e})=>l.createElement(o.A,Object.assign({component:at},e)),ot=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"padding-top-icon",width:"1em",height:"1em","aria-hidden":"true",fill:"currentColor"},l.createElement("path",{d:"M0 1.04086V0L11.9999 0.0408583V1.08172L0 1.04086Z"}),l.createElement("rect",{x:"3.5",y:"3.5",width:"5",height:"5",fill:"none",stroke:"currentColor"})),nt=({props:e})=>l.createElement(o.A,Object.assign({component:ot},e)),rt=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"padding-bottom-icon",width:"1em",height:"1em","aria-hidden":"true",fill:"currentColor"},l.createElement("path",{d:"M0 10.9591V12L11.9999 11.9591V10.9183L0 10.9591Z"}),l.createElement("rect",{x:"0.5",y:"-0.5",width:"5",height:"5",transform:"matrix(1 0 0 -1 3 8)",fill:"none",stroke:"currentColor"})),it=({props:e})=>l.createElement(o.A,Object.assign({component:rt},e)),st=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"padding-left-icon",width:"1em",height:"1em","aria-hidden":"true",fill:"currentColor"},l.createElement("path",{d:"M-8.67844e-05 -4.54974e-08L1.04077 0L0.999913 12L-0.0409456 12L-8.67844e-05 -4.54974e-08Z"}),l.createElement("rect",{x:"8.5",y:"3.5",width:"5",height:"5",transform:"rotate(90 8.5 3.5)",fill:"none",stroke:"currentColor"})),dt=({props:e})=>l.createElement(o.A,Object.assign({component:st},e)),mt=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"padding-righr-icon",width:"1em",height:"1em","aria-hidden":"true",fill:"currentColor"},l.createElement("path",{d:"M12.0001 -4.54974e-08L10.9592 0L11.0001 12L12.0409 12L12.0001 -4.54974e-08Z"}),l.createElement("rect",{x:"0.5",y:"0.5",width:"5",height:"5",transform:"matrix(4.37114e-08 1 1 -4.37114e-08 3 3)",fill:"none",stroke:"currentColor"})),ct=({props:e})=>l.createElement(o.A,Object.assign({component:mt},e)),ut=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"code",width:"1em",height:"1em","aria-hidden":"true",fill:"currentColor"},l.createElement("path",{d:"M6.75582 1.62701L7.6995 1.87987L5.42377 10.373L4.48009 10.1201L6.75582 1.62701Z"}),l.createElement("path",{d:"M0 6.32085L2.76329 3.55756L3.45411 4.24838L1.38164 6.32085L3.45411 8.39332L2.76329 9.08414L0 6.32085Z"}),l.createElement("path",{d:"M12 6.32085L9.23671 3.55756L8.54589 4.24838L10.6184 6.32085L8.54589 8.39332L9.23671 9.08414L12 6.32085Z"})),pt=({props:e})=>l.createElement(o.A,Object.assign({component:ut},e)),gt=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"go-to-parrent",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M10.2778 10.4815L7.87408 10.4815C7.29692 10.4815 6.81651 10.2897 6.43287 9.90602C6.04922 9.52238 5.8574 9.04197 5.8574 8.46481L5.8574 2.46064L8.25092 4.85417L8.97408 4.12592L5.34814 0.5L1.72222 4.12592L2.44537 4.85417L4.83889 2.46064L4.83889 8.46481C4.83889 9.32377 5.13002 10.0444 5.71227 10.6266C6.29452 11.2089 7.01512 11.5 7.87408 11.5L10.2778 11.5L10.2778 10.4815Z"})),bt=({props:e})=>l.createElement(o.A,Object.assign({component:gt},e)),ht=()=>l.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"undo",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M511.4 124C290.5 124.3 112 303 112 523.9c0 128 60.2 242 153.8 315.2l-37.5 48c-4.1 5.3-.3 13 6.3 12.9l167-.8c5.2 0 9-4.9 7.7-9.9L369.8 727a8 8 0 00-14.1-3L315 776.1c-10.2-8-20-16.7-29.3-26a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-7.5 7.5-15.3 14.5-23.4 21.2a7.93 7.93 0 00-1.2 11.1l39.4 50.5c2.8 3.5 7.9 4.1 11.4 1.3C854.5 760.8 912 649.1 912 523.9c0-221.1-179.4-400.2-400.6-399.9z"})),Et=({props:e})=>l.createElement(o.A,Object.assign({component:ht},e)),ft=()=>l.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"redo",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M758.2 839.1C851.8 765.9 912 651.9 912 523.9 912 303 733.5 124.3 512.6 124 291.4 123.7 112 302.8 112 523.9c0 125.2 57.5 236.9 147.6 310.2 3.5 2.8 8.6 2.2 11.4-1.3l39.4-50.5c2.7-3.4 2.1-8.3-1.2-11.1-8.1-6.6-15.9-13.7-23.4-21.2a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-9.3 9.3-19.1 18-29.3 26L668.2 724a8 8 0 00-14.1 3l-39.6 162.2c-1.2 5 2.6 9.9 7.7 9.9l167 .8c6.7 0 10.5-7.7 6.3-12.9l-37.3-47.9z"})),vt=({props:e})=>l.createElement(o.A,Object.assign({component:ft},e)),yt=()=>l.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"history",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z"})),At=({props:e})=>l.createElement(o.A,Object.assign({component:yt},e)),_t=()=>l.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"eye",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"})),Ct=({props:e})=>l.createElement(o.A,Object.assign({component:_t},e)),St=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"send",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M0.5 1.5024L0.684652 2.29376L1.5024 6L0.684652 9.70623L0.5 10.4976L1.2518 10.1942L10.5372 6.39568L11.5 6L10.5372 5.60431L1.2518 1.80575L0.5 1.5024ZM1.67386 2.90048L8.22902 5.57793H2.26739L1.67386 2.90048ZM2.26739 6.42206H8.22902L1.67386 9.09952L2.26739 6.42206Z"})),wt=({props:e})=>l.createElement(o.A,Object.assign({component:St},e)),kt=()=>l.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}),l.createElement("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"})),xt=({props:e})=>l.createElement(o.A,Object.assign({component:kt},e)),Bt=()=>l.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"share-alt",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M752 664c-28.5 0-54.8 10-75.4 26.7L469.4 540.8a160.68 160.68 0 000-57.6l207.2-149.9C697.2 350 723.5 360 752 360c66.2 0 120-53.8 120-120s-53.8-120-120-120-120 53.8-120 120c0 11.6 1.6 22.7 4.7 33.3L439.9 415.8C410.7 377.1 364.3 352 312 352c-88.4 0-160 71.6-160 160s71.6 160 160 160c52.3 0 98.7-25.1 127.9-63.8l196.8 142.5c-3.1 10.6-4.7 21.8-4.7 33.3 0 66.2 53.8 120 120 120s120-53.8 120-120-53.8-120-120-120zm0-476c28.7 0 52 23.3 52 52s-23.3 52-52 52-52-23.3-52-52 23.3-52 52-52zM312 600c-48.5 0-88-39.5-88-88s39.5-88 88-88 88 39.5 88 88-39.5 88-88 88zm440 236c-28.7 0-52-23.3-52-52s23.3-52 52-52 52 23.3 52 52-23.3 52-52 52z"})),Tt=({props:e})=>l.createElement(o.A,Object.assign({component:Bt},e)),Rt=()=>l.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"mobile",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M744 62H280c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h464c35.3 0 64-28.7 64-64V126c0-35.3-28.7-64-64-64zm-8 824H288V134h448v752zM472 784a40 40 0 1080 0 40 40 0 10-80 0z"})),Nt=({props:e})=>l.createElement(o.A,Object.assign({component:Rt},e)),Lt=()=>l.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"desktop",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M928 140H96c-17.7 0-32 14.3-32 32v496c0 17.7 14.3 32 32 32h380v112H304c-8.8 0-16 7.2-16 16v48c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-48c0-8.8-7.2-16-16-16H548V700h380c17.7 0 32-14.3 32-32V172c0-17.7-14.3-32-32-32zm-40 488H136V212h752v416z"})),Pt=({props:e})=>l.createElement(o.A,Object.assign({component:Lt},e)),It=()=>l.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"plus-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}),l.createElement("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"})),Mt=({props:e})=>l.createElement(o.A,Object.assign({component:It},e)),Ot=()=>l.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"comment",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("defs",null,l.createElement("style",null)),l.createElement("path",{d:"M573 421c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40zm-280 0c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40z"}),l.createElement("path",{d:"M894 345a343.92 343.92 0 00-189-130v.1c-17.1-19-36.4-36.5-58-52.1-163.7-119-393.5-82.7-513 81-96.3 133-92.2 311.9 6 439l.8 132.6c0 3.2.5 6.4 1.5 9.4a31.95 31.95 0 0040.1 20.9L309 806c33.5 11.9 68.1 18.7 102.5 20.6l-.5.4c89.1 64.9 205.9 84.4 313 49l127.1 41.4c3.2 1 6.5 1.6 9.9 1.6 17.7 0 32-14.3 32-32V753c88.1-119.6 90.4-284.9 1-408zM323 735l-12-5-99 31-1-104-8-9c-84.6-103.2-90.2-251.9-11-361 96.4-132.2 281.2-161.4 413-66 132.2 96.1 161.5 280.6 66 412-80.1 109.9-223.5 150.5-348 102zm505-17l-8 10 1 104-98-33-12 5c-56 20.8-115.7 22.5-171 7l-.2-.1A367.31 367.31 0 00729 676c76.4-105.3 88.8-237.6 44.4-350.4l.6.4c23 16.5 44.1 37.1 62 62 72.6 99.6 68.5 235.2-8 330z"}),l.createElement("path",{d:"M433 421c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40z"})),Vt=({props:e})=>l.createElement(o.A,Object.assign({component:Ot},e)),Ft=()=>l.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"setting",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"})),Dt=({props:e})=>l.createElement(o.A,Object.assign({component:Ft},e)),Ht=()=>l.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"border-outer",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656zM484 366h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zM302 548h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm364 0h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-182 0h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 182h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8z"})),jt=({props:e})=>l.createElement(o.A,Object.assign({component:Ht},e)),zt=()=>l.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"appstore-add",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("defs",null,l.createElement("style",null)),l.createElement("path",{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zm52 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"})),Wt=({props:e})=>l.createElement(o.A,Object.assign({component:zt},e)),Gt=()=>l.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"appstore",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"})),Ut=({props:e})=>l.createElement(o.A,Object.assign({component:Gt},e)),qt=()=>l.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"build",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M916 210H376c-17.7 0-32 14.3-32 32v236H108c-17.7 0-32 14.3-32 32v272c0 17.7 14.3 32 32 32h540c17.7 0 32-14.3 32-32V546h236c17.7 0 32-14.3 32-32V242c0-17.7-14.3-32-32-32zm-504 68h200v200H412V278zm-68 468H144V546h200v200zm268 0H412V546h200v200zm268-268H680V278h200v200z"})),Zt=({props:e})=>l.createElement(o.A,Object.assign({component:qt},e)),Xt=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"search-outlined",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M10.7667 11.5L6.80463 7.53797C6.49908 7.79599 6.14443 7.99799 5.74069 8.14398C5.33696 8.28997 4.90735 8.36297 4.45186 8.36297C3.34736 8.36297 2.4126 7.98017 1.64756 7.21458C0.88252 6.449 0.5 5.52131 0.5 4.43149C0.5 3.34168 0.882795 2.41397 1.64838 1.64838C2.41396 0.882795 3.34336 0.5 4.43658 0.5C5.52979 0.5 6.45748 0.882795 7.21967 1.64838C7.98187 2.41397 8.36297 3.34219 8.36297 4.43302C8.36297 4.87336 8.29167 5.29553 8.14908 5.69955C8.00649 6.10355 7.79939 6.47531 7.52778 6.81482L11.5 10.7667L10.7667 11.5ZM4.44167 7.34446C5.248 7.34446 5.93337 7.06012 6.4978 6.49144C7.06223 5.92277 7.34444 5.23612 7.34444 4.43149C7.34444 3.62685 7.06223 2.9402 6.4978 2.37153C5.93337 1.80286 5.248 1.51852 4.44167 1.51852C3.62968 1.51852 2.93949 1.80286 2.3711 2.37153C1.80271 2.9402 1.51851 3.62685 1.51851 4.43149C1.51851 5.23612 1.80271 5.92277 2.3711 6.49144C2.93949 7.06012 3.62968 7.34446 4.44167 7.34446Z"})),Kt=({props:e})=>l.createElement(o.A,Object.assign({component:Xt},e)),Yt=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"close-outlined",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M1.84745 11L1 10.1526L5.15255 6L1 1.84745L1.84745 1L6 5.15255L10.1526 1L11 1.84745L6.84745 6L11 10.1526L10.1526 11L6 6.84745L1.84745 11Z"})),$t=({props:e})=>l.createElement(o.A,Object.assign({component:Yt},e)),Qt=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"add-image",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M1.11007 11.9944C0.804799 11.9944 0.543469 11.8858 0.326081 11.6684C0.108694 11.451 0 11.1896 0 10.8844V1.11563C0 0.810353 0.108694 0.549023 0.326081 0.331636C0.543469 0.114248 0.804799 0.0055542 1.11007 0.0055542H7.64848V1.11563H1.11007V10.8844H10.8788V4.35707H11.9889V10.8844C11.9889 11.1896 11.8802 11.451 11.6628 11.6684C11.4454 11.8858 11.1841 11.9944 10.8788 11.9944H1.11007ZM9.54672 3.80204V2.45883H8.20352V1.34876H9.54672V0.0055542H10.6568V1.34876H12V2.45883H10.6568V3.80204H9.54672ZM1.99815 9.30805H9.99074L7.55966 6.06661L5.4838 8.80852L3.9408 6.76596L1.99815 9.30805Z"})),Jt=({props:e})=>l.createElement(o.A,Object.assign({component:Qt},e)),ea=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"merge-tags",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M7.2 10.8V9.60001H9C9.17 9.60001 9.3125 9.54251 9.4275 9.42751C9.5425 9.31251 9.6 9.17 9.6 9V7.8C9.6 7.42 9.71 7.07501 9.93 6.76501C10.15 6.45501 10.44 6.235 10.8 6.105V5.895C10.44 5.765 10.15 5.545 9.93 5.235C9.71 4.925 9.6 4.58 9.6 4.2V3C9.6 2.83 9.5425 2.6875 9.4275 2.5725C9.3125 2.4575 9.17 2.4 9 2.4H7.2V1.2H9C9.5 1.2 9.925 1.375 10.275 1.725C10.625 2.075 10.8 2.5 10.8 3V4.2C10.8 4.37 10.8575 4.5125 10.9725 4.6275C11.0875 4.7425 11.23 4.8 11.4 4.8H12V7.2H11.4C11.23 7.2 11.0875 7.25751 10.9725 7.37251C10.8575 7.48751 10.8 7.63 10.8 7.8V9C10.8 9.5 10.625 9.92501 10.275 10.275C9.925 10.625 9.5 10.8 9 10.8H7.2ZM3 10.8C2.5 10.8 2.075 10.625 1.725 10.275C1.375 9.92501 1.2 9.5 1.2 9V7.8C1.2 7.63 1.1425 7.48751 1.0275 7.37251C0.9125 7.25751 0.77 7.2 0.6 7.2H0V4.8H0.6C0.77 4.8 0.9125 4.7425 1.0275 4.6275C1.1425 4.5125 1.2 4.37 1.2 4.2V3C1.2 2.5 1.375 2.075 1.725 1.725C2.075 1.375 2.5 1.2 3 1.2H4.8V2.4H3C2.83 2.4 2.6875 2.4575 2.5725 2.5725C2.4575 2.6875 2.4 2.83 2.4 3V4.2C2.4 4.58 2.29 4.925 2.07 5.235C1.85 5.545 1.56 5.765 1.2 5.895V6.105C1.56 6.235 1.85 6.45501 2.07 6.76501C2.29 7.07501 2.4 7.42 2.4 7.8V9C2.4 9.17 2.4575 9.31251 2.5725 9.42751C2.6875 9.54251 2.83 9.60001 3 9.60001H4.8V10.8H3Z"})),ta=({props:e})=>l.createElement(o.A,Object.assign({component:ea},e)),aa=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"light-mode",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M6 7.81819C6.50303 7.81819 6.93182 7.64092 7.28637 7.28637C7.64092 6.93182 7.81819 6.50303 7.81819 6C7.81819 5.49697 7.64092 5.06818 7.28637 4.71363C6.93182 4.35908 6.50303 4.18181 6 4.18181C5.49697 4.18181 5.06818 4.35908 4.71363 4.71363C4.35908 5.06818 4.18181 5.49697 4.18181 6C4.18181 6.50303 4.35908 6.93182 4.71363 7.28637C5.06818 7.64092 5.49697 7.81819 6 7.81819ZM6 8.72727C5.24545 8.72727 4.60227 8.46136 4.07045 7.92955C3.53864 7.39773 3.27273 6.75455 3.27273 6C3.27273 5.24545 3.53864 4.60227 4.07045 4.07045C4.60227 3.53864 5.24545 3.27273 6 3.27273C6.75455 3.27273 7.39773 3.53864 7.92955 4.07045C8.46136 4.60227 8.72727 5.24545 8.72727 6C8.72727 6.75455 8.46136 7.39773 7.92955 7.92955C7.39773 8.46136 6.75455 8.72727 6 8.72727ZM2.18182 6.45454H0V5.54546H2.18182V6.45454ZM12 6.45454H9.81818V5.54546H12V6.45454ZM5.54546 2.18182V0H6.45454V2.18182H5.54546ZM5.54546 12V9.81818H6.45454V12H5.54546ZM3 3.6091L1.63182 2.28637L2.28181 1.61819L3.5909 2.98182L3 3.6091ZM9.72727 10.3727L8.39546 9.00454L9.0091 8.38182L10.3682 9.71363L9.72727 10.3727ZM8.38182 2.9909L9.71363 1.63182L10.3818 2.27273L9.02727 3.6L8.38182 2.9909ZM1.62727 9.71819L2.98636 8.38636L3.61818 9.0091L2.28637 10.3682L1.62727 9.71819Z"})),la=({props:e})=>l.createElement(o.A,Object.assign({component:aa},e)),oa=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"dark-mode",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M6 11C4.61111 11 3.43056 10.5139 2.45833 9.54167C1.48611 8.56944 1 7.38889 1 6C1 4.61111 1.48611 3.43056 2.45833 2.45833C3.43056 1.48611 4.61111 1 6 1C6.09259 1 6.1875 1.00309 6.28472 1.00926C6.38194 1.01543 6.49382 1.02469 6.62036 1.03704C6.2716 1.32408 5.99769 1.68442 5.79861 2.11806C5.59954 2.55169 5.5 3.01234 5.5 3.5C5.5 4.33333 5.79167 5.04167 6.375 5.625C6.95833 6.20833 7.66667 6.5 8.5 6.5C8.99074 6.5 9.45216 6.40509 9.88426 6.21528C10.3164 6.02546 10.6759 5.76544 10.963 5.43519C10.9753 5.54939 10.9846 5.65047 10.9907 5.73843C10.9969 5.82639 11 5.91358 11 6C11 7.38889 10.5139 8.56944 9.54167 9.54167C8.56944 10.5139 7.38889 11 6 11ZM6 10.0741C6.94444 10.0741 7.77469 9.7909 8.49075 9.22454C9.20681 8.65818 9.67594 7.97376 9.89815 7.17129C9.68211 7.25463 9.45474 7.3179 9.21606 7.36111C8.97737 7.40431 8.73869 7.42592 8.5 7.42592C7.41242 7.42592 6.4862 7.0435 5.72135 6.27865C4.9565 5.5138 4.57408 4.58758 4.57408 3.5C4.57408 3.29012 4.59414 3.06944 4.63426 2.83796C4.67438 2.60648 4.74229 2.35185 4.83797 2.07407C3.99229 2.3395 3.29552 2.83487 2.74768 3.56018C2.19984 4.28549 1.92592 5.09876 1.92592 6C1.92592 7.12963 2.32252 8.09105 3.11574 8.88426C3.90895 9.67748 4.87037 10.0741 6 10.0741Z"})),na=({props:e})=>l.createElement(o.A,Object.assign({component:oa},e)),ra=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"auto-mode",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M5.52714 9.9212C6.07297 9.9212 6.58669 9.79919 7.0683 9.55517C7.54992 9.31115 7.97052 8.98205 8.33012 8.56787C7.09078 8.49081 6.04087 8.02445 5.18038 7.16879C4.31991 6.31312 3.88967 5.27204 3.88967 4.04554C3.88967 3.89463 3.8993 3.74292 3.91857 3.59041C3.93783 3.4379 3.96031 3.28779 3.986 3.1401C3.38558 3.47402 2.89835 3.92352 2.5243 4.48861C2.15024 5.0537 1.96321 5.67659 1.96321 6.35727C1.96321 7.34725 2.30971 8.18873 3.0027 8.88171C3.69568 9.5747 4.53716 9.9212 5.52714 9.9212ZM5.52714 10.8844C4.26853 10.8844 3.19935 10.4445 2.31961 9.5648C1.43987 8.68506 1 7.61588 1 6.35727C1 5.09866 1.43987 4.02948 2.31961 3.14974C3.19935 2.27 4.26853 1.83013 5.52714 1.83013C5.5432 1.83013 5.55925 1.83093 5.5753 1.83253C5.59136 1.83414 5.60741 1.83494 5.62346 1.83494C5.36338 2.14317 5.16994 2.48672 5.04312 2.86558C4.9163 3.24446 4.85288 3.63777 4.85288 4.04554C4.85288 5.03552 5.19938 5.877 5.89237 6.56998C6.58535 7.26297 7.42683 7.60946 8.41681 7.60946C8.68331 7.60946 8.94739 7.57976 9.20906 7.52036C9.47074 7.46097 9.72037 7.37187 9.95796 7.25307C9.74605 8.31261 9.22431 9.18273 8.39273 9.86341C7.56115 10.5441 6.60595 10.8844 5.52714 10.8844ZM7.20315 5.16287L9.02883 0H10.1699L12 5.16287H10.9405L10.533 4.007H8.67018L8.26269 5.16287H7.20315ZM8.90805 3.26533H10.2951L9.60158 1.06918L8.90805 3.26533Z"})),ia=({props:e})=>l.createElement(o.A,Object.assign({component:ra},e)),sa=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"email-confirmation",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M8.00198 11.3105L5.85436 9.16288L6.47419 8.54304L8.00198 10.0708L11.1186 6.95415L11.7385 7.574L8.00198 11.3105ZM5.95912 5.48748L10.2718 2.75493H1.64641L5.95912 5.48748ZM5.95912 6.36049L1.61149 3.59303V9.2851H4.74564L5.61864 10.1581H1.61149C1.37577 10.1581 1.17134 10.0715 0.998197 9.8984C0.825052 9.72525 0.73848 9.52081 0.73848 9.2851V2.75493C0.73848 2.51922 0.825052 2.31479 0.998197 2.14165C1.17134 1.9685 1.37577 1.88193 1.61149 1.88193H10.3155C10.5512 1.88193 10.7556 1.9685 10.9288 2.14165C11.1019 2.31479 11.1885 2.51922 11.1885 2.75493V5.64463L10.3155 6.51766V3.59303L5.95912 6.36049Z"})),da=({props:e})=>l.createElement(o.A,Object.assign({component:sa},e)),ma=()=>l.createElement("svg",{viewBox:"0 -960 960 960",focusable:"false","data-icon":"atom",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M480-200 200-480l280-280 280 280-280 280Zm0-91.999L668.001-480 480-668.001 291.999-480 480-291.999ZM480-480Z"})),ca=({props:e})=>l.createElement(o.A,Object.assign({component:ma},e)),ua=()=>l.createElement("svg",{viewBox:"0 -960 960 960",focusable:"false","data-icon":"column",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M579.999-120q-26.999 0-46.833-19.833-19.833-19.833-19.833-46.833v-586.668q0-27 19.833-46.833Q553-840 579.999-840h193.335q27 0 46.833 19.833T840-773.334v586.668q0 27-19.833 46.833T773.334-120H579.999Zm0-653.334v586.668h193.335v-586.668H579.999ZM186.666-120q-27 0-46.833-19.833T120-186.666v-586.668q0-27 19.833-46.833T186.666-840h193.335q26.999 0 46.833 19.833 19.833 19.833 19.833 46.833v586.668q0 27-19.833 46.833Q407-120 380.001-120H186.666Zm0-653.334v586.668h193.335v-586.668H186.666Zm586.668 0H579.999h193.335Zm-393.333 0H186.666h193.335Z"})),pa=({props:e})=>l.createElement(o.A,Object.assign({component:ua},e)),ga=()=>l.createElement("svg",{viewBox:"0 -960 960 960",focusable:"false","data-icon":"block",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M186.666-120q-27 0-46.833-19.833T120-186.666v-586.668q0-27 19.833-46.833T186.666-840h586.668q27 0 46.833 19.833T840-773.334v586.668q0 27-19.833 46.833T773.334-120H186.666Zm0-66.666h586.668v-586.668H186.666v586.668Zm0 0v-586.668 586.668Z"})),ba=({props:e})=>l.createElement(o.A,Object.assign({component:ga},e)),ha=()=>l.createElement("svg",{viewBox:"0 -960 960 960",focusable:"false","data-icon":"group",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M146.666-160q-27.5 0-47.083-19.583T80-226.666v-506.668q0-27.5 19.583-47.083T146.666-800h666.668q27.5 0 47.083 19.583T880-733.334v506.668q0 27.5-19.583 47.083T813.334-160H146.666Zm0-66.666h100.001v-506.668H146.666v506.668Zm166.667 0h333.334v-506.668H313.333v506.668Zm400 0h100.001v-506.668H713.333v506.668Zm-400-506.668v506.668-506.668Z"})),Ea=({props:e})=>l.createElement(o.A,Object.assign({component:ha},e)),fa=()=>l.createElement("svg",{viewBox:"0 -960 960 960",focusable:"false","data-icon":"button",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M186.666-280q-27 0-46.833-19.833T120-346.666v-266.668q0-27 19.833-46.833T186.666-680h586.668q27 0 46.833 19.833T840-613.334v266.668q0 27-19.833 46.833T773.334-280H186.666Zm0-66.666h586.668v-266.668H186.666v266.668Zm0 0v-266.668 266.668Z"})),va=({props:e})=>l.createElement(o.A,Object.assign({component:fa},e)),ya=()=>l.createElement("svg",{viewBox:"0 -960 960 960",focusable:"false","data-icon":"button",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M186.666-120q-27 0-46.833-19.833T120-186.666v-586.668q0-27 19.833-46.833T186.666-840h586.668q27 0 46.833 19.833T840-773.334v586.668q0 27-19.833 46.833T773.334-120H186.666Zm0-66.666h151.001v-151.001H186.666v151.001Zm217.667 0h151.334v-151.001H404.333v151.001Zm218 0h151.001v-151.001H622.333v151.001ZM186.666-404.333h151.001v-151.334H186.666v151.334Zm217.667 0h151.334v-151.334H404.333v151.334Zm218 0h151.001v-151.334H622.333v151.334Zm-435.667-218h151.001v-151.001H186.666v151.001Zm217.667 0h151.334v-151.001H404.333v151.001Zm218 0h151.001v-151.001H622.333v151.001Z"})),Aa=({props:e})=>l.createElement(o.A,Object.assign({component:ya},e)),_a=()=>l.createElement("svg",{viewBox:"0 -960 960 960",focusable:"false","data-icon":"button",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M146.666-160q-27 0-46.833-19.833T80-226.666v-506.668q0-27 19.833-46.833T146.666-800h666.668q27 0 46.833 19.833T880-733.334v506.668q0 27-19.833 46.833T813.334-160H146.666ZM480-454.667 146.666-670.001v443.335h666.668v-443.335L480-454.667Zm0-66.666 330.667-212.001H150l330 212.001ZM146.666-670.001v-63.333 506.668-443.335Z"})),Ca=({props:e})=>l.createElement(o.A,Object.assign({component:_a},e)),Sa=()=>l.createElement("svg",{viewBox:"0 -960 960 960",focusable:"false","data-icon":"button",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M120-120v-175.333L490.667-666l-67.334-66.667 46.667-46L556.667-692l136-136q5-5 11.5-8t13.167-3q6.666 0 13 3 6.333 3 12.333 8L828-742.667q5 6 8 12.333 3 6.334 3 13 0 6.667-3 13.167t-8 11.5L692.333-557 779-469.666l-46.333 46.333L666-490.667 295.333-120H120Zm66.666-66.666h84L618-534.667 534.667-618 186.666-270.666v84Zm457.667-416.667L759-718l-41-41-114.667 114.667 41 41Zm0 0-41-41 41 41Z"})),wa=({props:e})=>l.createElement(o.A,Object.assign({component:Sa},e)),ka=({svgString:e,...t})=>l.createElement("span",Object.assign({role:"img",className:"anticon",dangerouslySetInnerHTML:{__html:e}},t)),xa=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"slider-group",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M10.0385 4.8313C9.82428 4.61707 9.47693 4.61707 9.2627 4.8313C9.04846 5.04554 9.04846 5.39289 9.2627 5.60712C9.47693 5.82137 9.82428 5.82138 10.0385 5.60713C10.2527 5.3929 10.2528 5.04554 10.0385 4.8313ZM8.61987 4.18848C9.18913 3.61922 10.1121 3.61922 10.6813 4.18848C11.2506 4.75773 11.2506 5.68069 10.6813 6.24995C10.1121 6.81923 9.18912 6.81923 8.61987 6.24995C8.05062 5.68069 8.05062 4.75773 8.61987 4.18848Z"}),l.createElement("path",{d:"M5.22924 3.56484C4.80353 3.99055 4.80353 4.68074 5.22924 5.10645C5.65495 5.53216 6.34514 5.53215 6.77082 5.10646C7.19653 4.68075 7.19653 3.99054 6.77083 3.56484C6.34512 3.13913 5.65491 3.13915 5.22924 3.56484ZM4.58642 5.74927C3.80568 4.96854 3.80568 3.70274 4.58642 2.92201C5.36712 2.14128 6.63293 2.14129 7.41365 2.92201C8.19438 3.70274 8.19438 4.96854 7.41366 5.74927"}),l.createElement("path",{d:"M2.73736 4.8313C2.52311 4.61706 2.17576 4.61707 1.96153 4.8313C1.74729 5.04554 1.74729 5.39289 1.96153 5.60712C2.17576 5.82137 2.52311 5.82138 2.73736 5.60713C2.95159 5.3929 2.95159 5.04554 2.73736 4.8313V4.8313ZM1.31871 4.18847C1.88797 3.61922 2.81092 3.61922 3.38018 4.18847C3.94944 4.75773 3.94944 5.68069 3.38019 6.24995C2.81092 6.81923 1.88797 6.81923 1.31871 6.24995M1.31871 4.18847C0.749447 4.75773 0.749454 5.68069 1.31871 6.24995Z"}),l.createElement("path",{d:"M9.36315 7.42584C9.36315 7.1748 9.56666 6.97129 9.81769 6.97129H10.2149C11.1507 6.97129 11.9091 7.72966 11.9091 8.66549V9.20898C11.9091 9.46002 11.7056 9.66353 11.4545 9.66353C11.2035 9.66353 11 9.46002 11 9.20898V8.66549C11 8.23174 10.6486 7.88038 10.2149 7.88038H9.81769C9.56666 7.88038 9.36315 7.67688 9.36315 7.42584Z"}),l.createElement("path",{d:"M1.78513 7.88038C1.35136 7.88038 1 8.23174 1 8.66549V9.20898C1 9.46002 0.796496 9.66353 0.545457 9.66353C0.294419 9.66353 0.0909119 9.46002 0.0909119 9.20898V8.66549C0.0909119 7.72966 0.849299 6.97129 1.78513 6.97129H2.18231C2.43335 6.97129 2.63686 7.1748 2.63686 7.42584C2.63686 7.67688 2.43335 7.88038 2.18231 7.88038H1.78513Z"}),l.createElement("path",{d:"M2.89752 8.41507C2.89752 7.20553 3.87805 6.225 5.08759 6.225H6.91189C8.12143 6.225 9.10197 7.20553 9.10197 8.41507V9.20896C9.10197 9.45999 8.89846 9.6635 8.64742 9.6635C8.39638 9.6635 8.19288 9.45999 8.19288 9.20896V8.41507C8.19288 7.70761 7.61936 7.13409 6.91189 7.13409H5.08759C4.38013 7.13409 3.80661 7.70761 3.80661 8.41507V9.20896C3.80661 9.45999 3.60311 9.6635 3.35207 9.6635C3.10103 9.6635 2.89752 9.45999 2.89752 9.20896V8.41507Z"})),Ba=({props:e})=>l.createElement(o.A,Object.assign({component:xa},e)),Ta=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"slider-templates",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M0 1.82812C0 0.818477 0.818477 0 1.82812 0H7.73438C8.74401 0 9.5625 0.818477 9.5625 1.82812V4.50405C9.51598 4.50135 9.46907 4.5 9.42188 4.5H8.71875V1.82812C8.71875 1.28447 8.27803 0.84375 7.73438 0.84375H1.82812C1.28447 0.84375 0.84375 1.28447 0.84375 1.82812V8.29688C0.84375 8.84053 1.28447 9.28125 1.82812 9.28125H2.25V9.42188C2.25 9.66656 2.28677 9.9027 2.35507 10.125H1.82812C0.818483 10.125 0 9.30651 0 8.29688V1.82812ZM2.67188 1.6875C2.43888 1.6875 2.25 1.87638 2.25 2.10938C2.25 2.34237 2.43888 2.53125 2.67188 2.53125H6.89062C7.12361 2.53125 7.3125 2.34237 7.3125 2.10938C7.3125 1.87638 7.12361 1.6875 6.89062 1.6875H2.67188ZM3.375 3.51562C3.375 3.28263 3.56388 3.09375 3.79688 3.09375H6.89062C7.12361 3.09375 7.3125 3.28263 7.3125 3.51562C7.3125 3.74862 7.12361 3.9375 6.89062 3.9375H3.79688C3.56388 3.9375 3.375 3.74862 3.375 3.51562ZM2.8125 6.89062C2.8125 5.88099 3.63098 5.0625 4.64062 5.0625H9.42188C10.4315 5.0625 11.25 5.88099 11.25 6.89062V9.42188C11.25 10.4315 10.4315 11.25 9.42188 11.25H4.64062C3.63098 11.25 2.8125 10.4315 2.8125 9.42188V6.89062ZM4.64062 5.90625C4.35696 5.90625 4.10132 6.02623 3.92169 6.21821L7.03131 8.21723L10.1408 6.21821C9.9612 6.02623 9.70554 5.90625 9.42188 5.90625H4.64062ZM3.65625 9.42188C3.65625 9.96553 4.09697 10.4062 4.64062 10.4062H9.42188C9.96553 10.4062 10.4062 9.96553 10.4062 9.42188V7.05066L7.2594 9.07363C7.12046 9.16296 6.94209 9.16296 6.80316 9.07363L3.65625 7.05066V9.42188Z"})),Ra=({props:e})=>l.createElement(o.A,Object.assign({component:Ta},e)),Na=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"slider-blocks",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M5.81067 2.66667H8.82103C9.47215 2.66667 10 3.19453 10 3.84566V5.81065H9.21403V3.84566C9.21403 3.62862 9.03807 3.45267 8.82103 3.45267H5.81067V2.66667ZM3.45268 5.81065V8.82101C3.45268 9.03805 3.62863 9.21401 3.84568 9.21401H5.81067V10H3.84568C3.19454 10 2.66669 9.47213 2.66669 8.82101V5.81065H3.45268Z"}),l.createElement("path",{d:"M1 2.21875C1 1.54565 1.54565 1 2.21875 1H4.11458C4.78768 1 5.33333 1.54565 5.33333 2.21875V4.11458C5.33333 4.78768 4.78768 5.33333 4.11458 5.33333H2.21875C1.54565 5.33333 1 4.78768 1 4.11458V2.21875ZM2.21875 1.8125C1.99439 1.8125 1.8125 1.99439 1.8125 2.21875V4.11458C1.8125 4.33895 1.99439 4.52083 2.21875 4.52083H4.11458C4.33895 4.52083 4.52083 4.33895 4.52083 4.11458V2.21875C4.52083 1.99439 4.33895 1.8125 4.11458 1.8125H2.21875Z"}),l.createElement("path",{d:"M6.33334 7.53334C6.33334 6.87062 6.87062 6.33334 7.53334 6.33334H10.4667C11.1294 6.33334 11.6667 6.87062 11.6667 7.53334V10.4667C11.6667 11.1294 11.1294 11.6667 10.4667 11.6667H7.53334C6.87062 11.6667 6.33334 11.1294 6.33334 10.4667V7.53334ZM7.53334 7.13334C7.31244 7.13334 7.13334 7.31243 7.13334 7.53334V10.4667C7.13334 10.6876 7.31244 10.8667 7.53334 10.8667H10.4667C10.6876 10.8667 10.8667 10.6876 10.8667 10.4667V7.53334C10.8667 7.31243 10.6876 7.13334 10.4667 7.13334H7.53334Z"})),La=({props:e})=>l.createElement(o.A,Object.assign({component:Na},e)),Pa=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"slider-adaptive",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M2.11687 2.27574C2.29356 1.52741 2.95016 1 3.70508 1H8.96257C9.7175 1 10.3741 1.52741 10.5508 2.27574L11.6132 6.7753C11.9 7.98974 10.9973 9.1579 9.77217 9.1579H5.53398V8.34211H9.77217C10.4796 8.34211 11.0009 7.6675 10.8353 6.96625L9.77286 2.46668C9.68273 2.08488 9.34774 1.81579 8.96257 1.81579H3.70508C3.31992 1.81579 2.98492 2.08488 2.89477 2.46668L2.5348 3.99123H1.9334C1.85664 3.99123 1.78124 3.99724 1.70766 4.00883L2.11687 2.27574ZM5.52795 10.5175H9.13425C9.35521 10.5175 9.5343 10.3349 9.5343 10.1096C9.5343 9.88438 9.35521 9.70175 9.13425 9.70175H5.53398V10.3816C5.53398 10.4274 5.53195 10.4728 5.52795 10.5175ZM3.00031 7.25439C3.36855 7.25439 3.66707 6.95004 3.66707 6.57456C3.66707 6.19908 3.36855 5.89474 3.00031 5.89474C2.63206 5.89474 2.33354 6.19908 2.33354 6.57456C2.33354 6.95004 2.63206 7.25439 3.00031 7.25439ZM1 5.48684C1 4.9612 1.41793 4.53509 1.93348 4.53509H4.06713C4.58268 4.53509 5.00061 4.9612 5.00061 5.48684V10.3816C5.00061 10.9072 4.58268 11.3333 4.06713 11.3333H1.93347C1.41793 11.3333 1 10.9072 1 10.3816V5.48684ZM1.93348 5.35088C1.85982 5.35088 1.80012 5.41174 1.80012 5.48684V10.3816C1.80012 10.4567 1.85982 10.5175 1.93347 10.5175H4.06713C4.14078 10.5175 4.20049 10.4567 4.20049 10.3816V5.48684C4.20049 5.41174 4.14078 5.35088 4.06713 5.35088H1.93348Z"})),Ia=({props:e})=>l.createElement(o.A,Object.assign({component:Pa},e)),Ma=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"slider-magic",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M9.5568 0.653814C9.5243 0.522457 9.40639 0.430084 9.27106 0.430084C9.1357 0.430084 9.01779 0.522409 8.98532 0.653814L8.98496 0.655251L8.98325 0.661939C8.98166 0.668112 8.97917 0.677645 8.97579 0.690173C8.96902 0.715244 8.95873 0.752211 8.94502 0.798175C8.91751 0.890365 8.87665 1.0174 8.82339 1.1565C8.71241 1.44638 8.56387 1.74441 8.39728 1.91099C8.2307 2.07757 7.93268 2.22611 7.64279 2.33709C7.50369 2.39035 7.37666 2.43122 7.28447 2.45872C7.2385 2.47244 7.20154 2.48273 7.17647 2.48949C7.16394 2.49287 7.15441 2.49537 7.14823 2.49696L7.14154 2.49866L7.14018 2.49901C7.00883 2.53151 6.91638 2.64943 6.91638 2.78477C6.91638 2.92013 7.0087 3.03804 7.14011 3.07051L7.14154 3.07087L7.14823 3.07258C7.15441 3.07417 7.16394 3.07666 7.17647 3.08004C7.20154 3.0868 7.2385 3.0971 7.28447 3.11081C7.37666 3.13832 7.50369 3.17918 7.64279 3.23244C7.93268 3.34342 8.2307 3.49196 8.39728 3.65854C8.56387 3.82513 8.71241 4.12315 8.82339 4.41304C8.87665 4.55214 8.91751 4.67917 8.94502 4.77136C8.95873 4.81732 8.96902 4.85429 8.97579 4.87936C8.97917 4.89189 8.98166 4.90142 8.98325 4.9076L8.98496 4.91428L8.9853 4.91564C9.0178 5.047 9.13573 5.13945 9.27106 5.13945C9.40643 5.13945 9.52433 5.04713 9.5568 4.91572L9.55716 4.91428L9.55887 4.9076C9.56046 4.90142 9.56295 4.89189 9.56633 4.87936C9.5731 4.85429 9.58339 4.81732 9.59711 4.77136C9.62461 4.67917 9.66548 4.55214 9.71873 4.41304C9.82972 4.12315 9.97825 3.82513 10.1448 3.65854C10.3114 3.49196 10.6094 3.34342 10.8993 3.23244C11.0384 3.17918 11.1655 3.13832 11.2577 3.11081C11.3036 3.0971 11.3406 3.0868 11.3657 3.08004C11.3782 3.07666 11.3877 3.07417 11.3939 3.07258L11.4006 3.07087L11.4019 3.07053C11.5333 3.03803 11.6257 2.92011 11.6257 2.78477C11.6257 2.6494 11.5334 2.53149 11.402 2.49903L11.4006 2.49867L11.3939 2.49696C11.3877 2.49537 11.3782 2.49287 11.3657 2.48949C11.3406 2.48273 11.3036 2.47244 11.2577 2.45872C11.1655 2.43122 11.0384 2.39035 10.8993 2.33709C10.6094 2.22611 10.3114 2.07757 10.1448 1.91099C9.97825 1.74441 9.82972 1.44638 9.71873 1.1565C9.66548 1.0174 9.62461 0.890364 9.59711 0.798175C9.58339 0.752211 9.5731 0.715244 9.56633 0.690173C9.56295 0.677645 9.56046 0.668112 9.55887 0.661938L9.55716 0.655251L9.5568 0.653814ZM10.4426 2.78477C10.1928 2.67242 9.92218 2.52084 9.72859 2.32724C9.53499 2.13364 9.38341 1.86299 9.27106 1.61323C9.15872 1.86299 9.00714 2.13364 8.81354 2.32724C8.61994 2.52084 8.34928 2.67242 8.09952 2.78477C8.34928 2.89711 8.61994 3.04869 8.81354 3.24229C9.00714 3.43589 9.15872 3.70654 9.27106 3.95631C9.38341 3.70654 9.53499 3.43589 9.72859 3.24229C9.92218 3.04869 10.1928 2.89711 10.4426 2.78477Z"}),l.createElement("path",{d:"M9.90356 6.32335C9.87931 6.22534 9.79133 6.15641 9.69035 6.15641C9.58934 6.15641 9.50136 6.2253 9.47714 6.32335L9.47687 6.32442L9.47559 6.32942C9.47441 6.33402 9.47255 6.34114 9.47002 6.35048C9.46498 6.36919 9.45729 6.39677 9.44706 6.43107C9.42654 6.49986 9.39604 6.59465 9.35631 6.69845C9.27349 6.91475 9.16266 7.13713 9.03835 7.26143C8.91405 7.38574 8.69167 7.49657 8.47537 7.57939C8.37157 7.61912 8.27678 7.64962 8.20799 7.67014C8.17369 7.68037 8.14611 7.68806 8.1274 7.6931C8.11805 7.69563 8.11094 7.69749 8.10634 7.69867L8.10134 7.69995C8.00333 7.7242 7.93333 7.81245 7.93333 7.91343C7.93333 8.01444 8.00222 8.10242 8.10027 8.12665L8.10634 8.12819C8.11094 8.12938 8.11805 8.13124 8.1274 8.13376C8.14611 8.1388 8.17369 8.14649 8.20799 8.15672C8.27678 8.17724 8.37157 8.20774 8.47537 8.24748C8.69167 8.33029 8.91405 8.44113 9.03835 8.56543C9.16266 8.68973 9.27349 8.91211 9.35631 9.12842C9.39604 9.23221 9.42654 9.327 9.44706 9.39579C9.45729 9.43009 9.46498 9.45767 9.47002 9.47638C9.47255 9.48573 9.47441 9.49284 9.47559 9.49745L9.47687 9.50244C9.50112 9.60045 9.58937 9.67045 9.69035 9.67045C9.79136 9.67045 9.87934 9.60156 9.90356 9.50351L9.90383 9.50244L9.90511 9.49745C9.9063 9.49284 9.90815 9.48573 9.91068 9.47638C9.91572 9.45767 9.92341 9.43009 9.93364 9.39579C9.95416 9.327 9.98466 9.23221 10.0244 9.12842C10.1072 8.91211 10.218 8.68973 10.3423 8.56543C10.4666 8.44113 10.689 8.33029 10.9053 8.24748C11.0091 8.20774 11.1039 8.17724 11.1727 8.15672C11.207 8.14649 11.2346 8.1388 11.2533 8.13376C11.2626 8.13124 11.2698 8.12938 11.2744 8.12819L11.2794 8.12691C11.3774 8.10267 11.4474 8.01442 11.4474 7.91343C11.4474 7.81242 11.3785 7.72444 11.2804 7.70022L11.2794 7.69995L11.2744 7.69867C11.2698 7.69749 11.2626 7.69563 11.2533 7.6931C11.2346 7.68806 11.207 7.68037 11.1727 7.67014C11.1039 7.64962 11.0091 7.61912 10.9053 7.57939C10.689 7.49657 10.4666 7.38574 10.3423 7.26143C10.218 7.13713 10.1072 6.91475 10.0244 6.69845C9.98466 6.59465 9.95416 6.49986 9.93364 6.43107C9.92341 6.39677 9.91572 6.36919 9.91068 6.35048C9.90815 6.34114 9.9063 6.33402 9.90511 6.32941L9.90383 6.32442L9.90356 6.32335ZM10.5645 7.91343C10.3782 7.8296 10.1762 7.71649 10.0317 7.57203C9.88729 7.42757 9.77418 7.22562 9.69035 7.03925C9.60652 7.22562 9.49341 7.42757 9.34895 7.57203C9.20449 7.71649 9.00254 7.8296 8.81617 7.91343C9.00254 7.99726 9.20449 8.11037 9.34895 8.25483C9.49341 8.39929 9.60652 8.60124 9.69035 8.78761C9.77418 8.60124 9.88729 8.39929 10.0317 8.25483C10.1762 8.11037 10.3782 7.99726 10.5645 7.91343Z"}),l.createElement("path",{d:"M4.03008 0.707933C4.00583 0.609917 3.91785 0.54099 3.81687 0.54099C3.71586 0.54099 3.62788 0.609881 3.60365 0.707933L3.60338 0.709005L3.60211 0.713995C3.60092 0.718602 3.59906 0.725715 3.59654 0.735063C3.59149 0.753771 3.58381 0.781355 3.57358 0.815652C3.55305 0.884443 3.52256 0.979231 3.48282 1.08303C3.40001 1.29933 3.28917 1.52171 3.16487 1.64601C3.04057 1.77032 2.81819 1.88115 2.60188 1.96397C2.49809 2.0037 2.4033 2.0342 2.33451 2.05472C2.30021 2.06496 2.27263 2.07264 2.25392 2.07768C2.24457 2.08021 2.23746 2.08207 2.23285 2.08325L2.22786 2.08453C2.12984 2.10878 2.05984 2.19703 2.05984 2.29801C2.05984 2.39902 2.12874 2.487 2.22679 2.51123L2.22786 2.51149L2.23285 2.51277C2.23746 2.51396 2.24457 2.51582 2.25392 2.51834C2.27263 2.52338 2.30021 2.53107 2.33451 2.5413C2.4033 2.56182 2.49809 2.59232 2.60188 2.63206C2.81819 2.71487 3.04057 2.82571 3.16487 2.95001C3.28917 3.07431 3.40001 3.29669 3.48282 3.513C3.52256 3.61679 3.55305 3.71158 3.57358 3.78037C3.58381 3.81467 3.59149 3.84225 3.59654 3.86096C3.59906 3.87031 3.60092 3.87742 3.60211 3.88203L3.60338 3.88702C3.62763 3.98503 3.71588 4.05503 3.81687 4.05503C3.91787 4.05503 4.00585 3.98614 4.03008 3.88809L4.03035 3.88702L4.03162 3.88203C4.03281 3.87742 4.03467 3.87031 4.03719 3.86096C4.04224 3.84225 4.04992 3.81467 4.06015 3.78037C4.08068 3.71158 4.11117 3.61679 4.15091 3.513C4.23372 3.29669 4.34456 3.07431 4.46886 2.95001C4.59316 2.82571 4.81554 2.71487 5.03185 2.63206C5.13565 2.59232 5.23043 2.56182 5.29922 2.5413C5.33352 2.53107 5.36111 2.52338 5.37981 2.51834C5.38916 2.51582 5.39627 2.51396 5.40088 2.51277L5.40587 2.51149C5.5039 2.48725 5.57389 2.399 5.57389 2.29801C5.57389 2.197 5.505 2.10902 5.40694 2.0848L5.40587 2.08453L5.40088 2.08325C5.39627 2.08207 5.38916 2.08021 5.37981 2.07768C5.36111 2.07264 5.33352 2.06496 5.29922 2.05472C5.23043 2.0342 5.13565 2.0037 5.03185 1.96397C4.81554 1.88115 4.59316 1.77032 4.46886 1.64601C4.34456 1.52171 4.23372 1.29933 4.15091 1.08303C4.11117 0.979231 4.08068 0.884443 4.06015 0.815652C4.04992 0.781355 4.04224 0.753771 4.03719 0.735063C4.03467 0.725715 4.03281 0.718602 4.03162 0.713995L4.03035 0.709005L4.03008 0.707933ZM4.69105 2.29801C4.50468 2.21418 4.30272 2.10107 4.15826 1.95661C4.0138 1.81215 3.90069 1.6102 3.81687 1.42383C3.73304 1.6102 3.61993 1.81215 3.47547 1.95661C3.33101 2.10107 3.12905 2.21418 2.94268 2.29801C3.12905 2.38184 3.33101 2.49495 3.47547 2.63941C3.61993 2.78387 3.73304 2.98582 3.81687 3.17219C3.9007 2.98582 4.0138 2.78387 4.15826 2.63941C4.30272 2.49495 4.50468 2.38184 4.69105 2.29801Z"}),l.createElement("path",{d:"M5.68126 4.37775C5.81404 4.24497 6.02931 4.24497 6.16209 4.37775L7.5664 5.78206C7.69918 5.91484 7.69918 6.13011 7.5664 6.26289L2.55813 11.2712C2.15979 11.6695 1.51397 11.6695 1.11563 11.2712L0.672988 10.8285C0.274654 10.4302 0.274653 9.78436 0.672988 9.38602L5.68126 4.37775ZM4.89535 6.12532L1.15382 9.86686C1.02104 9.99964 1.02104 10.2149 1.15382 10.3477L1.59646 10.7903C1.72924 10.9231 1.94452 10.9231 2.0773 10.7903L5.81886 7.04877C5.76742 7.03245 5.72012 7.00397 5.68125 6.9651L4.9791 6.26295C4.93919 6.22303 4.91127 6.17566 4.89535 6.12532ZM5.92167 5.80121L5.70035 6.02253L5.92167 6.24385L6.14299 6.02253L5.92167 5.80121Z"})),Oa=({props:e})=>l.createElement(o.A,Object.assign({component:Ma},e)),Va=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"align-justify",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M0.75 2.22321H11.25C11.3089 2.22321 11.3571 2.175 11.3571 2.11607V1.36607C11.3571 1.30714 11.3089 1.25893 11.25 1.25893L0.75 1.25893C0.691071 1.25893 0.642857 1.30714 0.642857 1.36607V2.11607C0.642857 2.175 0.691071 2.22321 0.75 2.22321ZM11.25 7.90178C11.3089 7.90178 11.3571 7.85357 11.3571 7.79464V7.04464C11.3571 6.98571 11.3089 6.9375 11.25 6.9375H0.75C0.691071 6.9375 0.642857 6.98571 0.642857 7.04464V7.79464C0.642857 7.85357 0.691071 7.90178 0.75 7.90178H11.25ZM11.25 9.77678H0.749999C0.691071 9.77678 0.642857 9.825 0.642857 9.88393V10.6339C0.642857 10.6929 0.691071 10.7411 0.749999 10.7411H11.25C11.3089 10.7411 11.3571 10.6929 11.3571 10.6339V9.88393C11.3571 9.825 11.3089 9.77678 11.25 9.77678ZM11.25 4.09821H0.749999C0.691071 4.09821 0.642857 4.14643 0.642857 4.20536V4.95536C0.642857 5.01428 0.691071 5.0625 0.749999 5.0625H11.25C11.3089 5.0625 11.3571 5.01428 11.3571 4.95536V4.20536C11.3571 4.14643 11.3089 4.09821 11.25 4.09821Z"})),Fa=({props:e})=>l.createElement(o.A,Object.assign({component:Va},e)),Da=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"speed",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M5.09583 8.04167C5.32917 8.275 5.63055 8.38924 6 8.38438C6.36944 8.37952 6.64167 8.24584 6.81667 7.98334L10.0833 3.08334L5.18333 6.35C4.92083 6.525 4.78229 6.79236 4.76771 7.15209C4.75312 7.51181 4.8625 7.80834 5.09583 8.04167ZM6 1.33334C6.57361 1.33334 7.12535 1.41354 7.65521 1.57396C8.18507 1.73438 8.68333 1.975 9.15 2.29584L8.04167 2.99584C7.72083 2.83056 7.38785 2.7066 7.04271 2.62396C6.69757 2.54132 6.35 2.5 6 2.5C4.70694 2.5 3.6059 2.95452 2.69687 3.86354C1.78785 4.77257 1.33333 5.87361 1.33333 7.16667C1.33333 7.575 1.38924 7.97847 1.50104 8.37709C1.61285 8.7757 1.77083 9.15 1.975 9.5H10.025C10.2486 9.13056 10.4115 8.74653 10.5135 8.34792C10.6156 7.94931 10.6667 7.53611 10.6667 7.10834C10.6667 6.75834 10.6253 6.41806 10.5427 6.0875C10.4601 5.75695 10.3361 5.43611 10.1708 5.125L10.8708 4.01667C11.1625 4.47361 11.3934 4.95972 11.5635 5.475C11.7337 5.99028 11.8236 6.525 11.8333 7.07917C11.8431 7.63334 11.7799 8.1632 11.6437 8.66875C11.5076 9.17431 11.3083 9.65556 11.0458 10.1125C10.9389 10.2875 10.7931 10.4236 10.6083 10.5208C10.4236 10.6181 10.2292 10.6667 10.025 10.6667H1.975C1.77083 10.6667 1.57639 10.6181 1.39167 10.5208C1.20694 10.4236 1.06111 10.2875 0.954166 10.1125C0.701388 9.675 0.506944 9.21077 0.370833 8.71979C0.234722 8.22882 0.166666 7.71111 0.166666 7.16667C0.166666 6.35972 0.319791 5.60382 0.626041 4.89896C0.932291 4.1941 1.35035 3.57674 1.88021 3.04688C2.41007 2.51702 3.02986 2.09896 3.73958 1.79271C4.4493 1.48646 5.20278 1.33334 6 1.33334Z"})),Ha=({props:e})=>l.createElement(o.A,Object.assign({component:Da},e)),ja=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"replacer",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M8.08337 10V9.16663H9.58337C9.74721 9.16663 9.88538 9.11075 9.99788 8.999C10.1104 8.88717 10.1666 8.74863 10.1666 8.58338V7.41663C10.1666 7.10554 10.2597 6.82637 10.4459 6.57912C10.632 6.33196 10.8722 6.15975 11.1666 6.0625V5.9375C10.8722 5.84583 10.632 5.675 10.4459 5.425C10.2597 5.175 10.1666 4.89446 10.1666 4.58337V3.41663C10.1666 3.25138 10.1108 3.11283 9.999 3.001C9.88717 2.88925 9.74862 2.83337 9.58337 2.83337H8.08337V2H9.58337C9.97779 2 10.3125 2.13775 10.5875 2.41325C10.8625 2.68867 11 3.02313 11 3.41663V4.58337C11 4.74862 11.0559 4.88717 11.1678 4.999C11.2795 5.11075 11.418 5.16663 11.5834 5.16663H12V6.83338H11.5834C11.418 6.83338 11.2795 6.88925 11.1678 7.001C11.0559 7.11283 11 7.25138 11 7.41663V8.58338C11 8.97688 10.8623 9.31133 10.5868 9.58675C10.3113 9.86225 9.97687 10 9.58337 10H8.08337ZM2.41662 10C2.02221 10 1.6875 9.86225 1.4125 9.58675C1.1375 9.31133 1 8.97688 1 8.58338V7.41663C1 7.25138 0.944083 7.11283 0.83225 7.001C0.7205 6.88925 0.581958 6.83338 0.416625 6.83338H0V5.16663H0.416625C0.581958 5.16663 0.7205 5.11075 0.83225 4.999C0.944083 4.88717 1 4.74862 1 4.58337V3.41663C1 3.02313 1.13775 2.68867 1.41325 2.41325C1.68867 2.13775 2.02312 2 2.41662 2H3.91662V2.83337H2.41662C2.25279 2.83337 2.11463 2.88925 2.00213 3.001C1.88963 3.11283 1.83337 3.25138 1.83337 3.41663V4.58337C1.83337 4.89446 1.74029 5.175 1.55413 5.425C1.36804 5.675 1.12779 5.84583 0.833375 5.9375V6.0625C1.12779 6.15975 1.36804 6.33196 1.55413 6.57912C1.74029 6.82637 1.83337 7.10554 1.83337 7.41663V8.58338C1.83337 8.74863 1.88925 8.88717 2.001 8.999C2.11283 9.11075 2.25137 9.16663 2.41662 9.16663H3.91662V10H2.41662Z"}),l.createElement("path",{d:"M6.48214 7.88473V7.13473C6.48214 7.0758 6.43393 7.02759 6.375 7.02759H5.625C5.56607 7.02759 5.51786 7.0758 5.51786 7.13473V7.88473C5.51786 7.94366 5.56607 7.99187 5.625 7.99187H6.375C6.43393 7.99187 6.48214 7.94366 6.48214 7.88473ZM4.25893 7.88473V7.13473C4.25893 7.0758 4.21072 7.02759 4.15179 7.02759H3.40179C3.34286 7.02759 3.29464 7.0758 3.29464 7.13473V7.88473C3.29464 7.94366 3.34286 7.99187 3.40179 7.99187H4.15179C4.21072 7.99187 4.25893 7.94366 4.25893 7.88473ZM8.70536 7.88473V7.13473C8.70536 7.0758 8.65715 7.02759 8.59822 7.02759H7.84822C7.78929 7.02759 7.74107 7.0758 7.74107 7.13473V7.88473C7.74107 7.94366 7.78929 7.99187 7.84822 7.99187H8.59822C8.65715 7.99187 8.70536 7.94366 8.70536 7.88473Z"})),za=({props:e})=>l.createElement(o.A,Object.assign({component:ja},e)),Wa=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"editor-mode",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M1 7.14578V6.10422H5.07403V7.14578H1ZM1 4.59375V3.55203H7.38889V4.59375H1ZM1 2.04172V1H7.38889V2.04172H1ZM6 11V9.07812L9.06944 5.64062C9.15278 5.54688 9.24537 5.47917 9.34722 5.4375C9.44907 5.39583 9.55093 5.375 9.65278 5.375C9.76389 5.375 9.87037 5.39844 9.97222 5.44531C10.0741 5.49219 10.1667 5.5625 10.25 5.65625L10.7639 6.23438C10.8442 6.32812 10.9036 6.43229 10.9421 6.54688C10.9807 6.66146 11 6.77604 11 6.89062C11 7.00521 10.98 7.1224 10.9399 7.24219C10.8997 7.36198 10.8382 7.46875 10.7554 7.5625L7.70833 11H6ZM6.83333 10.0625H7.36111L9.04167 8.15625L8.79167 7.85938L8.52778 7.57812L6.83333 9.46875V10.0625ZM8.79167 7.85938L8.52778 7.57812L9.04167 8.15625L8.79167 7.85938Z"})),Ga=({props:e})=>l.createElement(o.A,Object.assign({component:Wa},e)),Ua=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"designer-mode",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M6 12C5.18 12 4.405 11.8425 3.675 11.5275C2.945 11.2125 2.3075 10.7825 1.7625 10.2375C1.2175 9.6925 0.7875 9.055 0.4725 8.325C0.1575 7.595 0 6.82 0 6C0 5.1567 0.16085 4.37005 0.48255 3.64005C0.80415 2.91005 1.24245 2.27505 1.79745 1.73505C2.35245 1.19505 3.00165 0.77085 3.74505 0.46245C4.48835 0.15415 5.28335 0 6.13005 0C6.92335 0 7.675 0.13415 8.385 0.40245C9.095 0.67085 9.7175 1.04255 10.2525 1.51755C10.7875 1.99255 11.2125 2.55585 11.5275 3.20745C11.8425 3.85915 12 4.57 12 5.34C12 6.4433 11.6733 7.3058 11.02 7.9275C10.3666 8.5492 9.52665 8.86005 8.50005 8.86005H7.38C7.23 8.86005 7.10585 8.91505 7.00755 9.02505C6.90915 9.13505 6.85995 9.2567 6.85995 9.39C6.85995 9.61 6.9333 9.82085 7.08 10.0225C7.2267 10.2241 7.30005 10.4566 7.30005 10.72C7.30005 11.14 7.1842 11.4584 6.9525 11.6749C6.7208 11.8916 6.4033 12 6 12ZM2.56995 6.46005C2.78995 6.46005 2.9783 6.3817 3.135 6.225C3.2917 6.0683 3.37005 5.87995 3.37005 5.65995C3.37005 5.43995 3.2917 5.25165 3.135 5.09505C2.9783 4.93835 2.78995 4.86 2.56995 4.86C2.34995 4.86 2.16165 4.93835 2.00505 5.09505C1.84835 5.25165 1.77 5.43995 1.77 5.65995C1.77 5.87995 1.84835 6.0683 2.00505 6.225C2.16165 6.3817 2.34995 6.46005 2.56995 6.46005ZM4.42995 3.96C4.64995 3.96 4.8383 3.88165 4.995 3.72495C5.1517 3.56835 5.23005 3.38005 5.23005 3.16005C5.23005 2.94005 5.1517 2.7517 4.995 2.595C4.8383 2.4383 4.64995 2.35995 4.42995 2.35995C4.20995 2.35995 4.02165 2.4383 3.86505 2.595C3.70835 2.7517 3.63 2.94005 3.63 3.16005C3.63 3.38005 3.70835 3.56835 3.86505 3.72495C4.02165 3.88165 4.20995 3.96 4.42995 3.96ZM7.57005 3.96C7.79005 3.96 7.97835 3.88165 8.13495 3.72495C8.29165 3.56835 8.37 3.38005 8.37 3.16005C8.37 2.94005 8.29165 2.7517 8.13495 2.595C7.97835 2.4383 7.79005 2.35995 7.57005 2.35995C7.35005 2.35995 7.1617 2.4383 7.005 2.595C6.8483 2.7517 6.76995 2.94005 6.76995 3.16005C6.76995 3.38005 6.8483 3.56835 7.005 3.72495C7.1617 3.88165 7.35005 3.96 7.57005 3.96ZM9.48 6.46005C9.7 6.46005 9.88835 6.3817 10.045 6.225C10.2016 6.0683 10.28 5.87995 10.28 5.65995C10.28 5.43995 10.2016 5.25165 10.045 5.09505C9.88835 4.93835 9.7 4.86 9.48 4.86C9.26 4.86 9.07165 4.93835 8.91495 5.09505C8.75835 5.25165 8.68005 5.43995 8.68005 5.65995C8.68005 5.87995 8.75835 6.0683 8.91495 6.225C9.07165 6.3817 9.26 6.46005 9.48 6.46005ZM6 11C6.1033 11 6.17915 10.9766 6.22755 10.93C6.27585 10.8833 6.3 10.8133 6.3 10.72C6.3 10.58 6.22665 10.4384 6.07995 10.295C5.93335 10.1517 5.86005 9.88 5.86005 9.48C5.86005 9.0333 6.00835 8.65165 6.30495 8.33505C6.60165 8.01835 6.97335 7.86 7.42005 7.86H8.50005C9.22665 7.86 9.82495 7.6475 10.295 7.2225C10.765 6.7975 11 6.17 11 5.34C11 4.0567 10.5125 3.01255 9.53745 2.20755C8.56245 1.40255 7.42665 1.00005 6.13005 1.00005C4.70335 1.00005 3.49165 1.48335 2.49495 2.44995C1.49835 3.41665 1.00005 4.6 1.00005 6C1.00005 7.3833 1.48755 8.56245 2.46255 9.53745C3.43755 10.5125 4.6167 11 6 11Z"})),qa=({props:e})=>l.createElement(o.A,Object.assign({component:Ua},e)),Za=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"clear-chat",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M0 9.5V8.33327H9.33333V9.5H0ZM1.33333 6.58327V5.41672H10.6667V6.58327H1.33333ZM2.66667 3.66672V2.5H12V3.66672H2.66667Z"})),Xa=({props:e})=>l.createElement(o.A,Object.assign({component:Za},e)),Ka=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"webhook",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M2.89995 11.7C2.10335 11.7 1.42085 11.4159 0.85245 10.8476C0.28415 10.2792 0 9.59665 0 8.80005C0 8.11005 0.20585 7.50755 0.61755 6.99255C1.02915 6.47755 1.55665 6.14335 2.20005 5.98995V7.035C1.85005 7.1683 1.56255 7.39495 1.33755 7.71495C1.11255 8.03495 1.00005 8.39665 1.00005 8.80005C1.00005 9.32665 1.18505 9.77495 1.55505 10.145C1.92505 10.515 2.37335 10.7 2.89995 10.7C3.42665 10.7 3.875 10.515 4.245 10.145C4.615 9.77495 4.8 9.32665 4.8 8.80005V8.29995H8.46495C8.54495 8.20995 8.6408 8.13745 8.7525 8.08245C8.8642 8.02745 8.98005 7.99995 9.10005 7.99995C9.32335 7.99995 9.5125 8.07745 9.6675 8.23245C9.8225 8.38745 9.9 8.57665 9.9 8.80005C9.9 9.01665 9.8225 9.20415 9.6675 9.36255C9.5125 9.52085 9.32335 9.6 9.10005 9.6C8.98005 9.6 8.8642 9.5725 8.7525 9.5175C8.6408 9.4625 8.54495 9.39 8.46495 9.3H5.76C5.62 9.99 5.28415 10.5625 4.75245 11.0175C4.22085 11.4725 3.60335 11.7 2.89995 11.7ZM9.10005 11.7C8.59335 11.7 8.12915 11.5809 7.70745 11.3426C7.28585 11.1042 6.94505 10.79 6.68505 10.4H8.08005C8.22665 10.5 8.38665 10.575 8.56005 10.625C8.73335 10.675 8.91335 10.7 9.10005 10.7C9.62665 10.7 10.075 10.515 10.445 10.145C10.815 9.77495 11 9.32665 11 8.80005C11 8.27335 10.815 7.825 10.445 7.455C10.075 7.085 9.62665 6.9 9.10005 6.9C8.90665 6.9 8.7283 6.92415 8.565 6.97245C8.4017 7.02085 8.24505 7.09335 8.09505 7.18995L6.195 3.99495C5.9917 3.95495 5.82505 3.8633 5.69505 3.72C5.56505 3.5767 5.50005 3.40335 5.50005 3.19995C5.50005 2.97665 5.5792 2.7875 5.7375 2.6325C5.8958 2.4775 6.0833 2.4 6.3 2.4C6.5233 2.4 6.71245 2.4775 6.86745 2.6325C7.02245 2.7875 7.09995 2.97665 7.09995 3.19995C7.09995 3.24335 7.0983 3.28255 7.095 3.31755C7.0917 3.35255 7.08005 3.4017 7.06005 3.465L8.52495 5.955C8.62495 5.935 8.72495 5.92085 8.82495 5.91255C8.92495 5.90415 9.01665 5.89995 9.10005 5.89995C9.90335 5.89995 10.5875 6.18245 11.1525 6.74745C11.7175 7.31245 12 7.99665 12 8.80005C12 9.59665 11.7175 10.2792 11.1525 10.8476C10.5875 11.4159 9.90335 11.7 9.10005 11.7ZM2.89995 9.6C2.68335 9.6 2.49585 9.52085 2.33745 9.36255C2.17915 9.20415 2.1 9.01665 2.1 8.80005C2.1 8.60665 2.165 8.4383 2.295 8.295C2.425 8.1517 2.58665 8.05505 2.77995 8.00505L4.36005 5.355C4.06335 5.0717 3.82915 4.74585 3.65745 4.37745C3.48585 4.00915 3.40005 3.61665 3.40005 3.19995C3.40005 2.39665 3.6842 1.7125 4.2525 1.1475C4.8208 0.582503 5.5033 0.300003 6.3 0.300003C7.0833 0.300003 7.7558 0.572503 8.3175 1.1175C8.8792 1.6625 9.17335 2.32335 9.19995 3.10005H8.20005C8.18005 2.59335 7.9867 2.16665 7.62 1.81995C7.2533 1.47335 6.8133 1.30005 6.3 1.30005C5.7733 1.30005 5.32495 1.48505 4.95495 1.85505C4.58495 2.22505 4.39995 2.67335 4.39995 3.19995C4.39995 3.62335 4.52495 4.00085 4.77495 4.33245C5.02495 4.66415 5.3433 4.89165 5.73 5.01495L3.645 8.52C3.665 8.5767 3.67915 8.6267 3.68745 8.67C3.69585 8.7133 3.70005 8.75665 3.70005 8.80005C3.70005 9.01665 3.62255 9.20415 3.46755 9.36255C3.31255 9.52085 3.12335 9.6 2.89995 9.6Z"})),Ya=({props:e})=>l.createElement(o.A,Object.assign({component:Ka},e)),$a=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"lock",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M1.5 12V4.5H3V3C3 2.175 3.29375 1.46875 3.88125 0.881251C4.46875 0.293751 5.175 0 6 0C6.825 0 7.53125 0.293751 8.11875 0.881251C8.70625 1.46875 9 2.175 9 3V4.5H10.5V12H1.5ZM4.5 4.5H7.5V3C7.5 2.575 7.35625 2.21875 7.06875 1.93125C6.78125 1.64375 6.425 1.5 6 1.5C5.575 1.5 5.21875 1.64375 4.93125 1.93125C4.64375 2.21875 4.5 2.575 4.5 3V4.5Z"})),Qa=({props:e})=>l.createElement(o.A,Object.assign({component:$a},e)),Ja=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"web",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M6 12C5.1667 12 4.38505 11.8425 3.65505 11.5275C2.92505 11.2125 2.2892 10.7842 1.7475 10.2425C1.2058 9.70085 0.77915 9.06335 0.46755 8.32995C0.15585 7.59665 0 6.81335 0 5.98005C0 5.14335 0.15585 4.3625 0.46755 3.6375C0.77915 2.9125 1.2058 2.27915 1.7475 1.73745C2.2892 1.19585 2.92505 0.77085 3.65505 0.46245C4.38505 0.15415 5.1667 0 6 0C6.8367 0 7.6192 0.15415 8.3475 0.46245C9.0758 0.77085 9.7108 1.19585 10.2525 1.73745C10.7942 2.27915 11.2209 2.9125 11.5325 3.6375C11.8442 4.3625 12 5.14335 12 5.98005C12 6.81335 11.8442 7.59665 11.5325 8.32995C11.2209 9.06335 10.7942 9.70085 10.2525 10.2425C9.7108 10.7842 9.0758 11.2125 8.3475 11.5275C7.6192 11.8425 6.8367 12 6 12ZM6 11.01C6.32 10.65 6.59 10.25 6.81 9.81C7.03 9.37 7.21 8.86335 7.35 8.29005H4.66005C4.79335 8.83665 4.97 9.33495 5.19 9.78495C5.41 10.235 5.68 10.6433 6 11.01ZM4.63005 10.81C4.40335 10.4466 4.2075 10.0591 4.0425 9.64755C3.8775 9.23585 3.74 8.78335 3.63 8.29005H1.54005C1.89005 8.93005 2.3042 9.4467 2.7825 9.84C3.2608 10.2333 3.87665 10.5566 4.63005 10.81ZM7.38 10.8C8.0467 10.5867 8.6442 10.265 9.1725 9.83505C9.7008 9.40505 10.13 8.89005 10.46 8.29005H8.38005C8.26335 8.77665 8.12415 9.2258 7.96245 9.6375C7.80085 10.0492 7.6067 10.4367 7.38 10.8ZM1.17 7.29H3.43995C3.40995 7.0433 3.3908 6.8158 3.3825 6.6075C3.3742 6.3992 3.37005 6.19005 3.37005 5.98005C3.37005 5.74335 3.37585 5.5275 3.38745 5.3325C3.39915 5.1375 3.42 4.92665 3.45 4.69995H1.17C1.1067 4.92665 1.06255 5.13585 1.03755 5.32755C1.01255 5.51915 1.00005 5.73665 1.00005 5.98005C1.00005 6.22335 1.01255 6.44585 1.03755 6.64755C1.06255 6.84915 1.1067 7.0633 1.17 7.29ZM4.45995 7.29H7.54995C7.58665 7.0167 7.61085 6.78255 7.62255 6.58755C7.63415 6.39255 7.63995 6.19005 7.63995 5.98005C7.63995 5.77665 7.63415 5.5808 7.62255 5.3925C7.61085 5.2042 7.58665 4.97335 7.54995 4.69995H4.45995C4.42335 4.97335 4.3992 5.2042 4.3875 5.3925C4.3758 5.5808 4.36995 5.77665 4.36995 5.98005C4.36995 6.19005 4.3758 6.39255 4.3875 6.58755C4.3992 6.78255 4.42335 7.0167 4.45995 7.29ZM8.55 7.29H10.83C10.8933 7.0633 10.9375 6.84915 10.9625 6.64755C10.9875 6.44585 11 6.22335 11 5.98005C11 5.73665 10.9875 5.51915 10.9625 5.32755C10.9375 5.13585 10.8933 4.92665 10.83 4.69995H8.56005C8.59005 4.99995 8.61085 5.24415 8.62245 5.43255C8.63415 5.62085 8.64 5.80335 8.64 5.98005C8.64 6.19665 8.6325 6.40245 8.6175 6.59745C8.6025 6.79245 8.58 7.0233 8.55 7.29ZM8.37 3.70005H10.46C10.1434 3.07335 9.72085 2.545 9.19245 2.115C8.66415 1.685 8.05665 1.37665 7.36995 1.18995C7.59665 1.54665 7.79085 1.9275 7.95255 2.3325C8.11415 2.7375 8.2533 3.19335 8.37 3.70005ZM4.66005 3.70005H7.36005C7.24665 3.20005 7.07165 2.72005 6.83505 2.26005C6.59835 1.80005 6.32 1.38335 6 1.00995C5.7 1.30995 5.445 1.67165 5.235 2.09505C5.025 2.51835 4.83335 3.05335 4.66005 3.70005ZM1.54005 3.70005H3.64005C3.74335 3.21335 3.87415 2.76915 4.03245 2.36745C4.19085 1.96585 4.3867 1.5767 4.62 1.2C3.9333 1.3867 3.3308 1.6917 2.8125 2.115C2.2942 2.5383 1.87005 3.06665 1.54005 3.70005Z"})),el=({props:e})=>l.createElement(o.A,Object.assign({component:Ja},e)),tl=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"acordion",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M1.5 10V9.16663H10.5V10H1.5ZM1.5 2.83337V2H10.5V2.83337H1.5ZM2.33337 7.90838C2.10837 7.90838 1.91321 7.82571 1.74788 7.66037C1.58263 7.49512 1.5 7.3 1.5 7.075V4.925C1.5 4.7 1.58263 4.50487 1.74788 4.33962C1.91321 4.17429 2.10837 4.09163 2.33337 4.09163H9.66663C9.89163 4.09163 10.0868 4.17429 10.2521 4.33962C10.4174 4.50487 10.5 4.7 10.5 4.925V7.075C10.5 7.3 10.4174 7.49512 10.2521 7.66037C10.0868 7.82571 9.89163 7.90838 9.66663 7.90838H2.33337ZM2.33337 7.075H9.66663V4.925H2.33337V7.075Z"})),al=({props:e})=>l.createElement(o.A,Object.assign({component:tl},e)),ll=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"carousel",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M0 7.73684V4.25716C0 3.96979 0.102474 3.72384 0.307421 3.51932C0.512263 3.31479 0.758579 3.21253 1.04637 3.21253C1.33426 3.21253 1.58 3.31479 1.78358 3.51932C1.98726 3.72384 2.08911 3.96979 2.08911 4.25716V7.73684C2.08911 8.02863 1.98663 8.27568 1.78168 8.478C1.57684 8.68021 1.33053 8.78132 1.04274 8.78132C0.754842 8.78132 0.509105 8.68021 0.305526 8.478C0.101842 8.27568 0 8.02863 0 7.73684ZM3.98384 10.1053C3.73616 10.1053 3.52242 10.0154 3.34263 9.83558C3.16284 9.65579 3.07295 9.44205 3.07295 9.19437V2.80563C3.07295 2.55795 3.16284 2.34421 3.34263 2.16442C3.52242 1.98463 3.73616 1.89474 3.98384 1.89474H8.01616C8.26384 1.89474 8.47758 1.98463 8.65737 2.16442C8.83716 2.34421 8.92705 2.55795 8.92705 2.80563V9.19437C8.92705 9.44205 8.83716 9.65579 8.65737 9.83558C8.47758 10.0154 8.26384 10.1053 8.01616 10.1053H3.98384ZM9.91089 7.73684V4.25716C9.91089 3.96979 10.0134 3.72384 10.2183 3.51932C10.4232 3.31479 10.6695 3.21253 10.9573 3.21253C11.2452 3.21253 11.4909 3.31479 11.6945 3.51932C11.8982 3.72384 12 3.96979 12 4.25716V7.73684C12 8.02863 11.8975 8.27568 11.6926 8.478C11.4877 8.68021 11.2414 8.78132 10.9536 8.78132C10.6657 8.78132 10.42 8.68021 10.2164 8.478C10.0127 8.27568 9.91089 8.02863 9.91089 7.73684ZM3.98384 9.38858H8.01616C8.07289 9.38858 8.11947 9.37037 8.15589 9.33395C8.19232 9.29753 8.21053 9.251 8.21053 9.19437V2.80563C8.21053 2.749 8.19232 2.70247 8.15589 2.66605C8.11947 2.62963 8.07289 2.61142 8.01616 2.61142H3.98384C3.92711 2.61142 3.88053 2.62963 3.84411 2.66605C3.80768 2.70247 3.78947 2.749 3.78947 2.80563V9.19437C3.78947 9.251 3.80768 9.29753 3.84411 9.33395C3.88053 9.37037 3.92711 9.38858 3.98384 9.38858Z"})),ol=({props:e})=>l.createElement(o.A,Object.assign({component:ll},e)),nl=()=>l.createElement("svg",{viewBox:"0 0 30 30",focusable:"false","data-icon":"reload",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M15.0625 24.6874C12.359 24.6874 10.0581 23.7467 8.1599 21.8653C6.26167 19.9839 5.31255 17.6955 5.31255 15V14.0239L3.00002 16.3365L1.68274 15.0192L6.25002 10.4519L10.8173 15.0192L9.50002 16.3365L7.18749 14.0239V15C7.18749 17.1714 7.95192 19.0164 9.48077 20.5348C11.0096 22.0533 12.8702 22.8125 15.0625 22.8125C15.5801 22.8125 16.0974 22.756 16.6142 22.643C17.131 22.5301 17.6354 22.3606 18.1274 22.1346L19.5336 23.5408C18.8301 23.919 18.1038 24.2047 17.3546 24.3978C16.6054 24.5909 15.8414 24.6874 15.0625 24.6874ZM23.75 19.548L19.1827 14.9808L20.5 13.6635L22.8126 15.976V15C22.8126 12.8285 22.0481 10.9835 20.5193 9.46509C18.9904 7.94666 17.1298 7.18744 14.9375 7.18744C14.4199 7.18744 13.9027 7.24393 13.3858 7.35691C12.869 7.46989 12.3646 7.63935 11.8726 7.86531L10.4664 6.45913C11.1699 6.08092 11.8963 5.79526 12.6455 5.60216C13.3947 5.40905 14.1587 5.3125 14.9375 5.3125C17.641 5.3125 19.9419 6.2532 21.8401 8.13459C23.7384 10.016 24.6875 12.3045 24.6875 15V15.976L27 13.6635L28.3173 14.9808L23.75 19.548Z"})),rl=({props:e})=>l.createElement(o.A,Object.assign({component:nl},e)),il=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"add-slide",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M6.49995 7.42005H7.5V5.50005H9.42V4.5H7.5V2.58H6.49995V4.5H4.57995V5.50005H6.49995V7.42005ZM3 10C2.73 10 2.49585 9.90085 2.29755 9.70245C2.09915 9.50415 1.99995 9.27 1.99995 9V1.00005C1.99995 0.73005 2.09915 0.49585 2.29755 0.29745C2.49585 0.0991503 2.73 0 3 0H11C11.27 0 11.5041 0.0991503 11.7025 0.29745C11.9008 0.49585 12 0.73005 12 1.00005V9C12 9.27 11.9008 9.50415 11.7025 9.70245C11.5041 9.90085 11.27 10 11 10H3ZM3 9H11V1.00005H3V9ZM1.00005 12C0.73005 12 0.49585 11.9008 0.29745 11.7025C0.09915 11.5041 0 11.27 0 11V1.99995H1.00005V11H10V12H1.00005Z"})),sl=({props:e})=>l.createElement(o.A,Object.assign({component:il},e)),dl=()=>l.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"amp",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l.createElement("path",{d:"M4.88673 10.454L8.74382 5.82959H6.04045L6.55631 1.75526L3.08385 6.7769H5.41199L4.88673 10.454ZM3.85613 12L4.49319 7.57736H1.54678L6.79632 0H7.58039L6.94954 5.02912H10.4532L4.64019 12H3.85613Z"})),ml=({props:e})=>l.createElement(o.A,Object.assign({component:dl},e)),cl=()=>l.createElement("svg",{width:"18",height:"19",viewBox:"0 0 18 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("rect",{x:"0.371338",y:"0.878906",width:"17.29",height:"17.29",rx:"8.645",fill:"white"}),l.createElement("path",{d:"M5.30034 14.1689L4.37134 13.2399L8.08734 9.52391L4.37134 5.80791L5.30034 4.87891L9.01634 8.59491L12.7323 4.87891L13.6613 5.80791L9.94534 9.52391L13.6613 13.2399L12.7323 14.1689L9.01634 10.4529L5.30034 14.1689Z",fill:"#1677FF"})),ul=({props:e})=>l.createElement(o.A,Object.assign({component:cl},e)),pl=()=>l.createElement("svg",{width:"18",height:"19",viewBox:"0 0 18 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("rect",{x:"0.371338",y:"0.878906",width:"17.29",height:"17.29",rx:"8.645",fill:"#1F1F1F"}),l.createElement("path",{d:"M5.30034 14.1689L4.37134 13.2399L8.08734 9.52391L4.37134 5.80791L5.30034 4.87891L9.01634 8.59491L12.7323 4.87891L13.6613 5.80791L9.94534 9.52391L13.6613 13.2399L12.7323 14.1689L9.01634 10.4529L5.30034 14.1689Z",fill:"white"})),gl=({props:e})=>l.createElement(o.A,Object.assign({component:pl},e)),bl=()=>l.createElement("svg",{width:"8",height:"13",viewBox:"0 0 8 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("path",{d:"M5.04156 6.58339L0.208313 1.75014L1.39156 0.566895L7.40831 6.58339L1.39156 12.6001L0.208313 11.4169L5.04156 6.58339Z",fill:"#545456"})),hl=({props:e})=>l.createElement(o.A,Object.assign({component:bl},e)),El=({icon:e,...t})=>{const a=(0,n.rD)();if(a.icons&&a.icons[e]){const o=a.icons[e].replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,"").replace(/<\/?(?:script|embed|object|frameset|frame|iframe|applet|meta)[^>]*>/gi,"").replace(/ on\w+="[^"]*"/g,"").replace(/ on\w+='[^']*'/g,"");return l.createElement(ka,Object.assign({svgString:o},t))}switch(e){case"AddSlide":return l.createElement(sl,{props:t});case"AMP":return l.createElement(ml,{props:t});case"ElementAccordion":return l.createElement(al,{props:t});case"Reload":return l.createElement(rl,{props:t});case"Web":return l.createElement(el,{props:t});case"Lock":return l.createElement(Qa,{props:t});case"DesignerMode":return l.createElement(qa,{props:t});case"EditorMode":return l.createElement(Ga,{props:t});case"ClearChat":return l.createElement(Xa,{props:t});case"Speed":return l.createElement(Ha,{props:t});case"Justify":return l.createElement(Fa,{props:t});case"Colorize":return l.createElement(wa,{props:t});case"Email":return l.createElement(Ca,{props:t});case"Table":return l.createElement(Aa,{props:t});case"Button":return l.createElement(va,{props:t});case"Group":return l.createElement(Ea,{props:t});case"Block":return l.createElement(ba,{props:t});case"Column":return l.createElement(pa,{props:t});case"Atom":return l.createElement(ca,{props:t});case"Styles":return l.createElement(c,{props:t});case"Close":return l.createElement(p,{props:t});case"Drop":return l.createElement(b,{props:t});case"DarkWhite":return l.createElement(E,{props:t});case"MinWidth":return l.createElement(v,{props:t});case"MaxWidth":return l.createElement(A,{props:t});case"BgPositionHorizontal":return l.createElement(C,{props:t});case"BgPositionVertical":return l.createElement(w,{props:t});case"UpTo":return l.createElement(x,{props:t});case"VerticalOffset":return l.createElement(T,{props:t});case"AlignHorizontalLeft":return l.createElement(N,{props:t});case"AlignHorizontalCenter":return l.createElement(P,{props:t});case"AlignHorizontalRight":return l.createElement(M,{props:t});case"AlignVerticalTop":return l.createElement(V,{props:t});case"AlignVerticalCenter":return l.createElement(D,{props:t});case"AlignVerticalBottom":return l.createElement(j,{props:t});case"MixedView":return l.createElement(W,{props:t});case"LandscapeView":return l.createElement(U,{props:t});case"PortraitView":return l.createElement(Z,{props:t});case"SquareView":return l.createElement(K,{props:t});case"PanelLeft":return l.createElement($,{props:t});case"Sun":return l.createElement(J,{props:t});case"Crescent":return l.createElement(te,{props:t});case"Vimeo":return l.createElement(le,{props:t});case"Image":return l.createElement(ne,{props:t});case"Blur":return l.createElement(ie,{props:t});case"ZoomOutMap":return l.createElement(de,{props:t});case"Paragraph":return l.createElement(ce,{props:t});case"ElementImage":return l.createElement(pe,{props:t});case"ElementImageAI":return l.createElement(be,{props:t});case"ElementText":return l.createElement(Ee,{props:t});case"ElementTitle":return l.createElement(ve,{props:t});case"ElementButton":return l.createElement(Ae,{props:t});case"ElementSpacer":return l.createElement(Ce,{props:t});case"ElementListUL":return l.createElement(we,{props:t});case"ElementListOL":return l.createElement(xe,{props:t});case"ElementDivider":return l.createElement(Te,{props:t});case"ElementSocial":return l.createElement(Ne,{props:t});case"ElementTable":return l.createElement(Pe,{props:t});case"ElementCountdown":return l.createElement(Me,{props:t});case"ElementVideo":return l.createElement(Ve,{props:t});case"ElementTextAI":return l.createElement(De,{props:t});case"ElementCarousel":return l.createElement(ol,{props:t});case"ElementForm":return l.createElement(je,{props:t});case"AI":return l.createElement(We,{props:t});case"Typograf":return l.createElement(Ue,{props:t});case"NewEmail":return l.createElement(Ze,{props:t});case"Import":return l.createElement(Ke,{props:t});case"generationAI":return l.createElement($e,{props:t});case"PaddingTopBottom":return l.createElement(Je,{props:t});case"PaddingLeftRight":return l.createElement(tt,{props:t});case"PaddingSwitcher":return l.createElement(lt,{props:t});case"PaddingTop":return l.createElement(nt,{props:t});case"PaddingBottom":return l.createElement(it,{props:t});case"PaddingLeft":return l.createElement(dt,{props:t});case"PaddingRight":return l.createElement(ct,{props:t});case"Code":return l.createElement(pt,{props:t});case"GoToParent":return l.createElement(bt,{props:t});case"UndoOutlined":return l.createElement(Et,{props:t});case"RedoOutlined":return l.createElement(vt,{props:t});case"HistoryOutlined":return l.createElement(At,{props:t});case"EyeOutlined":return l.createElement(Ct,{props:t});case"SendOutlined":return l.createElement(wt,{props:t});case"CheckCircleOutlined":return l.createElement(xt,{props:t});case"ShareAltOutlined":return l.createElement(Tt,{props:t});case"MobileOutlined":return l.createElement(Nt,{props:t});case"DesktopOutlined":return l.createElement(Pt,{props:t});case"PlusCircleOutlined":return l.createElement(Mt,{props:t});case"CommentOutlined":return l.createElement(Vt,{props:t});case"SettingOutlined":return l.createElement(Dt,{props:t});case"BorderOuterOutlined":return l.createElement(jt,{props:t});case"AppstoreAddOutlined":return l.createElement(Wt,{props:t});case"AppstoreOutlined":return l.createElement(Ut,{props:t});case"BuildOutlined":return l.createElement(Zt,{props:t});case"SearchOutlined":return l.createElement(Kt,{props:t});case"CloseOutlined":return l.createElement($t,{props:t});case"AddImage":return l.createElement(Jt,{props:t});case"MergeTags":return l.createElement(ta,{props:t});case"ArrowLeftOutlined":return l.createElement(d,{props:t});case"ChatGpt":return l.createElement(i,{props:t});case"LightMode":return l.createElement(la,{props:t});case"DarkMode":return l.createElement(na,{props:t});case"AutoMode":return l.createElement(ia,{props:t});case"EmailConfirmation":return l.createElement(da,{props:t});case"SliderGroup":return l.createElement(Ba,{props:t});case"SliderTemplates":return l.createElement(Ra,{props:t});case"SliderBlocks":return l.createElement(La,{props:t});case"SliderAdaptive":return l.createElement(Ia,{props:t});case"SliderMagic":return l.createElement(Oa,{props:t});case"Replacer":return l.createElement(za,{props:t});case"WebHook":return l.createElement(Ya,{props:t});case"CloseAll":return l.createElement(gl,{props:t});case"CloseTag":return l.createElement(ul,{props:t});case"GroupArrow":return l.createElement(hl,{props:t});default:return null}}},66079:(e,t,a)=>{"use strict";a.d(t,{A:()=>N});var l=a(98173),o=a(32656),n=a(26298),r=a.n(n);const i=JSON.parse('{"yG":"iframe.8aa10c4f52f0546dc847.html","l5":"iframe-eblock.8aa10c4f52f0546dc847.html"}');var s=a(86095),d=a(2604),m=a(62093),c=a(27941),u=a(98845),p=a(32947),g=a(81843),b=a(64909),h=a(47014),E=a(12543),f=a(76233),v=a(52919),y=a(37357),A=a(70687);function _(e,t){const{__:a}=(0,E.s9)(),o=(0,v.QC)(),n=(0,s.aD)(e),{error:r}=(0,b.hN)(),i=(0,l.useRef)(0),c=(0,l.useRef)(),u=(0,l.useRef)(!1),_=(0,d.d4)(h.C1),C=(0,l.useCallback)((e=>new Promise(((t,a)=>{const l=o.addListener(p.Ru.SANDBOX_READY,(()=>{l.dispose(),t()}));e&&setTimeout((()=>{l.dispose(),a("timeout")}))}))),[o]),S=(0,l.useCallback)((l=>{C(2e3).catch((e=>{})).finally((()=>{Promise.resolve().then((()=>{if(!u.current){if(++i.current){if(c.current){if(i.current<5){n.restoreSnapshot(c.current);for(let e=0;e<i.current;e++)n.undo()}}else c.current=n.createSnapshot();o.send(p.Ru.RELOAD)}setTimeout((()=>{if(0===--i.current){c.current=null;const o={past:n.getPast().slice(0,10),future:n.getFuture(),errorResolved:!u.current,text:e.getValue(),message:l.message,stack:l.stack,userId:null===_||void 0===_?void 0:_.id,entityId:null===t||void 0===t?void 0:t.id,entityType:document.location.pathname.indexOf("emails")>0?"email":"block"};r({id:"IFRAME_ERROR",data:o,message:a("Something went wrong")}),f.CJ.post("iframe_errors",o).catch((e=>{})),u.current=!1}}),2e3)}}))}))}),[n,e,r,null===_||void 0===_?void 0:_.id,null===t||void 0===t?void 0:t.id,a,C,o]);(0,m.A)(p.Ru.APPLICATION_DOMPARSER_ERROR,S),(0,l.useEffect)((()=>{let a=null,l=0;function n(e){const t=[];for(const{rangeOffset:a,rangeLength:l,text:o}of e.changes)t.push({range:{start:a,end:a+l},text:o});return t}let r=!1;const i=new y.j;return i.addDisposable((0,A.Og)(e,(e=>(async e=>{if(r)await o.sendAsync(p.Ru.SANDBOX_UPDATE_ENTITY,{edits:[n(e)],guid:t.renderGuid});else if(a)a.push(e);else{a=[e];do{const e=a.splice(0,a.length);await o.sendAsync(p.Ru.SANDBOX_UPDATE_ENTITY,{edits:e.map(n),guid:t.renderGuid})}while(a.length);a=null}})(e).catch((e=>{}))))),i.addDisposable(o.addListener(p.Ru.APPLICATION_UPDATE_ENTITY,(function({guid:a,edits:o,pushUndoStop:n}){if(e&&a===t.renderGuid)try{r=!0;const t=(0,g.yc)(),a=t.canUndo(e.uri),i=t.canRedo(e.uri),s=o.map((({text:t,range:a})=>{const l=e.getPositionAt(a.start),o=e.getPositionAt(a.end);return{text:t,range:{startColumn:l.column,startLineNumber:l.lineNumber,endColumn:o.column,endLineNumber:o.lineNumber}}}));n||a||i?e.pushEditOperations([],s,(()=>null)):e.applyEdits(s),!1!==n&&(l&&clearTimeout(l),l=setTimeout((()=>{e.pushStackElement(),l=0}),1e3))}finally{r=!1}}))),()=>{i.dispose(),l&&clearTimeout(l)}}),[e,o,t.renderGuid])}const C=Symbol("isIframeEvent");function S({children:e}){const[t,a]=(0,l.useState)(),[o,n]=(0,l.useState)(),[r,i]=(0,l.useState)(!1),s=(0,v.QC)();return(0,l.useEffect)((()=>{if(t){const e=s.addListener(p.Ru.APPLICATION_IFRAME_DRAG_EVENT,(e=>{if("drageleave"!==e.type&&"dragenter"!==e.type){const a=t.getBoundingClientRect(),l=e.clientX+a.x+window.scrollX,o=e.clientY+a.y+window.scrollY,n=document.elementFromPoint(l,o);if(n){const t=new DataTransfer,a=new DragEvent(e.type,{clientX:l,clientY:o,cancelable:!0,bubbles:!0,dataTransfer:t});a[C]=!0,n.dispatchEvent(a)}}}));return()=>e.dispose()}}),[s,t]),(0,l.useEffect)((()=>{const e=e=>{e[C]||i(!0)},t=e=>{e[C]||i(!1)};return window.addEventListener("dragstart",e),window.addEventListener("dragend",t),()=>{window.removeEventListener("dragstart",e),window.removeEventListener("dragend",t)}}),[o]),(0,l.useEffect)((()=>{const e=e=>{if(!e[C]){var t;const a=o.getBoundingClientRect();s.send(p.Ru.SANDBOX_DRAG_EVENT,{value:(null===(t=e.dataTransfer)||void 0===t?void 0:t.getData("Text"))||"",type:e.type,clientX:e.pageX-a.x-window.scrollX,clientY:e.pageY-a.y-window.scrollY})}};if(o)return o.addEventListener("dragenter",e),o.addEventListener("dragover",e),o.addEventListener("dragleave",e),o.addEventListener("drop",e),o.addEventListener("dragend",e),()=>{o.removeEventListener("dragenter",e),o.removeEventListener("dragover",e),o.removeEventListener("dragleave",e),o.removeEventListener("drop",e),o.removeEventListener("dragend",e)}}),[o,s]),l.createElement("div",{ref:a},r&&l.createElement("div",{ref:n,className:"iframe-provider"}),e)}var w=a(40120),k=a(95669);const{useToken:x}=w.A;var B=a(90614),T=a(15626);const R=(0,l.forwardRef)((({className:e,email:t,handlerSendPosition:n},g)=>{const b=(0,d.wA)(),f=(0,s.fn)(),y=(0,c.rD)(),A=(0,v.ur)(),C=(0,v.XW)(),w=(0,v.QC)(),R=(0,B._q)(T.AZ.ON_EMAIL_INIT_ID),[N,L]=(0,l.useState)(),P=(0,l.useCallback)((e=>{const a=window.localStorage.getItem(p.V0.em_color_scheme),l=matchMedia(p.F3).matches?p.nd:p.T,o=window.localStorage.getItem(p.V0.em_code_mode_settings)?JSON.parse(window.localStorage.getItem(p.V0.em_code_mode_settings)):null,r={operation:p.Ru.UPDATE_PREVIEW,versionId:(null===f||void 0===f?void 0:f.getVersionId())||0,theme:a&&"system"!==a?a:l,commonStyles:"string"===typeof(null===t||void 0===t?void 0:t.common_styles)&&null!==t&&void 0!==t&&t.common_styles.startsWith("{")&&"{}"!==t.common_styles?JSON.parse(t.common_styles):p.BD,pathEnabled:y.pathEnabled,copyPasteEnabled:y.copyPasteEnabled,saveBlockEnabled:y.saveBlockEnabled,editImageControlEnabled:y.editImageControlEnabled,codeMode:!!o&&!(!o.isCodeMode||"left"!==o.codeModeDirection&&"right"!==o.codeModeDirection),elementAIimageEnabled:y.elementAIimageEnabled,imageCenterStockEnabled:y.imageCenterStockEnabled,imageCenterGifEnabled:y.imageCenterGifEnabled,imageCenterEditorEnabled:y.imageCenterEditorEnabled,blocksAddPanelEnabled:y.blocksAddPanelEnabled,lockEditor:y.lockEditor,appName:"emailmaker"};L(e.target),A(e.target),g.current.resize(),C(r),n()}),[y,n,C,f,t.common_styles,g,L,A]);(0,l.useEffect)((()=>{w.isInited()&&C({operation:p.Ru.UPDATE_PREVIEW,lockEditor:y.lockEditor})}),[w,y.lockEditor]);const I=(0,l.useCallback)((e=>{var t;e.data.operation===p.Ru.SANDBOX_RESIZED&&(null===(t=g.current)||void 0===t||t.resize())}),[g]);(0,l.useEffect)((()=>{const e=R((()=>{g.current.resize()}));return()=>e.dispose()}),[g,R]),(0,l.useEffect)((()=>()=>{A()}),[A]);const M=(0,l.useCallback)((()=>new Promise((e=>{w.setTarget(void 0);const t=()=>{P({target:N}),e(),null===N||void 0===N||N.removeEventListener("load",t)};null===N||void 0===N||N.addEventListener("load",t)}))),[w,P,N]);(0,l.useEffect)((()=>{const e=w.addListenerAsync(p.Ru.RELOAD,M,Number.MAX_SAFE_INTEGER);return()=>e.dispose()}),[w,M]),(0,m.A)(I),(0,m.A)((()=>{var e;null===(e=g.current)||void 0===e||e.resize()}),p.Ru.SANDBOX_INITED),function(){const e=(0,v.QC)(),t=(0,d.d4)(h.C1),{__:a}=(0,E.s9)(),[o,n]=(0,l.useState)("");(0,l.useEffect)((()=>{if(t.locale!==o){const l=(0,p.QV)(a),o=e.onInit((()=>{e.send(p.Ru.SANDBOX_TRANSLATIONS,{name:t.locale,data:l}),n(t.locale)}));return()=>o.dispose()}}),[t.locale,o,n,a,e]),(0,l.useEffect)((()=>{const t=e.addListener(p.Ru.RELOAD,(()=>{n("")}));return()=>t.dispose()}),[n,e])}(),function(){const e=(0,v.QC)(),{token:t}=x(),[a,o]=(0,l.useState)();(0,l.useEffect)((()=>{if(!(0,k.b)(a,t)){const a=e.onInit((()=>{e.send(p.Ru.SANDBOX_SET_THEME_VARIABLES,t),o(t)}));return()=>a.dispose()}}),[t,a,o,e]),(0,l.useEffect)((()=>{const t=e.addListener(p.Ru.RELOAD,(()=>{o(void 0)}));return()=>t.dispose()}),[o,e])}(),(0,l.useEffect)((()=>{matchMedia(p.F3).addEventListener("change",(e=>{const t=window.localStorage.getItem(p.V0.em_color_scheme),a=e.matches?p.nd:p.T;C({operation:p.Ru.UPDATE_PREVIEW,theme:t||a})}))}),[C]),_(f,t),(0,l.useEffect)((()=>{const e=f.onDidChangeContent((()=>{g.current.resize()}));return()=>e.dispose()}),[f,g]);const O=(0,l.useCallback)((e=>{e.data.operation===p.Ru.APPLICATION_COMMON_STYLES_UPDATE&&b(u.GY.util.updateQueryData("getEmail",t.id,(t=>Object.assign(t,{common_styles:JSON.stringify(e.data.settings.commonStyles)}))))}),[b,t.id]);return(0,m.A)(O),l.createElement(S,null,l.createElement(o.A,{forwardRef:g,checkOrigin:!1,sandbox:"allow-top-navigation allow-scripts allow-popups allow-popups-to-escape-sandbox",className:r()("email-preview",{[e]:e}),width:"100%",minHeight:600,scrolling:"no",id:"email_iframe",allow:"clipboard-read; clipboard-write",src:(p.EW.isPlugin?`${a.p}iframe/`:"/iframe/")+(t.hasOwnProperty("type")?i.l5:i.yG),title:"Email content",onLoad:P}))}));R.defaultProps={className:null,email:null,handlerSendPosition:()=>{}};const N=R},19858:(e,t,a)=>{"use strict";a.d(t,{A:()=>yt});var l,o=a(98173),n=a(47555),r=a(71446),i=a(72570),s=a(37969),d=a(30150),m=a(79245),c=a(2604),u=a(12543),p=a(56605),g=a(58115),b=a(27499),h=a(48753),E=a(201),f=a(66964),v=a(8218),y=a(49823),A=a(64909),_=a(66711),C=a(94780),S=a(68984),w=a(65716);function k(){return k=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},k.apply(null,arguments)}function x({title:e,titleId:t,...a},n){return o.createElement("svg",k({fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14",ref:n,"aria-labelledby":t},a),e?o.createElement("title",{id:t},e):null,l||(l=o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.39 3.12h7.383c.242 0 .438.195.438.437v3.719a.437.437 0 0 1-.438.437H9.547v3.227a.437.437 0 0 1-.438.437H1.727a.437.437 0 0 1-.438-.437V7.22c0-.241.196-.437.438-.437h3.226V3.557c0-.242.196-.438.438-.438Zm.493 7.327h2.734V7.713H5.883v2.734Zm3.664-3.664h2.734V4.05H9.547v2.734Z",fill:"inherit"})))}const B=o.forwardRef(x);a.p;var T=a(54838),R=a(40277),N=a(27941);const L=()=>{document.querySelector(".blocks-search__blocks-wrapper")&&(document.querySelector(".blocks-search__blocks-wrapper").style.removeProperty("transition"),document.querySelector(".blocks-search__blocks-wrapper").style.opacity=0,document.querySelectorAll(".blocks-search__result-body").forEach((e=>e.style.removeProperty("height"))),setTimeout((()=>{document.querySelectorAll(".blocks-search__result-body").forEach((e=>{e.style.height=207*e.offsetHeight/660+"px"})),document.querySelector(".blocks-search__blocks-wrapper").style.transition="opacity 0.2s",document.querySelectorAll(".blocks-search__blocks-wrapper").forEach((e=>e.style.opacity=1))}),1500))};var P=a(32947);const I=async({blockTags:e,projectData:t,projectId:a,addTag:l,editProject:o,notification:n,__:r})=>{const i=`project_${a}`,s=(0,R._q)(t,P.YY),d=s.find((e=>e.name===i)),m=s||[];let c;if(d)c=d.id;else{const e=await l({name:i});if(e.error)throw n.fromError("FOLDER_CREATING_ERROR",i,e.error),new Error("\u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0442\u0435\u0433\u0430");{const t=await o({projectId:a,blocktags:e.data.id});if(t.error)throw n.fromError("BLOCK_CLONING_ERROR",(0,A.x_)(e.data),t.error),new Error("\u041e\u0448\u0438\u0431\u043a\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 \u043d\u043e\u0432\u044b\u043c \u0442\u0435\u0433\u043e\u043c");c=t.data.blocktags&&t.data.blocktags[0]}}const u=await(async({blockTags:e,projectTagsArray:t,addTag:a,parent:l,notification:o})=>{if(!e||0===e.length)return[];const n=e.map((e=>{const n=t.find((t=>t.name===e));return n?Promise.resolve(n.id):a({name:e,parent:l}).then((({error:t,data:a})=>400===(null===t||void 0===t?void 0:t.status)?t.data.data.term_id:a?a.id:t?(o.fromError("TAG_CREATING_ERROR",e,t),null):void 0))}));return(await Promise.all(n)).filter((e=>null!==e&&void 0!==e))})({blockTags:e,projectTagsArray:m,addTag:l,parent:c,notification:n});return{tagIds:u,projectTagsArray:m}},M=async({form:e,notification:t,__:a})=>{let l=!0;const o=await e.validateFields(),n=o.tags;return(null===n||void 0===n?void 0:n.length)>10&&(t.error({id:"BLOCK_TOO_MANY_TAGS_ERROR",data:(0,A.x_)(o),message:a("Maximum 10 tags available."),placement:"bottomRight"}),l=!1),{valid:l,values:o,blockTags:n}},O=async({block:e,form:t,projectId:a,htmlContent:l,values:n,tagIds:r,addBlock:i,editProject:s,notification:d,refetch:m,refetchBlocks:c,reloadBlockScreens:u,projectTagsArray:p,__:g,handleCloseModal:b})=>{const h=e?{title:e.blockTitle,project:e.projectId,html:e.htmlContent,type:e.blockType||"Other"}:{title:n.title,project:a,html:l||"",type:n.type||"Other"},E=await i({...h,blocktags:r.join(",")});if(E.error)throw d.error({id:"BLOCK_CREATING_ERROR",data:{title:h.title,html:h.html},innerException:E.error,message:o.createElement("div",{dangerouslySetInnerHTML:{__html:E.error.data.code}}),description:o.createElement("div",{dangerouslySetInnerHTML:{__html:E.error.data.message}}),placement:"bottomRight"}),t.resetFields(),b(),new Error("\u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u043b\u043e\u043a\u0430");e||(t.resetFields(),b());const f=p.map((e=>e.id)),v=new Set([...f,...r]);!e&&m&&m();const y=await s({projectId:a,blocktags:[...v].join(",")});return y.error?d.error({message:o.createElement("div",{dangerouslySetInnerHTML:{__html:y.error.data.code}}),description:o.createElement("div",{dangerouslySetInnerHTML:{__html:y.error.data.message}}),placement:"bottomRight"}):!e&&c&&(d.success({id:"BLOCK_CREATING_SUCCESS",data:(0,A.x_)(E.data),message:g("The block \u201c")+E.data.title+g("\u201d was successfully created."),placement:"bottomRight"}),c()),!e&&u&&u(),E.data},V=({isModalVisible:e,htmlContent:t,projectId:a,setIsShowAddAllBlocksModal:l,setIsShowAddAllBlocksModalForNewEmail:n})=>{const{__:r}=(0,u.s9)(),i=(0,c.wA)(),[m]=b.A.useForm(),[p,g]=(0,o.useState)([]),[k,x]=(0,S.pP)(),{data:V}=(0,S.h1)(),F=(0,A.hN)(),D=(0,N.rD)(),[H,j]=(0,o.useState)([]),{data:z,refetch:W}=(0,d.KC)(),{refetch:G}=(0,S.SB)({projectId:a,pageSize:1e3,page:1,tags:null,name:null,type:null,notEmbed:!0,order:"asc",orderby:"title"}),[U,q]=(0,S.Gr)(),[Z,X]=(0,w.OD)();(0,o.useEffect)((()=>{j((0,R._q)(z,P.YY).map((e=>({value:e.name}))))}),[z]),(0,o.useEffect)((()=>{if(V){const e=V.schema.properties.acf.properties.type.items.enum;let t=[];for(let a in e)t.push({label:r(P.jg[e[a]]),value:e[a]});g(t)}}),[V,r]);const K=()=>{i((0,T.Oo)())},Y=()=>{l(!0),n(!1),K()},$=async()=>{await(async e=>{const{block:t,form:a,projectData:l,projectId:o,addBlock:n,editProject:r,addTag:i,notification:s,__:d,handleCloseModal:m,htmlContent:c,refetch:u,refetchBlocks:p,reloadBlockScreens:g}=e;try{const{valid:e,values:b,blockTags:h}=await M({form:a,notification:s,__:d});if(!e)return;const{tagIds:E,projectTagsArray:f}=await I({blockTags:h,projectData:l,projectId:o,addTag:i,editProject:r,notification:s,__:d});await O({block:t,form:a,projectId:o,htmlContent:c,values:b,tagIds:E,addBlock:n,editProject:r,notification:s,refetch:u,refetchBlocks:p,reloadBlockScreens:g,projectTagsArray:f,__:d,handleCloseModal:m})}catch(b){}})({form:m,projectData:z,projectId:a,addBlock:k,editProject:Z,addTag:U,notification:F,__:r,handleCloseModal:K,htmlContent:t,refetch:W,refetchBlocks:G,reloadBlockScreens:L})};return o.createElement(h.A,{title:o.createElement("h2",null,r("Save to blocks in project")),className:"blocks-modal",open:e,onOk:()=>Y(),onCancel:K,centered:!0,footer:o.createElement("div",{style:{display:"flex",justifyContent:"space-between",padding:"8px 0"}},o.createElement(s.Ay,{key:"create-all-blocks",size:"large",onClick:Y},r("Save all blocks"),o.createElement(_.A,{style:{fontSize:"12px"}})),o.createElement(s.Ay,{key:"submit",size:"large",type:"primary",loading:x.isLoading,onClick:$},o.createElement(B,{className:"modal-new-block__icon-create"}),r("Save block")))},o.createElement(b.A,{form:m,layout:"vertical",name:"add_new_block_form",onFinish:$,initialValues:{title:"",type:"",tags:[]},autoComplete:"off",style:{padding:"10px 24px 0"}},o.createElement(E.A,{gutter:16},o.createElement(f.A,{span:12},o.createElement(b.A.Item,{label:r("Block name"),name:"title",rules:[{required:!0,message:r("Please input block name")}],style:{marginBottom:15}},o.createElement(v.A,{disabled:x.isLoading||q.isLoading||X.isLoading,size:"large",placeholder:r("Enter block name"),spellCheck:"false"}))),o.createElement(f.A,{span:12},o.createElement(b.A.Item,{label:r("Type"),name:"type",rules:[{required:!0,message:r("Please choose block type")}],style:{marginBottom:15}},o.createElement(y.A,{disabled:x.isLoading||q.isLoading||X.isLoading,size:"large",placeholder:r("Choose block type"),options:p})))),D.tagsEnabled&&o.createElement(b.A.Item,{label:r("Tags"),name:"tags"},o.createElement(y.A,{size:"large",mode:"tags",placeholder:r("Add some tags"),tooltip:{title:r("Tags help you find the block in the list."),icon:o.createElement(C.A,null)},disabled:x.isLoading||q.isLoading||X.isLoading,options:H}))))};var F=a(40120),D=a(49856),H=a(13785),j=a(59010),z=a(94674),W=a(78446),G=a(26298),U=a.n(G),q=a(79966),Z=a(38927),X=a(25488),K=a(47638),Y=a(40186),$=a(35076),Q=a(73195),J=a(47214),ee=a(33747),te=a(92419),ae=a(39415),le=a(61657),oe=a(15804),ne=a(53939),re=a(34981),ie=a(30560),se=a(99208),de=a(19504),me=a(72510),ce=a(80703),ue=a(52218),pe=a.n(ue),ge=a(98845),be=a(83027),he=a(62093),Ee=a(12741),fe=a(1047),ve=a(89613),ye=a(86095),Ae=a(90121),_e=a(90614),Ce=a(96734),Se=a(15626),we=a(13668);const ke="KEYBOARD",xe=(e,t,a,l,o=!0,n=.8,r)=>`${window.location.host.indexOf("localhost"),"https://scr.emcdn.ru"}/screenshot?delay=1000&width=800${r?"":"&fullPage=true"}&deviceScaleFactor=${n}&format=jpg&clearCache=${o}${l?`&cacheControl=true&cache-hash=${pe()(l)}`:""}&url=${encodeURIComponent(`https://app.emailmaker.ru/get${e}/${a}?secret_hash=${pe()(`${t}${a}${P.KI}`)}&raw=true`)}${r?`&selector=${r}`:""}`,Be=(e,t,a=!0,l=.8,o)=>{let n=`https://racs.rest/v3/file/${e}?resource=exportPngApi`;return`${window.location.host.indexOf("localhost"),"https://scr.emcdn.ru"}/screenshot?delay=1000&width=800${o?"":"&fullPage=true"}&deviceScaleFactor=${l}&format=jpg&clearCache=${a}${t?`&cacheControl=true&cache-hash=${pe()(t)}`:""}&url=${encodeURIComponent(`${n}`)}${o?`&selector=${o}`:""}`},Te=({email:e,isEditableRights:t,autoSaveEmailResult:a,disabled:l})=>{var n,r;let i=(0,c.wA)(),m=(0,d.Zp)();const{__:p,_x:g}=(0,u.s9)(),{projectId:b,emailId:h}=(0,d.g)(),E=(0,Ce.p)(),f=(0,A.hN)(),v=(0,N.rD)(),y=(0,ye.fn)(),_=(0,c.Pj)(),C=(0,c.d4)(fe.rY),S=(0,c.d4)(fe.UI),[k,x]=(0,o.useState)(!1),[B,T]=(0,o.useState)(null);(0,o.useEffect)((()=>{var e,t;null!==(e=window)&&void 0!==e&&null!==(t=e.navigator)&&void 0!==t&&t.userAgent.includes("Macintosh")&&T(!0)}),[]);const{data:L,refetch:I}=(0,w.fo)(+b,{skip:!+b}),{data:M,refetch:O}=(0,be.Jz)({parent:null===L||void 0===L||null===(n=L.folder)||void 0===n?void 0:n[0]},{skip:!P.EW.isPlugin||!(null!==L&&void 0!==L&&null!==(r=L.folder)&&void 0!==r&&r[0])}),[V]=(0,ge.Gr)(),[F]=(0,be.JI)(),[j,z]=(0,ge.dN)(),[W,G]=(0,ge.Kh)(),[U]=(0,w.OD)(),[q,Z]=(0,o.useState)(!1),[X,K]=(0,o.useState)(""),Y=`project_${b}`,$=L&&(0,R._q)(L,P.zh).find((e=>e.name===Y)),Q=L&&(0,R.HT)(L,P.zh),J=(0,_e.ml)(Se.AZ.BEFORE_SAVE_EMAIL),ee=(0,ve.u)(),te=(0,o.useCallback)((a=>{var l,o;if(!t&&e.lock&&X)return void f.error({id:"EMAIL_ACCESS_TO_LOCKED_ERROR",data:(0,A.Gy)(e),message:p("No access to edit the letter."),placement:"bottomRight"});if(((null===e||void 0===e||null===(l=e.tags)||void 0===l?void 0:l.length)||(null===(o=e.emailtags)||void 0===o?void 0:o.length))>10&&X)return void f.error({id:"EMAIL_TOO_MANY_TAGS_ERROR",data:(0,A.Gy)(e),message:p("Maximum 10 tags available."),placement:"bottomRight"});const n=async t=>{var l;const o=Object.entries(C).flatMap((([e,t])=>t.map((({value:t,label:a})=>({id:+t,name:a,parent:+e.split("_")[0]})))));let n=[];S.length&&S.forEach((e=>{n.push(...null===e||void 0===e?void 0:e.children.map((e=>({id:e.id,parentId:e.parent}))))}));const r=(null===(l=e.tags)||void 0===l?void 0:l.map((e=>{const a=null===Q||void 0===Q?void 0:Q.find((t=>t.name===e));return a?a.id:V({name:e,parent:t}).then((({error:t,data:a})=>{var l,o;return 400===(null===t||void 0===t?void 0:t.status)?null===t||void 0===t||null===(l=t.data)||void 0===l||null===(o=l.data)||void 0===o?void 0:o.term_id:a?a.id:void(t&&(f.fromError("TAG_CREATING_ERROR",e,t),Z(!1)))}))})))||[],s=(null===o||void 0===o?void 0:o.map((e=>{const t=null===n||void 0===n?void 0:n.find((t=>t.id===e.id));return t?t.id:F({name:e.name,parent:e.parent}).then((({error:t,data:a})=>{var l,o;return 400===(null===t||void 0===t?void 0:t.status)?null===t||void 0===t||null===(l=t.data)||void 0===l||null===(o=l.data)||void 0===o?void 0:o.term_id:a?a.id:void(t&&(f.fromError("GROUP_CREATING_ERROR",e,t),Z(!1)))}))})))||[],d=(e,l=null,o=null,n=[])=>{var r,s;const d=(null===(r=e.title)||void 0===r?void 0:r.trim())||(null===(s=e.subject)||void 0===s?void 0:s.trim())||p("Untitled email."),m=a=>{_.dispatch(be.kE.endpoints.getTags.initiate({parent:t})),!P.EW.isPlugin&&I&&I(),X&&(f.success({id:"EMAIL_SAVING_SUCCESS",message:p("The email was successfully saved."),data:(0,A.Gy)(e)}),Z(!1),!P.EW.isPlugin&&M&&O()),P.EW.isPlugin||fetch(xe(P.Tm,b,a.id,a.modified),{mode:"no-cors"}).then((()=>{}))},c=(0,R._q)(e,P.zh).filter((t=>(l||e.emailtags).includes(t.id))).map((e=>e.name));var u,g,h,v,C;if(e.isNew){if(G.status!==P.eG){const t=E.get(P.A9.em_folder);W({title:d,source:a,project:e.project,subject:e.subject,preheader:e.preheader,description:e.description,utm_parameters:{utm_source:e.utm_parameters.utm_source,utm_medium:e.utm_parameters.utm_medium,utm_campaign:e.utm_parameters.utm_campaign,utm_term:e.utm_parameters.utm_term,utm_content:e.utm_parameters.utm_content},html:(null===y||void 0===y?void 0:y.getValue())||"",parent_email:e.parent_email||P.iU,common_styles:e.common_styles||"",emailtags:l?l.join(","):e.emailtags,tags:c,group:o||e.group,is_template:e.is_template||!1,is_inited:e.is_inited,renderGuid:e.renderGuid,folder:t!==P.y2&&t}).then((({data:t,error:a})=>{a?(X&&f.fromError("EMAIL_CREATING_ERROR",{title:e.title,code:(null===y||void 0===y?void 0:y.getValue())||""},a),Z(!1)):(i((0,Ee.aY)(null)),m(t),E.remove(P.A9.em_folder))}))}}else z.status!==P.eG&&j({emailId:e.id,source:a,title:d,project:e.project,preheader:e.preheader,subject:e.subject,utm_parameters:{utm_source:null===(u=e.utm_parameters)||void 0===u?void 0:u.utm_source,utm_medium:null===(g=e.utm_parameters)||void 0===g?void 0:g.utm_medium,utm_campaign:null===(h=e.utm_parameters)||void 0===h?void 0:h.utm_campaign,utm_term:null===(v=e.utm_parameters)||void 0===v?void 0:v.utm_term,utm_content:null===(C=e.utm_parameters)||void 0===C?void 0:C.utm_content},description:e.description,html:(null===y||void 0===y?void 0:y.getValue())||"",common_styles:e.common_styles||"",emailtags:l||e.emailtags,tags:c,group:o||e.group,is_template:e.is_template||!1}).then((({error:t})=>{t?(X&&f.fromError("EMAIL_EDITING_ERROR",(0,A.Gy)(e),t),Z(!1)):m(e)}));ee({event:"save",action:a?"save_email":"auto_save_email",email_id:e.id,project_id:b})},m={...e};J.fire(m).finally((()=>{r.length||s.length?Promise.all(r).then((e=>{Promise.all(s).then((t=>{d(m,e,t,[])}))})):d(m,null,null,[])}))};Z(!0),$?n($.id):V({name:Y}).then((async({data:t,error:a})=>{if(a)f.fromError("FOLDER_CREATING_ERROR",Y,a),Z(!1);else{const{data:a,error:l}=await U({projectId:b,emailtags:t.id});l?(f.fromError("EMAIL_CLONING_ERROR",(0,A.Gy)(e),l),Z(!1)):a&&n(a.emailtags&&a.emailtags[0])}})).catch((e=>{}))}),[G.status,W,z.status,j,e,t,V,i,U,b,L,p,g,X,y,Q,J]);(0,Ae.D3)(we.Kp,(0,o.useCallback)((e=>te(e||"EXTERNAL")),[te]));const ae=(0,_e.ml)(Se.AZ.ON_NEXTBUTTON_CLICK_ID),le=(0,_e.ml)(Se.AZ.ON_SAVEBUTTON_CLICK_ID);(0,o.useEffect)((()=>{X&&(setTimeout((()=>te(X))),K(""))}),[X]);const oe=(0,o.useCallback)((e=>{(e.ctrlKey||e.metaKey)&&83===e.keyCode&&(e.preventDefault(),K(ke))}),[te]);(0,o.useEffect)((()=>(document.addEventListener("keydown",oe),()=>{document.removeEventListener("keydown",oe)})),[oe]);const ne=(0,o.useCallback)((e=>{const t=e.data.operation,a=e.data.action;t===P.Ru.APPLICATION_ACTION&&"save_email"===a&&K(ke)}),[te]);(0,he.A)(ne),(0,o.useEffect)((()=>{e.isNew&&G.isSuccess&&(Z(!0),i(ge.GY.util.upsertQueryData("getEmail",G.data.id,{...G.data,lock:e.lock,isAmp:e.isAmp,subject:e.subject,preheader:e.preheader,description:e.description,html:(null===y||void 0===y?void 0:y.getValue())||"",project:e.project,tags:e.tags,utm_parameters:e.utm_parameters,parent_email:e.parent_email,common_styles:e.common_styles,renderGuid:e.renderGuid,is_inited:e.is_inited,isNew:!1})).then((()=>{m(`/projects/${G.data.project}/emails/${G.data.id}`),Z(!1),X&&f.success({id:"EMAIL_SAVING_SUCCESS",message:p("The email was successfully saved."),data:(0,A.Gy)(e)})})))}),[m,i,G,e.isNew,p,g,X,y]);const re=(0,_e._q)(Se.AZ.ON_EMAIL_INIT_ID);(0,o.useEffect)((()=>{let e=0;const t=re((()=>{e=setTimeout((()=>x(!0)),1e4)}));return()=>{e&&clearTimeout(e),t.dispose()}}),[x,re]),(0,o.useEffect)((()=>{e.isNew&&!h&&k&&(te(),x(!1))}),[k,e,te,h]);const ie=z.isLoading||(null===U||void 0===U?void 0:U.isLoading)||G.isLoading||q||a&&a.isLoading,se=v.saveButtonEnabled&&o.createElement(H.A,{key:"save-button",title:p(B?"Save by \u2318S":"Save by Ctrl+S"),placement:"bottom"},o.createElement(s.Ay,{disabled:l,type:v.nextButtonEnabled?"default":"primary",block:"false",className:"em-analytics__email-save",loading:ie,icon:o.createElement(ce.A,null),onClick:async()=>{const t={...e,html:y.getValue()};try{!1!==await le.fire(t)&&K("SAVE_BUTTON")}catch(a){f.fromError("SAVE_BUTTON_CLICK_EVENT_ERROR",(0,A.Gy)(t),a,!0)}}},v.saveButtonText||p("Save"))),de=v.nextButtonEnabled&&o.createElement(s.Ay,{disabled:l,key:"next-button",type:"primary",block:"false",className:"em-analytics__email-save",icon:v.primaryCommandButtonIcon,loading:ie,onClick:async()=>{const t={...e,html:y.getValue()};try{!1!==await ae.fire(t)&&K("NEXT_BUTTON")}catch(a){f.fromError("NEXT_BUTTON_CLICK_EVENT_ERROR",(0,A.Gy)(t),a,!0)}}},v.nextButtonText||p("Continue"));return o.createElement(o.Fragment,null,v.saveButtonEnabled&&v.nextButtonEnabled?o.createElement(D.A,null,[se,de]):[se,de])};Te.defaultProps={email:null,isEditableRights:null};const Re=Te;var Ne=a(40409),Le=a(45271),Pe=a(8807),Ie=a(47014),Me=a(84572),Oe=a(23424),Ve=a(38251),Fe=a(30397),De=a(64706),He=a(92960),je=a(40835),ze=a(80223),We=a(23928),Ge=a(71854),Ue=a(22560);const qe=({email:e,autoSaveEmailResult:t,autoSaveBlockResult:a})=>{var l,n,i,m,p,g,b,h;const{__:E,_x:f}=(0,u.s9)(),v=(0,c.wA)(),[y]=(0,He.mI)(),[_]=(0,je.dS)();let C=(0,d.Zp)();const{owner:S,admin:w}=(0,ze.A)(),k=(0,c.d4)(Ie.C1),x=(0,c.d4)(Me.yN),{modal:B}=r.A.useApp(),L=(0,A.hN)(),{confirm:I}=B,M=(0,c.Pj)(),O=(0,Ce.p)(),V=(0,N.rD)(),{projectId:F}=(0,d.g)(),j=(0,_e.ml)(Se.AZ.ON_EMAIL_CLONE_ID),[z]=(0,Fe.N)(),G=(0,ve.u)(),[U,q]=(0,o.useState)(!0),[ce,ue]=(0,ge.Kh)(),[pe]=(0,Ve.ri)(),[he]=(0,Ve.cA)(),[Ee]=(0,De.m)(),{data:fe}=(0,d.KC)(),{data:Ae,refetch:we}=(0,be.Jz)({parent:null===fe||void 0===fe||null===(l=fe.folder)||void 0===l?void 0:l[0]},{skip:!(null!==fe&&void 0!==fe&&null!==(n=fe.folder)&&void 0!==n&&n[0])}),ke=(0,c.d4)(T.Wv);(0,o.useEffect)((()=>{ke.switched&&q(!1)}),[ke]);const xe=()=>null===e.title?E("New email title"):e.title,Te=(0,ye.fn)(),qe=(0,_e._q)(Se.AZ.ON_EMAIL_INIT_ID);(0,o.useEffect)((()=>{const e=qe((()=>{q(!1)}));return()=>e.dispose()}),[qe]);const Ze=(e,t=(null===Te||void 0===Te?void 0:Te.getValue())||"")=>pe({file:t,title:xe(),notification:L}).then((t=>{if(t.error)return L.error({message:o.createElement("div",{dangerouslySetInnerHTML:{__html:t.error.data.code}}),description:o.createElement("div",{dangerouslySetInnerHTML:{__html:t.error.data.message}}),placement:"bottomRight"}),Promise.reject();{let a=t.data;const l={id:a._id,...a};return e(l,(()=>he({id:l.id,notification:L})))}})),Xe=(e=1)=>((e=1)=>Ze(((t,a)=>({href:Be(t.id,void 0,!1,e),dispose:a}))))(e).then((({href:e,dispose:t})=>(0,We.SR)(e).finally(t))),Ke=async e=>{const t=e.querySelectorAll("[em-operation=exportAsPicture]"),a=new Map;for(let o=0,n=t.length;o<n;o++){const e=t[o];e.setAttribute("em-export-id",o),a.set(`[em-export-id='${o}']`,e)}if(a.size)try{const{data:t,dispose:o}=await((e,t,a=2)=>Ze(((t,l)=>({data:e.map((e=>({selector:e,href:Be(t.id,void 0,!1,a,e)}))),dispose:l})),t))([...a.keys()],(0,me.b6)(e),2);try{const l=t.map((async({href:t,selector:l},o)=>{const n=a.get(l);if("TD"===n.tagName){n.removeAttribute("style");for(const e of[...n.classList])e.startsWith("em-mob-")&&n.classList.remove(e)}const r=await(async(e,t)=>{var a;const l="string"===typeof e?null===(a=await y({url:e}))||void 0===a?void 0:a.data:e;if(t.split(".").length<2){const e=K.extension(l.type);e&&(t=`${t}.${e}`)}const o=new File([l],t.toLowerCase()),n=await _({user_id:k.id,folder:fe.id,file:o});var r,i,s;return n.error||400===(null===(r=n.data.data)||void 0===r?void 0:r.status)?"string"===typeof e?e:"":null===(i=n.data)||void 0===i||null===(s=i[0])||void 0===s?void 0:s.file_url})(t,`${o}-${n.tagName.toLowerCase()}.png`),i=parseInt(getComputedStyle(n).width);let s=new Image(i);s.setAttribute("border","0"),s.setAttribute("style",`display: block; width: 100%; max-width: ${i}px;`),s.alt="",s.src=r;const d=n.querySelector("a");if(d){const t=e.createElement("a");t.setAttribute("target","_blank"),t.setAttribute("href",d.getAttribute("href")),t.appendChild(s),s=t}if("TD"===n.tagName){const e=n.cloneNode();e.removeAttribute("em-operation"),e.appendChild(s),s=e}n.replaceWith(s)}));await Promise.all(l)}catch(l){}finally{o()}}catch(l){}},Ye=t=>{var a,l;if("0"===(null===fe||void 0===fe||null===(a=fe.limits)||void 0===a?void 0:a.preview_limit)&&F&&(null===k||void 0===k||null===(l=k.counters)||void 0===l?void 0:l.emails_counter)>2&&!t.querySelector(".em-powered-logo")){const a="https://emcdn.ru/emailmaker/powered.png",l="https%3A%2F%2Femailmaker.ru",o=`<a href="${`https://racs.rest/v3/link?app=emailmaker&project=${F}&email=${e.id}&link=${l}`}" target="_blank"><img src="https://racs.rest/v3/pixel/123.png?image=${a}&project=${F}&email=${e.id}" width="150" height="50" border="0" alt="" style="display: inline-block; width: 100%; max-width: 150px;"></a>`;t.querySelector("body > table:last-child > tbody:last-child > tr:last-child, body > div > table:last-child > tbody:last-child > tr:last-child")&&t.querySelector("body > table:last-child > tbody:last-child > tr:last-child, body > div > table:last-child > tbody:last-child > tr:last-child").insertAdjacentHTML("afterend",`<tr em="block" class="em-powered-logo">\n <td align="center" bgcolor="#FFFFFF">${o}</td>\n </tr>`)}return t},$e=t=>{G({event:"click",action:"export_email",export_type:"HTML"});const a=document.querySelector(".email-preview"),l=getComputedStyle(a);(0,We.PJ)(null===Te||void 0===Te?void 0:Te.getValue(),[l.width],e.utm_parameters,(async e=>{await Ke(e),Ye(e),await(0,Ue.e)(e,t)})).then((e=>{const t=new Blob([e],{type:"text/html;charset=utf-8"});(0,se.saveAs)(t,`${xe()}.html`)})).catch((e=>{}))},Qe=t=>{G({event:"click",action:"export_email",export_type:"Clipboard"});const a=document.querySelector(".email-preview"),l=getComputedStyle(a);(0,We.PJ)(null===Te||void 0===Te?void 0:Te.getValue(),[l.width],e.utm_parameters,(async e=>{await Ke(e),Ye(e),await(0,Ue.e)(e,t)})).then((e=>navigator.clipboard.writeText(e).then((function(){(0,R.wB)(E("The email has been copied to the clipboard."),L)})))).catch((e=>{}))},Je=e=>new Promise(((t,a)=>{fetch(e).then((e=>t(e.blob())),(()=>(e=>{const t=O.get(P.A9.em_token);return fetch(`https://app.emailmaker.ru/api/wp-json/cors-proxy/v1/get?url=${encodeURIComponent(e)}`,{headers:{authorization:`Bearer ${t}`}}).then((e=>e.blob()))})(e).then(t,a))).catch((()=>{}))})),et=t=>{G({event:"click",action:"export_email",export_type:"ZIP"});const a=document.querySelector(".email-preview"),l=getComputedStyle(a);(0,We.Mp)(null===Te||void 0===Te?void 0:Te.getValue(),[l.width],e.utm_parameters,Je,(async e=>{await Ke(e),Ye(e),await(0,Ue.e)(e,t)})).then((e=>(0,se.saveAs)(e,`${xe()}.zip`))).catch((e=>{}))},tt=()=>{e.isNew?(P.EW.isPlugin||C(`/projects/${fe.id}/emails`),(0,R.wB)(E("The draft of the email has been deleted."),L)):at(e,C)},at=(e,t)=>{I({maskClosable:!0,centered:!0,title:f("Are you sure to delete \u201c","email")+e.title+E("\u201d email?"),icon:o.createElement(Y.A,{style:{color:"#ff4d4f"}}),okText:E("Yes"),cancelText:E("No"),onOk:()=>((e,t)=>M.dispatch(ge.GY.endpoints.deleteEmail.initiate(e.id)).then((a=>{a.error&&(0,R.p6)(a,L),e.project&&!P.EW.isPlugin&&t(`/projects/${e.project}/emails`),(0,R.wB)(E("The email \u201c")+a.data.title+f("\u201d was successfully removed.","email"),L)})))(e,t)})},lt=()=>{(0,Ge.QM)("application/zip, message/rfc822, text/html",ot)},ot=async e=>{const t=e[0];try{v((0,T.M7)(!0));const e=await(0,Ge.q2)(t,(async(e,t)=>{try{const a=await(0,Ge.zn)(e,y);if(!a)return"string"===typeof e?e:"";const l=(0,Ge.Qm)(t,a.type,K),o=new File([a],l.toLowerCase()),n=await _({user_id:k.id,folder:fe.id,file:o});return(0,Ge.$K)(n,e)}catch(a){return"string"===typeof e?e:""}}),(e=>{e.title=e.title||(0,We.Ay)(t.name)[0]}));Te.setValue(e),v((0,T.M7)(!1))}catch(a){v((0,T.M7)(!1));const e=a instanceof Error?a.message:a;L.error({message:o.createElement("div",{dangerouslySetInnerHTML:{__html:e}}),placement:"bottomRight"})}G({event:"upload_file",action:"import_email"})};let nt=[];V.emailDropdownMenuClone&&nt.push({label:E("Clone"),icon:o.createElement($.A,{style:{fontSize:"16px"}}),key:"Clone",className:"em-analytics__email-clone",disabled:ue.isLoading,onClick:async()=>{if(e.isNew)L.warning({message:E("To create a copy, you need to save the email."),placement:"bottomRight"});else{var t,a,l,n,r;if((await j.fire(e)).some((e=>!1===e)))return;ce({title:(0,R.fq)(e.title),project:null===fe||void 0===fe?void 0:fe.id,description:e.description,html:(0,R.el)((null===Te||void 0===Te?void 0:Te.getValue())||"",e.title),parent_email:e.parent_email||P.iU,common_styles:e.common_styles||"",utm_parameters:{utm_source:null===(t=e.utm_parameters)||void 0===t?void 0:t.utm_source,utm_medium:null===(a=e.utm_parameters)||void 0===a?void 0:a.utm_medium,utm_campaign:null===(l=e.utm_parameters)||void 0===l?void 0:l.utm_campaign,utm_term:null===(n=e.utm_parameters)||void 0===n?void 0:n.utm_term,utm_content:null===(r=e.utm_parameters)||void 0===r?void 0:r.utm_content},emailtags:e.emailtags,folder:e.folder}).then((t=>{t.error?L.error({message:o.createElement("div",{dangerouslySetInnerHTML:{__html:t.error.data.code}}),description:o.createElement("div",{dangerouslySetInnerHTML:{__html:t.error.data.message}}),placement:"bottomRight"}):(C(`/projects/${fe.id}/emails/${t.data.id}`),L.success({message:E("The copy of email \u201c")+e.title+E("\u201d was successfully created."),placement:"bottomRight"}),Ae&&we())}))}}}),V.emailDropdownMenuImport&&nt.push({label:f("Import","verb"),icon:o.createElement(Q.A,{style:{fontSize:"16px"}}),key:"Import",className:"em-analytics__editor-page__import",onClick:()=>{G({event:"click",action:"import_email"}),lt()}}),(S||w||(null===(i=k.id)||void 0===i?void 0:i.toString())===(null===(m=e.author)||void 0===m?void 0:m.toString()))&&(V.emailDropdownMenuLock&&nt.push({label:o.createElement(Le.A,{key:"Lock",element:e}),icon:e.lock?o.createElement(J.A,{style:{fontSize:"16px"}}):o.createElement(W.A,{style:{fontSize:"16px"}}),disabled:e.isNew}),V.emailDropdownMenuRemove&&nt.push({label:E("Remove"),icon:o.createElement(Y.A,{style:{fontSize:"16px"}}),key:"Remove",className:"em-analytics__email-remove",style:{color:"#ff4d4f"},onClick:tt}));const rt=e.isAmp;let it=[];return V.exportHtmlEnabled&&it.push({key:"html",label:E("Code"),icon:o.createElement(ee.A,{style:{fontSize:"16px"}}),...rt?{children:[{key:"\u0441ode_html",label:E("AMP"),onClick:()=>$e("amp")},{key:"html_amp",label:E("HTML"),onClick:()=>$e("html")}]}:{onClick:()=>$e()}}),V.exportZipEnabled&&it.push({key:"zip",label:E("ZIP"),icon:o.createElement(te.A,{style:{fontSize:"16px"}}),...rt?{children:[{key:"zip_html",label:E("AMP"),onClick:()=>et("amp")},{key:"zip_amp",label:E("HTML"),onClick:()=>et("html")}]}:{onClick:()=>et()}}),V.exportClipboardEnabled&&it.push({key:"clipboard",label:E("Clipboard"),icon:o.createElement(ae.A,{style:{fontSize:"16px"}}),...rt?{children:[{key:"clipboard_html",label:E("AMP"),onClick:()=>Qe("amp")},{key:"clipboard_amp",label:E("HTML"),onClick:()=>Qe("html")}]}:{onClick:()=>Qe()}}),!P.EW.isPlugin&&V.exportWebHookEnabled&&it.push({key:"webhook",icon:o.createElement(Pe.A,{icon:"WebHook",style:{fontSize:"16px"}}),label:E("Webhook"),onClick:()=>{x.webhook?(G({event:"click",action:"export_email",export_type:"webhook"}),z({url:x.webhook,body:(0,X.E)(e,M)}).then((e=>{e.error?200===e.error.originalStatus?L.success({message:E("Success!"),description:E("Webhook successfully sent!"),placement:"bottomRight"}):L.error({message:o.createElement("div",{dangerouslySetInnerHTML:{__html:e.error.status}}),description:o.createElement("div",{dangerouslySetInnerHTML:{__html:e.error.error}}),placement:"bottomRight"}):L.success({message:E("Success!"),description:E("Webhook successfully sent!"),placement:"bottomRight"})}))):(v((0,Oe.YF)("webhooksettings")),v((0,Oe.qf)(P.lx.EDIT_PROJECT_MODAL)))}}),V.exportOutlookEnabled&&it.push({key:"outlook",icon:o.createElement(le.A,{style:{fontSize:"16px"}}),label:E("Outlook"),onClick:()=>(t=>{G({event:"click",action:"export_email",export_type:"Outlook"});const a=document.querySelector(".email-preview"),l=getComputedStyle(a),o=async(e,t)=>{if("amp"===t){for(const t of e.querySelectorAll(".em-amp-show-disabled"))t.remove();await(0,de.Sc)(e,{mappedTags:{script:"___script"}})}else if("html"===t){for(const t of e.querySelectorAll(".em-amp-show-only"))t.remove();(0,de.Km)(e,{mappedTags:{script:"___script"}})}await Ke(e),Ye(e)};(0,We.pH)(e.title,null===Te||void 0===Te?void 0:Te.getValue(),[l.width,l.height],e.utm_parameters,t?{"text/html;charset=utf-8":e=>o(e,"amp"),"text/x-amp-html;charset=utf-8":e=>o(e,"html")}:o).then((e=>{const t=new Blob([e],{type:"text/html;charset=utf-8"});(0,se.saveAs)(t,`${xe()}.eml`)})).catch((e=>{}))})(rt)}),V.exportPdfEnabled&&it.push({key:"pdf",icon:o.createElement(oe.A,{style:{fontSize:"16px"}}),label:E("PDF"),onClick:async()=>{const t=null===e||void 0===e?void 0:e.html;try{const e=await Ee({htmlContent:t,notification:L}).unwrap(),a=window.URL.createObjectURL(new Blob([e],{type:"application/pdf"})),l=document.createElement("a");l.href=a,l.setAttribute("download",`${xe()}.pdf`),document.body.appendChild(l),l.click(),document.body.removeChild(l),window.URL.revokeObjectURL(a)}catch(a){}}}),V.exportPngEnabled&&it.push({key:"img",icon:o.createElement(ne.A,{style:{fontSize:"16px"}}),label:E("PNG"),onClick:()=>Xe(1).then(We.gZ).then((e=>(0,se.saveAs)(e,`${xe()}.png`))).then(G({event:"click",action:"export_email",export_type:"Image"}))}),o.createElement(D.A,null,V.emailDropdownMenuEnabled?o.createElement(Z.A,{key:"Actions",arrow:{pointAtCenter:!0},placement:"bottom",menu:{items:nt}},o.createElement(s.Ay,{type:"default",block:!1,className:"email-page-header__btn email-page-header__btn_extra",onClick:()=>{}},o.createElement(re.A,null))):V.emailDropdownMenuImport&&o.createElement(H.A,{title:f("Import","verb"),placement:"bottom"},o.createElement(s.Ay,{className:"em-analytics__editor-page__import",type:"text",icon:o.createElement(Q.A,{style:{fontSize:20}}),onClick:()=>{G({event:"click",action:"import_email"}),lt()}})),V.emailExportEnabled&&o.createElement(Z.A,{key:"Export",arrow:{pointAtCenter:!0},placement:"bottom",menu:{items:it}},o.createElement(s.Ay,{key:"Export",className:"em-analytics__email-page__export",type:"default",icon:o.createElement(ie.A,null)},E("Export"))),!e.hasOwnProperty("type")&&o.createElement(Re,{disabled:U,autoSaveEmailResult:t,key:"Save",email:e,isEditableRights:S||w||(null===(p=k.id)||void 0===p?void 0:p.toString())===(null===(g=e.author)||void 0===g?void 0:g.toString())}),!!e.hasOwnProperty("type")&&o.createElement(Ne.A,{disabled:U,key:"Save",block:e,isEditableRights:S||w||(null===(b=k.id)||void 0===b?void 0:b.toString())===(null===(h=e.author)||void 0===h?void 0:h.toString()),autoSaveBlockResult:a}))};var Ze=a(35895),Xe=a(54125),Ke=a(52919),Ye=a(22536);const{useToken:$e}=F.A,Qe=({email:e,autoSaveEmailResult:t,isCollaborationEditor:a})=>{var l,n;const[r]=b.A.useForm(),{__:i}=(0,u.s9)();let m=(0,c.wA)(),p=(0,d.Zp)();const g=(0,c.d4)(Ie.C1),h=(0,Ke.QC)(),E=(0,d.KC)(),f=null===E||void 0===E?void 0:E.data,{owner:y,admin:A}=(0,ze.A)(),{token:_}=$e(),C=(0,N.rD)(),S=(0,o.useRef)(),w=(0,o.useRef)(),k=(0,o.useRef)(),x=(0,_e.ml)(Se.AZ.ON_PREVIOUSBUTTON_CLICK_ID),B=(0,c.d4)(T.yy),L=e.hasOwnProperty("type")?P.IE:P.Tm,I=(0,c.d4)(fe.qX),M=(0,c.d4)(Ye.qX),O=L===P.Tm?I:M,V=(0,c.d4)(T.Fv),[F,G]=(0,o.useState)(!1);(0,o.useEffect)((()=>{const e=!(null===O||void 0===O||!O.type)&&((null===O||void 0===O?void 0:O.type)===P.bV.TEXT||(null===O||void 0===O?void 0:O.type)===P.bV.LINK||O.type===P.bV.BUTTON)&&V&&"bottom"!==B;G(e),m((0,T.oF)(e))}),[O,B,V]);const Z=(0,o.useCallback)((()=>{var t;P.EW.isPlugin?x.fire(e):p(`/projects/${f.id}/emails?page=1&folder=${(null===(t=e.folder)||void 0===t?void 0:t[0])||P.y2}`)}),[p,x,e,null===f||void 0===f?void 0:f.id]),[X,K]=(0,o.useState)(),Y=(0,_e._q)(Se.AZ.WILL_EMAIL_INIT_ID),$=(0,_e._q)(Se.AZ.ON_EMAIL_INIT_ID);(0,o.useEffect)((()=>{const e=new R.jG;return e.addDisposable(Y((()=>K(!1)))),e.addDisposable($((e=>{K(!0);const t=r.getFieldValue("subject");e.subject&&e.subject!==t&&r.setFieldValue("subject",e.subject);const a=r.getFieldValue("preheader");e.preheader&&e.preheader!==a&&r.setFieldValue("preheader",e.preheader)}))),()=>e.dispose()}),[K,Y,$,r]);const Q=(0,o.useCallback)((t=>{const a=t.target.value.trim();e.isNew?m((0,Ee.TU)(a)):m((0,fe.HO)(a)),h.send(P.Ru.SANDBOX_SUBJECT_UPDATE,{value:a,guid:e.renderGuid})}),[h,e.renderGuid,m,e.isNew]),J=(0,_e._q)(Se.AZ.BEFORE_SAVE_EMAIL),ee=(0,o.useCallback)((async e=>{var t,a;const l=null===(t=w.current)||void 0===t?void 0:t.input;if(document.activeElement===l){const t=l.value.trim();t!==e.subject&&(e.subject=t,e.isNew?m((0,Ee.TU)(t)):m((0,fe.HO)(t)),await h.sendAsync(P.Ru.SANDBOX_SUBJECT_UPDATE,{value:t,guid:e.renderGuid}))}const o=null===(a=k.current)||void 0===a?void 0:a.input;if(document.activeElement===o){const t=o.value.trim();t!==e.preheader&&(e.preheader=t,e.isNew?m((0,Ee.x3)(t)):m((0,fe.pl)(t)),await h.sendAsync(P.Ru.SANDBOX_PREHEADER_UPDATE,{value:t,guid:e.renderGuid}))}}),[h,m]);(0,o.useEffect)((()=>{const e=J(ee);return()=>e.dispose()}),[J,ee]);const te=(0,o.useCallback)((t=>{const a=t.target.value.trim();e.isNew?m((0,Ee.x3)(a)):m((0,fe.pl)(a)),h.send(P.Ru.SANDBOX_PREHEADER_UPDATE,{value:a,guid:e.renderGuid})}),[h,e.renderGuid,m,e.isNew]),ae=e.isNew;(0,o.useEffect)((()=>{const t=new R.jG;return t.addDisposable(h.addListenerAsync(P.Ru.APPLICATION_SUBJECT_UPDATE,(({guid:t,value:a})=>{t===e.renderGuid&&(r.setFieldValue("subject",a),m(ae?(0,Ee.TU)(a):(0,fe.HO)(a)))}))),t.addDisposable(h.addListenerAsync(P.Ru.APPLICATION_PREHEADER_UPDATE,(({guid:t,value:a})=>{t===e.renderGuid&&(r.setFieldValue("preheader",a),m(ae?(0,Ee.x3)(a):(0,fe.pl)(a)))}))),()=>t.dispose()}),[h,m,ae,r,e.renderGuid]),(0,Xe.A)(null===e.title?i("New email title"):e.title);const le=o.createElement(o.Fragment,null,o.createElement(D.A,{ref:S,size:10},C.headerArrowBackVisible&&o.createElement(H.A,{title:i("Back"),placement:"left"},o.createElement(s.Ay,{type:"text",icon:o.createElement(Pe.A,{icon:"ArrowLeftOutlined"}),onClick:Z,shape:"circle"})),o.createElement("div",null,(C.headerTitleVisible||C.headerPreheaderVisible)&&o.createElement(b.A,{form:r,layout:"vertical",name:"subject_preheader_form",autoComplete:"off",initialValues:{subject:"",preheader:""}},C.headerTitleVisible&&o.createElement("div",{style:{marginTop:X?-3:0}},o.createElement(D.A,{style:{width:"100%"},align:"baseline",size:12},o.createElement("div",{className:"subject_preheader_form__title"},i("Subject")),X?o.createElement(b.A.Item,{name:"subject",style:{marginBottom:0}},o.createElement(v.A,{bordered:!1,ref:w,placeholder:i("Enter subject line here"),className:"ant-page-header-heading-title",onPressEnter:Q,onBlur:Q})):o.createElement(j.A.Input,{active:!0,size:16,style:{width:"40%",marginTop:3}}))),C.headerPreheaderVisible&&o.createElement("div",null,o.createElement(D.A,{style:{width:"100%"},align:"baseline",size:12},o.createElement("div",{className:"subject_preheader_form__title"},i("Preheader")),X?o.createElement(b.A.Item,{name:"preheader",style:{marginBottom:0}},o.createElement(v.A,{ref:k,bordered:!1,placeholder:i("Enter preheader here"),className:"ant-page-header-heading-preheader",onPressEnter:te,onBlur:te})):o.createElement(j.A.Input,{active:!0,size:16,style:{width:"80%",marginTop:2}}))))))),oe=o.createElement(o.Fragment,null,C.emailIdShow&&!!e.id&&o.createElement(o.Fragment,null,o.createElement("div",{className:"email-page-header__email-id"},"ID"+e.id),o.createElement(z.A,{type:"vertical"})),o.createElement(q.A,{emailElement:e,isCollaborationEditor:a}),C.commandButtonsEnabled&&o.createElement(o.Fragment,null,e.lock?o.createElement(W.A,{key:"Lock",className:U()("lock-icon",{"lock-icon__disabled":!(y||A||(null===(l=g.id)||void 0===l?void 0:l.toString())===(null===(n=e.author)||void 0===n?void 0:n.toString()))}),style:{color:_.colorPrimary,fontSize:"16px"}}):null,o.createElement(qe,{key:"Buttons",email:e,autoSaveEmailResult:t,isHeaderCodeMenuOpen:F})));return o.createElement(Ze.A,{className:"email-pane__header",leftBlock:le,rightBlock:oe,isHeaderCodeMenuOpen:F})};var Je=a(98447),et=a(18987),tt=a(3792),at=a(12352);const lt=["Menu","Header","Content","Banners","Lists","Buttons","Promocodes","Feature","Call to Action","E-Commerce","Articles","Polls","Applications","Separators","Contacts","Footer","Other"];async function ot(e,t,a,l){const o={blocks:l,types:lt,locale:t};a.current=o;try{const e=await async function(){return P.EW.isPlugin?await tt.di.getInstance(null,at.Y):et.A.get(P.A9.em_token)||null}(),t=await fetch("https://app.emailmaker.ru/api/wp-json/ai-generator/v1/identificate_blocks",{method:"POST",headers:{"Content-Type":"application/json",...e?{Authorization:`Bearer ${e}`}:{}},body:JSON.stringify(o)});if(!t.ok||200!==t.status)throw new Error(`${t.statusText}`);return await t.json()}catch(n){throw n}}const nt=(e,t="block",a=!1)=>{if(null===e||void 0===e||!e.html)return[];const{document:l,blockElements:o,styleElement:n,linksElements:r}=((e,t="block")=>{const a=new DOMParser,l=a.parseFromString(e,"text/html"),o=l.querySelectorAll(`[em="${t}"]`),n=l.querySelectorAll("link"),r=l.querySelector('[em="styles"]');return{parser:a,document:l,blockElements:o,styleElement:r,linksElements:n}})(e.html,t),i=function(e){return Array.from(e).map((e=>e.outerHTML)).join("")}(r);if(!(o instanceof NodeList))return[];const s=l.querySelector("head"),d=s?s.innerHTML:"";return Array.from(o).map(((t,l)=>{if(!(t instanceof Element)||!t.outerHTML)return null;const o=n?n.outerHTML:"";return{id:`${e.id}-${l}`,html:a?`<!DOCTYPE html>\n <html>\n <head>${d}</head>\n <body>\n <table>${t.outerHTML}</table>\n </body>\n </html>`:(r=`${i}${o}${t.outerHTML.replace(/class="em-structure"/,'class=""')}`,r.replace(/\s+/g," ").replace(/> </g,"><").replace(/\s+>/g,">").replace(/<\!--[\s\S]*?-->/g,"").trim())};var r})).filter(Boolean)};const rt=e=>e.replace(/<div\s+[^>]*style="font-family:[^>]*>(.*?)<\/div>/gs,(e=>e.replace(/>(.*?)<\/div>/s,"></div>"))),it=e=>e.replace(/src="[^"]*"/g,'src=""'),st=async e=>{const{block:t,form:a,projectData:l,projectId:o,addBlock:n,editProject:r,addTag:i,notification:s,__:d,handleCloseModal:m,htmlContent:c,refetch:u,refetchBlocks:p,reloadBlockScreens:g,values:b,tagIds:h,projectTagsArray:E}=e;try{await O({block:t,form:a,projectId:o,htmlContent:c,values:b,tagIds:h,addBlock:n,editProject:r,notification:s,refetch:u,refetchBlocks:p,reloadBlockScreens:g,projectTagsArray:E,__:d,handleCloseModal:m})}catch(f){throw f}},dt=({isModalVisible:e,currentEmail:t,setIsShowAddAllBlocksModal:a,setTriggerOpenSavedBlocksTab:l,projectId:n})=>{const{__:r}=(0,u.s9)(),{data:i,refetch:m}=(0,d.KC)(),[p,g]=(0,o.useState)(!1),[E]=b.A.useForm(),[f,v]=(0,o.useState)([]),[_,C]=(0,o.useState)([]),k=(0,o.useRef)({}),[x]=(0,S.Gr)(),[B]=(0,w.OD)(),[T,N]=(0,S.pP)(),O=(0,c.d4)(Ie.B)||(P.EW.isPlugin?void 0:"ru_RU"),V=(e=>{const t=new Set,a=[];for(const o of e)if(l=o.html,/<div\s+[^>]*style="font-family:/i.test(l)){const e=it(rt(o.html));t.has(e)||(t.add(e),a.push(o))}else a.push(o);var l;return a})(nt(t)).map((e=>e)),F=V.length,D=(0,A.hN)(),H=()=>{p||z||a(!1)},{bulkSave:j,confirmSavingBlocksLoading:z}=(({projectData:e,addTag:t,addBlock:a,editProject:l,refetch:n,reloadBlockScreens:r,notification:i,__:s,handleCloseModal:d,setTriggerOpenSavedBlocksTab:m,setTagsOptions:c,form:u,projectId:p})=>{const[g,b]=(0,o.useState)(!1);return(0,o.useEffect)((()=>{c((0,R._q)(e,P.YY).map((e=>({value:e.name}))))}),[e]),{bulkSave:async(o,c,g,h)=>{b(!0);try{if(!c)return;const{tagIds:b,projectTagsArray:f}=await I({blockTags:h,projectData:e,projectId:p,addTag:t,editProject:l,notification:i,__:s});let v=!0,y=0;for(const n of o)try{await st({block:n,form:u,projectData:e,projectId:p,addBlock:a,editProject:l,addTag:t,notification:i,__:s,handleCloseModal:d,values:g,tagIds:b,projectTagsArray:f})}catch(E){v=!1,y++}if(v&&i.success({id:"BULK_SAVE_SUCCESS",message:s("All blocks saved successfully."),placement:"bottomRight"}),!v){if(y===o.length)throw new Error;i.warning({id:"BULK_SAVE_PARTIAL_SUCCESS",message:s("Some blocks were not saved successfully."),placement:"bottomRight"})}m(!0),n(),r()}catch(E){throw E}finally{b(!1),u.resetFields(),d()}},confirmSavingBlocksLoading:g}})({projectData:i,addTag:x,addBlock:T,editProject:B,refetch:m,reloadBlockScreens:L,notification:D,__:r,handleCloseModal:H,setTriggerOpenSavedBlocksTab:l,setTagsOptions:C,form:E,projectId:n}),W=async()=>{try{const{valid:e,values:a,blockTags:o}=await M({form:E,notification:D,__:r});l(!1),g(!0);const n=function(e,t,a){const{images:l}=e,{blocks:o}=t;return null===l||void 0===l?void 0:l.map((e=>{const t=o.find((t=>t.id===e.block_id));return{blockType:e.classification,blockTitle:e.name,htmlContent:(null===t||void 0===t?void 0:t.html)||"",projectId:a}}))}(await ot(0,O,k,V),k.current,t.project.toString());g(!1),await j(n,e,a,o)}catch(e){g(!1),a(!1),D.error({message:r("Failed to save blocks."),placement:"bottomRight"})}};return o.createElement(h.A,{title:o.createElement("div",null,o.createElement("h2",null,r("Bulk saving of blocks")),p||z?o.createElement("span",null,r("All blocks that are currently saved can be found in the \u201cMy Blocks\u201d section of the control panel.")):o.createElement("span",null,r(`Your letter contains ${F} ${F<2?"block":"blocks"} that can be saved for future use.`))),className:"blocks-modal",open:e,onOk:W,onCancel:H,centered:!0,footer:o.createElement("div",{className:"modal-footer"},!(p||z)&&o.createElement(s.Ay,{key:"submit",size:"large",type:"primary",disabled:p||z,onClick:W},r(`Create ${F} ${F<2?"block":"blocks"}`)))},!(p||z)&&o.createElement(b.A,{form:E,name:"add_all_blocks_form",layout:"vertical",style:{padding:"10px 24px 0"},onFinish:W},o.createElement(b.A.Item,{label:r("Tags"),name:"tags",labelCol:{span:24},wrapperCol:{span:24},style:{display:"block"}},o.createElement(y.A,{size:"large",mode:"tags",placeholder:r("Add some tags"),style:{width:"100%",marginBottom:"16px"},value:f,onChange:v,disabled:N.isLoading,options:_}))),(z||p)&&o.createElement("div",{className:"modal-spinner"},o.createElement(Je.A,{size:"large"})))};var mt=a(78915),ct=a(38540),ut=a(79253),pt=a(61058),gt=a(27264),bt=a(72762),ht=a(70687),Et=a(73180);var ft=a(3326);const{Content:vt}=n.A,yt=()=>{const{__:e}=(0,u.s9)(),t=(0,Ke.QC)(),{emailId:a,projectId:l,preview:b}=(0,d.g)(),h=(0,c.wA)(),E=(0,c.d4)(T.Fv),f=(0,d.Zp)(),v=(0,c.d4)(T.cL),y=(0,c.d4)(Ee.YG),_=(0,c.d4)(fe.Hs),C=(0,c.d4)(T.oG),[S,w]=(0,m.ok)(),[k]=(0,mt.on)(),x=(0,c.d4)(Ie.C1),{isSuccess:B,data:R}=(0,mt.W5)(),{owner:L}=(0,ze.A)(),I=(0,ye.fn)(),{modal:M}=r.A.useApp(),O=(0,Ce.p)(),F=(0,N.rD)(),[D,H]=(0,o.useState)(!1),j=(0,ft.cR)(),[z,W]=(0,o.useState)(!1),[G,U]=(0,o.useState)(!1),[q,Z]=(0,o.useState)(!1),{confirm:X}=M,[K,Y]=(0,o.useState)(!1),$=S.get("template")||!K&&!a&&O.get(P.A9.em_new_email),Q=O.get(P.A9.em_template_email);(0,o.useEffect)((()=>{!K&&_.id&&Y(!0)}),[Y,K,_.id]);const{isSuccess:J,isLoading:ee,isError:te,error:ae,data:le}=(0,ge.sl)($,{skip:!$||!!a}),{isLoading:oe,isSuccess:ne,isError:re,error:ie}=(0,ge.sl)(a,{skip:!a});(0,o.useEffect)((()=>{$&&J&&(h((0,Ee.MZ)(le)),Y(!0),w({}))}),[$,J,h,le,Q,w]),(0,o.useEffect)((()=>(h((0,T.mi)(!0)),()=>h((0,T.mi)(!0)))),[h]);const se=$?le:a?_:y;(0,bt.f)(se,void 0===a);const de=function(e){const{emailId:t,projectId:a}=(0,d.g)(),l=(0,A.hN)(),n=(0,N.rD)(),r=(0,c.d4)(ct.M),i=(0,ye.fn)(),s=(0,o.useRef)(0),m=(0,c.d4)(pt.p1),u=(0,c.d4)(T.Wm),p=(0,c.d4)(T.B),g=(0,c.d4)(Ie.C1),b=(0,ve.u)(),[h,E]=(0,ge.LX)(),f=(0,c.wA)(),{isSuccess:v,isLoading:y}=(0,ge.YV)({emailId:t},{skip:!t}),[_,C]=(0,o.useState)(null);(0,o.useEffect)((()=>{if(v&&!y&&null!==m&&void 0!==m&&m.length){const a=m[0];var t;a&&_!==(null===e||void 0===e?void 0:e.id)&&(null!==(t=a.slug)&&void 0!==t&&t.includes("autosave")&&i&&f((0,fe.no)(a)),C(null===e||void 0===e?void 0:e.id))}}),[f,m,v,y,null===e||void 0===e?void 0:e.id,_,i,t]);const S=(0,o.useCallback)((({parent:t})=>{if(e){const o={parent:t,title:e.title,author:e.author,project:e.project,html:(null===i||void 0===i?void 0:i.getValue())||"",excerpt:e.date_gmt,subject:e.subject,preheader:e.preheader,common_styles:e.common_styles,parent_email:e.parent_email};h({emailId:e.id,body:o}).then((t=>{if(b({event:"save",action:"auto_save_email",email_id:e.id,project_id:a}),!function(e){return e.hasOwnProperty("data")}(t))throw t.error;var n,r;P.EW.isPlugin||fetch(xe(P.Tm,a,null===(n=t.data)||void 0===n?void 0:n.id,null===(r=t.data)||void 0===r?void 0:r.modified),{mode:"no-cors"}),l.success({id:"EMAIL_AUTOSAVE_SUCCESS",data:o,message:""},!0)})).catch((e=>{l.fromError("EMAIL_AUTOSAVE_ERROR",o,e,!0)}))}}),[h,e,i,a,l,b]),[w,k]=(0,o.useState)(!1),x=(0,o.useCallback)((()=>{if((null===m||void 0===m?void 0:m.length)>0){const e=[...m].sort(((e,t)=>Date.parse(null===t||void 0===t?void 0:t.modified)-Date.parse(null===e||void 0===e?void 0:e.modified)))[0];Date.parse((new Date).toString())-Date.parse(null===e||void 0===e?void 0:e.modified)>1.5*((null===n||void 0===n?void 0:n.autosaveTimeout)||1e4)&&u&&!r&&"Discuss"!==p&&S({parent:e.id})}else u&&!r&&"Discuss"!==p&&S({parent:null})}),[m,r,u,p,S,null===n||void 0===n?void 0:n.autosaveTimeout]);(0,Et.Z)((([e])=>{w&&!e&&(x(),k(!1))}),[w,x,k]);const B=null===g||void 0===g?void 0:g.autosaves,R=(0,o.useCallback)((()=>{r||(clearTimeout(s.current),s.current=setTimeout((()=>k(!0)),(null===n||void 0===n?void 0:n.autosaveTimeout)||1e4))}),[r,null===n||void 0===n?void 0:n.autosaveTimeout,k]);return(0,o.useEffect)((()=>{if(B&&v&&void 0!==(null===e||void 0===e?void 0:e.id)){const t=(0,ht.Og)(i,(()=>{u&&null!==e&&void 0!==e&&e.is_inited&&R()}));return()=>{t.dispose()}}}),[i,R,B,v,null===e||void 0===e?void 0:e.id,u,null===e||void 0===e?void 0:e.is_inited]),(0,Et.Z)((([t,a])=>{B&&v&&void 0!==(null===e||void 0===e?void 0:e.id)&&u&&null!==e&&void 0!==e&&e.is_inited&&(t===(null===e||void 0===e?void 0:e.title)&&a===(null===e||void 0===e?void 0:e.common_styles)||R())}),[null===e||void 0===e?void 0:e.title,null===e||void 0===e?void 0:e.common_styles,u,v,R,null===e||void 0===e?void 0:e.id,null===e||void 0===e?void 0:e.is_inited]),(0,o.useEffect)((()=>()=>{clearTimeout(s.current)}),[g,null===e||void 0===e?void 0:e.renderGuid]),(0,o.useEffect)((()=>{clearTimeout(s.current)}),[null===e||void 0===e?void 0:e.modified]),E}(se),{counters:me,subscription:ce}=x,ue=null===me||void 0===me?void 0:me.emails_counter,pe=(0,o.useCallback)((()=>{h((0,T.vs)()),h((0,ct.rI)())}),[h]);(0,o.useEffect)((()=>{b&&!E&&pe()}),[E,b,pe]),(0,o.useEffect)((()=>{h((0,ut.ff)()),document.body.classList.add("editor"),h((0,T.PM)(P.Bv))}),[h]);const[be,Ae]=(0,o.useState)(!1);(0,o.useEffect)((()=>{!be&&ue<3&&(k(),Ae(!0))}),[k,ue,be]);const _e=$?J:ne,Se=$?ee:oe,we=$?te:re,ke=$?ae:ie,Be=(0,ye.aD)(I),Te=(0,o.useCallback)((()=>{Be.undo()}),[Be]),Re=(0,o.useCallback)((()=>{Be.redo()}),[Be]),Ne=(0,o.useRef)();(0,o.useEffect)((()=>{Ne.current!==(null===se||void 0===se?void 0:se.id)&&(Be.clear(),Ne.current=null===se||void 0===se?void 0:se.id)}),[se,Be]);const Le=(0,o.useCallback)((e=>{(window.navigator.appVersion.indexOf("Mac")&&e.metaKey||e.ctrlKey)&&"KeyZ"===e.code&&(e.preventDefault(),e.shiftKey?Re():Te())}),[Te,Re]);(0,o.useEffect)((()=>()=>{h((0,ct.rI)()),h((0,pt.qX)())}),[h]),(0,o.useEffect)((()=>{const e=t.addListener(P.Ru.APPLICATION_HAS_AMP,(e=>{h(null!==se&&void 0!==se&&se.id?(0,fe.VO)(e):(0,Ee.lg)(e))}));return()=>e.dispose()}),[t,h,null===se||void 0===se?void 0:se.id]);const[Pe,Me]=(0,o.useState)(),Oe=(0,o.useCallback)((e=>{const t=e.data.operation,a=e.data,l=e.data.action,o=j.querySelector("#iframe-scroll-top"),n=j.querySelector("#iframe-scroll-bottom");if(t===P.Ru.APPLICATION_EBLOCK_ADD&&(Me(a.data),h((0,T.qf)(P.lx.ADD_NEW_EBLOCK_MODAL))),t===P.Ru.APPLICATION_ACTION&&("undo"===l?Te():"redo"===l&&Re()),t===P.Ru.APPLICATION_SCROLL_BLOCK_SHOW){const e=j.querySelector("#email_iframe"),t=document.body.getBoundingClientRect().height,a=e.getClientRects()[0];a.top<0&&(o.style.display="block"),a.top+a.height>t&&(n.style.display="block")}t===P.Ru.APPLICATION_SCROLL_BLOCK_HIDE&&(o.style.display="none",n.style.display="none")}),[h,Te,Re,j]);(0,he.A)(Oe);const Ve=e=>{e.preventDefault(),e.target&&t.send({operation:P.Ru.SANDBOX_DRAG_CANCEL}),j.querySelectorAll(".em-dragging-element").forEach((e=>{e.classList.remove("em-dragging-element")}))};(0,o.useEffect)((()=>(window.addEventListener("drop",Ve),window.addEventListener("dragover",Fe),window.addEventListener("dragstart",He),window.addEventListener("dragend",De),window.addEventListener("keydown",Le),window.addEventListener("dragenter dragleave",(e=>{e.preventDefault()})),()=>{window.removeEventListener("drop",Ve),window.removeEventListener("dragover",Fe),window.removeEventListener("dragstart",He),window.removeEventListener("dragend",De),window.removeEventListener("keydown",Le),window.removeEventListener("dragenter dragleave",(e=>{e.preventDefault()}))})));const Fe=e=>{e.preventDefault();const t=j.querySelector("#iframe-scroll-top"),a=j.querySelector("#iframe-scroll-bottom"),l=F.sidePanelFloating?j.querySelector("#pane-content-wrapper"):j.querySelector(".email-pane__col_preview"),o=j.querySelector("#email_iframe"),{height:n,top:r}=o.getBoundingClientRect(),i=l.getBoundingClientRect().height;r>96?"block"===t.style.display&&(t.style.display="none"):"none"!==t.style.display&&""!==t.style.display||(t.style.display="block"),n-i+r<44?"block"===a.style.display&&(a.style.display="none"):"none"===a.style.display&&(a.style.display="block"),e.target===t&&l.scrollBy(0,-15),e.target===a&&l.scrollBy(0,15)},De=()=>{const e=j.querySelector("#iframe-scroll-top"),t=j.querySelector("#iframe-scroll-bottom");e&&t&&(e.style.display="none",t.style.display="none"),j.querySelectorAll(".em-dragging-element").forEach((e=>{e.classList.remove("em-dragging-element")}))},He=e=>{e.target.parentElement.classList.add("em-dragging-element");var t=e.target.closest(".blocks-search__result-wrapper")?e.target.querySelector(".blocks-search__result-html").cloneNode(!0):e.target.cloneNode(!0);t.classList.add("em-ghost-element"),t.style.height=e.target.closest(".blocks-search__result-wrapper")?"auto":"70px",t.style.width=e.target.closest(".blocks-search__result-wrapper")?"600px":"109px",t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.zIndex="-1",e.target.appendChild(t),e.dataTransfer.setDragImage(t,0,0),window.setTimeout((function(){t.parentNode.removeChild(t)}),1e3)},je=(0,o.useCallback)((()=>{X({title:e("You reached the plan limit"),icon:o.createElement(gt.A,null),content:o.createElement("div",{style:{maxWidth:"330px"}},e("Switch to a different plan to save more emails.")),centered:!0,okText:e("Choose a plan"),cancelText:e("Continue without saving"),width:"unset",onOk(){f("/billing")},onCancel(){}})}),[f,e,X]),[We,Ge]=(0,o.useState)(!1);return(0,o.useEffect)((()=>{if(B&&R){var e,t;const l=null===R||void 0===R||null===(e=R.find((e=>{var t,a;return(null===(t=e.id)||void 0===t?void 0:t.toString())===(null===ce||void 0===ce||null===(a=ce.ID)||void 0===a?void 0:a.toString())})))||void 0===e||null===(t=e.limits)||void 0===t?void 0:t.emails_limit;l&&ue>=l&&!We&&!a&&L&&(je(),Ge(!0))}}),[R,B,ce,ue,We,je,a,L]),(0,o.useEffect)((()=>{const e=t.onInit((()=>{t.send({operation:P.Ru.SANDBOX_LOCK_EDIT,data:!1})}));return()=>e.dispose()}),[t]),o.createElement(n.A,{className:"email-page"},Se&&o.createElement(p.A,null),we&&ke&&o.createElement(vt,{style:{paddingTop:"40px"}},o.createElement("div",{className:"container"},o.createElement(i.Ay,{status:ke.status,title:ke.status,subTitle:ke.data.message,extra:o.createElement(s.Ay,{type:"primary",onClick:()=>{f(`/projects/${l}/emails`)}},e("Back To Project"))}))),(!a&&!$&&K||ne&&se)&&!Se&&o.createElement(n.A,{className:"email-pane"},C&&o.createElement("div",{className:"email-pane__loader"},o.createElement(p.A,{small:!0})),o.createElement(Qe,{email:se,autoSaveEmailResult:de,isCollaborationEditor:D}),o.createElement(g.A,{emailElement:se,isSuccess:_e,setIsCollaborationEditor:H,setIsShowAddAllBlocksModal:W,triggerOpenSavedBlocksTab:q})),o.createElement(V,{isModalVisible:v===P.lx.ADD_NEW_EBLOCK_MODAL,htmlContent:Pe,projectId:l,setIsShowAddAllBlocksModal:W,setIsShowAddAllBlocksModalForNewEmail:U,currentEmail:se}),o.createElement(dt,{isModalVisible:z,currentEmail:se,setIsShowAddAllBlocksModal:W,setTriggerOpenSavedBlocksTab:Z,autoStart:!G,projectId:l}))}},58115:(e,t,a)=>{"use strict";a.d(t,{A:()=>Li});var l=a(98173),o=a(47555),n=a(40120),r=a(71446),i=a(13785),s=a(49856),d=a(62913),m=a(94674),c=a(93511),u=a(38976),p=a(53361),g=a(37969),b=a(201),h=a(66964),E=a(48753),f=a(2604),v=a(30150),y=a(12543),A=a(64909),_=a(26298),C=a.n(_),S=a(27499),w=a(8218),k=a(49823),x=a(67034),B=a(29123),T=a(94780),R=a(59010),N=a(38927),L=a(40186),P=a(35076),I=a(71879),M=a(65716),O=a(83027),V=a(23424),F=a(40277),D=a(32947);const H=({taxonomy:e})=>{var t;const{__:a,_x:o}=(0,y.s9)(),n=(0,f.wA)(),[r]=S.A.useForm(),i=(0,l.useRef)(null),s=(0,f.d4)(V.cL)===D.lx.ADD_NEW_GROUP_MODAL,d=(0,A.hN)();let m;({data:m}=(0,v.KC)());const c=`project_${m.id}`,u=null===(t=m[D.bV.GROUP])||void 0===t?void 0:t[0],[p]=(0,M.OD)(),[b]=(0,O.y$)(),h=(0,l.useCallback)((()=>{r.resetFields(),setTimeout((()=>{var e;return null===(e=i.current)||void 0===e?void 0:e.focus({cursor:"start"})}),0)}),[r]);(0,l.useEffect)((()=>{s&&h()}),[s,h]);const _=()=>n((0,V.Oo)()),[C,k]=(0,O.JI)(),[x,B]=(0,l.useState)(!1),[T,R]=(0,l.useState)(u),N=()=>{const t=(t,l)=>p({projectId:m.id,[e]:l||T}).then((async l=>{if("error"in l)(0,F.p6)(l,d);else if("data"in l){let n=l.data;const r=await C({name:t,parent:n[e][0]});if(!("error"in r))return d.success({message:a("The group \u201c")+r.data.name+o("\u201d was successfully created.",e),placement:"bottomRight"}),R(n[e][0]),b({parent:n[e][0]}).then((({data:e,error:t})=>{e?_():t&&(0,F.p6)({error:t},d)}));(0,F.p6)(r,d)}}));r.validateFields().then((({name:l})=>(B(!0),T?C({name:l,parent:T}).then((t=>{"error"in t?(0,F.p6)(t,d):(d.success({message:a("The group \u201c")+t.data.name+o("\u201d was successfully created.",e),placement:"bottomRight"}),_(),b({parent:T}))})):C({name:c}).then((e=>{if(!("error"in e))return t(l,e.data.id);{const{data:a}=e.error;if("term_exists"===a.code&&a.data.term_id)return t(l,a.data.term_id);(0,F.p6)(e,d)}})).catch((e=>{})).finally((()=>B(!1)))))).catch((e=>{})).finally((()=>B(!1)))};return l.createElement(E.A,{title:a("Add a new group"),open:s,onOk:N,onCancel:_,className:"new-group-modal",centered:!0,footer:[l.createElement(g.Ay,{key:"submit",type:"primary",size:"large",loading:k.isLoading||x,onClick:N},a("Create group"))]},l.createElement(S.A,{form:r,layout:"vertical",name:"add_new_group_form",onFinish:N,initialValues:{remember:!1,name:""},autoComplete:"off",style:{paddingTop:10}},l.createElement(S.A.Item,{name:"name",rules:[{required:!0,message:a("Please enter the group name")}]},l.createElement(w.A,{disabled:k.isLoading,size:"large",placeholder:a("Enter the group name"),ref:i,style:{marginBottom:5}}))))},j=({group:e,refetch:t})=>{const{__:a,_x:o}=(0,y.s9)(),n=(0,f.wA)(),[r]=S.A.useForm(),i=(0,l.useRef)(null),s=(0,f.d4)(V.cL)===D.lx.EDIT_GROUP_NAME_MODAL,d=(0,A.hN)(),{id:m=null,name:c=""}=e,u=()=>n((0,V.Oo)()),[p,b]=(0,O.CE)();(0,l.useEffect)((()=>{s&&r.setFieldsValue({name:c})}),[s,c,r]);const h=()=>{r.validateFields().then((({name:e})=>{p({id:m,data:{name:e}}).then((({data:n,error:i})=>{i?(d.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:i.data.code}}),description:l.createElement("div",{dangerouslySetInnerHTML:{__html:i.data.message}}),placement:"bottomRight"}),r.setFieldValue("name",e)):(t().then((({data:e})=>{if(e){var t,a,l;const o=null===(t=e[0])||void 0===t||null===(a=t.children)||void 0===a||null===(l=a.find((e=>e.id===m)))||void 0===l?void 0:l.name;r.setFieldValue("name",o)}})),u(),d.success({message:a("The group \u201c")+e+o("\u201d was successfully changed to \u201c","group")+n.name+a("\u201d."),placement:"bottomRight"}))}))}))};return l.createElement(E.A,{title:a("Change group name"),open:s,onOk:h,onCancel:u,className:"new-group-name-modal",centered:!0,footer:[l.createElement(g.Ay,{key:"submit",type:"primary",size:"large",loading:b.isLoading,onClick:h},a("Change name"))]},l.createElement(S.A,{form:r,layout:"vertical",name:"rename_group_form",onFinish:h,initialValues:{remember:!1,name:c},autoComplete:"off",style:{paddingTop:10}},l.createElement(S.A.Item,{name:"name",rules:[{required:!0,message:a("Please enter the group name")}]},l.createElement(w.A,{disabled:b.isLoading,size:"large",placeholder:a("Enter the group name"),ref:i,style:{marginBottom:5}}))))};var z=a(8807),W=a(1047);const{useToken:G}=n.A,U=({className:e,refetchProjectGroups:t,isLoading:a})=>{const{__:o,_x:n}=(0,y.s9)(),i=(0,f.wA)(),s=(0,A.hN)(),{modal:d}=r.A.useApp(),{confirm:m}=d,{token:c}=G(),u=(0,f.d4)(W.UI),[p]=(0,O.Lh)(),E=(e,a)=>{m({maskClosable:!0,centered:!0,title:n("Are you sure to delete \u201c","group")+a+o("\u201d group and all nested groups?"),icon:l.createElement(L.A,{style:{color:"#ff4d4f"},rev:void 0}),okText:o("Yes"),cancelText:o("No"),onOk:()=>(e=>{p(e).unwrap().then((e=>{null!==e&&void 0!==e&&e.deleted&&(s.success({message:o("The group \u201c")+e.previous.name+n("\u201d was successfully deleted.","recovery"),placement:"bottomRight"}),t())})).catch((e=>{s.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:e.data.code}}),description:l.createElement("div",{dangerouslySetInnerHTML:{__html:e.data.message}}),placement:"bottomRight"})}))})(String(e))})};let v=e=>[{label:o("Rename"),key:"Rename",icon:l.createElement(P.A,{style:{fontSize:"16px"},rev:void 0}),onClick:()=>{return t=e.id,a=e.name,i((0,V.qf)(D.lx.EDIT_GROUP_NAME_MODAL)),void w({id:t,name:a});var t,a}},{label:o("Remove"),icon:l.createElement(L.A,{style:{fontSize:"16px"},rev:void 0}),key:"Remove",style:{color:"#ff4d4f"},onClick:()=>E(e.id,e.name)}];const[_,w]=(0,l.useState)({id:null,name:""});return l.createElement("div",{className:C()("groups-management",{[e]:e})},a?l.createElement(R.A,{active:!0}):l.createElement(b.A,null,!(null===u||void 0===u||!u.length)&&(null===u||void 0===u?void 0:u.map(((e,t)=>{var a;return l.createElement(h.A,{key:e.id,span:24},l.createElement(S.A.Item,{name:`group_${e.id}`,style:{marginBottom:c.formItemMarginBottomMD},label:l.createElement("div",{style:{display:"flex",justifyContent:"space-between",width:"100%",alignItems:"center"}},l.createElement("span",null,e.name),l.createElement(g.Ay,{type:"text",className:"groups-management__group_menu","data-group-id":e.id,size:"large"},l.createElement(N.A,{className:"groups-management__group_menu-inner",placement:"bottomLeft",menu:{items:v(e)},trigger:["hover"]},l.createElement("span",{className:"groups-management__actions"},l.createElement(I.A,{rev:void 0}))))),className:"groups-management__group-select",rules:[{message:"Please input category name!",type:"array"}]},l.createElement(k.A,{mode:"tags",style:{width:"100%"},placeholder:o("Type category here"),options:null===(a=e.children)||void 0===a?void 0:a.map((e=>({label:e.name,value:String(e.id)}))),tagRender:e=>{const{label:t,closable:a,onClose:o}=e;return l.createElement(x.A,{color:c.colorPrimary,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},closable:a,onClose:o,style:{borderRadius:6}},t)},getPopupContainer:()=>document.querySelector(".email-settings__collapse")})))}))),l.createElement(h.A,{span:24},l.createElement(S.A.Item,{style:{marginBottom:c.formItemMarginBottomMD}},l.createElement(g.Ay,{id:"add_group_button",icon:l.createElement(z.A,{icon:"AddSlide"}),style:{width:"100%"},onClick:()=>i((0,V.qf)(D.lx.ADD_NEW_GROUP_MODAL))},o("Add group"))))),l.createElement(H,{taxonomy:D.bV.GROUP}),l.createElement(j,{group:_,refetch:t}))};var q=a(68984),Z=a(98845),X=a(12741),K=a(39206),Y=a(27941);const{useToken:$}=n.A,{title:Q,description:J,tags:ee,type:te,is_template:ae,group:le}={title:"title",description:"description",tags:"tags",type:"type",is_template:"is_template",group:"group"},oe={[Q]:"",[J]:"",[ee]:[],[ae]:!1},ne={[J]:"",[ee]:[],[te]:""};const re=({className:e,element:t})=>{var a,o;const{__:n}=(0,y.s9)(),{projectId:r}=(0,v.g)(),d=(0,f.wA)(),[c]=S.A.useForm(),{token:u}=$(),p=(0,Y.rD)(),g=(0,f.Pj)(),b=(0,f.d4)(W.UI),{data:h}=(0,q.h1)(),{data:E}=(0,v.KC)(),A=t.hasOwnProperty("type")?D.IE:D.Tm,_=t.hasOwnProperty("type")?D.YY:D.zh,{refetch:R,isLoading:N,isFetching:L,isUninitialized:P,isSuccess:I}=(0,O.Oo)({parent:null===(a=E.group)||void 0===a?void 0:a[0]},{skip:!(null!==(o=E.group)&&void 0!==o&&o[0])});(0,l.useEffect)((()=>{!P&&R()}),[P,R]);const[V,H]=(0,l.useState)([]),[j,z]=(0,l.useState)([]),[G,ae]=(0,l.useState)(t.is_template||!1),{data:re}=M.Nq.endpoints.getProject.select(+r)(g.getState());(0,l.useEffect)((()=>{!P&&R()}),[t.group,R,P]),(0,l.useEffect)((()=>{if(I&&t.is_template&&t.group.length){const e=t.group;let a={};e.length&&b.length&&(null===e||void 0===e||e.forEach((e=>{null===b||void 0===b||b.forEach((t=>{let l=t.children.find((t=>t.id===e));l&&(a.hasOwnProperty(t.id)||(a[t.id]=[]),a[t.id].push({label:l.name,value:l.id}))}))})));let l={};for(let t in a)a.hasOwnProperty(+t)&&(l[`group_${t}`]=a[t].map((e=>({...e,value:String(e.value)}))));c.setFieldsValue(l)}}),[c,b,t.is_template,t.group,I]),(0,l.useEffect)((()=>{var e;z(null===(e=function(e){const t=new Set;return null===e||void 0===e?void 0:e.filter((e=>!t.has(e.name)&&(t.add(e.name),!0)))}((0,F.HT)(re,_)))||void 0===e?void 0:e.map((e=>({value:e.name,key:e.id}))))}),[re,_]),(0,l.useEffect)((()=>{if(t){var e,a;const l=null===(e=(0,F._q)(t,_))||void 0===e?void 0:e.map((e=>e.name)),o=t.emailtags||t.blocktags,n=null===(a=(0,F._q)(t,_))||void 0===a?void 0:a.filter((e=>o.includes(e.id))).map((e=>e.name));c.setFieldsValue({title:t.title,description:t.description,tags:t.tags||n||l,type:t.type})}}),[c,t,_]);(0,l.useEffect)((()=>{if(h){const e=h.schema.properties.acf.properties.type.items.enum;let t=[];const a={Applications:n("Apps"),Articles:n("Article"),Banners:n("Banners"),Buttons:n("Buttons"),"Call to Action":n("Call to Action"),Contacts:n("Contacts"),Content:n("Content"),"E-Commerce":n("E-Commerce"),Feature:n("Features"),Footer:n("Footers"),Header:n("Headers"),Lists:n("Lists"),Menu:n("Menus"),Other:n("Others"),Polls:n("Polls"),Promocodes:n("Promocodes"),Separators:n("Separators")};for(let l in e)t.push({label:a[e[l]],value:e[l]});H(t)}}),[h,n]);return l.createElement("div",{className:C()("settings-panel",{[e]:e})},l.createElement(S.A,{form:c,layout:"vertical",name:"settings_panel_form",initialValues:A===D.Tm?{EmailInitialValues:oe}:ne,onValuesChange:e=>{const a=Object.keys(e)[0];switch(a.split("_")[0]){case Q:t.isNew?d((0,X.BQ)(e[a])):d((0,W.VK)(e[a]));break;case le:d((0,W.Bu)({[a.split("_")[1]]:e[a]}));break;case J:A===D.Tm?t.isNew?d((0,X.Zs)(e[a])):d(Z.GY.util.updateQueryData("getEmail",t.id,(t=>{Object.assign(t,{description:e[a]})}))):t.isNew?d((0,K.AS)(e[a])):d(q.VM.util.updateQueryData("getBlock",t.id,(t=>{Object.assign(t,{description:e[a]})})));break;case"is":t.isNew?d((0,X.TC)(e[a])):d(Z.GY.util.updateQueryData("getEmail",t.id,(t=>{Object.assign(t,{is_template:e[a]})})));break;case ee:{const l=e[a].map((e=>e.trim()));A===D.Tm?t.isNew?d((0,X.yY)(l)):d(Z.GY.util.updateQueryData("getEmail",t.id,(e=>{Object.assign(e,{tags:l})}))):t.isNew?d((0,K.TB)(l)):d(q.VM.util.updateQueryData("getBlock",t.id,(e=>{Object.assign(e,{tags:l})})));break}case te:d(q.VM.util.updateQueryData("getBlock",t.id,(t=>{Object.assign(t,{type:e[a]})})));break;default:return}},autoComplete:"off"},p.subjectEnabled&&A===D.Tm&&l.createElement(S.A.Item,{label:n("Title"),name:Q,tooltip:{title:n("The title of the email is displayed in the list of the templates and usually matches the subject line, but you can change it."),icon:l.createElement(T.A,null)}},l.createElement(w.A.TextArea,{placeholder:n("Type title here"),autoSize:{minRows:1}})),p.descriptionEnabled&&l.createElement(S.A.Item,{label:n("Description"),name:J,tooltip:{title:n("Description is used in other sections of the service."),icon:l.createElement(T.A,null)}},l.createElement(w.A.TextArea,{placeholder:n("Type your description here"),autoSize:{minRows:2}})),p.tagsEnabled&&l.createElement(S.A.Item,{label:n("Tags"),name:ee,tooltip:{title:n("Tags help you find the block in the list."),icon:l.createElement(T.A,null)},rules:[{message:"Please input your username!",type:"array"}]},l.createElement(k.A,{mode:"tags",style:{width:"100%"},placeholder:n("Type your tags here"),options:j,tagRender:e=>{const{label:t,closable:a,onClose:o}=e;return l.createElement(x.A,{color:u.colorPrimary,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},closable:a,onClose:o,style:{borderRadius:6}},t)},getPopupContainer:()=>document.querySelector(".email-settings__collapse")})),l.createElement(m.A,{className:"selected-td-form__divider",style:{marginBottom:16}}),A===D.Tm&&p.isTemplateEnabled&&l.createElement(i.A,{title:t.isNew?n("Save email first."):n("Use this email as a template for creating future emails."),key:"isTemplate"},l.createElement(s.A,{size:10,align:"baseline"},l.createElement(S.A.Item,{name:"is_template",valuePropName:"checked",initialValue:G},l.createElement(B.A,{size:"small",id:"setIsTemplate",onChange:e=>{ae(e)},disabled:t.isNew})),l.createElement("span",{className:"ant-form-item-switch-label",style:{position:"relative",top:2,fontSize:14,color:u.colorText}},l.createElement("label",{htmlFor:"setIsTemplate"},n("Is a template"))))),G&&l.createElement(U,{element:t,refetchProjectGroups:R,isLoading:N||L}),A===D.IE&&l.createElement(S.A.Item,{name:te,label:n("Type"),tooltip:{title:n("Select the block type to find any block on the list faster."),icon:l.createElement(T.A,null)},rules:[{message:"Please input type!"}]},l.createElement(k.A,{placeholder:n("Choose block type"),options:V,getPopupContainer:()=>document.querySelector(".email-settings__collapse")}))))};re.defaultProps={className:"",email:void 0};const ie=re,{utm_source:se,utm_medium:de,utm_campaign:me,utm_term:ce,utm_content:ue}={utm_source:"utm_source",utm_medium:"utm_medium",utm_campaign:"utm_campaign",utm_term:"utm_term",utm_content:"utm_content"},pe={[se]:"",[de]:"",[me]:"",[ce]:"",[ue]:""},ge=({className:e,email:t})=>{const{__:a}=(0,y.s9)(),o=(0,f.wA)(),[n]=S.A.useForm();(0,l.useEffect)((()=>{var e,a,l,o,r;t&&n.setFieldsValue({utm_source:(null===(e=t.utm_parameters)||void 0===e?void 0:e.utm_source)||"",utm_medium:(null===(a=t.utm_parameters)||void 0===a?void 0:a.utm_medium)||"",utm_campaign:(null===(l=t.utm_parameters)||void 0===l?void 0:l.utm_campaign)||"",utm_term:(null===(o=t.utm_parameters)||void 0===o?void 0:o.utm_term)||"",utm_content:(null===(r=t.utm_parameters)||void 0===r?void 0:r.utm_content)||""})}),[n,t]);return l.createElement("div",{className:C()("settings-panel",{[e]:e})},l.createElement(S.A,{form:n,layout:"vertical",name:"settings_panel_form_utm",initialValues:pe,onValuesChange:e=>{const a=Object.keys(e)[0];switch(a){case se:t.isNew?o((0,X.K3)(e[a])):o(Z.GY.util.updateQueryData("getEmail",t.id,(t=>{Object.assign(t,{utm_parameters:{...t.utm_parameters,utm_source:e[a]}})})));break;case de:t.isNew?o((0,X.ol)(e[a])):o(Z.GY.util.updateQueryData("getEmail",t.id,(t=>{Object.assign(t,{utm_parameters:{...t.utm_parameters,utm_medium:e[a]}})})));break;case me:t.isNew?o((0,X.P3)(e[a])):o(Z.GY.util.updateQueryData("getEmail",t.id,(t=>{Object.assign(t,{utm_parameters:{...t.utm_parameters,utm_campaign:e[a]}})})));break;case ce:t.isNew?o((0,X.zH)(e[a])):o(Z.GY.util.updateQueryData("getEmail",t.id,(t=>{Object.assign(t,{utm_parameters:{...t.utm_parameters,utm_term:e[a]}})})));break;case ue:t.isNew?o((0,X.mk)(e[a])):o(Z.GY.util.updateQueryData("getEmail",t.id,(t=>{Object.assign(t,{utm_parameters:{...t.utm_parameters,utm_content:e[a]}})})));break;default:return}},autoComplete:"off"},l.createElement(u.A,{message:a("The specified parameters will be added to all links when exporting the email."),type:"info",showIcon:!0,style:{marginBottom:20}}),l.createElement(S.A.Item,{label:a("utm_source"),name:se,tooltip:{title:a("Mandatory. Indicates the traffic source. Example: utm_source=google"),icon:l.createElement(T.A,null)}},l.createElement(w.A,{placeholder:a("google")})),l.createElement(S.A.Item,{label:a("utm_medium"),name:de,tooltip:{title:a("Identifies what type of link was used, such as cost per click or email. For example: utm_medium=cpc"),icon:l.createElement(T.A,null)}},l.createElement(w.A,{placeholder:a("cpc")})),l.createElement(S.A.Item,{label:a("utm_campaign"),name:me,tooltip:{title:a("Indicates a specific product promotion or a marketing campaign. Example: utm_campaign=spring_sale"),icon:l.createElement(T.A,null)}},l.createElement(w.A,{placeholder:a("spring_sale")})),l.createElement(S.A.Item,{label:a("utm_term"),name:ce,tooltip:{title:a("Identifies search terms. For example: utm_term=running+shoes"),icon:l.createElement(T.A,null)}},l.createElement(w.A,{placeholder:a("running+shoes")})),l.createElement(S.A.Item,{label:a("utm_content"),name:ue,tooltip:{title:a("Indicates what user clicked to get to the site: a banner or a text link. It is often used for A/B testing and ad campaigns. Example: utm_content=logolink or utm_content=textlink"),icon:l.createElement(T.A,null)}},l.createElement(w.A,{placeholder:a("textlink")}))))};ge.defaultProps={className:"",email:void 0};const be=ge,he=({email:e})=>{const{__:t}=(0,y.s9)(),a=e.hasOwnProperty("type")?D.IE:D.Tm,[o,n]=(0,l.useState)(D.yy),r=(0,Y.rD)();let i=[{label:l.createElement(l.Fragment,null,t("Settings")),key:D.yy,forceRender:!0,className:"email-settings__collapse-panel",children:l.createElement(ie,{className:"email-settings__collapse-panel-content",element:e})}];return r.UTMEnabled&&a===D.Tm&&i.push({label:l.createElement(l.Fragment,null,t("UTM parameters")),key:D.iW,forceRender:!0,className:"email-settings__collapse-panel",children:l.createElement(be,{className:"email-settings__collapse-panel-content",email:e})}),l.createElement(l.Fragment,null,l.createElement(c.A,{className:"secondary-tabs email-settings__collapse",size:"large",animated:{inkBar:!1,tabPane:!1},activeKey:o,onChange:e=>n(e||""),items:i}))};var Ee=a(42490),fe=a(5795),ve=a(6056);a(69039);const ye=({id:e,onChange:t,value:a,alignRight:o,placeholder:n,isDisabled:r=!1,usedColors:i=[],codeMode:s=!1})=>{const{__:d}=(0,y.s9)(),c=(0,f.d4)(W.iy),[u,p]=(0,l.useState)(!0),E=(0,l.useRef)(null),v=(0,l.useRef)(null),A=(0,l.useRef)(t);(0,l.useEffect)((()=>{"undefined"===typeof EyeDropper&&p(!1)}),[a]);const _=async()=>{try{if("undefined"===typeof EyeDropper)return void alert("Your browser does not support the EyeDropper API.");const e=new EyeDropper,t=(await e.open()).sRGBHex.toUpperCase();A.current&&A.current(t),E.current&&(E.current.style.backgroundColor=t),v.current&&(v.current.input.value=t)}catch(e){}};return l.createElement("div",{className:"color-picker-input"},l.createElement("div",{className:C()("color-picker-input__control-wrap",{"color-picker-input__empty":!a})},l.createElement(ve.A,{disabledAlpha:!0,format:"hex",defaultFormat:"hex",getPopupContainer:e=>e.closest(s?".selected_text_common_form_mobile":".email-pane__collapse-wrapper"),className:"color-picker-input__btn-wrap",rootClassName:"verticalColorpicker",value:""===a?null:a,onChange:e=>{const t=e.toHexString().toUpperCase();A.current&&A.current(t),E.current&&(E.current.style.backgroundColor=t),v.current&&(v.current.input.value=t)},panelRender:(e,{components:{Picker:t,Presets:a}})=>l.createElement(b.A,{justify:"space-between",wrap:!1},l.createElement(h.A,{flex:"auto"},l.createElement(t,null),u&&l.createElement(g.Ay,{onClick:_,size:"small",style:{position:"absolute",top:215,left:179,height:28,width:28,padding:0,zIndex:2,minWidth:"auto",fontSize:18}},l.createElement(z.A,{icon:"Colorize",style:{position:"relative",top:-2}}))),l.createElement(m.A,{type:"vertical",style:{height:"auto"}}),l.createElement(h.A,{span:8},l.createElement(a,null))),presets:[{label:d("Used"),colors:i},{label:d("Recommended"),colors:["#000000","#595959","#BFBFBF","#E5E5E5","#F5F5F5","#F5222D","#FA8C16","#FADB14","#8BBB11","#52C41A","#13A8A8","#1677FF","#2F54EB"]}]}),""===a&&l.createElement("div",{className:"color-picker-input__empty-bg"}),l.createElement(w.A,{allowClear:!0,id:e,disabled:c||r,className:"color-picker-input__control",placeholder:n||d("Select color"),value:a,ref:v,onChange:t})))};var Ae=a(63719),_e=a(80772),Ce=a(48956),Se=a(871),we=a(47014),ke=a(84572),xe=a(6969);const{Text:Be}=Ae.A,Te=({onChange:e,value:t,validateStatus:a,placeholder:o,disabled:n,name:r,elementSettings:s,imageInfo:d})=>{var m,c;const u=(0,f.d4)(we.C1),p=(0,f.d4)(we.B$),b=(0,f.d4)(ke.yN),h=(0,Y.rD)(),{__:E}=(0,y.s9)(),[v,A]=(0,l.useState)({width:"",height:"",size:""}),[_,S]=(0,l.useState)(!1),[k,x]=(0,l.useState)(0);let B=(0,f.wA)();const T=(0,f.d4)(_e.js),R=(0,f.d4)(_e.Uf),L=(0,f.d4)(_e.Ac),P=(0,f.d4)(V.cL),[I]=(0,Se.FQ)();let M=!p&&(null===(m=u.id)||void 0===m?void 0:m.toString())===(null===b||void 0===b||null===(c=b.members)||void 0===c?void 0:c.owner.ID)&&!0;(0,l.useEffect)((()=>{t&&I(t).then((({data:e})=>{e&&A({width:null===e||void 0===e?void 0:e.width,height:null===e||void 0===e?void 0:e.height,size:((null===e||void 0===e?void 0:e.fileSize)/1024).toFixed(0),format:null===e||void 0===e?void 0:e.format})}))}),[t,I]),(0,l.useEffect)((()=>{n||(r.startsWith("src")&&T&&((null===s||void 0===s?void 0:s.type)!==D.bV.CAROUSEL||R===r&&!P)?(e(T),B((0,_e.BK)())):"backgroundImage"===r&&L&&((null===s||void 0===s?void 0:s.type)!==D.bV.CAROUSEL||R===r&&!P)&&(e(L),B((0,_e.BK)())),P&&(null===s||void 0===s?void 0:s.type)===D.bV.CAROUSEL||!R||B((0,_e.BK)()))}),[T,R,L,e,r,n,null===s||void 0===s?void 0:s.type,B,P]);const O=(e=null)=>{r.startsWith("src")?(B((0,_e.Yw)(r)),B((0,_e.tm)(t)),B((0,V.qf)(e||D.lx.UPLOAD_IMAGE_MODAL))):r.startsWith("backgroundImage")&&(B((0,_e.Yw)(r)),B((0,_e.e_)(t)),B((0,V.qf)(e||D.lx.UPLOAD_BACKGROUND_MODAL)))},F=[{label:E("Upload"),key:"Upload",onClick:()=>O(r.startsWith("src")?D.lx.UPLOAD_IMAGE_MODAL_UPLOAD:D.lx.UPLOAD_BACKGROUND_MODAL_UPLOAD)}];h.imageCenterStockEnabled&&F.push({label:E("Stock"),key:"Stock",onClick:()=>O(r.startsWith("src")?D.lx.UPLOAD_IMAGE_MODAL_STOCK:D.lx.UPLOAD_BACKGROUND_MODAL_STOCK)}),h.imageCenterGifEnabled&&F.push({label:E("GIF"),key:"GIF",onClick:()=>O(r.startsWith("src")?D.lx.UPLOAD_IMAGE_MODAL_GIF:D.lx.UPLOAD_BACKGROUND_MODAL_GIF)}),h.elementAIimageEnabled&&F.push({label:E("AI"),key:"AI",onClick:()=>O(r.startsWith("src")?D.lx.UPLOAD_IMAGE_MODAL_AI:D.lx.UPLOAD_BACKGROUND_MODAL_AI)});return l.createElement("div",{className:C()("upload-bg-image",{"upload-bg-image_disabled":n})},!t||t&&"error"===a?l.createElement(g.Ay,{type:"default",block:!0,onClick:()=>O(r.startsWith("src")?D.lx.UPLOAD_IMAGE_MODAL_UPLOAD:D.lx.UPLOAD_BACKGROUND_MODAL_UPLOAD)},l.createElement(z.A,{icon:"Image",style:{fontSize:20,verticalAlign:"text-top"}}),E("Add image")):l.createElement("div",{className:"ant-input-file-uploader upload-bg-image__inner-wrap",onClick:e=>{var t,a,l,o;null!==(t=e.target)&&void 0!==t&&t.closest(".upload-bg-image__edit")||null!==(a=e.target)&&void 0!==a&&a.closest(".upload-bg-image__edit-menu")||null!==(l=e.target)&&void 0!==l&&l.closest(".upload-bg-image__menu")||null!==(o=e.target)&&void 0!==o&&o.closest(".inputGroup")||O(r.startsWith("src")?D.lx.UPLOAD_IMAGE_MODAL_UPLOAD:D.lx.UPLOAD_BACKGROUND_MODAL_UPLOAD)}},l.createElement(N.A,{arrow:!0,dropdownRender:()=>h.imagePathDropdownEnabled?l.createElement("div",{className:"inputGroup"},l.createElement(w.A,{prefix:l.createElement(z.A,{icon:"Image",style:{fontSize:20,verticalAlign:"text-top"}}),allowClear:!0,onChange:e,value:t,placeholder:o,name:r,disabled:n,className:"upload-bg-image__input"})):l.createElement(l.Fragment,null),overlayClassName:"upload-bg-image__dropdown-overlay",overlayStyle:{top:32,marginTop:"8px",width:347,left:0},trigger:["hover"],placement:"bottom",getPopupContainer:e=>e.closest(".upload-bg-image__inner-wrap")},l.createElement("div",{className:"upload-bg-image__hover-container",style:{display:"flex",alignItems:"center"}},l.createElement("div",{className:"upload-bg-image__uploader"},l.createElement("div",{className:"upload-bg-image__uploader-content"},l.createElement("div",{className:"upload-bg-image__uploader-content-inner"},l.createElement("div",{className:"upload-bg-image__uploader-img-wrap"},l.createElement("img",{className:"upload-bg-image__uploader-img",src:t,alt:""})),l.createElement("div",{className:"upload-bg-image__uploader-icons-wrap"},l.createElement("div",{className:"upload-bg-image__uploader-content"}))))),v.width&&v.height?l.createElement("div",{className:"image-size"},v.width," \xd7 ",v.height,!!s&&(s.type===D.bV.IMG||s.type===D.bV.CAROUSEL)&&" \u2192 "+d.renderedWidth+" \xd7 "+d.renderedHeight,l.createElement("span",{className:"image-size-splitter"}," \xa0\u2022\xa0 "),l.createElement("span",null,v.size," ",E("kB")),v.format&&l.createElement(l.Fragment,null,l.createElement("span",{className:"image-size-splitter"}," \xa0\u2022\xa0 "),l.createElement("span",{className:"image-size-format"},v.format))):l.createElement(Be,{type:"secondary",className:"image-empty-text"},o))),l.createElement("div",{style:{flexGrow:1}}),"gif"!==v.format&&h.imageCenterEditorEnabled&&l.createElement(i.A,{title:E("Edit")},l.createElement(Be,{type:"link",className:"upload-bg-image__edit"},l.createElement(xe.A,{style:{fontSize:16},onClick:e=>{M?(S(!0),x(5)):(O(),B((0,V.Wz)(D.lx.IMAGE_EDITOR_MODAL)))}}))),l.createElement(N.A,{key:"Actions",arrow:{pointAtCenter:!0},placement:"bottom",menu:{items:F},overlayClassName:"upload-bg-image__menu"},l.createElement(Be,{type:"link",className:"upload-bg-image__edit-menu image-change"},!t||t&&"error"===a?E("Upload"):l.createElement(z.A,{style:{fontSize:20},icon:"Reload",onClick:()=>O(r.startsWith("src")?D.lx.UPLOAD_IMAGE_MODAL_UPLOAD:D.lx.UPLOAD_BACKGROUND_MODAL_UPLOAD)})))),l.createElement(Ce.A,{open:_,onCancel:()=>{S(!1)},initialSlide:k}))};var Re=a(87396);const{useToken:Ne}=n.A,Le=({form:e,label:t,name:a,disabled:o,elementSettings:n})=>{var r;const i=(0,Re.FH)((null===n||void 0===n?void 0:n.type)===D.bV.CAROUSEL?["images",a]:[a],e),[s,d]=(0,l.useState)("success"),{token:m}=Ne();return(0,l.useEffect)((()=>{i?(0,F.DI)(i).then((e=>{d(e)})).catch((e=>{d(e)})):d("")}),[i]),l.createElement(S.A.Item,{name:a,validateStatus:s,style:{marginBottom:m.formItemMarginBottomXS}},l.createElement(Te,{validateStatus:s,placeholder:t,name:a,disabled:o,elementSettings:n,imageInfo:(null===n||void 0===n?void 0:n.type)===D.bV.CAROUSEL?null===n||void 0===n||null===(r=n.carouselImages)||void 0===r?void 0:r[a.split("_")[1]]:n}))};Le.defaulProps={disabled:!1};const Pe=Le;var Ie=a(54838),Me=a(52919);const{backgroundColor:Oe,backgroundImage:Ve,backgroundPositionX:Fe,backgroundPositionY:De,backgroundRepeat:He,backgroundSize:je,responsive:ze,backgroundColorContent:We,width:Ge}={backgroundColor:"backgroundColor",backgroundImage:"backgroundImage",backgroundPositionX:"backgroundPositionX",backgroundPositionY:"backgroundPositionY",backgroundRepeat:"backgroundRepeat",backgroundSize:"backgroundSize",responsive:"responsive",backgroundColorContent:"backgroundColorContent",width:"width"},Ue={[Oe]:"",[Ve]:"",[Fe]:"",[De]:"",[He]:"checked",[je]:"",[We]:"",[Ge]:""},{useToken:qe}=n.A,Ze=({className:e,email:t})=>{var a,o,n;const{__:r}=(0,y.s9)(),{token:d}=qe(),c=(0,f.wA)(),p=(0,Y.rD)(),[g]=S.A.useForm(),E=(0,Me.XW)(),v=(0,f.d4)(W.uJ),A=(0,f.d4)(W.iy),_=(0,f.d4)(Ie.B),x=(0,f.d4)(W.mD),[T,R]=(0,l.useState)(!0),N=r("Email not yet loaded or global container not found.");(0,l.useEffect)((()=>{x&&(c((0,W.S_)(!1)),E({operation:D.Ru.INIT_PREVIEW}))}),[g,x,c,E,t.common_styles]);const L=[{label:r("Not defined"),value:"none"},{label:r("Do not repeat background (no-repeat)"),value:"no-repeat"},{label:r("Repeat background (repeat)"),value:"repeat"},{label:r("Repeat background horizontally (repeat-x)"),value:"repeat-x"},{label:r("Repeat background vertically (repeat-y)"),value:"repeat-y"}],P=[{label:r("Not defined"),value:""},{label:r("Contain"),value:"contain"},{label:r("Cover"),value:"cover"}];(0,l.useEffect)((()=>{var e,t,a,l;g.setFieldsValue({...v,width:null===(e=v.width)||void 0===e?void 0:e.value,widthDim:null===(t=v.width)||void 0===t?void 0:t.dim,backgroundImage:v.backgroundImage?null===(a=v.backgroundImage[0])||void 0===a?void 0:a.value:"",backgroundRepeat:""===v[He]?"repeat":v[He],backgroundSize:v[je],responsive:null===(l=v.responsive)||void 0===l?void 0:l.shutdown}),R(!v.backgroundImage)}),[v,g]);return l.createElement("div",{className:C()("appearance-panel",{[e]:e})},l.createElement(S.A,{form:g,layout:"vertical",name:"appearance_panel_form",initialValues:{remember:!1,...Ue},onValuesChange:e=>{var t;const a=g.getFieldsValue(!0),l=Object.keys(e)[0];switch(l){case Fe:case De:E({operation:D.Ru.SANDBOX_EMAIL_SETTINGS_SET,settings:{[l]:""===e[l]?"none":e[l]}});break;case Ve:R(""===e[l]),E({operation:D.Ru.SANDBOX_EMAIL_SETTINGS_SET,settings:{[l]:[{...null===v||void 0===v||null===(t=v.backgroundImage)||void 0===t?void 0:t[0],type:"url",value:e[l]}],backgroundSize:"cover"}});break;case ze:E({operation:D.Ru.SANDBOX_EMAIL_SETTINGS_SET,settings:{responsive:{shutdown:e[l],styles:e[l]},width:a.width}});break;default:E({operation:D.Ru.SANDBOX_EMAIL_SETTINGS_SET,settings:e})}},autoComplete:"off",className:"element-controls"},A?l.createElement(u.A,{style:{marginBottom:"24px"},message:N,type:"error"}):null,l.createElement(S.A.Item,{style:{marginBottom:"0"}},l.createElement("div",{className:"form-group-title",style:{paddingTop:0}},r("Email layout width")),l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:null!==(a=v.width)&&void 0!==a&&a.value?r("This field sets the width of the email."):r("Couldn`t determine the email width"),placement:"right"},l.createElement(S.A.Item,{name:"width",style:{marginBottom:d.formItemMarginBottomXS}},l.createElement(Ee.A,{min:0,placeholder:r("Width"),prefix:l.createElement(fe.A,null),disabled:!(null!==(o=v.width)&&void 0!==o&&o.value),addonAfter:"px"}))))),l.createElement(b.A,{gutter:20},l.createElement(h.A,{span:24},l.createElement(s.A,{size:8,align:"baseline"},l.createElement(S.A.Item,{name:"responsive",valuePropName:"checked"},l.createElement(B.A,{size:"small",name:"responsive",id:"responsive",disabled:void 0===(null===(n=v.responsive)||void 0===n?void 0:n.shutdown),onChange:e=>{c((0,Ie.wW)({shutdown:e,styles:e})),E({operation:D.Ru.SANDBOX_IFRAME_SETSIZE,settings:{iframeWidth:document.querySelector(".email-pane__iframe").getBoundingClientRect().width}})}})),l.createElement("div",{className:"ant-form-item-switch-label"},l.createElement("label",{htmlFor:"responsive",style:{verticalAlign:"middle"}},r("Responsive email"))))))),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},r("Email background color")),l.createElement(b.A,{gutter:10,style:{paddingBottom:T?16:4}},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:r("Background color"),placement:"bottom"},l.createElement(S.A.Item,{name:Oe,style:{marginBottom:d.formItemMarginBottomXS},rules:[{message:r("Please set the background color")}]},l.createElement(ye,{placeholder:r("Background color"),usedColors:v.usedColors})))),l.createElement(h.A,{span:T?12:24},p.formEmailFieldBackgroundImageEnabled&&l.createElement(l.Fragment,null,l.createElement(Pe,{form:g,label:r("Background image"),name:Ve,tooltipTitle:r("Background image"),disabled:A||"Styles"!==_,elementSettings:v}),!T&&l.createElement(l.Fragment,null,l.createElement(S.A.Item,{style:{marginBottom:"0"}},l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:r("Horizontal position"),placement:"bottom"},l.createElement(S.A.Item,{name:Fe,style:{marginBottom:d.formItemMarginBottomXS}},l.createElement(w.A,{placeholder:r("Horizontal position"),prefix:l.createElement(z.A,{icon:"BgPositionHorizontal"})})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:r("Vertical position"),placement:"bottom"},l.createElement(S.A.Item,{name:De,style:{marginBottom:d.formItemMarginBottomXS}},l.createElement(w.A,{placeholder:r("Vertical position"),prefix:l.createElement(z.A,{icon:"BgPositionVertical"})})))))),l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:r("Background image repeat"),placement:"bottom"},l.createElement(S.A.Item,{name:He},l.createElement(k.A,{placeholder:r("Please select"),disabled:A,options:L,getPopupContainer:e=>e.parentNode})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:r("Background image size"),placement:"top"},l.createElement(S.A.Item,{name:je},l.createElement(k.A,{placeholder:r("Please select"),disabled:A,options:P,getPopupContainer:e=>e.parentNode})))))))))))};Ze.defaultProps={className:""};const Xe=Ze;var Ke=a(22536);const{Option:Ye}=k.A,{width:$e,widthDim:Qe}={width:"width",widthDim:"widthDim"},Je={[$e]:"",[Qe]:""},et=({className:e})=>{const{__:t}=(0,y.s9)(),a=(0,f.d4)(Ke.JV),o=(0,f.d4)(Ke.iy),[n]=S.A.useForm(),r=(0,Me.XW)(),i=t("Block not yet loaded or global container not found.");(0,l.useEffect)((()=>{n.setFieldsValue({width:a.width.value,widthDim:a.width.dim})}),[a,n]);return l.createElement("div",{className:C()("block-appearance-panel",{[e]:e})},l.createElement(S.A,{form:n,layout:"vertical",name:"block_appearance_panel_form",initialValues:{remember:!1,...Je},onValuesChange:e=>{const t=n.getFieldsValue(!0),a=Object.keys(e)[0];let l;switch(a){case"width":l={[a]:{value:e[a],dim:t.widthDim}};break;case"widthDim":l={width:{value:t.width,dim:e[a]}};break;default:return}r({operation:D.Ru.SANDBOX_BLOCK_SETTINGS_SET,settings:l})},autoComplete:"off"},o?l.createElement(u.A,{style:{marginBottom:"24px"},message:i,type:"error"}):null,l.createElement(S.A.Item,{label:t("Container width"),name:$e,tooltip:{title:t("Specifies the block width."),icon:l.createElement(T.A,null)},rules:[{message:t("Please input container width")}]},l.createElement(w.A,{disabled:o,placeholder:t("Container width"),addonAfter:l.createElement(S.A.Item,{name:"widthDim",noStyle:!0},l.createElement(k.A,{className:"select-after",getPopupContainer:e=>e.parentNode},l.createElement(Ye,{value:"px"},"px"),l.createElement(Ye,{value:"%"},"%")))}))))};et.defaultProps={className:""};const tt=et;var at=a(46409),lt=a(78320),ot=a(67073),nt=a(20721),rt=a(96698),it=a(73114),st=a(98447);let dt=null,mt=null;const ct=[{label:"Segoe UI, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif",value:"-apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif",className:"Segoe"},{label:"Helvetica, Helvetica Neue, Arial, Roboto, sans-serif",value:"Helvetica, 'Helvetica Neue', Roboto, Arial, sans-serif",className:"Helvetica"},{label:"Arial Black, Gadget, sans-serif",value:"'Arial Black', Gadget, sans-serif",className:"ArialBlack"},{label:"Comic Sans MS, cursive",value:"'Comic Sans MS', cursive",className:"ComicSans"},{label:"Courier New, Courier, monospace",value:"'Courier New', Courier, monospace",className:"CourierNew"},{label:"Georgia, serif",value:"Georgia, serif",className:"Georgia"},{label:"Impact, Charcoal, sans-serif",value:"Impact, Charcoal, sans-serif",className:"Impact"},{label:"Lucida Console, Monaco, monospace",value:"'Lucida Console', Monaco, monospace",className:"LucidaConsole"},{label:"Lucida Sans Unicode, Lucida Grande, sans-serif",value:"'Lucida Sans Unicode', 'Lucida Grande', sans-serif",className:"LucidaSans"},{label:"Palatino Linotype, Book Antiqua, Palatino, serif",value:"'Palatino Linotype', 'Book Antiqua', Palatino, serif",className:"Palatino"},{label:"Tahoma, Geneva, sans-serif",value:"Tahoma, Geneva, sans-serif",className:"Tahoma"},{label:"Times New Roman, Times, serif",value:"'Times New Roman', Times, serif",className:"TimesNewRoman"},{label:"Trebuchet MS, Helvetica, sans-serif",value:"'Trebuchet MS', Helvetica, sans-serif",className:"Trebuchet"},{label:"Verdana, Geneva, sans-serif",value:"Verdana, Geneva, sans-serif",className:"Verdana"}],ut={100:"Thin","100i":"Thin Italic",200:"ExtraLight","200i":"ExtraLight Italic",300:"Light","300i":"Light Italic",400:"Regular","400i":"Regular Italic",500:"Medium","500i":"Medium Italic",600:"SemiBold","600i":"SemiBold Italic",700:"Bold","700i":"Bold Italic",800:"ExtraBold","800i":"ExtraBold Italic",900:"Black","900i":"Black Italic"},pt=({value:e,onChange:t,textEditor:o=!1,codeMode:n=!1})=>{const{__:r}=(0,y.s9)(),[i,s]=(0,l.useState)(),[d,m]=(0,l.useState)(e),[c,u]=(0,l.useState)(null),[p,g]=(0,l.useState)(!0),b=[],h=[];if((0,l.useEffect)((()=>{(dt?Promise.resolve(dt):mt||(a.p.replace(/\/$/,""),mt=a.e(2642).then(a.t.bind(a,42642,19)).then((({default:e})=>(dt=e,dt))).catch((e=>{throw e})),mt)).then((e=>{u(e),g(!1)})).catch((()=>g(!1)))}),[]),(0,l.useEffect)((()=>{if(!c)return;const t=c.familyMetadataList.filter((e=>e.subsets.includes("cyrillic")&&"Sans Serif"===e.category&&e.popularity<100)),a=c.familyMetadataList.filter((e=>e.subsets.includes("cyrillic")&&"Serif"===e.category&&e.popularity<100));if(o&&e!==d)if(e)if("Sans Serif"===e[1]){var l;s(["Google Fonts","Sans Serif",null===(l=t.find((t=>(null===t||void 0===t?void 0:t.family.replace(/\s/g,""))===e[2].replace(/\s/g,""))))||void 0===l?void 0:l.family,e[3].replace(/Italic/g," Italic")])}else if("Serif"===e[1]){var n;s(["Google Fonts","Serif",null===(n=a.find((t=>(null===t||void 0===t?void 0:t.family.replace(/\s/g,""))===e[2].replace(/\s/g,""))))||void 0===n?void 0:n.family,e[3].replace(/Italic/g," Italic")])}else"Safe Fonts"!==e[0]&&void 0!==i||s(e);else s([""]);else void 0===i&&d&&s(e);o||s(e),m(e)}),[e,c,o,d,i]),c){c.familyMetadataList.filter((e=>e.subsets.includes("cyrillic")&&"Sans Serif"===e.category&&e.popularity<100)).forEach((e=>{b.push({label:e.family,value:e.family,children:Object.keys(e.fonts).filter((e=>ut[e])).map((e=>({label:ut[e],value:ut[e]})))})}));c.familyMetadataList.filter((e=>e.subsets.includes("cyrillic")&&"Serif"===e.category&&e.popularity<100)).forEach((e=>h.push({label:e.family,value:e.family,children:Object.keys(e.fonts).filter((e=>ut[e])).map((e=>({label:ut[e],value:ut[e]})))})))}return l.createElement(it.A,{allowClear:!1,showSearch:!0,value:i,placement:"bottomRight",options:p?[{label:l.createElement(st.A,{size:"small",style:{marginLeft:8}}),value:"loading",disabled:!0}]:[{label:r("Safe Fonts"),value:"Safe Fonts",children:ct},{label:r("Google Fonts"),value:"Google Fonts",children:[{label:r("Sans Serif"),value:"Sans Serif",children:b},{label:r("Serif"),value:"Serif",children:h}]}],getPopupContainer:e=>e.closest(n?".selected_text_common_form_mobile":o?".email-pane__collapse-wrapper":".email-pane__content-col"),onChange:t})};var gt=a(50483),bt=a(60994),ht=a(2922),Et=a(81149);const ft=({form:e,elementSettings:t,imgParent:a,name:o="align",setAlignStateHandle:n=e=>{},withHotKeys:r=!0})=>{const{__:d}=(0,y.s9)(),m=(0,Me.XW)(),[c,u]=(0,l.useState)(t[o]),[p,g]=(0,l.useState)(null);(0,l.useEffect)((()=>{var e,t;null!==(e=window)&&void 0!==e&&null!==(t=e.navigator)&&void 0!==t&&t.userAgent.includes("Macintosh")&&g(!0)}),[]);const b=a=>{const l=a.target.value;n(l);const r={[o]:""};l!==c?u(l):(u(""),e.setFieldsValue(r),m({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:r}))};return l.createElement(S.A.Item,{name:o},l.createElement(gt.Ay.Group,{disabled:a&&!t.parent},l.createElement(s.A,{size:8},l.createElement(i.A,{placement:"bottom",title:d(r?p?"Text align left ( \u2318+Shift+L )":"Text align left ( Ctrl+Shift+L )":"Text align left")},l.createElement(gt.Ay.Button,{value:"left",onClick:b},l.createElement(bt.A,null))),l.createElement(i.A,{placement:"bottom",title:d(r?p?"Text align center ( \u2318+Shift+E )":"Text align center ( Ctrl+Shift+E )":"Text align center")},l.createElement(gt.Ay.Button,{value:"center",onClick:b},l.createElement(ht.A,null))),l.createElement(i.A,{placement:"bottom",title:d(r?p?"Text align right ( \u2318+Shift+R )":"Text align right ( Ctrl+Shift+R )":"Text align right")},l.createElement(gt.Ay.Button,{value:"right",onClick:b},l.createElement(Et.A,null))),l.createElement(i.A,{placement:"bottom",title:d(r?p?"Text align justify ( \u2318+Shift+J )":"Text align justify ( Ctrl+Shift+J )":"Text align justify")},l.createElement(gt.Ay.Button,{value:"justify",onClick:b},l.createElement(z.A,{icon:"Justify"}))))))};ft.defaultProps={imgParent:!1};const vt=ft;var yt=a(17216),At=a(82984),_t=a(85372),Ct=a(8239),St=a(91916),wt=a(48947),kt=a(51157),xt=a(42734);const{useToken:Bt}=n.A,Tt=({borders:e,namePrefix:t=""})=>{const a=(0,f.d4)(W.uJ),{__:o,_x:n}=(0,y.s9)(),r=e=>(null===e||void 0===e?void 0:e.width)||(null===e||void 0===e?void 0:e.style)||(null===e||void 0===e?void 0:e.color),{token:d}=Bt();return l.createElement(b.A,{gutter:30},l.createElement(h.A,{span:12,className:"selected-td-form__border-col"},l.createElement(S.A.Item,{name:t+"borderColor",className:"form-item-margin-xs"},l.createElement(ye,{placeholder:o("Color"),usedColors:a.usedColors})),l.createElement(S.A.Item,{name:t+"borderWidth",className:"form-item-margin-xs"},l.createElement(Ee.A,{min:0,placeholder:n("Width","border"),addonAfter:"px"})),l.createElement(S.A.Item,{name:t+"borderStyle",className:"form-item-margin-xs"},l.createElement(gt.Ay.Group,null,l.createElement(s.A,{size:8},l.createElement(i.A,{placement:"bottom",title:o("Solid")},l.createElement(gt.Ay.Button,{value:"solid"},l.createElement(yt.A,null))),l.createElement(i.A,{placement:"bottom",title:o("Dashed")},l.createElement(gt.Ay.Button,{value:"dashed"},l.createElement(At.A,null))),l.createElement(i.A,{placement:"bottom",title:o("Dotted")},l.createElement(gt.Ay.Button,{value:"dotted"},l.createElement(_t.A,null))))))),l.createElement(h.A,{span:12,style:{textAlign:"center"}},l.createElement(S.A.Item,{label:"",name:t+"borderPosition",labelCol:{span:8}},l.createElement(gt.Ay.Group,null,l.createElement(s.A,{size:d.formItemMarginBottomXS,direction:"vertical"},l.createElement(b.A,null,l.createElement(i.A,{placement:"top",title:o("Above")},l.createElement(gt.Ay.Button,{value:"top",style:{margin:"auto"},className:C()("",{"selected-td-form__border-radio":r(null===e||void 0===e?void 0:e.top)})},l.createElement(Ct.A,null)))),l.createElement(b.A,null,l.createElement(s.A,{size:d.formItemMarginBottomXS},l.createElement(i.A,{placement:"left",title:o("On the left")},l.createElement(gt.Ay.Button,{value:"left",className:C()("",{"selected-td-form__border-radio":r(null===e||void 0===e?void 0:e.left)})},l.createElement(St.A,null))),l.createElement(i.A,{placement:"top",title:o("Around")},l.createElement(gt.Ay.Button,{value:"all",className:C()("",{"selected-td-form__border-radio":r(null===e||void 0===e?void 0:e.all)})},l.createElement(wt.A,null))),l.createElement(i.A,{placement:"right",title:o("On the right")},l.createElement(gt.Ay.Button,{value:"right",className:C()("",{"selected-td-form__border-radio":r(null===e||void 0===e?void 0:e.right)})},l.createElement(kt.A,null))))),l.createElement(b.A,null,l.createElement(i.A,{placement:"bottom",title:o("Below")},l.createElement(gt.Ay.Button,{value:"bottom",className:C()("",{"selected-td-form__border-radio":r(null===e||void 0===e?void 0:e.bottom)}),style:{margin:"auto"}},l.createElement(xt.A,null)))))))))};var Rt,Nt=a(78469),Lt=a(31573),Pt=a(39672),It=a(70552);function Mt(){return Mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},Mt.apply(null,arguments)}function Ot({title:e,titleId:t,...a},o){return l.createElement("svg",Mt({fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",ref:o,"aria-labelledby":t},a),e?l.createElement("title",{id:t},e):null,Rt||(Rt=l.createElement("path",{d:"M6.5 1.143H5.25A4.108 4.108 0 0 0 1.143 5.25V6.5c0 .078.064.143.142.143h1a.143.143 0 0 0 .143-.143V5.25A2.82 2.82 0 0 1 5.25 2.428H6.5a.143.143 0 0 0 .143-.143v-1a.143.143 0 0 0-.143-.142ZM14.857 6.5V5.25a4.108 4.108 0 0 0-4.107-4.107H9.5a.143.143 0 0 0-.143.142v1c0 .079.064.143.143.143h1.25A2.82 2.82 0 0 1 13.57 5.25V6.5c0 .078.065.143.143.143h1a.143.143 0 0 0 .143-.143ZM9.5 14.857h1.25a4.108 4.108 0 0 0 4.107-4.107V9.5a.143.143 0 0 0-.143-.143h-1a.143.143 0 0 0-.143.143v1.25a2.82 2.82 0 0 1-2.821 2.821H9.5a.143.143 0 0 0-.143.143v1c0 .079.064.143.143.143ZM1.143 9.5v1.25a4.108 4.108 0 0 0 4.107 4.107H6.5a.143.143 0 0 0 .143-.143v-1a.143.143 0 0 0-.143-.143H5.25a2.82 2.82 0 0 1-2.822-2.821V9.5a.143.143 0 0 0-.143-.143h-1a.143.143 0 0 0-.142.143Z",fill:"inherit"})))}const Vt=l.forwardRef(Ot);a.p;var Ft=a(80877);const Dt=({form:e,oneBorderRadiusValue:t,setOneBorderRadiusValue:a,elementSettings:o,namePrefix:n=""})=>{const{__:r}=(0,y.s9)(),d=(0,Me.XW)();return l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(s.A,{size:10,align:"start"},l.createElement(S.A.Item,{name:n+"borderRadiusAll"},l.createElement(Ft.A,{min:0,placeholder:r("Border radius"),prefix:l.createElement(Vt,{className:"selected-td-form__icon-radius"}),disabled:!t,addonAfter:"px"})))),l.createElement(h.A,{span:12},l.createElement(g.Ay,{className:C()("selected-td-form__button",{"selected-td-form__button--active":!t}),onClick:()=>{const l=e.getFieldsValue(!0);t&&e.setFieldsValue({borderRadiusTopLeft:l.borderRadiusAll,borderRadiusBottomLeft:l.borderRadiusAll,borderRadiusTopRight:l.borderRadiusAll,borderRadiusBottomRight:l.borderRadiusAll}),d({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:{borderRadius:{all:l.borderRadiusAll}}}),a((e=>!e))}},l.createElement(Vt,{className:"selected-td-form__icon-radius"}))),l.createElement(h.A,null,l.createElement(b.A,{gutter:10,style:{marginTop:-10}},l.createElement(h.A,{span:12},l.createElement(i.A,{placement:"bottom",title:r("Top left corner")},l.createElement(S.A.Item,{hidden:t,name:n+"borderRadiusTopLeft",className:"form-item-margin-xs"},l.createElement(Ft.A,{min:0,prefix:l.createElement(Nt.A,null),style:{minHeight:10},addonAfter:"px"}))),l.createElement(i.A,{placement:"bottom",title:r("Bottom left corner")},l.createElement(S.A.Item,{hidden:t,name:n+"borderRadiusBottomLeft"},l.createElement(Ft.A,{min:0,prefix:l.createElement(Lt.A,null),style:{minHeight:10},addonAfter:"px"})))),l.createElement(h.A,{span:12},l.createElement(i.A,{placement:"bottom",title:r("Top right corner")},l.createElement(S.A.Item,{hidden:t,name:n+"borderRadiusTopRight",className:"form-item-margin-xs"},l.createElement(Ft.A,{min:0,prefix:l.createElement(Pt.A,null),style:{minHeight:10},addonAfter:"px"}))),l.createElement(i.A,{placement:"bottom",title:r("Bottom right corner")},l.createElement(S.A.Item,{hidden:t,name:n+"borderRadiusBottomRight"},l.createElement(Ft.A,{min:0,prefix:l.createElement(It.A,null),style:{minHeight:10},addonAfter:"px"})))))))};var Ht=a(48300),jt=a(10267),zt=a(63346),Wt=a(89715),Gt=a(61657),Ut=a(91447);const qt=({linkProtocol:e})=>{switch(e){case"https://":default:return l.createElement(Ht.A,{rev:""});case"mailto:":return l.createElement(jt.A,{rev:""});case"tel:":return l.createElement(zt.A,{rev:""});case"sms:":return l.createElement(Wt.A,{rev:""});case"ftp://":return l.createElement(Gt.A,{rev:""});case"skype:":return l.createElement(Ut.A,{rev:""})}},Zt=({handleLinkProtocolsChange:e,linkProtocol:t,__:a})=>l.createElement(k.A,{style:{width:90,textAlign:"left"},value:t,onChange:e,getPopupContainer:e=>e.parentNode,options:[{value:"https://",label:a("Site")},{value:"mailto:",label:a("E-mail")},{value:"tel:",label:a("Phone")},{value:"sms:",label:a("SMS")},{value:"ftp://",label:a("File")},{value:"skype:",label:a("Skype")},{value:"viber:",label:a("Viber")},{value:"",label:a("Other")}]}),{mobileBorderRadiusAll:Xt,mobileRadiusTopLeft:Kt,mobileRadiusBottomLeft:Yt,mobileRadiusTopRight:$t,mobileRadiusBottomRight:Qt,borderRadiusBottomRight:Jt,borderRadiusTopRight:ea,borderRadiusBottomLeft:ta,borderRadiusTopLeft:aa,alt:la,src:oa,title:na,link:ra,borderRadiusAll:ia,imgReplacer:sa,expanded:da}={link:"link",borderRadiusBottomRight:"borderRadiusBottomRight",borderRadiusTopRight:"borderRadiusTopRight",borderRadiusBottomLeft:"borderRadiusBottomLeft",borderRadiusTopLeft:"borderRadiusTopLeft",mobileBorderRadiusAll:"mobileBorderRadiusAll",mobileRadiusTopLeft:"mobileRadiusTopLeft",mobileRadiusBottomLeft:"mobileRadiusBottomLeft",mobileRadiusTopRight:"mobileRadiusTopRight",mobileRadiusBottomRight:"mobileRadiusBottomRight",alt:"alt",imgReplacer:"imgReplacer",src:"src",title:"title",borderRadiusAll:"borderRadiusAll",expanded:"expanded"},ma={paddingTop:"top",paddingLeft:"left",paddingRight:"right",paddingBottom:"bottom",mobilePaddingTop:"top",mobilePaddingLeft:"left",mobilePaddingRight:"right",mobilePaddingBottom:"bottom"},ca={borderRadiusAll:"all",borderRadiusTopLeft:"topLeft",borderRadiusBottomLeft:"bottomLeft",borderRadiusTopRight:"topRight",borderRadiusBottomRight:"bottomRight"},ua={mobileBorderRadiusAll:"all",mobileRadiusTopLeft:"topLeft",mobileRadiusBottomLeft:"bottomLeft",mobileRadiusTopRight:"topRight",mobileRadiusBottomRight:"bottomRight"},pa=(e,t)=>e.startsWith("mailto:")?"mailto:":e.startsWith("tel:")?"tel:":e.startsWith("sms:")?"sms:":e.startsWith("ftp://")?"ftp://":e.startsWith("skype:")?"skype:":e.startsWith("viber:")?"viber:":t,ga=e=>e||(0===e?"0":""),ba=e=>e&&"auto"!==e?e:0===e?"0":"";function ha(e){var t,a,l,o,n,r,i,s,d,m,c,u,p,g,b,h,E,f,v,y;let A={...e,link:e.link?e.link:"https://",borderRadiusAll:ga(null===(t=e.borderRadius)||void 0===t?void 0:t.all),borderRadiusTopLeft:ga(null===(a=e.borderRadius)||void 0===a?void 0:a.topLeft),borderRadiusBottomLeft:ga(null===(l=e.borderRadius)||void 0===l?void 0:l.bottomLeft),borderRadiusTopRight:ga(null===(o=e.borderRadius)||void 0===o?void 0:o.topRight),borderRadiusBottomRight:ga(null===(n=e.borderRadius)||void 0===n?void 0:n.bottomRight),mobileBorderRadiusAll:ga(null===(r=e.mobileBorderRadius)||void 0===r?void 0:r.all),mobileRadiusTopLeft:ga(null!==(null===(i=e.mobileBorderRadius)||void 0===i?void 0:i.topLeft)?null===(s=e.mobileBorderRadius)||void 0===s?void 0:s.topLeft:null===(d=e.mobileBorderRadius)||void 0===d?void 0:d.all),mobileRadiusBottomLeft:ga(null!==(null===(m=e.mobileBorderRadius)||void 0===m?void 0:m.bottomLeft)?null===(c=e.mobileBorderRadius)||void 0===c?void 0:c.bottomLeft:null===(u=e.mobileBorderRadius)||void 0===u?void 0:u.all),mobileRadiusTopRight:ga(null!==(null===(p=e.mobileBorderRadius)||void 0===p?void 0:p.topRight)?null===(g=e.mobileBorderRadius)||void 0===g?void 0:g.topRight:null===(b=e.mobileBorderRadius)||void 0===b?void 0:b.all),mobileRadiusBottomRight:ga(null!==(null===(h=e.mobileBorderRadius)||void 0===h?void 0:h.bottomRight)?null===(E=e.mobileBorderRadius)||void 0===E?void 0:E.bottomRight:null===(f=e.mobileBorderRadius)||void 0===f?void 0:f.all),show:e.show?e.show:"all",altSrc:e.src};var _,C;e.video&&(A.videoPlayButton=null!==(_=e.video.playButton)&&void 0!==_?_:"youtube_red",A.videoSource=null!==(C=e.video.source)&&void 0!==C?C:"");if((null===(v=e.carouselImages)||void 0===v?void 0:v.length)>0){var S;let t={};null===(S=e.carouselImages)||void 0===S||S.map(((e,a)=>(Object.keys(e).forEach((l=>{t[l+"_"+a]=e[l]})),!0))),A.images=t}if((null===(y=e.sections)||void 0===y?void 0:y.length)>0){var w;let t=[];null===(w=e.sections)||void 0===w||w.map(((e,a)=>(t.push({[`expanded_${a}`]:e.expanded}),!0))),A.sections=t}return A}function Ea(e,t,a){const l=a.hasOwnProperty("images"),o=a.hasOwnProperty("sections"),n=Object.keys(l?a.images:o?a.sections:a)[0],r=l?a.images:o?a.sections:a;let i={};const s=t.getFieldsValue(!0);switch(n.split("_")[0]){case na:case oa:case la:case sa:if(l){let t=[...e.carouselImages];t[n.split("_")[1]][n.split("_")[0]]=r[n],i={carouselImages:t}}else i=r;break;case da:if(o){let t=[...e.sections];t[n.split("_")[1]][n.split("_")[0]]=r[n],i={sections:t}}break;case ra:let a=r[n];"https://http"===a.substring(0,12)&&(a=a.substring(8,a.length)),e.type===D.bV.CAROUSEL?(i.carouselImages=e.carouselImages,l?(t.setFieldValue(["images",[ra+"_"+n.split("_")[1]]],a),i.carouselImages[n.split("_")[1]].link=a,i.link="",t.setFieldValue(ra,"https://")):(e.carouselImages.forEach(((e,l)=>{t.setFieldValue(["images",ra+"_"+l],a),i.carouselImages[l].link=a,i.link=a})),t.setFieldValue(ra,a))):(t.setFieldValue(ra,a),i.link=a);break;case ia:i={borderRadius:{...e.borderRadius,[ca[aa]]:s[aa],[ca[ta]]:s[ta],[ca[ea]]:s[ea],[ca[Jt]]:s[Jt],[ca[n]]:+r[n]}};break;case aa:case ta:case ea:case Jt:i={borderRadius:{...e.borderRadius,[ca[ia]]:null,[ca[n]]:+r[n]}};break;case Xt:case Kt:case Yt:case $t:case Qt:i={mobileBorderRadius:{...e.mobileBorderRadius,[ua[Kt]]:s[Kt],[ua[Yt]]:s[Yt],[ua[$t]]:s[$t],[ua[Qt]]:s[Qt],[ua[n]]:r[n],classNamePrefix:"em-mob-border_radius_"+ua[n]+"-"}};break;default:i=r}return{...e,...i}}const{useToken:fa}=n.A,va=e=>{var t,a,l,o,n,r,i,s,d,m,c;return{textFontFamily:e.text.fontFamily,textFontSize:e.text.fontSize,textFontSizeDim:e.text.fontSizeDim,textLineHeight:e.text.lineHeight,textLineHeightDim:e.text.lineHeightDim,textColor:e.text.color,textContrastColor:e.text.contrastColor||"#FFFFFF",textAlign:e.text.textAlign,textPaddingBottom:e.text.paddingBottom,textPaddingBottomDim:e.text.paddingBottomDim,headingFontFamily:e.headings.fontFamily,headingFontSize:e.headings.fontSize,headingFontSizeDim:e.headings.fontSizeDim,headingLineHeight:e.headings.lineHeight,headingLineHeightDim:e.headings.lineHeightDim,headingColor:e.headings.color,headingContrastColor:e.headings.contrastColor||"#FFFFFF",headingAlign:e.headings.textAlign,headingPaddingTop:e.headings.paddingTop,headingPaddingTopDim:e.headings.paddingTopDim,headingPaddingBottom:e.headings.paddingBottom,headingPaddingBottomDim:e.headings.paddingBottomDim,headingLetterSpacing:e.headings.letterSpacing,headingLetterSpacingDim:e.headings.letterSpacingDim,headingBold:e.headings.bold,headingItalic:e.headings.italic,linkColor:e.links.color,linkContrastColor:e.links.contrastColor||"#FFFFFF",linkUnderline:e.links.underline,buttonsFontFamily:e.buttons.fontFamily,buttonsFontSize:e.buttons.fontSize,buttonsFontSizeDim:e.buttons.fontSizeDim,buttonsLetterSpacing:e.buttons.letterSpacing,buttonsLetterSpacingDim:e.buttons.letterSpacingDim,buttonsColor:e.buttons.color,buttonsContrastColor:e.buttons.contrastColor||"#1C52DC",buttonsBold:e.buttons.bold,buttonsItalic:e.buttons.italic,buttonsBackgroundColor:e.buttons.backgroundColor,buttonsContrastBackgroundColor:e.buttons.contrastBackgroundColor||"#FFFFFF",buttonsMarginTop:e.buttons.marginTop,buttonsMarginTopDim:e.buttons.marginTopDim,buttonsMarginBottom:e.buttons.marginBottom,buttonsMarginBottomDim:e.buttons.marginBottomDim,buttonsBorder:e.buttons.border,buttonsAlign:e.buttons.textAlign,buttonsBorderRadius:e.buttons.borderRadius,buttonsPadding:e.buttons.padding,cardsContrastBackgroundColor:(null===(t=e.cards)||void 0===t?void 0:t.contrastBackgroundColor)||"#1C52DC",cardsBaseBackgroundColor:(null===(a=e.cards)||void 0===a?void 0:a.baseBackgroundColor)||"#F8F8F8",cardsContrastTextColor:(null===(l=e.cards)||void 0===l?void 0:l.contrastTextColor)||"#FFFFFF",cardsBaseTextColor:(null===(o=e.cards)||void 0===o?void 0:o.baseTextColor)||"#5A5A5A",cardsBorder:(null===(n=e.cards)||void 0===n?void 0:n.border)||{all:null,top:null,right:null,bottom:null,left:null},cardsBorderRadius:(null===(r=e.cards)||void 0===r?void 0:r.borderRadius)||{all:10,topLeft:null,topRight:null,bottomRight:null,bottomLeft:null},blockBackgroundColor:e.block.backgroundColor||"",blockContrastBackgroundColor:e.block.contrastBackgroundColor||"#1C52DC",blockPaddingAll:null===(i=e.block.padding)||void 0===i?void 0:i.all,blockPaddingTop:null===(s=e.block.padding)||void 0===s?void 0:s.top,blockPaddingRight:null===(d=e.block.padding)||void 0===d?void 0:d.right,blockPaddingBottom:null===(m=e.block.padding)||void 0===m?void 0:m.bottom,blockPaddingLeft:null===(c=e.block.padding)||void 0===c?void 0:c.left}},ya={buttons_borderRadiusAll:"all",buttons_borderRadiusTopLeft:"topLeft",buttons_borderRadiusBottomLeft:"bottomLeft",buttons_borderRadiusTopRight:"topRight",buttons_borderRadiusBottomRight:"bottomRight"},Aa={cards_borderRadiusAll:"all",cards_borderRadiusTopLeft:"topLeft",cards_borderRadiusBottomLeft:"bottomLeft",cards_borderRadiusTopRight:"topRight",cards_borderRadiusBottomRight:"bottomRight"},_a=({className:e,email:t})=>{const{__:a}=(0,y.s9)(),o=(0,f.wA)(),n=(0,Me.XW)(),[r]=S.A.useForm(),d=(0,f.d4)(W.uJ),c=(0,f.d4)(W.dH),p=(0,Y.rD)(),{token:E}=fa(),[v,A]=(0,l.useState)({}),[_,w]=(0,l.useState)({}),[k,x]=(0,l.useState)(!0),[B,T]=(0,l.useState)(!0),[R,N]=(0,l.useState)(!1),[L,P]=(0,l.useState)(!1),I={buttonsPaddingTop:"top",buttonsPaddingLeft:"left",buttonsPaddingRight:"right",buttonsPaddingBottom:"bottom"},M=t.common_styles&&"{}"!==t.common_styles?JSON.parse(t.common_styles):D.BD,[O,V]=(0,l.useState)(M.headings.bold),[F,H]=(0,l.useState)(M.headings.italic),[j,G]=(0,l.useState)(M.links.underline),[U,q]=(0,l.useState)(M.buttons.bold),[Z,X]=(0,l.useState)(M.buttons.italic),[K,$]=(0,l.useState)(null),Q=!!t.common_styles&&"{}"!==t.common_styles,J=(0,f.d4)(Ie.Wm);(0,l.useEffect)((()=>{J||$(null)}),[M,$,J]),(0,l.useEffect)((()=>{J&&!K&&$(va(M))}),[M,K,J]),(0,l.useEffect)((()=>{c&&(o((0,W.RC)(!1)),r.setFieldsValue(va(M)))}),[r,c,o,M]);const[ee,te]=(0,l.useState)(Math.min(M.headings.fontSize-1,19)),[ae,le]=(0,l.useState)(Math.max(M.text.fontSize+1,20));(0,l.useEffect)((()=>{if(K){var e,t,a,l,o,n,i,s,d,m,c,u,p;const g=K.buttonsBorder;A(g);const b=Object.keys(g).find((e=>{var t,a,l;return(null===(t=g[e])||void 0===t?void 0:t.width)||(null===(a=g[e])||void 0===a?void 0:a.style)||(null===(l=g[e])||void 0===l?void 0:l.color)})),h=K.cardsBorder;w(h);const E=Object.keys(h).find((e=>{var t,a,l;return(null===(t=h[e])||void 0===t?void 0:t.width)||(null===(a=h[e])||void 0===a?void 0:a.style)||(null===(l=h[e])||void 0===l?void 0:l.color)}));r.setFieldsValue({buttons_borderPosition:b||"all",buttons_borderWidth:null!==(null===(e=g[b])||void 0===e?void 0:e.width)?null===(t=g[b])||void 0===t?void 0:t.width:"",buttons_borderColor:(null===(a=g[b])||void 0===a?void 0:a.color)||"",buttons_borderStyle:(null===(l=g[b])||void 0===l?void 0:l.style)||"",cards_borderPosition:E||"all",cards_borderWidth:null!==(null===(o=h[E])||void 0===o?void 0:o.width)?null===(n=h[E])||void 0===n?void 0:n.width:"",cards_borderColor:(null===(i=h[E])||void 0===i?void 0:i.color)||"",cards_borderStyle:(null===(s=h[E])||void 0===s?void 0:s.style)||"",buttons_borderRadiusAll:ga(K.buttonsBorderRadius.all),buttons_borderRadiusTopLeft:ga(K.buttonsBorderRadius.topLeft),buttons_borderRadiusBottomLeft:ga(K.buttonsBorderRadius.bottomLeft),buttons_borderRadiusTopRight:ga(K.buttonsBorderRadius.topRight),buttons_borderRadiusBottomRight:ga(K.buttonsBorderRadius.bottomRight),cards_borderRadiusAll:ga(K.cardsBorderRadius.all),cards_borderRadiusTopLeft:ga(K.cardsBorderRadius.topLeft),cards_borderRadiusBottomLeft:ga(K.cardsBorderRadius.bottomLeft),cards_borderRadiusTopRight:ga(K.cardsBorderRadius.topRight),cards_borderRadiusBottomRight:ga(K.cardsBorderRadius.bottomRight),blockPaddingAll:ga(K.blockPaddingAll),blockPaddingTop:ga(K.blockPaddingTop),blockPaddingRight:ga(K.blockPaddingRight),blockPaddingBottom:ga(K.blockPaddingBottom),blockPaddingLeft:ga(K.blockPaddingLeft),blockPaddingLeftRight:ga(K.blockPaddingRight)||ga(K.blockPaddingLeft),blockPaddingTopBottom:ga(K.blockPaddingTop)||ga(K.blockPaddingBottom)}),ga(K.blockPaddingAll)||!(ga(K.blockPaddingTop)||ga(K.blockPaddingRight)||ga(K.blockPaddingBottom)||ga(K.blockPaddingLeft))||K.blockPaddingTop===K.blockPaddingBottom&&K.blockPaddingRight===K.blockPaddingLeft?P(!0):P(!1),!ga(K.buttonsBorderRadius.all)&&(ga(K.buttonsBorderRadius.topLeft)||ga(K.buttonsBorderRadius.bottomLeft)||ga(K.buttonsBorderRadius.topRight)||ga(K.buttonsBorderRadius.bottomRight))?x(!1):x(!0),K.buttonsPadding&&!ga(K.buttonsPadding.all)&&(ga(K.buttonsPadding.bottom)||ga(K.buttonsPadding.right)||ga(K.buttonsPadding.left)||ga(K.buttonsPadding.top))&&N(!1),!ga(null===(d=K.cardsBorderRadius)||void 0===d?void 0:d.all)&&(ga(null===(m=K.cardsBorderRadius)||void 0===m?void 0:m.topLeft)||ga(null===(c=K.cardsBorderRadius)||void 0===c?void 0:c.bottomLeft)||ga(null===(u=K.cardsBorderRadius)||void 0===u?void 0:u.topRight)||ga(null===(p=K.cardsBorderRadius)||void 0===p?void 0:p.bottomRight))?T(!1):T(!0)}}),[r,K]);const oe=e=>{const t=e.target.closest("button"),a=t.name,l=t.classList.contains("selected-td-form__button--active");t.className=l?"ant-btn ant-btn-default":"ant-btn ant-btn-default selected-td-form__button--active",t.blur(),"headingBold"===a?V(!l):"headingItalic"===a?H(!l):"linkUnderline"===a?G(!l):"buttonsBold"===a?q(!l):"buttonsItalic"===a&&X(!l),n({operation:D.Ru.SANDBOX_EMAIL_SETTINGS_SET,settings:{[a]:!l}})};return K&&l.createElement("div",{className:C()("appearance-panel",{[e]:e})},l.createElement(S.A,{form:r,layout:"vertical",name:"content_appearance_panel_form",initialValues:K,onValuesChange:e=>{var t,a,l,o,i,s;const d=r.getFieldsValue(!0),m=Object.keys(e)[0];let c={};switch(m){case"headingFontSize":te(Math.min(d.headingFontSize-1,19)),c=e;break;case"textFontSize":le(Math.max(d.textFontSize+1,20)),c=e;break;case"buttons_borderStyle":c={buttonsBorder:{[d.buttons_borderPosition]:{...v[d.buttons_borderPosition],style:e[m]}}},"all"===d.buttons_borderPosition?A((t=>({...D.iV,[d.buttons_borderPosition]:{...t[d.buttons_borderPosition],style:e[m]}}))):A((t=>({...t,[d.buttons_borderPosition]:{...t[d.buttons_borderPosition],style:e[m]}})));break;case"buttons_borderColor":c={buttonsBorder:{[d.buttons_borderPosition]:{...v[d.buttonsBorderPosition],color:e[m]}}},"all"===d.buttons_borderPosition?A((t=>({...D.iV,[d.buttons_borderPosition]:{...t[d.buttons_borderPosition],color:e[m]}}))):A((t=>({...t,[d.buttons_borderPosition]:{...t[d.buttons_borderPosition],color:e[m]}})));break;case"buttons_borderWidth":c={buttonsBorder:{[d.buttons_borderPosition]:{...v[d.buttons_borderPosition],width:e[m]}}},"all"===d.buttonsBorderPosition?A((t=>({...D.iV,[d.buttons_borderPosition]:{...t[d.buttons_borderPosition],width:e[m]}}))):A((t=>({...t,[d.buttons_borderPosition]:{...t[d.buttons_borderPosition],width:e[m]}})));break;case"buttons_borderPosition":r.setFieldsValue({buttons_borderWidth:(null===(t=v[e[m]])||void 0===t?void 0:t.width)||"",buttons_borderColor:(null===(a=v[e[m]])||void 0===a?void 0:a.color)||"",buttons_borderStyle:(null===(l=v[e[m]])||void 0===l?void 0:l.style)||""});break;case"cards_borderStyle":c={cardsBorder:{[d.cards_borderPosition]:{..._[d.cards_borderPosition],style:e[m]}}},"all"===d.cards_borderPosition?w((t=>({...D.iV,[d.cards_borderPosition]:{...t[d.cards_borderPosition],style:e[m]}}))):w((t=>({...t,[d.cards_borderPosition]:{...t[d.cards_borderPosition],style:e[m]}})));break;case"cards_borderColor":c={cardsBorder:{[d.cards_borderPosition]:{..._[d.cardsBorderPosition],color:e[m]}}},"all"===d.cards_borderPosition?w((t=>({...D.iV,[d.cards_borderPosition]:{...t[d.cards_borderPosition],color:e[m]}}))):w((t=>({...t,[d.cards_borderPosition]:{...t[d.cards_borderPosition],color:e[m]}})));break;case"cards_borderWidth":c={cardsBorder:{[d.cards_borderPosition]:{..._[d.cards_borderPosition],width:e[m]}}},"all"===d.cardsBorderPosition?w((t=>({...D.iV,[d.cards_borderPosition]:{...t[d.cards_borderPosition],width:e[m]}}))):w((t=>({...t,[d.cards_borderPosition]:{...t[d.cards_borderPosition],width:e[m]}})));break;case"cards_borderPosition":r.setFieldsValue({cards_borderWidth:(null===(o=_[e[m]])||void 0===o?void 0:o.width)||"",cards_borderColor:(null===(i=_[e[m]])||void 0===i?void 0:i.color)||"",cards_borderStyle:(null===(s=_[e[m]])||void 0===s?void 0:s.style)||""});break;case"buttons_borderRadiusAll":case"buttons_borderRadiusTopLeft":case"buttons_borderRadiusBottomLeft":case"buttons_borderRadiusTopRight":case"buttons_borderRadiusBottomRight":c={buttonsBorderRadius:{[ya[m]]:+e[m]}};break;case"cards_borderRadiusAll":case"cards_borderRadiusTopLeft":case"cards_borderRadiusBottomLeft":case"cards_borderRadiusTopRight":case"cards_borderRadiusBottomRight":c={cardsBorderRadius:{[Aa[m]]:+e[m]}};break;case"buttonsPaddingTop":case"buttonsPaddingLeft":case"buttonsPaddingRight":case"buttonsPaddingBottom":R?(c={padding:{all:+e[m]}},r.setFieldsValue({paddingTop:e[m],paddingLeft:e[m],paddingRight:e[m],paddingBottom:e[m]})):c={buttonsPadding:{[I[m]]:+e[m]}};break;case"blockPaddingTop":case"blockPaddingLeft":case"blockPaddingRight":case"blockPaddingBottom":c={blockPadding:{left:d.blockPaddingLeft||0,right:d.blockPaddingRight||0,top:d.blockPaddingTop||0,bottom:d.blockPaddingBottom||0,[I[m]]:+e[m]}};break;case"blockPaddingTopBottom":c={blockPadding:{left:d.blockPaddingLeft||0,right:d.blockPaddingRight||0,top:+e[m],bottom:+e[m]}},d.blockPaddingTop=d.blockPaddingBottom=+e[m];break;case"blockPaddingLeftRight":c={blockPadding:{top:d.blockPaddingTop||0,bottom:d.blockPaddingBottom||0,left:+e[m],right:+e[m]}},d.blockPaddingLeft=d.blockPaddingRight=+e[m];break;default:c=e}"buttons_borderPosition"!==m&&n({operation:D.Ru.SANDBOX_EMAIL_SETTINGS_SET,settings:c})},autoComplete:"off",className:"element-controls"},Q?null:l.createElement(u.A,{style:{marginBottom:"24px"},message:a("It looks like the email was not created in our service, so the content styles won`t work. Read more about content styles in the help."),type:"info"}),l.createElement("div",{className:"form-group-title",style:{paddingTop:0}},a("Blocks")),l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Blocks background color"),placement:"bottom"},l.createElement(S.A.Item,{name:"blockBackgroundColor",style:{marginBottom:E.formItemMarginBottomMD+4},rules:[{message:a("Please set the background color")}]},l.createElement(ye,{placeholder:a("Background color"),usedColors:d.usedColors})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Background color of the contrast blocks"),placement:"bottom"},l.createElement(S.A.Item,{name:"blockContrastBackgroundColor",style:{marginBottom:E.formItemMarginBottomMD+4},rules:[{message:a("Please set the background color")}]},l.createElement(ye,{placeholder:a("Background color"),usedColors:d.usedColors}))))),l.createElement(b.A,{gutter:10,style:{paddingBottom:4}},l.createElement(l.Fragment,null,l.createElement(h.A,{span:10,style:{width:156,flex:"auto",maxWidth:"none"}},l.createElement("div",{className:"padding-collapsed",style:{display:L?"block":"none"}},l.createElement(i.A,{title:a("Horizontal padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"blockPaddingLeftRight"},l.createElement(Ft.A,{min:0,placeholder:a("Horizontal"),prefix:l.createElement(z.A,{icon:"PaddingLeftRight"}),addonAfter:"px"})))),l.createElement("div",{className:"padding-extended",style:{display:L?"none":"block"}},l.createElement(i.A,{trigger:["hover"],title:a("Left padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"blockPaddingLeft",style:{marginBottom:E.formItemMarginBottomXS}},l.createElement(Ft.A,{min:0,placeholder:a("Left"),prefix:l.createElement(z.A,{icon:"PaddingLeft"}),addonAfter:"px"}))),l.createElement(i.A,{trigger:["hover"],title:a("Right padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"blockPaddingRight"},l.createElement(Ft.A,{min:0,placeholder:a("Right"),prefix:l.createElement(z.A,{icon:"PaddingRight"}),addonAfter:"px"}))))),l.createElement(h.A,{span:10,style:{width:156,flex:"auto",maxWidth:"none"}},l.createElement("div",{className:"padding-collapsed",style:{display:L?"block":"none"}},l.createElement(i.A,{title:a("Vertical padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"blockPaddingTopBottom"},l.createElement(Ft.A,{min:0,placeholder:a("Vertical"),prefix:l.createElement(z.A,{icon:"PaddingTopBottom"}),addonAfter:"px"})))),l.createElement("div",{className:"padding-extended",style:{display:L?"none":"block"}},l.createElement(i.A,{trigger:["hover"],title:a("Top padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"blockPaddingTop",style:{marginBottom:E.formItemMarginBottomXS}},l.createElement(Ft.A,{min:0,placeholder:a("Top"),prefix:l.createElement(z.A,{icon:"PaddingTop"}),addonAfter:"px"}))),l.createElement(i.A,{trigger:["hover"],title:a("Bottom padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"blockPaddingBottom"},l.createElement(Ft.A,{min:0,placeholder:a("Bottom"),prefix:l.createElement(z.A,{icon:"PaddingBottom"}),addonAfter:"px"}))))),l.createElement(h.A,{span:4,style:{width:45,flex:"auto",maxWidth:"none"}},l.createElement(i.A,{title:a("Individual padding"),placement:"bottom"},l.createElement(g.Ay,{className:C()("selected-td-form__button",{"selected-td-form__button--active":!L}),onClick:()=>{P((e=>!e));const e=r.getFieldsValue(!0);L||(e.blockPaddingLeftRight=e.blockPaddingLeft,e.blockPaddingTopBottom=e.blockPaddingTop,e.blockPaddingRight=e.blockPaddingLeft,e.blockPaddingBottom=e.blockPaddingTop,n({operation:D.Ru.SANDBOX_EMAIL_SETTINGS_SET,settings:{blockPadding:{top:e.blockPaddingTopBottom,bottom:e.blockPaddingTopBottom,left:e.blockPaddingLeftRight,right:e.blockPaddingLeftRight}}}))}},l.createElement(z.A,{icon:"PaddingSwitcher"})))))),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},a("General text")),l.createElement(i.A,{trigger:["hover"],title:a("Font of the general text"),placement:"bottom"},l.createElement(S.A.Item,{name:"textFontFamily",style:{marginBottom:E.formItemMarginBottomXS}},l.createElement(pt,{value:K.textFontFamily}))),l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Font size of the general text"),placement:"bottom"},l.createElement(S.A.Item,{name:"textFontSize"},l.createElement(Ft.A,{min:15,max:ee,placeholder:a("Font size"),prefix:l.createElement(at.A,null),addonAfter:"px"})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Line height of the general text"),placement:"bottom"},l.createElement(S.A.Item,{name:"textLineHeight"},l.createElement(Ft.A,{min:0,placeholder:a("Line height"),prefix:l.createElement(lt.A,null),addonAfter:"px"}))))),l.createElement(b.A,{gutter:10,style:{paddingBottom:4}},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Color of the general text"),placement:"bottom"},l.createElement(S.A.Item,{name:"textColor"},l.createElement(ye,{placeholder:a("Text color"),usedColors:d.usedColors})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Contrast block text color"),placement:"bottom"},l.createElement(S.A.Item,{name:"textContrastColor"},l.createElement(ye,{placeholder:a("Text color"),usedColors:d.usedColors}))))),l.createElement(b.A,{gutter:10,style:{paddingBottom:4}},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Bottom padding of the general text"),placement:"bottom"},l.createElement(S.A.Item,{name:"textPaddingBottom"},l.createElement(Ft.A,{min:0,placeholder:a("Bottom padding"),prefix:l.createElement(z.A,{icon:"PaddingBottom"}),addonAfter:"px"}))))),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},a("Headings")),l.createElement(i.A,{trigger:["hover"],title:a("Heading font"),placement:"left"},l.createElement(S.A.Item,{name:"headingFontFamily",style:{marginBottom:E.formItemMarginBottomXS}},l.createElement(pt,null))),l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Heading font size"),placement:"bottom"},l.createElement(S.A.Item,{name:"headingFontSize",style:{marginBottom:E.formItemMarginBottomXS}},l.createElement(Ft.A,{min:ae,max:40,placeholder:a("Font size"),prefix:l.createElement(at.A,null),addonAfter:"px"})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Heading line height"),placement:"bottom"},l.createElement(S.A.Item,{name:"headingLineHeight",style:{marginBottom:E.formItemMarginBottomXS}},l.createElement(Ft.A,{min:0,placeholder:a("Line height"),prefix:l.createElement(lt.A,null),addonAfter:"px"}))))),l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Heading letter spacing"),placement:"bottom"},l.createElement(S.A.Item,{name:"headingLetterSpacing"},l.createElement(Ft.A,{min:0,placeholder:a("Letter spacing"),prefix:l.createElement(fe.A,null),addonAfter:"px"})))),l.createElement(h.A,{span:12},l.createElement(s.A,null,l.createElement(i.A,{placement:"bottom",title:a("Strong")},l.createElement(g.Ay,{className:C()({"selected-td-form__button--active":O}),type:"default",name:"headingBold",onClick:oe},l.createElement(ot.A,null))),l.createElement(i.A,{placement:"bottom",title:a("Italic")},l.createElement(g.Ay,{className:C()({"selected-td-form__button--active":F}),type:"default",name:"headingItalic",onClick:oe},l.createElement(nt.A,null)))))),l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Heading color"),placement:"bottom"},l.createElement(S.A.Item,{name:"headingColor"},l.createElement(ye,{placeholder:a("Heading color"),usedColors:d.usedColors})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Contrast block header color"),placement:"bottom"},l.createElement(S.A.Item,{name:"headingContrastColor"},l.createElement(ye,{placeholder:a("Heading color"),usedColors:d.usedColors}))))),l.createElement(b.A,{gutter:10,style:{paddingBottom:4}},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Top padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"headingPaddingTop"},l.createElement(Ft.A,{min:0,placeholder:a("Top padding"),prefix:l.createElement(z.A,{icon:"PaddingTop"}),addonAfter:"px"})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Bottom padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"headingPaddingBottom"},l.createElement(Ft.A,{min:0,placeholder:a("Bottom padding"),prefix:l.createElement(z.A,{icon:"PaddingBottom"}),addonAfter:"px"}))))),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},a("Links")),l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Link color"),placement:"bottom"},l.createElement(S.A.Item,{name:"linkColor",style:{marginBottom:E.formItemMarginBottomXS}},l.createElement(ye,{placeholder:a("Link color"),usedColors:d.usedColors})))),l.createElement(h.A,{span:12},l.createElement(i.A,{placement:"bottom",title:a("Underline")},l.createElement(g.Ay,{className:C()({"selected-td-form__button--active":j}),type:"default",name:"linkUnderline",onClick:oe},l.createElement(rt.A,null))))),l.createElement(b.A,{gutter:10,style:{paddingBottom:4}},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Link color in contrasting blocks"),placement:"bottom"},l.createElement(S.A.Item,{name:"linkContrastColor"},l.createElement(ye,{placeholder:a("Link color"),usedColors:d.usedColors}))))),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},a("Buttons")," ",l.createElement("span",{className:"form-group-title__bull"},"\u2022")," ",a("Text & background")),l.createElement(i.A,{trigger:["hover"],title:a("Buttons font"),placement:"left"},l.createElement(S.A.Item,{name:"buttonsFontFamily",style:{marginBottom:E.formItemMarginBottomXS}},l.createElement(pt,null))),l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Buttons font size"),placement:"bottom"},l.createElement(S.A.Item,{name:"buttonsFontSize",style:{marginBottom:E.formItemMarginBottomXS}},l.createElement(Ft.A,{min:0,placeholder:a("Font size"),prefix:l.createElement(at.A,null),addonAfter:"px"})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Buttons letter spacing"),placement:"bottom"},l.createElement(S.A.Item,{name:"buttonsLetterSpacing",style:{marginBottom:E.formItemMarginBottomXS}},l.createElement(Ft.A,{min:0,placeholder:a("Letter spacing"),prefix:l.createElement(fe.A,null),addonAfter:"px"}))))),l.createElement(b.A,{gutter:10,style:{paddingBottom:4}},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Buttons text color"),placement:"bottom"},l.createElement(S.A.Item,{name:"buttonsColor",style:{marginBottom:E.formItemMarginBottomXS}},l.createElement(ye,{placeholder:a("Buttons text color"),usedColors:d.usedColors})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Button text color in contrasting blocks"),placement:"bottom"},l.createElement(S.A.Item,{name:"buttonsContrastColor",style:{marginBottom:E.formItemMarginBottomXS}},l.createElement(ye,{placeholder:a("Buttons text color"),usedColors:d.usedColors})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Buttons background color"),placement:"bottom"},l.createElement(S.A.Item,{name:"buttonsBackgroundColor"},l.createElement(ye,{placeholder:a("Background color"),usedColors:d.usedColors})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Button background color in contrasting blocks"),placement:"bottom"},l.createElement(S.A.Item,{name:"buttonsContrastBackgroundColor"},l.createElement(ye,{placeholder:a("Background color"),usedColors:d.usedColors})))),p.formButtonFieldTextAlignEnabled&&l.createElement(h.A,{span:12},l.createElement(vt,{form:r,elementSettings:{textAlign:"",type:"email"},imgParent:!1,name:"buttonsAlign",withHotKeys:!1})),l.createElement(h.A,{span:12},l.createElement(s.A,null,l.createElement(i.A,{placement:"bottom",title:a("Strong")},l.createElement(g.Ay,{className:C()({"selected-td-form__button--active":U}),type:"default",name:"buttonsBold",onClick:oe},l.createElement(ot.A,null))),l.createElement(i.A,{placement:"bottom",title:a("Italic")},l.createElement(g.Ay,{className:C()({"selected-td-form__button--active":Z}),type:"default",name:"buttonsItalic",onClick:oe},l.createElement(nt.A,null)))))),p.formFieldBorderEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},a("Buttons")," ",l.createElement("span",{className:"form-group-title__bull"},"\u2022")," ",a("Borders")),l.createElement("div",{style:{paddingBottom:4}},l.createElement(Tt,{borders:v,namePrefix:"buttons_"}))),p.formFieldBorderRadiusEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},a("Buttons")," ",l.createElement("span",{className:"form-group-title__bull"},"\u2022")," ",a("Border radius")),l.createElement("div",{style:{paddingBottom:4}},l.createElement(Dt,{form:r,oneBorderRadiusValue:k,setOneBorderRadiusValue:x,elementSettings:K,namePrefix:"buttons_"}))),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},a("Buttons")," ",l.createElement("span",{className:"form-group-title__bull"},"\u2022")," ",a("Margins")),l.createElement(b.A,{gutter:10,style:{paddingBottom:4}},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Top margin"),placement:"bottom"},l.createElement(S.A.Item,{name:"buttonsMarginTop"},l.createElement(Ft.A,{min:0,placeholder:a("Top margin"),prefix:l.createElement(z.A,{icon:"PaddingTop"}),addonAfter:"px"})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Bottom margin"),placement:"bottom"},l.createElement(S.A.Item,{name:"buttonsMarginBottom"},l.createElement(Ft.A,{min:0,placeholder:a("Bottom margin"),prefix:l.createElement(z.A,{icon:"PaddingBottom"}),addonAfter:"px"}))))),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},a("Cards")," ",l.createElement("span",{className:"form-group-title__bull"},"\u2022")," ",a("Colors")),l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement("div",{className:"form-group-title",style:{paddingTop:0,paddingBottom:E.formItemMarginBottomXS}},a("Base colors")),l.createElement(i.A,{trigger:["hover"],title:a("Base background color"),placement:"bottom"},l.createElement(S.A.Item,{name:"cardsBaseBackgroundColor",style:{marginBottom:E.formItemMarginBottomXS}},l.createElement(ye,{placeholder:a("Base background color"),usedColors:d.usedColors})))),l.createElement(h.A,{span:12},l.createElement("div",{className:"form-group-title",style:{paddingTop:0,paddingBottom:E.formItemMarginBottomXS}},a("Contrasting colors")),l.createElement(i.A,{trigger:["hover"],title:a("Contrasting background color"),placement:"bottom"},l.createElement(S.A.Item,{name:"cardsContrastBackgroundColor",style:{marginBottom:E.formItemMarginBottomXS}},l.createElement(ye,{placeholder:a("Contrasting background color"),usedColors:d.usedColors}))))),l.createElement(b.A,{gutter:10,style:{paddingBottom:4}},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Base text color"),placement:"bottom"},l.createElement(S.A.Item,{name:"cardsBaseTextColor"},l.createElement(ye,{placeholder:a("Base text color"),usedColors:d.usedColors})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Contrasting text color"),placement:"bottom"},l.createElement(S.A.Item,{name:"cardsContrastTextColor"},l.createElement(ye,{placeholder:a("Contrasting text color"),usedColors:d.usedColors}))))),p.formFieldBorderEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},a("Cards")," ",l.createElement("span",{className:"form-group-title__bull"},"\u2022")," ",a("Borders")),l.createElement("div",{style:{paddingBottom:4}},l.createElement(Tt,{borders:_,namePrefix:"cards_"}))),p.formFieldBorderRadiusEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},a("Cards")," ",l.createElement("span",{className:"form-group-title__bull"},"\u2022")," ",a("Border radius")),l.createElement("div",{style:{paddingBottom:4}},l.createElement(Dt,{form:r,oneBorderRadiusValue:B,setOneBorderRadiusValue:T,elementSettings:K,namePrefix:"cards_"})))))};_a.defaultProps={className:""};const Ca=_a,Sa=({email:e})=>{const{__:t}=(0,y.s9)(),a=e.hasOwnProperty("type")?D.IE:D.Tm,[o,n]=(0,l.useState)(D.xz),r=!!e.common_styles&&"{}"!==e.common_styles;let i=[{label:l.createElement(l.Fragment,null,a===D.Tm?t("Global styles"):t("Block styles")),key:D.xz,forceRender:!0,className:"email-settings__collapse-panel",children:a===D.Tm?l.createElement(Xe,{className:"email-settings__collapse-panel-content",email:e}):l.createElement(tt,{className:"email-settings__collapse-panel-content"})}];return a===D.Tm&&r&&i.push({label:l.createElement(l.Fragment,null,t("Content styles")),key:"contentStyles",forceRender:!0,className:"email-settings__collapse-panel",children:l.createElement(Ca,{className:"email-settings__collapse-panel-content",email:e})}),l.createElement(l.Fragment,null,l.createElement(c.A,{className:"secondary-tabs email-settings__collapse appearance-panel__content-styles",size:"large",animated:{inkBar:!1,tabPane:!1},activeKey:o,onChange:e=>n(e||""),items:i}))};var wa=a(71832),ka=a(80293),xa=a(72510),Ba=a(36434),Ta=a(73180);var Ra=a(3326);const Na=e=>e=(e=(e=(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,"")).replace(/<\/?(?:script|embed|object|frameset|frame|iframe|applet|meta)[^>]*>/gi,"")).replace(/ on\w+="[^"]*"/g,"")).replace(/ on\w+='[^']*'/g,""),{name:La,type:Pa,tags:Ia}={name:"name",type:"type",tags:"tags"},Ma={[La]:"",[Pa]:[],[Ia]:[]},Oa={Header:10,Menu:20,Banners:30,Content:40,Lists:50,Buttons:60,Promocodes:70,"E-Commerce":80,Transactional:80,Articles:90,Polls:100,Applications:110,Feature:120,Separators:130,Contacts:140,Footer:150},{useToken:Va}=n.A,Fa=({parentEmailId:e=D.iU,blocksTab:t,search:a,reloadBlockScreens:o,email:n,setIsShowAddAllBlocksModal:i})=>{const{projectId:s}=(0,v.g)(),d=(0,F.sh)(),c=(0,F._9)(),[p]=S.A.useForm(),{data:b}=(0,q.h1)(),{token:h}=Va(),{__:E,_x:_}=(0,y.s9)(),k=(0,A.hN)(),{modal:x}=r.A.useApp(),{confirm:B}=x;let T=(0,v.zy)();const P=(0,f.d4)(Ie.V$),I=(0,l.useRef)(null),O=(0,l.useRef)(null),V=(0,Ra.cR)(),H="string"===typeof(null===n||void 0===n?void 0:n.common_styles)&&null!==n&&void 0!==n&&n.common_styles.startsWith("{")?JSON.parse(n.common_styles):{},j=(0,l.useRef)(null),z=(0,l.useRef)(null),W=(0,l.useRef)(null),G=(0,f.Pj)();(0,l.useEffect)((()=>{var e;null===(e=O.current)||void 0===e||e.scrollTo({top:0})}),[t,a]);const{data:U}=M.Nq.endpoints.getProject.select(+s)(G.getState()),[Z,X]=(0,l.useState)({projectId:s,pageSize:1e3,page:1,tags:null,name:null,type:null,notEmbed:!0,order:"asc",orderby:"title"});(0,l.useEffect)((()=>{a||(p.setFieldsValue(Ma),we({type:null,name:null}),o())}),[a,p,o]),(0,l.useEffect)((()=>{if(b){const e=b.schema.properties.acf.properties.type.items.enum;let t=[];for(let a in e)t.push({label:E(D.jg[e[a]]),value:e[a]})}}),[b,E]);const{isSuccess:K,isError:Y,isLoading:$,isFetching:Q,data:J,refetch:ee,error:te}=(0,q.SB)({...Z,page:1}),ae=(0,l.useMemo)((()=>{if(K&&J)return[...J].sort(((e,t)=>Oa[e.type]-Oa[t.type]))}),[K,J]),[le,oe]=(0,l.useState)([]);(0,Ta.Z)((e=>{e!==Y&&k.fromError("BLOCK_GET_ERROR",{},te,!0)}),[Y,te,k]);const[ne,re]=(0,l.useState)({emailId:e,pageSize:1e3,page:1,projectId:D.p5,notEmbed:!0,name:null,type:null}),{isSuccess:ie,isError:se,isLoading:de,isFetching:me}=(0,q.OD)({...ne,emailId:e,page:1},{skip:!e||P.length}),ce=(0,l.useMemo)((()=>{if(ie||P.length)return[...P].sort(((e,t)=>Oa[e.type]-Oa[t.type]))}),[ie,P]),[ue,pe]=(0,l.useState)([]);(0,l.useEffect)((()=>{const e=new Set;if(P.length&&ce){for(const t of ce)t.type&&e.add(t.type);pe(Array.from(e))}else pe([])}),[P,ce]);const[ge,be]=(0,l.useState)({pageSize:1e3,page:1,notEmbed:!0,name:null,type:null}),{isSuccess:he,isError:Ee,isLoading:fe,isFetching:ve,data:ye=[]}=(0,q.kz)({...ge,page:1}),Ae=(0,l.useMemo)((()=>{if(ye.length)return[...ye].sort(((e,t)=>Oa[e.type]-Oa[t.type]))}),[ye]),[_e,Ce]=(0,l.useState)([]);(0,l.useEffect)((()=>{const e=new Set;if(Ae&&ye.length){for(const t of Ae)t.type&&e.add(t.type);Ce(Array.from(e))}}),[ye.length,Ae]);const Se=(0,l.useMemo)((()=>{const e=new Set;for(const t of le)e.add(t);for(const t of ue)e.add(t);for(const t of _e)e.add(t);return Array.from(e)}),[_e,ue,le]),we=e=>{X((t=>({...t,...e,page:1}))),re((t=>({...t,...e,page:1}))),be((t=>({...t,...e,page:1})))},ke=(0,l.useCallback)((()=>{V.querySelector(".blocks-search__result-wrapper.is_search")&&(V.querySelector(".blocks-search__result-wrapper").style.removeProperty("transition"),V.querySelector(".blocks-search__result-wrapper").style.opacity=0,V.querySelectorAll(".blocks-search__result-body").forEach((e=>e.style.removeProperty("height"))),V.querySelectorAll(".blocks-search__result-body").forEach((e=>{e.style.height=207*e.offsetHeight/660+"px"})),V.querySelector(".blocks-search__result-wrapper").style.transition="opacity 0.2s",V.querySelectorAll(".blocks-search__result-wrapper").forEach((e=>e.style.opacity=1)))}),[]);(0,l.useEffect)((()=>{ve||fe||!he||"template"===t||(a?ke():o())}),[ve,fe,he,ke,Z.name,o,a,t]),(0,l.useEffect)((()=>{const e=new Set;if(K&&ae){for(const t of ae)t.type&&e.add(t.type);oe(Array.from(e))}}),[K,ae]);const Be=e=>{o(),e.target.getAttribute("data-type")?(e.target.closest(".blocks-search").querySelectorAll(".blocks-search__result").forEach((e=>e.style.display="none")),e.target.closest(".blocks-search").querySelectorAll(`[data-type="${e.target.getAttribute("data-type")}"]`).forEach((e=>e.style.display="block"))):e.target.closest(".blocks-search").querySelectorAll(".blocks-search__result").forEach((e=>e.style.display="block")),e.target.parentElement.querySelector(".active").classList.remove("active"),e.target.classList.add("active")};let Te=null;const Re=e=>{clearTimeout(Te);let t=V.querySelector(".block-search__preview")?V.querySelector(".block-search__preview"):null,a=V.querySelector(".block-search__preview-title")?V.querySelector(".block-search__preview-title"):null,l=V.querySelector(".block-search__preview-content")?V.querySelector(".block-search__preview-content"):null;V.querySelector(".block-search__preview")||(t=document.createElement("div"),t.classList.add("block-search__preview"),a=document.createElement("div"),a.classList.add("block-search__preview-title"),l=document.createElement("div"),l.classList.add("block-search__preview-content"),t.append(l),t.append(a),V.querySelector(".email-pane__col_settings-inner").append(t)),a.innerHTML="",l.innerHTML="",a.innerHTML=e.title;let o=e.html.replaceAll(/<style((.|\n|\r)*?)<\/style>/gi,"").trim();l.innerHTML=Na('<table cellspacing="0" cellpadding="0" border="0" width="100%">'+o+"</table>"),"1"!==t.style.opacity&&setTimeout((function(){t.style.opacity="1",t.style.transform="translateX(-100%)"}),10)},Ne=()=>{let e=V.querySelector(".block-search__preview");e&&(Te=setTimeout((()=>{e.style.opacity="0",e.style.transform="translateX(-99%)",setTimeout((function(){e.remove()}),300)}),300))};(0,l.useEffect)((()=>{V.querySelectorAll(".blocks-search__result").forEach((e=>{e.style.display="block"}))}),[t]);const Le=!(null!==J&&void 0!==J&&J.length)&&(!e||!(null!==P&&void 0!==P&&P.length))&&!(null!==ye&&void 0!==ye&&ye.length)&&(Z.tags||Z.name||Z.type)&&!($||Q);(0,l.useEffect)((()=>{$||Q||o()}),[$,Q,o]),(0,l.useEffect)((()=>{("common"===t||a)&&setTimeout(o,50)}),[J,o,t,a]);const Pe=e=>{B({maskClosable:!0,centered:!0,title:_("Are you sure you want to delete the \u201c","block")+e.title+E("\u201d block?"),icon:l.createElement(L.A,null),okText:E("Yes"),cancelText:E("No"),onOk:()=>(e=>G.dispatch(q.VM.endpoints.deleteBlock.initiate(e.id)).then((t=>{t.error&&k.fromError("BLOCK_REMOVING_ERROR",(0,A.x_)(e),t.error),k.success({id:"BLOCK_REMOVING_SUCCESS",data:(0,A.x_)(e),message:E("The block \u201c")+t.data.title+_("\u201d was successfully removed.","block")}),ee()})))(e)})},Me=(e,t)=>`${e.pathname.split("emails")[0]}blocks/${t.id}`,Oe=e=>{let t=[{key:"Delete block",className:"blocks-search__result__menu-item",icon:l.createElement(L.A,{style:{fontSize:"16px",margin:0}}),style:{color:h.colorError},onClick:()=>Pe(e)}];return!D.EW.isPlugin&&t.unshift({key:"Edit block",className:"blocks-search__result__menu-item",icon:l.createElement(xe.A,{style:{fontSize:"16px",margin:0}}),label:l.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:Me(T,e)}," ")}),t},Ve=e=>{let t="<tr"===e.html.substring(0,3)?document.createElement("table"):document.createElement("div");if(t.replaceChildren(...(0,Ba.$$)(e.html)),0!==Object.keys(H).length&&(t.querySelectorAll(".em-contrast-card").forEach((e=>{var t,a;null!==(t=H.cards)&&void 0!==t&&t.contrastBackgroundColor&&(e.getAttribute("bgcolor")?H.cards.contrastBackgroundColor?e.setAttribute("bgcolor",H.cards.contrastBackgroundColor):e.removeAttribute("bgcolor"):H.cards.contrastBackgroundColor?e.style.backgroundColor=H.cards.contrastBackgroundColor:e.style.removeProperty("background-color")),null!==(a=H.cards)&&void 0!==a&&a.contrastTextColor&&e.querySelectorAll('div[style*="font-family"], span[style*="font-family"]').forEach((e=>{if("#ffffff"!==De(e.style.color).toLowerCase()){let t=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${H.cards.contrastTextColor};`);e.setAttribute("style",t)}}))})),t.querySelectorAll(".em-card").forEach((e=>{var t,a;null!==(t=H.cards)&&void 0!==t&&t.baseBackgroundColor&&(e.getAttribute("bgcolor")?H.cards.baseBackgroundColor?e.setAttribute("bgcolor",H.cards.baseBackgroundColor):e.removeAttribute("bgcolor"):H.cards.baseBackgroundColor?e.style.backgroundColor=H.cards.baseBackgroundColor:e.style.removeProperty("background-color")),null!==(a=H.cards)&&void 0!==a&&a.baseTextColor&&e.querySelectorAll('div[style*="font-family"], span[style*="font-family"]').forEach((e=>{if("#ffffff"!==De(e.style.color).toLowerCase()){let t=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${H.cards.baseTextColor};`);e.setAttribute("style",t)}}))})),t.querySelectorAll(".em-card, .em-contrast-card").forEach((e=>{var t,a,l,o,n,r;null!==(t=H.cards)&&void 0!==t&&t.border&&je({settings:{border:null===(r=H.cards)||void 0===r?void 0:r.border},elem:e});if(null!==(a=H.cards)&&void 0!==a&&null!==(l=a.borderRadius)&&void 0!==l&&l.all){var i,s,d,m;if(e.style.borderBottomLeftRadius&&"0px"!==e.style.borderBottomLeftRadius)e.style.borderBottomLeftRadius=(null===(i=H.cards)||void 0===i?void 0:i.borderRadius.all)+"px";if(e.style.borderBottomRightRadius&&"0px"!==e.style.borderBottomRightRadius)e.style.borderBottomRightRadius=(null===(s=H.cards)||void 0===s?void 0:s.borderRadius.all)+"px";if(e.style.borderTopLeftRadius&&"0px"!==e.style.borderTopLeftRadius)e.style.borderTopLeftRadius=(null===(d=H.cards)||void 0===d?void 0:d.borderRadius.all)+"px";if(e.style.borderTopRightRadius&&"0px"!==e.style.borderTopRightRadius)e.style.borderTopRightRadius=(null===(m=H.cards)||void 0===m?void 0:m.borderRadius.all)+"px"}else if(""===(null===(o=H.cards)||void 0===o||null===(n=o.borderRadius)||void 0===n?void 0:n.all))e.style.removeProperty("border-radius");else{var c,u,p,g,b,h,E,f,v,y,A,_,C,S,w,k,x,B,T,R;if(null!==(c=H.cards)&&void 0!==c&&null!==(u=c.borderRadius)&&void 0!==u&&u.topLeft&&e.style.borderTopLeftRadius&&"0px"!==e.style.borderTopLeftRadius)e.style.borderTopLeftRadius=(null===(x=H.cards)||void 0===x?void 0:x.borderRadius.topLeft)+"px";else""===(null===(p=H.cards)||void 0===p||null===(g=p.borderRadius)||void 0===g?void 0:g.topLeft)&&e.style.removeProperty("border-top-left-radius");if(null!==(b=H.cards)&&void 0!==b&&null!==(h=b.borderRadius)&&void 0!==h&&h.topRight&&e.style.borderTopRightRadius&&"0px"!==e.style.borderTopRightRadius)e.style.borderTopRightRadius=(null===(B=H.cards)||void 0===B?void 0:B.borderRadius.topRight)+"px";else""===(null===(E=H.cards)||void 0===E||null===(f=E.borderRadius)||void 0===f?void 0:f.topRight)&&e.style.removeProperty("border-top-right-radius");if(null!==(v=H.cards)&&void 0!==v&&null!==(y=v.borderRadius)&&void 0!==y&&y.bottomRight&&e.style.borderBottomRightRadius&&"0px"!==e.style.borderBottomRightRadius)e.style.borderBottomRightRadius=(null===(T=H.cards)||void 0===T?void 0:T.borderRadius.bottomRight)+"px";else""===(null===(A=H.cards)||void 0===A||null===(_=A.borderRadius)||void 0===_?void 0:_.bottomRight)&&e.style.removeProperty("border-bottom-right-radius");if(null!==(C=H.cards)&&void 0!==C&&null!==(S=C.borderRadius)&&void 0!==S&&S.bottomLeft&&e.style.borderBottomLeftRadius&&"0px"!==e.style.borderBottomLeftRadius)e.style.borderBottomLeftRadius=(null===(R=H.cards)||void 0===R?void 0:R.borderRadius.bottomLeft)+"px";else""===(null===(w=H.cards)||void 0===w||null===(k=w.borderRadius)||void 0===k?void 0:k.bottomLeft)&&e.style.removeProperty("border-bottom-left-radius")}})),t.querySelectorAll('div[style*="font-family"], span[style*="font-family"]').forEach((e=>{if(!e.style.display&&parseFloat(e.style.fontSize)<=20){let l="",o=H.text.fontFamily;if(parseFloat(e.style.fontSize)>14&&(l=e.getAttribute("style").replace(/font-size:(\s+)?.*?px/,`font-size: ${H.text.fontSize}px`).replace(/line-height:(\s+)?.*?px/,`line-height: ${H.text.lineHeight}px`),e.setAttribute("style",l)),e.closest(".em-contrast-card, .em-card")||"#ffffff"===De(e.style.color).toLowerCase()||(l=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${H.text.color};`),e.setAttribute("style",l)),e.closest(".em-contrast-block")&&!e.closest(".em-contrast-card, .em-card")&&(l=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${H.text.contrastColor};`),e.setAttribute("style",l)),"Safe Fonts"===o[0]?(e.style.fontFamily=o[1],Fe({elem:t})):"Google Fonts"===o[0]&&("Sans Serif"===o[1]?e.style.fontFamily="Helvetica, Arial, sans-serif":"Serif"===o[1]&&(e.style.fontFamily='"Times New Roman", Times, serif'),e.classList.remove(...[...e.classList].filter((e=>e.startsWith("em-font")))),e.classList.add(`em-font-${o[2].replace(/\s/g,"")}-${o[3].replace(/\s/g,"")}`),He({elem:t,fontFamilyArray:o})),e.closest('[em="atom"] > tr > td')&&e.closest('[em="atom"] > tr > td').style.paddingBottom)e.closest('[em="atom"] > tr > td').style.paddingBottom=H.text.paddingBottom+"px";else if(e.nextElementSibling||e.closest("table")&&e.closest("table").nextElementSibling){var a;let t=null!==(a=e.nextElementSibling)&&void 0!==a?a:e.closest("table").nextElementSibling;t&&"TABLE"===t.tagName&&(t.classList.contains("em-vindent-table")||""===t.querySelector("td").innerHTML)&&t.querySelector("td").setAttribute("height",H.text.paddingBottom)}}else if(!e.style.display&&parseFloat(e.style.fontSize)>=20&&"#eb3737"!==De(e.style.color).toLowerCase()){let a="",l=H.headings.fontFamily;parseFloat(e.style.fontSize)<40&&(a=e.getAttribute("style").replace(/font-size:(\s+)?.*?px/,`font-size: ${H.headings.fontSize}px`).replace(/line-height:(\s+)?.*?px/,`line-height: ${H.headings.lineHeight}px`),e.setAttribute("style",a)),e.closest(".em-contrast-card, .em-card")||"#ffffff"===De(e.style.color).toLowerCase()||(a=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${H.headings.color};`),e.setAttribute("style",a)),e.closest(".em-contrast-block")&&!e.closest(".em-contrast-card, .em-card")&&(a=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${H.headings.contrastColor};`),e.setAttribute("style",a)),"Safe Fonts"===l[0]?(e.style.fontFamily=l[1],Fe({elem:t})):"Google Fonts"===l[0]&&("Sans Serif"===l[1]?e.style.fontFamily="Helvetica, Arial, sans-serif":"Serif"===l[1]&&(e.style.fontFamily='"Times New Roman", Times, serif'),e.classList.remove(...[...e.classList].filter((e=>e.startsWith("em-font")))),e.classList.add(`em-font-${l[2].replace(/\s/g,"")}-${l[3].replace(/\s/g,"")}`),He({elem:t,fontFamilyArray:l}));let o="";if(o=H.headings.letterSpacing>0?e.style.letterSpacing?e.getAttribute("style").replace(/letter-spacing:(\s+)?.*?px/,`letter-spacing: ${H.headings.letterSpacing}px`):e.getAttribute("style")+` letter-spacing: ${H.headings.letterSpacing}px;`:e.getAttribute("style").replace(/(\s+)?letter-spacing:(\s+)?.*?px(;)?/,""),e.setAttribute("style",o),H.headings.bold?e.querySelector("b")?e.querySelector("b").replaceWith(...e.querySelector("b").childNodes):e.querySelector("strong")||(e.innerHTML="<strong>"+e.innerHTML+"</strong>"):e.querySelector("strong")?e.querySelector("strong").replaceWith(...e.querySelector("strong").childNodes):e.querySelector("b")&&e.querySelector("b").replaceWith(...e.querySelector("b").childNodes),e.style.fontWeight){let t=e.getAttribute("style").replace(/(\s+)?font-weight:(\s+)?(bold|[0-9]*)(;)?/,"");e.setAttribute("style",t)}if(H.headings.italic?e.querySelector("i")?e.querySelector("i").replaceWith(...e.querySelector("i").childNodes):e.querySelector("em")||(e.innerHTML="<em>"+e.innerHTML+"</em>"):e.querySelector("em")?e.querySelector("em").replaceWith(...e.querySelector("em").childNodes):e.querySelector("i")&&e.querySelector("i").replaceWith(...e.querySelector("i").childNodes),e.style.fontStyle){let t=e.getAttribute("style").replace(/(\s+)?font-style:(\s+)?.*?;/,"");e.setAttribute("style",t)}if(e.closest('[em="atom"] > tr > td')&&e.closest('[em="atom"] > tr > td').style.paddingTop)e.closest('[em="atom"] > tr > td').style.paddingTop=H.headings.paddingTop+"px";else if(e.previousElementSibling){let t=e.previousElementSibling;t&&"TABLE"===t.tagName&&(t.classList.contains("em-vindent-table")||""===t.querySelector("td").innerHTML)&&t.querySelector("td").setAttribute("height",H.headings.paddingTop)}if(e.closest('[em="atom"] > tr > td')&&e.closest('[em="atom"] > tr > td').style.paddingBottom)e.closest('[em="atom"] > tr > td').style.paddingBottom=H.headings.paddingBottom+"px";else if(e.nextElementSibling){let t=e.nextElementSibling;t&&"TABLE"===t.tagName&&(t.classList.contains("em-vindent-table")||""===t.querySelector("td").innerHTML)&&t.querySelector("td").setAttribute("height",H.headings.paddingBottom)}}})),t.querySelectorAll('a[style*="color"]').forEach((e=>{if(e.style.display){if(e.style.display&&"block"===e.style.display){let a="";if(a=e.getAttribute("style").replace(/font-size:(\s+)?.*?px/,`font-size: ${H.buttons.fontSize}px`),e.setAttribute("style",a),!e.closest("td").style.backgroundColor||e.closest("td").style.borderWidth||e.closest(".em-contrast-card"))if(e.closest("td").style.borderWidth)if(Object.values(H.buttons.border).every((e=>null===e))){if(e.closest(".em-contrast-block")){if(H.buttons.contrastBackgroundColor){let t=e.closest("td").getAttribute("style").replace(/border:\s*\d+px\s+solid\s+#[A-Fa-f0-9]{6}/,(e=>e.replace(/#[A-Fa-f0-9]{6}/,`${H.buttons.contrastBackgroundColor}`)));e.closest("td").setAttribute("style",t),a=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${H.buttons.contrastBackgroundColor};`),e.setAttribute("style",a)}}else if(H.buttons.backgroundColor){let t=e.closest("td").getAttribute("style").replace(/border:\s*\d+px\s+solid\s+#[A-Fa-f0-9]{6}/,(e=>e.replace(/#[A-Fa-f0-9]{6}/,`${H.buttons.backgroundColor}`)));e.closest("td").setAttribute("style",t),a=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${H.buttons.backgroundColor};`),e.setAttribute("style",a)}}else for(const t in H.buttons.border)H.buttons.border[t]&&void 0!==H.buttons.border[t].color&&(a=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${H.buttons.border[t].color};`),e.setAttribute("style",a));else e.closest(".em-contrast-block")?H.buttons.contrastBackgroundColor&&(a=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${H.buttons.contrastBackgroundColor};`),e.setAttribute("style",a)):H.buttons.backgroundColor&&(a=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${H.buttons.backgroundColor};`),e.setAttribute("style",a));else if(a=e.closest(".em-contrast-block")?e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${H.buttons.contrastColor};`):e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${H.buttons.color};`),e.setAttribute("style",a),e.closest(".em-contrast-block"))if(H.buttons.contrastBackgroundColor){let t=e.closest("td").getAttribute("style").replace(/background-color:(\s+)?.*?;/,`background-color: ${H.buttons.contrastBackgroundColor};`);e.closest("td").setAttribute("style",t)}else e.closest("td").style.removeProperty("background-color");else if(H.buttons.backgroundColor){let t=e.closest("td").getAttribute("style").replace(/background-color:(\s+)?.*?;/,`background-color: ${H.buttons.backgroundColor};`);e.closest("td").setAttribute("style",t)}else e.closest("td").style.removeProperty("background-color");let l=H.buttons.fontFamily;"Safe Fonts"===l[0]?(e.style.fontFamily=l[1],Fe({elem:t})):"Google Fonts"===l[0]&&("Sans Serif"===l[1]?e.style.fontFamily="Helvetica, Arial, sans-serif":"Serif"===l[1]&&(e.style.fontFamily='"Times New Roman", Times, serif'),e.classList.remove(...[...e.classList].filter((e=>e.startsWith("em-font")))),e.classList.add(`em-font-${l[2].replace(/\s/g,"")}-${l[3].replace(/\s/g,"")}`),He({elem:t,fontFamilyArray:l})),e.closest("td").setAttribute("align",H.buttons.textAlign);let o="";if(o=H.buttons.letterSpacing>0?e.style.letterSpacing?e.getAttribute("style").replace(/letter-spacing:(\s+)?.*?px/,`letter-spacing: ${H.buttons.letterSpacing}px`):e.getAttribute("style")+` letter-spacing: ${H.buttons.letterSpacing}px;`:e.getAttribute("style").replace(/(\s+)?letter-spacing:(\s+)?.*?px(;)?/,""),e.setAttribute("style",o),H.buttons.bold?e.querySelector("b")?e.querySelector("b").replaceWith(...e.querySelector("b").childNodes):e.querySelector("strong")||(e.innerHTML="<strong>"+e.innerHTML+"</strong>"):e.querySelector("strong")?e.querySelector("strong").replaceWith(...e.querySelector("strong").childNodes):e.querySelector("b")&&e.querySelector("b").replaceWith(...e.querySelector("b").childNodes),e.style.fontWeight){let t=e.getAttribute("style").replace(/(\s+)?font-weight:(\s+)?(bold|[0-9]*)(;)?/,"");e.setAttribute("style",t)}if(H.buttons.italic?e.querySelector("i")?e.querySelector("i").replaceWith(...e.querySelector("i").childNodes):e.querySelector("em")||(e.innerHTML="<em>"+e.innerHTML+"</em>"):e.querySelector("em")?e.querySelector("em").replaceWith(...e.querySelector("em").childNodes):e.querySelector("i")&&e.querySelector("i").replaceWith(...e.querySelector("i").childNodes),e.style.fontStyle){let t=e.getAttribute("style").replace(/(\s+)?font-style:(\s+)?.*?;/,"");e.setAttribute("style",t)}if(e.closest('[em="atom"] > tr > td')&&e.closest('[em="atom"] > tr > td').style.paddingTop)e.closest('[em="atom"] > tr > td').style.paddingTop=H.buttons.marginTop+"px";else if(e.closest("table").previousElementSibling){let t=e.closest("table").previousElementSibling;t&&"TABLE"===t.tagName&&(t.classList.contains("em-vindent-table")||""===t.querySelector("td").innerHTML)&&t.querySelector("td").setAttribute("height",H.buttons.marginTop)}if(e.closest('[em="atom"] > tr > td')&&e.closest('[em="atom"] > tr > td').style.paddingBottom)e.closest('[em="atom"] > tr > td').style.paddingBottom=H.buttons.marginBottom+"px";else if(e.closest("table").previousElementSibling){let t=e.closest("table").nextElementSibling;t&&"TABLE"===t.tagName&&(t.classList.contains("em-vindent-table")||""===t.querySelector("td").innerHTML)&&t.querySelector("td").setAttribute("height",H.buttons.marginBottom)}H.buttons.padding.all&&(e.style.padding=H.buttons.padding.all+"px"),H.buttons.padding.top&&(e.style.paddingTop=H.buttons.padding.top+"px"),H.buttons.padding.right&&(e.style.paddingRight=H.buttons.padding.right+"px"),H.buttons.padding.bottom&&(e.style.paddingBottom=H.buttons.padding.bottom+"px"),H.buttons.padding.left&&(e.style.paddingLeft=H.buttons.padding.left+"px"),je({settings:{border:H.buttons.border},elem:e.closest("td")}),ze({settings:{borderRadius:H.buttons.borderRadius},elem:e.closest("td")})}}else{let a=H.text.fontFamily;if("#1c52dc"===De(e.style.color).toLowerCase()){let t=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${H.links.color};`);e.setAttribute("style",t)}else{let t=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${H.text.color};`);e.setAttribute("style",t)}if(e.closest(".em-contrast-block")){let t=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${H.links.contrastColor};`);e.setAttribute("style",t)}let l="";l=H.links.underline?e.style.textDecoration?e.getAttribute("style").replace(/(\s+)?text-decoration:(\s+)?.*?;/,"text-decoration: underline;"):e.getAttribute("style")+" text-decoration: underline;":e.style.textDecoration?e.getAttribute("style").replace(/(\s+)?text-decoration:(\s+)?.*?;/,"text-decoration: none;"):e.getAttribute("style")+" text-decoration: none;",e.setAttribute("style",l),"Safe Fonts"===a[0]?(e.style.fontFamily=a[1],Fe({elem:t})):"Google Fonts"===a[0]&&("Sans Serif"===a[1]?e.style.fontFamily="Helvetica, Arial, sans-serif":"Serif"===a[1]&&(e.style.fontFamily='"Times New Roman", Times, serif'),e.classList.remove(...[...e.classList].filter((e=>e.startsWith("em-font")))),e.classList.add(`em-font-${a[2].replace(/\s/g,"")}-${a[3].replace(/\s/g,"")}`),He({elem:t,fontFamilyArray:a}))}})),t.querySelector('[em="block"]'))){var a,l;const e=t.querySelectorAll('[em="block"]');null!==(a=H.block)&&void 0!==a&&a.backgroundColor&&e.forEach((e=>{e.querySelectorAll(":scope > td").forEach((e=>{e.setAttribute("bgcolor",H.block.backgroundColor)}))})),null!==(l=H.block)&&void 0!==l&&l.padding&&e.forEach((e=>{e.querySelectorAll(":scope > td").forEach((e=>{e.style.paddingTop=H.block.padding.top+"px",e.style.paddingRight=H.block.padding.right+"px",e.style.paddingBottom=H.block.padding.bottom+"px",e.style.paddingLeft=H.block.padding.left+"px"}))}))}return"DIV"===t.tagName?(0,xa.uL)(t):(0,xa.uL)(t.querySelector("tbody"))},Fe=e=>{e.elem.querySelectorAll("link[em-class]").forEach((t=>{e.elem.querySelector("."+t.getAttribute("em-class"))||t.remove()}))};function De(e){if(e&&"r"===e.charAt(0)){if("a"===e.charAt(3))return(e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):"";{e=e.replace("rgb(","").replace(")","").split(",");let t=parseInt(e[0],10).toString(16),a=parseInt(e[1],10).toString(16),l=parseInt(e[2],10).toString(16);return t=1===t.length?"0"+t:t,a=1===a.length?"0"+a:a,l=1===l.length?"0"+l:l,"#"+t+a+l}}if(e&&"#"===e.charAt(0))return e}const He=e=>{var t;const a=e.elem.querySelectorAll("link"),l=`em-font-${e.fontFamilyArray[2].replace(/\s/g,"")}-${e.fontFamilyArray[3].replace(/\s/g,"")}`;if(!!(null===(t=Array.from(a))||void 0===t||!t.find((e=>e.getAttribute("em-class")===l)))){let t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",`https://fonts.googleapis.com/css2?family=${e.fontFamilyArray[2]}:ital,wght@${We[e.fontFamilyArray[3]].indexOf("i")>-1?"1":"0"},${We[e.fontFamilyArray[3]].replaceAll("i","")}&display=swap`),t.setAttribute("em-class",l),e.elem.insertAdjacentElement("afterbegin",t)}!function(e){if(!e.elem.querySelector('style[em="styles"]')){let t=document.createElement("style");t.setAttribute("em","styles"),e.elem.append(t)}}({elem:e.elem});let o=`font-family: '${e.fontFamilyArray[2]}', ${Ge[e.fontFamilyArray[1]]}!important;`;o+=` font-weight: ${We[e.fontFamilyArray[3]].replaceAll("i","")}!important;`,We[e.fontFamilyArray[3]].indexOf("i")>-1&&(o+=" font-style: italic!important;"),e.elem.querySelector('style[em="styles"]').insertAdjacentHTML("beforeend",`\n.em-font-${e.fontFamilyArray[2].replace(/\s/g,"")}-${e.fontFamilyArray[3].replace(/\s/g,"")} { ${o} }`),setTimeout((()=>Fe({elem:e.elem})),0)},je=e=>{e.settings.border.all?(null!==e.settings.border.all.width?e.elem.style.borderWidth=e.settings.border.all.width+"px":e.elem.style.removeProperty("border-width"),e.elem.style.borderStyle=e.settings.border.all.style,e.elem.style.borderColor=e.settings.border.all.color):(e.settings.border.top&&(null!==e.settings.border.top.width?e.elem.style.borderTopWidth=e.settings.border.top.width+"px":e.elem.style.removeProperty("border-top-width"),e.elem.style.borderTopStyle=e.settings.border.top.style,e.elem.style.borderTopColor=e.settings.border.top.color),e.settings.border.right&&(null!==e.settings.border.right.width?e.elem.style.borderRightWidth=e.settings.border.right.width+"px":e.elem.style.removeProperty("border-right-width"),e.elem.style.borderRightStyle=e.settings.border.right.style,e.elem.style.borderRightColor=e.settings.border.right.color),e.settings.border.bottom&&(null!==e.settings.border.bottom.width?e.elem.style.borderBottomWidth=e.settings.border.bottom.width+"px":e.elem.style.removeProperty("border-bottom-width"),e.elem.style.borderBottomStyle=e.settings.border.bottom.style,e.elem.style.borderBottomColor=e.settings.border.bottom.color),e.settings.border.left&&(null!==e.settings.border.left.width?e.elem.style.borderLeftWidth=e.settings.border.left.width+"px":e.elem.style.removeProperty("border-left-width"),e.elem.style.borderLeftStyle=e.settings.border.left.style,e.elem.style.borderLeftColor=e.settings.border.left.color))},ze=e=>{e.settings.borderRadius.all?e.elem.style.borderRadius=e.settings.borderRadius.all+"px":""===e.settings.borderRadius.all?e.elem.style.removeProperty("border-radius"):(e.settings.borderRadius.topLeft?e.elem.style.borderTopLeftRadius=e.settings.borderRadius.topLeft+"px":""===e.settings.borderRadius.topLeft&&e.elem.style.removeProperty("border-top-left-radius"),e.settings.borderRadius.topRight?e.elem.style.borderTopRightRadius=e.settings.borderRadius.topRight+"px":""===e.settings.borderRadius.topRight&&e.elem.style.removeProperty("border-top-right-radius"),e.settings.borderRadius.bottomRight?e.elem.style.borderBottomRightRadius=e.settings.borderRadius.bottomRight+"px":""===e.settings.borderRadius.bottomRight&&e.elem.style.removeProperty("border-bottom-right-radius"),e.settings.borderRadius.bottomLeft?e.elem.style.borderBottomLeftRadius=e.settings.borderRadius.bottomLeft+"px":""===e.settings.borderRadius.bottomLeft&&e.elem.style.removeProperty("border-bottom-left-radius"))},We={Thin:"100","Thin Italic":"100i",ExtraLight:"200","ExtraLight Italic":"200i",Light:"300","Light Italic":"300i",Regular:"400","Regular Italic":"400i",Medium:"500","Medium Italic":"500i",SemiBold:"600","SemiBold Italic":"600i",Bold:"700","Bold Italic":"700i",ExtraBold:"800","ExtraBold Italic":"800i",Black:"900","Black Italic":"900i"},Ge={"Sans Serif":"sans-serif",Serif:"serif"};return l.createElement("div",{className:C()("blocks-search",{is_search:a})},l.createElement(S.A,{className:C()("blocks-search__form",{is_search:a}),form:p,layout:"vertical",name:"blocks_search_form",initialValues:{...Ma},onValuesChange:e=>{const t=Object.keys(e)[0],a=p.getFieldsValue(!0);switch(t){case Ia:const l=(0,F._q)(U,D.YY).filter((a=>e[t].includes(a.name))).map((e=>e.id))||null;we({tags:l});break;case Pa:we({type:a.type||null});break;case La:I.current&&window.clearTimeout(I.current),I.current=window.setTimeout((function(){we({name:a.name||null})}),300)}},autoComplete:"off"},l.createElement(S.A.Item,{name:La},l.createElement(w.A,{placeholder:E("Search by title"),allowClear:!0,suffix:l.createElement(ka.A,{className:"cards-search__search-icon, input-icon",style:{fontSize:"16px",cursor:"pointer"}})}))),(Y||se||Ee)&&l.createElement(u.A,{message:E("Error"),description:E("Error when receiving data. Try again (reload page) or contact support."),type:"error",showIcon:!0}),a&&!Le&&l.createElement("div",{className:"blocks-search__type-wrapper"},l.createElement("ul",null,l.createElement("li",{key:"search_All","data-type":"",className:"active",onClick:Be},E("All")),Se.map((e=>l.createElement("li",{"data-type":e,onClick:Be,key:"search_"+e},E(D.jg[e])))))),l.createElement("div",{ref:O,className:C()("blocks-search__result-wrapper",{is_search:a})},("project"===t||a)&&l.createElement(l.Fragment,null,!!le.length&&!a&&l.createElement("div",{className:"blocks-search__type-wrapper"},l.createElement("ul",null,l.createElement("li",{key:"blocksSections_All","data-type":"",className:"active",onClick:Be},E("All")),le.map((e=>l.createElement("li",{key:"blocksSections_"+e,"data-type":e,onClick:Be},E(D.jg[e])))))),l.createElement("div",{className:C()("blocks-search__blocks-wrapper",{is_search:a}),ref:j},l.createElement("div",{className:"blocks-search__result-holder project"},!($||Q)&&(null!==ae&&void 0!==ae&&ae.length?ae.map(((e,t)=>{const a=Na('<table cellspacing="0" cellpadding="0" border="0" width="100%">'+e.html+"</table>");return l.createElement("div",{className:"blocks-search__result","data-type":e.type,key:e.id+t.toString()},l.createElement(N.A,{key:"commenMenu",placement:"leftTop",menu:{items:Oe(e)},overlayStyle:{minWidth:"auto",paddingRight:6}},l.createElement("div",{className:"ant-card-hoverable blocks-search__result-body",draggable:!0,onClick:t=>d(t,e.html),onDragStart:t=>c(t,e.html,"project"),onMouseEnter:()=>Re({html:e.html,title:e.title}),onMouseLeave:Ne},l.createElement("div",{className:"blocks-search__result-html",dangerouslySetInnerHTML:{__html:a},style:{transform:"scale("+207/660+")"}}))))})):!(Z.tags||Z.name||Z.type)&&K&&!($||Q)&&!a&&l.createElement("div",{style:{padding:"10px 0 20px",display:"flex",flexDirection:"row",justifyContent:"space-between",gap:"20px"}},l.createElement("div",{style:{width:"80px",height:"200px"}},l.createElement("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAADMCAYAAADktSSVAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABugSURBVHgB7V1rrFzVdV5n7tOvaxuDX1AgbgyuwVaAoEKcFJrCDxIQiAQkQvmV/CnP/i1FAn4kCFEhAsH5Y6JWdfgRsARVaZDiAE1Ci7AJYOQnbwwYP8A2ftyX7+yub89aZ9acO/f67n1mzp2j8kn7npkz587Zs87ae629XpvoK3yF6URCxSC9j2MkDD4QH8icr12YOWffNzuf/b4m3+OojahQG4DfRDWiJffdd1/FnMcPw3v8ZnyWXocfjIZzej5ppF6SOerrhvf6PXo/Ko5JWoJEiSfHih7Rbrjhhi4QFEdtfD5t8r5ir8d5eQgNn2W/M3M+MUffl04nZmK5juo/Xn+4JVD35Zdf3o2jaXpN9jNL4HHXXXTRRT3Z6wyxu4Rwab/M645B0qSlnDE4OPjdsbGxn1er1Q9cQeB7vcH3/NdDhw4tMxxeMSND+90xaCAct67t27cvGB0d/bmbZqAP6AsJEc18rNw4rbBCIh02mzdvPhVc4DoE6Av6RI3TSnZYTwuyktbPTSMjI4+6DgM4EX0zQ7plc2K0GsM3J1U3tm7d6juxe/fus3t6eu6gDkN3d/edR48evWz//v142JgEO2IO1HmvSyUiT97/5joUJ06ceFQkvJXW0yaVE9XnqK5i9DIB33QdCmgCK1eu7OV+WtUH0jldvRRKPMpwH7/ucx0O9BEENJxolW2KQSz76vAl0wk8zUHqYCxfvry/t7fXbdu2DdSqUm0pjbV0YSxo16MgXMp93Ga4Dgf3sZ9bb2YFo0u99s+FeiO5WTr3gYBnnHFGGQg4Qx52rxKwUGHiahNuKn3RCZmY+5YsWTLTdTi4nzPPPvtsz4VkBAmJMIlBqB7onxJLX//EeCikQ3rPnj1UBnzwwQf6MuHfoa9dM7tjy+GMaUokmZ//MHz5GMWBr725g9v23OenAqpzYJ/0vcuujykC3SEXy1Ny/OQqTz31FDEH0muvvZZ8/PHHUR3485adtOG5F9L3F65eEXV+qli0aFHCHJh8/etfd++8847vr6yiQMSoMRw0hJ3ME0w8/4LNVb4TPP/F8X+jLTn+/BSxd+9e4tGib/1vwG9xrkBN2hosSYYwtxmnnXbabBeB17bs8C3v+amA+zmb6pK4hxpthe1HrQ+p3S+dA/MQsEigjxkCdqsa4yKJGDSExRHkX7MQ8afQMITZ0lHsgjIHWPXSvjq1JMVK4dD/Uo8ZmfWwV6oxQX/22WdHKRAQDJiOsgIh9PyUOp8k4MCqaX5JB+5UAUmBCJLCChARHLhv3z5iAyqxRIO1I9i2WLQUBiBEoDUwFyYLFy50L730EuXRAYMJKEMYN07vyrqVMwrq1FGwFLbfAIPCeeedl3vaCeqFqzvGgQYfLA/hStQQfmunP1646txc56cC7vscPoxRZgjLsZA5XBfd49bBfJzlOhw0gRpDOQwJwfOWMzonDwMM39Ksg3mU+M7zSqThvCtQj/YcaEz5ngO5zeTOlYEDZ8m6PeVA+S3RHBjzj57lWQonLIUrzIX+PSupXfz+CHUwTjIHEkXMgzFCxEYi2IgELImChUiRYLVlDiv8KQGZCbA6cbwetrpgEEIJqBFnOnemk3CsFC4SyoE8B1ZZd0250BAvmANDl3L+oG/1vLFwdDo8gZh4OKQGVQnMLM6cJd79hk6VBOlDZ1smhm79g0JM0iZwUizSkML9ItlKIYUpowdiTe9ymLNipTCsMZUjR44kbJH29kFWpunTTz89Rh2MJlLYrkKiRlKwNYbGB1OmXjp+kmVVY8gcgxAzBzrMgWIP7JhIp1DAn0PCdTLCi/ELk4lK4NbDKkFp18KYx/M61mOHMNH4iPiOV6SbGFSzq5D26oFOhjD+sA7VcDNWpKkMgM4KAwgZPZB/lyVk++AkJFbYPo2LodqwKK0aQznC24Khbk3VA8XTj051vFeOZA6UPvdkgs4LQaqyyM3xFJWApTFnQfBRPVK1kleZDoLxxqWxgbISKQMH+iGsHGg9i67AdAcbXOSXclQix3rWoEqSEkZFwE0uRErDgdLn3lbogTF5IqlznRpFf2msMuoTYdds2mchcDCCFWnc5/7770/Mk6vwSqSLHUv4rG2K9NDwML386hZ6/6NPffvamUvph1d/l+bNnTPl78hapKlRkY5aC8esRPwR1hjxiXgittMnAuKt+/WztGfv5/79ty5exf7hXbRk4QL6yc3XTvl7rDGBBWCVLUnFrkRIOB0hvgiJmDFjhhOtniqVSluGsCUeuA7o7+ujb31zlefEEKhbE2Di+aNGWrgiYqRd3SeSdiIqpGOKsMT73hVrPLdduGoFvfCnzfQ/m9+ivzrna0Hflwmw1CApMnN6MGJ8IojqtOFtaedaCUu8+TzP/e+mLXTo8BH6wdV/6zlxaGg45cgQILBIhIhnOSEgxSbbBEthPC0b3Y54Y2oxLPF+wILixzLP4dzLm2qCZMmiBXTR6rD4GJ6n/QOHU0nsgT7eMXr8UmS6K+KKMQeiE+LhahmyxEMQETgQRBwcHqH/2viyJx6GM+bCELAEToewzIE1A2ejtzEIMRzojxjCiNBXIdIKNCOe4v0PP/HDNpZ4AHMgSUYB4KMr8MLlyNiMJiA4EOju7tY75yLkZMT785YdtOG5F3MRD8iEITtVpEUyFqJIA9n4QCjSlTyKdBHEA7IWaYR2MBER1lGNJWJMaEczk34XD49KjCJdFPGASVYi0cFFMWoMvHJkvHL+GBOlXyTxgGwfVZuAZhE7B0Y5lbASYUk8LkIrdAj/4le/8cQDkb5/xbdTva4dxAPAgX19fWMsSCwHAhjGUbpgsFMJ3GcUaZeN9pwqoMupkowjOBHn2kU8AGoMYPps570oFgxNNlSPXCL5csmJEyd8ok1omO+new/44+0/voEGh0boX9aup9//cVOqJLeaeAJn1Bj/Xl/ECpHgtTDuBeLJ/IHsR8fEC74x9Drg4OGjNKO/13Nim4mXul6b6a5FzYEqiW2AZVRszC9+9RQP3QMN59pJPMCqMdac5Vx84YnQRJvEsHrFHIPYHysKEA9cB8GxeNFptJSJBwK2i3gAOFCNHljKYRRhPtfKl20PEXSZjHVbsYMC3ZqDQ0OuaNB4t2Za1c0VGFxkq0t6v7C4CUsVmYCHL57FQh3rSkAtedIjT7MUbk0lYJYDCyOgMzVjTNGJMkUmzJb+2hJQxbk1bWlhscb4E2WJ0oc5izKEUusSFWGNcXWfSCkTbSbyygl3Ri3lot2a3CorV66sjIyMJGyV1uINZYuRTq0xzsVlKsVma6Z3wlKOIn2qRcO6NWELtJ8VlCbSkK3ZULWjLNmaJEJEcp3TPBFXoDlLj34Ia2QClWwOpBbliQRHJuCPevMRmSCmoUIV0ViIFG5IuJZCatGIcmsC8GjBK9dqt2Y7AYs0VC7b51YUngiBrZ+ard5WyiBzKjhC1ep9PsASy6ISETCNUMVauBVB5jFqjMvOG7Hl74oG1Bi1SMOchcLcJDGPLpIDg+yBrm4z0xw5FLjWh9DxeiDbAhuIhHR/qlevbL8UVmVTONChfBLely1jXaEJ14WFt1HNJ5zIjRPUjTGhHWVAgofdTPWKHcIxVTsqElOninSFO4UyoEGK9D8/8EsKwU//6R8oLxYvXjybh/G46m2Uw7UZ6tZMbESnVAT3XBiTbAh/yMmCJDWovBXIzoHUgiyDUKeSE+LpzfwUMDw8XKlWq8FDAMT7u+9cPOk1Bw8f8ZGprQCkcE9PD2V8w7kQ7JWDGqNbm5EQUvzCLZkL2zm0mz1kDRJwsj0dBSKYA2UOdGZPOCfhbdQqtGtom+AiT0hxazoXGRcDxFSwVOL52itStaOlCddTGdoaBhIDqSMN4vkdbsQvHMWBwcFFTgKMAM21iAntmCYk1piArHv9LYVwoCk85muoaphvWWCXcoCtXBSLGHOWf1JKPHaq45C0Ok+kHcgk2nhImgPFIipbE3800QbRWVQyWIOqJNlQLGJy5Vym+JjVC0sBa1CFGuMyjrIQhFpjmhU582qMeOc6HeP6CDVGy9+13a1Z2we5xmwyhP3pEknh7CokpVjsMA6eA2UTZZJUr3QFEhOlDz0O+py2Vi3ZJgKkMIqGmzlQnWTRoyd4KUcm5V/3E4lFdjWx7KzTqd3Ahix8cLKZjD8numDUXB68lDOvE7HGVCTIPIiYrTBPhUJVLXCgEk8QvZaP4UB/hBbPE3AFeiBUGfW5tgI6tE92TQTSh2w5ECjKmJDeD8Rjg6qvZo6OtXI/kVbaAJtB1Rj4tpFwmMeYEArvF87UjSlN7SzE75DxC6tb01QgKQSeiHmDzKcDZAowSt9zF6ENgqsHmXdlSz9RiSoXSYx0dofXQuAjEzKbEZQmRrrJplTTEtrhg8zJ7CdSFgJSpoaqCe2IDrKKjpHWOtKff/55lyinpSqDjJ29WIPA61pdU1fAPsNOkg3JBBdRiXa0aTaEC5XAzmQq2c1JuZWmDHKmfmBawTKWiLHZmmmaA69EumDKCo1MmA5gCDMBx/r7+6tz586tLlu2rCp5z9FLuagYaezuitAw1uIbCk+4zp8Dfbprdj8RKqrohEJ3dyUqlyWaGr1ytoQVUJhf2AsSKVpTER9rZTJjAqafoaEhGh0d9a0d6OrqQjk+6psk3zjTx4biY7GICW/T195+ho2OsRWGFnTIolqt0qFDh+j48eNtIx4wNjZGR48epYMHD/p7NgP6mI2LgW3TRFkEI6rsCUndKbufCNW0+XFCZLIf1C5UKhWaN2/eODO9Ft6ZYE+lYvJERB3QbE1vnOR5penNh4eHCycegHtiysjCVm9TqFvTFVR8LFGfCIA8EVFhEq3NZ9HsRxSFZtOFRiaY0A4yoR0Ugzzprgkvh7qQ6jVRFV9e5tF0YsGCBQ3vJ9oWTT5u/4422g9pao0uEzyxLAf6ky4+tiM0uMh2xBMfRWx4GGOdGfQwhodH6LP94Rx61hlLKBa27AmA4CJEJuQxIkRJYYnqxHsvfXlirjRbyk02hD/8eA+tf/p5CsXfXPIN+s4lF0zp2iZD2K5EQDS1xqgkplDExAfqztBeD4QUzpOpdOVlf01//8OraPXKmrMbr7UBOK+v5w3Mpj+88gb98ZXXKRK+j1KEtiUJ18ErEZUiGh+o80msW3PRaafwsFzsORLAa8WZ/BpDVs+t8kROmIg1Ak6VEy10j3UEBWAOZGage++9t5jQDpsSBeIhU0kLebXSram4xXCmAkP44gtWek7cu/8LCoTvI0YNggJgEDHhbe2PzqLaUq6iqQ7ohAZYUouw/unfnvSac//yTNr0+jYaYkEUiMQu5SRXzv+WwuZAiQ10UkJYAyxd3iDzeQNz/JC1xjnb8BmuyYmUAzF6NMg8hxYTHSM9Dk2ygIKAoZodrm1AKkRIng2GsMyBUcFFUTUTABMj7StYUglh9xemAu2Bft4QKeywm8NExoSpIkQnVJUmFiqFpZZ+CldEcJGr72aTqBSGIIExwRa1iQWG8NyB2U0/O/zlUdqyLXeBC29MgEsTkVk2OqvIPBGnGZsamRVThLYZVq9c3qAHWoBL8xIQFiOoLlLrJpXA8nFxc2DGBF4av4joqml/M/uDFmJQTTJHDwSZl2VzUgMtJu7hImNjYmNC/NPS9WSJaiZYIik31pYhBWZrekAK79u3z98cE3MsB+41Jq3aazfBdV+Mu34iTKIYj/tAK/lSUUHmYPUbb7xRzVnpE4zNlfvdf7/a9PVUrp+gg77BL8J2Su9gguxDEyHir4Mas2zZMl/6iVvCynQ1ZikXU3QiDevgTnivHEz6qB+T3Q5jMnsg1rERxoAGLGZLTl9fb0P/4N58+umnaf369XTKKafQgw8+SCtWrPB+Yx4lqVcOoR1SwdJv0ByrTAdbpIWITgK0/V25cyjAE/JV1M8/fCKVJQbKdYcPH/bE27BhA+3cuZMefvhhWrt2bYO5KlMwLVeURUwlc//CLuU0eYWmGSAinPhz5syhpUuX+uM999zjh3J3d/c457/uB8CLg2Jy5Qyyd2rq0UKFjCKh854KERCQnf/exSkjpCLrdt9/qDGI89G0/xhE7StHhtvEnFVpJoXx1ItEM+k7e/ZsevTRR+mjjz7C2zPYV61xgT0oHERExaW7AiytvOTVKpY8IaMIo2tmzkKwz8jIiJ/Yi0KWiLfeequf/+666y4655xzNuzatQuUfIPbYV7Svc39/w/mwhNGkAQh2KBqbwJjAibkiRRpXDswMOAlYDuhAkTDSKC6KK699lq6+eab6YknnoBQWcE66+W33377j9atW/ePTND7uP8/YrWsC0YSikCMXzjJrIWTySoBaaAP4mQQ6hEqrU8GEO3LL7+kN9980xNy1qxZDZ9jHgQgVIDTTz+997HHHvNP/Pzzz59xySWXXMYvf7N169aoYRKbranJhlOWvIjb62vxXiEqNJijPKHQXnnllZRoJwOPHCiRS+fPn9/93nvvgW0LmWvsbg7TmmiDiIhjx465NWvWOOZCf27Hjh3uyiuvnNL/7969G16p33GbLzkvwcM4Zk+lcSag6TAmOFmyQUBdeuml9Mwzz/jz5557rhccik8++YSYoP7Ic957PN2M8vFd+128KiGxEQYjxi88joitrIYWCvQJBHrxxRfTc9dddx2FAKuXq66KcxVEO5XEGJkqpUXbA0E4CCi0Cy64wEeKbdq0Keg7WMnGnHcMHPj2229HBVnGGFSdbM6XsjyG8HRULgIRoaz39vbSLbfc4te8U/1X/HnyyScP8eFdfgg+2Ch2NRKKhj2VZD+laREiLIVTQcIP0N10003u7rvvntL/QoAsX758Fy83v8FWmwH8FtfujE25QWIy1tMtgaZrTyUWIo51TMfzGOZid+edd7rrr7/+pP932223YWfAn3JbiFw/YYj2wtULVqf5wrop1XRuhwEiDg4Oui+++MIT8Y477nAPPPDAuOuef/75I0zoMVZ5oM1v5fZN1gHnUk0dKyw4YFy2Jk1zvjCGMoh4/Phxx0Zcx8KkqS7IQ/bdhx56aL/of7/nBoMkHNE9VAQBnWRr6hC2NROme0MWOx9u2bLFrVq1ygeCwomujfv579w2U437oEAvkIePPL9irDHobGbhnWi4RKugW+VafO+KNbTm4tUT/o+qNZDKZ511Fm3cuNGvv60liJXsn7F1CNmao3zt0MyZM0f42hPXXHONKzIyId3EBHki1GJozRjsdj1vbm1N+/pbO2n7rvcnJaD0L1VrQEysvbFedmJFYqvQl2xsGOPXY3zdKL+v5i1fFWNMqOjewlSzB/p8OYqcQ57b+Ce/QbMC24YDe/Z97mtIA4PsgBrcV9vE2eL7V36blixcMO47YQmHCc3Jck/1Oz4/yCpL9ejRo2MHDhxAJs6YVDaP3pw0KsgckFPeHihm8kifSOI5Tiu3YXdXVPHtN942EMkSyl6fBTgPxAMR0cCN+po5coTnyWEQj+dv3VuJxKRfnBChRincn3dDlrt/ttZt/MOrbbteQROk/FMOCRwdZK40pWk2JoQCfUWIr8QH2sisYmJjXKaCZbPttvMApeC1cttEr/MC047EBmrfnSsqW1NVGN2c1FTxLUyTbwWUA7UMcmH5wtnYQC2n2YoI1XYDyUC6IYutXllYGWQnUthuCSQqTO4o/SLAErrlDzlYkQYRNVfORmiVgQMBK/C0ACPlQEyunH2bWqVLUgq+ofMZ4hUeI52YVgrus4AQMSn/0dNPVPAKO6ETiVD1SXuyKRWVCZrmYKahYsLb8Ee3kUARWgB5ItQiNeYnN1+bGhEmep0HGctRYkJ8gfaH+JIMWZmAvUowNDTkLcHUAtitgCZ6nRfoM6+RExaGtvhYFIKHsFYxB/GYiFU+4jtycd+SRad6k9VUoEaE+fMGKBSqKWiyIVyhUMvy6IExNRO0XJIuwjXUI3qTepizfr3ht6n5ajL09/fRRWwrhIE1FLaCJQsRjZHWzKv2Vwhyza0xpamhaitY2jLIlMOYEAPPdVoGWf3CZdikPluIm+pVfKOL0AYv5SjzpJDuCpRlT6UsxJgAFMKByurjhnAZOFCHsIyaluxwHUxA7ocXILi51pEuyxbh7ZgDY/7J3xAKKKI62dNfQQVLqknh0hShbVI/EJcE64PBBKzdK9G5s2IbuxC38WdnUgeCnUlvsWPpUqrvLayNzLHtxoTUBE61XDn7meMVyX9Sh4If7hZ52UAkLXviXEsWUieFChCvPGMewTwok/JMlshXuQ7FCy+8cJ5UXEdfMXfb3RwK2xLDSmEfH0hGF+Q25/jx44+7DgP6RLIRgfS1V/RYWwe7/V45N57NYdb36V6wcrAqU123bt0DmG+oQ4C+oE/UZH7TEsjyuwoZw6kRFWoMmg5jkuUct9mPPPLImceOHVvrphnow+OPP/4X6JMOX/QVfUbfrQrjCpwD9ZiG+VI9XwSdxFDBon3us88+u5qHz5Ojo6NbXEEYGxv78MiRI7/cvn371dyHAenLLCFgn/Q1Xca5+g4VuQgS9D+unrluW6XJsZK5BllEqD/d9N6anmqODrWq5WNn/8dkIzn5vjRxet68eT5cDdFXBw4cwN6f1T179lQlEKrK8x/KOGtQUa59RKIW0UbpdJLuoAGMTspAoXk9a/78+f4HzZ071zf+sdWBgYH0czR+jyPCzvwR1+A8H/11/H9aqhPHMbzHNdL0u3Af3K966NCh6sGDBz3x8Bky6vE5IvFBPP0ZOJc3pijqv119SwySeqpNuRGFaVEp6NRTT0WgY6oq8A9s4CYmSIIg8ex99DySFeX/0s9wDu/xgFAtXbuGhrqAkp2eVZbtwyXK4QvJC0ssDTiHWpDus6S6IdUEixcuVJuPtA0wYf0x0+Y2OecbAsIlJcE3eT1HvkfbLBg2jM7XJ33SaKwumbtTo3BRAqQBTrR3J8YFqm+V1kP1nW76pc2QH+Sb2OVAUD2mTRb8s+Q4O3udfm6bfJ+39YlhA60fGQRiNLChbA072LicCnT8blaZYoxYEomj2jeYzKm2+ZM/IrSWZBhJVOgY/9gqJnh5PYbXfX19fr7r7u72/4fzeI/P8JqHZnYtq1Gm/jp2bqWfQWBAEFFmqNqqlUmSTMsQVjSoNVRfoeiQ1qffa5vklqjqk3Iqhj0+0ybTQNrk/+w5/10YojJMezMcp31Rna9w8/2U4OqWamudaZgbqZ4WYQnriatzlFHKbfPXyP+mR6o/mB6ZOnzDazRV9NVoavS9lhKwJV9k5xFTnCc9hz3opGKuh01UVEgVpOpEfZIM+US+z1fgNd8zLoc5+94M2WbXdAYMIT03mp1gK2YIpRYQyyFmu8muzK6r9lxX9jqzJGtoZtNR26fOhxtvW0uaDJ+szmgJrD+84QFkm35n9kiNQ7QlknbaoB3XOdLMlfYHTUhcVZNOQqRmKCfBIvH/6sd+hQz+Dw/Pe2ZHPYXfAAAAAElFTkSuQmCC",style:{display:"block"}})),l.createElement("div",null,l.createElement("h3",null,E("You don`t have any saved blocks yet.")),E("To add a block from the dashboard click the"),' "',E("Save to Blocks button."),'" ',l.createElement("svg",{style:{position:"relative",top:"2px"},xmlns:"http://www.w3.org/2000/svg",focusable:"false",viewBox:"0 0 448 512",width:"1em",height:"1em",fill:"currentColor"},l.createElement("path",{d:"M433.9 129.9l-83.9-83.9A48 48 0 0 0 316.1 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V163.9a48 48 0 0 0 -14.1-33.9zM272 80v80H144V80h128zm122 352H54a6 6 0 0 1 -6-6V86a6 6 0 0 1 6-6h42v104c0 13.3 10.7 24 24 24h176c13.3 0 24-10.7 24-24V83.9l78.2 78.2a6 6 0 0 1 1.8 4.2V426a6 6 0 0 1 -6 6zM224 232c-48.5 0-88 39.5-88 88s39.5 88 88 88 88-39.5 88-88-39.5-88-88-88zm0 128c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40z"})),l.createElement("br",null),l.createElement("br",null),E("You can also save all blocks at once. The AI \u200b\u200bassistant will automatically determine the type and create a name for each block when saving."),l.createElement("br",null),l.createElement("br",null),l.createElement(wa.A,{justify:"left"},l.createElement(g.Ay,{type:"primary",onClick:()=>i(!0),style:{cursor:"pointer"}},"Save all blocks")))))),($||Q)&&l.createElement(R.A,{active:!0}))),a&&(null===J||void 0===J?void 0:J.length)>0&&(null===P||void 0===P?void 0:P.length)>0&&l.createElement(m.A,{className:"blocks-search__result-divider"}),("template"===t||a)&&l.createElement(l.Fragment,null,!!ue.length&&!a&&l.createElement("div",{className:"blocks-search__type-wrapper"},l.createElement("ul",null,l.createElement("li",{"data-type":"",className:"active",onClick:Be,key:"templateBlocksSections_All"},E("All")),ue.map((e=>l.createElement("li",{key:"templateBlocksSections_"+e,"data-type":e,onClick:Be},E(D.jg[e])))))),l.createElement("div",{className:C()("blocks-search__blocks-wrapper",{is_search:a}),ref:z},l.createElement("div",{className:"blocks-search__result-holder template"},P&&!de&&!me&&null!==ce&&void 0!==ce&&ce.length?l.createElement(l.Fragment,null,ce.map(((e,t)=>{const a=Na('<table cellspacing="0" cellpadding="0" border="0" width="100%">'+e.html+"</table>");return l.createElement("div",{className:"blocks-search__result","data-type":e.type,key:e.id+t.toString()},l.createElement("div",{className:"ant-card-hoverable blocks-search__result-body",draggable:!0,onClick:t=>d(t,e.html),onDragStart:t=>c(t,e.html,"template"),onMouseEnter:()=>Re({html:e.html,title:e.title}),onMouseLeave:()=>Ne()},l.createElement("div",{className:"blocks-search__result-html",dangerouslySetInnerHTML:{__html:a},style:{transform:"scale("+207/660+")"}})))}))):!a&&!fe&&!me&&l.createElement("div",{className:"blocks-search__type",style:{padding:"10px 0 20px"}},E("No related blocks found."))," "),(de||me)&&l.createElement(R.A,{active:!0}))),a&&(null===P||void 0===P?void 0:P.length)>0&&(null===ye||void 0===ye?void 0:ye.length)>0&&l.createElement(m.A,{className:"blocks-search__result-divider"}),("common"===t||a)&&l.createElement(l.Fragment,null,!(null===_e||void 0===_e||!_e.length)&&!a&&l.createElement("div",{className:"blocks-search__type-wrapper"},l.createElement("ul",null,l.createElement("li",{"data-type":"",className:"active",onClick:Be,key:"commonBlocksSections_All"},E("All")),_e.map((e=>l.createElement("li",{"data-type":e,onClick:Be,key:"commonBlocksSections_"+e},E(D.jg[e])))))),l.createElement("div",{className:C()("blocks-search__blocks-wrapper",{is_search:a}),ref:W},l.createElement("div",{className:"blocks-search__result-holder common"},he&&!(null===Ae||void 0===Ae||!Ae.length)&&!(ve||fe)&&l.createElement(l.Fragment,null,Ae.map(((e,t)=>{const a=Ve({html:Na('<table cellspacing="0" cellpadding="0" border="0" width="100%">'+e.html+"</table>")});return l.createElement("div",{className:"blocks-search__result","data-type":e.type,key:e.id+t.toString()},l.createElement("div",{className:"ant-card-hoverable blocks-search__result-body",draggable:!0,onClick:t=>d(t,Ve({html:e.html})),onDragStart:t=>c(t,Ve({html:e.html}),"common"),onMouseEnter:()=>Re({html:Ve({html:Na('<table cellspacing="0" cellpadding="0" border="0" width="100%">'+e.html+"</table>")}),title:e.title}),onMouseLeave:()=>Ne()},l.createElement("div",{className:"blocks-search__result-html",dangerouslySetInnerHTML:{__html:a},style:{transform:"scale("+207/660+")"}})))})))," "),(fe||ve)&&l.createElement(R.A,{active:!0}))),Le&&l.createElement("div",{className:"blocks-search__type",style:{padding:"10px 0 20px"}},E("There are no blocks for this request."))))};var Da=a(10750),Ha=a.n(Da),ja=a(97946),za=a.n(ja),Wa=a(50664),Ga=a.n(Wa),Ua=a(36529),qa=a.n(Ua),Za=a(22548),Xa=a.n(Za),Ka=a(20065),Ya=a.n(Ka);const $a=[{sizeArray:[24],name:"column-one",html:Ha()},{sizeArray:[12,12],name:"column-two-50",html:qa()},{sizeArray:[8,8,8],name:"column-three",html:Xa()},{sizeArray:[6,6,6,6],name:"column-four",html:Ya()},{sizeArray:[8,16],name:"column-two-33",html:za()},{sizeArray:[16,8],name:"column-two-66",html:Ga()}],Qa=()=>{const e=(0,F.sh)(),t=(0,F._9)();return l.createElement("div",{className:"structures blocks-search__empty-wrapper"},l.createElement("div",{className:"structures__list"},l.createElement("div",null,$a&&$a.map(((a,o)=>l.createElement("div",{key:a.name},l.createElement("div",{className:"structures__item",draggable:!0,onClick:t=>e(t,a.html),onDragStart:e=>t(e,a.html)},l.createElement(b.A,{gutter:[6,6],className:"structures__item-row"},a.sizeArray.map(((e,t)=>l.createElement(h.A,{span:e,key:a.name+t},l.createElement("div",{className:"structures__item-col"}))))))))))))};var Ja=a(7549),el=a.n(Ja),tl=a(29539),al=a.n(tl),ll=a(6573),ol=a.n(ll),nl=a(75424),rl=a.n(nl),il=a(43643),sl=a.n(il),dl=a(96786),ml=a.n(dl);const cl=[{sizeArray:[24],name:"column-one",html:el()},{sizeArray:[12,12],name:"column-two-50",html:rl()},{sizeArray:[8,8,8],name:"column-three",html:sl()},{sizeArray:[6,6,6,6],name:"column-four",html:ml()},{sizeArray:[8,16],name:"column-two-33",html:al()},{sizeArray:[16,8],name:"column-two-66",html:ol()}],ul=()=>{const e=(0,F.sh)(),t=(0,F._9)();return l.createElement("div",{className:"structures blocks-search__empty-wrapper"},l.createElement("div",{className:"structures__list"},l.createElement("div",null,cl&&cl.map(((a,o)=>l.createElement("div",{key:a.name},l.createElement("div",{className:"structures__item",draggable:!0,onClick:t=>e(t,a.html),onDragStart:e=>t(e,a.html)},l.createElement(b.A,{gutter:[6,6],className:"structures__item-row"},a.sizeArray.map(((e,t)=>l.createElement(h.A,{span:e,key:a.name+t},l.createElement("div",{className:"structures__item-col"}))))))))))))},pl=`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td>\n <img src=${a.p+"static/media/empty-image.png"} width="150" border="0" alt="" style="display: block; width: 100%; max-width: 150px;" />\n</td></tr></table>`,gl=`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td>\n <img class="em-ai-img em-just-inserted" src="${a.p+"static/media/ai-image.png"}" width="150" border="0" alt="" style="display: block; width: 100%; max-width: 150px;" />\n</td></tr></table>`;var bl=a(34021),hl=a.n(bl),El=a(62315),fl=a.n(El),vl=a(67558),yl=a.n(vl),Al=a(75995),_l=a.n(Al),Cl=a(80465),Sl=a.n(Cl),wl=a(40845),kl=a.n(wl),xl=a(66930),Bl=a.n(xl);const Tl=`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td>\n <table border="0" cellspacing="0" cellpadding="0">\n <tr>${[a.p+"static/media/tg.png",a.p+"static/media/yt.png",a.p+"static/media/vk.png",a.p+"static/media/yd.png",a.p+"static/media/tw.png",a.p+"static/media/ig.png",a.p+"static/media/fb.png"].map((e=>`\n <td width="40" align="center">\n <a href="" target="_blank"><img src="${e}" width="30" border="0" alt="" style="display: block;" /></a>\n </td>`)).join("")}\n </tr>\n </table>\n</td></tr></table>`;var Rl=a(45848),Nl=a.n(Rl);const Ll=new Date,Pl=new Date(+Ll+432e6).toISOString(),Il=-(new Date).getTimezoneOffset()/60,Ml=e=>`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td align="center"><img class="em-countdown" em-cd-settings="locale=${e.replace("_","-")}&bg=FFFFFF&tp=false&color1=000000&color2=959595&size1=72&size2=28&font1=roboto&font2=roboto&border=10&delimiter=:&spacing=10&time=${Pl}&timezone=${Il}&frames=20" src="${(e=>`https://cdt3.emcdn.ru/timer?locale=${e.replace("_","-")}&bg=FFFFFF&tp=false&color1=000000&color2=959595&size1=72&size2=28&font1=roboto&font2=roboto&border=10&delimiter=:&spacing=10&time=${Pl}&timezone=${Il}&frames=20`)(e)}" border="0" alt="" style="display: block;" /></td></tr></table>`,Ol=`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td>\n <img class="em-video" src="${a.p+"static/media/video.png"}" width="150" border="0" alt="" style="display: inline-block; width: 100%; max-width: 150px;" />\n</td></tr></table>`;var Vl=a(74372),Fl=a.n(Vl),Dl=a(12133),Hl=a.n(Dl);const jl=()=>{var e,t;const a=(0,y.s9)(),{__:o}=a,n=(0,Y.rD)(),r=(0,f.d4)(ke.yN),d=(0,f.d4)(we.B$),m=(0,f.d4)(we.C1),c=(0,f.d4)(we.B),u=(0,F.X7)(),p=(0,F.Qi)(),[g,b]=(0,l.useState)(!1),[h,E]=(0,l.useState)(0);let v=!(d||(null===(e=m.id)||void 0===e?void 0:e.toString())!==(null===r||void 0===r||null===(t=r.members)||void 0===t?void 0:t.owner.ID))&&!0;const A=[];n.elementImageEnabled&&A.push({title:o("Image"),icon:l.createElement(z.A,{icon:"ElementImage"}),html:pl,className:"",name:"image"}),n.elementAIimageEnabled&&A.push({title:o("AI image"),icon:l.createElement(z.A,{icon:"ElementImageAI"}),html:gl,className:"ai",name:"ai-image"}),n.elementTextEnabled&&A.push({title:o("Text"),icon:l.createElement(z.A,{icon:"ElementText"}),html:hl()(a),className:"",name:"text"}),n.elementHeaderEnabled&&A.push({title:o("Header"),icon:l.createElement(z.A,{icon:"ElementTitle"}),html:fl()(a),className:"",name:"header"}),n.elementButtonEnabled&&A.push({title:o("Button"),icon:l.createElement(z.A,{icon:"ElementButton"}),html:yl()(a),className:"",name:"button"}),n.elementSpacerEnabled&&A.push({title:o("Spacer"),icon:l.createElement(z.A,{icon:"ElementSpacer"}),html:Bl(),className:"",name:"spacer"}),n.elementListULEnabled&&A.push({title:o("List UL"),icon:l.createElement(z.A,{icon:"ElementListUL"}),html:_l()(a),className:"",name:"list-ul"}),n.elementListOLEnabled&&A.push({title:o("List OL"),icon:l.createElement(z.A,{icon:"ElementListOL"}),html:Sl()(a),className:"",name:"list-ol"}),n.elementDividerEnabled&&A.push({title:o("Divider"),icon:l.createElement(z.A,{icon:"ElementDivider"}),html:kl(),className:"",name:"divider"}),n.elementSocialEnabled&&A.push({title:o("Social media"),icon:l.createElement(z.A,{icon:"ElementSocial"}),html:Tl,className:"",name:"social"}),n.elementTableEnabled&&A.push({title:o("Table"),icon:l.createElement(z.A,{icon:"ElementTable"}),html:Nl()(a),className:"",name:"table"}),n.elementCountdownEnabled&&A.push({title:o("Countdown"),icon:l.createElement(z.A,{icon:"ElementCountdown"}),html:Ml(c),className:"",name:"countdown"}),n.elementVideoEnabled&&A.push({title:o("Video"),icon:l.createElement(z.A,{icon:"ElementVideo"}),html:Ol,className:"",name:"video"}),n.elementCarouselEnabled&&A.push({title:o("Carousel"),icon:l.createElement(z.A,{icon:"ElementCarousel"}),html:Fl()(a),className:"amp",name:"amp-carousel"}),n.elementAccordionEnabled&&A.push({title:o("Accordion"),icon:l.createElement(z.A,{icon:"ElementAccordion"}),html:Hl()(a),className:"amp",name:"amp-accordion"}),n.elementFormEnabled&&A.push({title:o("Form"),icon:l.createElement(z.A,{icon:"ElementForm"}),html:null,className:"amp",name:"amp-form"});const _=e=>!v||"ai-image"!==e.name||(setTimeout((()=>{b(!0),E(2)}),1e3),!1);return l.createElement("div",{className:"atoms"},l.createElement("div",{className:"atoms__list"},l.createElement(s.A,{wrap:!0,style:{justifyContent:"flex-start",rowGap:10}},A&&A.map(((e,t)=>e.html?l.createElement("div",{className:"ant-card-hoverable atoms__item "+e.className,draggable:!0,onClick:t=>u(t,e.html),onDragStart:t=>p(t,e,_),key:e.title+t.toString(),"data-test-name":e.name},l.createElement("span",{className:"atom-image"},e.icon),l.createElement("span",{className:"atom-title"},e.title)):l.createElement(i.A,{title:o("Coming soon"),placement:"top",key:e.title+t.toString()},l.createElement("div",{className:"atoms__item atoms__item_inactive "+e.className,key:e.title+t.toString(),"data-test-name":e.name},l.createElement("span",{className:"atom-image"},e.icon),l.createElement("span",{className:"atom-title"},e.title))))))),l.createElement(Ce.A,{open:g,onCancel:()=>b(!1),initialSlide:h}))};var zl=a(54880),Wl=a(84893),Gl=a(54855),Ul=a(74984),ql=a(72218),Zl=a(8122),Xl=a(86956),Kl=a.n(Xl);const Yl=({form:e,elementSettings:t,imgParent:a,name:o="align"})=>{const{__:n}=(0,y.s9)(),r=(0,Me.XW)(),[d,m]=(0,l.useState)(t[o]),c=a=>{const l=a.target.value,n={[o]:""};l!==d?m(l):(m(""),e.setFieldsValue(n),r({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:n}))};return l.createElement(S.A.Item,{name:o},l.createElement(gt.Ay.Group,{disabled:a&&!t.parent},l.createElement(s.A,{size:8},l.createElement(i.A,{placement:"bottom",title:n("Align left")},l.createElement(gt.Ay.Button,{value:"left",onClick:c},l.createElement(z.A,{icon:"AlignHorizontalLeft"}))),l.createElement(i.A,{placement:"bottom",title:n("Center horizontally")},l.createElement(gt.Ay.Button,{value:"center",onClick:c},l.createElement(z.A,{icon:"AlignHorizontalCenter"}))),l.createElement(i.A,{placement:"bottom",title:n("Align right ")},l.createElement(gt.Ay.Button,{value:"right",onClick:c},l.createElement(z.A,{icon:"AlignHorizontalRight"}))))))};Yl.defaultProps={imgParent:!1};const $l=Yl,Ql=({form:e,elementSettings:t,tooltipTitle:a,disabled:o=!1})=>{const{__:n}=(0,y.s9)(),r=(0,Me.XW)(),[d,m]=(0,l.useState)(t.valign),c=a=>{const l=a.target.value,o={valign:""};l!==d?m(l):(m(""),e.setFieldsValue(o),r({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:o}))};return l.createElement(S.A.Item,{name:"valign"},l.createElement(gt.Ay.Group,{disabled:o},l.createElement(s.A,{size:8},l.createElement(i.A,{placement:"bottom",title:n("Align top")},l.createElement(gt.Ay.Button,{value:"top",onClick:c},l.createElement(z.A,{icon:"AlignVerticalTop"}))),l.createElement(i.A,{placement:"bottom",title:n("Center vertically")},l.createElement(gt.Ay.Button,{value:"middle",onClick:c},l.createElement(z.A,{icon:"AlignVerticalCenter"}))),l.createElement(i.A,{placement:"bottom",title:n("Align bottom")},l.createElement(gt.Ay.Button,{value:"bottom",onClick:c},l.createElement(z.A,{icon:"AlignVerticalBottom"}))))))};var Jl=a(33365);const eo=()=>{const{__:e}=(0,y.s9)(),t=(0,f.d4)(W.uJ);return l.createElement(l.Fragment,null,l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(i.A,{placement:"bottom",title:e("Horizontal offset")},l.createElement(S.A.Item,{name:"boxShadowHOffset",className:"form-item-margin-xs"},l.createElement(Ft.A,{placeholder:e("Horizontal offset"),prefix:l.createElement(Jl.A,null),addonAfter:"px"})))),l.createElement(h.A,{span:12},l.createElement(i.A,{placement:"bottom",title:e("Vertical offset")},l.createElement(S.A.Item,{name:"boxShadowVOffset",className:"form-item-margin-xs"},l.createElement(Ft.A,{placeholder:e("Vertical offset"),prefix:l.createElement(z.A,{icon:"VerticalOffset"}),addonAfter:"px"})))),l.createElement(h.A,{span:12},l.createElement(i.A,{placement:"bottom",title:e("Blur radius")},l.createElement(S.A.Item,{name:"boxShadowBlurRadius",className:"form-item-margin-xs"},l.createElement(Ft.A,{min:0,placeholder:e("Blur radius"),prefix:l.createElement(z.A,{icon:"Blur",style:{fontSize:16,marginLeft:-2}}),addonAfter:"px"})))),l.createElement(h.A,{span:12},l.createElement(i.A,{placement:"bottom",title:e("Spread radius")},l.createElement(S.A.Item,{name:"boxShadowSpreadRadius",className:"form-item-margin-xs"},l.createElement(Ft.A,{placeholder:e("Spread radius"),prefix:l.createElement(z.A,{icon:"ZoomOutMap"}),addonAfter:"px"})))),l.createElement(h.A,{span:12},l.createElement(s.A,{size:10,align:"start"},l.createElement(S.A.Item,{name:"boxShadowColor"},l.createElement(ye,{usedColors:t.usedColors})))),l.createElement(h.A,{span:12},l.createElement(i.A,{title:e("Shadow inside or outside of the element"),key:"inset",placement:"bottom"},l.createElement(S.A.Item,{name:"boxShadowInset",valuePropName:"value"},l.createElement(d.A,{style:{width:"100%"},options:[{label:e("Outside"),value:!1},{label:e("Inside"),value:!0}]}))))))},{Option:to}=k.A,ao=l.createElement(k.A,{className:"select-after",getPopupContainer:e=>e.parentNode},l.createElement(to,{value:"px"},"px"),l.createElement(to,{value:"%"},"%")),{useToken:lo}=n.A,oo=({form:e,name:t,elementSettings:a,isPicture:o})=>{var n;const{__:r}=(0,y.s9)(),i=(0,Me.XW)(),d=(0,l.useRef)(),m=(0,l.useRef)(),[c,u]=(0,l.useState)("auto"===(null===(n=a[t])||void 0===n?void 0:n.value)),{token:p}=lo(),[g,b]=(0,l.useState)("");return l.createElement(l.Fragment,null,l.createElement(S.A.Item,{name:t,style:{marginBottom:p.formItemMarginBottomXS/2}},l.createElement(Ft.A,{ref:d,min:0,max:g,placeholder:r("Width"),onChange:a=>{u(!1),b("%"===e.getFieldsValue(!0)[t+"Dim"]?100:"")},prefix:l.createElement(fe.A,null),addonAfter:l.createElement(S.A.Item,{name:t+"Dim",noStyle:!0},ao)})),!o&&l.createElement(s.A,{size:8,align:"end"},l.createElement(B.A,{ref:m,size:"small",checked:c,onChange:l=>{d.current.value=null,e.setFieldsValue({[t]:"",[t+"Dim"]:"px"}),u((e=>!e)),i({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:a.type,settings:{[t]:{classNamePrefix:"em-mob-width-",value:c?null:"auto",dim:""}}})},id:"auto-width"}),l.createElement("div",{className:"ant-form-item-switch-label-small",style:{position:"relative",top:2}},l.createElement("label",{htmlFor:"auto-width"},r("Auto")))))},{useToken:no}=n.A,ro=({form:e,name:t,elementSettings:a,isPicture:o})=>{var n;const{__:r}=(0,y.s9)(),i=(0,Me.XW)(),d=(0,l.useRef)(),m=(0,l.useRef)(),[c,u]=(0,l.useState)("auto"===(null===(n=a.mobileHeight)||void 0===n?void 0:n.value)),{token:p}=no();return l.createElement(l.Fragment,null,l.createElement(S.A.Item,{name:t,style:{marginBottom:p.formItemMarginBottomXS/2}},l.createElement(Ft.A,{ref:d,min:0,placeholder:r("Height"),onChange:e=>{u(!1)},prefix:l.createElement(Gl.A,null),addonAfter:"px"})),!o&&l.createElement(s.A,{size:8,align:"end"},l.createElement(B.A,{ref:m,size:"small",checked:c,onChange:t=>{d.current.value=null,e.setFieldsValue({mobileHeight:"",mobileHeightDim:"px"}),u((e=>!e)),i({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:a.type,settings:{mobileHeight:{classNamePrefix:"em-mob-height-",value:c?null:"auto",dim:""}}})},id:"auto-height"}),l.createElement("div",{className:"ant-form-item-switch-label-small",style:{position:"relative",top:2}},l.createElement("label",{htmlFor:"auto-height"},r("Auto")))))};var io=a(80320);const{useToken:so}=n.A,mo=({mobileBorders:e})=>{const{__:t}=(0,y.s9)(),a=(0,f.d4)(W.uJ),o=e=>(null===e||void 0===e?void 0:e.width)||(null===e||void 0===e?void 0:e.style)||(null===e||void 0===e?void 0:e.color),{token:n}=so();return l.createElement(b.A,{gutter:30},l.createElement(h.A,{span:12,className:"selected-td-form__border-col"},l.createElement(S.A.Item,{name:"mobileBorderColor",className:"form-item-margin-xs"},l.createElement(ye,{usedColors:a.usedColors})),l.createElement(S.A.Item,{name:"mobileBorderWidth",className:"form-item-margin-xs"},l.createElement(Ee.A,{min:0,placeholder:t("Border width"),addonAfter:"px"})),l.createElement(S.A.Item,{name:"mobileBorderStyle",className:"form-item-margin-xs"},l.createElement(gt.Ay.Group,null,l.createElement(s.A,{size:8},l.createElement(i.A,{placement:"bottom",title:t("None")},l.createElement(gt.Ay.Button,{value:""},l.createElement(io.A,null))),l.createElement(i.A,{placement:"bottom",title:t("Solid")},l.createElement(gt.Ay.Button,{value:"solid"},l.createElement(yt.A,null))),l.createElement(i.A,{placement:"bottom",title:t("Dashed")},l.createElement(gt.Ay.Button,{value:"dashed"},l.createElement(At.A,null))),l.createElement(i.A,{placement:"bottom",title:t("Dotted")},l.createElement(gt.Ay.Button,{value:"dotted"},l.createElement(_t.A,null))))))),l.createElement(h.A,{span:12,style:{textAlign:"center"}},l.createElement(S.A.Item,{label:"",name:"mobileBorderPosition",labelCol:{span:8}},l.createElement(gt.Ay.Group,null,l.createElement(s.A,{size:n.formItemMarginBottomXS,direction:"vertical"},l.createElement(b.A,null,l.createElement(i.A,{placement:"top",title:t("Above")},l.createElement(gt.Ay.Button,{value:"top",style:{margin:"auto"},className:C()("",{"selected-td-form__border-radio":o(null===e||void 0===e?void 0:e.top)})},l.createElement(Ct.A,null)))),l.createElement(b.A,null,l.createElement(s.A,{size:n.formItemMarginBottomXS},l.createElement(i.A,{placement:"left",title:t("On the left")},l.createElement(gt.Ay.Button,{value:"left",className:C()("",{"selected-td-form__border-radio":o(null===e||void 0===e?void 0:e.left)})},l.createElement(St.A,null))),l.createElement(i.A,{placement:"top",title:t("Around")},l.createElement(gt.Ay.Button,{value:"all",className:C()("",{"selected-td-form__border-radio":o(null===e||void 0===e?void 0:e.all)})},l.createElement(wt.A,null))),l.createElement(i.A,{placement:"right",title:t("On the right")},l.createElement(gt.Ay.Button,{value:"right",className:C()("",{"selected-td-form__border-radio":o(null===e||void 0===e?void 0:e.right)})},l.createElement(kt.A,null))))),l.createElement(b.A,null,l.createElement(i.A,{placement:"bottom",title:t("Below")},l.createElement(gt.Ay.Button,{value:"bottom",className:C()("",{"selected-td-form__border-radio":o(null===e||void 0===e?void 0:e.bottom)}),style:{margin:"auto"}},l.createElement(xt.A,null)))))))))},co=({form:e,oneMobileBorderRadiusValue:t,setOneMobileBorderRadiusValue:a,elementSettings:o})=>{const{__:n}=(0,y.s9)(),r=(0,Me.XW)();return l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(s.A,{size:10,align:"start"},l.createElement(S.A.Item,{name:"mobileBorderRadiusAll"},l.createElement(Ft.A,{min:0,placeholder:n("Border radius"),prefix:l.createElement(Vt,{className:"selected-td-form__icon-radius"}),disabled:!t,addonAfter:"px"})))),l.createElement(h.A,{span:12},l.createElement(g.Ay,{className:C()("selected-td-form__button",{"selected-td-form__button--active":!t}),onClick:()=>{const l=e.getFieldsValue(!0);t&&e.setFieldsValue({mobileRadiusTopLeft:l.mobileBorderRadiusAll,mobileRadiusBottomLeft:l.mobileBorderRadiusAll,mobileRadiusTopRight:l.mobileBorderRadiusAll,mobileRadiusBottomRight:l.mobileBorderRadiusAll}),r({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:{mobileBorderRadius:{all:l.mobileBorderRadiusAll,classNamePrefix:"em-mob-border_radius_all-"}}}),a((e=>!e))}},l.createElement(Vt,{className:"selected-td-form__icon-radius"}))),l.createElement(h.A,null,l.createElement(b.A,{gutter:10,style:{marginTop:-10}},l.createElement(h.A,{span:12},l.createElement(i.A,{placement:"bottom",title:n("Top left corner")},l.createElement(S.A.Item,{hidden:t,name:"mobileRadiusTopLeft",className:"form-item-margin-xs"},l.createElement(Ft.A,{min:0,prefix:l.createElement(Nt.A,null),style:{minHeight:10},addonAfter:"px"}))),l.createElement(i.A,{placement:"bottom",title:n("Bottom left corner")},l.createElement(S.A.Item,{hidden:t,name:"mobileRadiusBottomLeft"},l.createElement(Ft.A,{min:0,prefix:l.createElement(Lt.A,null),style:{minHeight:10},addonAfter:"px"})))),l.createElement(h.A,{span:12},l.createElement(i.A,{placement:"bottom",title:n("Top right corner")},l.createElement(S.A.Item,{hidden:t,name:"mobileRadiusTopRight",className:"form-item-margin-xs"},l.createElement(Ft.A,{min:0,prefix:l.createElement(Pt.A,null),style:{minHeight:10},addonAfter:"px"}))),l.createElement(i.A,{placement:"bottom",title:n("Bottom right corner")},l.createElement(S.A.Item,{hidden:t,name:"mobileRadiusBottomRight"},l.createElement(Ft.A,{min:0,prefix:l.createElement(It.A,null),style:{minHeight:10},addonAfter:"px"})))))))},uo=({form:e,elementSettings:t})=>{const{__:a}=(0,y.s9)(),o=(0,l.useRef)(),n=(0,f.d4)(W.uJ),[r,m]=(0,l.useState)(!t.mobileBoxShadow||0===t.mobileBoxShadow.hOffset&&0===t.mobileBoxShadow.vOffset&&0===t.mobileBoxShadow.blurRadius&&0===t.mobileBoxShadow.spreadRadius&&0===t.mobileBoxShadow.spreadRadius),c=(0,Me.XW)(),u=e=>{m(!1)};return l.createElement(l.Fragment,null,l.createElement("div",{style:{float:"right",marginTop:-9,marginRight:50}},l.createElement(s.A,{size:8,align:"end"},l.createElement(B.A,{ref:o,size:"small",checked:r,onChange:a=>{m((e=>!e)),e.setFieldsValue({mobileBoxShadowHOffset:r?"":0,mobileBoxShadowVOffset:r?"":0,mobileBoxShadowBlurRadius:r?"":0,mobileBoxShadowSpreadRadius:r?"":0,mobileBoxShadowColor:"",mobileBoxShadowInset:!1}),c({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:{mobileBoxShadow:{classNamePrefix:"em-mob-box_shadow-",hOffset:r?null:0,vOffset:r?null:0,blurRadius:r?null:0,spreadRadius:r?null:0,color:null,inset:!1}}})},id:"without-shadow"}),l.createElement("div",{className:"ant-form-item-switch-label-small",style:{position:"relative",top:2}},l.createElement("label",{htmlFor:"without-shadow"},a("Without shadow"))))),l.createElement("p",{style:{paddingBottom:"8px",margin:"-30px 0 0"}},"\xa0"),l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(i.A,{placement:"bottom",title:a("Horizontal offset")},l.createElement(S.A.Item,{name:"mobileBoxShadowHOffset",className:"form-item-margin-xs"},l.createElement(Ft.A,{min:0,placeholder:a("Horizontal offset"),prefix:l.createElement(Jl.A,null),addonAfter:"px",onChange:u})))),l.createElement(h.A,{span:12},l.createElement(i.A,{placement:"bottom",title:a("Vertical offset")},l.createElement(S.A.Item,{name:"mobileBoxShadowVOffset",className:"form-item-margin-xs"},l.createElement(Ft.A,{min:0,placeholder:a("Vertical offset"),prefix:l.createElement(Jl.A,{style:{transform:"rotate(90deg)"}}),addonAfter:"px",onChange:u})))),l.createElement(h.A,{span:12},l.createElement(i.A,{placement:"bottom",title:a("Blur radius")},l.createElement(S.A.Item,{name:"mobileBoxShadowBlurRadius",className:"form-item-margin-xs"},l.createElement(Ft.A,{min:0,placeholder:a("Blur radius"),prefix:l.createElement(z.A,{icon:"Blur",style:{fontSize:16,marginLeft:-2}}),addonAfter:"px",onChange:u})))),l.createElement(h.A,{span:12},l.createElement(i.A,{placement:"bottom",title:a("Spread radius")},l.createElement(S.A.Item,{name:"mobileBoxShadowSpreadRadius",className:"form-item-margin-xs"},l.createElement(Ft.A,{placeholder:a("Spread radius"),prefix:l.createElement(z.A,{icon:"ZoomOutMap"}),addonAfter:"px",onChange:u})))),l.createElement(h.A,{span:12},l.createElement(s.A,{size:10,align:"start"},l.createElement(S.A.Item,{name:"mobileBoxShadowColor"},l.createElement(ye,{usedColors:n.usedColors})))),l.createElement(h.A,{span:12},l.createElement(i.A,{title:a("Shadow inside or outside of the element"),key:"inset",placement:"bottom"},l.createElement(S.A.Item,{name:"mobileBoxShadowInset",valuePropName:"checked"},l.createElement(d.A,{style:{width:"100%"},options:[{label:a("Outside"),value:!1},{label:a("Inside"),value:!0}]}))))))},po=({form:e,elementSettings:t,imgParent:a,name:o="mobileAlign"})=>{var n;const{__:r}=(0,y.s9)(),[d,m]=(0,l.useState)(null===(n=t[o])||void 0===n?void 0:n.value),c=(0,Me.XW)(),u=a=>{const l=a.target.value,n={[o]:{classNamePrefix:"em-mob-text_align-",value:""}};l!==d?m(l):(m(""),e.setFieldsValue(n),c({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:n}))};return l.createElement(S.A.Item,{name:o},l.createElement(gt.Ay.Group,{disabled:a&&!t.parent},l.createElement(s.A,{size:8},l.createElement(i.A,{placement:"bottom",title:r("Align left")},l.createElement(gt.Ay.Button,{value:"left",onClick:u},l.createElement(z.A,{icon:"AlignHorizontalLeft"}))),l.createElement(i.A,{placement:"bottom",title:r("Center horizontally")},l.createElement(gt.Ay.Button,{value:"center",onClick:u},l.createElement(z.A,{icon:"AlignHorizontalCenter"}))),l.createElement(i.A,{placement:"bottom",title:r("Align right ")},l.createElement(gt.Ay.Button,{value:"right",onClick:u},l.createElement(z.A,{icon:"AlignHorizontalRight"}))),l.createElement(i.A,{placement:"bottom",title:r("Text align justify")},l.createElement(gt.Ay.Button,{value:"justify",onClick:u},l.createElement(z.A,{icon:"Justify"}))))))};po.defaultProps={imgParent:!1};const go=po,bo=({form:e,elementSettings:t,tooltipTitle:a})=>{var o;const{__:n}=(0,y.s9)(),[r,d]=(0,l.useState)(null===(o=t.mobileVerticalAlign)||void 0===o?void 0:o.value),m=(0,Me.XW)(),c=a=>{const l=a.target.value,o={mobileVerticalAlign:{classNamePrefix:"em-mob-vertical_align",value:""}};l!==r?d(l):(d(""),e.setFieldsValue(o),m({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:o}))};return l.createElement(S.A.Item,{name:"mobileVerticalAlign"},l.createElement(gt.Ay.Group,null,l.createElement(s.A,{size:8},l.createElement(i.A,{placement:"bottom",title:n("Align top")},l.createElement(gt.Ay.Button,{value:"top",onClick:c},l.createElement(z.A,{icon:"AlignVerticalTop"}))),l.createElement(i.A,{placement:"bottom",title:n("Center vertically")},l.createElement(gt.Ay.Button,{value:"middle",onClick:c},l.createElement(z.A,{icon:"AlignVerticalCenter"}))),l.createElement(i.A,{placement:"bottom",title:n("Align bottom")},l.createElement(gt.Ay.Button,{value:"bottom",onClick:c},l.createElement(z.A,{icon:"AlignVerticalBottom"}))))))};var ho=a(7333),Eo=a(83799);const fo=({form:e,elementSettings:t})=>{const{__:a}=(0,y.s9)();return l.createElement(S.A.Item,{name:"show"},l.createElement(gt.Ay.Group,null,l.createElement(s.A,{size:8},l.createElement(gt.Ay.Button,{value:"all"},a("Both")),l.createElement(i.A,{placement:"top",title:a("Desktop")},l.createElement(gt.Ay.Button,{value:"desktop"},l.createElement(ho.A,null))),l.createElement(i.A,{placement:"top",title:a("Mobile")},l.createElement(gt.Ay.Button,{value:"mobile"},l.createElement(Eo.A,null))))))};fo.defaultProps={};const vo=fo;var yo=a(57140);const{useToken:Ao}=n.A,_o=({form:e,elementSettings:t,handleChangeValues:a})=>{const{__:o}=(0,y.s9)(),n=(0,l.useRef)(),{token:r}=Ao(),[d,m]=(0,l.useState)(!1),[c,u]=(0,l.useState)(!1),[p,E]=(0,l.useState)(!1),[f,v]=(0,l.useState)(!1),[A,_]=(0,l.useState)(!1);(0,l.useEffect)((()=>{let e=new URL("https://emailmaker.ru/?"+t.countdown);m(e.searchParams.get("font1").endsWith("-b")||e.searchParams.get("font1").endsWith("-bi")),u(e.searchParams.get("font1").endsWith("-i")||e.searchParams.get("font1").endsWith("-bi")),E(e.searchParams.get("font2").endsWith("-b")||e.searchParams.get("font2").endsWith("-bi")),v(e.searchParams.get("font2").endsWith("-i")||e.searchParams.get("font2").endsWith("-bi")),_("true"===e.searchParams.get("tp"))}),[t]);const w=[{value:"-12",label:o("-12:00 Apia")},{value:"-11",label:o("-11:00 Pago Pago, Midway Atoll")},{value:"-10",label:o("-10:00 Honolulu, Anchorage")},{value:"-9",label:o("-9:00 Anchorage, Yukon")},{value:"-8",label:o("-8:00 Los Angeles, Vancouver")},{value:"-7",label:o("-7:00 Denver, Phoenix")},{value:"-6",label:o("-6:00 Mexico City, Guadalajara")},{value:"-5",label:o("-5:00 New York, Toronto, Havana")},{value:"-4",label:o("-4:00 Caracas, Santo Domingo")},{value:"-3",label:o("-3:00 Buenos Aires, Santiago, Montevideo")},{value:"-2",label:o("-2:00 South Georgia, Saint Helena")},{value:"-1",label:o("-1:00 Azores, Cape Verde")},{value:"0",label:o("+0:00 London, Lisbon, Dublin")},{value:"1",label:o("+1:00 Paris, Berlin, Rome")},{value:"2",label:o("+2:00 Athens, Kiev, Istanbul")},{value:"3",label:o("+3:00 Istanbul, Doha, Baghdad")},{value:"4",label:o("+4:00 Baku, Dubai, Tbilisi")},{value:"5",label:o("+5:00 Karachi, Tashkent, Islamabad")},{value:"6",label:o("+6:00 Almaty, Dhaka, Bishkek")},{value:"7",label:o("+7:00 Bangkok, Ho Chi Minh City, Jakarta")},{value:"8",label:o("+8:00 Beijing, Hong Kong, Singapore")},{value:"9",label:o("+9:00 Tokyo, Seoul, Jayapura")},{value:"10",label:o("+10:00 Sydney, Melbourne, Port Moresby")},{value:"11",label:o("+11:00 Honiara, Nuku'alofa, Apia")}],x=[{value:"20",label:o("20 s")},{value:"40",label:o("40 s")},{value:"60",label:o("60 s")}],T=[{value:"arial",label:"Arial"},{value:"courier-new",label:"Courier New"},{value:"georgia",label:"Georgia"},{value:"helvetica",label:"Helvetica"},{value:"tahoma",label:"Tahoma"},{value:"times-new-roman",label:"Times New Roman"},{value:"trebuchet-ms",label:"Trebuchet MS"},{value:"verdana",label:"Verdana"},{value:"open-sans",label:"Open Sans"},{value:"roboto",label:"Roboto"}],R=e=>{var t;e.target.closest(".ant-picker-dropdown")||(null===(t=n.current)||void 0===t||t.blur())};(0,l.useEffect)((()=>(window.addEventListener("scroll",R,!0),()=>{window.removeEventListener("scroll",R,!0)})));return l.createElement(l.Fragment,null,l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(S.A.Item,{label:o("End time"),name:"countdownTime"},l.createElement(yo.A,{ref:n,format:"DD.MM.YYYY HH:mm",disabledDate:e=>e&&e<Kl()().endOf("day")-864e5,showTime:!0,getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),allowClear:!1,allowEmpty:!1}))),l.createElement(h.A,{span:12},l.createElement(S.A.Item,{label:o("Time zone"),name:"countdownTimeZone",style:{width:"100%"}},l.createElement(k.A,{placeholder:o("Select the time zone"),getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")},w.map((e=>l.createElement(k.A.Option,{key:e.value,value:e.value},e.label))))))),l.createElement(b.A,{gutter:20},l.createElement(h.A,{span:12},l.createElement(S.A.Item,{label:o("Background color"),name:"countdownBackgroundColor",className:"countdown-color"},l.createElement(ye,{placeholder:o("Background color"),isDisabled:A,usedColors:t.usedColors}))),l.createElement(h.A,{span:12},l.createElement(s.A,{size:10,align:"baseline",style:{paddingTop:29}},l.createElement(S.A.Item,{name:"countdownTransparency",valuePropName:"checked"},l.createElement(B.A,{size:"small",id:"countdownTransparency",onChange:e=>{_(e)}})),l.createElement("span",{style:{position:"relative",top:2}},l.createElement("label",{htmlFor:"countdownTransparency"},o("Transparency")))))),l.createElement("div",{className:"form-group-title",style:{paddingTop:0,paddingBottom:8}},o("Countdown font settings")),l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(S.A.Item,{name:"countdownNumbersFont",style:{marginBottom:r.formItemMarginBottomXS}},l.createElement(k.A,{getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel"),options:T}))),l.createElement(h.A,{span:12},l.createElement(S.A.Item,{name:"countdownNumbersColor",className:"countdown-color",style:{marginBottom:r.formItemMarginBottomXS}},l.createElement(ye,{usedColors:t.usedColors}))),l.createElement(h.A,{span:12},l.createElement(S.A.Item,{name:"countdownNumbersFontSize"},l.createElement(Ee.A,{min:12,placeholder:o("Font size"),prefix:l.createElement(at.A,null),addonAfter:"px"}))),l.createElement(h.A,{span:3},l.createElement(i.A,{placement:"bottom",title:o("Strong")},l.createElement(S.A.Item,{name:"countdownNumbersStrong"},l.createElement(g.Ay,{className:C()("selected-td-form__button selected-td-form__button_style",{"selected-td-form__button--active":d}),onClick:()=>{const t=!d;e.setFieldValue("countdownNumbersStrong",t),a({countdownNumbersStrong:t}),m(t)}},l.createElement(ot.A,{className:"selected-td-form__icon-radius"}))))),l.createElement(h.A,{span:3},l.createElement(i.A,{placement:"bottom",title:o("Italic")},l.createElement(S.A.Item,{name:"countdownNumbersItalic"},l.createElement(g.Ay,{className:C()("selected-td-form__button selected-td-form__button_style",{"selected-td-form__button--active":c}),onClick:()=>{const t=!c;e.setFieldValue("countdownNumbersItalic",t),a({countdownNumbersItalic:t}),u(t)}},l.createElement(nt.A,{className:"selected-td-form__icon-radius"})))))),l.createElement("div",{className:"form-group-title",style:{paddingTop:0,paddingBottom:8}},o("Time units font settings")),l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(S.A.Item,{name:"countdownLabelsFont",style:{marginBottom:r.formItemMarginBottomXS}},l.createElement(k.A,{getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel"),options:T}))),l.createElement(h.A,{span:12},l.createElement(S.A.Item,{name:"countdownLabelsColor",className:"countdown-color",style:{marginBottom:r.formItemMarginBottomXS}},l.createElement(ye,{usedColors:t.usedColors}))),l.createElement(h.A,{span:12},l.createElement(S.A.Item,{name:"countdownLabelsFontSize"},l.createElement(Ee.A,{min:8,placeholder:o("Font size"),addonAfter:"px",prefix:l.createElement(at.A,null)}))),l.createElement(h.A,{span:3},l.createElement(i.A,{placement:"bottom",title:o("Strong")},l.createElement(S.A.Item,{name:"countdownLabelsStrong"},l.createElement(g.Ay,{className:C()("selected-td-form__button selected-td-form__button_style",{"selected-td-form__button--active":p}),onClick:()=>{const t=!p;e.setFieldValue("countdownLabelsStrong",t),a({countdownLabelsStrong:t}),E(t)}},l.createElement(ot.A,{className:"selected-td-form__icon-radius"}))))),l.createElement(h.A,{span:3},l.createElement(i.A,{placement:"bottom",title:o("Italic")},l.createElement(S.A.Item,{name:"countdownLabelsItalic"},l.createElement(g.Ay,{className:C()("selected-td-form__button selected-td-form__button_style",{"selected-td-form__button--active":f}),onClick:()=>{const t=!f;e.setFieldValue("countdownLabelsItalic",t),a({countdownLabelsItalic:t}),v(t)}},l.createElement(nt.A,{className:"selected-td-form__icon-radius"})))))),l.createElement(b.A,{gutter:10,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(S.A.Item,{label:o("Language"),name:"countdownLanguage",style:{width:"100%"}},l.createElement(k.A,{getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel"),options:[{value:"ru_RU",label:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439"},{value:"en_US",label:"English"},{value:"uk_UA",label:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430"},{value:"pt_BR",label:"Portugu\xeas"},{value:"fr-CA",label:"Fran\xe7ais"},{value:"de_DE",label:"Deutsch"},{value:"pl_PL",label:"Polski"},{value:"es_ES",label:"Espa\xf1ol"},{value:"tr_TR",label:"T\xfcrk\xe7e"},{value:"lt_LT",label:"Lietuvi\u0173 kalba"},{value:"lv_LV",label:"Latvie\u0161u valoda"},{value:"et_EE",label:"Eesti keel"},{value:"hu_HU",label:"Magyar"},{value:"el_GR",label:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac"},{value:"it_IT",label:"Italiano"}]}))),l.createElement(h.A,{span:12},l.createElement(S.A.Item,{label:o("Duration"),name:"countdownDuration",style:{width:"100%"}},l.createElement(k.A,{getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel"),options:x})))))};var Co=a(9593),So=a(30245),wo=a(29312),ko=a(53056);const{useToken:xo}=n.A,Bo=({form:e,elementSettings:t})=>{const{__:a}=(0,y.s9)(),{token:o}=xo();return l.createElement(l.Fragment,null,l.createElement(i.A,{trigger:["hover"],title:a("URL of the video clip."),placement:"right"},l.createElement(S.A.Item,{name:"videoSource",className:"selected-image-form__alt"},l.createElement(w.A,{allowClear:!0,placeholder:a("Video URL"),prefix:l.createElement(Co.A,null)}))),l.createElement(S.A.Item,{label:a("Play button"),name:"videoPlayButton",style:{width:"100%",marginBottom:o.formItemMarginBottomMD+4}},l.createElement(k.A,{getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")},l.createElement(k.A.Option,{value:"youtube_red"},l.createElement(So.A,{style:{color:"#FF0000"}})," ",a("Youtube Red")),l.createElement(k.A.Option,{value:"youtube_black"},l.createElement(So.A,null)," ",a("Youtube Black")),l.createElement(k.A.Option,{value:"youtube_white"},l.createElement(So.A,{style:{color:"#aaa"}})," ",a("Youtube White")),l.createElement(k.A.Option,{value:"vimeo"},l.createElement(z.A,{icon:"Vimeo"})," ",a("Vimeo")),l.createElement(k.A.Option,{value:"white_circle"},l.createElement(wo.A,{style:{color:"#aaa"}})," ",a("White circle")),l.createElement(k.A.Option,{value:"black_circle"},l.createElement(wo.A,null)," ",a("Black circle")),l.createElement(k.A.Option,{value:"white_circle_outlined"},l.createElement(ko.A,{style:{color:"#aaa"}})," ",a("White circle outlined")),l.createElement(k.A.Option,{value:"black_circle_outlined"},l.createElement(ko.A,null)," ",a("Black circle outlined")),l.createElement(k.A.Option,{value:"none"}," ",a("Without button")))))},To=()=>{const{__:e}=(0,y.s9)();return l.createElement(S.A.Item,{name:"ampShow"},l.createElement(gt.Ay.Group,null,l.createElement(s.A,{size:8},l.createElement(gt.Ay.Button,{value:"all"},e("Both")),l.createElement(i.A,{placement:"top",title:e("AMP")},l.createElement(gt.Ay.Button,{value:"amp"},"AMP")),l.createElement(i.A,{placement:"top",title:e("HTML")},l.createElement(gt.Ay.Button,{value:"html"},"HTML")))))};To.defaultProps={};const Ro=To;var No=a(62093),Lo=a(40835),Po=a(16390);const{useToken:Io}=n.A,Mo=({elementSettings:e})=>{const{__:t}=(0,y.s9)(),{token:a}=Io(),[o]=S.A.useForm();let n=(0,f.wA)();const r=(0,Y.rD)(),{projectId:d}=(0,v.g)(),c=(0,A.hN)(),p=(0,Me.XW)(),E=(0,Me.K9)(),_=(0,f.d4)(Ie.Ct),k=(0,f.d4)(Ie.CS),x=(0,f.d4)(we.C1),B=(0,f.d4)(Ie.Fv),T=(0,f.d4)(Ie.yy),[R]=(0,Lo.dS)(),[N,L]=(0,Lo.tb)(),P=(0,l.useRef)(null),I=(0,l.useRef)(null),M=(0,l.useRef)(null),O=(0,l.useRef)(null),H=(0,l.useRef)(null),j=(0,l.useRef)(null),W=(0,l.useRef)(null),G=(0,l.useRef)(null),U=(0,l.useRef)(null),[q,Z]=(0,l.useState)({}),[X,K]=(0,l.useState)({}),[$,Q]=(0,l.useState)({}),[J,ee]=(0,l.useState)({}),[te,ae]=(0,l.useState)(!0),[le,oe]=(0,l.useState)(!0),[ne,re]=(0,l.useState)(""),[ie,se]=(0,l.useState)(""),[de,me]=(0,l.useState)(""),[ce,ue]=(0,l.useState)(!1),[pe,ge]=(0,l.useState)(!1),[be,he]=(0,l.useState)(!1),[Ee,ve]=(0,l.useState)(!1),[ye,Ae]=(0,l.useState)(!1),[Ce,Se]=(0,l.useState)(!1),[ke,xe]=(0,l.useState)(!1),[Be,Te]=(0,l.useState)(!1),[Re,Ne]=(0,l.useState)("https://"),[Le,Oe]=(0,l.useState)(),[Ve,Fe]=(0,l.useState)(!1),[De,He]=(0,l.useState)(null),[je,ze]=(0,l.useState)({start:0,end:0}),[We,Ge]=(0,l.useState)(!1),[Ue,qe]=(0,l.useState)(!1),Ze=B&&"bottom"!==T;(0,l.useEffect)((()=>{Ve&&U.current&&U.current.focus()}),[Ve]);const Xe=(0,f.d4)(Po.GH);(0,l.useEffect)((()=>{var e;null!==Xe&&void 0!==Xe&&null!==(e=Xe.items)&&void 0!==e&&e.length&&Oe((0,Y.cM)(Xe.items,t,((e,t)=>{Fe(!1),E(D.Ru.SANDBOX_ADD_MERGETAG,e),t.stopPropagation(),t.preventDefault()})))}),[Xe,Oe,t,Fe,E]);(0,l.useEffect)((()=>{const e=({target:e})=>{e.closest('[id="merge_tags_wrapper"]')||He(e)},t=({target:e})=>{e.closest(".merge-tags")||e.closest("#merge_tags_button")||Fe(!1)};return window.addEventListener("focusin",e),window.addEventListener("click",t),()=>{window.removeEventListener("focusin",e),window.addEventListener("click",t)}}),[]);const Ke=({target:e})=>{if(e&&!We){const{selectionStart:t,selectionEnd:a}=e;ze({start:t,end:a})}Ge(!1)};(0,l.useEffect)((()=>{if(e){var t,a,l,n,r,i,s,d,m,c,u,p,g,b,h,E,f,v,y,A,_,C,S,w,k,x,B,T,R,N,L,P,I,M,O,V,F;const j=e.border,z=e.mobileBorder,W=e.boxShadow,G=e.mobileBoxShadow;Z(j),K(z),Q(W),ee(G);const U=Object.keys(j).find((e=>{var t,a,l;return(null===(t=j[e])||void 0===t?void 0:t.width)||(null===(a=j[e])||void 0===a?void 0:a.style)||(null===(l=j[e])||void 0===l?void 0:l.color)})),q=Object.keys(z).find((e=>{var t,a,l;return(null===(t=z[e])||void 0===t?void 0:t.width)||(null===(a=z[e])||void 0===a?void 0:a.style)||(null===(l=z[e])||void 0===l?void 0:l.color)}));if(e.link&&Ne(pa(e.link,"https://")),o.setFieldsValue({...e,link:e.link?e.link:"https://",width:null===(t=e.width)||void 0===t?void 0:t.value,widthDim:null===(a=e.width)||void 0===a?void 0:a.dim,height:null===(l=e.height)||void 0===l?void 0:l.value,heightDim:null===(n=e.height)||void 0===n?void 0:n.dim,borderPosition:U||"all",borderWidth:null!==(null===(r=j[U])||void 0===r?void 0:r.width)?null===(i=j[U])||void 0===i?void 0:i.width:"",borderColor:(null===(s=j[U])||void 0===s?void 0:s.color)||"",borderStyle:(null===(d=j[U])||void 0===d?void 0:d.style)||"solid",borderRadiusAll:ga(e.borderRadius.all),borderRadiusTopLeft:ga(e.borderRadius.topLeft),borderRadiusBottomLeft:ga(e.borderRadius.bottomLeft),borderRadiusTopRight:ga(e.borderRadius.topRight),borderRadiusBottomRight:ga(e.borderRadius.bottomRight),boxShadowInset:ga(null===(m=e.boxShadow)||void 0===m?void 0:m.inset)||!1,boxShadowHOffset:ga(null===(c=e.boxShadow)||void 0===c?void 0:c.hOffset),boxShadowVOffset:ga(null===(u=e.boxShadow)||void 0===u?void 0:u.vOffset),boxShadowBlurRadius:ga(null===(p=e.boxShadow)||void 0===p?void 0:p.blurRadius),boxShadowSpreadRadius:ga(null===(g=e.boxShadow)||void 0===g?void 0:g.spreadRadius),boxShadowColor:ga(null===(b=e.boxShadow)||void 0===b?void 0:b.color),mobileWidth:ba(null===(h=e.mobileWidth)||void 0===h?void 0:h.value),mobileWidthDim:null===(E=e.mobileWidth)||void 0===E?void 0:E.dim,mobileHeight:ba(null===(f=e.mobileHeight)||void 0===f?void 0:f.value),mobileHeightDim:null===(v=e.mobileHeight)||void 0===v?void 0:v.dim,mobileBorderPosition:q||"all",mobileBorderWidth:null!==(null===(y=z[q])||void 0===y?void 0:y.width)?null===(A=z[q])||void 0===A?void 0:A.width:"",mobileBorderColor:(null===(_=z[q])||void 0===_?void 0:_.color)||"",mobileBorderStyle:(null===(C=z[q])||void 0===C?void 0:C.style)||"",mobileBorderRadiusAll:ga(e.mobileBorderRadius.all),mobileRadiusTopLeft:ga(null!==e.mobileBorderRadius.topLeft?e.mobileBorderRadius.topLeft:e.mobileBorderRadius.all),mobileRadiusBottomLeft:ga(null!==e.mobileBorderRadius.bottomLeft?e.mobileBorderRadius.bottomLeft:e.mobileBorderRadius.all),mobileRadiusTopRight:ga(null!==e.mobileBorderRadius.topRight?e.mobileBorderRadius.topRight:e.mobileBorderRadius.all),mobileRadiusBottomRight:ga(null!==e.mobileBorderRadius.bottomRight?e.mobileBorderRadius.bottomRight:e.mobileBorderRadius.all),mobileBoxShadowInset:ga(null===(S=e.mobileBoxShadow)||void 0===S?void 0:S.inset)||!1,mobileBoxShadowHOffset:ga(null===(w=e.mobileBoxShadow)||void 0===w?void 0:w.hOffset),mobileBoxShadowVOffset:ga(null===(k=e.mobileBoxShadow)||void 0===k?void 0:k.vOffset),mobileBoxShadowBlurRadius:ga(null===(x=e.mobileBoxShadow)||void 0===x?void 0:x.blurRadius),mobileBoxShadowSpreadRadius:ga(null===(B=e.mobileBoxShadow)||void 0===B?void 0:B.spreadRadius),mobileBoxShadowColor:ga(null===(T=e.mobileBoxShadow)||void 0===T?void 0:T.color),mobileAlign:ga(null===(R=e.mobileAlign)||void 0===R?void 0:R.value),mobileVerticalAlign:ga(null===(N=e.mobileVerticalAlign)||void 0===N?void 0:N.value),show:e.show?e.show:"all",altSrc:e.src}),e.countdown){let t=new URL("https://emailmaker.ru/?"+e.countdown),a=t.searchParams.get("font1"),l=!1,n=!1;a.endsWith("-b")?(a=a.substring(0,a.length-2),l=!0):a.endsWith("-i")?(a=a.substring(0,a.length-2),n=!0):a.endsWith("-bi")&&(a=a.substring(0,a.length-3),l=!0,n=!0);let r=t.searchParams.get("font2"),i=!1,s=!1;r.endsWith("-b")?(r=r.substring(0,r.length-2),i=!0):r.endsWith("-i")?(r=r.substring(0,r.length-2),s=!0):r.endsWith("-bi")&&(r=r.substring(0,r.length-3),i=!0,s=!0),o.setFieldsValue({countdownTime:Kl()(new Date(Date.parse(t.searchParams.get("time"))+36e5*t.searchParams.get("timezone")+(new Date).getTimezoneOffset()/60*36e5).toISOString()),countdownDuration:t.searchParams.get("frames")||20,countdownTimeZone:t.searchParams.get("timezone"),countdownLanguage:t.searchParams.get("locale").replace("-","_"),countdownBackgroundColor:"#"+t.searchParams.get("bg"),countdownTransparency:"true"===t.searchParams.get("tp")?"checked":"",countdownNumbersFont:a,countdownNumbersFontSize:t.searchParams.get("size1")/2,countdownNumbersFontSizeDim:"px",countdownNumbersColor:"#"+t.searchParams.get("color1"),countdownLabelsFont:r,countdownLabelsFontSize:t.searchParams.get("size2")/2,countdownLabelsFontSizeDim:"px",countdownLabelsColor:"#"+t.searchParams.get("color2"),countdownNumbersStrong:l,countdownNumbersItalic:n,countdownLabelsStrong:i,countdownLabelsItalic:s})}var D,H;if(e.video)o.setFieldsValue({videoPlayButton:null!==(D=e.video.playButton)&&void 0!==D?D:"youtube_red",videoSource:null!==(H=e.video.source)&&void 0!==H?H:""});!ga(e.borderRadius.all)&&(ga(e.borderRadius.topLeft)||ga(e.borderRadius.bottomLeft)||ga(e.borderRadius.topRight)||ga(e.borderRadius.bottomRight))?ae(!1):ae(!0),ga(e.mobileBorderRadius.topLeft)||ga(e.mobileBorderRadius.bottomLeft)||ga(e.mobileBorderRadius.topRight)||ga(e.mobileBorderRadius.bottomRight)?oe(!1):oe(!0),ue(!(null===(L=j[U])||void 0===L||!L.width)||!(null===(P=j[U])||void 0===P||!P.style)||!(null===(I=j[U])||void 0===I||!I.color)),ge(!(null===(M=z[q])||void 0===M||!M.width)||!(null===(O=z[q])||void 0===O||!O.style)||!(null===(V=z[q])||void 0===V||!V.color)),he(!!e.borderRadius.all||!!e.borderRadius.topLeft||!!e.borderRadius.bottomLeft||!!e.borderRadius.topRight||!!e.borderRadius.bottomRight),ve(!!e.mobileBorderRadius.all||!!e.mobileBorderRadius.topLeft||!!e.mobileBorderRadius.bottomLeft||!!e.mobileBorderRadius.topRight||!!e.mobileBorderRadius.bottomRight),Ae(!!e.boxShadow),Se(!!e.mobileBoxShadow.blurRadius||!!e.mobileBoxShadow.color||!!e.mobileBoxShadow.hOffset||!!e.mobileBoxShadow.inset||!!e.mobileBoxShadow.spreadRadius||!!e.mobileBoxShadow.vOffset),xe(!!e.mobileWidth.value||!!e.mobileHeight.value),re(e.link),se(e.alt),me(e.title),qe(null===(F=e.imgReplacer)||void 0===F?void 0:F.length)}}),[o,e]);const Ye=async(e,t,a)=>{const l={};l.user_id=x.id,l.folder=e,t&&("image/gif"!==t.type&&(t=await(0,Zl.A)(t,{maxSizeMB:r.compressMaxSize||.45,maxWidthOrHeight:r.compressMaxWidthOrHeight||2e3})),l.file=t),a&&(l.page_url=a);const o=await R(l);var n,i,s;if(o.error)c.fromError("IMAGE_UPLOAD_ERROR",t,o.error,!0);else if(400!==(null===(n=o.data.data)||void 0===n?void 0:n.status))return null===(i=o.data)||void 0===i||null===(s=i[0])||void 0===s?void 0:s.file_url},$e=((e,t)=>{let a;return function(...l){clearTimeout(a),a=setTimeout((()=>{clearTimeout(a),e(...l)}),t)}})((()=>{const t=o.getFieldsValue(!0);let a=new URL("https://cdt3.emcdn.ru/timer/?"+e.countdown),l=t.countdownNumbersFont;t.countdownNumbersStrong&&t.countdownNumbersItalic?l+="-bi":t.countdownNumbersStrong?l+="-b":t.countdownNumbersItalic&&(l+="-i");let n=t.countdownLabelsFont;t.countdownLabelsStrong&&t.countdownLabelsItalic?n+="-bi":t.countdownLabelsStrong?n+="-b":t.countdownLabelsItalic&&(n+="-i"),a.searchParams.set("time",new Date(t.countdownTime.$d-36e5*t.countdownTimeZone-(new Date).getTimezoneOffset()/60*36e5).toISOString()),a.searchParams.set("bg",t.countdownBackgroundColor.substring(1)||"#FFFFFF"),a.searchParams.set("tp",!!t.countdownTransparency),a.searchParams.set("font1",l),a.searchParams.set("size1",2*t.countdownNumbersFontSize||12),a.searchParams.set("color1",t.countdownNumbersColor.substring(1)||"#000000"),a.searchParams.set("font2",n),a.searchParams.set("size2",2*t.countdownLabelsFontSize||8),a.searchParams.set("color2",t.countdownLabelsColor.substring(1)||"#959595"),a.searchParams.set("spacing",Math.round(.4*t.countdownNumbersFontSize)||5),a.searchParams.set("locale",t.countdownLanguage.replace("_","-")),a.searchParams.set("timezone",t.countdownTimeZone),a.searchParams.set("frames",t.countdownDuration),N({link:JSON.stringify({target:a.href})}),Te(!0)}),500),Qe=(t,...a)=>{const l=o.getFieldsValue(!0),i=Object.keys(t)[0];let s;switch(i){case"link":let e=t[i];"https://http"===e.substring(0,12)&&(e=e.substring(8,e.length),o.setFieldValue("link",e)),s={link:e};break;case"boxShadowInset":case"boxShadowHOffset":case"boxShadowVOffset":case"boxShadowBlurRadius":case"boxShadowSpreadRadius":case"boxShadowColor":s={boxShadow:{hOffset:l.boxShadowHOffset,vOffset:l.boxShadowVOffset,blurRadius:l.boxShadowBlurRadius,spreadRadius:l.boxShadowSpreadRadius,color:l.boxShadowColor,inset:l.boxShadowInset}};break;case"borderStyle":s={border:{[l.borderPosition]:{...q[l.borderPosition],style:t[i]}}},"all"===l.borderPosition?Z((e=>({...D.iV,[l.borderPosition]:{...e[l.borderPosition],style:t[i]}}))):Z((e=>({...e,[l.borderPosition]:{...e[l.borderPosition],style:t[i]}})));break;case"borderColor":s={border:{[l.borderPosition]:{...q[l.borderPosition],color:t[i]}}},"all"===l.borderPosition?Z((e=>({...D.iV,[l.borderPosition]:{...e[l.borderPosition],color:t[i]}}))):Z((e=>({...e,[l.borderPosition]:{...e[l.borderPosition],color:t[i]}})));break;case"borderWidth":s={border:{[l.borderPosition]:{...q[l.borderPosition],width:t[i]}}},"all"===l.borderPosition?Z((e=>({...D.iV,[l.borderPosition]:{...e[l.borderPosition],width:t[i]}}))):Z((e=>({...e,[l.borderPosition]:{...e[l.borderPosition],width:t[i]}})));break;case"borderPosition":o.setFieldsValue({borderWidth:q[t[i]].width||"",borderColor:q[t[i]].color||"",borderStyle:q[t[i]].style||""});break;case"width":s={[i]:{value:t[i],dim:l.widthDim}};break;case"widthDim":s={width:{value:l.width,dim:t[i]}};break;case"height":s={[i]:{value:t[i],dim:l.heightDim}};break;case"heightDim":s={height:{value:l.height,dim:t[i]}};break;case"borderRadiusAll":case"borderRadiusTopLeft":case"borderRadiusBottomLeft":case"borderRadiusTopRight":case"borderRadiusBottomRight":s={borderRadius:{[D.wF[i]]:+t[i]}};break;case"mobileWidth":s={[i]:{classNamePrefix:"em-mob-width-",value:t[i],dim:l.mobileWidthDim}};break;case"mobileWidthDim":s={mobileWidth:{classNamePrefix:"em-mob-width-",value:l.mobileWidth,dim:t[i]}};break;case"mobileHeight":s={[i]:{classNamePrefix:"em-mob-height-",value:t[i],dim:l.mobileHeightDim}};break;case"mobileHeightDim":s={mobileHeight:{classNamePrefix:"em-mob-height-",value:l.mobileHeight,dim:t[i]}};break;case"mobileBorderStyle":s={mobileBorder:{[l.mobileBorderPosition]:{...X[l.mobileBorderPosition],style:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}},"all"===l.mobileBorderPosition?K((e=>({...D.iV,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],style:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}))):K((e=>({...e,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],style:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}})));break;case"mobileBorderColor":s={mobileBorder:{[l.mobileBorderPosition]:{...X[l.mobileBorderPosition],color:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}},"all"===l.mobileBorderPosition?K((e=>({...D.iV,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],color:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}))):K((e=>({...e,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],color:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}})));break;case"mobileBorderWidth":s={mobileBorder:{[l.mobileBorderPosition]:{...X[l.mobileBorderPosition],width:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}},"all"===l.mobileBorderPosition?K((e=>({...D.iV,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],width:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}))):K((e=>({...e,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],width:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}})));break;case"mobileBorderPosition":o.setFieldsValue({mobileBorderWidth:X[t[i]].width||"",mobileBorderColor:X[t[i]].color||"",mobileBorderStyle:X[t[i]].style||""});break;case"mobileBorderRadiusAll":case"mobileRadiusTopLeft":case"mobileRadiusBottomLeft":case"mobileRadiusTopRight":case"mobileRadiusBottomRight":s={mobileBorderRadius:{[ua[i]]:t[i],classNamePrefix:"em-mob-border_radius_"+ua[i]+"-"}};break;case"mobileBoxShadowInset":case"mobileBoxShadowHOffset":case"mobileBoxShadowVOffset":case"mobileBoxShadowBlurRadius":case"mobileBoxShadowSpreadRadius":case"mobileBoxShadowColor":s={mobileBoxShadow:{hOffset:l.mobileBoxShadowHOffset,vOffset:l.mobileBoxShadowVOffset,blurRadius:l.mobileBoxShadowBlurRadius,spreadRadius:l.mobileBoxShadowSpreadRadius,color:l.mobileBoxShadowColor,inset:l.mobileBoxShadowInset,classNamePrefix:"em-mob-box_shadow-"}};break;case"mobileAlign":s={[i]:{classNamePrefix:"em-mob-text_align-",value:t[i]}};break;case"mobileVerticalAlign":s={[i]:{classNamePrefix:"em-mob-vertical_align-",value:t[i]}};break;case"countdownTime":case"countdownTimeZone":case"countdownBackgroundColor":case"countdownNumbersFont":case"countdownNumbersFontSize":case"countdownNumbersColor":case"countdownLabelsFont":case"countdownLabelsFontSize":case"countdownLabelsColor":case"countdownLanguage":case"countdownDuration":case"countdownTransparency":case"countdownNumbersStrong":case"countdownNumbersItalic":case"countdownLabelsStrong":case"countdownLabelsItalic":$e();break;case"videoSource":case"videoPlayButton":(async()=>{const e=o.getFieldsValue(!0);e.videoSource&&Ye("tmp",null,e.videoSource).then((t=>{var a=document.createElement("canvas"),l=a.getContext("2d"),o=new Image,i=new Image;let s=t,m="https://emcdn.ru/app/"+e.videoPlayButton+".png";o.crossOrigin="Anonymous",i.crossOrigin="Anonymous";let c=!1,u=!1;o.onload=function(){l.clearRect(0,0,a.width,a.height),l.drawImage(o,0,0,a.width,a.height),c=!0},o.src=s,i.onload=function(){var e=a.width/2-i.width/2,t=a.height/2-i.height/2;l.drawImage(i,e,t,i.width,i.height),u=!0},i.src=m;let p=setInterval((function(){if(c&&u){a.width=Math.max(o.width,i.width),a.height=Math.max(o.height,i.height),l.clearRect(0,0,a.width,a.height),l.drawImage(o,0,0,o.width,o.height);var e=a.width/2-i.width/2,t=a.height/2-i.height/2;l.drawImage(i,e,t,i.width,i.height),a.toBlob((async function(e){const t=await(0,Zl.A)(new File([e],"image.jpeg",{type:"image/jpeg"}),{maxSizeMB:r.compressMaxSize||.45,maxWidthOrHeight:r.compressMaxWidthOrHeight||2e3});Ye(d,t).then((e=>{n((0,_e.tm)(e))}))}),"image/jpg",1),clearInterval(p)}}),300)}))})(),l.link=l.videoSource,p({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:"video",settings:{video:{source:l.videoSource,playButton:l.videoPlayButton},link:l.link}});break;default:s=t}"borderPosition"!==i&&"mobileBorderPosition"!==i&&-1===i.indexOf("countdown")&&"videoSource"!==i&&"videoPlayButton"!==i&&p({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:s})};(0,l.useEffect)((()=>{L.isError&&((0,F.p6)(L,c),Te(!1))}),[L,c]),(0,l.useEffect)((()=>{if(L.isSuccess&&Be){var t;if(400===(null===(t=L.data.data)||void 0===t?void 0:t.status))c.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:L.data.code}}),description:l.createElement("div",{dangerouslySetInnerHTML:{__html:L.data.message}}),placement:"bottomRight"});else{let t=new URL(L.data.target),a={countdown:{link:L.data.link,params:t.search.substring(1)}};p({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:a})}Te(!1)}}),[L,Be,e,c,p]);(0,No.A)((t=>{const a=t.data.operation;a===D.Ru.APPLICATION_OPEN_IMAGE_AI_POPUP?(n((0,_e.tm)(e.src)),n((0,V.qf)(D.lx.UPLOAD_IMAGE_MODAL_AI))):a===D.Ru.APPLICATION_OPEN_IMAGE_UPLOAD_POPUP?(n((0,_e.tm)(e.src)),n((0,V.qf)(D.lx.UPLOAD_IMAGE_MODAL_UPLOAD))):a===D.Ru.APPLICATION_OPEN_IMAGE_EDIT_POPUP?(n((0,_e.tm)(e.src)),n((0,V.qf)(D.lx.UPLOAD_IMAGE_MODAL_EDIT))):a===D.Ru.APPLICATION_OPEN_IMAGE_GIF_POPUP?(n((0,_e.tm)(e.src)),n((0,V.qf)(D.lx.UPLOAD_IMAGE_MODAL_GIF))):a===D.Ru.APPLICATION_OPEN_IMAGE_STOCK_POPUP?(n((0,_e.tm)(e.src)),n((0,V.qf)(D.lx.UPLOAD_IMAGE_MODAL_STOCK))):a===D.Ru.APPLICATION_CLOSE_IMAGE_EDIT_POPUP&&(n((0,V.Os)()),n((0,V.Oo)()))}));const Je=()=>{ne?(re(""),o.setFieldValue("link",""),p({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{link:""}})):(re(P.current&&P.current.input.value?P.current.input.value:"..."),setTimeout((()=>{P.current.focus()})))},et=e=>{""===e.target.value?re("..."):(I.current.classList.add("selected-td-form__button--active"),re(e.target.value));const t=e.target.value;"https://"===t.substring(0,8)?Ne("https://"):"mailto:"===t.substring(0,7)?Ne("mailto:"):"tel:"===t.substring(0,4)?Ne("tel:"):"sms:"===t.substring(0,4)?Ne("sms:"):"ftp://"===t.substring(0,6)?Ne("ftp://"):"skype:"===t.substring(0,6)?Ne("skype:"):"viber:"===t.substring(0,6)?Ne("viber:"):Ne("")},tt=()=>{const t=o.getFieldsValue(!0);ie?(se(""),t.alt="",p({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{alt:""}})):(se(M.current&&M.current.input.value?M.current.input.value:"..."),setTimeout((()=>{M.current.focus()})))},at=e=>{""===e.target.value?se("..."):(O.current.classList.add("selected-td-form__button--active"),se(e.target.value))},lt=()=>{const t=o.getFieldsValue(!0);de?(me(""),t.title="",p({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{title:""}})):(me(H.current&&H.current.input.value?H.current.input.value:"..."),setTimeout((()=>{H.current.focus()})))},ot=e=>{""===e.target.value?me("..."):(j.current.classList.add("selected-td-form__button--active"),me(e.target.value))};return l.createElement(S.A,{form:o,layout:"vertical",name:"selected_image_form",initialValues:{src:"",width:"",height:"",widthDim:"",heightDim:"",alt:"",align:"left",border:"",boxShadow:"",show:"all",borderPosition:"",borderColor:"",borderWidth:"",borderStyle:"",mobileWidth:"",mobileWidthDim:"",mobileHeight:"",mobileHeightDim:"",mobileBorder:"",mobileBorderPosition:"",mobileBorderColor:"",mobileBorderWidth:"",mobileBorderStyle:"",mobileBoxShadow:"",mobileAlign:"left",mobileVerticalAlign:"",link:"https://",imgReplacer:"",countdownNumbersStrong:!1,countdownNumbersItalic:!1,countdownLabelsStrong:!1,countdownLabelsItalic:!1},onValuesChange:Qe,autoComplete:"off",className:"element-controls"},!Ze&&l.createElement(i.A,{title:t("To change the appearance of the element on the mobile device, edit the fields below. If the fields remain empty, the desktop styles will be applied to the mobile version."),placement:"bottom"},l.createElement(u.A,{className:"selected_form-mobile-props-title",message:t("Appearance on mobile devices"),type:"info"})),_===D.ND&&k.styles?l.createElement("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props"},l.createElement("div",{className:"selected_form-mobile-props-wrapper"},l.createElement(b.A,{gutter:30,style:{paddingBottom:4}},l.createElement(h.A,{span:12},l.createElement(go,{form:o,elementSettings:e,imgParent:!0})),l.createElement(h.A,{span:12,align:"right"},l.createElement(bo,{form:o,elementSettings:e}))),l.createElement(m.A,{className:"selected-td-form__divider",style:{marginBottom:"countdown"===e.type?15:24}}),"countdown"===e.type&&l.createElement(l.Fragment,null,l.createElement(_o,{form:o,elementSettings:e}),l.createElement(m.A,{className:"selected-td-form__divider",style:{marginBottom:24}})),"video"===e.type&&l.createElement(l.Fragment,null,l.createElement(Bo,{form:o,elementSettings:e}),l.createElement(m.A,{className:"selected-td-form__divider",style:{marginBottom:24}})),("img"===e.type||"video"===e.type)&&l.createElement(S.A.Item,{style:{marginBottom:0}},l.createElement(Pe,{form:o,label:t("Image path"),name:"src",placeholder:t("Image path"),elementSettings:e,tooltipTitle:""})),l.createElement(s.A,{size:8,style:{marginBottom:ie||ne||de?a.formItemMarginBottomXS:a.formItemMarginBottomMD+4}},l.createElement(i.A,{title:ne||t("Hyperlink URL"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper")},l.createElement(g.Ay,{className:C()("selected-td-form__button",{"selected-td-form__button--active":!!ne}),icon:l.createElement(Ht.A,{className:"selected-td-form__icon-radius"}),onClick:Je,ref:I})),l.createElement(i.A,{title:ie||t("Alternative text"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper")},l.createElement(g.Ay,{className:C()("selected-td-form__button",{"selected-td-form__button--active":!!ie}),onClick:tt,ref:O},l.createElement("span",{className:"addon-text-content"},"Alt"))),r.formFieldImageTitleEnabled&&l.createElement(i.A,{title:de||t("Tooltip text"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper")},l.createElement(g.Ay,{className:C()("selected-td-form__button",{"selected-td-form__button--active":!!de}),onClick:lt,ref:j},l.createElement("span",{className:"addon-text-content"},"Title")))),(!!ne||!!ie||!!de)&&l.createElement("div",{style:{marginBottom:a.formItemMarginBottomMD+4}},!!ne&&l.createElement(i.A,{trigger:["hover"],title:t("Hyperlink URL"),placement:"bottom"},l.createElement(S.A.Item,{name:"link",className:"selected-image-form__alt",style:{marginBottom:a.formItemMarginBottomXS}},l.createElement(w.A,{ref:P,allowClear:!0,placeholder:t("Hyperlink URL"),prefix:l.createElement(Ht.A,null),onChange:et}))),!!ie&&l.createElement(i.A,{trigger:["hover"],title:t("Alternative text"),placement:"bottom"},l.createElement(S.A.Item,{name:"alt",className:"selected-image-form__alt",style:{marginBottom:a.formItemMarginBottomXS}},l.createElement(w.A,{placeholder:t("Alternative text"),allowClear:!0,prefix:l.createElement("span",{className:"addon-text-content"},"Alt"),onChange:at,ref:M}))),r.formFieldImageTitleEnabled&&!!de&&l.createElement(i.A,{trigger:["hover"],title:t("Tooltip text"),placement:"bottom"},l.createElement(S.A.Item,{name:"title",className:"selected-image-form__alt",style:{marginBottom:a.formItemMarginBottomXS}},l.createElement(w.A,{placeholder:t("Tooltip text"),allowClear:!0,prefix:l.createElement("span",{className:"addon-text-content"},"Title"),onChange:ot,ref:H})))),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Size"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{xe((e=>!e)),ke&&(t.mobileWidth="",t.mobileHeight="",p({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileWidth:{value:null,dim:"px",classNamePrefix:"em-mob-width-"},mobileHeight:{value:null,dim:"px",classNamePrefix:"em-mob-height-"}}}))}))}},ke?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),ke&&l.createElement(b.A,{gutter:10,style:{paddingBottom:24}},l.createElement(h.A,{span:12},l.createElement(oo,{form:o,name:"mobileWidth",elementSettings:e,isPicture:"true"})),l.createElement(h.A,{span:12},l.createElement(ro,{form:o,name:"mobileHeight",elementSettings:e,isPicture:"true"}))),r.formFieldBorderEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Borders"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{ge((e=>!e)),pe&&(t.mobileBorderWidth=null,t.mobileBorderColor="",t.mobileBorderStyle=""),K((e=>({...D.iV,[t.mobileBorderPosition]:{...e[t.mobileBorderPosition],width:t.mobileBorderWidth,color:t.mobileBorderColor,style:t.mobileBorderStyle}}))),p({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorder:{all:{color:t.mobileBorderColor,style:t.mobileBorderStyle,width:t.mobileBorderWidth,classNamePrefix:"em-mob-border_"+t.mobileBorderPosition+"-"}}}})}))}},pe?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),pe&&l.createElement("div",{style:{marginBottom:4}},l.createElement(mo,{mobileBorders:X}))),r.formFieldBorderRadiusEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Border radius"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{ve((e=>!e)),Ee?(t.mobileBorderRadiusAll=null,oe(!0)):t.mobileBorderRadiusAll=5,p({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorderRadius:{all:t.mobileBorderRadiusAll,classNamePrefix:"em-mob-border_radius_all-"}}})}))}},Ee?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),Ee&&l.createElement("div",{style:{marginBottom:4}},l.createElement(co,{form:o,oneMobileBorderRadiusValue:le,setOneMobileBorderRadiusValue:oe,elementSettings:e}))),r.formFieldBoxShadowEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Box shadow"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{Se((e=>!e)),Ce?(t.mobileBoxShadowInset=!1,t.mobileBoxShadowHOffset=null,t.mobileBoxShadowVOffset=null,t.mobileBoxShadowBlurRadius=null,t.mobileBoxShadowSpreadRadius=null,t.mobileBoxShadowColor=""):(t.mobileBoxShadowInset=!1,t.mobileBoxShadowHOffset=5,t.mobileBoxShadowVOffset=5,t.mobileBoxShadowBlurRadius=10,t.mobileBoxShadowSpreadRadius=-5,t.mobileBoxShadowColor="#000000"),p({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBoxShadow:{blurRadius:t.mobileBoxShadowBlurRadius,color:t.mobileBoxShadowColor,hOffset:t.mobileBoxShadowHOffset,inset:t.mobileBoxShadowInset,spreadRadius:t.mobileBoxShadowSpreadRadius,vOffset:t.mobileBoxShadowVOffset,classNamePrefix:"em-mob-box_shadow-"}}})}))}},Ce?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),Ce&&l.createElement("div",{style:{marginBottom:4}},l.createElement(uo,{mobileBoxShadow:J,form:o,elementSettings:e}))),r.formFieldVisibilityEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},t("Display control")),l.createElement(b.A,{gutter:20,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(vo,{elementSettings:e,form:o})))),r.formFieldAmpVisibilityEnabled&&e.ampShow&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},t("AMP visibility")),l.createElement(b.A,{gutter:20,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(Ro,null)))))):l.createElement("div",{id:"selected_element_form_desktop_props"},l.createElement("div",{className:"selected_form-props-wrapper"},l.createElement(b.A,{gutter:10,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement($l,{form:o,elementSettings:e,imgParent:!0})),l.createElement(h.A,{span:12,align:"right"},l.createElement(Ql,{form:o,elementSettings:e}))),l.createElement(m.A,{className:"selected-td-form__divider",style:{marginBottom:"countdown"===e.type?15:24}}),"countdown"===e.type&&l.createElement(l.Fragment,null,l.createElement(_o,{form:o,elementSettings:e,handleChangeValues:Qe}),l.createElement(m.A,{className:"selected-td-form__divider",style:{marginBottom:24}})),Le&&l.createElement(h.A,{span:24,id:"merge_tags_wrapper"},l.createElement(S.A.Item,{style:{marginBottom:24}},l.createElement(g.Ay,{id:"merge_tags_button",icon:l.createElement(z.A,{icon:"MergeTags"}),style:{width:"100%",display:Ve?"none":"block"},onClick:()=>Fe(!0)},t("Merge tags")),l.createElement(it.A,{ref:U,popupClassName:"merge-tags",options:Le,placeholder:t("Start typing the title"),showSearch:{filter:(e,t)=>t.some((t=>t.label.toLowerCase().indexOf(e.toLowerCase())>-1)),render:(e,t)=>{const a=t.map(((t,a)=>{const o=t.label.split(new RegExp(`(${e})`,"gi"));return l.createElement("span",{key:t.value},0!==a&&l.createElement("span",null,"\xa0/\xa0"),o.map(((t,a)=>t.toLowerCase()===e.toLowerCase()?l.createElement("span",{key:a,style:{color:"red"}},t):t)))}));return l.createElement("div",{title:t.map((e=>e.label)).join(" / ")},a)}},spellCheck:"false",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),onChange:(t,a)=>{if(Fe(!1),t){const l=Xe.syntax.length>1?Le.findIndex((e=>e.key===a[0].key)):0,n=Xe.syntax[l].replace("%value%",t[t.length-1]);"selected_image_form_title"===(null===De||void 0===De?void 0:De.getAttribute("id"))||"selected_image_form_alt"===(null===De||void 0===De?void 0:De.getAttribute("id"))||"selected_image_form_link"===(null===De||void 0===De?void 0:De.getAttribute("id"))||"selected_image_form_imgReplacer"===(null===De||void 0===De?void 0:De.getAttribute("id"))?((t,a)=>{const l=document.getElementById(a);if(l){var n,r;const i="selected_image_form_",s=a.substring(a.indexOf(i)+i.length),d=null===(n=l.value)||void 0===n?void 0:n.substring(0,je.start),m=null===(r=l.value)||void 0===r?void 0:r.substring(je.end);p({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{...e,[s]:d+t+m}}),o.setFieldValue(s,d+t+m),l.focus(),setTimeout((()=>{l.selectionStart=je.start,l.selectionEnd=je.start+t.length}),400),Ge(!0)}})(n,null===De||void 0===De?void 0:De.getAttribute("id")):(o.setFieldValue("imgReplacer",n),p({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{imgReplacer:n}}))}},style:{display:Ve?"block":"none"},open:Ve,onKeyDown:e=>{"Escape"===e.key&&Fe(!1)}}))),"video"===e.type&&l.createElement(l.Fragment,null,l.createElement(Bo,{form:o,elementSettings:e}),l.createElement(m.A,{className:"selected-td-form__divider",style:{marginBottom:24}})),("img"===e.type||"video"===e.type)&&l.createElement(S.A.Item,{style:{marginBottom:0}},l.createElement(Pe,{form:o,label:t("Image path"),name:"src",placeholder:t("Image path"),elementSettings:e,tooltipTitle:""})),l.createElement(s.A,{size:8,style:{marginBottom:ie||ne||de||Ue?a.formItemMarginBottomXS:a.formItemMarginBottomMD+4}},l.createElement(i.A,{title:ie||t("Alternative text"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper")},l.createElement(g.Ay,{className:C()("selected-td-form__button",{"selected-td-form__button--active":!!ie}),onClick:tt,ref:O},l.createElement("span",{className:"addon-text-content"},"Alt"))),r.formFieldImageTitleEnabled&&l.createElement(i.A,{title:de||t("Tooltip text"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper")},l.createElement(g.Ay,{className:C()("selected-td-form__button",{"selected-td-form__button--active":!!de}),onClick:lt,ref:j},l.createElement("span",{className:"addon-text-content"},"Title"))),l.createElement(i.A,{title:ne||t("Hyperlink URL"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper")},l.createElement(g.Ay,{className:C()("selected-td-form__button",{"selected-td-form__button--active":!!ne}),icon:l.createElement(Ht.A,{className:"selected-td-form__icon-radius"}),onClick:Je,ref:I})),l.createElement(i.A,{title:t("Image replacer"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper")},l.createElement(g.Ay,{className:C()("selected-td-form__button",{"selected-td-form__button--active":Ue}),icon:l.createElement(z.A,{icon:"Replacer",className:"selected-td-form__icon-radius"}),onClick:()=>{qe(!Ue),Ue?(o.setFieldValue("imgReplacer",""),p({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{imgReplacer:""}})):setTimeout((()=>W.current.focus()))},ref:G}))),(!!ne||!!ie||!!de||!!Ue)&&l.createElement("div",{style:{marginBottom:a.formItemMarginBottomMD+4}},!!ne&&l.createElement(i.A,{trigger:["hover"],title:t("Hyperlink URL"),placement:"bottom"},l.createElement(S.A.Item,{name:"link",className:"selected-image-form__alt",style:{marginBottom:a.formItemMarginBottomXS}},l.createElement(w.A,{addonBefore:l.createElement(Zt,{linkProtocol:Re,handleLinkProtocolsChange:e=>{o.setFieldValue("link","mergetag"!==e?e:""),Ne(e)},__:t}),placeholder:t("Hyperlink URL"),allowClear:!0,ref:P,onChange:et,onSelect:Ke,prefix:l.createElement(qt,{linkProtocol:Re})}))),!!ie&&l.createElement(i.A,{trigger:["hover"],title:t("Alternative text"),placement:"bottom"},l.createElement(S.A.Item,{name:"alt",className:"selected-image-form__alt",style:{marginBottom:a.formItemMarginBottomXS}},l.createElement(w.A,{placeholder:t("Alternative text"),allowClear:!0,prefix:l.createElement("span",{className:"addon-text-content"},"Alt"),onChange:at,ref:M,onSelect:Ke}))),r.formFieldImageTitleEnabled&&!!de&&l.createElement(i.A,{trigger:["hover"],title:t("Tooltip text"),placement:"bottom"},l.createElement(S.A.Item,{name:"title",className:"selected-image-form__alt",style:{marginBottom:a.formItemMarginBottomXS}},l.createElement(w.A,{placeholder:t("Enter the title of the image"),allowClear:!0,prefix:l.createElement("span",{className:"addon-text-content"},"Title"),onChange:ot,ref:H,onSelect:Ke}))),!!Ue&&l.createElement(i.A,{trigger:["hover"],title:t("Image src"),placement:"bottom"},l.createElement(S.A.Item,{name:"imgReplacer",className:"selected-image-form__alt",style:{marginBottom:a.formItemMarginBottomXS}},l.createElement(w.A,{placeholder:t("\u0421ode that will replace the image `src`"),allowClear:!0,prefix:l.createElement("span",{className:"addon-text-content"},t("Image src")),onChange:e=>{""!==e.target.value&&G.current.classList.add("selected-td-form__button--active")},ref:W,onSelect:Ke})))),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},t("Size")),l.createElement(b.A,{gutter:a.marginSM,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(i.A,{title:t("Width"),placement:"bottom"},l.createElement(S.A.Item,{name:"width",style:{marginBottom:a.formItemMarginBottomXS}},l.createElement(Ft.A,{min:0,max:e.maxWidth,placeholder:t("Width"),prefix:l.createElement(fe.A,null),addonAfter:"px"})))),l.createElement(h.A,{span:12},l.createElement(i.A,{title:t("Height"),placement:"bottom"},l.createElement(S.A.Item,{name:"height"},l.createElement(Ft.A,{min:0,placeholder:t("Height"),prefix:l.createElement(Gl.A,null),addonAfter:"px"}))))),r.formFieldBorderEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Borders"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{ue((e=>!e)),ce&&(t.borderWidth=null,t.borderColor="",t.borderStyle=""),Z((e=>({...D.iV,[t.borderPosition]:{...e[t.borderPosition],width:t.borderWidth,color:t.borderColor,style:t.borderStyle}}))),p({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{border:{all:{color:t.borderColor,style:t.borderStyle,width:t.borderWidth}}}})}))}},ce?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),ce&&l.createElement("div",{style:{marginBottom:4}},l.createElement(Tt,{borders:q}))),r.formFieldBorderRadiusEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Border radius"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{he((e=>!e)),be?(t.borderRadiusAll=0,ae(!0)):t.borderRadiusAll=5,p({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{borderRadius:{all:t.borderRadiusAll}}})}))}},be?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),be&&l.createElement("div",{style:{marginBottom:4}},l.createElement(Dt,{form:o,oneBorderRadiusValue:te,setOneBorderRadiusValue:ae,elementSettings:e}))),r.formFieldBoxShadowEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Box shadow"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{Ae((e=>!e)),ye?(t.boxShadowInset=!1,t.boxShadowHOffset=0,t.boxShadowVOffset=0,t.boxShadowBlurRadius=0,t.boxShadowSpreadRadius=0,t.boxShadowColor=""):(t.boxShadowInset=!1,t.boxShadowHOffset=5,t.boxShadowVOffset=5,t.boxShadowBlurRadius=10,t.boxShadowSpreadRadius=-5,t.boxShadowColor="#000000"),p({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{boxShadow:{blurRadius:t.boxShadowBlurRadius,color:t.boxShadowColor,hOffset:t.boxShadowHOffset,inset:t.boxShadowInset,spreadRadius:t.boxShadowSpreadRadius,vOffset:t.boxShadowVOffset}}})}))}},ye?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),ye&&l.createElement("div",{style:{marginBottom:4}},l.createElement(eo,{boxShadow:$}))),r.formFieldVisibilityEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},t("Display control")),l.createElement(b.A,{gutter:20,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(vo,{elementSettings:e,form:o})))),r.formFieldAmpVisibilityEnabled&&e.ampShow&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},t("AMP visibility")),l.createElement(b.A,{gutter:20,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(Ro,null)))))))},Oo=()=>{const{__:e}=(0,y.s9)();return l.createElement(i.A,{trigger:["hover"],title:e("The font-size CSS property sets the size of the font."),placement:"top"},l.createElement(S.A.Item,{name:"mobileFontSize"},l.createElement(Ft.A,{min:0,placeholder:e("Font size"),prefix:l.createElement(at.A,null),addonAfter:"px"})))};var Vo=a(44484);const Fo=({form:e,elementSettings:t,name:a,icon:o,tooltipTitle:n=null,showTooltip:r=!0})=>{const{__:s}=(0,y.s9)(),d=e.getFieldValue(a),m=(0,Me.XW)(),[c,u]=(0,l.useState)(t[a]);(0,l.useEffect)((()=>{t[a]!==e.getFieldValue(a)&&(e.setFieldValue(a,t[a]),u(t[a]))}),[t,e,a]),(0,l.useEffect)((()=>{c!==d&&u(d)}),[d,c,a]);const p=()=>{const l={[a]:!c};e.setFieldValue(a,!c),m({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:l}),u((e=>!e))};return l.createElement(S.A.Item,{name:a},r?l.createElement(i.A,{placement:"bottom",title:n||s(a.substring(4))},l.createElement(g.Ay,{className:C()("selected-td-form__button selected-td-form__button_style",{"selected-td-form__button--active":c}),onClick:p},o)):l.createElement(g.Ay,{className:C()("selected-td-form__button selected-td-form__button_style",{"selected-td-form__button--active":c}),onClick:p},o))};Fo.defaultProps={imgParent:!1};const Do=Fo,{useToken:Ho}=n.A,jo=({form:e,elementSettings:t,showAddParagraph:a=!0,isButton:o=!1,linkProtocol:n,setLinkProtocol:r,linkTarget:s})=>{const{__:d}=(0,y.s9)(),{token:c}=Ho(),u=(0,A.hN)(),p=(0,Me.XW)(),E=(0,Me.K9)(),v=(0,l.useRef)(),_=(0,l.useRef)(null),k=(0,l.useRef)(null),[x,B]=(0,l.useState)(!1),[T,R]=(0,l.useState)(null),[L,P]=(0,l.useState)({start:0,end:0}),[I,M]=(0,l.useState)(!1);(0,No.A)((e=>{e.data.operation===D.Ru.APPLICATION_FOCUS_IN_IFRAME&&R(null)}));const[O,V]=(0,l.useState)(null);(0,l.useEffect)((()=>{var e,t;null!==(e=window)&&void 0!==e&&null!==(t=e.navigator)&&void 0!==t&&t.userAgent.includes("Macintosh")&&V(!0)}),[]);const F=(0,l.useRef)(null),H=e=>{p({operation:D.Ru.SANDBOX_ELEMENT_TEXT,action:e,locale:"ru_RU"}),u.success({message:d("It`s done!"),placement:"bottomRight"})},j=[{key:"1",label:d("This element"),onClick:()=>H("typograf")},{key:"2",label:d("The whole email"),onClick:()=>H("typograf_all")}],[W,G]=(0,l.useState)(),[U,q]=(0,l.useState)(!1);(0,l.useEffect)((()=>{t.linkHref&&("https://"===t.linkHref.substring(0,8)||"http://"===t.linkHref.substring(0,7)?r("https://"):"mailto:"===t.linkHref.substring(0,7)?r("mailto:"):"tel:"===t.linkHref.substring(0,4)?r("tel:"):"sms:"===t.linkHref.substring(0,4)?r("sms:"):"ftp://"===t.linkHref.substring(0,6)?r("ftp://"):"skype:"===t.linkHref.substring(0,6)?r("skype:"):"viber:"===t.linkHref.substring(0,6)?r("viber:"):r("")),e.setFieldsValue({linkHref:t.linkHref?t.linkHref:"https://"})}),[e,t,r]);const Z=(0,f.d4)(Po.GH);(0,l.useEffect)((()=>{var e;null!==Z&&void 0!==Z&&null!==(e=Z.items)&&void 0!==e&&e.length&&G((0,Y.cM)(Z.items,d,((e,t)=>{q(!1),E(D.Ru.SANDBOX_ADD_MERGETAG,e),t.stopPropagation(),t.preventDefault()})))}),[Z,G,d,q,E]);(0,l.useEffect)((()=>{U&&F.current&&F.current.focus()}),[U]),(0,l.useEffect)((()=>{const e=({target:e})=>{e.closest('[id="merge_tags_wrapper"]')||R(e)},t=({target:e})=>{e.closest(".merge-tags")||e.closest("#merge_tags_button")||q(!1)};return window.addEventListener("focusin",e),window.addEventListener("click",t),()=>{window.removeEventListener("focusin",e),window.addEventListener("click",t)}}),[]);const X=(0,l.useCallback)((({target:e})=>{if(e&&!I){const{selectionStart:t,selectionEnd:a}=e;P({start:t,end:a})}M(!1)}),[I]);(0,l.useEffect)((()=>X({target:null===s||void 0===s?void 0:s.target})),[s,X]);const K=(a,l)=>{const o=document.getElementById(l);if(o){var n,r;const i=null===(n=o.value)||void 0===n?void 0:n.substring(0,L.start),s=null===(r=o.value)||void 0===r?void 0:r.substring(L.end),d=l.substring(l.lastIndexOf("_")+1);p({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:{[d]:i+a+s}}),e.setFieldValue(d,i+a+s),o.focus(),setTimeout((()=>{o.selectionStart=L.start,o.selectionEnd=L.start+a.length}),400),M(!0)}};return(0,l.useEffect)((()=>{var e;B(!(null===(e=t.textReplacer)||void 0===e||!e.length))}),[t,e]),l.createElement(l.Fragment,null,a&&!t.showOnMobile&&l.createElement(l.Fragment,null,l.createElement(b.A,{gutter:20,style:{paddingBottom:4}},l.createElement(h.A,{span:12,gutter:20},l.createElement(vt,{form:e,elementSettings:t,name:"textAlign"}))),l.createElement(m.A,{className:"selected-td-form__divider",style:{marginBottom:20}})),t.showOnMobile&&l.createElement(m.A,{className:"selected-td-form__divider",style:{marginBottom:20}}),l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(S.A.Item,{name:"AddImage",style:{marginBottom:c.formItemMarginBottomXS}},l.createElement(g.Ay,{icon:l.createElement(z.A,{icon:"AddImage"}),onClick:()=>H("add_img"),style:{width:"100%"}},d("Add image")))),l.createElement(h.A,{span:12},l.createElement(S.A.Item,{name:"Typography",style:{marginBottom:c.formItemMarginBottomXS}},l.createElement(N.A,{arrow:!0,menu:{items:j},trigger:["hover"],placement:"bottom",getPopupContainer:e=>e.closest(".selected-element-panel")},l.createElement(g.Ay,{icon:l.createElement(z.A,{icon:"Typograf"}),onClick:()=>H("typograf"),style:{width:"100%"}},d("Typography"))))),W&&l.createElement(h.A,{span:24,id:"merge_tags_wrapper",style:{marginBottom:0}},l.createElement(g.Ay,{id:"merge_tags_button",icon:l.createElement(z.A,{icon:"MergeTags"}),style:{width:"100%",display:U?"none":"block"},onClick:()=>q(!0)},d("Merge tags")),l.createElement(it.A,{ref:F,popupClassName:"merge-tags",options:W,placeholder:d("Start typing the title"),showSearch:{filter:(e,t)=>t.some((t=>t.label.toLowerCase().indexOf(e.toLowerCase())>-1)),render:(e,t)=>{const a=t.map(((t,a)=>{const o=t.label.split(new RegExp(`(${e})`,"gi"));return l.createElement("span",{key:t.value},0!==a&&l.createElement("span",null,"\xa0/\xa0"),o.map(((t,a)=>t.toLowerCase()===e.toLowerCase()?l.createElement("span",{key:a,style:{color:"red"}},t):t)))}));return l.createElement("div",{title:t.map((e=>e.label)).join(" / ")},a)}},spellCheck:"false",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),onChange:(a,l)=>{if(q(!1),a){const o=Z.syntax.length>1?W.findIndex((e=>e.key===l[0].key)):0,n=Z.syntax[o].replace("%value%",a[a.length-1]);"selected_button_form_href"===(null===T||void 0===T?void 0:T.getAttribute("id"))||"selected_text_form_linkHref"===(null===T||void 0===T?void 0:T.getAttribute("id"))||"selected_text_form_textReplacer"===(null===T||void 0===T?void 0:T.getAttribute("id"))?K(n,null===T||void 0===T?void 0:T.getAttribute("id")):(e.setFieldValue("textReplacer",n),p({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:{textReplacer:n}}))}},style:{display:U?"block":"none",width:"100%"},open:U,onKeyDown:e=>{"Escape"===e.key&&q(!1)}}))),l.createElement(m.A,{className:"selected-td-form__divider",style:{marginBottom:t.showOnMobile?20:0,marginTop:20}}),!t.showOnMobile&&l.createElement("div",{className:"form-group-title"},d("Text")),l.createElement(i.A,{trigger:["hover"],title:d("Text font"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode},l.createElement(S.A.Item,{name:"fontFamily",className:"form-item-margin-xs"},l.createElement(pt,{textEditor:!0}))),!t.showOnMobile&&l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:d("Font size"),placement:"bottom"},l.createElement(S.A.Item,{name:"fontSize"},l.createElement(Ft.A,{min:0,placeholder:d("Font size"),prefix:l.createElement(at.A,null),addonAfter:"px"})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:d("Line height"),placement:"bottom"},l.createElement(S.A.Item,{name:"lineHeight"},l.createElement(Ft.A,{min:0,placeholder:d("Line height"),prefix:l.createElement(lt.A,null),addonAfter:"px"}))))),l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:3},l.createElement(Do,{form:e,elementSettings:t,name:"textStrong",tooltipTitle:d(O?"Strong ( \u2318B )":"Strong ( Ctrl+B )"),icon:l.createElement(ot.A,{className:"selected-text-common-form__icon-radius"})})),l.createElement(h.A,{span:3},l.createElement(Do,{form:e,elementSettings:t,name:"textItalic",tooltipTitle:d(O?"Italic ( \u2318I )":"Italic ( Ctrl+I )"),icon:l.createElement(nt.A,{className:"selected-text-common-form__icon-radius"})})),l.createElement(h.A,{span:3},l.createElement(Do,{form:e,elementSettings:t,name:"textStrikethrough",tooltipTitle:d(O?"Strikethrough ( \u2318+Shift+X )":"Strikethrough ( Alt+Shift+5 )"),icon:l.createElement(Vo.A,{className:"selected-text-common-form__icon-radius"})})),l.createElement(h.A,{span:3},l.createElement(Do,{form:e,elementSettings:t,name:"textUnderline",tooltipTitle:d(O?"Underline ( \u2318U )":"Underline ( Ctrl+U )"),icon:l.createElement(rt.A,{className:"selected-text-common-form__icon-radius"})})),a&&l.createElement(h.A,{span:3},l.createElement(Do,{form:e,className:C()("selected-text-common-form__button selected-text-common-form__button_style",{"selected-text-common-form__button--active":"string"===typeof t.linkHref}),elementSettings:t,name:"textLink",tooltipTitle:d("Link"),icon:l.createElement(Ht.A,{className:"selected-text-common-form__icon-radius"}),onSelect:X})),o&&l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:d("Text color"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode},l.createElement(S.A.Item,{name:"textColor",rules:[{message:d("Please set the font color")}]},l.createElement(ye,{placeholder:d("Color"),usedColors:t.usedColors})))),!o&&l.createElement(h.A,{span:3},l.createElement(i.A,{title:d("Text replacer"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper")},l.createElement(g.Ay,{className:C()("selected-td-form__button ant-form-item",{"selected-td-form__button--active":x}),icon:l.createElement(z.A,{icon:"Replacer",className:"selected-td-form__icon-radius"}),onClick:()=>{B(!x),x?(e.setFieldValue("textReplacer",""),p({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:{textReplacer:""}})):setTimeout((()=>_.current.focus()))},ref:k})))),a&&"string"===typeof t.linkHref&&l.createElement(i.A,{trigger:["hover"],title:d("The URL that the hyperlink directs to."),placement:"bottom"},l.createElement(S.A.Item,{name:"linkHref"},l.createElement(w.A,{ref:v,addonBefore:l.createElement(Zt,{linkProtocol:n,handleLinkProtocolsChange:t=>{e.setFieldValue("linkHref","mergetag"!==t?t:""),r(t)},__:d}),allowClear:!0,placeholder:d("Hyperlink URL"),autoFocus:null===t||void 0===t?void 0:t.isNewLink,onSelect:X,prefix:l.createElement(qt,{linkProtocol:n})}))),!o&&x&&l.createElement(i.A,{trigger:["hover"],title:d("Text"),placement:"bottom"},l.createElement(S.A.Item,{name:"textReplacer"},l.createElement(w.A,{placeholder:d("The code that will replace this text"),allowClear:!0,prefix:l.createElement("span",{className:"addon-text-content"},d("Text")),onChange:e=>{""!==e.target.value&&k.current.classList.add("selected-td-form__button--active")},ref:_,onSelect:X}))),!o&&l.createElement(b.A,{gutter:10,style:{paddingBottom:4}},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:d("Text color"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode},l.createElement(S.A.Item,{name:"textColor",rules:[{message:d("Please set the font color")}]},l.createElement(ye,{placeholder:d("Color"),usedColors:t.usedColors})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:d("Text background"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode},l.createElement(S.A.Item,{name:"textBackgroundColor",rules:[{message:d("Please set the background color")}]},l.createElement(ye,{placeholder:d("Background color"),usedColors:t.usedColors}))))))},zo=({form:e,elementSettings:t,showAddParagraph:a=!0,isButton:o=!1})=>{const{__:n}=(0,y.s9)(),r=(0,Me.XW)(),d=(0,f.wA)(),{emailId:c}=(0,v.g)(),u=(0,f.d4)(c?W.Hs:Ke.gm).hasOwnProperty("type")?D.IE:D.Tm,[p,b]=(0,l.useState)(null);(0,l.useEffect)((()=>{var e,t;null!==(e=window)&&void 0!==e&&null!==(t=e.navigator)&&void 0!==t&&t.userAgent.includes("Macintosh")&&b(!0)}),[]);const h=e=>{r({operation:D.Ru.SANDBOX_ELEMENT_TEXT,action:e,locale:"ru_RU"})},E=[{key:"1",label:n("This element"),onClick:()=>h("typograf")},{key:"2",label:n("The whole email"),onClick:()=>h("typograf_all")}],[A,_]=(0,l.useState)(t.textAlign),[C,k]=(0,l.useState)(t.linkHref),x=e=>_(e);return(0,l.useEffect)((()=>{_(t.textAlign),k(t.linkHref)}),[t]),l.createElement("div",{className:"selected_text_common_form_mobile"},l.createElement(s.A,{size:"8",split:l.createElement(m.A,{type:"vertical"})},l.createElement(s.A,{size:8,className:"selected_text_common_form_mobile__group"},l.createElement("div",{style:{width:190}},l.createElement(i.A,{trigger:["hover"],title:n("Text font"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode},l.createElement(S.A.Item,{name:"fontFamily"},l.createElement(pt,{textEditor:!0,codeMode:!0})))),l.createElement("div",{style:{width:90}},l.createElement(i.A,{trigger:["hover"],title:n("Font size"),placement:"bottom"},l.createElement(S.A.Item,{name:"fontSize"},l.createElement(Ft.A,{min:0,placeholder:n("Font size"),prefix:l.createElement(at.A,null),addonAfter:"px"})))),l.createElement("div",{style:{width:90}},l.createElement(i.A,{trigger:["hover"],title:n("Line height"),placement:"bottom"},l.createElement(S.A.Item,{name:"lineHeight"},l.createElement(Ft.A,{min:0,placeholder:n("Line height"),prefix:l.createElement(lt.A,null),addonAfter:"px"}))))),l.createElement(s.A,{size:8,className:"selected_text_common_form_mobile__group"},l.createElement(Do,{form:e,elementSettings:t,name:"textStrong",tooltipTitle:n(p?"Strong ( \u2318B )":"Strong ( Ctrl+B )"),icon:l.createElement(ot.A,{className:"selected-td-form__icon-radius"})}),l.createElement(Do,{form:e,elementSettings:t,name:"textItalic",tooltipTitle:n(p?"Italic ( \u2318I )":"Italic ( Ctrl+I )"),icon:l.createElement(nt.A,{className:"selected-td-form__icon-radius"})}),l.createElement(Do,{form:e,elementSettings:t,name:"textStrikethrough",tooltipTitle:n(p?"Strikethrough ( \u2318+Shift+X )":"Strikethrough ( Alt+Shift+5 )"),icon:l.createElement(Vo.A,{className:"selected-td-form__icon-radius"})}),l.createElement(Do,{form:e,elementSettings:t,name:"textUnderline",tooltipTitle:n(p?"Underline ( \u2318U )":"Underline ( Ctrl+U )"),icon:l.createElement(rt.A,{className:"selected-td-form__icon-radius"})})),l.createElement(s.A,{size:8,className:"selected_text_common_form_mobile__group"},l.createElement(i.A,{trigger:["hover"],title:n("Text color"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode},l.createElement(S.A.Item,{name:"textColor",rules:[{message:n("Please set the font color")}]},l.createElement(ye,{placeholder:n("Color"),usedColors:t.usedColors,codeMode:!0}))),!o&&l.createElement(l.Fragment,null,l.createElement(i.A,{trigger:["hover"],title:n("Text background"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode},l.createElement(S.A.Item,{name:"textBackgroundColor",rules:[{message:n("Please set the background color")}]},l.createElement(ye,{placeholder:n("Background color"),usedColors:t.usedColors}))))),a&&l.createElement(s.A,{size:8,className:"selected_text_common_form_mobile__group"},l.createElement(l.Fragment,null,"string"===typeof C?l.createElement(N.A,{arrow:!0,dropdownRender:()=>l.createElement(i.A,{trigger:["hover"],title:n("The URL that the hyperlink directs to."),placement:"bottom"},l.createElement(S.A.Item,{name:"linkHref"},l.createElement(w.A,{allowClear:!0,placeholder:"href",prefix:l.createElement(Ht.A,null),autoFocus:null===t||void 0===t?void 0:t.isNewLink}))),overlayClassName:"codemode-textalign-dropdown",overlayStyle:{left:520,top:52,transform:"translateX(0)",marginLeft:57},trigger:["hover"],placement:"bottom",getPopupContainer:e=>e.closest(".selected_text_common_form_mobile")},l.createElement("div",null,l.createElement(Do,{form:e,className:"selected-td-form__button selected-td-form__button_style selected-td-form__button--active",elementSettings:t,name:"textLink",icon:l.createElement(Ht.A,{className:"selected-td-form__icon-radius"}),showTooltip:!1}))):l.createElement(Do,{form:e,className:"selected-td-form__button selected-td-form__button_style",elementSettings:t,name:"textLink",tooltipTitle:n("Link"),icon:l.createElement(Ht.A,{className:"selected-td-form__icon-radius"})}),l.createElement(N.A,{arrow:!0,dropdownRender:()=>l.createElement(vt,{form:e,elementSettings:t,name:"textAlign",setAlignStateHandle:x}),overlayClassName:"codemode-textalign-dropdown",overlayStyle:{left:615,top:52,transform:"translateX(0)",marginLeft:57},trigger:["hover"],placement:"bottom",getPopupContainer:e=>e.closest(".selected_text_common_form_mobile")},l.createElement(g.Ay,{icon:"right"===A?l.createElement(Et.A,null):"center"===A?l.createElement(ht.A,null):l.createElement(bt.A,null),className:"selected-td-form__button"})))),l.createElement(s.A,{size:8,className:"selected_text_common_form_mobile__group"},a&&l.createElement(i.A,{trigger:["hover"],title:n("Add paragraph"),placement:"bottom"},l.createElement(g.Ay,{icon:l.createElement(z.A,{icon:"Paragraph"}),onClick:()=>h("add_p"),className:"selected-td-form__button"})),l.createElement(i.A,{trigger:["hover"],title:n("Add inline image"),placement:"bottom"},l.createElement(g.Ay,{icon:l.createElement(z.A,{icon:"Image",style:{fontSize:20,verticalAlign:"text-top"}}),onClick:()=>h("add_img"),className:"selected-td-form__button"})),l.createElement(N.A,{arrow:!0,menu:{items:E},trigger:["hover"],placement:"bottom",getPopupContainer:e=>e.closest(".selected_text_common_form_mobile"),overlayStyle:{left:750,top:52,transform:"translateX(0)",marginLeft:57}},l.createElement(g.Ay,{icon:l.createElement(z.A,{icon:"Typograf"}),className:"selected-td-form__button"})),l.createElement(g.Ay,{icon:l.createElement(io.A,null),type:"icon",style:{marginLeft:26},onClick:()=>{r({operation:D.Ru.SANDBOX_ELEMENT_ACTIVE_RESET}),d((0,Ie.Fk)()),setTimeout((()=>{u===D.IE?d((0,Ke.A9)({type:null})):d((0,W.A9)({type:null}))}),300)}}))))},Wo=({form:e,elementSettings:t,imgParent:a,name:o="mobileAlign"})=>{var n;const{__:r}=(0,y.s9)(),[d,m]=(0,l.useState)(null===(n=t[o])||void 0===n?void 0:n.value),c=(0,Me.XW)(),u=a=>{const l=a.target.value,n={[o]:{classNamePrefix:"em-mob-text_align-",value:""}};l!==d?m(l):(m(""),e.setFieldsValue(n),c({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:n}))};return l.createElement(S.A.Item,{name:o},l.createElement(gt.Ay.Group,{disabled:a&&!t.parent},l.createElement(s.A,{size:8},l.createElement(i.A,{placement:"bottom",title:r("Text align left")},l.createElement(gt.Ay.Button,{value:"left",onClick:u},l.createElement(bt.A,null))),l.createElement(i.A,{placement:"bottom",title:r("Text align center")},l.createElement(gt.Ay.Button,{value:"center",onClick:u},l.createElement(ht.A,null))),l.createElement(i.A,{placement:"bottom",title:r("Text align right")},l.createElement(gt.Ay.Button,{value:"right",onClick:u},l.createElement(Et.A,null))),l.createElement(i.A,{placement:"bottom",title:r("Text align justify")},l.createElement(gt.Ay.Button,{value:"justify",onClick:u},l.createElement(z.A,{icon:"Justify"}))))))};Wo.defaultProps={imgParent:!1};const Go=Wo,Uo=({elementSettings:e})=>{const{__:t}=(0,y.s9)(),a=(0,Me.XW)(),[o]=S.A.useForm(),n=(0,f.d4)(Ie.Ct),r=(0,f.d4)(Ie.CS),s=(0,f.d4)(Ie.Fv),d=(0,f.d4)(Ie.yy),m=s&&"bottom"!==d,[c,p]=(0,l.useState)("https://");(0,l.useEffect)((()=>{var t,a,l,n,r;e&&o.setFieldsValue({...e,linkHref:e.linkHref?e.linkHref:"https://",mobileFontSize:ga(null===(t=e.mobileFontSize)||void 0===t?void 0:t.value),mobileFontSizeDim:null===(a=e.mobileFontSize)||void 0===a?void 0:a.dim,mobileLineHeight:ga(null===(l=e.mobileLineHeight)||void 0===l?void 0:l.value),mobileLineHeightDim:null===(n=e.mobileLineHeight)||void 0===n?void 0:n.dim,mobileTextAlign:ga(null===(r=e.mobileTextAlign)||void 0===r?void 0:r.value)})}),[o,e]);return l.createElement(S.A,{form:o,layout:"vertical",name:"selected_text_form",autoComplete:"off",onValuesChange:t=>{const l=o.getFieldsValue(!0),n=Object.keys(t)[0];let r;switch(n){case"mobileFontSize":r={[n]:{classNamePrefix:"em-mob-font_size-",value:t[n],dim:l.mobileFontSizeDim}};break;case"mobileLineHeight":r={[n]:{classNamePrefix:"em-mob-line_height-",value:t[n],dim:l.mobileLineHeightDim}};break;case"mobileTextAlign":r={[n]:{classNamePrefix:"em-mob-text_align-",value:t[n]}};break;case"linkHref":let e=t[n];"https://http"===e.substring(0,12)&&(e=e.substring(8,e.length),o.setFieldValue("linkHref",e)),r={[n]:e},"https://"===t[n].substring(0,8)||"http://"===t[n].substring(0,7)?p("https://"):"mailto:"===t[n].substring(0,7)?p("mailto:"):"tel:"===t[n].substring(0,4)?p("tel:"):"sms:"===t[n].substring(0,4)?p("sms:"):"ftp://"===t[n].substring(0,6)?p("ftp://"):"skype:"===t[n].substring(0,6)?p("skype:"):"viber:"===t[n].substring(0,6)?p("viber:"):p("");break;default:r=t}a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:r})},className:"element-controls",initialValues:{textAlign:"left",textStrong:!1,textItalic:!1,textStrikethrough:!1,textUnderline:!1,textColor:"",textBackgroundColor:"",textLink:!1,textReplacer:""}},!m&&l.createElement(i.A,{title:t("To change the appearance of the element on the mobile device, edit the fields below. If the fields remain empty, the desktop styles will be applied to the mobile version."),placement:"bottom"},l.createElement(u.A,{className:"selected_form-mobile-props-title",message:t("Appearance on mobile devices"),type:"info"})),!(n===D.ND&&!m&&r.styles)&&l.createElement("div",{id:"selected_element_form_desktop_props",style:{paddingRight:0}},l.createElement("div",{className:"selected_form-props-wrapper"},m?l.createElement(zo,{form:o,elementSettings:e}):l.createElement(jo,{form:o,elementSettings:e,linkProtocol:c,setLinkProtocol:p}))),!m&&l.createElement("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",style:{display:n===D.ND&&r.styles?"block":"none"}},l.createElement("div",{className:"selected_form-mobile-props-wrapper"},l.createElement(b.A,{gutter:20},l.createElement(h.A,{span:12},l.createElement(Go,{form:o,elementSettings:e,name:"mobileTextAlign"}))),!!e.showOnMobile&&l.createElement(jo,{form:o,elementSettings:e,linkProtocol:c,setLinkProtocol:p}),l.createElement(b.A,{gutter:10,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(Oo,null)),l.createElement(h.A,{span:12},l.createElement(S.A.Item,{name:"mobileLineHeight"},l.createElement(Ft.A,{min:0,placeholder:t("Line height"),prefix:l.createElement(lt.A,null),addonAfter:"px"})))))))},{useToken:qo}=n.A,Zo=({form:e,elementSettings:t,label:a})=>{var o;const{__:n}=(0,y.s9)(),r=(0,l.useRef)(),[d,m]=(0,l.useState)("none"===(null===(o=t.mobileBackgroundColor)||void 0===o?void 0:o.value)),{token:c}=qo(),u=(0,Me.XW)();return l.createElement(l.Fragment,null,l.createElement(i.A,{trigger:["hover"],title:n("Background color"),placement:"left"},l.createElement(S.A.Item,{name:"mobileBackgroundColor",style:{marginBottom:c.formItemMarginBottomXS/2}},l.createElement(ye,{onChange:e=>{m(!1)},placeholder:a,usedColors:t.usedColors})),l.createElement(s.A,{size:8,align:"end"},l.createElement(B.A,{ref:r,size:"small",checked:d,onChange:a=>{e.setFieldsValue({mobileBackgroundColor:""}),m((e=>!e)),u({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:{mobileBackgroundColor:{classNamePrefix:"em-mob-background_color-",value:d?"":"none"}}})},id:"without-background-color"}),l.createElement("div",{className:"ant-form-item-switch-label-small",style:{position:"relative",top:2}},l.createElement("label",{htmlFor:"without-background-color"},n("Without background color"))))))},Xo=({form:e,placeholder:t,name:a,tooltipTitle:o,disabled:n,elementSettings:r})=>{var d;const{__:m}=(0,y.s9)(),c=(0,Me.XW)(),u=e.getFieldValue(a),[p,g]=(0,l.useState)("success"),b=(0,l.useRef)(),[h,E]=(0,l.useState)(!(!r.mobileBackgroundImage||"none"!==r.mobileBackgroundImage[0].value));(0,l.useEffect)((()=>{u?(0,F.DI)(u).then((e=>{g(e)})).catch((e=>{g(e)})):g("")}),[e,u]);return l.createElement(l.Fragment,null,l.createElement(i.A,{trigger:["hover"],title:o,placement:"left"},l.createElement(S.A.Item,{name:a,validateStatus:p,style:{marginBottom:-7}},l.createElement(Te,{validateStatus:p,placeholder:t,name:a,disabled:n,elementSettings:r,imageInfo:r.type===D.bV.CAROUSEL?null===(d=r.carouselImages)||void 0===d?void 0:d[a.split("_")[1]]:r})),l.createElement(s.A,{size:8,align:"end",style:{marginTop:-3,display:"flex"}},l.createElement(B.A,{ref:b,size:"small",checked:h,onChange:t=>{e.setFieldsValue({mobileBackgroundImage:""}),E((e=>!e)),c({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:r.type,settings:{mobileBackgroundImage:[{classNamePrefix:"em-mob-background_image-",value:h?"":"none",type:"url"}]}})},id:"without-background-image"}),l.createElement("div",{className:"ant-form-item-switch-label-small",style:{position:"relative",top:2}},l.createElement("label",{htmlFor:"without-background-image"},m("Without background image"))))))};Xo.defaulProps={disabled:!1};const Ko=(e,t)=>{const{__:a}=(0,y.s9)();return l.createElement(i.A,{title:a("During export, the element is converted into an image."),key:"exportAsPicture"},l.createElement(s.A,{size:10,align:"baseline"},l.createElement(S.A.Item,{name:"exportAsPicture",valuePropName:"checked"},l.createElement(B.A,{size:"small",id:"convern-in-image"})),l.createElement("span",{className:"ant-form-item-switch-label",style:{position:"relative",top:2}},l.createElement("label",{htmlFor:"convern-in-image"},a("Convert into an image")))))},{Option:Yo}=k.A,$o=l.createElement(k.A,{className:"select-after",getPopupContainer:e=>e.parentNode},l.createElement(Yo,{value:"px"},"px"),l.createElement(Yo,{value:"%"},"%")),{useToken:Qo}=n.A,Jo=({elementSettings:e})=>{const{__:t}=(0,y.s9)(),a=(0,Me.XW)(),[o]=S.A.useForm(),[n,r]=(0,l.useState)({}),[s,d]=(0,l.useState)({}),[c,p]=(0,l.useState)(!0),[E,v]=(0,l.useState)({}),[A,_]=(0,l.useState)({}),[C,w]=(0,l.useState)(!0),x=(0,f.d4)(Ie.Ct),B=(0,f.d4)(Ie.CS),T=(0,Y.rD)(),[R,N]=(0,l.useState)(""===e.backgroundImage[0].value),{token:L}=Qo(),P=(0,f.d4)(Ie.Fv),I=(0,f.d4)(Ie.yy),M=P&&"bottom"!==I,[O,V]=(0,l.useState)(!1),[F,H]=(0,l.useState)(!1),[j,W]=(0,l.useState)(!1),[G,U]=(0,l.useState)(!1),[q,Z]=(0,l.useState)(!1),[X,K]=(0,l.useState)(!1),[$,Q]=(0,l.useState)(!1),[J,ee]=(0,l.useState)(!1),[te,ae]=(0,l.useState)(!1),[le,oe]=(0,l.useState)(!1),[ne,re]=(0,l.useState)(!1),ie=[{label:t("Not defined"),value:"none"},{label:t("Do not repeat background (no-repeat)"),value:"no-repeat"},{label:t("Repeat background (repeat)"),value:"repeat"},{label:t("Repeat background horizontally (repeat-x)"),value:"repeat-x"},{label:t("Repeat background vertically (repeat-y)"),value:"repeat-y"}],se=[{label:t("Not defined"),value:""},{label:t("Contain"),value:"contain"},{label:t("Cover"),value:"cover"}];(0,l.useEffect)((()=>{if(e){var t,a,l,n,i,s,m,c,u,g,b,h,E,f,y,A,C,S,k,x,B,T,R,L,P,I,M,O,F,D,j,z,G,q,X,Y,$,J,te,le,ne,ie,se;const de=e.border,me=e.boxShadow,ce=e.mobileBorder,ue=e.mobileBoxShadow;r(de),d(me),v(ce),_(ue);const pe=Object.keys(de).find((e=>{var t,a,l;return(null===(t=de[e])||void 0===t?void 0:t.width)||(null===(a=de[e])||void 0===a?void 0:a.style)||(null===(l=de[e])||void 0===l?void 0:l.color)})),ge=Object.keys(ce).find((e=>{var t,a,l;return(null===(t=ce[e])||void 0===t?void 0:t.width)||(null===(a=ce[e])||void 0===a?void 0:a.style)||(null===(l=ce[e])||void 0===l?void 0:l.color)}));o.setFieldsValue({...e,width:null===(t=e.width)||void 0===t?void 0:t.value,widthDim:null===(a=e.width)||void 0===a?void 0:a.dim,maxWidth:null===(l=e.maxWidth)||void 0===l?void 0:l.value,maxWidthDim:null===(n=e.maxWidth)||void 0===n?void 0:n.dim,minWidth:null===(i=e.minWidth)||void 0===i?void 0:i.value,minWidthDim:null===(s=e.minWidth)||void 0===s?void 0:s.dim,backgroundImage:e.backgroundImage[0].value,show:e.show?e.show:"all",borderPosition:pe||"all",borderWidth:(null===(m=de[pe])||void 0===m?void 0:m.width)||"",borderColor:(null===(c=de[pe])||void 0===c?void 0:c.color)||"",borderStyle:(null===(u=de[pe])||void 0===u?void 0:u.style)||"solid",borderRadiusAll:ga(e.borderRadius.all),borderRadiusTopLeft:ga(e.borderRadius.topLeft),borderRadiusBottomLeft:ga(e.borderRadius.bottomLeft),borderRadiusTopRight:ga(e.borderRadius.topRight),borderRadiusBottomRight:ga(e.borderRadius.bottomRight),boxShadowInset:ga(null===(g=e.boxShadow)||void 0===g?void 0:g.inset)||!1,boxShadowHOffset:ga(null===(b=e.boxShadow)||void 0===b?void 0:b.hOffset),boxShadowVOffset:ga(null===(h=e.boxShadow)||void 0===h?void 0:h.vOffset),boxShadowBlurRadius:ga(null===(E=e.boxShadow)||void 0===E?void 0:E.blurRadius),boxShadowSpreadRadius:ga(null===(f=e.boxShadow)||void 0===f?void 0:f.spreadRadius),boxShadowColor:ga(null===(y=e.boxShadow)||void 0===y?void 0:y.color),mobileWidth:ba(null===(A=e.mobileWidth)||void 0===A?void 0:A.value),mobileWidthDim:null===(C=e.mobileWidth)||void 0===C?void 0:C.dim,mobileAlign:null===(S=e.mobileAlign)||void 0===S?void 0:S.value,mobileBorderPosition:ge||"all",mobileBorderWidth:null!==(null===(k=ce[ge])||void 0===k?void 0:k.width)?null===(x=ce[ge])||void 0===x?void 0:x.width:"",mobileBorderColor:(null===(B=ce[ge])||void 0===B?void 0:B.color)||"",mobileBorderStyle:(null===(T=ce[ge])||void 0===T?void 0:T.style)||"",mobileBorderRadiusAll:ga(e.mobileBorderRadius.all),mobileRadiusTopLeft:ga(null!==e.mobileBorderRadius.topLeft?e.mobileBorderRadius.topLeft:e.mobileBorderRadius.all),mobileRadiusBottomLeft:ga(null!==e.mobileBorderRadius.bottomLeft?e.mobileBorderRadius.bottomLeft:e.mobileBorderRadius.all),mobileRadiusTopRight:ga(null!==e.mobileBorderRadius.topRight?e.mobileBorderRadius.topRight:e.mobileBorderRadius.all),mobileRadiusBottomRight:ga(null!==e.mobileBorderRadius.bottomRight?e.mobileBorderRadius.bottomRight:e.mobileBorderRadius.all),mobileBoxShadowInset:ga(null===(R=e.mobileBoxShadow)||void 0===R?void 0:R.inset)||!1,mobileBoxShadowHOffset:ga(null===(L=e.mobileBoxShadow)||void 0===L?void 0:L.hOffset),mobileBoxShadowVOffset:ga(null===(P=e.mobileBoxShadow)||void 0===P?void 0:P.vOffset),mobileBoxShadowBlurRadius:ga(null===(I=e.mobileBoxShadow)||void 0===I?void 0:I.blurRadius),mobileBoxShadowSpreadRadius:ga(null===(M=e.mobileBoxShadow)||void 0===M?void 0:M.spreadRadius),mobileBoxShadowColor:ga(null===(O=e.mobileBoxShadow)||void 0===O?void 0:O.color),mobileBackgroundColor:ga("none"!==(null===(F=e.mobileBackgroundColor)||void 0===F?void 0:F.value)?null===(D=e.mobileBackgroundColor)||void 0===D?void 0:D.value:""),mobileBackgroundImage:"none"!==e.mobileBackgroundImage[0].value?e.mobileBackgroundImage[0].value:"",mobileBackgroundPositionX:ga(null===(j=e.mobileBackgroundPositionX)||void 0===j?void 0:j.value),mobileBackgroundPositionY:ga(null===(z=e.mobileBackgroundPositionY)||void 0===z?void 0:z.value),mobileBackgroundRepeat:null!==(G=e.mobileBackgroundRepeat)&&void 0!==G&&G.value?null===(q=e.mobileBackgroundRepeat)||void 0===q?void 0:q.value:"none",exportAsPicture:null===e||void 0===e?void 0:e.exportAsPicture}),!ga(e.borderRadius.all)&&(ga(e.borderRadius.topLeft)||ga(e.borderRadius.bottomLeft)||ga(e.borderRadius.topRight)||ga(e.borderRadius.bottomRight))?p(!1):p(!0),ga(e.mobileBorderRadius.topLeft)||ga(e.mobileBorderRadius.bottomLeft)||ga(e.mobileBorderRadius.topRight)||ga(e.mobileBorderRadius.bottomRight)?w(!1):w(!0),N(""===e.backgroundImage[0].value),V(!(null===(X=de[pe])||void 0===X||!X.width)||!(null===(Y=de[pe])||void 0===Y||!Y.style)||!(null===($=de[pe])||void 0===$||!$.color)),H(!(null===(J=ce[ge])||void 0===J||!J.width)||!(null===(te=ce[ge])||void 0===te||!te.style)||!(null===(le=ce[ge])||void 0===le||!le.color)),W(!!e.borderRadius.all||!!e.borderRadius.topLeft||!!e.borderRadius.bottomLeft||!!e.borderRadius.topRight||!!e.borderRadius.bottomRight),U(!!e.mobileBorderRadius.all||!!e.mobileBorderRadius.topLeft||!!e.mobileBorderRadius.bottomLeft||!!e.mobileBorderRadius.topRight||!!e.mobileBorderRadius.bottomRight),Z(!!e.boxShadow),K(!!e.mobileBoxShadow.blurRadius||!!e.mobileBoxShadow.color||!!e.mobileBoxShadow.hOffset||!!e.mobileBoxShadow.inset||!!e.mobileBoxShadow.spreadRadius||!!e.mobileBoxShadow.vOffset),Q(!(null===(ne=e.width)||void 0===ne||!ne.value)||!(null===(ie=e.minWidth)||void 0===ie||!ie.value)||!(null===(se=e.maxWidth)||void 0===se||!se.value)),ee(!!e.mobileWidth.value),ae(!!e.backgroundColor||!!e.backgroundImage[0].value||!!e.backgroundPositionY||!!e.backgroundPositionX||"repeat"!==e.backgroundRepeat||!e.backgroundRepeat,!!e.backgroundSize),oe(!!e.mobileBackgroundColor.value),re(!!e.exportAsPicture)}}),[o,e]);return l.createElement(S.A,{form:o,layout:"vertical",name:"selected_table_form",initialValues:{backgroundColor:"",backgroundImage:"",backgroundPositionX:"",backgroundPositionY:"",backgroundRepeat:"",backgroundSize:"",exportAsPicture:!1,show:"all",width:{value:"",dim:""},maxWidth:{value:"",dim:""},minWidth:{value:"",dim:""},align:"",mobileAlign:"",border:"",boxShadow:"",borderPosition:"",borderColor:"",borderWidth:"",borderStyle:"",borderRadiusAll:"",RadiusTopLeft:"",RadiusBottomLeft:"",RadiusTopRight:"",RadiusBottomRight:"",mobileWidth:"",mobileWidthDim:"",mobileBorder:"",mobileBorderPosition:"",mobileBorderColor:"",mobileBorderWidth:"",mobileBorderStyle:"",mobileBoxShadow:"",mobileBackgroundColor:"",mobileBackgroundImage:""},onValuesChange:t=>{const l=o.getFieldsValue(!0),i=Object.keys(t)[0];let s;switch(i){case"exportAsPicture":s={exportAsPicture:l.exportAsPicture};break;case"boxShadowInset":case"boxShadowHOffset":case"boxShadowVOffset":case"boxShadowBlurRadius":case"boxShadowSpreadRadius":case"boxShadowColor":s={boxShadow:{hOffset:l.boxShadowHOffset,vOffset:l.boxShadowVOffset,blurRadius:l.boxShadowBlurRadius,spreadRadius:l.boxShadowSpreadRadius,color:l.boxShadowColor,inset:l.boxShadowInset}};break;case"borderStyle":s={border:{[l.borderPosition]:{...n[l.borderPosition],style:t[i]}}},"all"===l.borderPosition?r((e=>({...D.iV,[l.borderPosition]:{...e[l.borderPosition],style:t[i]}}))):r((e=>({...e,[l.borderPosition]:{...e[l.borderPosition],style:t[i]}})));break;case"borderColor":s={border:{[l.borderPosition]:{...n[l.borderPosition],color:t[i]}}},"all"===l.borderPosition?r((e=>({...D.iV,[l.borderPosition]:{...e[l.borderPosition],color:t[i]}}))):r((e=>({...e,[l.borderPosition]:{...e[l.borderPosition],color:t[i]}})));break;case"borderWidth":s={border:{[l.borderPosition]:{...n[l.borderPosition],width:t[i]}}},"all"===l.borderPosition?r((e=>({...D.iV,[l.borderPosition]:{...e[l.borderPosition],width:t[i]}}))):r((e=>({...e,[l.borderPosition]:{...e[l.borderPosition],width:t[i]}})));break;case"borderPosition":o.setFieldsValue({borderWidth:n[t[i]].width||"",borderColor:n[t[i]].color||"",borderStyle:n[t[i]].style||""});break;case"width":s={[i]:{value:t[i],dim:l.widthDim}};break;case"widthDim":s={width:{value:l.width,dim:t[i]}};break;case"maxWidth":s={[i]:{value:t[i],dim:l.maxWidthDim}};break;case"maxWidthDim":s={maxWidth:{value:l.maxWidth,dim:t[i]}};break;case"minWidth":s={[i]:{value:t[i],dim:l.minWidthDim}};break;case"minWidthDim":s={minWidth:{value:l.minWidth,dim:t[i]}};break;case"backgroundImage":N(""===t[i]),s={[i]:[{...e.backgroundImage[0],value:t[i]}],backgroundSize:"cover"};break;case"borderRadiusAll":case"borderRadiusTopLeft":case"borderRadiusBottomLeft":case"borderRadiusTopRight":case"borderRadiusBottomRight":s={borderRadius:{[D.wF[i]]:+t[i]}};break;case"mobileWidth":s={[i]:{classNamePrefix:"em-mob-width-",value:t[i],dim:l.mobileWidthDim}};break;case"mobileWidthDim":s={mobileWidth:{classNamePrefix:"em-mob-width-",value:l.mobileWidth,dim:t[i]}};break;case"mobileBorderStyle":s={mobileBorder:{[l.mobileBorderPosition]:{...E[l.mobileBorderPosition],style:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}},"all"===l.mobileBorderPosition?v((e=>({...D.iV,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],style:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}))):v((e=>({...e,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],style:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}})));break;case"mobileBorderColor":s={mobileBorder:{[l.mobileBorderPosition]:{...E[l.mobileBorderPosition],color:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}},"all"===l.mobileBorderPosition?v((e=>({...D.iV,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],color:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}))):v((e=>({...e,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],color:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}})));break;case"mobileBorderWidth":s={mobileBorder:{[l.mobileBorderPosition]:{...E[l.mobileBorderPosition],width:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}},"all"===l.mobileBorderPosition?v((e=>({...D.iV,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],width:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}))):v((e=>({...e,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],width:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}})));break;case"mobileBorderPosition":o.setFieldsValue({mobileBorderWidth:E[t[i]].width||"",mobileBorderColor:E[t[i]].color||"",mobileBorderStyle:E[t[i]].style||""});break;case"mobileBorderRadiusAll":case"mobileRadiusTopLeft":case"mobileRadiusBottomLeft":case"mobileRadiusTopRight":case"mobileRadiusBottomRight":s={mobileBorderRadius:{[ua[i]]:t[i],classNamePrefix:"em-mob-border_radius_"+ua[i]+"-"}};break;case"mobileBoxShadowInset":case"mobileBoxShadowHOffset":case"mobileBoxShadowVOffset":case"mobileBoxShadowBlurRadius":case"mobileBoxShadowSpreadRadius":case"mobileBoxShadowColor":s={mobileBoxShadow:{hOffset:l.mobileBoxShadowHOffset,vOffset:l.mobileBoxShadowVOffset,blurRadius:l.mobileBoxShadowBlurRadius,spreadRadius:l.mobileBoxShadowSpreadRadius,color:l.mobileBoxShadowColor,inset:l.mobileBoxShadowInset,classNamePrefix:"em-mob-box_shadow-"}};break;case"mobileBackgroundColor":s={[i]:{classNamePrefix:"em-mob-background_color-",value:t[i]}};break;case"mobileBackgroundImage":s={[i]:[{...e.mobileBackgroundImage[0],classNamePrefix:"em-mob-background_image-",value:t[i]}]};break;case"mobileBackgroundPositionX":s={[i]:{classNamePrefix:"em-mob-background_position_x-",value:t[i]}};break;case"mobileBackgroundPositionY":s={[i]:{classNamePrefix:"em-mob-background_position_x-",value:t[i]}};break;case"mobileBackgroundRepeat":s={[i]:{classNamePrefix:"em-mob-background_repeat-",value:t[i]}};break;case"mobileAlign":s={[i]:{classNamePrefix:"em-mob-table_align-",value:t[i]}};break;default:s=t}"borderPosition"!==i&&a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:s})},autoComplete:"off",className:"element-controls"},!M&&l.createElement(i.A,{title:t("To change the appearance of the element on the mobile device, edit the fields below. If the fields remain empty, the desktop styles will be applied to the mobile version."),placement:"bottom"},l.createElement(u.A,{className:"selected_form-mobile-props-title",message:t("Appearance on mobile devices"),type:"info"})),x===D.ND&&B.styles?l.createElement("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props"},l.createElement("div",{className:"selected_form-mobile-props-wrapper"},l.createElement("div",{style:{paddingBottom:4}},l.createElement(go,{form:o,elementSettings:e})),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Size"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{ee((e=>!e)),J&&(t.mobileWidth="",a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileWidth:{value:null,dim:"px",classNamePrefix:"em-mob-width-"}}}))}))}},J?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),J&&l.createElement(l.Fragment,null,l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:t("Table width"),placement:"left"},l.createElement("div",{style:{marginBottom:L.formItemMarginBottomMD+4}},l.createElement(oo,{form:o,name:"mobileWidth",elementSettings:e})))))),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Background"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{oe((e=>!e)),t.mobileBackgroundColor=le?"":"#E5E5E5",a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBackgroundColor:{classNamePrefix:"em-mob-background_color-",value:t.mobileBackgroundColor}}})}))}},le?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),le&&l.createElement("div",{style:{marginBottom:(T.formTableFieldBackgroundImageEnabled,L.formItemMarginBottomMD+4)}},l.createElement(Zo,{form:o,elementSettings:e})),!1,T.formFieldBorderEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Borders"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{H((e=>!e)),F&&(t.mobileBorderWidth=null,t.mobileBorderColor="",t.mobileBorderStyle=""),v((e=>({...D.iV,[t.mobileBorderPosition]:{...e[t.mobileBorderPosition],width:t.mobileBorderWidth,color:t.mobileBorderColor,style:t.mobileBorderStyle}}))),a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorder:{all:{color:t.mobileBorderColor,style:t.mobileBorderStyle,width:t.mobileBorderWidth,classNamePrefix:"em-mob-border_"+t.mobileBorderPosition+"-"}}}})}))}},F?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),F&&l.createElement("div",{style:{paddingBottom:4}},l.createElement(mo,{mobileBorders:E}))),T.formFieldBorderRadiusEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Border radius"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{U((e=>!e)),G?(t.mobileBorderRadiusAll=null,w(!0)):t.mobileBorderRadiusAll=5,a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorderRadius:{all:t.mobileBorderRadiusAll,classNamePrefix:"em-mob-border_radius_all-"}}})}))}},G?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),G&&l.createElement("div",{style:{paddingBottom:4}},l.createElement(co,{form:o,oneMobileBorderRadiusValue:C,setOneMobileBorderRadiusValue:w,elementSettings:e}))),T.formFieldBoxShadowEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Box shadow"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{K((e=>!e)),X?(t.mobileBoxShadowInset=!1,t.mobileBoxShadowHOffset=null,t.mobileBoxShadowVOffset=null,t.mobileBoxShadowBlurRadius=null,t.mobileBoxShadowSpreadRadius=null,t.mobileBoxShadowColor=""):(t.mobileBoxShadowInset=!1,t.mobileBoxShadowHOffset=5,t.mobileBoxShadowVOffset=5,t.mobileBoxShadowBlurRadius=10,t.mobileBoxShadowSpreadRadius=-5,t.mobileBoxShadowColor="#000000"),a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBoxShadow:{blurRadius:t.mobileBoxShadowBlurRadius,color:t.mobileBoxShadowColor,hOffset:t.mobileBoxShadowHOffset,inset:t.mobileBoxShadowInset,spreadRadius:t.mobileBoxShadowSpreadRadius,vOffset:t.mobileBoxShadowVOffset,classNamePrefix:"em-mob-box_shadow-"}}})}))}},X?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),X&&l.createElement("div",{style:{paddingBottom:4}},l.createElement(uo,{mobileBoxShadow:A,form:o,elementSettings:e}))),T.formFieldVisibilityEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},t("Display control")),l.createElement(b.A,{gutter:20},l.createElement(h.A,{span:12},l.createElement("div",{style:{paddingBottom:4}},l.createElement(vo,{elementSettings:e,form:o}))))),T.formFieldAmpVisibilityEnabled&&e.ampShow&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},t("AMP visibility")),l.createElement(b.A,{gutter:20,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(Ro,null)))))):l.createElement("div",{id:"selected_element_form_desktop_props"},l.createElement("div",{className:"selected_form-props-wrapper"},l.createElement("div",{style:{paddingBottom:4}},l.createElement($l,{form:o,elementSettings:e,tooltipTitle:t("The align attribute sets the horizontal alignment of the table.")})),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Size"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{Q((e=>!e)),$&&(t.width="",t.minWidth="",t.maxWidth="",a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{width:{value:null,dim:"px"},minWidth:{value:null,dim:"px"},maxWidth:{value:null,dim:"px"}}}))}))}},$?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),$&&l.createElement(l.Fragment,null,l.createElement(i.A,{trigger:["hover"],title:t("Table width"),placement:"left"},l.createElement(S.A.Item,{name:"width",style:{marginBottom:L.formItemMarginBottomXS}},l.createElement(Ft.A,{min:0,placeholder:t("Width"),prefix:l.createElement(fe.A,null),addonAfter:l.createElement(S.A.Item,{name:"widthDim",noStyle:!0},$o),style:{width:"100%"}}))),l.createElement(b.A,{gutter:10,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:t("Minimum width"),placement:"left"},l.createElement(S.A.Item,{name:"minWidth"},l.createElement(Ft.A,{min:0,placeholder:t("Table min width"),prefix:l.createElement(z.A,{icon:"MinWidth"}),addonAfter:l.createElement(S.A.Item,{name:"minWidthDim",noStyle:!0},$o)})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:t("Maximum width"),placement:"top"},l.createElement(S.A.Item,{name:"maxWidth"},l.createElement(Ft.A,{min:0,placeholder:t("Table max width"),prefix:l.createElement(z.A,{icon:"MaxWidth"}),addonAfter:l.createElement(S.A.Item,{name:"maxWidthDim",noStyle:!0},$o)})))))),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Background"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{ae((e=>!e)),te?(t.backgroundColor="",t.backgroundImage="",t.backgroundPositionX="",t.backgroundPositionY="",t.backgroundRepeat="none",t.backgroundSize="",N(!0)):(t.backgroundColor="#E5E5E5",t.backgroundSize="",t.backgroundRepeat="none"),a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{backgroundColor:t.backgroundColor,backgroundImage:[{type:"url",value:t.backgroundImage}],backgroundPositionX:t.backgroundPositionX,backgroundPositionY:t.backgroundPositionY,backgroundRepeat:t.backgroundRepeat,backgroundSize:t.backgroundSize}})}))}},te?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),te&&l.createElement(b.A,{gutter:10,style:{marginBottom:R?16:0}},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:t("Background color"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode},l.createElement(S.A.Item,{name:"backgroundColor",style:{marginBottom:T.formTableFieldBackgroundImageEnabled?L.formItemMarginBottomXS:L.formItemMarginBottomMD+4}},l.createElement(ye,{placeholder:t("Background color"),usedColors:e.usedColors})))),T.formTableFieldBackgroundImageEnabled&&l.createElement(h.A,{span:R?12:24},l.createElement("div",{style:{paddingBottom:R?4:0}},l.createElement(Pe,{form:o,label:t("Background image"),name:"backgroundImage",tooltipTitle:t("Background image"),placeholder:"Background image link/route"})),!R&&l.createElement(S.A.Item,{style:{marginBottom:"0"}},l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:t("Horizontal position"),placement:"bottom"},l.createElement(S.A.Item,{name:"backgroundPositionX",style:{marginBottom:L.formItemMarginBottomXS}},l.createElement(Ft.A,{placeholder:t("Horizontal position"),prefix:l.createElement(z.A,{icon:"BgPositionHorizontal"})})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:t("Vertical position"),placement:"bottom"},l.createElement(S.A.Item,{name:"backgroundPositionY",style:{marginBottom:L.formItemMarginBottomXS}},l.createElement(Ft.A,{placeholder:t("Vertical position"),prefix:l.createElement(z.A,{icon:"BgPositionVertical"})}))))),l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:t("Background image repeat"),placement:"top"},l.createElement(S.A.Item,{name:"backgroundRepeat",style:{marginBottom:L.formItemMarginBottomMD+4}},l.createElement(k.A,{placeholder:"Please choose",options:ie,getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:t("Background image size"),placement:"top"},l.createElement(S.A.Item,{name:"backgroundSize",style:{marginBottom:L.formItemMarginBottomMD+4}},l.createElement(k.A,{placeholder:"Please choose",options:se,getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")})))))))),T.formFieldBorderEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Borders"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{V((e=>!e)),O&&(t.borderWidth=null,t.borderColor="",t.borderStyle=""),r((e=>({...D.iV,[t.borderPosition]:{...e[t.borderPosition],width:t.borderWidth,color:t.borderColor,style:t.borderStyle}}))),a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{border:{all:{color:t.borderColor,style:t.borderStyle,width:t.borderWidth}}}})}))}},O?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),O&&l.createElement("div",{style:{paddingBottom:4}},l.createElement(Tt,{borders:n}))),T.formFieldBorderRadiusEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Border radius"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{W((e=>!e)),j?(t.borderRadiusAll=0,p(!0)):t.borderRadiusAll=5,a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{borderRadius:{all:t.borderRadiusAll}}})}))}},j?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),j&&l.createElement("div",{style:{paddingBottom:4}},l.createElement(Dt,{form:o,oneBorderRadiusValue:c,setOneBorderRadiusValue:p,elementSettings:e}))),T.formFieldBoxShadowEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Box shadow"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{Z((e=>!e)),q?(t.boxShadowInset=!1,t.boxShadowHOffset=0,t.boxShadowVOffset=0,t.boxShadowBlurRadius=0,t.boxShadowSpreadRadius=0,t.boxShadowColor=""):(t.boxShadowInset=!1,t.boxShadowHOffset=5,t.boxShadowVOffset=5,t.boxShadowBlurRadius=10,t.boxShadowSpreadRadius=-5,t.boxShadowColor="#000000"),a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{boxShadow:{blurRadius:t.boxShadowBlurRadius,color:t.boxShadowColor,hOffset:t.boxShadowHOffset,inset:t.boxShadowInset,spreadRadius:t.boxShadowSpreadRadius,vOffset:t.boxShadowVOffset}}})}))}},q?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),q&&l.createElement("div",{style:{paddingBottom:4}},l.createElement(eo,{boxShadow:s}))),T.formFieldExportAsPictureEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Export settings"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{re((e=>!e)),ne&&(t.exportAsPicture=!1,a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{exportAsPicture:!1}}))}))}},ne?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),ne&&l.createElement(Ko,{form:o,elementSettings:e})),T.formFieldVisibilityEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},t("Display control")),l.createElement(b.A,{gutter:20},l.createElement(h.A,{span:12},l.createElement("div",{style:{paddingBottom:4}},l.createElement(vo,{elementSettings:e,form:o}))))),T.formFieldAmpVisibilityEnabled&&e.ampShow&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},t("AMP visibility")),l.createElement(b.A,{gutter:20,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(Ro,null)))))))};var en=a(10206);const tn=({elementSettings:e})=>{const{__:t}=(0,y.s9)(),a=(0,Me.XW)(),[o]=S.A.useForm(),n=(0,Y.rD)(),r=(0,f.d4)(Ie.Fv),s=(0,f.d4)(Ie.yy),[d,c]=(0,l.useState)({});(0,l.useEffect)((()=>{e&&o.setFieldsValue(e)}),[o,e]);return l.createElement(S.A,{form:o,layout:"vertical",name:"selected_link_form",initialValues:{href:"https://",target:"",textStrong:!1,textItalic:!1,textStrikethrough:!1,textUnderline:!1,textReplacer:""},onValuesChange:t=>{a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:t})},autoComplete:"off",className:"element-controls"},r&&"bottom"!==s?l.createElement(zo,{form:o,elementSettings:e,showAddParagraph:!1}):l.createElement(l.Fragment,null,l.createElement(i.A,{trigger:["hover"],title:t("Hyperlink URL"),placement:"left"},l.createElement(S.A.Item,{name:"href",style:{marginBottom:24,paddingRight:10}},l.createElement(w.A,{allowClear:!0,placeholder:"href",prefix:l.createElement(Ht.A,null),onSelect:({target:e})=>{const{selectionStart:t,selectionEnd:a}=e;e&&c({target:e,selection:{start:t,end:a}})}}))),n.formLinkFieldInsertImageEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},t("Actions with the chosen text")),l.createElement(S.A.Item,null,l.createElement(g.Ay,{icon:l.createElement(en.A,null),onClick:()=>{return e="add_img",void a({operation:D.Ru.SANDBOX_ELEMENT_TEXT,action:e});var e}},t("Add inline image")))),l.createElement(jo,{form:o,elementSettings:e,showAddParagraph:!1,linkTarget:d})))},an=({elementSettings:e})=>{const{__:t}=(0,y.s9)(),[a]=S.A.useForm(),o=(0,Me.XW)(),n=(0,f.d4)(Ie.Ct),r=(0,f.d4)(Ie.CS),s=(0,f.d4)(Ie.Fv),d=(0,f.d4)(Ie.yy),m=s&&"bottom"!==d;(0,l.useEffect)((()=>{var t,l,o,n,r;e&&a.setFieldsValue({...e,height:null===(t=e.height)||void 0===t?void 0:t.value,heightDim:null===(l=e.height)||void 0===l?void 0:l.dim,mobileHeight:(r=null===(o=e.mobileHeight)||void 0===o?void 0:o.value,r&&"auto"!==r?r:0===r?"0":""),mobileHeightDim:null===(n=e.mobileHeight)||void 0===n?void 0:n.dim})}),[a,e]);return l.createElement(S.A,{form:a,layout:"vertical",name:"selected_vindent_form",initialValues:{height:"",heightDim:"",mobileHeight:"",mobileHeightDim:""},onValuesChange:t=>{const l=a.getFieldsValue(!0),n=Object.keys(t)[0];let r;switch(n){case"height":r={[n]:{value:t[n],dim:l.heightDim}};break;case"heightDim":r={height:{value:l.height,dim:t[n]}};break;case"mobileHeight":r={[n]:{classNamePrefix:"em-mob-height-",value:t[n],dim:l.mobileHeightDim}};break;case"mobileHeightDim":r={mobileHeight:{classNamePrefix:"em-mob-height-",value:l.mobileHeight,dim:t[n]}};break;default:r=t}o({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:r})},autoComplete:"off"},!m&&l.createElement(i.A,{title:t("To change the appearance of the element on the mobile device, edit the fields below. If the fields remain empty, the desktop styles will be applied to the mobile version."),placement:"bottom"},l.createElement(u.A,{className:"selected_form-mobile-props-title",message:t("Appearance on mobile devices"),type:"info"})),n===D.ND&&r.styles?l.createElement("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",style:{display:n===D.ND&&r.styles?"block":"none",marginBottom:10}},l.createElement("div",{className:"selected_form-mobile-props-wrapper"},l.createElement(b.A,{gutter:10,style:{marginBottom:20}},l.createElement(h.A,{span:12},l.createElement(ro,{form:a,name:"mobileHeight",elementSettings:e}))))):l.createElement("div",{id:"selected_element_form_desktop_props",style:{display:n===D.ND&&r.styles?"none":"block"}},l.createElement("div",{className:"selected_form-props-wrapper"},l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:14},l.createElement(S.A.Item,{name:"height"},l.createElement(Ft.A,{min:0,placeholder:t("Indent height"),prefix:l.createElement(Gl.A,null),addonAfter:"px"})))))))};var ln=a(50078),on=a(35850);const nn=({form:e,elementSettings:t})=>{const{__:a}=(0,y.s9)(),o=(0,Me.XW)(),[n,r]=(0,l.useState)(t.direction),d=a=>{const l=a.target.value,i={direction:""};l!==n?r(l):(r(""),e.setFieldsValue(i),o({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:i}))};return l.createElement(S.A.Item,{name:"direction"},l.createElement(gt.Ay.Group,null,l.createElement(s.A,{size:8},l.createElement(i.A,{placement:"top",title:a("Right to left")},l.createElement(gt.Ay.Button,{value:"rtl",onClick:d},l.createElement(ln.A,null))),l.createElement(i.A,{placement:"top",title:a("Left to right")},l.createElement(gt.Ay.Button,{value:"ltr",onClick:d},l.createElement(on.A,null))))))};nn.defaultProps={};const rn=nn,{useToken:sn}=n.A,dn=({form:e,elementSettings:t,mobilePaddingsExt:a,setMobilePaddingsExt:o})=>{const{__:n}=(0,y.s9)(),{token:r}=sn(),s=(0,Me.XW)();return l.createElement(l.Fragment,null,l.createElement(h.A,{span:10,style:{width:156,flex:"auto",maxWidth:"none"}},l.createElement("div",{className:"padding-collapsed",style:{display:a?"block":"none"}},l.createElement(i.A,{title:n("Horizontal padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"mobilePaddingLeftRight"},l.createElement(Ft.A,{min:0,placeholder:n("Horizontal"),prefix:l.createElement(z.A,{icon:"PaddingLeftRight"}),addonAfter:"px"})))),l.createElement("div",{className:"padding-extended",style:{display:a?"none":"block"}},l.createElement(i.A,{trigger:["hover"],title:n("Left padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"mobilePaddingLeft",style:{marginBottom:r.formItemMarginBottomXS}},l.createElement(Ft.A,{min:0,placeholder:n("Left"),prefix:l.createElement(z.A,{icon:"PaddingLeft"}),addonAfter:"px"}))),l.createElement(i.A,{trigger:["hover"],title:n("Right padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"mobilePaddingRight"},l.createElement(Ft.A,{min:0,placeholder:n("Right"),prefix:l.createElement(z.A,{icon:"PaddingRight"}),addonAfter:"px"}))))),l.createElement(h.A,{span:10,style:{width:156,flex:"auto",maxWidth:"none"}},l.createElement("div",{className:"padding-collapsed",style:{display:a?"block":"none"}},l.createElement(i.A,{title:n("Vertical padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"mobilePaddingTopBottom"},l.createElement(Ft.A,{min:0,placeholder:n("Vertical"),prefix:l.createElement(z.A,{icon:"PaddingTopBottom"}),addonAfter:"px"})))),l.createElement("div",{className:"padding-extended",style:{display:a?"none":"block"}},l.createElement(i.A,{trigger:["hover"],title:n("Top padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"mobilePaddingTop",style:{marginBottom:r.formItemMarginBottomXS}},l.createElement(Ft.A,{min:0,placeholder:n("Top"),prefix:l.createElement(z.A,{icon:"PaddingTop"}),addonAfter:"px"}))),l.createElement(i.A,{trigger:["hover"],title:n("Bottom padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"mobilePaddingBottom"},l.createElement(Ft.A,{min:0,placeholder:n("Bottom"),prefix:l.createElement(z.A,{icon:"PaddingBottom"}),addonAfter:"px"}))))),l.createElement(h.A,{span:4,style:{width:45,flex:"auto",maxWidth:"none"}},l.createElement(i.A,{title:n("Individual padding"),placement:"bottom"},l.createElement(g.Ay,{className:C()("selected-td-form__button",{"selected-td-form__button--active":!a}),onClick:()=>{o((e=>!e));const l=e.getFieldsValue(!0);a||(l.mobilePaddingLeftRight=l.mobilePaddingLeft,l.mobilePaddingTopBottom=l.mobilePaddingTop,l.mobilePaddingRight=l.mobilePaddingLeft,l.mobilePaddingBottom=l.mobilePaddingTop,s({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:{mobilePadding:{top:""!==l.mobilePaddingTop?l.mobilePaddingTop:null,bottom:""!==l.mobilePaddingTopBottom?l.mobilePaddingTopBottom:null,left:""!==l.mobilePaddingLeft?l.mobilePaddingLeft:null,right:""!==l.mobilePaddingRight?l.mobilePaddingRight:null,classNamePrefix:"em-mob-padding_"}}}))}},l.createElement(z.A,{icon:"PaddingSwitcher"})))))},mn=({form:e,elementSettings:t})=>{var a;const{__:o}=(0,y.s9)(),[n,r]=(0,l.useState)(null===(a=t.mobileDirection)||void 0===a?void 0:a.value),d=(0,Me.XW)(),m=a=>{const l=a.target.value,o={mobileDirection:{classNamePrefix:"em-mob-direction-",value:""}};l!==n?r(l):(r(""),e.setFieldsValue(o),d({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:o}))};return l.createElement(S.A.Item,{name:"mobileDirection"},l.createElement(gt.Ay.Group,null,l.createElement(s.A,{size:8},l.createElement(i.A,{placement:"top",title:o("Right to left")},l.createElement(gt.Ay.Button,{value:"rtl",onClick:m},l.createElement(ln.A,null))),l.createElement(i.A,{placement:"top",title:o("Left to right")},l.createElement(gt.Ay.Button,{value:"ltr",onClick:m},l.createElement(on.A,null))))))};mn.defaultProps={};const cn=mn,{Option:un}=k.A,pn=l.createElement(k.A,{className:"select-after",getPopupContainer:e=>e.parentNode},l.createElement(un,{value:"px"},"px"),l.createElement(un,{value:"%"},"%")),{useToken:gn}=n.A,bn=({elementSettings:e})=>{const{__:t}=(0,y.s9)(),a=(0,Me.XW)(),o=(0,f.wA)(),[n]=S.A.useForm(),[r,d]=(0,l.useState)(""),[c,p]=(0,l.useState)({}),[E,v]=(0,l.useState)({}),[A,_]=(0,l.useState)({}),[x,T]=(0,l.useState)({}),[R,N]=(0,l.useState)(!0),[L,P]=(0,l.useState)(!0),I=(0,f.d4)(Ie.Ct),M=(0,f.d4)(Ie.CS),O=(0,f.d4)(W.Hs),V=(0,Y.rD)(),[F,H]=(0,l.useState)(""===e.backgroundImage[0].value),{token:j}=gn(),G=(0,f.d4)(Ie.Fv),U=(0,f.d4)(Ie.yy),q=G&&"bottom"!==U,[Z,X]=(0,l.useState)(!1),[K,$]=(0,l.useState)(!1),[Q,J]=(0,l.useState)(!1),[ee,te]=(0,l.useState)(!1),[ae,le]=(0,l.useState)(!1),[oe,ne]=(0,l.useState)(!1),[re,ie]=(0,l.useState)(!1),[se,de]=(0,l.useState)(!1),[me,ce]=(0,l.useState)(!1),[ue,pe]=(0,l.useState)(!1),[ge,be]=(0,l.useState)(!1),[he,Ee]=(0,l.useState)(!1),[ve,Ae]=(0,l.useState)(!1),[_e,Ce]=(0,l.useState)(!1),Se=O.hasOwnProperty("type")?D.IE:D.Tm,we=[{label:t("Not defined"),value:"none"},{label:t("Do not repeat background (no-repeat)"),value:"no-repeat"},{label:t("Repeat background (repeat)"),value:"repeat"},{label:t("Repeat background horizontally (repeat-x)"),value:"repeat-x"},{label:t("Repeat background vertically (repeat-y)"),value:"repeat-y"}],ke=[{label:t("Not defined"),value:""},{label:t("Contain"),value:"contain"},{label:t("Cover"),value:"cover"}];(0,l.useEffect)((()=>{if(e){var t,a,l,o,r,i,s,d,m,c,u,g,b,h,E,f,y,A,C,S,w,k,x,B,R,L,I,M,O,V,F,D,j,z,W,G,U,q,Z,K,Y,Q,ee,ae,oe,re,se,me,ue,ge,he,fe,ve;const ye=e.border,_e=e.boxShadow,Se=e.mobileBorder,we=e.mobileBoxShadow;p(ye),_(_e),v(Se),T(we);const ke=Object.keys(ye).find((e=>{var t,a,l;return(null===(t=ye[e])||void 0===t?void 0:t.width)||(null===(a=ye[e])||void 0===a?void 0:a.style)||(null===(l=ye[e])||void 0===l?void 0:l.color)})),xe=Object.keys(Se).find((e=>{var t,a,l;return(null===(t=Se[e])||void 0===t?void 0:t.width)||(null===(a=Se[e])||void 0===a?void 0:a.style)||(null===(l=Se[e])||void 0===l?void 0:l.color)}));n.setFieldsValue({...e,width:null===(t=e.width)||void 0===t?void 0:t.value,widthDim:null===(a=e.width)||void 0===a?void 0:a.dim,height:null===(l=e.height)||void 0===l?void 0:l.value,heightDim:null===(o=e.height)||void 0===o?void 0:o.dim,backgroundImage:e.backgroundImage[0].value,show:e.show?e.show:"all",isContrastBlock:e.isContrastBlock,borderPosition:ke||"all",borderWidth:(null===(r=ye[ke])||void 0===r?void 0:r.width)||"",borderColor:(null===(i=ye[ke])||void 0===i?void 0:i.color)||"",borderStyle:(null===(s=ye[ke])||void 0===s?void 0:s.style)||"solid",paddingTop:ga(null===(d=e.padding)||void 0===d?void 0:d.all)||ga(null===(m=e.padding)||void 0===m?void 0:m.top),paddingLeft:ga(null===(c=e.padding)||void 0===c?void 0:c.all)||ga(null===(u=e.padding)||void 0===u?void 0:u.left),paddingRight:ga(null===(g=e.padding)||void 0===g?void 0:g.all)||ga(null===(b=e.padding)||void 0===b?void 0:b.right),paddingBottom:ga(null===(h=e.padding)||void 0===h?void 0:h.all)||ga(null===(E=e.padding)||void 0===E?void 0:E.bottom),paddingLeftRight:ga(null===(f=e.padding)||void 0===f?void 0:f.left)||ga(null===(y=e.padding)||void 0===y?void 0:y.right),paddingTopBottom:ga(null===(A=e.padding)||void 0===A?void 0:A.top)||ga(null===(C=e.padding)||void 0===C?void 0:C.bottom),borderRadiusAll:ga(e.borderRadius.all),borderRadiusTopLeft:ga(e.borderRadius.topLeft),borderRadiusBottomLeft:ga(e.borderRadius.bottomLeft),borderRadiusTopRight:ga(e.borderRadius.topRight),borderRadiusBottomRight:ga(e.borderRadius.bottomRight),boxShadowInset:ga(null===(S=e.boxShadow)||void 0===S?void 0:S.inset)||!1,boxShadowHOffset:ga(null===(w=e.boxShadow)||void 0===w?void 0:w.hOffset),boxShadowVOffset:ga(null===(k=e.boxShadow)||void 0===k?void 0:k.vOffset),boxShadowBlurRadius:ga(null===(x=e.boxShadow)||void 0===x?void 0:x.blurRadius),boxShadowSpreadRadius:ga(null===(B=e.boxShadow)||void 0===B?void 0:B.spreadRadius),boxShadowColor:ga(null===(R=e.boxShadow)||void 0===R?void 0:R.color),mobileWidth:ba(null===(L=e.mobileWidth)||void 0===L?void 0:L.value),mobileWidthDim:null===(I=e.mobileWidth)||void 0===I?void 0:I.dim,mobileHeight:ba(null===(M=e.mobileHeight)||void 0===M?void 0:M.value),mobileHeightDim:null===(O=e.mobileHeight)||void 0===O?void 0:O.dim,mobileBorderPosition:xe||"all",mobileBorderWidth:null!==(null===(V=Se[xe])||void 0===V?void 0:V.width)?null===(F=Se[xe])||void 0===F?void 0:F.width:"",mobileBorderColor:(null===(D=Se[xe])||void 0===D?void 0:D.color)||"",mobileBorderStyle:(null===(j=Se[xe])||void 0===j?void 0:j.style)||"",mobileBorderRadiusAll:ga(e.mobileBorderRadius.all),mobileRadiusTopLeft:ga(null!==e.mobileBorderRadius.topLeft?e.mobileBorderRadius.topLeft:e.mobileBorderRadius.all),mobileRadiusBottomLeft:ga(null!==e.mobileBorderRadius.bottomLeft?e.mobileBorderRadius.bottomLeft:e.mobileBorderRadius.all),mobileRadiusTopRight:ga(null!==e.mobileBorderRadius.topRight?e.mobileBorderRadius.topRight:e.mobileBorderRadius.all),mobileRadiusBottomRight:ga(null!==e.mobileBorderRadius.bottomRight?e.mobileBorderRadius.bottomRight:e.mobileBorderRadius.all),mobileBoxShadowInset:ga(null===(z=e.mobileBoxShadow)||void 0===z?void 0:z.inset)||!1,mobileBoxShadowHOffset:ga(null===(W=e.mobileBoxShadow)||void 0===W?void 0:W.hOffset),mobileBoxShadowVOffset:ga(null===(G=e.mobileBoxShadow)||void 0===G?void 0:G.vOffset),mobileBoxShadowBlurRadius:ga(null===(U=e.mobileBoxShadow)||void 0===U?void 0:U.blurRadius),mobileBoxShadowSpreadRadius:ga(null===(q=e.mobileBoxShadow)||void 0===q?void 0:q.spreadRadius),mobileBoxShadowColor:ga(null===(Z=e.mobileBoxShadow)||void 0===Z?void 0:Z.color),mobileAlign:ga(null===(K=e.mobileAlign)||void 0===K?void 0:K.value),mobileVerticalAlign:ga(null===(Y=e.mobileVerticalAlign)||void 0===Y?void 0:Y.value),mobileBackgroundColor:ga("none"!==(null===(Q=e.mobileBackgroundColor)||void 0===Q?void 0:Q.value)?null===(ee=e.mobileBackgroundColor)||void 0===ee?void 0:ee.value:""),mobileBackgroundImage:"none"!==e.mobileBackgroundImage[0].value?e.mobileBackgroundImage[0].value:"",mobileBackgroundPositionX:ga(null===(ae=e.mobileBackgroundPositionX)||void 0===ae?void 0:ae.value),mobileBackgroundPositionY:ga(null===(oe=e.mobileBackgroundPositionY)||void 0===oe?void 0:oe.value),mobileBackgroundRepeat:null!==(re=e.mobileBackgroundRepeat)&&void 0!==re&&re.value?null===(se=e.mobileBackgroundRepeat)||void 0===se?void 0:se.value:"none",mobilePaddingTop:ga(e.mobilePadding.all)||ga(e.mobilePadding.top),mobilePaddingLeft:ga(e.mobilePadding.all)||ga(e.mobilePadding.left),mobilePaddingRight:ga(e.mobilePadding.all)||ga(e.mobilePadding.right),mobilePaddingBottom:ga(e.mobilePadding.all)||ga(e.mobilePadding.bottom),mobilePaddingTopBottom:ga(e.mobilePadding.top)||ga(e.mobilePadding.bottom),mobilePaddingLeftRight:ga(e.mobilePadding.left)||ga(e.mobilePadding.right),exportAsPicture:null===e||void 0===e?void 0:e.exportAsPicture}),!ga(e.borderRadius.all)&&(ga(e.borderRadius.topLeft)||ga(e.borderRadius.bottomLeft)||ga(e.borderRadius.topRight)||ga(e.borderRadius.bottomRight))?N(!1):N(!0),ga(e.mobileBorderRadius.topLeft)||ga(e.mobileBorderRadius.bottomLeft)||ga(e.mobileBorderRadius.topRight)||ga(e.mobileBorderRadius.bottomRight)?P(!1):P(!0),H(""===e.backgroundImage[0].value),ga(e.padding.all)||!(ga(e.padding.top)||ga(e.padding.right)||ga(e.padding.bottom)||ga(e.padding.left))||e.padding.top===e.padding.bottom&&e.padding.right===e.padding.left?X(!0):X(!1),ga(e.mobilePadding.all)||!(ga(e.mobilePadding.top)||ga(e.mobilePadding.right)||ga(e.mobilePadding.bottom)||ga(e.mobilePadding.left))||e.mobilePadding.top===e.mobilePadding.bottom&&e.mobilePadding.right===e.mobilePadding.left?$(!0):$(!1),J(!(null===(me=ye[ke])||void 0===me||!me.width)||!(null===(ue=ye[ke])||void 0===ue||!ue.style)||!(null===(ge=ye[ke])||void 0===ge||!ge.color)),te(!(null===(he=Se[xe])||void 0===he||!he.width)||!(null===(fe=Se[xe])||void 0===fe||!fe.style)||!(null===(ve=Se[xe])||void 0===ve||!ve.color)),le(!!e.borderRadius.all||!!e.borderRadius.topLeft||!!e.borderRadius.bottomLeft||!!e.borderRadius.topRight||!!e.borderRadius.bottomRight),ne(!!e.mobileBorderRadius.all||!!e.mobileBorderRadius.topLeft||!!e.mobileBorderRadius.bottomLeft||!!e.mobileBorderRadius.topRight||!!e.mobileBorderRadius.bottomRight),ie(!!e.boxShadow),de(!!e.mobileBoxShadow.blurRadius||!!e.mobileBoxShadow.color||!!e.mobileBoxShadow.hOffset||!!e.mobileBoxShadow.inset||!!e.mobileBoxShadow.spreadRadius||!!e.mobileBoxShadow.vOffset),ce(!!e.width.value&&"column"!==e.type||!!e.height.value),pe(!!e.mobileWidth.value||!!e.mobileHeight.value),be(!!e.backgroundColor||!!e.backgroundImage[0].value||!!e.backgroundPositionY||!!e.backgroundPositionX||"repeat"!==e.backgroundRepeat||!e.backgroundRepeat,!!e.backgroundSize),Ee(!!e.mobileBackgroundColor.value),Ae(!!e.exportAsPicture||!!e.isContrastBlock),Ce(!!e.mobilePadding.all||0===e.mobilePadding.all||!!e.mobilePadding.top||0===e.mobilePadding.top||!!e.mobilePadding.bottom||0===e.mobilePadding.bottom||!!e.mobilePadding.left||0===e.mobilePadding.left||!!e.mobilePadding.right||0===e.mobilePadding.right)}}),[n,e]);const xe=(0,l.useCallback)((e=>{o(Se===D.Tm?(0,W.A9)(e):(0,Ke.A9)(e))}),[o,Se]);return l.createElement(S.A,{form:n,layout:"vertical",name:"selected_td_form",initialValues:{backgroundColor:"",backgroundImage:"",backgroundPositionX:"",backgroundPositionY:"",backgroundRepeat:"",backgroundSize:"",exportAsPicture:!1,width:"",height:"",widthDim:"",heightDim:"",align:"",valign:"",border:"",show:"all",borderPosition:"",borderColor:"",borderWidth:"",borderStyle:"",paddingTop:"",paddingLeft:"",paddingRight:"",paddingBottom:"",borderRadiusAll:"",borderRadiusTopLeft:"",borderRadiusBottomLeft:"",borderRadiusTopRight:"",borderRadiusBottomRight:"",direction:"",boxShadowInset:"",boxShadowHOffset:"",boxShadowVOffset:"",boxShadowBlurRadius:"",boxShadowSpreadRadius:"",boxShadowColor:"",mobileWidth:"",mobileWidthDim:"",mobileHeight:"",mobileHeightDim:"",mobileBorder:"",mobileBorderPosition:"",mobileBorderColor:"",mobileBorderWidth:"",mobileBorderStyle:"",mobileBoxShadow:"",mobileAlign:"",mobileVerticalAlign:"",mobileBackgroundColor:"",mobileBackgroundImage:"",mobilePaddingTop:"",mobilePaddingLeft:"",mobilePaddingRight:"",mobilePaddingBottom:"",textStrong:!1,textItalic:!1,textStrikethrough:!1,textUnderline:!1},onValuesChange:t=>{const l=n.getFieldsValue(!0),o=Object.keys(t)[0];let r;switch(d("%"===n.getFieldsValue(!0).widthDim?100:""),o){case"exportAsPicture":r={exportAsPicture:l.exportAsPicture};break;case"boxShadowInset":case"boxShadowHOffset":case"boxShadowVOffset":case"boxShadowBlurRadius":case"boxShadowSpreadRadius":case"boxShadowColor":r={boxShadow:{hOffset:l.boxShadowHOffset,vOffset:l.boxShadowVOffset,blurRadius:l.boxShadowBlurRadius,spreadRadius:l.boxShadowSpreadRadius,color:l.boxShadowColor,inset:l.boxShadowInset}};break;case"borderStyle":r={border:{[l.borderPosition]:{...c[l.borderPosition],style:t[o]}}},"all"===l.borderPosition?p((e=>({...D.iV,[l.borderPosition]:{...e[l.borderPosition],style:t[o]}}))):p((e=>({...e,[l.borderPosition]:{...e[l.borderPosition],style:t[o]}})));break;case"borderColor":r={border:{[l.borderPosition]:{...c[l.borderPosition],color:t[o]}}},"all"===l.borderPosition?p((e=>({...D.iV,[l.borderPosition]:{...e[l.borderPosition],color:t[o]}}))):p((e=>({...e,[l.borderPosition]:{...e[l.borderPosition],color:t[o]}})));break;case"borderWidth":r={border:{[l.borderPosition]:{...c[l.borderPosition],width:t[o]}}},"all"===l.borderPosition?p((e=>({...D.iV,[l.borderPosition]:{...e[l.borderPosition],width:t[o]}}))):p((e=>({...e,[l.borderPosition]:{...e[l.borderPosition],width:t[o]}})));break;case"borderPosition":n.setFieldsValue({borderWidth:c[t[o]].width||"",borderColor:c[t[o]].color||"",borderStyle:c[t[o]].style||""});break;case"width":r={[o]:{value:t[o],dim:l.widthDim}};break;case"height":r={[o]:{value:t[o],dim:l.heightDim}};break;case"widthDim":r={width:{value:l.width,dim:t[o]}};break;case"heightDim":r={height:{value:l.height,dim:t[o]}};break;case"backgroundImage":H(""===t[o]),r={[o]:[{...e.backgroundImage[0],value:t[o]}],backgroundSize:"cover"};break;case"paddingTop":case"paddingLeft":case"paddingRight":case"paddingBottom":r={padding:{left:l.paddingLeft,right:l.paddingRight,top:l.paddingTop,bottom:l.paddingBottom,[ma[o]]:+t[o]}};break;case"paddingTopBottom":r={padding:{left:l.paddingLeft,right:l.paddingRight,top:+t[o],bottom:+t[o]}},l.paddingTop=l.paddingBottom=+t[o];break;case"paddingLeftRight":r={padding:{top:l.paddingTop,bottom:l.paddingBottom,left:+t[o],right:+t[o]}},l.paddingLeft=l.paddingRight=+t[o];break;case"borderRadiusAll":r={borderRadius:{[D.wF[o]]:+t[o]}};break;case"borderRadiusTopLeft":case"borderRadiusBottomLeft":case"borderRadiusTopRight":case"borderRadiusBottomRight":r={borderRadius:{topLeft:l.borderRadiusTopLeft,bottomLeft:l.borderRadiusBottomLeft,topRight:l.borderRadiusTopRight,bottomRight:l.borderRadiusBottomRight,[D.wF[o]]:+t[o]}};break;case"mobileWidth":r={[o]:{classNamePrefix:"em-mob-width-",value:t[o],dim:l.mobileWidthDim}};break;case"mobileWidthDim":r={mobileWidth:{classNamePrefix:"em-mob-width-",value:l.mobileWidth,dim:t[o]}};break;case"mobileHeight":r={[o]:{classNamePrefix:"em-mob-height-",value:t[o],dim:l.mobileHeightDim}};break;case"mobileHeightDim":r={mobileHeight:{classNamePrefix:"em-mob-height-",value:l.mobileHeight,dim:t[o]}};break;case"mobileBorderStyle":r={mobileBorder:{[l.mobileBorderPosition]:{...E[l.mobileBorderPosition],style:t[o],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}},"all"===l.mobileBorderPosition?v((e=>({...D.iV,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],style:t[o],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}))):v((e=>({...e,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],style:t[o],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}})));break;case"mobileBorderColor":r={mobileBorder:{[l.mobileBorderPosition]:{...E[l.mobileBorderPosition],color:t[o],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}},"all"===l.mobileBorderPosition?v((e=>({...D.iV,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],color:t[o],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}))):v((e=>({...e,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],color:t[o],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}})));break;case"mobileBorderWidth":r={mobileBorder:{[l.mobileBorderPosition]:{...E[l.mobileBorderPosition],width:t[o],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}},"all"===l.mobileBorderPosition?v((e=>({...D.iV,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],width:t[o],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}))):v((e=>({...e,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],width:t[o],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}})));break;case"mobileBorderPosition":n.setFieldsValue({mobileBorderWidth:E[t[o]].width||"",mobileBorderColor:E[t[o]].color||"",mobileBorderStyle:E[t[o]].style||""});break;case"mobileBorderRadiusAll":case"mobileRadiusTopLeft":case"mobileRadiusBottomLeft":case"mobileRadiusTopRight":case"mobileRadiusBottomRight":r={mobileBorderRadius:{[ua[o]]:t[o],classNamePrefix:"em-mob-border_radius_"+ua[o]+"-"}};break;case"mobileBoxShadowInset":case"mobileBoxShadowHOffset":case"mobileBoxShadowVOffset":case"mobileBoxShadowBlurRadius":case"mobileBoxShadowSpreadRadius":case"mobileBoxShadowColor":r={mobileBoxShadow:{hOffset:l.mobileBoxShadowHOffset,vOffset:l.mobileBoxShadowVOffset,blurRadius:l.mobileBoxShadowBlurRadius,spreadRadius:l.mobileBoxShadowSpreadRadius,color:l.mobileBoxShadowColor,inset:l.mobileBoxShadowInset,classNamePrefix:"em-mob-box_shadow-"}};break;case"mobileAlign":r={[o]:{classNamePrefix:"em-mob-text_align-",value:t[o]}};break;case"mobileVerticalAlign":r={[o]:{classNamePrefix:"em-mob-vertical_align-",value:t[o]}};break;case"mobileBackgroundColor":r={[o]:{classNamePrefix:"em-mob-background_color-",value:t[o]}};break;case"mobileBackgroundImage":r={[o]:[{...e.mobileBackgroundImage[0],classNamePrefix:"em-mob-background_image-",value:t[o]}]};break;case"mobileBackgroundPositionX":r={[o]:{classNamePrefix:"em-mob-background_position_x-",value:t[o]}};break;case"mobileBackgroundPositionY":r={[o]:{classNamePrefix:"em-mob-background_position_y-",value:t[o]}};break;case"mobileBackgroundRepeat":r={[o]:{classNamePrefix:"em-mob-background_repeat-",value:t[o]}};break;case"mobilePaddingTop":case"mobilePaddingLeft":case"mobilePaddingRight":case"mobilePaddingBottom":r={mobilePadding:{all:null,top:""!==l.mobilePaddingTop?l.mobilePaddingTop:null,right:""!==l.mobilePaddingRight?l.mobilePaddingRight:null,bottom:""!==l.mobilePaddingBottom?l.mobilePaddingBottom:null,left:""!==l.mobilePaddingLeft?l.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;case"mobilePaddingTopBottom":l.mobilePaddingTop=l.mobilePaddingBottom=t[o],r={mobilePadding:{all:null,top:""!==l.mobilePaddingTop?l.mobilePaddingTop:null,right:""!==l.mobilePaddingRight?l.mobilePaddingRight:null,bottom:""!==l.mobilePaddingBottom?l.mobilePaddingBottom:null,left:""!==l.mobilePaddingLeft?l.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;case"mobilePaddingLeftRight":l.mobilePaddingLeft=l.mobilePaddingRight=t[o],r={mobilePadding:{all:null,top:""!==l.mobilePaddingTop?l.mobilePaddingTop:null,right:""!==l.mobilePaddingRight?l.mobilePaddingRight:null,bottom:""!==l.mobilePaddingBottom?l.mobilePaddingBottom:null,left:""!==l.mobilePaddingLeft?l.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;default:r=t}"borderPosition"!==o&&(a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:r}),o.includes("mobileRadius")||xe({...e,...r,activateSection:null,changeKey:o}))},autoComplete:"off",className:"element-controls"},!q&&l.createElement(i.A,{title:t("To change the appearance of the element on the mobile device, edit the fields below. If the fields remain empty, the desktop styles will be applied to the mobile version."),placement:"bottom"},l.createElement(u.A,{className:"selected_form-mobile-props-title",message:t("Appearance on mobile devices"),type:"info"})),I===D.ND&&M.styles?l.createElement("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",style:{display:I===D.ND&&M.styles?"block":"none"}},l.createElement("div",{className:"selected_form-mobile-props-wrapper"},l.createElement(b.A,{gutter:20},l.createElement(h.A,{span:12},l.createElement(go,{form:n,elementSettings:e,imgParent:!0})),V.formCellFieldVerticalAlignEnabled&&"group"!==e.type&&("structure"!==e.type||"structure"===e.type&&1===e.floatBlocks.items.length)&&l.createElement(h.A,{span:12,style:{textAlign:"right"}},l.createElement(bo,{form:n,elementSettings:e}))),l.createElement(m.A,{className:"selected-td-form__divider"}),V.formCellFieldPaddingsEnabled&&l.createElement(l.Fragment,null,l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Padding"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{Ce((e=>!e)),_e&&(t.mobilePaddingLeftRight="",t.mobilePaddingLeft="",t.mobilePaddingRight="",t.mobilePaddingTopBottom="",t.mobilePaddingTop="",t.mobilePaddingBottom="",a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobilePadding:{all:null,top:null,right:null,bottom:null,left:null,classNamePrefix:"em-mob-padding_"}}}))}))}},_e?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),_e&&l.createElement(b.A,{gutter:10,style:{paddingBottom:4}},l.createElement(l.Fragment,null,l.createElement(dn,{form:n,elementSettings:e,mobilePaddingsExt:K,setMobilePaddingsExt:$}))),l.createElement(m.A,{className:"selected-td-form__divider"})),"group"!==e.type&&l.createElement(l.Fragment,null,l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Size"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{pe((e=>!e)),ue&&(t.mobileWidth="",t.mobileHeight="",a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileWidth:{value:null,dim:"px",classNamePrefix:"em-mob-width-"},mobileHeight:{value:null,dim:"px",classNamePrefix:"em-mob-height-"}}}))}))}},ue?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),ue&&l.createElement(b.A,{gutter:10,style:{paddingBottom:9}},"structure"!==e.type&&l.createElement(h.A,{span:12},l.createElement("div",{style:{marginBottom:15}},l.createElement(oo,{form:n,name:"mobileWidth",elementSettings:e}))),l.createElement(h.A,{span:12},l.createElement("div",{style:{marginBottom:15}},l.createElement(ro,{form:n,name:"mobileHeight",elementSettings:e})))),l.createElement(m.A,{className:"selected-td-form__divider"})),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Background"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{Ee((e=>!e)),t.mobileBackgroundColor=he?"":"#E5E5E5",a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBackgroundColor:{classNamePrefix:"em-mob-background_color-",value:t.mobileBackgroundColor}}})}))}},he?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),he&&l.createElement(l.Fragment,null,l.createElement("div",{style:{marginBottom:(V.formCellFieldBackgroundImageEnabled,j.formItemMarginBottomMD+4)}},l.createElement(Zo,{form:n,elementSettings:e,label:t("Background color")}))),!1,V.formFieldBorderEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Borders"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{te((e=>!e)),ee&&(t.mobileBorderWidth=null,t.mobileBorderColor="",t.mobileBorderStyle=""),v((e=>({...D.iV,[t.mobileBorderPosition]:{...e[t.mobileBorderPosition],width:t.mobileBorderWidth,color:t.mobileBorderColor,style:t.mobileBorderStyle}}))),a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorder:{all:{color:t.mobileBorderColor,style:t.mobileBorderStyle,width:t.mobileBorderWidth,classNamePrefix:"em-mob-border_"+t.mobileBorderPosition+"-"}}}})}))}},ee?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),ee&&l.createElement("div",{style:{marginBottom:4}},l.createElement(mo,{mobileBorders:E}))),V.formFieldBorderRadiusEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Border radius"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{ne((e=>!e)),oe?(t.mobileBorderRadiusAll=null,P(!0)):t.mobileBorderRadiusAll=5,a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorderRadius:{all:t.mobileBorderRadiusAll,classNamePrefix:"em-mob-border_radius_all-"}}})}))}},oe?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),oe&&l.createElement("div",{style:{marginBottom:4}},l.createElement(co,{form:n,oneMobileBorderRadiusValue:L,setOneMobileBorderRadiusValue:P,elementSettings:e}))),V.formFieldBoxShadowEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Box shadow"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{de((e=>!e)),se?(t.mobileBoxShadowInset=!1,t.mobileBoxShadowHOffset=null,t.mobileBoxShadowVOffset=null,t.mobileBoxShadowBlurRadius=null,t.mobileBoxShadowSpreadRadius=null,t.mobileBoxShadowColor=""):(t.mobileBoxShadowInset=!1,t.mobileBoxShadowHOffset=5,t.mobileBoxShadowVOffset=5,t.mobileBoxShadowBlurRadius=10,t.mobileBoxShadowSpreadRadius=-5,t.mobileBoxShadowColor="#000000"),a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBoxShadow:{blurRadius:t.mobileBoxShadowBlurRadius,color:t.mobileBoxShadowColor,hOffset:t.mobileBoxShadowHOffset,inset:t.mobileBoxShadowInset,spreadRadius:t.mobileBoxShadowSpreadRadius,vOffset:t.mobileBoxShadowVOffset,classNamePrefix:"em-mob-box_shadow-"}}})}))}},se?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),se&&l.createElement("div",{style:{marginBottom:4}},l.createElement(uo,{mobileBoxShadow:x,form:n,elementSettings:e}))),V.formFieldVisibilityEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},t("group"!==e.type?"Display control & Direction":"Display control")),l.createElement(b.A,{gutter:20,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(vo,{elementSettings:e,form:n})),"group"!==e.type&&l.createElement(h.A,{span:12,style:{textAlign:"group"!==e.type?"right":"left"}},l.createElement(cn,{elementSettings:e,form:n})))),V.formFieldAmpVisibilityEnabled&&e.ampShow&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},t("AMP visibility")),l.createElement(b.A,{gutter:20,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(Ro,null)))))):l.createElement("div",{id:"selected_element_form_desktop_props"},l.createElement("div",{className:"selected_form-props-wrapper"},l.createElement(b.A,{gutter:10,style:{paddingBottom:4}},l.createElement(h.A,{span:12},l.createElement(vt,{form:n,elementSettings:e})),V.formCellFieldVerticalAlignEnabled&&"group"!==e.type&&("structure"!==e.type||"structure"===e.type&&1===e.floatBlocks.items.length)&&l.createElement(h.A,{span:12,style:{textAlign:"right"}},l.createElement(Ql,{form:n,elementSettings:e}))),l.createElement(m.A,{className:"selected-td-form__divider"}),V.formCellFieldPaddingsEnabled&&l.createElement(l.Fragment,null,l.createElement("div",{className:"form-group-title"},t("Padding")),l.createElement(b.A,{gutter:10,style:{paddingBottom:4}},l.createElement(l.Fragment,null,"group"!==e.type&&"column"!==e.type&&l.createElement(h.A,{span:10,style:{width:156,flex:"auto",maxWidth:"44%"}},l.createElement("div",{className:"padding-collapsed",style:{display:Z?"block":"none"}},l.createElement(i.A,{title:t("Horizontal padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"paddingLeftRight"},l.createElement(Ft.A,{min:0,placeholder:t("Horizontal"),prefix:l.createElement(z.A,{icon:"PaddingLeftRight"}),addonAfter:"px"})))),l.createElement("div",{className:"padding-extended",style:{display:Z?"none":"block"}},l.createElement(i.A,{trigger:["hover"],title:t("Left padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"paddingLeft",style:{marginBottom:j.formItemMarginBottomXS}},l.createElement(Ft.A,{min:0,placeholder:t("Left"),prefix:l.createElement(z.A,{icon:"PaddingLeft"}),addonAfter:"px"}))),l.createElement(i.A,{trigger:["hover"],title:t("Right padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"paddingRight"},l.createElement(Ft.A,{min:0,placeholder:t("Right"),prefix:l.createElement(z.A,{icon:"PaddingRight"}),addonAfter:"px"}))))),l.createElement(h.A,{span:10,style:{width:"group"!==e.type&&"column"!==e.type?156:45,flex:"auto",maxWidth:"44%"}},l.createElement("div",{className:"padding-collapsed",style:{display:Z?"block":"none"}},l.createElement(i.A,{title:t("Vertical padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"paddingTopBottom"},l.createElement(Ft.A,{min:0,placeholder:t("Vertical"),prefix:l.createElement(z.A,{icon:"PaddingTopBottom"}),addonAfter:"px"})))),l.createElement("div",{className:"padding-extended",style:{display:Z?"none":"block"}},l.createElement(i.A,{trigger:["hover"],title:t("Top padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"paddingTop",style:{marginBottom:j.formItemMarginBottomXS}},l.createElement(Ft.A,{min:0,placeholder:t("Top"),prefix:l.createElement(z.A,{icon:"PaddingTop"}),addonAfter:"px"}))),l.createElement(i.A,{trigger:["hover"],title:t("Bottom padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"paddingBottom"},l.createElement(Ft.A,{min:0,placeholder:t("Bottom"),prefix:l.createElement(z.A,{icon:"PaddingBottom"}),addonAfter:"px"}))))),l.createElement(h.A,{span:4,style:{width:45,flex:"auto",maxWidth:"12%"}},l.createElement(i.A,{title:t("Individual padding"),placement:"bottom"},l.createElement(g.Ay,{className:C()("selected-td-form__button",{"selected-td-form__button--active":!Z}),onClick:()=>{X((e=>!e));const t=n.getFieldsValue(!0);Z||(t.paddingLeftRight=t.paddingLeft,t.paddingTopBottom=t.paddingTop,t.paddingRight=t.paddingLeft,t.paddingBottom=t.paddingTop,a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{padding:{top:t.paddingTopBottom,bottom:t.paddingTopBottom,left:t.paddingLeftRight,right:t.paddingLeftRight}}}))}},l.createElement(z.A,{icon:"PaddingSwitcher"})))))),l.createElement(m.A,{className:"selected-td-form__divider"})),"group"!==e.type&&l.createElement(l.Fragment,null,l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Size"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{ce((e=>!e)),me&&(t.width="",t.height="",a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{width:{value:null,dim:"px"},height:{value:null,dim:"px"}}}))}))}},me?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),me&&l.createElement(b.A,{gutter:10,style:{paddingBottom:4}},"structure"!==e.type&&"column"!==e.type&&l.createElement(h.A,{span:12},l.createElement(i.A,{title:t("Width"),placement:"bottom"},l.createElement(S.A.Item,{name:"width",style:{marginBottom:j.formItemMarginBottomXS}},l.createElement(Ft.A,{min:0,max:r,placeholder:t("Width"),prefix:l.createElement(fe.A,null),addonAfter:l.createElement(S.A.Item,{name:"widthDim",noStyle:!0},pn)})))),l.createElement(h.A,{span:12},l.createElement(i.A,{title:t("Height"),placement:"bottom"},l.createElement(S.A.Item,{name:"height"},l.createElement(Ft.A,{min:0,placeholder:t("Height"),prefix:l.createElement(Gl.A,null),addonAfter:"px"}))))),l.createElement(m.A,{className:"selected-td-form__divider"})),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Background"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{be((e=>!e)),ge?(t.backgroundColor="",t.backgroundImage="",t.backgroundPositionX="",t.backgroundPositionY="",t.backgroundRepeat="none",t.backgroundSize="",H(!0)):(t.backgroundColor="#E5E5E5",t.backgroundSize="",t.backgroundRepeat="none"),a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{backgroundColor:t.backgroundColor,backgroundImage:[{type:"url",value:t.backgroundImage}],backgroundPositionX:t.backgroundPositionX,backgroundPositionY:t.backgroundPositionY,backgroundRepeat:t.backgroundRepeat,backgroundSize:t.backgroundSize}})}))}},ge?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),ge&&l.createElement(b.A,{gutter:10,style:{marginBottom:F?16:0}},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:t("Background color"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode},l.createElement(S.A.Item,{name:"backgroundColor",style:{marginBottom:V.formCellFieldBackgroundImageEnabled?j.formItemMarginBottomXS:j.formItemMarginBottomMD+4}},l.createElement(ye,{placeholder:t("Background color"),usedColors:e.usedColors})))),V.formCellFieldBackgroundImageEnabled&&l.createElement(h.A,{span:F?12:24},l.createElement(Pe,{form:n,label:t("Background image"),name:"backgroundImage",tooltipTitle:t("Background image"),placeholder:"Background image link/route"}),!F&&l.createElement(S.A.Item,{style:{marginBottom:"0"}},l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:t("Horizontal position"),placement:"bottom"},l.createElement(S.A.Item,{name:"backgroundPositionX",style:{marginBottom:j.formItemMarginBottomXS}},l.createElement(w.A,{placeholder:t("Horizontal position"),prefix:l.createElement(z.A,{icon:"BgPositionHorizontal"})})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:t("Vertical position"),placement:"bottom"},l.createElement(S.A.Item,{name:"backgroundPositionY",style:{marginBottom:j.formItemMarginBottomXS}},l.createElement(w.A,{placeholder:t("Vertical position"),prefix:l.createElement(z.A,{icon:"BgPositionVertical"})}))))),l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:t("Background image repeat"),placement:"top"},l.createElement(S.A.Item,{name:"backgroundRepeat",style:{marginBottom:j.formItemMarginBottomMD+4}},l.createElement(k.A,{placeholder:t("Please choose"),options:we,getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:t("Background image size"),placement:"top"},l.createElement(S.A.Item,{name:"backgroundSize",style:{marginBottom:j.formItemMarginBottomMD+4}},l.createElement(k.A,{placeholder:t("Please choose"),options:ke,getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")})))))))),V.formFieldBorderEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Borders"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{J((e=>!e)),Q&&(t.borderWidth=null,t.borderColor="",t.borderStyle=""),p((e=>({...D.iV,[t.borderPosition]:{...e[t.borderPosition],width:t.borderWidth,color:t.borderColor,style:t.borderStyle}}))),a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{border:{all:{color:t.borderColor,style:t.borderStyle,width:t.borderWidth}}}})}))}},Q?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),Q&&l.createElement("div",{style:{marginBottom:4}},l.createElement(Tt,{borders:c}))),V.formFieldBorderRadiusEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Border radius"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{le((e=>!e)),ae?(t.borderRadiusAll=0,N(!0)):t.borderRadiusAll=5,a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{borderRadius:{all:t.borderRadiusAll}}})}))}},ae?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),ae&&l.createElement("div",{style:{marginBottom:4}},l.createElement(Dt,{form:n,oneBorderRadiusValue:R,setOneBorderRadiusValue:N,elementSettings:e}))),V.formFieldBoxShadowEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Box shadow"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{ie((e=>!e)),re?(t.boxShadowInset=!1,t.boxShadowHOffset=0,t.boxShadowVOffset=0,t.boxShadowBlurRadius=0,t.boxShadowSpreadRadius=0,t.boxShadowColor=""):(t.boxShadowInset=!1,t.boxShadowHOffset=5,t.boxShadowVOffset=5,t.boxShadowBlurRadius=10,t.boxShadowSpreadRadius=-5,t.boxShadowColor="#000000"),a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{boxShadow:{blurRadius:t.boxShadowBlurRadius,color:t.boxShadowColor,hOffset:t.boxShadowHOffset,inset:t.boxShadowInset,spreadRadius:t.boxShadowSpreadRadius,vOffset:t.boxShadowVOffset}}})}))}},re?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),re&&l.createElement("div",{style:{marginBottom:4}},l.createElement(eo,{boxShadow:A}))),V.formFieldExportAsPictureEnabled&&"group"!==e.type&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Settings"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{Ae((e=>!e)),ve&&(t.exportAsPicture=!1,t.isContrastBlock=!1,a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{exportAsPicture:!1,isContrastBlock:!1}}))}))}},ve?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),ve&&l.createElement(l.Fragment,null,"structure"===e.type&&l.createElement(i.A,{title:t("The block will change its colors to contrasting colors. You can change them in the Content Styles section."),key:"isContrastBlock"},l.createElement(s.A,{size:10,align:"baseline"},l.createElement(S.A.Item,{name:"isContrastBlock",valuePropName:"checked",style:{marginBottom:0}},l.createElement(B.A,{size:"small",id:"contrast-colors"})),l.createElement("span",{className:"ant-form-item-switch-label",style:{position:"relative",top:2}},l.createElement("label",{htmlFor:"contrast-colors"},t("Contrast block"))))),l.createElement(Ko,{form:n,elementSettings:e}))),V.formFieldVisibilityEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},t("group"!==e.type?"Display control & Direction":"Display control")),l.createElement(b.A,{gutter:20,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(vo,{elementSettings:e,form:n})),"group"!==e.type&&l.createElement(h.A,{span:12,style:{textAlign:"group"!==e.type?"right":"left"}},l.createElement(rn,{elementSettings:e,form:n})))),V.formFieldAmpVisibilityEnabled&&e.ampShow&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},t("AMP visibility")),l.createElement(b.A,{gutter:20,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(Ro,null)))))))},{Option:hn}=k.A,En=l.createElement(k.A,{className:"select-after",getPopupContainer:e=>e.parentNode},l.createElement(hn,{value:"px"},"px"),l.createElement(hn,{value:"%"},"%")),{useToken:fn}=n.A,vn=({elementSettings:e})=>{const{__:t}=(0,y.s9)(),a=(0,Me.XW)(),[o]=S.A.useForm(),[n,r]=(0,l.useState)({}),[s,d]=(0,l.useState)({}),[c,p]=(0,l.useState)(!0),[E,v]=(0,l.useState)({}),[A,_]=(0,l.useState)({}),[x,B]=(0,l.useState)(!0),T=(0,f.d4)(Ie.Ct),R=(0,f.d4)(Ie.CS),N=(0,Y.rD)(),[L,P]=(0,l.useState)(""===e.backgroundImage[0].value),{token:I}=fn(),M=(0,f.d4)(Ie.Fv),O=(0,f.d4)(Ie.yy),V=M&&"bottom"!==O,[F,H]=(0,l.useState)(!1),[j,W]=(0,l.useState)(!1),[G,U]=(0,l.useState)(!1),[q,Z]=(0,l.useState)(!1),[X,K]=(0,l.useState)(!1),[$,Q]=(0,l.useState)(!1),[J,ee]=(0,l.useState)(!1),[te,ae]=(0,l.useState)(!1),[le,oe]=(0,l.useState)(!1),[ne,re]=(0,l.useState)(!1),[ie,se]=(0,l.useState)(!1),[de,me]=(0,l.useState)(!1),[ce,ue]=(0,l.useState)(!1),[pe,ge]=(0,l.useState)(!1),[be,he]=(0,l.useState)(!1),[Ee,ve]=(0,l.useState)(""),Ae=[{label:t("Not defined"),value:"none"},{label:t("Do not repeat background (no-repeat)"),value:"no-repeat"},{label:t("Repeat background (repeat)"),value:"repeat"},{label:t("Repeat background horizontally (repeat-x)"),value:"repeat-x"},{label:t("Repeat background vertically (repeat-y)"),value:"repeat-y"}],_e=[{label:t("Not defined"),value:""},{label:t("Contain"),value:"contain"},{label:t("Cover"),value:"cover"}];(0,l.useEffect)((()=>{if(e){var t,a,l,n,i,s,m,c,u,g,b,h,E,f,y,A,C,S,w,k,x,T,R,N,L,I,M,O,V,F,D,j,z,G,q,X,Y,$,J,te,le,ne,ie,de,ce,pe,be,Ee,fe,ve,ye,Ae,_e,Ce,Se;const we=e.border,ke=e.boxShadow,xe=e.mobileBorder,Be=e.mobileBoxShadow;r(we),d(ke),v(xe),_(Be);const Te=Object.keys(we).find((e=>{var t,a,l;return(null===(t=we[e])||void 0===t?void 0:t.width)||(null===(a=we[e])||void 0===a?void 0:a.style)||(null===(l=we[e])||void 0===l?void 0:l.color)})),Re=Object.keys(xe).find((e=>{var t,a,l;return(null===(t=xe[e])||void 0===t?void 0:t.width)||(null===(a=xe[e])||void 0===a?void 0:a.style)||(null===(l=xe[e])||void 0===l?void 0:l.color)}));o.setFieldsValue({...e,width:null===(t=e.width)||void 0===t?void 0:t.value,widthDim:null===(a=e.width)||void 0===a?void 0:a.dim,height:null===(l=e.height)||void 0===l?void 0:l.value,heightDim:null===(n=e.height)||void 0===n?void 0:n.dim,maxWidth:null===(i=e.maxWidth)||void 0===i?void 0:i.value,maxWidthDim:null===(s=e.maxWidth)||void 0===s?void 0:s.dim,minWidth:null===(m=e.minWidth)||void 0===m?void 0:m.value,minWidthDim:null===(c=e.minWidth)||void 0===c?void 0:c.dim,backgroundImage:e.backgroundImage[0].value,show:e.show?e.show:"all",borderPosition:Te||"all",borderWidth:(null===(u=we[Te])||void 0===u?void 0:u.width)||"",borderColor:(null===(g=we[Te])||void 0===g?void 0:g.color)||"",borderStyle:(null===(b=we[Te])||void 0===b?void 0:b.style)||"solid",paddingTop:ga(e.padding.all)||ga(e.padding.top),paddingLeft:ga(e.padding.all)||ga(e.padding.left),paddingRight:ga(e.padding.all)||ga(e.padding.right),paddingBottom:ga(e.padding.all)||ga(e.padding.bottom),paddingLeftRight:ga(null===(h=e.padding)||void 0===h?void 0:h.left)||ga(null===(E=e.padding)||void 0===E?void 0:E.right),paddingTopBottom:ga(null===(f=e.padding)||void 0===f?void 0:f.top)||ga(null===(y=e.padding)||void 0===y?void 0:y.bottom),borderRadiusAll:ga(e.borderRadius.all),borderRadiusTopLeft:ga(e.borderRadius.topLeft),borderRadiusBottomLeft:ga(e.borderRadius.bottomLeft),borderRadiusTopRight:ga(e.borderRadius.topRight),borderRadiusBottomRight:ga(e.borderRadius.bottomRight),boxShadowInset:ga(null===(A=e.boxShadow)||void 0===A?void 0:A.inset)||!1,boxShadowHOffset:ga(null===(C=e.boxShadow)||void 0===C?void 0:C.hOffset),boxShadowVOffset:ga(null===(S=e.boxShadow)||void 0===S?void 0:S.vOffset),boxShadowBlurRadius:ga(null===(w=e.boxShadow)||void 0===w?void 0:w.blurRadius),boxShadowSpreadRadius:ga(null===(k=e.boxShadow)||void 0===k?void 0:k.spreadRadius),boxShadowColor:ga(null===(x=e.boxShadow)||void 0===x?void 0:x.color),mobileWidth:ba(null===(T=e.mobileWidth)||void 0===T?void 0:T.value),mobileWidthDim:null===(R=e.mobileWidth)||void 0===R?void 0:R.dim,mobileHeight:ba(null===(N=e.mobileHeight)||void 0===N?void 0:N.value),mobileHeightDim:null===(L=e.mobileHeight)||void 0===L?void 0:L.dim,mobileBorderPosition:Re||"all",mobileBorderWidth:null!==(null===(I=xe[Re])||void 0===I?void 0:I.width)?null===(M=xe[Re])||void 0===M?void 0:M.width:"",mobileBorderColor:(null===(O=xe[Re])||void 0===O?void 0:O.color)||"",mobileBorderStyle:(null===(V=xe[Re])||void 0===V?void 0:V.style)||"",mobileBorderRadiusAll:ga(e.mobileBorderRadius.all),mobileRadiusTopLeft:ga(null!==e.mobileBorderRadius.topLeft?e.mobileBorderRadius.topLeft:e.mobileBorderRadius.all),mobileRadiusBottomLeft:ga(null!==e.mobileBorderRadius.bottomLeft?e.mobileBorderRadius.bottomLeft:e.mobileBorderRadius.all),mobileRadiusTopRight:ga(null!==e.mobileBorderRadius.topRight?e.mobileBorderRadius.topRight:e.mobileBorderRadius.all),mobileRadiusBottomRight:ga(null!==e.mobileBorderRadius.bottomRight?e.mobileBorderRadius.bottomRight:e.mobileBorderRadius.all),mobileBoxShadowInset:ga(null===(F=e.mobileBoxShadow)||void 0===F?void 0:F.inset)||!1,mobileBoxShadowHOffset:ga(null===(D=e.mobileBoxShadow)||void 0===D?void 0:D.hOffset),mobileBoxShadowVOffset:ga(null===(j=e.mobileBoxShadow)||void 0===j?void 0:j.vOffset),mobileBoxShadowBlurRadius:ga(null===(z=e.mobileBoxShadow)||void 0===z?void 0:z.blurRadius),mobileBoxShadowSpreadRadius:ga(null===(G=e.mobileBoxShadow)||void 0===G?void 0:G.spreadRadius),mobileBoxShadowColor:ga(null===(q=e.mobileBoxShadow)||void 0===q?void 0:q.color),mobileAlign:ga(null===(X=e.mobileAlign)||void 0===X?void 0:X.value),mobileVerticalAlign:ga(null===(Y=e.mobileVerticalAlign)||void 0===Y?void 0:Y.value),mobileDirection:ga(null===($=e.mobileDirection)||void 0===$?void 0:$.value),mobileBackgroundColor:ga("none"!==(null===(J=e.mobileBackgroundColor)||void 0===J?void 0:J.value)?null===(te=e.mobileBackgroundColor)||void 0===te?void 0:te.value:""),mobileBackgroundImage:"none"!==e.mobileBackgroundImage[0].value?e.mobileBackgroundImage[0].value:"",mobileBackgroundPositionX:ga(null===(le=e.mobileBackgroundPositionX)||void 0===le?void 0:le.value),mobileBackgroundPositionY:ga(null===(ne=e.mobileBackgroundPositionY)||void 0===ne?void 0:ne.value),mobileBackgroundRepeat:null!==(ie=e.mobileBackgroundRepeat)&&void 0!==ie&&ie.value?null===(de=e.mobileBackgroundRepeat)||void 0===de?void 0:de.value:"none",mobilePaddingTop:ga(e.mobilePadding.all)||ga(e.mobilePadding.top),mobilePaddingLeft:ga(e.mobilePadding.all)||ga(e.mobilePadding.left),mobilePaddingRight:ga(e.mobilePadding.all)||ga(e.mobilePadding.right),mobilePaddingBottom:ga(e.mobilePadding.all)||ga(e.mobilePadding.bottom),mobilePaddingTopBottom:ga(e.mobilePadding.top)||ga(e.mobilePadding.bottom),mobilePaddingLeftRight:ga(e.mobilePadding.left)||ga(e.mobilePadding.right),exportAsPicture:null===e||void 0===e?void 0:e.exportAsPicture}),!ga(e.borderRadius.all)&&(ga(e.borderRadius.topLeft)||ga(e.borderRadius.bottomLeft)||ga(e.borderRadius.topRight)||ga(e.borderRadius.bottomRight))?p(!1):p(!0),!ga(e.mobileBorderRadius.all)&&(ga(e.mobileBorderRadius.topLeft)||ga(e.mobileBorderRadius.bottomLeft)||ga(e.mobileBorderRadius.topRight)||ga(e.mobileBorderRadius.bottomRight))?B(!1):B(!0),P(""===e.backgroundImage[0].value),ga(e.padding.all)||!(ga(e.padding.top)||ga(e.padding.right)||ga(e.padding.bottom)||ga(e.padding.left))||e.padding.top===e.padding.bottom&&e.padding.right===e.padding.left?H(!0):H(!1),ga(e.mobilePadding.all)||!(ga(e.mobilePadding.top)||ga(e.mobilePadding.right)||ga(e.mobilePadding.bottom)||ga(e.mobilePadding.left))||e.mobilePadding.top===e.mobilePadding.bottom&&e.mobilePadding.right===e.mobilePadding.left?W(!0):W(!1),U(!(null===(ce=we[Te])||void 0===ce||!ce.width)||!(null===(pe=we[Te])||void 0===pe||!pe.style)||!(null===(be=we[Te])||void 0===be||!be.color)),Z(!(null===(Ee=xe[Re])||void 0===Ee||!Ee.width)||!(null===(fe=xe[Re])||void 0===fe||!fe.style)||!(null===(ve=xe[Re])||void 0===ve||!ve.color)),K(!!e.borderRadius.all||!!e.borderRadius.topLeft||!!e.borderRadius.bottomLeft||!!e.borderRadius.topRight||!!e.borderRadius.bottomRight),Q(!!e.mobileBorderRadius.all||!!e.mobileBorderRadius.topLeft||!!e.mobileBorderRadius.bottomLeft||!!e.mobileBorderRadius.topRight||!!e.mobileBorderRadius.bottomRight),ee(!!e.boxShadow),ae(!!e.mobileBoxShadow.blurRadius||!!e.mobileBoxShadow.color||!!e.mobileBoxShadow.hOffset||!!e.mobileBoxShadow.inset||!!e.mobileBoxShadow.spreadRadius||!!e.mobileBoxShadow.vOffset),oe(!!e.width.value||!!e.height.value||!!e.minWidth.value||!!e.maxWidth.value),re(!!e.mobileWidth.value||!!e.mobileHeight.value),se(!!e.backgroundColor||!!e.backgroundImage[0].value||!!e.backgroundPositionY||!!e.backgroundPositionX||"repeat"!==e.backgroundRepeat||!e.backgroundRepeat,!!e.backgroundSize),me(!!e.mobileBackgroundColor.value),ue(!!e.exportAsPicture),ge(!(null===(ye=e.padding)||void 0===ye||!ye.all)||!(null===(Ae=e.padding)||void 0===Ae||!Ae.top)||!(null===(_e=e.padding)||void 0===_e||!_e.bottom)||!(null===(Ce=e.padding)||void 0===Ce||!Ce.left)||!(null===(Se=e.padding)||void 0===Se||!Se.right)),he(!!e.mobilePadding.all||!!e.mobilePadding.top||!!e.mobilePadding.bottom||!!e.mobilePadding.left||!!e.mobilePadding.right)}}),[o,e]);return l.createElement(S.A,{form:o,layout:"vertical",name:"selected_div_form",initialValues:{backgroundColor:"",backgroundImage:"",backgroundPositionX:"",backgroundPositionY:"",backgroundRepeat:"",backgroundSize:"",exportAsPicture:!1,width:"",height:"",widthDim:"",heightDim:"",maxWidth:{value:"",dim:""},minWidth:{value:"",dim:""},align:"",valign:"",border:"",boxShadow:"",show:"all",borderPosition:"",borderColor:"",borderWidth:"",borderStyle:"",paddingTop:"",paddingLeft:"",paddingRight:"",paddingBottom:"",borderRadiusAll:"",borderRadiusTopLeft:"",borderRadiusBottomLeft:"",borderRadiusTopRight:"",borderRadiusBottomRight:"",direction:"",mobileWidth:"",mobileWidthDim:"",mobileHeight:"",mobileHeightDim:"",mobileBorder:"",mobileBorderPosition:"",mobileBorderColor:"",mobileBorderWidth:"",mobileBorderStyle:"",mobileBoxShadow:"",mobileAlign:"",mobileDirection:"",mobileVerticalAlign:"",mobileBackgroundColor:"",mobileBackgroundImage:"",mobilePaddingTop:"",mobilePaddingLeft:"",mobilePaddingRight:"",mobilePaddingBottom:""},onValuesChange:t=>{const l=o.getFieldsValue(!0),i=Object.keys(t)[0];let s;switch(ve("%"===o.getFieldsValue(!0).widthDim?100:""),i){case"exportAsPicture":s={exportAsPicture:l.exportAsPicture};break;case"boxShadowInset":case"boxShadowHOffset":case"boxShadowVOffset":case"boxShadowBlurRadius":case"boxShadowSpreadRadius":case"boxShadowColor":s={boxShadow:{hOffset:l.boxShadowHOffset,vOffset:l.boxShadowVOffset,blurRadius:l.boxShadowBlurRadius,spreadRadius:l.boxShadowSpreadRadius,color:l.boxShadowColor,inset:l.boxShadowInset}};break;case"borderStyle":s={border:{[l.borderPosition]:{...n[l.borderPosition],style:t[i]}}},"all"===l.borderPosition?r((e=>({...D.iV,[l.borderPosition]:{...e[l.borderPosition],style:t[i]}}))):r((e=>({...e,[l.borderPosition]:{...e[l.borderPosition],style:t[i]}})));break;case"borderColor":s={border:{[l.borderPosition]:{...n[l.borderPosition],color:t[i]}}},"all"===l.borderPosition?r((e=>({...D.iV,[l.borderPosition]:{...e[l.borderPosition],color:t[i]}}))):r((e=>({...e,[l.borderPosition]:{...e[l.borderPosition],color:t[i]}})));break;case"borderWidth":s={border:{[l.borderPosition]:{...n[l.borderPosition],width:t[i]}}},"all"===l.borderPosition?r((e=>({...D.iV,[l.borderPosition]:{...e[l.borderPosition],width:t[i]}}))):r((e=>({...e,[l.borderPosition]:{...e[l.borderPosition],width:t[i]}})));break;case"borderPosition":o.setFieldsValue({borderWidth:n[t[i]].width||"",borderColor:n[t[i]].color||"",borderStyle:n[t[i]].style||""});break;case"width":s={[i]:{value:t[i],dim:l.widthDim}};break;case"height":s={[i]:{value:t[i],dim:l.heightDim}};break;case"widthDim":s={width:{value:l.width,dim:t[i]}};break;case"heightDim":s={height:{value:l.height,dim:t[i]}};break;case"maxWidth":s={[i]:{value:t[i],dim:l.maxWidthDim}};break;case"maxWidthDim":s={maxWidth:{value:l.maxWidth,dim:t[i]}};break;case"minWidth":s={[i]:{value:t[i],dim:l.minWidthDim}};break;case"minWidthDim":s={minWidth:{value:l.minWidth,dim:t[i]}};break;case"backgroundImage":P(""===t[i]),s={[i]:[{...e.backgroundImage[0],value:t[i]}],backgroundSize:"cover"};break;case"paddingTop":case"paddingLeft":case"paddingRight":case"paddingBottom":s={padding:{[ma[i]]:+t[i]}};break;case"paddingTopBottom":s={padding:{top:+t[i],bottom:+t[i]}},l.paddingTop=l.paddingBottom=+t[i];break;case"paddingLeftRight":s={padding:{left:+t[i],right:+t[i]}},l.paddingLeft=l.paddingRight=+t[i];break;case"borderRadiusAll":case"borderRadiusTopLeft":case"borderRadiusBottomLeft":case"borderRadiusTopRight":case"borderRadiusBottomRight":s={borderRadius:{[D.wF[i]]:+t[i]}};break;case"mobileWidth":s={[i]:{classNamePrefix:"em-mob-width-",value:t[i],dim:l.mobileWidthDim}};break;case"mobileWidthDim":s={mobileWidth:{classNamePrefix:"em-mob-width-",value:l.mobileWidth,dim:t[i]}};break;case"mobileHeight":s={[i]:{classNamePrefix:"em-mob-height-",value:t[i],dim:l.mobileHeightDim}};break;case"mobileHeightDim":s={mobileHeight:{classNamePrefix:"em-mob-height-",value:l.mobileHeight,dim:t[i]}};break;case"mobileBorderStyle":s={mobileBorder:{[l.mobileBorderPosition]:{...E[l.mobileBorderPosition],style:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}},"all"===l.mobileBorderPosition?v((e=>({...D.iV,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],style:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}))):v((e=>({...e,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],style:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}})));break;case"mobileBorderColor":s={mobileBorder:{[l.mobileBorderPosition]:{...E[l.mobileBorderPosition],color:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}},"all"===l.mobileBorderPosition?v((e=>({...D.iV,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],color:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}))):v((e=>({...e,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],color:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}})));break;case"mobileBorderWidth":s={mobileBorder:{[l.mobileBorderPosition]:{...E[l.mobileBorderPosition],width:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}},"all"===l.mobileBorderPosition?v((e=>({...D.iV,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],width:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}}))):v((e=>({...e,[l.mobileBorderPosition]:{...e[l.mobileBorderPosition],width:t[i],classNamePrefix:"em-mob-border_"+l.mobileBorderPosition+"-"}})));break;case"mobileBorderPosition":o.setFieldsValue({mobileBorderWidth:E[t[i]].width||"",mobileBorderColor:E[t[i]].color||"",mobileBorderStyle:E[t[i]].style||""});break;case"mobileBorderRadiusAll":case"mobileRadiusTopLeft":case"mobileRadiusBottomLeft":case"mobileRadiusTopRight":case"mobileRadiusBottomRight":s={mobileBorderRadius:{[ua[i]]:t[i],classNamePrefix:"em-mob-border_radius_"+ua[i]+"-"}};break;case"mobileBoxShadowInset":case"mobileBoxShadowHOffset":case"mobileBoxShadowVOffset":case"mobileBoxShadowBlurRadius":case"mobileBoxShadowSpreadRadius":case"mobileBoxShadowColor":s={mobileBoxShadow:{hOffset:l.mobileBoxShadowHOffset,vOffset:l.mobileBoxShadowVOffset,blurRadius:l.mobileBoxShadowBlurRadius,spreadRadius:l.mobileBoxShadowSpreadRadius,color:l.mobileBoxShadowColor,inset:l.mobileBoxShadowInset,classNamePrefix:"em-mob-box_shadow-"}};break;case"mobileAlign":s={[i]:{classNamePrefix:"em-mob-text_align-",value:t[i]}};break;case"mobileVerticalAlign":s={[i]:{classNamePrefix:"em-mob-vertical_align-",value:t[i]}};break;case"mobileBackgroundColor":s={[i]:{classNamePrefix:"em-mob-background_color-",value:t[i]}};break;case"mobileBackgroundImage":s={[i]:[{...e.mobileBackgroundImage[0],classNamePrefix:"em-mob-background_image-",value:t[i]}]};break;case"mobileBackgroundPositionX":s={[i]:{classNamePrefix:"em-mob-background_position_x-",value:t[i]}};break;case"mobileBackgroundPositionY":s={[i]:{classNamePrefix:"em-mob-background_position_x-",value:t[i]}};break;case"mobileBackgroundRepeat":s={[i]:{classNamePrefix:"em-mob-background_repeat-",value:t[i]}};break;case"mobilePaddingTop":case"mobilePaddingLeft":case"mobilePaddingRight":case"mobilePaddingBottom":s={mobilePadding:{all:null,top:""!==l.mobilePaddingTop?l.mobilePaddingTop:null,right:""!==l.mobilePaddingRight?l.mobilePaddingRight:null,bottom:""!==l.mobilePaddingBottom?l.mobilePaddingBottom:null,left:""!==l.mobilePaddingLeft?l.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;case"mobilePaddingTopBottom":l.mobilePaddingTop=l.mobilePaddingBottom=t[i],s={mobilePadding:{all:null,top:""!==l.mobilePaddingTop?l.mobilePaddingTop:null,right:""!==l.mobilePaddingRight?l.mobilePaddingRight:null,bottom:""!==l.mobilePaddingBottom?l.mobilePaddingBottom:null,left:""!==l.mobilePaddingLeft?l.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;case"mobilePaddingLeftRight":l.mobilePaddingLeft=l.mobilePaddingRight=t[i],s={mobilePadding:{all:null,top:""!==l.mobilePaddingTop?l.mobilePaddingTop:null,right:""!==l.mobilePaddingRight?l.mobilePaddingRight:null,bottom:""!==l.mobilePaddingBottom?l.mobilePaddingBottom:null,left:""!==l.mobilePaddingLeft?l.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;case"mobileDirection":s={[i]:{classNamePrefix:"em-mob-direction-",value:t[i]}};break;default:s=t}"borderPosition"!==i&&a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:s})},autoComplete:"off",className:"element-controls"},!V&&l.createElement(i.A,{title:t("To change the appearance of the element on the mobile device, edit the fields below. If the fields remain empty, the desktop styles will be applied to the mobile version."),placement:"bottom"},l.createElement(u.A,{className:"selected_form-mobile-props-title",message:t("Appearance on mobile devices"),type:"info"})),T===D.ND&&R.styles?l.createElement("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props"},l.createElement("div",{className:"selected_form-mobile-props-wrapper"},l.createElement(b.A,{gutter:20,style:{paddingBottom:4}},l.createElement(h.A,{span:12},l.createElement(Go,{form:o,elementSettings:e,imgParent:!0})),l.createElement(h.A,{span:12,style:{textAlign:"right"}},l.createElement(bo,{form:o,elementSettings:e}))),l.createElement(m.A,{className:"selected-td-form__divider"}),N.formCellFieldPaddingsEnabled&&l.createElement(l.Fragment,null,l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Padding"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{he((e=>!e)),be&&(t.mobilePaddingLeftRight="",t.mobilePaddingLeft="",t.mobilePaddingRight="",t.mobilePaddingTopBottom="",t.mobilePaddingTop="",t.mobilePaddingBottom="",a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobilePadding:{all:null,top:null,right:null,bottom:null,left:null,classNamePrefix:"em-mob-padding_"}}}))}))}},be?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),be&&l.createElement(b.A,{gutter:10,style:{paddingBottom:4}},l.createElement(l.Fragment,null,l.createElement(dn,{form:o,elementSettings:e,mobilePaddingsExt:j,setMobilePaddingsExt:W})))),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Size"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{setTimeout((()=>{re((e=>!e))}))}},ne?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),ne&&l.createElement(b.A,{gutter:10,style:{paddingBottom:8}},l.createElement(h.A,{span:12},l.createElement("div",{style:{marginBottom:2*I.formItemMarginBottomXS}},l.createElement(oo,{form:o,name:"mobileWidth",elementSettings:e}))),l.createElement(h.A,{span:12},l.createElement("div",{style:{marginBottom:I.formItemMarginBottomXS}},l.createElement(ro,{form:o,name:"mobileHeight",elementSettings:e})))),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Background"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{me((e=>!e)),t.mobileBackgroundColor=de?"":"#E5E5E5",a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBackgroundColor:{classNamePrefix:"em-mob-background_color-",value:t.mobileBackgroundColor}}})}))}},de?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),de&&l.createElement("div",{style:{marginBottom:(N.formDivFieldBackgroundImageEnabled,I.formItemMarginBottomMD+4)}},l.createElement(Zo,{form:o,elementSettings:e,label:t("Background color")})),!1,N.formFieldBorderEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Borders"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{Z((e=>!e)),q&&(t.mobileBorderWidth=null,t.mobileBorderColor="",t.mobileBorderStyle=""),v((e=>({...D.iV,[t.mobileBorderPosition]:{...e[t.mobileBorderPosition],width:t.mobileBorderWidth,color:t.mobileBorderColor,style:t.mobileBorderStyle}}))),a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorder:{all:{color:t.mobileBorderColor,style:t.mobileBorderStyle,width:t.mobileBorderWidth,classNamePrefix:"em-mob-border_"+t.mobileBorderPosition+"-"}}}})}))}},q?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),q&&l.createElement("div",{style:{paddingBottom:4}},l.createElement(mo,{mobileBorders:E}))),N.formFieldBorderRadiusEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Border radius"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{Q((e=>!e)),$?(t.mobileBorderRadiusAll=null,B(!0)):t.mobileBorderRadiusAll=5,a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorderRadius:{all:t.mobileBorderRadiusAll,classNamePrefix:"em-mob-border_radius_all-"}}})}))}},$?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),$&&l.createElement("div",{style:{paddingBottom:4}},l.createElement(co,{form:o,oneMobileBorderRadiusValue:x,setOneMobileBorderRadiusValue:B,elementSettings:e}))),N.formFieldBoxShadowEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Box shadow"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{ae((e=>!e)),te?(t.mobileBoxShadowInset=!1,t.mobileBoxShadowHOffset=null,t.mobileBoxShadowVOffset=null,t.mobileBoxShadowBlurRadius=null,t.mobileBoxShadowSpreadRadius=null,t.mobileBoxShadowColor=""):(t.mobileBoxShadowInset=!1,t.mobileBoxShadowHOffset=5,t.mobileBoxShadowVOffset=5,t.mobileBoxShadowBlurRadius=10,t.mobileBoxShadowSpreadRadius=-5,t.mobileBoxShadowColor="#000000"),a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBoxShadow:{blurRadius:t.mobileBoxShadowBlurRadius,color:t.mobileBoxShadowColor,hOffset:t.mobileBoxShadowHOffset,inset:t.mobileBoxShadowInset,spreadRadius:t.mobileBoxShadowSpreadRadius,vOffset:t.mobileBoxShadowVOffset,classNamePrefix:"em-mob-box_shadow-"}}})}))}},te?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),te&&l.createElement("div",{style:{paddingBottom:4}},l.createElement(uo,{mobileBoxShadow:A,form:o,elementSettings:e}))),N.formFieldVisibilityEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},t("Display control & Direction")),l.createElement(b.A,{gutter:20,style:{paddingBottom:4}},l.createElement(h.A,{span:12},l.createElement(vo,{elementSettings:e,form:o})),l.createElement(h.A,{span:12,style:{textAlign:"right"}},l.createElement(cn,{elementSettings:e,form:o})))),N.formFieldAmpVisibilityEnabled&&e.ampShow&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},t("AMP visibility")),l.createElement(b.A,{gutter:20,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(Ro,null)))))):l.createElement("div",{id:"selected_element_form_desktop_props"},l.createElement(u.A,{className:"selected_form-desktop-props-title",message:t("Appearance on mobile devices"),type:"info"}),l.createElement("div",{className:"selected_form-props-wrapper"},l.createElement(b.A,{gutter:20,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(vt,{form:o,elementSettings:e})),l.createElement(h.A,{span:12,style:{textAlign:"right"}},l.createElement(Ql,{form:o,elementSettings:e}))),l.createElement(m.A,{className:"selected-td-form__divider"}),N.formCellFieldPaddingsEnabled&&l.createElement(l.Fragment,null,l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Padding"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{ge((e=>!e)),pe&&(t.paddingLeftRight="",t.paddingLeft="",t.paddingRight="",t.paddingTopBottom="",t.paddingTop="",t.paddingBottom="",a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{padding:{all:0}}}))}))}},pe?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),pe&&l.createElement(b.A,{gutter:10,style:{marginBottom:4}},l.createElement(l.Fragment,null,l.createElement(h.A,{span:10,style:{width:156,flex:"auto",maxWidth:"none"}},l.createElement("div",{className:"padding-collapsed",style:{display:F?"block":"none"}},l.createElement(i.A,{title:t("Horizontal padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"paddingLeftRight"},l.createElement(Ft.A,{min:0,placeholder:t("Horizontal"),prefix:l.createElement(z.A,{icon:"PaddingLeftRight"}),addonAfter:"px"})))),l.createElement("div",{className:"padding-extended",style:{display:F?"none":"block"}},l.createElement(i.A,{trigger:["hover"],title:t("Left padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"paddingLeft",style:{marginBottom:I.formItemMarginBottomXS}},l.createElement(Ft.A,{min:0,placeholder:t("Left"),prefix:l.createElement(z.A,{icon:"PaddingLeft"}),addonAfter:"px"}))),l.createElement(i.A,{trigger:["hover"],title:t("Right padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"paddingRight"},l.createElement(Ft.A,{min:0,placeholder:t("Right"),prefix:l.createElement(z.A,{icon:"PaddingRight"}),addonAfter:"px"}))))),l.createElement(h.A,{span:10,style:{width:156,flex:"auto",maxWidth:"none"}},l.createElement("div",{className:"padding-collapsed",style:{display:F?"block":"none"}},l.createElement(i.A,{title:t("Vertical padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"paddingTopBottom"},l.createElement(Ft.A,{min:0,placeholder:t("Vertical"),prefix:l.createElement(z.A,{icon:"PaddingTopBottom"}),addonAfter:"px"})))),l.createElement("div",{className:"padding-extended",style:{display:F?"none":"block"}},l.createElement(i.A,{trigger:["hover"],title:t("Top padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"paddingTop",style:{marginBottom:I.formItemMarginBottomXS}},l.createElement(Ft.A,{min:0,placeholder:t("Top"),prefix:l.createElement(z.A,{icon:"PaddingTop"}),addonAfter:"px"}))),l.createElement(i.A,{trigger:["hover"],title:t("Bottom padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"paddingBottom"},l.createElement(Ft.A,{min:0,placeholder:t("Bottom"),prefix:l.createElement(z.A,{icon:"PaddingBottom"}),addonAfter:"px"}))))),l.createElement(h.A,{span:4,style:{width:45,flex:"auto",maxWidth:"none"}},l.createElement(i.A,{title:t("Individual padding"),placement:"bottom"},l.createElement(g.Ay,{className:C()("selected-td-form__button",{"selected-td-form__button--active":!F}),onClick:()=>{H((e=>!e));const t=o.getFieldsValue(!0);F||(t.paddingLeftRight=t.paddingLeft,t.paddingTopBottom=t.paddingTop,t.paddingRight=t.paddingLeft,t.paddingBottom=t.paddingTop,a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{padding:{top:t.paddingTopBottom,bottom:t.paddingTopBottom,left:t.paddingLeftRight,right:t.paddingLeftRight}}}))}},l.createElement(z.A,{icon:"PaddingSwitcher"}))))))),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Size"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{setTimeout((()=>{oe((e=>!e))}))}},le?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),le&&l.createElement(b.A,{gutter:10,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:t("Width"),placement:"bottom"},l.createElement(S.A.Item,{name:"width",className:"form-item-margin-xs"}," ",l.createElement(Ft.A,{min:0,max:Ee,placeholder:t("Width"),prefix:l.createElement(fe.A,null),addonAfter:l.createElement(S.A.Item,{name:"widthDim",noStyle:!0},En)}))),l.createElement(i.A,{trigger:["hover"],title:t("Height"),placement:"bottom"},l.createElement(S.A.Item,{name:"height"},l.createElement(Ft.A,{min:0,placeholder:t("Height"),prefix:l.createElement(Gl.A,null),addonAfter:"px"})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:t("Minimum width"),placement:"bottom"},l.createElement(S.A.Item,{name:"minWidth",className:"form-item-margin-xs"},l.createElement(Ft.A,{min:0,placeholder:t("Min width"),prefix:l.createElement(z.A,{icon:"MinWidth"}),addonAfter:l.createElement(S.A.Item,{name:"minWidthDim",noStyle:!0},En)}))),l.createElement(i.A,{trigger:["hover"],title:t("Maximum width"),placement:"bottom"},l.createElement(S.A.Item,{name:"maxWidth",className:"form-item-margin-xs"},l.createElement(Ft.A,{min:0,placeholder:t("Max width"),prefix:l.createElement(z.A,{icon:"MaxWidth"}),addonAfter:l.createElement(S.A.Item,{name:"maxWidthDim",noStyle:!0},En)}))))),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Background"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{se((e=>!e)),ie?(t.backgroundColor="",t.backgroundImage="",t.backgroundPositionX="",t.backgroundPositionY="",t.backgroundRepeat="none",t.backgroundSize="",P(!0)):(t.backgroundColor="#E5E5E5",t.backgroundSize="",t.backgroundRepeat="none"),a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{backgroundColor:t.backgroundColor,backgroundImage:[{type:"url",value:t.backgroundImage}],backgroundPositionX:t.backgroundPositionX,backgroundPositionY:t.backgroundPositionY,backgroundRepeat:t.backgroundRepeat,backgroundSize:t.backgroundSize}})}))}},ie?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),ie&&l.createElement(b.A,{gutter:10,style:{marginBottom:L?16:0}},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:t("Background color"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode},l.createElement(S.A.Item,{name:"backgroundColor",style:{marginBottom:N.formDivFieldBackgroundImageEnabled?I.formItemMarginBottomXS:I.formItemMarginBottomMD+4}},l.createElement(ye,{placeholder:t("Background color"),usedColors:e.usedColors})))),N.formDivFieldBackgroundImageEnabled&&l.createElement(h.A,{span:L?12:24},l.createElement("div",{style:{paddingBottom:L?4:0}},l.createElement(Pe,{form:o,label:t("Background image"),name:"backgroundImage",tooltipTitle:t("Background image"),placeholder:"Background image link/route"})),!L&&l.createElement(S.A.Item,{style:{marginBottom:"0"}},l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:t("Horizontal position"),placement:"bottom"},l.createElement(S.A.Item,{name:"backgroundPositionX",style:{marginBottom:I.formItemMarginBottomXS}},l.createElement(w.A,{placeholder:t("Horizontal position"),prefix:l.createElement(z.A,{icon:"BgPositionHorizontal"})})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:t("Vertical position"),placement:"bottom"},l.createElement(S.A.Item,{name:"backgroundPositionY",style:{marginBottom:I.formItemMarginBottomXS}},l.createElement(w.A,{placeholder:t("Vertical position"),prefix:l.createElement(z.A,{icon:"BgPositionVertical"})}))))),l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:t("Background image repeat"),placement:"top"},l.createElement(S.A.Item,{name:"backgroundRepeat",style:{marginBottom:I.formItemMarginBottomMD+4}},l.createElement(k.A,{placeholder:t("Please choose"),options:Ae,getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:t("Background image size"),placement:"top"},l.createElement(S.A.Item,{name:"backgroundSize",style:{marginBottom:I.formItemMarginBottomMD+4}},l.createElement(k.A,{placeholder:t("Please choose"),options:_e,getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")})))))))),N.formFieldBorderEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Borders"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{U((e=>!e)),G&&(t.borderWidth=null,t.borderColor="",t.borderStyle=""),r((e=>({...D.iV,[t.borderPosition]:{...e[t.borderPosition],width:t.borderWidth,color:t.borderColor,style:t.borderStyle}}))),a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{border:{all:{color:t.borderColor,style:t.borderStyle,width:t.borderWidth}}}})}))}},G?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),G&&l.createElement("div",{style:{paddingBottom:4}},l.createElement(Tt,{borders:n}))),N.formFieldBorderRadiusEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Border radius"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{K((e=>!e)),X?(t.borderRadiusAll=0,p(!0)):t.borderRadiusAll=5,a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{borderRadius:{all:t.borderRadiusAll}}})}))}},X?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),X&&l.createElement("div",{style:{paddingBottom:4}},l.createElement(Dt,{form:o,oneBorderRadiusValue:c,setOneBorderRadiusValue:p,elementSettings:e}))),N.formFieldBoxShadowEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Box shadow"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{ee((e=>!e)),J?(t.boxShadowInset=!1,t.boxShadowHOffset=0,t.boxShadowVOffset=0,t.boxShadowBlurRadius=0,t.boxShadowSpreadRadius=0,t.boxShadowColor=""):(t.boxShadowInset=!1,t.boxShadowHOffset=5,t.boxShadowVOffset=5,t.boxShadowBlurRadius=10,t.boxShadowSpreadRadius=-5,t.boxShadowColor="#000000"),a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{boxShadow:{blurRadius:t.boxShadowBlurRadius,color:t.boxShadowColor,hOffset:t.boxShadowHOffset,inset:t.boxShadowInset,spreadRadius:t.boxShadowSpreadRadius,vOffset:t.boxShadowVOffset}}})}))}},J?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),J&&l.createElement("div",{style:{paddingBottom:4}},l.createElement(eo,{boxShadow:s}))),N.formFieldExportAsPictureEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Export settings"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=o.getFieldsValue(!0);setTimeout((()=>{ue((e=>!e)),ce&&(t.exportAsPicture=!1,a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{exportAsPicture:!1}}))}))}},ce?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),ce&&l.createElement(Ko,{form:o,elementSettings:e})),N.formFieldVisibilityEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},t("Display control & Direction")),l.createElement(b.A,{gutter:20,style:{paddingBottom:4}},l.createElement(h.A,{span:12},l.createElement(vo,{elementSettings:e,form:o})),l.createElement(h.A,{span:12,style:{textAlign:"right"}},l.createElement(rn,{elementSettings:e,form:o})))),N.formFieldAmpVisibilityEnabled&&e.ampShow&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},t("AMP visibility")),l.createElement(b.A,{gutter:20,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(Ro,null)))))))};var yn=a(61153);const{Option:An}=k.A,_n=l.createElement(k.A,{className:"select-after",getPopupContainer:e=>e.parentNode},l.createElement(An,{value:"px"},"px"),l.createElement(An,{value:"%"},"%")),Cn=l.createElement(k.A,{className:"select-after",getPopupContainer:e=>e.parentNode},l.createElement(An,{value:"px"},"px"));let Sn=0;const wn=({elementSettings:e})=>{const{__:t}=(0,y.s9)(),a=(0,Me.XW)(),[o]=S.A.useForm(),n=(0,f.d4)(Ie.Ct),r=(0,f.d4)(Ie.CS),s=(0,f.d4)(Ie.Fv),d=(0,f.d4)(Ie.yy),c=(0,Y.rD)(),p=s&&"bottom"!==d;(0,l.useEffect)((()=>{const t=e=>e&&"auto"!==e?e:0===e?"0":"";var a,l,n,r,i,s,d,m,c,u,p,g,b,h;e&&(o.setFieldsValue({...e,width:null===(a=e.width)||void 0===a?void 0:a.value,widthDim:null===(l=e.width)||void 0===l?void 0:l.dim,gap:null===(n=e.gap)||void 0===n?void 0:n.value,gapDim:null===(r=e.gap)||void 0===r?void 0:r.dim,maxWidth:null===(i=e.maxWidth)||void 0===i?void 0:i.value,maxWidthDim:null===(s=e.maxWidth)||void 0===s?void 0:s.dim,minWidth:null===(d=e.minWidth)||void 0===d?void 0:d.value,minWidthDim:null===(m=e.minWidth)||void 0===m?void 0:m.dim,show:e.show?e.show:"all",mobileWidth:t(null===(c=e.mobileWidth)||void 0===c?void 0:c.value),mobileWidthDim:null===(u=e.mobileWidth)||void 0===u?void 0:u.dim,mobileContentWidth:t(null===(p=e.mobileContentWidth)||void 0===p?void 0:p.value),mobileContentWidthDim:null===(g=e.mobileContentWidth)||void 0===g?void 0:g.dim,mobileVerticalAlign:(h=null===(b=e.mobileVerticalAlign)||void 0===b?void 0:b.value,h||(0===h?"0":""))}),Sn=e.width.value+e.gap.value)}),[o,e]);return l.createElement(S.A,{form:o,layout:"vertical",name:"selected_float_block_form",initialValues:{width:{value:"",dim:""},gap:{value:"",dim:"px"},valign:"",show:"all",mobileWidth:"",mobileWidthDim:"",mobileContentWidth:"",mobileContentWidthDim:"",mobileVerticalAlign:""},onValuesChange:t=>{const l=o.getFieldsValue(!0),n=Object.keys(t)[0];let r;switch(n){case"width":Sn=t[n]+l.gap,r={[n]:{value:t[n],dim:l.widthDim},gap:{value:l.gap}};break;case"widthDim":r={width:{value:l.width,dim:t[n]},gap:{value:l.gap}};break;case"gap":l.width=Sn-t[n],r={[n]:{value:t[n],dim:"px"}};break;case"mobileWidth":r={[n]:{classNamePrefix:"em-mob-width-",value:t[n],dim:l.mobileWidthDim}};break;case"mobileWidthDim":r={mobileWidth:{classNamePrefix:"em-mob-width-",value:l.mobileWidth,dim:t[n]}};break;case"mobileContentWidth":r={[n]:{classNamePrefix:"em-mob-width-",value:t[n],dim:l.mobileContentWidthDim}};break;case"mobileContentWidthDim":r={mobileContentWidth:{classNamePrefix:"em-mob-width-",value:l.mobileContentWidth,dim:t[n]}};break;case"mobileVerticalAlign":r={[n]:{classNamePrefix:"em-mob-vertical_align-",value:t[n]}};break;default:r=t}a({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:r})},autoComplete:"off",className:"element-controls"},p&&l.createElement(i.A,{title:t("To change the appearance of the element on the mobile device, edit the fields below. If the fields remain empty, the desktop styles will be applied to the mobile version."),placement:"bottom"},l.createElement(u.A,{className:"selected_form-mobile-props-title",message:t("Appearance on mobile devices"),type:"info"})),n===D.ND&&r.styles?l.createElement("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",style:{display:n===D.ND&&r.styles?"block":"none"}},l.createElement(i.A,{title:t("To change the appearance of the element on the mobile device, edit the fields below. If the fields remain empty, the desktop styles will be applied to the mobile version."),placement:"bottom"},l.createElement(u.A,{className:"selected_form-mobile-props-title",message:t("Appearance on mobile devices"),type:"info"})),l.createElement("div",{className:"selected_form-mobile-props-wrapper"},l.createElement(b.A,{gutter:10,style:{marginBottom:20}},l.createElement(h.A,{span:12},l.createElement(oo,{form:o,name:"mobileWidth",elementSettings:e})),l.createElement(h.A,{span:12})),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},t("Alignments")),l.createElement(bo,{form:o,elementSettings:e}),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},t("Display control")),l.createElement(vo,{elementSettings:e,form:o}),c.formFieldAmpVisibilityEnabled&&e.ampShow&&l.createElement(l.Fragment,null,l.createElement("div",{className:"form-group-title"},t("AMP visibility")),l.createElement(Ro,null)))):l.createElement("div",{id:"selected_element_form_desktop_props"},l.createElement("div",{className:"selected_form-props-wrapper"},l.createElement(S.A.Item,{style:{marginBottom:"0"}},l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:t("Float block width"),placement:"bottom"},l.createElement(S.A.Item,{name:"width"},l.createElement(Ee.A,{min:0,placeholder:t("Float block width"),prefix:l.createElement(fe.A,null),addonAfter:l.createElement(S.A.Item,{name:"widthDim",noStyle:!0},_n)})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:t("Column gap"),placement:"bottom"},l.createElement(S.A.Item,{name:"gap"},l.createElement(Ee.A,{min:0,placeholder:t("Column gap"),prefix:l.createElement(yn.A,null),addonAfter:l.createElement(S.A.Item,{name:"widthDim",noStyle:!0},Cn)})))))),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},t("Vertical alignment")),l.createElement(Ql,{form:o,elementSettings:e}),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},t("Display control")),l.createElement(vo,{elementSettings:e,form:o}),c.formFieldAmpVisibilityEnabled&&e.ampShow&&l.createElement(l.Fragment,null,l.createElement("div",{className:"form-group-title"},t("AMP visibility")),l.createElement(Ro,null)))))},{Option:kn}=k.A,xn=l.createElement(k.A,{className:"select-after",getPopupContainer:e=>e.parentNode},l.createElement(kn,{value:"px"},"px"),l.createElement(kn,{value:"%"},"%")),{useToken:Bn}=n.A,Tn=({elementSettings:e})=>{var t;const{__:a}=(0,y.s9)(),o=(0,Me.XW)(),[n]=S.A.useForm(),[r,s]=(0,l.useState)({}),[d,c]=(0,l.useState)({}),[p,E]=(0,l.useState)(!0),[v,A]=(0,l.useState)({}),[_,x]=(0,l.useState)({}),[B,T]=(0,l.useState)(!0),R=(0,f.d4)(Ie.Ct),N=(0,f.d4)(Ie.CS),L=(0,Y.rD)(),[P,I]=(0,l.useState)(""===(null===(t=e.backgroundImage)||void 0===t?void 0:t[0].value)),M=(0,f.d4)(Ie.Fv),O=(0,f.d4)(Ie.yy),V=M&&"bottom"!==O,{token:F}=Bn(),H=(0,l.useRef)(null),j=(0,l.useRef)(null),[W,G]=(0,l.useState)(!1),[U,q]=(0,l.useState)(!1),[Z,X]=(0,l.useState)(!1),[K,$]=(0,l.useState)(!1),[Q,J]=(0,l.useState)(!1),[ee,te]=(0,l.useState)(!1),[ae,le]=(0,l.useState)(!1),[oe,ne]=(0,l.useState)(!1),[re,ie]=(0,l.useState)(!1),[se,de]=(0,l.useState)(!1),[me,ce]=(0,l.useState)(!1),[ue,pe]=(0,l.useState)(!1),[ge,be]=(0,l.useState)(!1),[he,Ee]=(0,l.useState)(!1),[ve,Ae]=(0,l.useState)(""),[_e,Ce]=(0,l.useState)("https://"),[Se,we]=(0,l.useState)({}),[ke,xe]=(0,l.useState)(!1),Be=[{label:a("Not defined"),value:"none"},{label:a("Do not repeat background (no-repeat)"),value:"no-repeat"},{label:a("Repeat background (repeat)"),value:"repeat"},{label:a("Repeat background horizontally (repeat-x)"),value:"repeat-x"},{label:a("Repeat background vertically (repeat-y)"),value:"repeat-y"}],Te=[{label:a("Not defined"),value:""},{label:a("Contain"),value:"contain"},{label:a("Cover"),value:"cover"}];(0,l.useEffect)((()=>{if(e){var t,a,l,o,r,i,d,m,u,p,g,b,h,f,v,y,_,C,S,w,k,B,R,N,L,P,M,O,V,F,D,H,j,z,W,U,Z,K,Y,Q,ee,ae,oe,re,se,me,ue,ge,he,fe,ve,ye,Ae,_e,Se,we,ke,xe,Be,Te,Re,Ne,Le,Pe,Ie,Me,Oe,Ve,Fe,De,He,je,ze,We,Ge,Ue,qe,Ze,Xe,Ke,Ye,$e,Qe,Je,et,tt,at,lt,ot,nt,rt,it,st,dt,mt,ct,ut,pt,gt,bt,ht,Et,ft,vt,yt,At,_t,Ct,St,wt,kt,xt,Bt,Tt;const Rt=e.border||{},Nt=e.boxShadow||{},Lt=e.mobileBorder||{},Pt=e.mobileBoxShadow||{},It=e.mobileBorderRadius||{},Mt=e.mobilePadding||{},Ot=e.mobileBoxShadow||{},Vt=e.mobileAlign||{},Ft=e.mobileBackgroundImage||[];s(Rt),c(Nt),A(Lt),x(Pt);const Dt=Object.keys(Rt).find((e=>{var t,a,l;return(null===(t=Rt[e])||void 0===t?void 0:t.width)||(null===(a=Rt[e])||void 0===a?void 0:a.style)||(null===(l=Rt[e])||void 0===l?void 0:l.color)})),Ht=Object.keys(Lt).find((e=>{var t,a,l;return(null===(t=Lt[e])||void 0===t?void 0:t.width)||(null===(a=Lt[e])||void 0===a?void 0:a.style)||(null===(l=Lt[e])||void 0===l?void 0:l.color)}));e.href&&("https://"===e.href.substring(0,8)||"http://"===e.href.substring(0,7)?Ce("https://"):"mailto:"===e.href.substring(0,7)?Ce("mailto:"):"tel:"===e.href.substring(0,4)?Ce("tel:"):"sms:"===e.href.substring(0,4)?Ce("sms:"):"ftp://"===e.href.substring(0,6)?Ce("ftp://"):"skype:"===e.href.substring(0,6)?Ce("skype:"):"viber:"===e.href.substring(0,6)?Ce("viber:"):Ce("")),n.setFieldsValue({...e,href:e.href?e.href:"https://",width:null===(t=e.width)||void 0===t?void 0:t.value,widthDim:null===(a=e.width)||void 0===a?void 0:a.dim,height:null===(l=e.height)||void 0===l?void 0:l.value,heightDim:null===(o=e.height)||void 0===o?void 0:o.dim,backgroundImage:null===(r=e.backgroundImage)||void 0===r?void 0:r[0].value,show:e.show?e.show:"all",borderPosition:Dt||"all",borderWidth:(null===(i=Rt[Dt])||void 0===i?void 0:i.width)||"",borderColor:(null===(d=Rt[Dt])||void 0===d?void 0:d.color)||"",borderStyle:(null===(m=Rt[Dt])||void 0===m?void 0:m.style)||"solid",paddingTop:ga(null===(u=e.padding)||void 0===u?void 0:u.all)||ga(null===(p=e.padding)||void 0===p?void 0:p.top),paddingLeft:ga(null===(g=e.padding)||void 0===g?void 0:g.all)||ga(null===(b=e.padding)||void 0===b?void 0:b.left),paddingRight:ga(null===(h=e.padding)||void 0===h?void 0:h.all)||ga(null===(f=e.padding)||void 0===f?void 0:f.right),paddingBottom:ga(null===(v=e.padding)||void 0===v?void 0:v.all)||ga(null===(y=e.padding)||void 0===y?void 0:y.bottom),paddingLeftRight:ga(null===(_=e.padding)||void 0===_?void 0:_.left)||ga(null===(C=e.padding)||void 0===C?void 0:C.right),paddingTopBottom:ga(null===(S=e.padding)||void 0===S?void 0:S.top)||ga(null===(w=e.padding)||void 0===w?void 0:w.bottom),borderRadiusAll:ga(null===(k=e.borderRadius)||void 0===k?void 0:k.all),borderRadiusTopLeft:ga(null===(B=e.borderRadius)||void 0===B?void 0:B.topLeft),borderRadiusBottomLeft:ga(null===(R=e.borderRadius)||void 0===R?void 0:R.bottomLeft),borderRadiusTopRight:ga(null===(N=e.borderRadius)||void 0===N?void 0:N.topRight),borderRadiusBottomRight:ga(null===(L=e.borderRadius)||void 0===L?void 0:L.bottomRight),boxShadowInset:ga(null===(P=e.boxShadow)||void 0===P?void 0:P.inset)||!1,boxShadowHOffset:ga(null===(M=e.boxShadow)||void 0===M?void 0:M.hOffset),boxShadowVOffset:ga(null===(O=e.boxShadow)||void 0===O?void 0:O.vOffset),boxShadowBlurRadius:ga(null===(V=e.boxShadow)||void 0===V?void 0:V.blurRadius),boxShadowSpreadRadius:ga(null===(F=e.boxShadow)||void 0===F?void 0:F.spreadRadius),boxShadowColor:ga(null===(D=e.boxShadow)||void 0===D?void 0:D.color),mobileWidth:ba(null===(H=e.mobileWidth)||void 0===H?void 0:H.value),mobileWidthDim:null===(j=e.mobileWidth)||void 0===j?void 0:j.dim,mobileHeight:ba(null===(z=e.mobileHeight)||void 0===z?void 0:z.value),mobileHeightDim:null===(W=e.mobileHeight)||void 0===W?void 0:W.dim,mobileBorderPosition:Ht||"all",mobileBorderWidth:null!==(null===(U=Lt[Ht])||void 0===U?void 0:U.width)?null===(Z=Lt[Ht])||void 0===Z?void 0:Z.width:"",mobileBorderColor:(null===(K=Lt[Ht])||void 0===K?void 0:K.color)||"",mobileBorderStyle:(null===(Y=Lt[Ht])||void 0===Y?void 0:Y.style)||"",mobileBorderRadiusAll:ga(null===(Q=e.mobileBorderRadius)||void 0===Q?void 0:Q.all),mobileRadiusTopLeft:ga(null!==(null===(ee=e.mobileBorderRadius)||void 0===ee?void 0:ee.topLeft)?null===(ae=e.mobileBorderRadius)||void 0===ae?void 0:ae.topLeft:null===(oe=e.mobileBorderRadius)||void 0===oe?void 0:oe.all),mobileRadiusBottomLeft:ga(null!==(null===(re=e.mobileBorderRadius)||void 0===re?void 0:re.bottomLeft)?null===(se=e.mobileBorderRadius)||void 0===se?void 0:se.bottomLeft:null===(me=e.mobileBorderRadius)||void 0===me?void 0:me.all),mobileRadiusTopRight:ga(null!==(null===(ue=e.mobileBorderRadius)||void 0===ue?void 0:ue.topRight)?null===(ge=e.mobileBorderRadius)||void 0===ge?void 0:ge.topRight:null===(he=e.mobileBorderRadius)||void 0===he?void 0:he.all),mobileRadiusBottomRight:ga(null!==(null===(fe=e.mobileBorderRadius)||void 0===fe?void 0:fe.bottomRight)?null===(ve=e.mobileBorderRadius)||void 0===ve?void 0:ve.bottomRight:null===(ye=e.mobileBorderRadius)||void 0===ye?void 0:ye.all),mobileBoxShadowInset:ga(null===Ot||void 0===Ot?void 0:Ot.inset)||!1,mobileBoxShadowHOffset:ga(null===Ot||void 0===Ot?void 0:Ot.hOffset),mobileBoxShadowVOffset:ga(null===Ot||void 0===Ot?void 0:Ot.vOffset),mobileBoxShadowBlurRadius:ga(null===Ot||void 0===Ot?void 0:Ot.blurRadius),mobileBoxShadowSpreadRadius:ga(null===Ot||void 0===Ot?void 0:Ot.spreadRadius),mobileBoxShadowColor:ga(null===Ot||void 0===Ot?void 0:Ot.color),mobileAlign:ga(null===Vt||void 0===Vt?void 0:Vt.value),mobileVerticalAlign:ga(null===(Ae=e.mobileVerticalAlign)||void 0===Ae?void 0:Ae.value),mobileBackgroundColor:ga("none"!==(null===(_e=e.mobileBackgroundColor)||void 0===_e?void 0:_e.value)?null===(Se=e.mobileBackgroundColor)||void 0===Se?void 0:Se.value:""),mobileBackgroundImage:"none"!==(null===(we=Ft[0])||void 0===we?void 0:we.value)?null===(ke=Ft[0])||void 0===ke?void 0:ke.value:"",mobileBackgroundPositionX:ga(null===(xe=e.mobileBackgroundPositionX)||void 0===xe?void 0:xe.value),mobileBackgroundPositionY:ga(null===(Be=e.mobileBackgroundPositionY)||void 0===Be?void 0:Be.value),mobileBackgroundRepeat:null!==(Te=e.mobileBackgroundRepeat)&&void 0!==Te&&Te.value?null===(Re=e.mobileBackgroundRepeat)||void 0===Re?void 0:Re.value:"none",mobilePaddingTop:ga(Mt.all)||ga(Mt.top),mobilePaddingLeft:ga(Mt.all)||ga(Mt.left),mobilePaddingRight:ga(Mt.all)||ga(Mt.right),mobilePaddingBottom:ga(Mt.all)||ga(Mt.bottom),mobilePaddingTopBottom:ga(Mt.top)||ga(Mt.bottom),mobilePaddingLeftRight:ga(Mt.left)||ga(Mt.right),exportAsPicture:null===e||void 0===e?void 0:e.exportAsPicture,mobileFontSize:ga(null===(Ne=e.mobileFontSize)||void 0===Ne?void 0:Ne.value)}),!ga(null===(Le=e.borderRadius)||void 0===Le?void 0:Le.all)&&(ga(null===(Pe=e.borderRadius)||void 0===Pe?void 0:Pe.topLeft)||ga(null===(Ie=e.borderRadius)||void 0===Ie?void 0:Ie.bottomLeft)||ga(null===(Me=e.borderRadius)||void 0===Me?void 0:Me.topRight)||ga(null===(Oe=e.borderRadius)||void 0===Oe?void 0:Oe.bottomRight))?E(!1):E(!0),ga(It.topLeft)||ga(It.bottomLeft)||ga(It.topRight)||ga(It.bottomRight)?T(!1):T(!0),I(""===(null===(Ve=e.backgroundImage)||void 0===Ve?void 0:Ve[0].value)),ga(null===(Fe=e.padding)||void 0===Fe?void 0:Fe.all)||!(ga(null===(De=e.padding)||void 0===De?void 0:De.top)||ga(null===(He=e.padding)||void 0===He?void 0:He.right)||ga(null===(je=e.padding)||void 0===je?void 0:je.bottom)||ga(null===(ze=e.padding)||void 0===ze?void 0:ze.left))||(null===(We=e.padding)||void 0===We?void 0:We.top)===(null===(Ge=e.padding)||void 0===Ge?void 0:Ge.bottom)&&(null===(Ue=e.padding)||void 0===Ue?void 0:Ue.right)===(null===(qe=e.padding)||void 0===qe?void 0:qe.left)?G(!0):G(!1),ga(Mt.all)||!(ga(Mt.top)||ga(Mt.right)||ga(Mt.bottom)||ga(Mt.left))||Mt.top===Mt.bottom&&Mt.right===Mt.left?q(!0):q(!1),X(!(null===(Ze=Rt[Dt])||void 0===Ze||!Ze.width)||!(null===(Xe=Rt[Dt])||void 0===Xe||!Xe.style)||!(null===(Ke=Rt[Dt])||void 0===Ke||!Ke.color)),$(!(null===(Ye=Lt[Ht])||void 0===Ye||!Ye.width)||!(null===($e=Lt[Ht])||void 0===$e||!$e.style)||!(null===(Qe=Lt[Ht])||void 0===Qe||!Qe.color)),J(!(null===(Je=e.borderRadius)||void 0===Je||!Je.all)||!(null===(et=e.borderRadius)||void 0===et||!et.topLeft)||!(null===(tt=e.borderRadius)||void 0===tt||!tt.bottomLeft)||!(null===(at=e.borderRadius)||void 0===at||!at.topRight)||!(null===(lt=e.borderRadius)||void 0===lt||!lt.bottomRight)),te(void 0!==(null===(ot=e.mobileBorderRadius)||void 0===ot?void 0:ot.all)||void 0!==(null===(nt=e.mobileBorderRadius)||void 0===nt?void 0:nt.topLeft)||void 0!==(null===(rt=e.mobileBorderRadius)||void 0===rt?void 0:rt.bottomLeft)||void 0!==(null===(it=e.mobileBorderRadius)||void 0===it?void 0:it.topRight)||void 0!==(null===(st=e.mobileBorderRadius)||void 0===st?void 0:st.bottomRight)),le(!!e.boxShadow),ne(!(null===(dt=e.mobileBoxShadow)||void 0===dt||!dt.blurRadius)||!(null===(mt=e.mobileBoxShadow)||void 0===mt||!mt.color)||!(null===(ct=e.mobileBoxShadow)||void 0===ct||!ct.hOffset)||!(null===(ut=e.mobileBoxShadow)||void 0===ut||!ut.inset)||!(null===(pt=e.mobileBoxShadow)||void 0===pt||!pt.spreadRadius)||!(null===(gt=e.mobileBoxShadow)||void 0===gt||!gt.vOffset)),ie(!(null===(bt=e.mobileWidth)||void 0===bt||!bt.value)||!(null===(ht=e.mobileHeight)||void 0===ht||!ht.value)),de(!!e.backgroundColor||!(null===(Et=e.backgroundImage)||void 0===Et||!Et[0].value)||!!e.backgroundPositionY||!!e.backgroundPositionX||"repeat"!==e.backgroundRepeat||!e.backgroundRepeat,!!e.backgroundSize),ce(!(null===(ft=e.mobileBackgroundColor)||void 0===ft||!ft.value)),pe(!(null===(vt=e.mobileFontSize)||void 0===vt||!vt.value)||!!e.showOnMobile),be(!(null===(yt=e.padding)||void 0===yt||!yt.all)||!(null===(At=e.padding)||void 0===At||!At.top)||!(null===(_t=e.padding)||void 0===_t||!_t.bottom)||!(null===(Ct=e.padding)||void 0===Ct||!Ct.left)||!(null===(St=e.padding)||void 0===St||!St.right)),Ee(!(null===(wt=e.mobilePadding)||void 0===wt||!wt.all)||!(null===(kt=e.mobilePadding)||void 0===kt||!kt.top)||!(null===(xt=e.mobilePadding)||void 0===xt||!xt.bottom)||!(null===(Bt=e.mobilePadding)||void 0===Bt||!Bt.left)||!(null===(Tt=e.mobilePadding)||void 0===Tt||!Tt.right))}}),[n,e,V]);const Re=e=>{n.setFieldValue("href","mergetag"!==e?e:""),Ce(e)},Ne=({target:e})=>{const{selectionStart:t,selectionEnd:a}=e;e&&we({target:e,selection:{start:t,end:a}})};return(0,l.useEffect)((()=>{var t;xe(!(null===(t=e.textReplacer)||void 0===t||!t.length))}),[e]),l.createElement(S.A,{form:n,layout:"vertical",name:"selected_button_form",initialValues:{backgroundColor:"",backgroundImage:"",backgroundPositionX:"",backgroundPositionY:"",backgroundRepeat:"",backgroundSize:"",exportAsPicture:!1,width:"",height:"",widthDim:"",heightDim:"",align:"",valign:"",border:"",boxShadow:"",show:"all",borderPosition:"",borderColor:"",borderWidth:"",borderStyle:"",paddingTop:"",paddingLeft:"",paddingRight:"",paddingBottom:"",borderRadiusAll:"",RadiusTopLeft:"",RadiusBottomLeft:"",RadiusTopRight:"",RadiusBottomRight:"",mobileWidth:"",mobileWidthDim:"",mobileHeight:"",mobileHeightDim:"",mobileBorder:"",mobileBorderPosition:"",mobileBorderColor:"",mobileBorderWidth:"",mobileBorderStyle:"",mobileBoxShadow:"",mobileAlign:"",mobileVerticalAlign:"",mobileBackgroundColor:"",mobileBackgroundImage:"",mobilePaddingTop:"",mobilePaddingLeft:"",mobilePaddingRight:"",mobilePaddingBottom:"",borderRadiusTopLeft:"",borderRadiusBottomLeft:"",borderRadiusTopRight:"",borderRadiusBottomRight:"",href:"https://"},onValuesChange:t=>{const a=n.getFieldsValue(!0),l=Object.keys(t)[0];let i;switch(Ae("%"===n.getFieldsValue(!0).widthDim?100:""),l){case"exportAsPicture":i={exportAsPicture:a.exportAsPicture};break;case"boxShadowInset":case"boxShadowHOffset":case"boxShadowVOffset":case"boxShadowBlurRadius":case"boxShadowSpreadRadius":case"boxShadowColor":i={boxShadow:{hOffset:a.boxShadowHOffset,vOffset:a.boxShadowVOffset,blurRadius:a.boxShadowBlurRadius,spreadRadius:a.boxShadowSpreadRadius,color:a.boxShadowColor,inset:a.boxShadowInset}};break;case"borderStyle":i={border:{[a.borderPosition]:{...r[a.borderPosition],style:t[l]}}},"all"===a.borderPosition?s((e=>({...D.iV,[a.borderPosition]:{...e[a.borderPosition],style:t[l]}}))):s((e=>({...e,[a.borderPosition]:{...e[a.borderPosition],style:t[l]}})));break;case"borderColor":i={border:{[a.borderPosition]:{...r[a.borderPosition],color:t[l]}}},"all"===a.borderPosition?s((e=>({...D.iV,[a.borderPosition]:{...e[a.borderPosition],color:t[l]}}))):s((e=>({...e,[a.borderPosition]:{...e[a.borderPosition],color:t[l]}})));break;case"borderWidth":i={border:{[a.borderPosition]:{...r[a.borderPosition],width:t[l]}}},"all"===a.borderPosition?s((e=>({...D.iV,[a.borderPosition]:{...e[a.borderPosition],width:t[l]}}))):s((e=>({...e,[a.borderPosition]:{...e[a.borderPosition],width:t[l]}})));break;case"borderPosition":n.setFieldsValue({borderWidth:r[t[l]].width||"",borderColor:r[t[l]].color||"",borderStyle:r[t[l]].style||""});break;case"width":i={[l]:{value:t[l],dim:a.widthDim}};break;case"height":i={[l]:{value:t[l],dim:a.heightDim}};break;case"widthDim":i={width:{value:a.width,dim:t[l]}};break;case"heightDim":i={height:{value:a.height,dim:t[l]}};break;case"backgroundImage":I(""===t[l]),i={[l]:[{...e.backgroundImage[0],value:t[l]}],backgroundSize:"cover"};break;case"paddingTop":case"paddingLeft":case"paddingRight":case"paddingBottom":i={padding:{[ma[l]]:+t[l]}};break;case"paddingTopBottom":i={padding:{top:+t[l],bottom:+t[l]}},a.paddingTop=a.paddingBottom=+t[l];break;case"paddingLeftRight":i={padding:{left:+t[l],right:+t[l]}},a.paddingLeft=a.paddingRight=+t[l];break;case"borderRadiusAll":case"borderRadiusTopLeft":case"borderRadiusBottomLeft":case"borderRadiusTopRight":case"borderRadiusBottomRight":i={borderRadius:{[D.wF[l]]:+t[l]}};break;case"mobileWidth":i={[l]:{classNamePrefix:"em-mob-width-",value:t[l],dim:a.mobileWidthDim}};break;case"mobileWidthDim":i={mobileWidth:{classNamePrefix:"em-mob-width-",value:a.mobileWidth,dim:t[l]}};break;case"mobileHeight":i={[l]:{classNamePrefix:"em-mob-height-",value:t[l],dim:a.mobileHeightDim},mobileLineHeight:{classNamePrefix:"em-mob-line_height-",value:t[l],dim:a.mobileHeightDim}};break;case"mobileHeightDim":i={mobileHeight:{classNamePrefix:"em-mob-height-",value:a.mobileHeight,dim:t[l]}};break;case"mobileBorderStyle":i={mobileBorder:{[a.mobileBorderPosition]:{...v[a.mobileBorderPosition],style:t[l],classNamePrefix:"em-mob-border_"+a.mobileBorderPosition+"-"}}},"all"===a.mobileBorderPosition?A((e=>({...D.iV,[a.mobileBorderPosition]:{...e[a.mobileBorderPosition],style:t[l],classNamePrefix:"em-mob-border_"+a.mobileBorderPosition+"-"}}))):A((e=>({...e,[a.mobileBorderPosition]:{...e[a.mobileBorderPosition],style:t[l],classNamePrefix:"em-mob-border_"+a.mobileBorderPosition+"-"}})));break;case"mobileBorderColor":i={mobileBorder:{[a.mobileBorderPosition]:{...v[a.mobileBorderPosition],color:t[l],classNamePrefix:"em-mob-border_"+a.mobileBorderPosition+"-"}}},"all"===a.mobileBorderPosition?A((e=>({...D.iV,[a.mobileBorderPosition]:{...e[a.mobileBorderPosition],color:t[l],classNamePrefix:"em-mob-border_"+a.mobileBorderPosition+"-"}}))):A((e=>({...e,[a.mobileBorderPosition]:{...e[a.mobileBorderPosition],color:t[l],classNamePrefix:"em-mob-border_"+a.mobileBorderPosition+"-"}})));break;case"mobileBorderWidth":i={mobileBorder:{[a.mobileBorderPosition]:{...v[a.mobileBorderPosition],width:t[l],classNamePrefix:"em-mob-border_"+a.mobileBorderPosition+"-"}}},"all"===a.mobileBorderPosition?A((e=>({...D.iV,[a.mobileBorderPosition]:{...e[a.mobileBorderPosition],width:t[l],classNamePrefix:"em-mob-border_"+a.mobileBorderPosition+"-"}}))):A((e=>({...e,[a.mobileBorderPosition]:{...e[a.mobileBorderPosition],width:t[l],classNamePrefix:"em-mob-border_"+a.mobileBorderPosition+"-"}})));break;case"mobileBorderPosition":n.setFieldsValue({mobileBorderWidth:v[t[l]].width||"",mobileBorderColor:v[t[l]].color||"",mobileBorderStyle:v[t[l]].style||""});break;case"mobileBorderRadiusAll":case"mobileRadiusTopLeft":case"mobileRadiusBottomLeft":case"mobileRadiusTopRight":case"mobileRadiusBottomRight":i={mobileBorderRadius:{[ua[l]]:t[l],classNamePrefix:"em-mob-border_radius_"+ua[l]+"-"}};break;case"mobileBoxShadowInset":case"mobileBoxShadowHOffset":case"mobileBoxShadowVOffset":case"mobileBoxShadowBlurRadius":case"mobileBoxShadowSpreadRadius":case"mobileBoxShadowColor":i={mobileBoxShadow:{hOffset:a.mobileBoxShadowHOffset,vOffset:a.mobileBoxShadowVOffset,blurRadius:a.mobileBoxShadowBlurRadius,spreadRadius:a.mobileBoxShadowSpreadRadius,color:a.mobileBoxShadowColor,inset:a.mobileBoxShadowInset,classNamePrefix:"em-mob-box_shadow-"}};break;case"mobileAlign":i={[l]:{classNamePrefix:"em-mob-table_align-",value:t[l]}};break;case"mobileTextAlign":i={[l]:{classNamePrefix:"em-mob-text_align-",value:t[l]}};break;case"mobileVerticalAlign":i={[l]:{classNamePrefix:"em-mob-vertical_align-",value:t[l]}};break;case"mobileBackgroundColor":i={[l]:{classNamePrefix:"em-mob-background_color-",value:t[l]}};break;case"mobileBackgroundPositionX":i={[l]:{classNamePrefix:"em-mob-background_position_x-",value:t[l]}};break;case"mobileBackgroundPositionY":i={[l]:{classNamePrefix:"em-mob-background_position_x-",value:t[l]}};break;case"mobileBackgroundRepeat":i={[l]:{classNamePrefix:"em-mob-background_repeat-",value:t[l]}};break;case"mobilePaddingTop":case"mobilePaddingLeft":case"mobilePaddingRight":case"mobilePaddingBottom":i={mobilePadding:{all:null,top:""!==a.mobilePaddingTop?a.mobilePaddingTop:null,right:""!==a.mobilePaddingRight?a.mobilePaddingRight:null,bottom:""!==a.mobilePaddingBottom?a.mobilePaddingBottom:null,left:""!==a.mobilePaddingLeft?a.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;case"mobilePaddingTopBottom":a.mobilePaddingTop=a.mobilePaddingBottom=t[l],i={mobilePadding:{all:null,top:""!==a.mobilePaddingTop?a.mobilePaddingTop:null,right:""!==a.mobilePaddingRight?a.mobilePaddingRight:null,bottom:""!==a.mobilePaddingBottom?a.mobilePaddingBottom:null,left:""!==a.mobilePaddingLeft?a.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;case"mobilePaddingLeftRight":a.mobilePaddingLeft=a.mobilePaddingRight=t[l],i={mobilePadding:{all:null,top:""!==a.mobilePaddingTop?a.mobilePaddingTop:null,right:""!==a.mobilePaddingRight?a.mobilePaddingRight:null,bottom:""!==a.mobilePaddingBottom?a.mobilePaddingBottom:null,left:""!==a.mobilePaddingLeft?a.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;case"mobileFontSize":i={[l]:{classNamePrefix:"em-mob-font_size-",value:t[l],dim:a.mobileFontSizeDim}};break;case"href":let o=t[l];"https://http"===o.substring(0,12)&&(o=o.substring(8,o.length),a.href=o),i={[l]:o},"https://"===t[l].substring(0,8)||"http://"===t[l].substring(0,7)?Ce("https://"):"mailto:"===t[l].substring(0,7)?Ce("mailto:"):"tel:"===t[l].substring(0,4)?Ce("tel:"):"sms:"===t[l].substring(0,4)?Ce("sms:"):"ftp://"===t[l].substring(0,6)?Ce("ftp://"):"skype:"===t[l].substring(0,6)?Ce("skype:"):"viber:"===t[l].substring(0,6)?Ce("viber:"):Ce("");break;default:i=t}"borderPosition"!==l&&o({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:i})},autoComplete:"off",className:"element-controls"},!V&&l.createElement(i.A,{title:a("To change the appearance of the element on the mobile device, edit the fields below. If the fields remain empty, the desktop styles will be applied to the mobile version."),placement:"bottom"},l.createElement(u.A,{className:"selected_form-mobile-props-title",message:a("Appearance on mobile devices"),type:"info"})),V?l.createElement(zo,{form:n,elementSettings:e,showAddParagraph:!1,isButton:!0}):l.createElement(l.Fragment,null,R===D.ND&&N.styles?l.createElement("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props"},l.createElement("div",{className:"selected_form-mobile-props-wrapper"},l.createElement(b.A,{gutter:20,style:{paddingBottom:4}},l.createElement(h.A,{span:12},l.createElement(go,{form:n,elementSettings:e,imgParent:!0})),L.formButtonFieldTextAlignEnabled&&l.createElement(h.A,{span:12,style:{textAlign:"right"}},l.createElement(Go,{form:n,name:"mobileTextAlign",elementSettings:e,imgParent:!0}))),!!e.showOnMobile&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider",style:{marginBottom:24}}),l.createElement(i.A,{trigger:["hover"],title:a("Hyperlink URL"),placement:"bottom"},l.createElement(S.A.Item,{name:"href",style:{marginBottom:F.formItemMarginBottomMD+4}},l.createElement(w.A,{addonBefore:l.createElement(Zt,{linkProtocol:_e,handleLinkProtocolsChange:Re,__:a}),placeholder:a("Hyperlink URL"),allowClear:!0,prefix:l.createElement(qt,{linkProtocol:_e})})))),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},a("Text"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{pe((e=>!e)),ue&&(t.mobileFontSize="",o({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileFontSize:{value:null,dim:"px",classNamePrefix:"em-mob-font_size-"}}}))}))}},ue?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),ue&&l.createElement(l.Fragment,null,!!e.showOnMobile&&l.createElement(jo,{form:n,elementSettings:e,setLinkProtocol:Ce,linkProtocol:_e,showAddParagraph:!1,isButton:!0}),l.createElement(b.A,{gutter:10,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(Oo,null)))),l.createElement(m.A,{className:"selected-td-form__divider"}),L.formButtonFieldPaddingsEnabled&&l.createElement(l.Fragment,null,l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},a("Padding"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{Ee((e=>!e)),he&&(t.mobilePaddingLeftRight="",t.mobilePaddingLeft="",t.mobilePaddingRight="",t.mobilePaddingTopBottom="",t.mobilePaddingTop="",t.mobilePaddingBottom="",o({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobilePadding:{all:null,top:null,right:null,bottom:null,left:null,classNamePrefix:"em-mob-padding_"}}}))}))}},he?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),he&&l.createElement(b.A,{gutter:10,style:{paddingBottom:8}},l.createElement(l.Fragment,null,l.createElement(dn,{form:n,elementSettings:e,mobilePaddingsExt:U,setMobilePaddingsExt:q}))),l.createElement(m.A,{className:"selected-td-form__divider"})),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},a("Size"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{ie((e=>!e)),re&&(t.mobileWidth="",t.mobileHeight="",o({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileWidth:{value:null,dim:"px",classNamePrefix:"em-mob-width-"},mobileHeight:{value:null,dim:"px",classNamePrefix:"em-mob-height-"}}}))}))}},re?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),re&&l.createElement(b.A,{gutter:10,style:{paddingBottom:8}},l.createElement(h.A,{span:12},l.createElement("div",{style:{marginBottom:2*F.formItemMarginBottomXS}},l.createElement(i.A,{title:a("Width"),placement:"bottom"},l.createElement(oo,{form:n,name:"mobileWidth",elementSettings:e})))),l.createElement(h.A,{span:12},l.createElement("div",{style:{marginBottom:2*F.formItemMarginBottomXS}},l.createElement(i.A,{title:a("Height"),placement:"bottom"},l.createElement(ro,{form:n,name:"mobileHeight",elementSettings:e}))))),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},a("Background"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{ce((e=>!e)),t.mobileBackgroundColor=me?"":e.commonStyles.buttons.backgroundColor||"#1C52DC",o({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBackgroundColor:{classNamePrefix:"em-mob-background_color-",value:t.mobileBackgroundColor}}})}))}},me?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),me&&l.createElement(l.Fragment,null,l.createElement("div",{style:{marginBottom:(L.formButtonFieldBackgroundImageEnabled,F.formItemMarginBottomMD+4)}},l.createElement(Zo,{form:n,elementSettings:e,label:a("Background color")}))),L.formFieldBorderEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},a("Borders"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{$((e=>!e)),K&&(t.mobileBorderWidth=null,t.mobileBorderColor="",t.mobileBorderStyle=""),A((e=>({...D.iV,[t.mobileBorderPosition]:{...e[t.mobileBorderPosition],width:t.mobileBorderWidth,color:t.mobileBorderColor,style:t.mobileBorderStyle}}))),o({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorder:{all:{color:t.mobileBorderColor,style:t.mobileBorderStyle,width:t.mobileBorderWidth,classNamePrefix:"em-mob-border_"+t.mobileBorderPosition+"-"}}}})}))}},K?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),K&&l.createElement("div",{style:{marginBottom:4}},l.createElement(mo,{mobileBorders:v}))),L.formFieldBorderRadiusEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},a("Border radius"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{te((e=>!e)),ee?(t.mobileBorderRadiusAll=null,T(!0)):t.mobileBorderRadiusAll=5,o({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorderRadius:{all:t.mobileBorderRadiusAll,classNamePrefix:"em-mob-border_radius_all-"}}})}))}},ee?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),ee&&l.createElement("div",{style:{marginBottom:4}},l.createElement(co,{form:n,oneMobileBorderRadiusValue:B,setOneMobileBorderRadiusValue:T,elementSettings:e}))),L.formFieldBoxShadowEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},a("Box shadow"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{ne((e=>!e)),oe?(t.mobileBoxShadowInset=!1,t.mobileBoxShadowHOffset=null,t.mobileBoxShadowVOffset=null,t.mobileBoxShadowBlurRadius=null,t.mobileBoxShadowSpreadRadius=null,t.mobileBoxShadowColor=""):(t.mobileBoxShadowInset=!1,t.mobileBoxShadowHOffset=5,t.mobileBoxShadowVOffset=5,t.mobileBoxShadowBlurRadius=10,t.mobileBoxShadowSpreadRadius=-5,t.mobileBoxShadowColor="#000000"),o({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBoxShadow:{blurRadius:t.mobileBoxShadowBlurRadius,color:t.mobileBoxShadowColor,hOffset:t.mobileBoxShadowHOffset,inset:t.mobileBoxShadowInset,spreadRadius:t.mobileBoxShadowSpreadRadius,vOffset:t.mobileBoxShadowVOffset,classNamePrefix:"em-mob-box_shadow-"}}})}))}},oe?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),oe&&l.createElement("div",{style:{marginBottom:4}},l.createElement(uo,{mobileBoxShadow:_,form:n,elementSettings:e}))),L.formFieldAmpVisibilityEnabled&&e.ampShow&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},a("AMP visibility")),l.createElement(b.A,{gutter:20,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(Ro,null)))),L.formFieldAmpVisibilityEnabled&&e.isAmp&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},a("AMP visibility")),l.createElement(b.A,{gutter:20,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(Ro,null)))))):l.createElement("div",{id:"selected_element_form_desktop_props"},l.createElement(u.A,{className:"selected_form-desktop-props-title",message:a("Appearance on mobile devices"),type:"info"}),l.createElement("div",{className:"selected_form-props-wrapper"},l.createElement(b.A,{gutter:20,style:{paddingBottom:4}},l.createElement(h.A,{span:12},l.createElement($l,{form:n,elementSettings:e})),L.formButtonFieldTextAlignEnabled&&l.createElement(h.A,{span:12,style:{textAlign:"right"}},l.createElement(vt,{form:n,name:"textAlign",elementSettings:e}))),l.createElement(m.A,{className:"selected-td-form__divider",style:{marginBottom:24}}),l.createElement(i.A,{trigger:["hover"],title:a("Hyperlink URL"),placement:"bottom"},l.createElement(S.A.Item,{name:"href",style:{marginBottom:F.formItemMarginBottomXS}},l.createElement(w.A,{addonBefore:l.createElement(Zt,{linkProtocol:_e,handleLinkProtocolsChange:Re,__:a}),placeholder:a("Hyperlink URL"),allowClear:!0,onSelect:Ne,prefix:l.createElement(qt,{linkProtocol:_e})}))),l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:3},l.createElement(i.A,{title:a("Text replacer"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper")},l.createElement(g.Ay,{className:C()("selected-td-form__button ant-form-item",{"selected-td-form__button--active":ke}),icon:l.createElement(z.A,{icon:"Replacer",className:"selected-td-form__icon-radius"}),onClick:()=>{xe(!ke),ke?(n.setFieldValue("textReplacer",""),o({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{textReplacer:""}})):setTimeout((()=>H.current.focus()))},ref:j}))),l.createElement(h.A,{span:21},ke&&l.createElement(i.A,{trigger:["hover"],title:a("Text"),placement:"bottom"},l.createElement(S.A.Item,{name:"textReplacer"},l.createElement(w.A,{placeholder:a("The code that will replace this text"),allowClear:!0,prefix:l.createElement("span",{className:"addon-text-content"},"Text"),onChange:e=>{""!==e.target.value&&j.current.classList.add("selected-td-form__button--active")},ref:H,onSelect:Ne}))))),l.createElement(m.A,{className:"selected-td-form__divider"}),L.formButtonFieldPaddingsEnabled&&l.createElement(l.Fragment,null,l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},a("Padding"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{be((e=>!e)),ge&&(t.paddingLeftRight="",t.paddingLeft="",t.paddingRight="",t.paddingTopBottom="",t.paddingTop="",t.paddingBottom="",o({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{padding:{all:0}}}))}))}},ge?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),ge&&l.createElement(b.A,{gutter:F.marginSM,style:{marginBottom:4}},l.createElement(l.Fragment,null,l.createElement(h.A,{span:10,style:{width:156,flex:"auto",maxWidth:"44%"}},l.createElement("div",{className:"padding-collapsed",style:{display:W?"block":"none"}},l.createElement(i.A,{title:a("Horizontal padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"paddingLeftRight"},l.createElement(Ft.A,{min:0,placeholder:a("Horizontal"),prefix:l.createElement(z.A,{icon:"PaddingLeftRight"}),addonAfter:"px"})))),l.createElement("div",{className:"padding-extended",style:{display:W?"none":"block"}},l.createElement(i.A,{trigger:["hover"],title:a("Left padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"paddingLeft",style:{marginBottom:F.formItemMarginBottomXS}},l.createElement(Ft.A,{min:0,placeholder:a("Left"),prefix:l.createElement(z.A,{icon:"PaddingLeft"}),addonAfter:"px"}))),l.createElement(i.A,{trigger:["hover"],title:a("Right padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"paddingRight"},l.createElement(Ft.A,{min:0,placeholder:a("Right"),prefix:l.createElement(z.A,{icon:"PaddingRight"}),addonAfter:"px"}))))),l.createElement(h.A,{span:10,style:{width:156,flex:"auto",maxWidth:"44%"}},l.createElement("div",{className:"padding-collapsed",style:{display:W?"block":"none"}},l.createElement(i.A,{title:a("Vertical padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"paddingTopBottom"},l.createElement(Ft.A,{min:0,placeholder:a("Vertical"),prefix:l.createElement(z.A,{icon:"PaddingTopBottom"}),addonAfter:"px"})))),l.createElement("div",{className:"padding-extended",style:{display:W?"none":"block"}},l.createElement(i.A,{trigger:["hover"],title:a("Top padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"paddingTop",style:{marginBottom:F.formItemMarginBottomXS}},l.createElement(Ft.A,{min:0,placeholder:a("Top"),prefix:l.createElement(z.A,{icon:"PaddingTop"}),addonAfter:"px"}))),l.createElement(i.A,{trigger:["hover"],title:a("Bottom padding"),placement:"bottom"},l.createElement(S.A.Item,{name:"paddingBottom"},l.createElement(Ft.A,{min:0,placeholder:a("Bottom"),prefix:l.createElement(z.A,{icon:"PaddingBottom"}),addonAfter:"px"}))))),l.createElement(h.A,{span:4,style:{width:45,flex:"auto",maxWidth:"12%"}},l.createElement(i.A,{title:a("Individual padding"),placement:"bottom"},l.createElement(g.Ay,{className:C()("selected-td-form__button",{"selected-td-form__button--active":!W}),onClick:()=>{G((e=>!e));const t=n.getFieldsValue(!0);W||(t.paddingLeftRight=t.paddingLeft,t.paddingTopBottom=t.paddingTop,t.paddingRight=t.paddingLeft,t.paddingBottom=t.paddingTop,o({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{padding:{top:t.paddingTopBottom,bottom:t.paddingTopBottom,left:t.paddingLeftRight,right:t.paddingLeftRight}}}))}},l.createElement(z.A,{icon:"PaddingSwitcher"})))))),l.createElement(m.A,{className:"selected-td-form__divider"})),l.createElement("div",{className:"form-group-title"},a("Size")),l.createElement(b.A,{gutter:F.marginSM,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(i.A,{title:a("Width"),placement:"left"},l.createElement(S.A.Item,{name:"width",style:{marginBottom:F.formItemMarginBottomXS}},l.createElement(Ft.A,{min:0,max:ve,placeholder:a("Width"),prefix:l.createElement(fe.A,null),addonAfter:l.createElement(S.A.Item,{name:"widthDim",noStyle:!0},xn)})))),l.createElement(h.A,{span:12},l.createElement(i.A,{title:a("Height"),placement:"left"},l.createElement(S.A.Item,{name:"height"},l.createElement(Ft.A,{min:0,placeholder:a("Height"),prefix:l.createElement(Gl.A,null),addonAfter:"px"}))))),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{style:{paddingTop:F.formItemMarginBottomMD+4,paddingBottom:4}},l.createElement(jo,{form:n,elementSettings:e,showAddParagraph:!1,isButton:!0,setLinkProtocol:Ce,linkProtocol:_e,linkTarget:Se})),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},a("Background"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{de((e=>!e)),se?(t.backgroundColor="",t.backgroundImage="",t.backgroundPositionX="",t.backgroundPositionY="",t.backgroundRepeat="none",t.backgroundSize="",I(!0)):(t.backgroundColor="#E5E5E5",t.backgroundSize="",t.backgroundRepeat="none"),o({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{backgroundColor:t.backgroundColor,backgroundImage:[{type:"url",value:t.backgroundImage}],backgroundPositionX:t.backgroundPositionX,backgroundPositionY:t.backgroundPositionY,backgroundRepeat:t.backgroundRepeat,backgroundSize:t.backgroundSize}})}))}},se?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),se&&l.createElement(b.A,{gutter:10,style:{marginBottom:P?14:0}},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Background color"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode},l.createElement(S.A.Item,{name:"backgroundColor",style:{marginBottom:L.formButtonFieldBackgroundImageEnabled?F.formItemMarginBottomXS:F.formItemMarginBottomMD+4}},l.createElement(ye,{placeholder:a("Background color"),usedColors:e.usedColors})))),L.formButtonFieldBackgroundImageEnabled&&l.createElement(h.A,{span:P?12:24},l.createElement("div",{style:{paddingBottom:P?4:0}},l.createElement(Pe,{form:n,label:a("Background image"),name:"backgroundImage",tooltipTitle:a("Background image")})),!P&&l.createElement(l.Fragment,null,l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Horizontal position"),placement:"bottom"},l.createElement(S.A.Item,{name:"backgroundPositionX",style:{marginBottom:F.formItemMarginBottomXS}},l.createElement(w.A,{placeholder:a("Horizontal position"),prefix:l.createElement(z.A,{icon:"BgPositionHorizontal"})})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Vertical position"),placement:"bottom"},l.createElement(S.A.Item,{name:"backgroundPositionY",style:{marginBottom:F.formItemMarginBottomXS}},l.createElement(w.A,{placeholder:a("Vertical position"),prefix:l.createElement(z.A,{icon:"BgPositionVertical"})}))))),l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Background image repeat"),placement:"top"},l.createElement(S.A.Item,{name:"backgroundRepeat",style:{marginBottom:F.formItemMarginBottomMD+4}},l.createElement(k.A,{placeholder:a("Please choose"),options:Be,getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")})))),l.createElement(h.A,{span:12},l.createElement(i.A,{trigger:["hover"],title:a("Background image size"),placement:"top"},l.createElement(S.A.Item,{name:"backgroundSize",style:{marginBottom:F.formItemMarginBottomMD+4}},l.createElement(k.A,{placeholder:a("Please choose"),options:Te,getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")})))))))),L.formFieldBorderEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},a("Borders"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{X((e=>!e)),Z&&(t.borderWidth=null,t.borderColor="",t.borderStyle=""),s((e=>({...D.iV,[t.borderPosition]:{...e[t.borderPosition],width:t.borderWidth,color:t.borderColor,style:t.borderStyle}}))),o({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{border:{all:{color:t.borderColor,style:t.borderStyle,width:t.borderWidth}}}})}))}},Z?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),Z&&l.createElement("div",{style:{marginBottom:4}},l.createElement(Tt,{borders:r}))),L.formFieldBorderRadiusEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},a("Border radius"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{J((e=>!e)),Q?(t.borderRadiusAll=0,E(!0)):t.borderRadiusAll=5,o({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{borderRadius:{all:t.borderRadiusAll}}})}))}},Q?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),Q&&l.createElement("div",{style:{marginBottom:4}},l.createElement(Dt,{form:n,oneBorderRadiusValue:p,setOneBorderRadiusValue:E,elementSettings:e}))),L.formFieldBoxShadowEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},a("Box shadow"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=n.getFieldsValue(!0);setTimeout((()=>{le((e=>!e)),ae?(t.boxShadowInset=!1,t.boxShadowHOffset=0,t.boxShadowVOffset=0,t.boxShadowBlurRadius=0,t.boxShadowSpreadRadius=0,t.boxShadowColor=""):(t.boxShadowInset=!1,t.boxShadowHOffset=5,t.boxShadowVOffset=5,t.boxShadowBlurRadius=10,t.boxShadowSpreadRadius=-5,t.boxShadowColor="#000000"),o({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{boxShadow:{blurRadius:t.boxShadowBlurRadius,color:t.boxShadowColor,hOffset:t.boxShadowHOffset,inset:t.boxShadowInset,spreadRadius:t.boxShadowSpreadRadius,vOffset:t.boxShadowVOffset}}})}))}},ae?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),ae&&l.createElement("div",{style:{marginBottom:4}},l.createElement(eo,{boxShadow:d}))),L.formFieldVisibilityEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},a("Display control")),l.createElement(b.A,{gutter:20,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(vo,{elementSettings:e,form:n})))),L.formFieldAmpVisibilityEnabled&&e.ampShow&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement("div",{className:"form-group-title"},a("AMP visibility")),l.createElement(b.A,{gutter:20,style:{marginBottom:4}},l.createElement(h.A,{span:12},l.createElement(Ro,null))))))))},Rn=({elementSettings:e})=>{const{__:t}=(0,y.s9)(),[a]=S.A.useForm(),{TextArea:o}=w.A,n=(0,Me.XW)();(0,l.useEffect)((()=>{e&&a.setFieldsValue({...e})}),[a,e]);return l.createElement(S.A,{form:a,layout:"vertical",name:"selected_variable_form",initialValues:{value:""},onValuesChange:t=>{n({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:t})},autoComplete:"off"},l.createElement("div",{className:"selected_form-props-wrapper"},l.createElement(S.A.Item,{label:t("Variable value"),name:"value",tooltip:{title:t("Type the output parameters of your platform. E.g., ")+"${Recipient.FirstName}",icon:l.createElement(T.A,null)},style:{marginBottom:35}},l.createElement(o,{rows:4,placeholder:t("Variable value")}))))},{useToken:Nn}=n.A,Ln=({elementSettings:e,setElementSettings:t,postfix:a="",form:o,handleSelect:n})=>{const{__:r}=(0,y.s9)(),{token:d}=Nn(),m=(0,Y.rD)(),c=(0,Me.XW)(),u="src"+a,p="title"+a,b="alt"+a,h="link"+a,E="imgReplacer"+a,f=(0,l.useRef)(null),v=(0,l.useRef)(null),A=(0,l.useRef)(null),_=(0,l.useRef)(null),k=(0,l.useRef)(null),x=(0,l.useRef)(null),B=(0,l.useRef)(null),T=(0,l.useRef)(null),[R,N]=(0,l.useState)(""),[P,I]=(0,l.useState)(""),[M,O]=(0,l.useState)(""),[V,F]=(0,l.useState)(!1),[H,j]=(0,l.useState)("https://");(0,l.useEffect)((()=>{var t,a,l;I(null===(t=e.images)||void 0===t?void 0:t[b]),O(null===(a=e.images)||void 0===a?void 0:a[p]),N(null===(l=e.images)||void 0===l?void 0:l[h])}),[e,b,p,h]);return l.createElement(l.Fragment,null,("img"===e.type||"video"===e.type||"carousel"===e.type)&&l.createElement(S.A.Item,{style:{marginBottom:0}},l.createElement(Pe,{form:o,label:r("Image path"),name:u,placeholder:r("Image path"),elementSettings:e,tooltipTitle:""})),l.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"}},l.createElement(s.A,{size:8},l.createElement(i.A,{title:P||r("Alternative text"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper")},l.createElement(g.Ay,{className:C()("selected-td-form__button",{"selected-td-form__button--active":!!P}),onClick:()=>{P?(I(""),o.setFieldValue("alt",""),c({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{[b]:""}})):(I(A.current&&A.current.input.value?A.current.input.value:"..."),setTimeout((()=>{A.current.focus()})))},ref:_},l.createElement("span",{className:"addon-text-content"},"Alt"))),m.formFieldImageTitleEnabled&&l.createElement(i.A,{title:M||r("Tooltip text"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper")},l.createElement(g.Ay,{className:C()("selected-td-form__button",{"selected-td-form__button--active":!!M}),onClick:()=>{M?(O(!1),o.setFieldValue("title",""),c({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{[p]:""}})):(O(k.current&&k.current.input.value?k.current.input.value:"..."),setTimeout((()=>{k.current.focus()})))},ref:x},l.createElement("span",{className:"addon-text-content"},"Title"))),l.createElement(i.A,{title:R||r("Hyperlink URL"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper")},l.createElement(g.Ay,{className:C()("selected-td-form__button",{"selected-td-form__button--active":!!R}),icon:l.createElement(Ht.A,{className:"selected-td-form__icon-radius"}),onClick:()=>{R?(N(""),o.setFieldValue(h,""),c({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{[h]:""}})):(N(f.current&&f.current.input.value?f.current.input.value:"..."),setTimeout((()=>{f.current.focus()})))},ref:v})),l.createElement(i.A,{title:r("Image replacer"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper")},l.createElement(g.Ay,{className:C()("selected-td-form__button",{"selected-td-form__button--active":V}),icon:l.createElement(z.A,{icon:"Replacer",className:"selected-td-form__icon-radius"}),onClick:()=>{F(!V),V?(o.setFieldValue(E,""),c({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{[E]:""}})):setTimeout((()=>B.current.focus()))},ref:T}))),l.createElement(s.A,{size:8},l.createElement(i.A,{title:r("Remove slide"),placement:"bottom"},l.createElement(g.Ay,{type:"text",onClick:l=>{var n;const r=o.getFieldsValue(!0),i=+a.substring(1),s=Object.keys(null===r||void 0===r?void 0:r.images).reduce(((e,t)=>(t.includes(a)||(e[t]=r[t]),e)),{}),d=null===(n=e.carouselImages)||void 0===n?void 0:n.filter(((e,t)=>t!==i));t((e=>({...e,settings:{...e.settings,carouselImages:d}}))),c({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:D.bV.CAROUSEL,caption:e.caption,settings:{...e,carouselImages:d}}),o.setFieldsValue({images:s})},icon:l.createElement(L.A,null)})))),(!!R||!!P||!!M||!!V)&&l.createElement("div",null,!!R&&l.createElement(i.A,{trigger:["hover"],title:r("Hyperlink URL"),placement:"bottom"},l.createElement(S.A.Item,{name:h,className:"selected-image-form__alt",style:{marginTop:d.formItemMarginBottomXS,marginBottom:0}},l.createElement(w.A,{addonBefore:l.createElement(Zt,{linkProtocol:H,handleLinkProtocolsChange:e=>{o.setFieldValue("LinkName","mergetag"!==e?e:""),j(e)},__:r}),placeholder:r("Hyperlink URL"),allowClear:!0,ref:f,onChange:e=>{""===e.target.value?N("..."):(v.current.classList.add("selected-td-form__button--active"),N(e.target.value));const t=e.target.value;"https://"===t.substring(0,8)?j("https://"):"mailto:"===t.substring(0,7)?j("mailto:"):"tel:"===t.substring(0,4)?j("tel:"):"sms:"===t.substring(0,4)?j("sms:"):"ftp://"===t.substring(0,6)?j("ftp://"):"skype:"===t.substring(0,6)?j("skype:"):"viber:"===t.substring(0,6)?j("viber:"):j("")},onSelect:n,prefix:l.createElement(qt,{linkProtocol:H})}))),!!P&&l.createElement(i.A,{trigger:["hover"],title:r("Alternative text"),placement:"bottom"},l.createElement(S.A.Item,{name:b,className:"selected-image-form__alt",style:{marginTop:d.formItemMarginBottomXS,marginBottom:0}},l.createElement(w.A,{placeholder:r("Alternative text"),allowClear:!0,prefix:l.createElement("span",{className:"addon-text-content"},"Alt"),onChange:e=>{""===e.target.value?I("..."):(_.current.classList.add("selected-td-form__button--active"),I(e.target.value))},ref:A,onSelect:n}))),m.formFieldImageTitleEnabled&&!!M&&l.createElement(i.A,{trigger:["hover"],title:r("Tooltip text"),placement:"bottom"},l.createElement(S.A.Item,{name:p,className:"selected-image-form__alt",style:{marginTop:d.formItemMarginBottomXS,marginBottom:0}},l.createElement(w.A,{placeholder:r("Enter the title of the image"),allowClear:!0,prefix:l.createElement("span",{className:"addon-text-content"},"Title"),onChange:e=>{""===e.target.value?O("..."):(x.current.classList.add("selected-td-form__button--active"),O(e.target.value))},ref:k,onSelect:n}))),!!V&&l.createElement(i.A,{trigger:["hover"],title:r("Image src"),placement:"bottom"},l.createElement(S.A.Item,{name:E,className:"selected-image-form__alt",style:{marginTop:d.formItemMarginBottomXS,marginBottom:0}},l.createElement(w.A,{placeholder:r("\u0421ode that will replace the image `src`"),allowClear:!0,prefix:l.createElement("span",{className:"addon-text-content"},r("Image src")),onChange:e=>{""!==e.target.value&&T.current.classList.add("selected-td-form__button--active")},ref:B,onSelect:n})))))},Pn={loop:!1,autoplay:!1,borderRadiusAll:0,borderRadiusTopLeft:0,borderRadiusBottomLeft:0,borderRadiusTopRight:0,borderRadiusBottomRight:0,link:"https://",images:{},src_0:"",renderedHeight_0:0,renderedWidth_0:0,imgReplacer_0:"",title_0:"",alt_0:""},{useToken:In}=n.A,Mn=({elementSettings:e})=>{const{__:t}=(0,y.s9)(),{token:a}=In(),[o]=S.A.useForm();let n=(0,f.wA)();const r=(0,Y.rD)(),d=(0,Me.K9)(),c=(0,Me.XW)(),p=(0,f.d4)(Ie.Ct),E=(0,f.d4)(Ie.CS),[v,A]=(0,l.useState)(!0),[_,C]=(0,l.useState)(!0),[k,x]=(0,l.useState)(!1),[T,R]=(0,l.useState)(!1),[N,L]=(0,l.useState)("https://"),[P,I]=(0,l.useState)(null===o||void 0===o?void 0:o.getFieldsValue(!0)),[M,O]=(0,l.useState)(e),[F,H]=(0,l.useState)(null),[j,W]=(0,l.useState)(),[G,U]=(0,l.useState)(!1),[q,Z]=(0,l.useState)(!1),[X,K]=(0,l.useState)({start:0,end:0}),$=(0,l.useRef)(null),Q=`selected_${M.type}_form_link`,J=(0,f.d4)(Ie.Fv),ee=(0,f.d4)(Ie.yy),te=J&&"bottom"!==ee;(0,l.useEffect)((()=>{G&&$.current&&$.current.focus()}),[G]),(0,l.useEffect)((()=>{O(e)}),[e]);const ae=(0,f.d4)(Po.GH);(0,l.useEffect)((()=>{var e;null!==ae&&void 0!==ae&&null!==(e=ae.items)&&void 0!==e&&e.length&&W((0,Y.cM)(ae.items,t,((e,t)=>{U(!1),d(D.Ru.SANDBOX_ADD_MERGETAG,e),t.stopPropagation(),t.preventDefault()})))}),[ae,W,t,U,d]);(0,l.useEffect)((()=>{const e=({target:e})=>{e.closest('[id="merge_tags_wrapper"]')||H(e)},t=({target:e})=>{e.closest(".merge-tags")||e.closest("#merge_tags_button")||U(!1)};return window.addEventListener("focusin",e),window.addEventListener("click",t),()=>{window.removeEventListener("focusin",e),window.addEventListener("click",t)}}),[]);(0,l.useEffect)((()=>{const e=null===o||void 0===o?void 0:o.getFieldsValue(!0);I(e)}),[o]);const le=({target:e})=>{if(e&&!q){const{selectionStart:t,selectionEnd:a}=e;K({start:t,end:a})}Z(!1)};(0,l.useEffect)((()=>{if(M.settings){var e,t,a,l,n,r,i,s,d,m,c,u,p,g,b;const _=M.settings,S=ha(_);var h,E,f,v,y;if(null===o||void 0===o||o.setFieldsValue(S),I(S),_.link&&L(pa(_.link,"https://")),!ga(null===(e=_.borderRadius)||void 0===e?void 0:e.all))ga(null===(h=_.borderRadius)||void 0===h?void 0:h.topLeft)||ga(null===(E=_.borderRadius)||void 0===E?void 0:E.bottomLeft)||ga(null===(f=_.borderRadius)||void 0===f?void 0:f.topRight)||ga(null===(v=_.borderRadius)||void 0===v?void 0:v.bottomRight)?A(!1):ga(null===(y=_.borderRadius)||void 0===y?void 0:y.all)||A(!0);ga(null===(t=_.mobileBorderRadius)||void 0===t?void 0:t.topLeft)||ga(null===(a=_.mobileBorderRadius)||void 0===a?void 0:a.bottomLeft)||ga(null===(l=_.mobileBorderRadius)||void 0===l?void 0:l.topRight)||ga(null===(n=_.mobileBorderRadius)||void 0===n?void 0:n.bottomRight)?C(!1):C(!0),x(!(null===(r=_.borderRadius)||void 0===r||!r.all)||!(null===(i=_.borderRadius)||void 0===i||!i.topLeft)||!(null===(s=_.borderRadius)||void 0===s||!s.bottomLeft)||!(null===(d=_.borderRadius)||void 0===d||!d.topRight)||!(null===(m=_.borderRadius)||void 0===m||!m.bottomRight)),R(!(null===(c=_.mobileBorderRadius)||void 0===c||!c.all)||!(null===(u=_.mobileBorderRadius)||void 0===u||!u.topLeft)||!(null===(p=_.mobileBorderRadius)||void 0===p||!p.bottomLeft)||!(null===(g=_.mobileBorderRadius)||void 0===g||!g.topRight)||!(null===(b=_.mobileBorderRadius)||void 0===b||!b.bottomRight))}}),[o,M]);(0,No.A)((e=>{const t=e.data.operation;t===D.Ru.APPLICATION_OPEN_IMAGE_AI_POPUP?(n((0,_e.tm)(M.settings.src)),n((0,V.qf)(D.lx.UPLOAD_IMAGE_MODAL_AI))):t===D.Ru.APPLICATION_OPEN_IMAGE_UPLOAD_POPUP?(n((0,_e.tm)(M.settings.src)),n((0,V.qf)(D.lx.UPLOAD_IMAGE_MODAL_UPLOAD))):t===D.Ru.APPLICATION_OPEN_IMAGE_EDIT_POPUP?(n((0,_e.tm)(M.settings.src)),n((0,V.qf)(D.lx.UPLOAD_IMAGE_MODAL_EDIT))):t===D.Ru.APPLICATION_OPEN_IMAGE_GIF_POPUP?(n((0,_e.tm)(M.settings.src)),n((0,V.qf)(D.lx.UPLOAD_IMAGE_MODAL_GIF))):t===D.Ru.APPLICATION_OPEN_IMAGE_STOCK_POPUP?(n((0,_e.tm)(M.settings.src)),n((0,V.qf)(D.lx.UPLOAD_IMAGE_MODAL_STOCK))):t===D.Ru.APPLICATION_CLOSE_IMAGE_EDIT_POPUP&&(n((0,V.Os)()),n((0,V.Oo)()))}));return l.createElement(S.A,{form:o,layout:"vertical",name:"selected_carousel_form",initialValues:Pn,onValuesChange:e=>{const t=Ea(M.settings,o,e);c({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:D.bV.CAROUSEL,caption:t.caption,settings:t}),O((e=>({...e,settings:{...e.settings,...t}})))},autoComplete:"off",className:"element-controls"},!te&&l.createElement(i.A,{title:t("To change the appearance of the element on the mobile device, edit the fields below. If the fields remain empty, the desktop styles will be applied to the mobile version."),placement:"bottom"},l.createElement(u.A,{className:"selected_form-mobile-props-title",message:t("Appearance on mobile devices"),type:"info"})),p===D.ND&&E.styles?l.createElement("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props"},l.createElement("div",{className:"selected_form-mobile-props-wrapper"},l.createElement("p",null,t("No properties to edit.")))):l.createElement("div",{id:"selected_element_form_desktop_props"},l.createElement("div",{className:"selected_form-props-wrapper"},l.createElement(i.A,{trigger:["hover"],title:t("Link for all slides"),placement:"bottom"},l.createElement(S.A.Item,{name:"link"},l.createElement(w.A,{addonBefore:l.createElement(Zt,{linkProtocol:N,handleLinkProtocolsChange:e=>{o.setFieldValue("link","mergetag"!==e?e:""),L(e)},__:t}),placeholder:t("Link for all slides"),allowClear:!0,onSelect:le,prefix:l.createElement(qt,{linkProtocol:N})}))),l.createElement(m.A,{className:"selected-td-form__divider"}),j&&l.createElement(l.Fragment,null,l.createElement(h.A,{span:24,id:"merge_tags_wrapper"},l.createElement(S.A.Item,{style:{marginBottom:a.formItemMarginBottomMD,marginTop:a.formItemMarginBottomMD}},l.createElement(g.Ay,{id:"merge_tags_button",icon:l.createElement(z.A,{icon:"MergeTags"}),style:{width:"100%",display:G?"none":"block"},onClick:()=>U(!0)},t("Merge tags")),l.createElement(it.A,{ref:$,popupClassName:"merge-tags",options:j,placeholder:t("Start typing the title"),showSearch:{filter:(e,t)=>t.some((t=>t.label.toLowerCase().indexOf(e.toLowerCase())>-1)),render:(e,t)=>{const a=t.map(((t,a)=>{const o=t.label.split(new RegExp(`(${e})`,"gi"));return l.createElement("span",{key:t.value},0!==a&&l.createElement("span",null,"\xa0/\xa0"),o.map(((t,a)=>t.toLowerCase()===e.toLowerCase()?l.createElement("span",{key:a,style:{color:"red"}},t):t)))}));return l.createElement("div",{title:t.map((e=>e.label)).join(" / ")},a)}},spellCheck:"false",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),onChange:(e,t)=>{if(U(!1),e){const a=ae.syntax.length>1?j.findIndex((e=>e.key===t[0].key)):0,l=ae.syntax[a].replace("%value%",e[e.length-1]),n=`selected_${M.type}_form${"carousel"===M.type?"_images":""}`;["imgReplacer","title","alt","src","link"].some((e=>null===F||void 0===F?void 0:F.getAttribute("id").includes(`${n}_${e}`)))||null!==F&&void 0!==F&&F.getAttribute("id").includes(Q)?((e,t)=>{const a=document.getElementById(t);if(a){var l,n;const s=`selected_${M.type}_form_${t.includes("__images_")?"_images":""}_`,d=t.substring(t.indexOf(s)+s.length),m=null===(l=a.value)||void 0===l?void 0:l.substring(0,X.start),u=null===(n=a.value)||void 0===n?void 0:n.substring(X.end);let p={[d]:m+e+u};var r;if(d.includes("_"))p={carouselImages:[...(null===(r=M.settings)||void 0===r?void 0:r.carouselImages)||[]]},p.carouselImages[d.split("_")[1]][d.split("_")[0]]=m+e+u;else if(M.type===D.bV.CAROUSEL&&Q===t){var i;p={[d]:m+e+u,carouselImages:[...(null===(i=M.settings)||void 0===i?void 0:i.carouselImages.map((t=>({...t,link:m+e+u}))))||[]]}}c({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:D.bV.CAROUSEL,settings:{...M.settings,...p}}),O((e=>({...e,settings:{...e.settings,...p}}))),o.setFieldValue(d,m+e+u),a.focus(),setTimeout((()=>{a.selectionStart=X.start,a.selectionEnd=X.start+e.length}),400),Z(!0)}})(l,null===F||void 0===F?void 0:F.getAttribute("id")):(o.setFieldValue("imgReplacer",l),c({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:D.bV.CAROUSEL,settings:{...M.settings,imgReplacer:l}}),O((e=>({...e,settings:{...e.settings,imgReplacer:l}}))))}},style:{display:G?"block":"none"},open:G,onKeyDown:e=>{"Escape"===e.key&&U(!1)}}))),l.createElement(m.A,{className:"selected-td-form__divider"})),l.createElement(S.A.List,{name:"images",initialValue:null===P||void 0===P?void 0:P.images},(()=>{var e,t;return l.createElement("div",{style:{paddingTop:a.formItemMarginBottomMD+4}},null===M||void 0===M||null===(e=M.settings)||void 0===e||null===(t=e.carouselImages)||void 0===t?void 0:t.map(((e,t)=>l.createElement("div",{className:"carousel__slide",key:t},l.createElement(Ln,{elementSettings:P,setElementSettings:O,postfix:"_"+t,form:o,handleSelect:le})))))})),l.createElement(h.A,{span:24},l.createElement(S.A.Item,{style:{marginBottom:a.formItemMarginBottomMD}},l.createElement(g.Ay,{id:"add_slide_button",icon:l.createElement(z.A,{icon:"AddSlide"}),style:{width:"100%"},onClick:()=>(()=>{var e,t;const{width:a,height:l,renderedWidth:o,renderedHeight:n}=(null===M||void 0===M||null===(e=M.settings)||void 0===e?void 0:e.carouselImages[0])||{width:{value:600},height:{value:600},renderedWidth:600,renderedHeight:600},r={src:"https://emcdn.ru/1865/231031_17_BGU9Mso.png",width:{value:a.value,dim:"px"},height:{value:l.value,dim:"px"},alt:"",title:"",link:null,renderedWidth:o,renderedHeight:n,imgReplacer:"",mobileWidth:{value:null,dim:"px"},mobileHeight:{value:null,dim:"px"},mobileBorderRadius:{all:null,topLeft:null,topRight:null,bottomRight:null,bottomLeft:null}},i=[...null===M||void 0===M||null===(t=M.settings)||void 0===t?void 0:t.carouselImages,r];c({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:D.bV.CAROUSEL,settings:{...M.settings,carouselImages:i}}),O((e=>({...e,settings:{...e.settings,carouselImages:i}})))})()},t("Add slide")))),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:20,style:{marginTop:a.formItemMarginBottomMD-10}},l.createElement(h.A,{span:12},l.createElement(s.A,{size:10,align:"baseline"},l.createElement(S.A.Item,{name:"loop",valuePropName:"checked",style:{marginBottom:a.formItemMarginBottomMD-6}},l.createElement(B.A,{size:"small",id:"Loop"})),l.createElement("span",{style:{position:"relative",top:2}},l.createElement("label",{htmlFor:"Loop"},t("Loop"))))),l.createElement(h.A,{span:12},l.createElement(s.A,{size:10,align:"baseline"},l.createElement(S.A.Item,{name:"autoplay",valuePropName:"checked",style:{marginBottom:a.formItemMarginBottomMD-6}},l.createElement(B.A,{size:"small",id:"Autoplay"})),l.createElement("span",{style:{position:"relative",top:2}},l.createElement("label",{htmlFor:"Autoplay"},t("Autoplay")))))),l.createElement(m.A,{className:"selected-td-form__divider"}),r.formFieldBorderRadiusEnabled&&l.createElement(l.Fragment,null,l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},t("Border radius"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{setTimeout((()=>{x((e=>!e)),o.setFieldValue("borderRadiusAll",k?0:5),c({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:D.bV.CAROUSEL,settings:{...M.settings,borderRadius:{all:k?"":5}}}),O((e=>({...e,settings:{...e.settings,borderRadius:{all:k?null:5}}})))}))}},k?l.createElement(ql.A,null):l.createElement(Ul.A,null)))),k&&l.createElement("div",{style:{marginBottom:4}},l.createElement(Dt,{form:o,oneBorderRadiusValue:v,setOneBorderRadiusValue:A,elementSettings:M.settings}))))))},On={animate:!0,expandSingleSection:!0,sections:[{expanded:!1,index:0}]},{useToken:Vn}=n.A,Fn=({elementSettings:e})=>{const{__:t}=(0,y.s9)(),{token:a}=Vn(),[o]=S.A.useForm(),n=(0,Me.XW)(),[r,i]=(0,l.useState)(e);(0,l.useEffect)((()=>{i(e)}),[e]),(0,l.useEffect)((()=>{if(r.settings){const e=ha(r.settings);null===o||void 0===o||o.setFieldsValue(e)}}),[o,r]);return l.createElement(S.A,{form:o,layout:"vertical",name:"selected_carousel_form",initialValues:On,onValuesChange:e=>{const t=Ea(r.settings,o,e);n({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:r.type,caption:t.caption,settings:t}),i((e=>({...e,settings:{...e.settings,...t}})))},autoComplete:"off",className:"element-controls"},l.createElement("div",{id:"selected_element_form_desktop_props"},l.createElement("div",{className:"selected_form-props-wrapper"},l.createElement(b.A,{gutter:20},l.createElement(h.A,{span:15},l.createElement(s.A,{size:10,align:"baseline"},l.createElement(S.A.Item,{name:"expandSingleSection",valuePropName:"checked"},l.createElement(B.A,{size:"small",id:"ExpandSingleSection"})),l.createElement("span",{style:{position:"relative",top:2}},l.createElement("label",{htmlFor:"ExpandSingleSection"},t("Expand only one section"))))),l.createElement(h.A,{span:9},l.createElement(s.A,{size:10,align:"baseline"},l.createElement(S.A.Item,{name:"animate",valuePropName:"checked"},l.createElement(B.A,{size:"small",id:"Animate"})),l.createElement("span",{style:{position:"relative",top:2}},l.createElement("label",{htmlFor:"Animate"},t("Animate")))))),l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(S.A.List,{name:"sections"},(()=>{var e,o;return l.createElement("div",{style:{paddingTop:a.formItemMarginBottomMD+4}},null===r||void 0===r||null===(e=r.settings)||void 0===e||null===(o=e.sections)||void 0===o?void 0:o.map(((e,a)=>{var o,d;return l.createElement(b.A,{gutter:24,key:`expanded_${a}`},l.createElement(h.A,{span:20},l.createElement(s.A,{size:10,align:"baseline"},l.createElement("span",{style:{position:"relative",top:2}},t("Section ")+(a+1)),l.createElement(S.A.Item,{name:`expanded_${a}`},l.createElement(B.A,{size:"small",id:`expanded_${a}`,checked:e.expanded})),l.createElement("span",{style:{position:"relative",top:2}},l.createElement("label",{htmlFor:`expanded_${a}`},t("expanded"))))),l.createElement(h.A,null,(null===r||void 0===r||null===(o=r.settings)||void 0===o||null===(d=o.sections)||void 0===d?void 0:d.length)>1&&l.createElement(g.Ay,{type:"text",icon:l.createElement(L.A,null),style:{marginRight:"auto"},onClick:()=>{return e=a,i((t=>{var a;return{...t,settings:{...t.settings,sections:null===(a=r.settings.sections)||void 0===a?void 0:a.filter(((t,a)=>a!==e))}}})),void n({operation:D.Ru.SANDBOX_ACCORDION_REMOVE_SECTION,settings:{index:e}});var e}})))})))})),l.createElement(b.A,{gutter:20},l.createElement(h.A,{span:24},l.createElement(S.A.Item,{style:{marginBottom:a.formItemMarginBottomMD}},l.createElement(g.Ay,{style:{width:"100%",display:"block"},icon:l.createElement(z.A,{icon:"MergeTags"}),onClick:()=>(i((e=>{var t;return{...e,sections:null===r||void 0===r||null===(t=r.settings)||void 0===t?void 0:t.sections.push({expanded:!1})}})),void n({operation:D.Ru.SANDBOX_ACCORDION_ADD_SECTION,settings:{section:t("Section title"),text:t("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")}}))},t(" Add section"))))),l.createElement(m.A,{className:"selected-td-form__divider"}))))},Dn=({className:e,formSettings:t,emailElementType:a})=>{const o=(0,f.wA)(),n=(0,F.Cb)(),r=(0,l.useRef)(),i=(0,f.d4)(Ie.B),s=(0,f.d4)(W.qX),d=(0,f.d4)(Ke.qX),m=a===D.Tm?s:d,[c,u]=(0,l.useState)(m);(0,l.useEffect)((()=>{u(m.type===D.bV.CAROUSEL||m.type===D.bV.IMG?t.settings:m)}),[m,t.settings]);return(0,No.A)((e=>{const t=e.data.operation,a=e.data.action;if(t===D.Ru.APPLICATION_ACTION){function l(e,t=null){const a={[e]:t||!c[e]};n(a,c.type),o((0,W.G_)(a)),u((e=>({...e,...a})))}"toggle_strong"===a&&l("textStrong"),"toggle_italic"===a&&l("textItalic"),"toggle_underline"===a&&l("textUnderline"),"toggle_strikethrough"===a&&l("textStrikethrough"),"textAlign_left"===a&&l("textAlign","left"),"textAlign_right"===a&&l("textAlign","right"),"textAlign_center"===a&&l("textAlign","center")}})),l.createElement(Wl.A,{nodeRef:r,in:i===D.yI,timeout:300,classNames:"transition"},l.createElement("div",{ref:r,className:C()("selected-element-panel-content",{[e]:e})},m.type===D.bV.IMG&&l.createElement(Mo,{elementSettings:m}),m.type===D.bV.COUNTDOWN&&l.createElement(Mo,{elementSettings:m}),m.type===D.bV.VIDEO&&l.createElement(Mo,{elementSettings:m}),m.type===D.bV.TEXT&&l.createElement(Uo,{elementSettings:m}),m.type===D.bV.LINK&&l.createElement(tn,{elementSettings:m})," ",m.type===D.bV.TABLE&&l.createElement(Jo,{elementSettings:m}),(m.type===D.bV.TD||m.type===D.bV.STRUCTURE||m.type===D.bV.GROUP||m.type===D.bV.COLUMN)&&l.createElement(bn,{elementSettings:m}),m.type===D.bV.VAR&&l.createElement(Rn,{elementSettings:m}),m.type===D.bV.BUTTON&&l.createElement(Tn,{elementSettings:m}),m.type===D.bV.DIV&&l.createElement(vn,{elementSettings:m}),m.type===D.bV.VINDENT&&l.createElement(an,{elementSettings:m}),m.type===D.bV.FLOAT_BLOCK&&l.createElement(wn,{elementSettings:m}),t.type===D.bV.CAROUSEL&&l.createElement(Mn,{elementSettings:t}),t.type===D.bV.ACCORDION&&l.createElement(Fn,{elementSettings:t})))};Dn.defaultProps={className:null};const Hn=Dn,jn=({className:e,selectedElement:t,formSettings:a,emailElementType:o})=>l.createElement("div",{className:C()("selected-element-panel",{[e]:e}),style:{height:"100%"}},l.createElement(Hn,{className:C()("selected-element-panel__content SelectedElementPanel",{"column-settings-show":!!t.floatBlocks&&t.floatBlocks.items.length>1}),emailElementType:o,formSettings:a}));jn.defaultProps={className:null,selectedElement:{parent:!1}};const zn=jn;var Wn=a(33309);const Gn=({emailElementType:e,isSelectedElement:t=!1,selectedElement:a})=>{var o,n,r,d,c,p,E,v,A;const{__:_}=(0,y.s9)(),C=(0,f.wA)(),w=(0,Me.XW)(),[k]=S.A.useForm(),x=(0,l.useRef)(),T=(0,l.useRef)(),R=(0,f.d4)(W.qX),N=(0,f.d4)(Ke.qX),P=(0,Y.rD)(),I=a||(e===D.Tm?R:N),[M,O]=(0,l.useState)(null===(o=I.floatBlocks)||void 0===o?void 0:o.wrap),[V,F]=(0,l.useState)(null===(n=I.floatBlocks)||void 0===n?void 0:n.dirRevers),[H,j]=(0,l.useState)(null),[z,G]=(0,l.useState)(0),[U,q]=(0,l.useState)([]),Z=(0,f.d4)(Ie.Ct),X=(0,l.useCallback)((t=>{C(e===D.Tm?(0,W.A9)(t):(0,Ke.A9)(t))}),[C,e]);(0,l.useEffect)((()=>{if(I&&"{}"!==JSON.stringify(I)&&k._init){var e,t,a,l,o;if(k.resetFields(),k.setFieldsValue({gap:null===(e=I.floatBlocks)||void 0===e?void 0:e.gap,gapMobile:null===(t=I.floatBlocks)||void 0===t?void 0:t.gapMobile,gapDim:"px",valign:null===(a=I.floatBlocks)||void 0===a?void 0:a.valign}),(null===(l=I.floatBlocks)||void 0===l?void 0:l.items.length)>0){var n;const r=I.floatBlocks.items.reduce(((e,t)=>e+t.width),0),i=I.floatBlocks.items.map((e=>{var t;return null===(t=(e.width||0)/r*100)||void 0===t?void 0:t.toFixed(1)}));function s(e,t){if(e.length!==t.length)return!1;for(let a=0;a<e.length;a++)if(e[a]!==t[a])return!1;return!0}G(r),s(i,U)||"gap"===I.changeKey||q(i),I.floatBlocks.items.forEach(((e,t)=>k.setFieldsValue({["width-"+t]:e.width||0}))),I.floatBlocks.items.length>=8?document.querySelector(".selected-element-panel__columns-settings__links__add").classList.add("noactive"):null!==(n=document.querySelector(".selected-element-panel__columns-settings__links__add"))&&void 0!==n&&n.classList.contains("noactive")&&document.querySelector(".selected-element-panel__columns-settings__links__add").classList.remove("noactive")}O(null===(o=I.floatBlocks)||void 0===o?void 0:o.wrap)}}),[k,I,H,U]);let K=0;(null===(r=I.floatBlocks)||void 0===r?void 0:r.items.length)>0&&(K=I.floatBlocks.items.length);const $=(e,t)=>{Object.keys(t).forEach((t=>{if(t.includes("width")){const a=parseInt(t.match(/\d+/));k.setFieldsValue({[t]:e.items[a]})}}))},[Q,J]=(0,l.useState)(!1);(0,l.useEffect)((()=>{const e=()=>J(!0),t=()=>J(!1);return document.addEventListener("keyup",t),document.addEventListener("keydown",e),()=>{document.removeEventListener("keyup",t),document.removeEventListener("keydown",e)}}),[]);const ee=e=>{const a=k.getFieldsValue(!0),l=I.floatBlocks.items.map((e=>e.width)),o=I.floatBlocks.gap||20,n=e.cols-l.length;let r=[],i=l.reduce(((e,t)=>e+t),0);e.cols>=l.length?i-=o*n:i+=o*Math.abs(n);const s=Math.round(i/e.cols);r=function(t,a){const l=[];for(let r=0;r<t;r++){var o,n;l.push(null!==(o=e.width)&&void 0!==o&&o[r]?Math.round(i/100*(null===(n=e.width)||void 0===n?void 0:n[r])):a)}return l}(e.cols,s);const d=i-r.reduce(((e,t)=>e+t),0);if(0!==d){let e=r.map(((e,t)=>[t,e])).filter((e=>e[1]>30));const t=e.length-Math.abs(d);e=e.map(((e,a)=>{const l=t<=a?e[1]+(d>0?1:-1):e[1];return[e[0],l]})),e.map((e=>(r[e[0]]=e[1],e)))}let m={items:r,gap:a.gap||20};const c=r.reduce(((e,t)=>e+t),0);q(r.map((e=>{var t;return null===(t=e/c*100)||void 0===t?void 0:t.toFixed(1)}))),w({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:"floatBlocksPreset",settings:m,editFromStructure:!!document.querySelector(".selected-element-panel__columns-settings__links__add").closest(".selected-element-panel")}),X({...I,activateSection:t?void 0:"structure",floatBlocks:{...I.floatBlocks,...m,items:m.items.map(((e,t)=>({width:e,current:!1})))},changeKey:"width"})},te=e=>{const a=k.getFieldsValue(!0);let l=0;document.querySelectorAll(".selected-element-panel__columns-settings__controls__column").forEach(((t,a)=>{t===e.target.closest(".selected-element-panel__columns-settings__controls__column")&&(l=a)}));const o=+I.floatBlocks.gap,n=+I.floatBlocks.items[l].width+o,r=I.floatBlocks.items.map((e=>+e.width)),i=(r.length-1)*o,s=r.reduce(((e,t)=>e+t),0)+i,d=r.length-1,m=Math.floor(n/d);let c=r.filter(((e,t)=>t!==l)).map((e=>e+m));const u=s-(c.reduce(((e,t)=>e+t),0)+(r.length-2)*o);if(0!==u){const e=c.length-Math.abs(u);c=c.map(((t,a)=>e<=a?t+(u>0?1:-1):t))}w({operation:D.Ru.SANDBOX_FLOATBLOCK_REMOVE,settings:{removedBlockIndex:l,gap:a.gap},editFromStructure:!!document.querySelector(".selected-element-panel__columns-settings__links__add").closest(".selected-element-panel")}),X({...I,activateSection:t?void 0:"structure",floatBlocks:{...I.floatBlocks,items:c.map(((e,t)=>({width:e,current:I.floatBlocks.items.filter(((e,t)=>t!==l))[t].current})))},changeKey:"width"})};return I.floatBlocks&&I.floatBlocks.items.length>0&&l.createElement(S.A,{layout:"vertical",form:k,name:"float_blocks_settings_form",autoComplete:"off",initialValues:{gap:(null===(d=I.floatBlocks)||void 0===d?void 0:d.gap)||0,gapDim:"px",gapMobile:(null===(c=I.floatBlocks)||void 0===c?void 0:c.gapMobile)||0,valign:(null===(p=I.floatBlocks)||void 0===p?void 0:p.valign)||"top",...null===(E=I.floatBlocks)||void 0===E?void 0:E.items.reduce(((e,{width:t},a)=>(e[`width-${a}`]=t,e)),{})},onValuesChange:e=>{T.current&&Q&&clearTimeout(T.current),T.current=setTimeout((()=>function(e){const a=k.getFieldsValue(!0),l=Object.keys(e)[0];if(j(l),l.includes("width")){if(a[l]&&a[l]>=30){let o={items:[],gap:a.gap,valign:a.valign,activateSection:t?void 0:"structure"},n=0;if(document.querySelectorAll(".selected-element-panel__columns-settings__controls__column").length>1){n=parseFloat(Object.keys(e)[0].substring(Object.keys(e)[0].length-1));const t=a["width-"+(n+1)]?n+1:0;let l=z;Object.keys(a).forEach((e=>{e.includes("width")&&-1===e.indexOf("width-"+t)&&(l-=a[e])})),a["width-"+t]=l}Object.keys(a).forEach((e=>{e.includes("width")&&o.items.push(a[e])})),w({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:"floatBlocksWidths",settings:o}),X({...I,activateSection:t?void 0:"structure",floatBlocks:{...I.floatBlocks,...o,items:I.floatBlocks.items.map(((e,t)=>({...I.floatBlocks.items[t],width:o.items[t]})))},changeKey:l})}}else if("gap"===l){const o={items:I.floatBlocks.items.map((e=>e.width)),gap:I.floatBlocks.gap},n=o.items.reduce(((e,t)=>e+t),0)+(o.items.length-1)*o.gap,r=a.gap,i=n-(o.items.length-1)*r;if(i>30*o.items.length||I.floatBlocks.gap-e>=0){const e=(e,t)=>Math.round(t*e/100);let s=o.items.map(((t,a)=>e(U[a],i)));const d=n-(s.reduce(((e,t)=>e+t),0)+(o.items.length-1)*r);if(0!==d){const e=s.length-Math.abs(d);s=s.map(((t,a)=>e<=a?t+(d>0?1:-1):t))}let m={items:s,gap:r||0};$(m,a),w({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:"floatBlocksGap",settings:m,editFromStructure:!!document.querySelector(".selected-element-panel__columns-settings__links__add").closest(".selected-element-panel")}),X({...I,activateSection:t?void 0:"structure",floatBlocks:{...I.floatBlocks,...m,items:I.floatBlocks.items.map(((e,t)=>({...e,width:m.items[t]})))},changeKey:l})}}else if("valign"===l){let e={valign:a.valign};w({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:"floatBlocksValign",settings:e,editFromStructure:!!document.querySelector(".selected-element-panel__columns-settings__links__add").closest(".selected-element-panel")}),X({...I,activateSection:t?void 0:"structure",floatBlocks:{...I.floatBlocks,...e},changeKey:l})}else if("gapMobile"===l){let a={mobileHeight:{classNamePrefix:"em-mob-height-",value:e[l],dim:"px"}};w({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:"floatBlocksGapMobile",settings:a}),X({...I,activateSection:t?void 0:"structure",floatBlocks:{...I.floatBlocks,gapMobile:a.mobileHeight.value},changeKey:l})}setTimeout((()=>(null===x||void 0===x?void 0:x.current)&&x.current.focus({cursor:"end"})),600)}(e)),50)},onFieldsChange:()=>setTimeout((()=>(null===x||void 0===x?void 0:x.current)&&x.current.focus({cursor:"end"})),300),className:"element-controls"},l.createElement("div",{className:"selected-element-panel__columns-settings",style:{paddingTop:P.switchDesktopMobilePropsEnabled||P.stepToOtherElementEnabled||P.deleteButtonEnabled||"structure"===I.type?0:24}},1===I.floatBlocks.items.length&&l.createElement(u.A,{style:{marginBottom:10},message:_('The selected element is in the block that supports a multicolumn structure. To add a new column, click the "Add a column" button.'),type:"info"}),Z!==D.ND&&l.createElement(l.Fragment,null,l.createElement(s.A,{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"}},l.createElement("div",{className:"form-group-title",style:{paddingTop:0}},_("Columns")),l.createElement("div",{className:"selected-element-panel__columns-settings__links"},l.createElement("span",{className:"selected-element-panel__columns-settings__links__add",onClick:()=>{const e=k.getFieldsValue(!0);if(K<8){const a=I.floatBlocks.items.map((e=>e.width)),l=I.floatBlocks.gap,o=a.reduce(((e,t)=>e+(t>30?t:0)),0),n=(o-30-l)/o,r=a.map((e=>e>30?Math.round(e*n):e)).reduce(((e,t)=>e+(t>30?t:0)),0);let i=a.map((e=>e>30?Math.round(e*n):e));i.push(30);const s=o-r-30-l;if(0!==s){let e=i.map(((e,t)=>[t,e])).filter((e=>e[1]>30));const t=e.length-Math.abs(s);e=e.map(((e,a)=>{const l=t<=a?e[1]+(s>0?1:-1):e[1];return[e[0],l]})),e.map((e=>(i[e[0]]=e[1],e)))}w({operation:D.Ru.SANDBOX_FLOATBLOCK_ADD,settings:{gap:e.gap,gapMobile:e.gapMobile,minWidth:30},editFromStructure:!!document.querySelector(".selected-element-panel__columns-settings__links__add").closest(".selected-element-panel")}),X({...I,activateSection:t?void 0:"structure",floatBlocks:{...I.floatBlocks,items:i.map(((e,t)=>{var a;return{width:e,current:(null===(a=I.floatBlocks.items[t])||void 0===a?void 0:a.current)||!1}}))},changeKey:"width"})}else document.querySelector(".selected-element-panel__columns-settings__links__add").classList.add("noactive")}},l.createElement(Wn.A,null)," ",_("Add column")),I.floatBlocks.items.length>1&&l.createElement("span",{onClick:()=>{const e=k.getFieldsValue(!0),a=I.floatBlocks.items.map((e=>e.width));let l={items:[],gap:e.gap};const o=a.reduce(((e,t)=>e+t),0),n=a.length,r=Math.ceil(z/n)*n,i=r/n,s=o-r;if(l.items=Array(n).fill(i),0!==s){const e=a.length-Math.abs(s);l.items=l.items.map(((t,a)=>e<=a?t+(s>0?1:-1):t))}$(l,e),w({operation:D.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:"floatBlocksWidths",settings:l,editFromStructure:!!document.querySelector(".selected-element-panel__columns-settings__links__add").closest(".selected-element-panel")}),X({...I,activateSection:t?void 0:"structure",floatBlocks:{...I.floatBlocks,...l,items:I.floatBlocks.items.map(((e,t)=>({...e,width:l.items[t]})))},changeKey:"width"})}},l.createElement(i.A,{title:_("Make columns the same width.")},l.createElement(fe.A,null)," ",_("Equalize"))))),I.floatBlocks.items.length>1&&l.createElement(S.A.Item,{style:{marginBottom:16}},l.createElement("div",{className:"selected-element-panel__columns-settings__controls"},I.floatBlocks.items.map(((e,t)=>l.createElement("div",{key:"floatblock-"+t,className:"selected-element-panel__columns-settings__controls__column "+(e.current?"current":""),style:{width:e.width/z*100+"%"}},I.floatBlocks.items.length>1&&l.createElement("span",{className:"selected-element-panel__columns-settings__controls__column__remove",onClick:te},l.createElement(L.A,{style:{color:"#ff4d4f"}})),l.createElement("div",{className:"selected-element-panel__columns-settings__controls__field"},l.createElement(S.A.Item,{label:"",name:"width-"+t},l.createElement(Ee.A,{min:30,value:e.width||0,placeholder:_("Width"),ref:H==="width-"+t&&x})))))))),l.createElement(s.A,{size:7,className:"columns-presets"},l.createElement(g.Ay,{onClick:()=>{ee({cols:1})}},l.createElement("svg",{width:"32",height:"20",viewBox:"0 0 32 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("rect",{y:"7",width:"32",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"}))),l.createElement(g.Ay,{onClick:()=>{ee({cols:2})}},l.createElement("svg",{width:"32",height:"20",viewBox:"0 0 32 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("rect",{y:"7",width:"15",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"}),l.createElement("rect",{x:"17",y:"7",width:"15",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"}))),l.createElement(g.Ay,{onClick:()=>{ee({cols:2,width:[66,34]})}},l.createElement("svg",{width:"32",height:"20",viewBox:"0 0 32 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("rect",{y:"7",width:"20.6667",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"}),l.createElement("rect",{x:"22.6667",y:"7",width:"9.33333",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"}))),l.createElement(g.Ay,{onClick:()=>{ee({cols:2,width:[34,66]})}},l.createElement("svg",{width:"32",height:"20",viewBox:"0 0 32 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("rect",{y:"7",width:"9.33333",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"}),l.createElement("rect",{x:"11.3333",y:"7",width:"20.6667",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"}))),l.createElement(g.Ay,{onClick:()=>{ee({cols:3})}},l.createElement("svg",{width:"32",height:"20",viewBox:"0 0 32 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("rect",{y:"7",width:"9.33333",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"}),l.createElement("rect",{x:"11.3333",y:"7",width:"9.33333",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"}),l.createElement("rect",{x:"22.6667",y:"7",width:"9.33333",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"}))),l.createElement(g.Ay,{onClick:()=>{ee({cols:4})}},l.createElement("svg",{width:"32",height:"20",viewBox:"0 0 32 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("rect",{y:"7",width:"6.5",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"}),l.createElement("rect",{x:"8.5",y:"7",width:"6.5",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"}),l.createElement("rect",{x:"17",y:"7",width:"6.5",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"}),l.createElement("rect",{x:"25.5",y:"7",width:"6.5",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"}))))),I.floatBlocks.items.length>1&&l.createElement(l.Fragment,null,Z===D.ND&&l.createElement(s.A,{style:{marginBottom:24}},l.createElement(B.A,{size:"small",disabled:void 0===(null===(v=I.floatBlocks)||void 0===v?void 0:v.wrap),checked:M,onChange:e=>{O(e),w({operation:D.Ru.SANDBOX_FLOATBLOCK_WRAP,settings:{wrap:!M}}),X({...I,activateSection:t?void 0:"structure",floatBlocks:{...I.floatBlocks,wrap:!M},changeKey:"wrap"})}}),l.createElement("div",{style:{position:"relative",top:2}},_("Line break on mobile devices"))),Z!==D.ND&&l.createElement(s.A,{style:{marginBottom:24}},l.createElement(B.A,{size:"small",disabled:void 0===(null===(A=I.floatBlocks)||void 0===A?void 0:A.wrap),checked:V,onChange:e=>{F(e),w({operation:D.Ru.SANDBOX_FLOATBLOCK_DIR,settings:{dirRevert:!V}}),X({...I,activateSection:t?void 0:"structure",floatBlocks:{...I.floatBlocks,dirRevert:!V},changeKey:"dir"})}}),l.createElement("div",{style:{position:"relative",top:2}},_("Revers order on desktop")))),I.floatBlocks.items.length>1&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider"}),l.createElement(b.A,{gutter:10},l.createElement(h.A,{span:12},l.createElement("div",{className:"form-group-title"},_("Vertical alignment")),l.createElement("div",{style:{paddingBottom:4}},l.createElement(Ql,{form:k,elementSettings:{},disabled:I.floatBlocks.items.length<=1}))),l.createElement(l.Fragment,null,Z!==D.ND&&l.createElement(h.A,{span:12},l.createElement("div",{className:"form-group-title"},_("Indent between columns")),l.createElement(S.A.Item,{name:"gap",style:{marginBottom:20}},l.createElement(Ft.A,{min:0,disabled:I.floatBlocks.items.length<=1,placeholder:_("Indent between columns"),prefix:l.createElement(fe.A,null),addonAfter:"px",ref:"gap"===H&&x}))),Z===D.ND&&l.createElement(h.A,{span:12},l.createElement("div",{className:"form-group-title"},_("Indent in mobile")),l.createElement(S.A.Item,{name:"gapMobile",style:{marginBottom:20}},l.createElement(Ft.A,{min:0,disabled:I.floatBlocks.items.length<=1,placeholder:_("Indent in mobile"),prefix:l.createElement(Gl.A,null),addonAfter:"px"}))))))))};Gn.defaultProps={selectedElement:{parent:!1}};const Un=Gn,qn=({email:e,formSettings:t})=>{var a,o;const{__:n}=(0,y.s9)(),r=(0,Ra.cR)(),d=(0,f.wA)(),m=(0,Me.XW)(),u=e.hasOwnProperty("type")?D.IE:D.Tm,p=(0,f.d4)(W.qX),b=(0,f.d4)(Ke.qX),h=(0,f.d4)(Ie.Tn),E=Object.keys(t).length>0?t.settings:u===D.Tm?p:b,v=(0,Y.rD)();(0,l.useEffect)((()=>{const e=Object.values(D.bV);E.type&&e.includes(E.type)?"structure"!==E.activateSection?(r.querySelector(".email-pane .secondary-tabs .ant-tabs-content").scrollTop=0,d((0,Ie.Bp)(D.WU))):d((0,Ie.Bp)(D.mX)):"{}"!==JSON.stringify(E)&&d((0,Ie.Bp)(""))}),[E,d,r]);let A=[{label:l.createElement("span",{style:{textTransform:"capitalize"}},E.caption?E.caption:n("Edit element")),key:D.WU,forceRender:!0,className:"email-properties__collapse-panel",children:l.createElement(zn,{className:"email-properties__collapse-panel",key:D.WU,selectedElement:E,formSettings:t,emailElementType:u,forceRender:!0})}];E.type&&!(null===(a=E.floatBlocks)||void 0===a||!a.items.length)>0&&!(null===(o=E.floatBlocks)||void 0===o||!o.items.filter((e=>!!e.width)).length)>0&&A.push({label:l.createElement(l.Fragment,null,n("Structure")),key:D.mX,forceRender:!0,className:"email-properties__collapse-panel",children:l.createElement(Un,{selectedElement:E,emailElementType:u,isSelectedElement:!1})});const _=e=>{e.stopPropagation(),m({operation:D.Ru.SANDBOX_ELEMENT_PARENT_GET})};return l.createElement(l.Fragment,null,l.createElement(c.A,{className:C()("secondary-tabs email-properties__collapse",{"secondary-tabs_unset_scroll":h===D.nA||h===D.WU}),size:"large",animated:{inkBar:!1,tabPane:!1},activeKey:h,onChange:e=>d((0,Ie.Bp)(e||"")),items:A}),((e,t,a)=>(v.switchDesktopMobilePropsEnabled||v.stepToOtherElementEnabled||v.deleteButtonEnabled)&&l.createElement(l.Fragment,null,l.createElement(s.A,{className:"selected-element-panel__extra-btn-container"},l.createElement(s.A,null,l.createElement(s.A,{size:5},v.deleteButtonEnabled&&l.createElement(i.A,{title:n("Remove element by Delete Key"),placement:"bottom"},l.createElement(g.Ay,{type:"text",onClick:e=>((e,t,a)=>{e.stopPropagation(),m({operation:D.Ru.SANDBOX_ELEMENT_REMOVE}),t(a===D.Tm?(0,W.A9)({}):(0,Ke.A9)({}))})(e,t,a),icon:l.createElement(L.A,null),disabled:!E.deletable})),v.stepToOtherElementEnabled&&l.createElement(i.A,{title:n("Up to parent element"),placement:"bottom"},l.createElement(g.Ay,{type:"text",onClick:_,icon:l.createElement(z.A,{icon:"GoToParent"}),disabled:!E.parent})))))))(E.parent,d,u),l.createElement(g.Ay,{type:"text",className:"ant-modal-close","aria-label":"Close",onClick:()=>{d((0,Ie.Fk)()),setTimeout((()=>{u===D.IE?d((0,Ke.A9)({type:null})):d((0,W.A9)({type:null}))}),300),m({operation:D.Ru.SANDBOX_ELEMENT_ACTIVE_RESET})}},l.createElement(z.A,{icon:"Close"})))};var Zn=a(5553),Xn=a(83612),Kn=a(25232),Yn=a(58316),$n=a(38826);const Qn=({className:e,style:t,color:a,text:o,bordered:n,...r})=>{const i=o||"";return l.createElement(x.A,Object.assign({style:t,color:a,bordered:n,className:e},r),i)},Jn=({text:e,counter:t,limits:a,wrapperStyles:o})=>{const{__:r,_n:i}=(0,y.s9)(),s=(0,v.Zp)(),d=(0,Y.rD)(),{token:m}=n.A.useToken(),c=+a>0,u=!c||t<+a,p=d.billingPageUrl||"/billing",g=t+" "+r("of")+" "+(c?a:"\u221e")+" "+(e||i("test","tests",a))+" "+i("was used","were used",t);return l.createElement("div",{className:"limits-couter-wrapper",style:o},l.createElement(Qn,{bordered:!1,text:g,className:"limit-counter",style:{color:u?m.colorText:"white"},color:u?m.colorFillSecondary:"rgb(255, 77, 79)"}),c&&l.createElement("div",{style:{fontSize:14,textDecoration:"underline"},onClick:()=>s(p)},r("Need more?")))};var er=a(76047),tr=a(33932),ar=a(12744),lr=a(89613),or=a(90614),nr=a(86095),rr=a(23928),ir=a(15626);const sr=e=>{const{__:t}=(0,y.s9)();return[{key:"\ud83d\udce7",label:l.createElement("div",{onClick:()=>{e("theme-and-preheader-generator")}},"\ud83d\udce7 ",t("Subject line & preheader generator"))},{key:"\ud83c\udf0e",label:l.createElement("div",{onClick:()=>{e("translator")}},"\ud83c\udf0e ",t("Translator"))},{key:"\ud83d\udcc4",label:l.createElement("div",{onClick:()=>{e("writer")}},"\ud83d\udcc4 ",t("Copywriter"))},{key:"\ud83d\udd0e",label:l.createElement("div",{onClick:()=>{e("corrector")}},"\ud83d\udd0e ",t("Proofreader"))},{key:"\ud83e\udde0",label:l.createElement("div",{onClick:()=>{e("psychologist")}},"\ud83e\udde0 ",t("Psychologist"))},{key:"\ud83d\udcc8",label:l.createElement("div",{onClick:()=>{e("marketolog")}},"\ud83d\udcc8 ",t("Marketer"))},{key:"\u2728",label:l.createElement("div",{onClick:()=>{e("email-generator")}},"\u2728 ",t("Email generator"))}]},{TextArea:dr}=w.A,mr=({messages:e,newEmailAiGeneratorRef:t})=>{const a=(0,nr.fn)(),{__:o,_n:n}=(0,y.s9)(),r=(0,f.wA)(),s=(0,l.useRef)(null),d=(0,Y.rD)(),m=(0,A.hN)(),{projectId:c,emailId:u}=(0,v.g)(),p=(0,lr.u)(),b=(0,or.ml)(ir.AZ.ON_LIMIT_ID),[h,_]=(0,l.useState)(null),[C,w]=(0,l.useState)(0),[k,x]=(0,l.useState)(!1),[B,T]=(0,l.useState)(""),[R,L]=(0,l.useState)([]),[P,I]=(0,l.useState)(!1),[M,O]=(0,l.useState)(!1),[V,H]=(0,l.useState)(null),[j,G]=(0,l.useState)(0),[U,q]=(0,l.useState)(null),Z=(0,f.d4)(W.Hs),X=(0,f.d4)(we.C1),K=(0,Me.QC)(),[$]=(0,tr.YG)(),Q=(0,Me.XW)(),[J,ee]=(0,tr.EQ)(),[te,{reset:ae}]=(0,ar.MN)(),[le,{data:oe=[]}]=(0,ar.y4)(),ne={cursor:k?"not-allowed":"default",pointerEvents:k?"none":"auto"};(0,l.useEffect)((()=>{U&&P&&(t.current=!0),P||(t.current=!1)}),[U,P]);const re=!(!d.limits||!d.counters)&&D.EW.isPlugin,{limits:ie}=D.EW.isPlugin&&d.limits?d:{limits:{ai_limit:0,ai_generator_limit:0}},{ai_limit:se,ai_generator_limit:de}=ie,me=re&&C>=se&&se>0,ce=re&&j>=de&&de>0,ue=(0,l.useCallback)((()=>{b.fire({name:"AiChatCount",count:C+1})}),[b,C]),pe=(0,l.useCallback)((()=>{b.fire({name:"AiGeneratorCount",count:j+1})}),[b,j]);(0,l.useEffect)((()=>{var e,t;re&&(w((null===d||void 0===d||null===(e=d.counters)||void 0===e?void 0:e.ai_counter)||0),G((null===d||void 0===d||null===(t=d.counters)||void 0===t?void 0:t.ai_generator_counter)||0))}),[d,re]),(0,l.useEffect)((()=>{q((()=>{var e;if(R.length<=0)return!1;return"email-generator"===(null===(e=R.toReversed().find((e=>{var t;return null===(t=e.data)||void 0===t?void 0:t.context})))||void 0===e?void 0:e.data.context)})())}),[R]);const ge=(0,l.useCallback)((async()=>await K.sendAsync(D.Ru.SANDBOX_IS_EMAIL_EMPTY)),[K]),be=(0,l.useCallback)((()=>{var e;const t=null===(e=s.current)||void 0===e?void 0:e.closest(".ant-tabs-content.ant-tabs-content-top");setTimeout((()=>{null===t||void 0===t||t.scrollTo({top:t.scrollHeight,behavior:"smooth"})}),0)}),[s]),he=(0,l.useCallback)((()=>{$({entity_id:u}).then((e=>{L(e.data.documents),be()}))}),[u,$,L,be]),Ee=(0,l.useCallback)((()=>{I(!0),x(!0),te({task_id:h,entity_id:u,status:"started"}).then((()=>{he()}))}),[u,te,h,he]),fe=(0,l.useCallback)((()=>{te({task_id:h,entity_id:u,status:"completed"}).then((e=>{403===e.data.status&&ae(),he()})).catch((e=>{})),x(!1),I(!1)}),[u,te,h,he,ae]);(0,l.useEffect)((()=>{let e;if(P){var t,l;const o=null===(t=oe[oe.length-1])||void 0===t||null===(l=t.processing)||void 0===l?void 0:l.email;if(o){let t=oe[oe.length-1].status;e=setInterval(a.setValue(o),500),0===t&&fe()}V&&(clearInterval(e),r((0,W.AJ)(o)),I(!1),H(!1))}return()=>{clearInterval(e)}}),[a,V,r,oe,P,Z,u,h,he,te,ee,fe]),(0,l.useEffect)(be,[be]),(0,l.useEffect)((()=>{(null===e||void 0===e?void 0:e.length)>0&&L(e),Q({operation:D.Ru.SANDBOX_EMAIL_CONTENT_GET})}),[e,Q]),(0,l.useEffect)((()=>{const e=K.onInit((()=>{K.send({operation:D.Ru.SANDBOX_LOCK_EDIT,data:k}),K.send({operation:D.Ru.SANDBOX_LOCK_DISCUSS,value:k})}));return()=>e.dispose()}),[k,K]);const ve=async()=>{if(B){const e=B.replaceAll(/\n/g,"<br>"),t={project_id:c,connection:"chat",entity_id:u,message:e,locale:X.locale.slice(0,2),subject:Z.subject||"",preheader:Z.preheader||"",textContent:(0,rr.T5)(a.getValue())};if(U&&ce||me){m.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:o(U?"You have reached the limit of AI generator usage.":"You have reached the limit of AI chat usage.")}}),description:l.createElement("div",{dangerouslySetInnerHTML:{__html:o("Please upgrade your plan.")}}),placement:"bottomRight"});const e={data:{role:"assistant",message:o(U?"You have reached the limit of AI generator usage.":"You have reached the limit of AI chat usage.")}};L((t=>[...t,e]))}else{re&&(U&&j!==de?(pe(),G((e=>e+1))):C!==se&&(ue(),w((e=>e+1)))),p({event:"submit_form",action:"chat_whit_ai_assistant",entity_id:t.entity_id,project_id:t.project_id});const a=[{data:{role:"user",message:e,userInfo:{display_name:X.first_name+" "+X.last_name,avatar_url:X.avatar_urls[24]}}},{data:{role:"assistant",message:"\u043f\u0435\u0447\u0430\u0442\u0430\u0435\u0442",isLoading:!0}}];L((e=>[...e,...a])),J({body:t}).then((e=>{if(401===e.data.status)throw new Error(D.ff);if(e.data.task_id){let t=e.data.task_id;_(t),le({id:t,setError:H}),ge().then((e=>{e?Ee():O(!0)}))}he()})).catch((e=>{var t,a;m.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.code)||o("Error")}}),description:l.createElement("div",{dangerouslySetInnerHTML:{__html:(null===e||void 0===e||null===(a=e.data)||void 0===a?void 0:a.message)||o("Something went wrong.")}}),placement:"bottomRight"})}))}T("")}},ye=e=>{const t={data:{role:"assistant",message:"\u043f\u0435\u0447\u0430\u0442\u0430\u0435\u0442",isLoading:!0}};L((e=>[...e,t]));const n={project_id:c,connection:"chat",entity_id:u,context:e,locale:X.locale.slice(0,2),subject:Z.subject||"",preheader:Z.preheader||"",textContent:(0,rr.T5)(a.getValue())};if(re&&(U&&j!==de?(pe(),G((e=>e+1))):C!==se&&(ue(),w((e=>e+1)))),me){m.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:o("You have reached the limit of AI chat usage.")}}),description:l.createElement("div",{dangerouslySetInnerHTML:{__html:o("Please upgrade your plan.")}}),placement:"bottomRight"});const e={data:{role:"assistant",message:o("You have reached the limit of AI chat usage.")}};L((t=>[...t,e]))}else p({event:"select",action:"select_ai_assistant_role",context:n.context,entity_id:n.entity_id,project_id:n.project_id}),J({body:n}).then((e=>{if(401===e.data.status)throw new Error(D.ff);he()})).catch((e=>{var t,a;m.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.code)||"Error"}}),description:l.createElement("div",{dangerouslySetInnerHTML:{__html:(null===e||void 0===e||null===(a=e.data)||void 0===a?void 0:a.message)||"Something went wrong"}}),placement:"bottomRight"})}))},Ae=(0,l.useCallback)((e=>{const t={data:{role:"user",message:e,userInfo:{display_name:X.first_name+" "+X.last_name,avatar_url:X.avatar_urls[24]}}},n={data:{role:"assistant",message:"\u043f\u0435\u0447\u0430\u0442\u0430\u0435\u0442",isLoading:!0}};L((e=>[...e,t,n]));const r={project_id:c,connection:"chat",entity_id:u,message:e,locale:X.locale.slice(0,2),subject:Z.subject||"",preheader:Z.preheader||"",textContent:(0,rr.T5)(a.getValue())};if(ce){m.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:o("You have reached the limit of AI generator usage.")}}),description:l.createElement("div",{dangerouslySetInnerHTML:{__html:o("Please upgrade your plan.")}}),placement:"bottomRight"});const e={data:{role:"assistant",message:o("You have reached the limit of AI chat usage.")}};L((t=>[...t,e]))}else J({body:r}).then((e=>{if(401===e.data.status)throw new Error(D.ff);if(e.data.task_id){let t=e.data.task_id;_(t),le({id:t,setError:H}),ge().then((e=>{e?Ee():O(!0)}))}re&&(U&&j!==de?(pe(),G((e=>e+1))):C!==se&&(ue(),w((e=>e+1)))),he()})).catch((e=>{var t,a;m.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.code)||"Error"}}),description:l.createElement("div",{dangerouslySetInnerHTML:{__html:(null===e||void 0===e||null===(a=e.data)||void 0===a?void 0:a.message)||"Something went wrong"}}),placement:"bottomRight"})}))}),[o,C,j,ge,Ee,se,de,X,Z,u,U,ce,ue,pe,re,a,m,c,J,le,he]);(0,l.useEffect)((()=>{const e=window.localStorage.getItem(D.V0.em_ai_settings);if(1===R.length&&"assistant"===R[0].data.role&&e&&u){const t=new F.jG,a={project_id:c,connection:"chat",entity_id:u,context:"email-generator",locale:X.locale.slice(0,2)};window.localStorage.removeItem(D.V0.em_ai_settings),J({body:a}).then((({data:a})=>{t.isDisposed()||Ae(e)}))}}),[R,Ae,u,X.locale,c,J]);const _e={replace:e=>{var t,a,n,r,s,d,c,u;if(null!==(t=e.attribs)&&void 0!==t&&null!==(a=t.class)&&void 0!==a&&a.split(" ").includes("ai-response-title"))return l.createElement(i.A,{placement:"left",title:o("Replace the title")},l.createElement("div",{onClick:()=>(e=>{const t=e.children[0].data;K.send(D.Ru.SANDBOX_SUBJECT_UPDATE,{value:e.children[0].data,guid:Z.renderGuid,fromAI:!0}),m.success({id:"EMAIL_TITLE_UPDATED_FROM_AI",message:o("Title copied to email settings"),placement:"bottomRight",data:t})})(e)},l.createElement("span",{className:"ai-response-title"},(0,Kn.zd)(e.children,_e))));if(null!==(n=e.attribs)&&void 0!==n&&null!==(r=n.class)&&void 0!==r&&r.split(" ").includes("ai-response-preheader"))return l.createElement(i.A,{placement:"left",title:o("Replace the preheader")},l.createElement("div",{onClick:()=>(e=>{const t=e.children[0].data;K.send(D.Ru.SANDBOX_PREHEADER_UPDATE,{value:e.children[0].data,guid:Z.renderGuid,fromAI:!0}),m.success({id:"EMAIL_TITLE_UPDATED_FROM_AI",message:o("Preheader copied to email settings"),placement:"bottomRight",data:t,duration:300})})(e)},l.createElement("span",{className:"ai-response-preheader"},(0,Kn.zd)(e.children,_e))));if(null!==(s=e.attribs)&&void 0!==s&&null!==(d=s.class)&&void 0!==d&&d.split(" ").includes("ai-response-copy"))return l.createElement(i.A,{placement:"left",title:o("Copy to clipboard")},l.createElement("div",{onClick:()=>(e=>{const t=e.children[0].data;navigator.clipboard.writeText(t).then((()=>{m.success({id:"TEXT_COPIED_TO_CLIPBOARD",message:o("Text copied to clipboard"),placement:"bottomRight",data:t})})).catch((e=>{}))})(e)},l.createElement("span",{className:"ai-response-copy"},(0,Kn.zd)(e.children,_e))));if(null!==(c=e.attribs)&&void 0!==c&&null!==(u=c.class)&&void 0!==u&&u.split(" ").includes("ai-response-user-message")){var p,g,b,h,E;const t=(null===(p=e.attribs)||void 0===p?void 0:p.data)||(null===(g=e.children)||void 0===g||null===(b=g[0])||void 0===b?void 0:b.data);return l.createElement("li",{className:null===(h=e.attribs)||void 0===h?void 0:h.class,data:null===(E=e.attribs)||void 0===E?void 0:E.data,onClick:()=>Ae(t)},(0,Kn.zd)(e.children,_e))}}};return l.createElement("div",{ref:s,className:"discuss-main"},R.length>0&&l.createElement(Zn.A,{onClick:e=>{"string"===typeof e.target.className&&e.target.className.includes("ai-response-change-context")&&(ee.isLoading||ye(e.target.role))},className:"comment-list",itemLayout:"horizontal",dataSource:R,renderItem:e=>{var t,a,r;return l.createElement("li",{key:e._id,id:e._id},l.createElement(er.A,{className:e.data.userInfo?"":"ai-comment",avatar:"assistant"===e.data.role?l.createElement(z.A,{icon:"ChatGpt",className:"anticon-robot",style:{color:"#ffffff",width:24,height:24,borderRadius:"50%",justifyContent:"center"}}):!e.data.userInfo||!e.data._modified&&D.EW.isPlugin?X.avatar_urls[24]||l.createElement(Yn.A,{style:{color:"#ffffff",width:24,height:24,borderRadius:"50%",justifyContent:"center"}}):e.data.userInfo.avatar_url,author:l.createElement("div",{style:ne},"user"===(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.role)?D.EW.isPlugin?(null===X||void 0===X?void 0:X.username)||o("User"):null===(a=e.data)||void 0===a||null===(r=a.userInfo)||void 0===r?void 0:r.display_name:o("AI Assistant")),datetime:e._created?l.createElement("span",{dangerouslySetInnerHTML:{__html:(0,F.Yq)((0,Xn.A)(e._created),n,!0)}}):null,content:e.data.isLoading?l.createElement("div",{className:"spin"},l.createElement($n.A,{style:{fontSize:24},spin:!0})):l.createElement("div",{style:ne},(0,Kn.Ay)(e.data.message,_e))}))}}),re&&(U?l.createElement(Jn,{text:o("mail generator"),counter:j,limits:de,wrapperStyles:{marginTop:-25}}):l.createElement(Jn,{text:o("messeges"),counter:C,limits:se,wrapperStyles:{marginTop:-25}})),l.createElement(S.A,{onFinish:ve,className:"addMode"},l.createElement(S.A.Item,{style:{marginBottom:10}},l.createElement(dr,{disabled:k,value:B,onChange:e=>T(e.target.value),rows:4,placeholder:o("Type your request"),className:"textarea-comment",onPressEnter:e=>"Enter"===e.key&&e.ctrlKey&&ve(),spellCheck:"false"})),l.createElement(S.A.Item,null,l.createElement(g.Ay,{disabled:ee.isLoading||k,type:"default",style:{background:"var(--colorInfo)",color:"#ffffff"},className:"button-target"},l.createElement(N.A,{placement:"top",disabled:k,key:"Export",arrow:{pointAtCenter:!0},menu:{items:sr(ye)}},l.createElement("div",{disabled:k,style:{margin:0,padding:0}},l.createElement(z.A,{icon:"ChatGpt"}),o("Role")))),l.createElement(g.Ay,{disabled:ee.isLoading||k,className:"button-add",type:"primary",htmlType:"submit"},o("Send")," ",l.createElement(z.A,{icon:"SendOutlined"})))),l.createElement(E.A,{title:o("Warning"),centered:!0,open:M,onOk:()=>{Ee(),O(!1)},onCancel:()=>{fe(),O(!1)}},l.createElement("p",null,o("The current template will be changed to the generated one, are you sure about this?"))))};var cr=a(66079),ur=a(1753),pr=a(67594),gr=a(5889);function br(e,t){return{[e]:{Filter:t("Filter"),filter:t("filter"),Resize:t("Resize"),resize:t("resize"),Crop:t("Crop"),Width:t("Width"),width:t("width"),Height:t("Height"),height:t("height"),"Background color":t("Background color"),Cancel:t("Cancel"),Create:t("Create"),Objects:t("Objects"),Quality:t("Quality"),Save:t("Save"),"Loading Canvas":t("Loading Canvas"),"Loading Image":t("Loading Image"),"Loading State":t("Loading State"),"Processing Image":t("Processing Image"),Close:t("Close"),Apply:t("Apply"),Font:t("Font"),Color:t("Color"),Background:t("Background"),Image:t("Image"),Opacity:t("Opacity"),Outline:t("Outline"),Shadow:t("Shadow"),Gradient:t("Gradient"),Texture:t("Texture"),"Replace Image":t("Replace Image"),"Outline Color":t("Outline Color"),"Shadow Color":t("Shadow Color"),"Font Size":t("Font Size"),Radius:t("Radius"),"Brush Color":t("Brush Color"),"Brush Type":t("Brush Type"),"Brush Size":t("Brush Size"),History:t("History"),"Maintain aspect ratio":t("Maintain aspect ratio"),"New Text":t("New Text"),Size:t("Size"),Draw:t("Draw"),Text:t("Text"),Stickers:t("Stickers"),Frame:t("Frame"),Shapes:t("Shapes"),Corners:t("Corners"),corners:t("corners"),Done:t("Done"),"Applied Filters":t("Applied Filters"),"Resized Image":t("Resized Image"),"Cropped Image":t("Cropped Image"),"Added Drawing":t("Added Drawing"),"Added Text":t("Added Text"),"Added Shape":t("Added Shape"),"Added Sticker":t("Added Sticker"),"Added Frame":t("Added Frame"),"Merged Objects":t("Merged Objects"),"Rounded Corner":t("Rounded Corner"),"Replaced Background Image":t("Replaced Background Image"),"Added Image":t("Added Image"),Initial:t("Initial"),"Loaded State":t("Loaded State"),"Changed Style":t("Changed Style"),"Deleted object":t("Deleted object"),Merge:t("Merge"),Emoticons:t("Emoticons"),Doodles:t("Doodles"),Landmarks:t("Landmarks"),Bubbles:t("Bubbles"),Transportation:t("Transportation"),Beach:t("Beach"),PencilBrush:t("PencilBrush"),SprayBrush:t("SprayBrush"),CircleBrush:t("CircleBrush"),DiamondBrush:t("DiamondBrush"),VLineBrush:t("VLineBrush"),HLineBrush:t("HLineBrush"),SquareBrush:t("SquareBrush"),Square:t("Square"),square:t("square")}}}var hr=a(76293),Er=a(96734),fr=a(3792),vr=a(12352);const yr={text:{replaceDefault:!0,defaultCategory:"handwriting",items:[{family:"Montserrat Light",src:"customFonts/Montserrat-Light.woff2"},{family:"Montserrat Regular",src:"customFonts/Montserrat-Regular.woff2"},{family:"Montserrat Bold",src:"customFonts/Montserrat-Bold.woff2"},{family:"Montserrat Black",src:"customFonts/Montserrat-Black.woff2"},{family:"Roboto Light",src:"customFonts/Roboto-Light.woff2"},{family:"Roboto Regular",src:"customFonts/Roboto-Regular.woff2"},{family:"Roboto Bold",src:"customFonts/Roboto-Bold.woff2"},{family:"Roboto Black",src:"customFonts/Roboto-Black.woff2"},{family:"Lato Light",src:"customFonts/Lato-Light.woff2"},{family:"Lato Regular",src:"customFonts/Lato-Regular.woff2"},{family:"Lato Bold",src:"customFonts/Lato-Bold.woff2"},{family:"Lato Black",src:"customFonts/Lato-Black.woff2"},{family:"Rubik Light",src:"customFonts/Rubik-Light.woff2"},{family:"Rubik Regular",src:"customFonts/Rubik-Regular.woff2"},{family:"Rubik Bold",src:"customFonts/Rubik-Bold.woff2"},{family:"Rubik Black",src:"customFonts/Rubik-Black.woff2"},{family:"Bebas Neue Light",src:"customFonts/BebasNeueLight.woff2"},{family:"Bebas Neue Regular",src:"customFonts/BebasNeueRegular.woff2"},{family:"Bebas Neue Book",src:"customFonts/BebasNeueBook.woff2"},{family:"Bebas Neue Bold",src:"customFonts/BebasNeueBold.woff2"},{family:"Arial",src:"customFonts/ArialMT.woff2"},{family:"Arial Bold",src:"customFonts/Arial-BoldMT.woff2"}]}};function Ar(e,t){if("json"===e)return new Blob([t],{type:"application/json"});if("svg"===e)return new Blob([t],{type:"image/svg+xml"});const a=`image/${e}`;return((e,t="application/octet-stream")=>fetch(`data:${t};base64,${e}`).then((e=>e.blob())))(t=t.replace(/data:image\/([a-z]*)?;base64,/,""),a)}const _r=l.createElement($n.A,{style:{fontSize:48},spin:!0}),Cr=({currentImageLink:e,newLink:t,onSave:o,uploadImageResultIsLoading:n})=>{const r=(0,Er.p)(),[i,s]=(0,l.useState)(),[d,m]=(0,l.useState)(),{__:c}=(0,y.s9)();let u=(0,f.wA)();const p=(0,f.Pj)(),b=(0,f.d4)(we.C1),h=(0,f.d4)(V.sK),v=(0,f.d4)(ke.yN),A=(0,l.useRef)(!1),[_,C]=(0,l.useState)(),S=(0,or.ml)(ir.AZ.FILE_PROXY_EVENT_ID);(0,l.useEffect)((()=>{(async()=>{let t;try{const a=await fetch(e);t=await a.blob()}catch{if(t=await S.fire({url:e,project:v}).filter((e=>e instanceof Blob))[0],!t){const a=r.get(D.A9.em_token)||await fr.di.getInstance(p,vr.Y),l=await fetch(`https://app.emailmaker.ru/api/wp-json/cors-proxy/v1/get?url=${encodeURIComponent(e)}`,{headers:{authorization:`Bearer ${a}`}});t=await l.blob()}}if(t){let e=new FileReader;e.onload=()=>{null===_||void 0===_||_.tools.import.openBackgroundImage(i),e.result!==i&&(s(e.result),m(t.type))},e.readAsDataURL(t)}})().catch((e=>{}))}),[e,t,s,r,i,_,S,v,p]);const w=(0,l.useCallback)((()=>{s(null),m(null),u((0,_e.BK)()),u((0,V.Os)()),u((0,V.Oo)(D.lx.UPLOAD_IMAGE_MODAL))}),[u]),k=(0,l.useRef)();k.current=async function(e,t,a){const l=await Ar(a,e);o&&o(new File([l],t,{lastModified:(new Date).getTime(),type:l.type}))};const x=(0,l.useCallback)((e=>{if(e)if(A.current&&_);else{A.current=!0;const e=b.locale?b.locale.replace("_","-"):"ru-RU",t=b.theme===D.IJ?matchMedia(D.F3).matches?D.nd:D.T:b.theme;Promise.all([a.e(3085),a.e(9880)]).then(a.bind(a,85466)).then((({Pixie:a})=>a.init({selector:"#pixie-editor",baseUrl:"https://emailmaker.ru/assets/pixie",image:i,activeLanguage:e,languages:br(e,c),tools:yr,ui:{menubar:{replaceDefaultItems:!0,items:[{type:"undoWidget",align:"left"},{type:"zoomWidget",align:"center",desktopOnly:!0},{type:"button",icon:l.createElement(hr.A,{style:{fontSize:20}}),align:"right",desktopOnly:!0,action:e=>{e.togglePanel("history")}},{type:"button",icon:l.createElement(io.A,{style:{fontSize:20}}),align:"right",desktopOnly:!0,action:()=>w()}]},nav:{position:"top"},activeTheme:t,mode:"inline",forceOverlayModeOnMobile:!1},onSave:async function(e,t,a){k.current(e,t,a)}}))).then((e=>{C(e)})).catch((e=>{}))}}),[b.theme,i,_,C,b.locale,c,w]),B=(0,l.useCallback)((()=>{null===_||void 0===_||_.tools.export.save(null===e||void 0===e?void 0:e.split("/").pop().split(".")[0],null===d||void 0===d?void 0:d.split("/")[1])}),[_,e,d]);return l.createElement(E.A,{afterOpenChange:x,width:"100%",style:{maxWidth:"100%",minHeight:"100vh"},className:"image-editor-modal blocks-modal",centered:!0,closable:!1,zIndex:1100,mask:!1,open:h,footer:[l.createElement(g.Ay,{key:"Cancel",className:"em-analytics__profile-cancel",onClick:w},c("Cancel")),l.createElement(g.Ay,{key:"Ok",className:"em-analytics__profile-updapixiete",id:"save",type:"primary",onClick:B},c("Update"))]},n&&l.createElement("div",{style:{position:"absolute",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:"var(--colorBgLayout)",zIndex:10,opacity:.7}},l.createElement(st.A,{size:"large",indicator:_r})),l.createElement("div",{id:"pixie-editor"}))},Sr=l.createElement($n.A,{style:{fontSize:48},spin:!0}),wr=({currentImageLink:e,newLink:t,onSave:a,uploadImageResultIsLoading:o})=>l.createElement(l.Fragment,null,l.createElement("div",null,l.createElement("div",{className:"image-preview"},o&&l.createElement("div",{style:{position:"absolute",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:"var(--colorBgLayout)",zIndex:10,opacity:.7}},l.createElement(st.A,{size:"large",indicator:Sr})),(t||e)&&l.createElement("img",{alt:"uploadedImage",src:t||e}))),l.createElement(Cr,{currentImageLink:e,newLink:t,onSave:a,uploadImageResultIsLoading:o}));var kr=a(20127),xr=a(21867);const Br="blocks",Tr=({setCurrentImageLink:e,setModalHeight:t,setModalWidth:a,setImageStockList:o,imageStockList:n,currentReq:r,setCurrentReq:s,inputRef:d,setStockLink:c,customRequest:u})=>{const[p,g]=(0,l.useState)(!1),[E,f]=(0,l.useState)(2),{__:v}=(0,y.s9)(),[A]=(0,Se.Jg)(),[_]=(0,Se.h4)();(0,l.useEffect)((()=>{""!==r.keywords&&C()}),[r.color,r.orientation]);const C=async()=>{const e=await _({query:r,page:1});e.data.results.length>0&&(o(e.data.results),setTimeout((()=>{a(1060),t("84vh")}),0))},[k,x]=(0,l.useState)(null);return l.createElement("div",{className:"stock-tab"},l.createElement(S.A,{onValuesChange:C,className:n.length>0?"serach-results":""},l.createElement(b.A,{gutter:24},l.createElement(h.A,{span:n.length>0?"":24},l.createElement(S.A.Item,{className:"stock-search-input"},l.createElement(w.A,{onKeyDown:e=>"Space"===e.code&&C(),onPressEnter:e=>C(),allowClear:!0,size:n.length>0?"medium":"large",placeholder:v("Search image"),value:r.keywords,onChange:e=>s((t=>({...t,keywords:e.target.value}))),ref:d,spellCheck:"false",suffix:l.createElement(ka.A,{onClick:C,className:"cards-search__search-icon, input-icon",style:{fontSize:"16px",cursor:"pointer"}})}))),n.length>0&&l.createElement(l.Fragment,null,l.createElement(h.A,null,l.createElement(gt.Ay.Group,{defaultValue:"",onChange:e=>s((t=>({...t,orientation:e.target.value})))},l.createElement(i.A,{title:v("All"),placement:"top"},l.createElement(gt.Ay.Button,{value:""},l.createElement(z.A,{icon:"MixedView"}))),l.createElement(i.A,{title:v("Landscape"),placement:"top"},l.createElement(gt.Ay.Button,{value:"landscape"},l.createElement(z.A,{icon:"LandscapeView"}))),l.createElement(i.A,{title:v("Portrait"),placement:"top"},l.createElement(gt.Ay.Button,{value:"portrait"},l.createElement(z.A,{icon:"PortraitView"}))),l.createElement(i.A,{title:v("Squarish"),placement:"top"},l.createElement(gt.Ay.Button,{value:"squarish"},l.createElement(z.A,{icon:"SquareView"}))))),l.createElement(h.A,null,l.createElement(gt.Ay.Group,{defaultValue:"",className:"stock-color-filter",onChange:e=>s((t=>({...t,color:e.target.value})))},l.createElement(i.A,{title:v("All"),placement:"top"},l.createElement(gt.Ay.Button,{className:"all-colors",value:""},"All")),l.createElement(i.A,{title:v("Black"),placement:"top"},l.createElement(gt.Ay.Button,{className:"black-color",value:"black"},"B")),l.createElement(i.A,{title:v("Black and White"),placement:"top"},l.createElement(gt.Ay.Button,{className:"bw-color",value:"black_and_white"},"B&\xa7W")),l.createElement(i.A,{title:v("White"),placement:"top"},l.createElement(gt.Ay.Button,{className:"white-color",value:"white"},"W")),l.createElement(i.A,{title:v("Orange"),placement:"top"},l.createElement(gt.Ay.Button,{className:"orange-color",value:"orange"},"O")),l.createElement(i.A,{title:v("Red"),placement:"top"},l.createElement(gt.Ay.Button,{className:"red-color",value:"red"},"R")),l.createElement(i.A,{title:v("Purple"),placement:"top"},l.createElement(gt.Ay.Button,{className:"purple-color",value:"purple"},"P")),l.createElement(i.A,{title:v("Magenta"),placement:"top"},l.createElement(gt.Ay.Button,{className:"magenta-color",value:"magenta"},"M")),l.createElement(i.A,{title:v("Green"),placement:"top"},l.createElement(gt.Ay.Button,{className:"green-color",value:"green"},"G")),l.createElement(i.A,{title:v("Teal"),placement:"top"},l.createElement(gt.Ay.Button,{className:"teal-color",value:"teal"},"T")),l.createElement(i.A,{title:v("Blue"),placement:"top"},l.createElement(gt.Ay.Button,{className:"blue-color",value:"blue"},"Blue")))))),n.length>0&&l.createElement("div",{className:"blocks-search__divider-wrapper"},l.createElement("div",{className:"ant-divider ant-divider-horizontal",role:"separator"}))),l.createElement("div",{className:"serach-output-wrapper",style:{marginRight:-10}},n.length>0&&l.createElement("div",{id:"scrollableDiv",style:{width:"100%",height:"calc(84vh - 148px)",overflow:"auto",paddingTop:24,paddingRight:14,paddingLeft:24,marginLeft:-24,lineHeight:"0",boxSizing:"unset"}},l.createElement(kr.A,{dataLength:n&&n.length,next:async()=>{p||(g(!0),_({query:r,page:E}).then((e=>{o((t=>[...t,...e.data.results])),g(!1),f((e=>e+1))})).catch((()=>{g(!1)})))},hasMore:n,endMessage:l.createElement(m.A,{plain:!0},v("That`s all we could find.")," \ud83e\udd10"),scrollableTarget:"scrollableDiv",style:{overflow:"visible"},loader:null},l.createElement(xr.A,{breakpointCols:{default:3},className:"my-masonry-grid",columnClassName:"my-masonry-grid_column"},n.map((t=>l.createElement("div",{className:"list-item",key:t.id,onClick:()=>{return a=t.urls,l=t.links,o=t.id,A(l.download_location),x(o),setTimeout((()=>x(null)),2e3),c(`${a.raw}&w=1200&q=96`),e(`${a.raw}&w=1200&q=96`),void u(`${a.raw}&w=1200&q=96`);var a,l,o}},l.createElement("img",{className:k===t.id?"loaded-image":"",width:"322px",src:`${t.urls.raw}&w=644&q=96`,alt:t.description,onLoad:e=>e.target.parentNode.classList.add("loaded")}),l.createElement("p",{className:"creator-info",onClick:e=>e.stopPropagation()},"Photo by"," ",l.createElement("a",{target:"_blank",href:`${t.user.links.html}?utm_source=${Br}&utm_medium=referral`,rel:"noreferrer"},t.user.name)," ","on"," ",l.createElement("a",{target:"_blank",href:`https://unsplash.com/?utm_source=${Br}&utm_medium=referral`,rel:"noreferrer"},"Unsplash")),k===t.id&&l.createElement(st.A,{className:"ant-spin",indicator:l.createElement($n.A,{spin:!0})})))))))))};var Rr=a(82021),Nr=a(36236);const Lr=({images:e,transitionDuration:t=1e3})=>{const[a,o]=(0,l.useState)([]);return(0,l.useEffect)((()=>{if(e.length>0){const t=e[e.length-1];o((e=>[...e,{src:t,opacity:0}])),setTimeout((()=>{o((e=>e.map(((t,a)=>a===e.length-1?{...t,opacity:1}:t))))}),1e3)}}),[e]),l.createElement("div",{className:"slideshow-container"},a.map(((e,a)=>l.createElement("img",{key:a,src:`data:image/jpeg;base64, ${e.src}`,alt:`Slide ${a+1}`,className:"slideshow-image",style:{opacity:e.opacity,transition:`opacity ${t}ms linear`}}))))},Pr=e=>{const{className:t,style:a,onClick:o}=e;return l.createElement("div",{className:t,style:{...a,zIndex:"3000",display:"block",position:"absolute",top:"50%",right:"0",transform:"translateY(-50%) translateX(-100%)",backgroundColor:"transparent",opacity:.8},onClick:o},l.createElement(g.Ay,{style:{borderRadius:100,right:10},size:"large",icon:l.createElement(on.A,null)}))},Ir=e=>{const{className:t,style:a,onClick:o}=e;return l.createElement("div",{className:t,style:{...a,display:"block",position:"absolute",zIndex:"1000",top:"50%",left:"0",transform:"translateY(-50%)",backgroundColor:"transparent",opacity:.8},onClick:o},l.createElement(g.Ay,{style:{borderRadius:100,left:10},size:"large",icon:l.createElement(ln.A,null)}))},Mr=({setModalHeight:e,customRequest:t,aiImageRequest:a,setAiImageRequest:o,aiTabRef:n,imageAiList:r,setImageAiList:i,isLoadingAi:s,setIsLoadingAi:d,inputAiRef:m,isImageUploaded:c,setIsImageUploaded:u})=>{const{__:p}=(0,y.s9)(),E=(0,Y.rD)(),f=(0,A.hN)(),_=(0,lr.u)(),{emailId:C,blockId:k,projectId:x}=(0,v.g)(),B=(0,or.ml)(ir.AZ.ON_LIMIT_ID),[T,R]=(0,l.useState)(0),[N,L]=(0,l.useState)(null),[P,I]=(0,l.useState)(!1),[M,O]=(0,l.useState)(p("Evaluating the task")),[V,F]=(0,l.useState)(!1),[H]=(0,Se.Mv)(),[j,{data:W=[]}]=(0,Se.gg)(),G=C||k,{limits:U}=null!==E&&void 0!==E&&E.limits?E:{limits:{ai_img_limit:0}},{ai_img_limit:q}=U,Z=T>=q&&q>0,X=!(!E.limits||!E.counters)&&D.EW.isPlugin,K=(0,l.useCallback)((()=>{B.fire({name:"AiImgCount",count:T+1})}),[B,T]);(0,l.useEffect)((()=>{var e;X&&R((null===E||void 0===E||null===(e=E.counters)||void 0===e?void 0:e.ai_img_counter)||0)}),[E,X]);const $=async()=>{O(p("Evaluating the task")),""===a||s||(d(!0),F(!0),i([]),_({event:"submit_form",action:"ai_image_generation",entity_id:C,project_id:x}),H({body:{project_id:x,request:"create-image",connection:"midjourney",message:a}}).then((({data:e})=>{if(401===e.data.status)throw new Error(D.ff);200===(null===e||void 0===e?void 0:e.data.status)?(null!==e&&void 0!==e&&e.data.task.id&&(O(e.data.task.message),L(e.data.task.id)),e.message&&f.success({id:"AI_IMAGE_SEND_SUCCESS",message:e.message,placement:"bottomRight",data:a}),j({task_id:null===e||void 0===e?void 0:e.data.task.id,entity_id:G})):(d(!1),F(!1),f.error({id:"AI_IMAGE_SEND_ERROR",message:(null===e||void 0===e?void 0:e.message)||p("Something went wrong, please try again"),placement:"bottomRight",data:a,innerException:e}))})).catch((e=>{d(!1),F(!1),e.error&&f.fromError("AI_IMAGE_SEND_ERROR",a,e.error)})))};(0,l.useEffect)((()=>{W.length>1&&("error"!==W[W.length-1].status||"Canceled"!==W[W.length-1].status?W[W.length-1].images?(O(W[W.length-1].status),100===W[W.length-1].progress&&(i(W[W.length-1].images),O(p("Evaluating the task")),L(null),F(!1))):(i([W[W.length-1].data]),d(!1)):(d(!1),F(!1),f.error({id:"AI_IMAGE_GET_ERROR",message:p("Something went wrong, please try again"),placement:"bottomRight",data:N})))}),[W,i,O,p,d,e,N,f]),(0,l.useEffect)((()=>{(s||r.length>0)&&setTimeout((()=>{let t=550;n.current&&(t=n.current.offsetHeight+68),e(t)}),0)}),[n,W,r.length,s,e]);const[Q,J]=(0,l.useState)(!1);return l.createElement("div",{className:"image-ai"},X&&l.createElement(Jn,{text:p("images"),counter:T,limits:q,wrapperStyles:{marginTop:-25}}),l.createElement(b.A,{gutter:24,style:{padding:"0 2px"}},l.createElement(h.A,{span:24},l.createElement(S.A.Item,{style:{margin:0}},l.createElement("span",{className:"ant-input-affix-wrapper ant-input-affix-wrapper-lg "+(Q?"ant-input-affix-wrapper-focused":""),style:{paddingLeft:0}},l.createElement(w.A.TextArea,{ref:m,onKeyDown:e=>{"Shift"===e.key?I(!0):"Enter"!==e.key||P||(e.preventDefault(),Z?X&&f.error({message:p("The usage limit has been exceeded"),description:p("The maximum number of requests for the current subscription period has been reached.\nSelect the appropriate plan to fulfil more requests"),placement:"bottomRight"}):X?(R((e=>e+1)),K(),$()):$())},onKeyUp:e=>{"Shift"===e.key&&I(!1)},onFocus:()=>{J(!0)},onBlur:()=>{J(!1)},autoSize:!0,allowClear:!0,className:"text-area-input-hybrid",placeholder:p("Generate image"),value:a,onChange:t=>{o(t.target.value),setTimeout((()=>{let t=0;n.current&&(t=n.current.offsetHeight+68,s||0!==r.length||(t=n.current.offsetHeight+68)),setTimeout((()=>{e(t)}),0)}),10)},style:{fontSize:16},spellCheck:"false"}),l.createElement("span",{className:"ant-input-suffix"},s||V?l.createElement($n.A,{style:{fontSize:18},className:"input-icon",spin:!0}):l.createElement(z.A,{icon:"AI",style:{fontSize:16,top:0,right:0},className:"input-icon",onClick:()=>{X?Z||(R((e=>e+1)),K(),$()):$()}})))))),(s||r.length>0)&&l.createElement(Rr.A,{dotPosition:"top",arrows:!0,nextArrow:l.createElement(Pr,null),prevArrow:l.createElement(Ir,null),style:{marginTop:24}},s&&l.createElement("div",{className:"image-ai__loading"},l.createElement("div",{className:"spin"},l.createElement($n.A,{style:{fontSize:48},spin:!0}),l.createElement("p",{className:"status"},M))),r.length>0&&r.map(((e,a)=>l.createElement("div",{key:a,className:"image-ai__image-item"},l.createElement(Lr,{images:r}),l.createElement("div",{className:"buttons"},"Ready"===W[W.length-1].status&&l.createElement(g.Ay,{onClick:()=>(e=>{if(!c){u(!0);const a=e.match(/^data:image\/([A-Za-z-+/]+);base64,(.+)$/),l=a[1],o=a[2],n=atob(o),r=new Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);const i=new Uint8Array(r),s=new Blob([i],{type:`image/${l}`}),d=new File([s],"image.jpeg",{type:s.type});t({file:d})}})(`data:image/jpeg;base64, ${e}`),icon:l.createElement(Nr.A,null)},p("Use this variant"))))))))},Or=({setNewLink:e,setCurrentImageLink:t,setModalHeight:a,setModalWidth:o,setImageGifList:n,imageGifList:r,currentReqGif:i,setCurrentReqGif:s,inputRef:d,setStockLink:c,customRequest:u})=>{const{__:p}=(0,y.s9)(),[g,E]=(0,l.useState)(null),[f,v]=(0,l.useState)(!1),[A,_]=(0,l.useState)(25),[C]=(0,Se.eo)(),k=async()=>{var e,t;const l=await C({query:i,page:0});(null===l||void 0===l||null===(e=l.data)||void 0===e||null===(t=e.data)||void 0===t?void 0:t.length)>0&&(n(l.data.data),setTimeout((()=>{a("84vh"),o(1060)}),0))},x=l.createElement($n.A,{style:{fontSize:20},spin:!0});return l.createElement("div",{className:"stock-tab"},l.createElement(S.A,{onValuesChange:k,className:r.length>0?"serach-results":""},l.createElement(b.A,{gutter:24},l.createElement(h.A,{span:r.length>0?"":24},l.createElement(S.A.Item,{className:"stock-search-input"},l.createElement(w.A,{onKeyDown:e=>"Space"===e.code&&k(),onPressEnter:e=>k(),allowClear:!0,size:r.length>0?"medium":"large",placeholder:p("Search GIFs"),value:i.keywords,onChange:e=>s((t=>({...t,keywords:e.target.value}))),ref:d,spellCheck:"false",suffix:l.createElement(ka.A,{onClick:k,className:"cards-search__search-icon, input-icon",style:{fontSize:"16px",cursor:"pointer"}})})))),r.length>0&&l.createElement("div",{className:"blocks-search__divider-wrapper"},l.createElement("div",{className:"ant-divider ant-divider-horizontal blocks-search__divider",role:"separator"}))),l.createElement("div",{className:"serach-output-wrapper",style:{marginRight:-10}},r.length>0&&l.createElement("div",{id:"scrollableDiv",style:{width:"100%",height:"calc(84vh - 148px)",overflow:"auto",paddingTop:24,paddingRight:14,paddingLeft:24,marginLeft:-24,lineHeight:"0",boxSizing:"unset"}},l.createElement(kr.A,{dataLength:r&&r.length,next:async()=>{f||(v(!0),C({query:i,page:A}).then((e=>{n((t=>[...t,...e.data.data])),v(!1),_((e=>e+25))})).catch((()=>{v(!1)})))},hasMore:r,endMessage:l.createElement(m.A,{plain:!0},p("That`s all we could find.")," \ud83e\udd10"),scrollableTarget:"scrollableDiv",style:{overflow:"visible"},loader:l.createElement(st.A,{indicator:x})},l.createElement(xr.A,{breakpointCols:{default:3},className:"my-masonry-grid",columnClassName:"my-masonry-grid_column"},r.map(((e,a)=>l.createElement("div",{className:"list-item",key:e.id+a,onClick:()=>{return a=e.images.downsized.url,l=e.id,E(l),setTimeout((()=>{E(null)}),2e3),c(`${a}`),t(`${a}`),void u(`${a}`);var a,l}},l.createElement("img",{className:g===e.id?"loaded-image":"",width:"322px",src:`${e.images.downsized.url}`,alt:e.title,onLoad:e=>e.target.parentNode.classList.add("loaded")}),l.createElement("a",{rel:"noreferrer",href:"https://giphy.com/",target:"_blank",onClick:e=>e.stopPropagation()},l.createElement("div",{className:"overlay-image",style:{backgroundImage:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAkCAYAAAB/up84AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABSBJREFUeNrsWjFv2zoQVoMW8BZ18xaN3qLRW9QtW9OtW92to98vaPoP3K1b1S1b3c2jvWlUNm3lw1s8Mpu3PAo4Iocr70jKlp0COuCQlpKPx/t43x1pv3h8fEwGeT5yNoTgeclLZvza6NgxXoNaGRktjE6MpjC2NVqh92bwt4HxBI1ro0s0dgN2tvD5a8a/9vkq0M+xYKdG81A7Gp6pyBjZddrnO6N36Hkbqyn8u4L3vYC0hjLHeAbPVhC4TwAK/ewNvLsEhyxgFXLK2l/D4tvnOVrUiPEh1k/JjvLYyWENdeTcKazBBr6AdY4AqBTmbkIzhO4gvMumYLxAYKzgPTvhBBajYNwCksHYhOyYiow1KONaKYlfO8bPEWyGEfi5Iu+Vjizg7EzB3xvwWTMxWkHG4mDnMF6BnSnYncLzHWGG4BqiwZkKQMC7I0cOVTCJhvRUKNgNCmCOxhNmrBEWzwGi0Y6rIihbsnOH/JgE2hshKrLZv4Px9yhj1twafRlid/UIGWvlFdlVLirIkIM12nETGLeO2tTPECBUZuT/a7JBMpSxUybYLjulUCN2iEpHQoyuGWZJUCa8R/VGSZvGB0iOdjAO9n8EtC2zUxICSIoW0ICTmA53DCDKQzWZg89XAXZ2B2iMavBnjDKpBX6B1tnAM5aqQgGhnU2D6GmHuqw7AkaOPmP/bsHpFC1kTLqVhglS6fFNgX1MCXUHO1zR1h5AFOoSc1jjmKx/An/1PoBQasBSoZZ3hpyaOrg0IW2sRkG8JsU8CaCaLckAhfi6AG0cmeuzkyMQMtL+SiySkY3oA/EgGeICK0UOZYQKVsQpDAjm2BpsaAGQLMKnMdok3yLtpKS70yT7OUBcm7UTHb5grk5y1Csrj40MqUbUpgW7NXo+RunckODkQvdXM37iwm7b1VA7lAaVB4jUUZOUIzNxfOougAwy3GUN0qWG2IJJ09V2NcvIFE8c54nQelEHFM6C6chUhI+WZjjffDQkrenPhqmlrAC9Naof/aLhXZeNNfMZOk+MtPOVRjNmTpfcCut0+biGZ3PBj1ywWTOfqV3v+yjLFuDPRs8Ddu05vLtmsuHQ0s73wehvR0t7aGkPevfCM5fcGr0MbOW9NSSFwF52cP5KcLIv+X4EUGbCemcOqpoz73/haE4CZNkRjAR20vwENXHRc2bWEMyQuUuGVe4hc6K6rBmg7pKN0XdGX7dts9E3Rr8afUATFl1PqgLAG6T3AoX1nSVtMP9l5r5FVyiu+D14/YssRHOheGVQYNMeinrhsMcV2WVPRR1rIRT4QmiA5r4G6oxp0y6ZzFh4LvhmB84MHz1xta9vWQMrcFR/3iF+7DmEu2YoyTshRbuMvGE9hnwGPQR1tdR04aCueKrqAIgiu/AqcCf1JXPhfuoYosGHn4Hgqa6AnCK4IfSkCa1eCJRxLGnn+mX0rfDOJok4AsQAUpwQlND2++HIgNiOVO1LVRIgtXDPs0bpunEU08vktHLMpoJS1/d9qEo6h6gAzq7RRaPV+QmBeICzUUh2fIHzk0s3HedXwkEy2ReQmjn4XDzDjqkN4D/J04/y/np5KbSrrtbwAyx+kTxdf9tfpvSZIW9O3FScHJAF8PEFc5F2lQzSi5wJheoG3U/t0xYOcgBAcOHuAkr7mY9ditoAiCz2q8uvEcD8gJpSDuGNl5hfnaTJ0/fpheMUr4CitHCO6fqdesj359xh1tWiqggfdUCmcz9ZivZ7+BnQM5P/BRgABx8sJWqTxoYAAAAASUVORK5CYII=)"}})),g===e.id&&l.createElement(st.A,{className:"ant-spin",indicator:l.createElement($n.A,{spin:!0})})))))))))},Vr="IMG",Fr="BACKGROUND",Dr="EDITOR",Hr="UPLOAD",jr="STOCK",zr="GIF",Wr="AI",{Dragger:Gr}=pr.A,Ur=()=>{var e,t;const a=(0,Y.rD)(),{__:o}=(0,y.s9)(),n=(0,f.wA)(),{projectId:i}=(0,v.g)(),[s,d]=(0,Lo.dS)(),[m]=(0,Se.FQ)(),{modal:u}=r.A.useApp(),p=(0,A.hN)(),g=(0,f.d4)(we.B$),b=(0,f.d4)(we.C1),h=(0,f.d4)(V.cL),_=(0,f.d4)(_e.js),C=(0,f.d4)(_e.Ac),[k,x]=(0,l.useState)(""),[B,T]=(0,l.useState)(""),[R,N]=(0,l.useState)(""),[L,P]=(0,l.useState)(""),[I,M]=(0,l.useState)(Hr),[O,H]=(0,l.useState)({width:"",height:"",size:"",format:""}),[j,z]=(0,l.useState)("success"),[W,G]=(0,l.useState)(!1),U=l.useRef(null),q=l.useRef(null),Z=l.useRef(null),X=l.useRef(null),K=l.useRef(null),$=l.useRef(null),Q=l.useRef(null),J=l.useRef(null),ee=l.useRef(null),[te,ae]=(0,l.useState)("auto"),[le,oe]=(0,l.useState)(572),[ne,re]=(0,l.useState)(null),[ie,se]=(0,l.useState)(!1),[de,me]=(0,l.useState)({keywords:"",color:"",orientation:""}),[ce,ue]=(0,l.useState)({keywords:""}),[pe,ge]=(0,l.useState)([]),[be,he]=(0,l.useState)([]),[Ee,fe]=(0,l.useState)([]),[ve,ye]=(0,l.useState)(!1),[Ae,xe]=(0,l.useState)(""),[Be,Te]=(0,l.useState)(!1),[Re,Ne]=(0,l.useState)(0),Le=(0,f.d4)(ke.yN),Pe=(0,or.ml)(ir.AZ.FILE_PROXY_EVENT_ID);let Ie=!(g||(null===(e=b.id)||void 0===e?void 0:e.toString())!==(null===Le||void 0===Le||null===(t=Le.members)||void 0===t?void 0:t.owner.ID))&&!0;const Me=async e=>{if(e)try{const t=await Oe(e);Fe({url:e}),t&&De(t)&&He({file:t})}catch(t){}},Oe=async e=>{try{const t=(await Pe.fire({url:e,project:Le})).filter((e=>e instanceof Blob))[0];if(t)return t;const a=`https://api.emailmaker.ru/tools/file-proxy.php?url=${encodeURIComponent(e)}`,l=await fetch(a);if(!l.ok)throw new Error(`Server returned ${l.status}`);const o=await l.blob();return new File([o],e.split("/").pop(),{type:o.type})}catch(t){}};document.onpaste=function(e){const t=e.clipboardData.items[0];if(I===Hr&&L){if(0===t.type.indexOf("image")){const e=t.getAsFile();De(e);const a={file:e};T(""),He(a)}0===t.type.indexOf("text")&&t.getAsString((e=>{"http"===e.slice(0,4)?(T(""),x(e),Fe({url:e})):"meta"===e.toString().slice(1,5)&&(T(""),x(e.toString().split('"')[1]),Fe({url:e.toString().split('"')[1]}))}))}};const Ve=(0,l.useMemo)((()=>({IMG:_,BACKGROUND:C})),[_,C]);(0,l.useEffect)((()=>{const e=e=>{let t=null;h.includes("UPLOAD_BACKGROUND_MODAL")?(t=Fr,P(Fr)):h.includes("UPLOAD_IMAGE_MODAL")&&(P(Vr),t=Vr),Ve[t]&&(x(Ve[t]),M(e))};h===D.lx.UPLOAD_IMAGE_MODAL||h===D.lx.UPLOAD_BACKGROUND_MODAL?e(Dr):h===D.lx.UPLOAD_IMAGE_MODAL_AI||h===D.lx.UPLOAD_BACKGROUND_MODAL_AI?(Ie?(Te(!0),Ne(2)):e(Wr),setTimeout((()=>{var e;return null===(e=ee.current)||void 0===e?void 0:e.focus({cursor:"start"})}),100)):h===D.lx.UPLOAD_IMAGE_MODAL_UPLOAD||h===D.lx.UPLOAD_BACKGROUND_MODAL_UPLOAD?(e(Hr),setTimeout((()=>{var e;return null===(e=$.current)||void 0===e?void 0:e.focus({cursor:"start"})}),100)):h===D.lx.UPLOAD_IMAGE_MODAL_STOCK||h===D.lx.UPLOAD_BACKGROUND_MODAL_STOCK?(Ie?(Te(!0),Ne(3)):e(jr),setTimeout((()=>{var e;return null===(e=J.current)||void 0===e?void 0:e.focus({cursor:"start"})}),100)):h===D.lx.UPLOAD_IMAGE_MODAL_GIF||h===D.lx.UPLOAD_BACKGROUND_MODAL_GIF?(Ie?(Te(!0),Ne(3)):e(zr),setTimeout((()=>{var e;return null===(e=Q.current)||void 0===e?void 0:e.focus({cursor:"start"})}),100)):h===D.lx.UPLOAD_IMAGE_MODAL_EDIT||h===D.lx.UPLOAD_BACKGROUND_MODAL_EDIT?(Ie?(Te(!0),Ne(5)):e(Dr),n((0,V.Wz)(D.lx.IMAGE_EDITOR_MODAL))):P("")}),[h,n,Ie,Ve]);const Fe=(0,l.useCallback)((({url:e=k||""})=>{x(e),L===Vr&&n((0,_e.tm)(e)),L===Fr&&n((0,_e.e_)(e)),setTimeout((()=>{me({keywords:"",color:"",orientation:""}),ue({keywords:""}),he([]),ge([]),P(""),xe(""),ye(!1),N(""),T(""),M(Hr)}),200),n((0,V.Oo)()),n((0,V.Os)())}),[k,n,L]);(0,l.useEffect)((()=>{const e=B||R;e?(0,F.DI)(e).then((t=>{z(t),oe(572),setTimeout((()=>{let e=0;q.current&&(e=q.current.offsetHeight+62),ae(e)}),0),Fe(e)})).catch((e=>{z(e)})):z("")}),[B,R,Fe]),(0,l.useEffect)((()=>{k&&m(k).then((({data:e})=>{H({width:null===e||void 0===e?void 0:e.width,height:null===e||void 0===e?void 0:e.height,size:((null===e||void 0===e?void 0:e.fileSize)/1024).toFixed(2),format:null===e||void 0===e?void 0:e.format})}))}),[k,m]);(0,l.useEffect)((()=>{var e;""===de.keywords&&(null===$||void 0===$||null===(e=$.current)||void 0===e||e.focus({cursor:"start"}),he([]),setTimeout((()=>{ae("auto"),oe(572)}),0))}),[de,he,ae,oe]);const De=e=>{const t="image/jpeg"===e.type||"image/png"===e.type||"image/jpg"===e.type||"image/webp"===e.type||"image/gif"===e.type||"image/svg+xml"===e.type;return t||p.error({id:"IMAGE_UPLOAD_WRONG_FORMAT",data:e,message:"Upload",description:"You can only upload JPG/JPEG/PNG/WEBP/GIF/SVG file!",placement:"bottomRight"}),t},He=({file:e})=>{const t="image/svg+xml"===e.type,n="image/webp"===e.type,r=e=>{const t=new Image;t.src=URL.createObjectURL(e),t.onload=()=>{(async e=>{se(!0);const t=e.file;try{"image/gif"!==t.type&&(e.file=await(0,Zl.A)(t,{maxSizeMB:a.compressMaxSize||.45,maxWidthOrHeight:a.compressMaxWidthOrHeight||2e3})),s(e).then((({error:e,data:a})=>{var n;if(e)p.fromError("IMAGE_UPLOAD_ERROR",t,e);else if(400===(null===a||void 0===a||null===(n=a.data)||void 0===n?void 0:n.status))p.error({id:"IMAGE_UPLOAD_ERROR",data:t,innerException:null===a||void 0===a?void 0:a.data,message:l.createElement("div",{dangerouslySetInnerHTML:{__html:a.code}}),description:l.createElement("div",{dangerouslySetInnerHTML:{__html:a.message}}),placement:"bottomRight"});else{var r;const e=null===a||void 0===a||null===(r=a[0])||void 0===r?void 0:r.file_url;e&&(ae("auto"),G(!1),Fe({url:e})),p.success({id:"IMAGE_UPLOAD_SUCCESS",data:t,message:o("The image was successfully uploaded.")})}})).catch((e=>{})).finally((()=>{se(!1)}))}catch(n){se(!1)}})({user_id:b.id,folder:i,file:e})}};t?((e,t)=>{const a=new FileReader;a.onload=function(a){const l=a.target.result,o=new Blob([l],{type:"image/svg+xml;charset=utf-8"}),n=URL.createObjectURL(o),r=new Image;r.onload=function(){const a=document.createElement("canvas");a.width=2*r.width,a.height=2*r.height,a.getContext("2d").drawImage(r,0,0,a.width,a.height),a.toBlob((a=>{const l=new File([a],e.name.replace(".svg",".png"),{type:"image/png"});t(l),URL.revokeObjectURL(n)}),"image/png")},r.src=n},a.readAsText(e)})(e,(e=>r(e))):n?((e,t,a=90)=>{const l=new Image;l.src=URL.createObjectURL(e),l.onload=()=>{const e=document.createElement("canvas");e.width=l.width,e.height=l.height;const o=e.getContext("2d");o.imageSmoothingEnabled=!0,o.imageSmoothingQuality="high",o.drawImage(l,0,0,e.width,e.height),e.toBlob((e=>{const a=new File([e],"converted.jpg",{type:"image/jpeg"});t(a)}),"image/jpeg",a/100)},l.onerror=e=>{t(null)}})(e,(e=>r(e))):r(e)},je=e=>He({file:e});let ze=[{label:o("Upload"),key:Hr,children:l.createElement("div",{ref:U,style:{paddingBottom:24}},l.createElement(Gr,{showUploadList:!1,name:"Image",beforeUpload:De,customRequest:He,style:{marginBottom:10},multiple:!1,accept:"image/png, image/jpeg, image/jpg, image/webp, image/gif, image/svg+xml"},l.createElement("p",{className:"ant-upload-drag-icon"},l.createElement(gr.A,null)),l.createElement("p",{className:"ant-upload-text"},o("Click to select, paste from the clipboard, or drag and drop")),l.createElement("p",{className:"ant-upload-hint"},o("Accepted formats: PNG, JPG, WEBP, SVG or GIF."))),l.createElement(S.A,{style:{padding:"0 2px 0 2px"}},l.createElement(S.A.Item,{validateStatus:j},l.createElement(w.A,{ref:$,allowClear:!0,size:"large",placeholder:o("Paste image URL here"),value:B,onChange:e=>{const t=e.target.value;T(t),ne&&clearTimeout(ne);const a=setTimeout((()=>Me(t)),1e3);re(a)},spellCheck:"false"}))))}];a.imageCenterStockEnabled&&!Ie&&ze.push({label:o("Stock"),key:jr,children:l.createElement("div",{ref:Z,style:{paddingBottom:24}},l.createElement(Tr,{currentReq:de,setCurrentReq:me,imageStockList:be,setImageStockList:he,setModalWidth:oe,setModalHeight:ae,setStockLink:N,setCurrentImageLink:x,inputRef:J,customRequest:Me}))}),a.imageCenterGifEnabled&&!Ie&&ze.push({label:o("GIF"),key:zr,children:l.createElement("div",{ref:X,style:{paddingBottom:24}},l.createElement(Or,{currentReqGif:ce,setCurrentReqGif:ue,imageGifList:pe,setImageGifList:ge,setModalWidth:oe,setModalHeight:ae,setStockLink:N,setCurrentImageLink:x,inputRef:Q,customRequest:Me}))}),a.elementAIimageEnabled&&!Ie&&ze.push({label:o("AI"),key:Wr,children:l.createElement("div",{ref:K,style:{paddingBottom:24}},l.createElement(Mr,{setModalHeight:ae,customRequest:He,aiImageRequest:Ae,setAiImageRequest:xe,imageAiList:Ee,setImageAiList:fe,isLoadingAi:ve,setIsLoadingAi:ye,aiTabRef:K,inputAiRef:ee,isImageUploaded:W,setIsImageUploaded:G}))}),a.imageCenterEditorEnabled&&ze.push({label:"",key:Dr,children:l.createElement("div",{ref:q},l.createElement(wr,{currentImageLink:k,newLink:B,imageSize:O,onSave:je,uploadImageResultIsLoading:d.isLoading||!1}))});const We=l.createElement($n.A,{style:{fontSize:32,margin:-16},spin:!0});return l.createElement(l.Fragment,null,l.createElement(E.A,{width:le,className:"image-center blocks-modal",title:o("Image Center"),centered:!0,style:{minHeight:390},open:!!L,onOk:Fe,onCancel:()=>{n((0,V.Oo)()),setTimeout((()=>{x(""),T(""),he([]),he([]),me({keywords:"",color:"",orientation:""}),ue({keywords:""}),ae("auto"),!ve&&xe(""),oe(572),M(Hr)}),200)},footer:I===Dr?l.createElement(l.Fragment,null):null},l.createElement(st.A,{spinning:ie,indicator:We},l.createElement(c.A,{activeKey:I,onChange:e=>{"GALLERY"===e?u.success({maskClosable:!0,centered:!0,title:o("Coming soon"),content:o("The feature is under development."),okText:o("Ok. I'll be waiting"),onOk:()=>{}}):e===Dr&&""===k?u.warning({maskClosable:!0,centered:!0,title:o(""),content:o("To preview and edit the uploaded image"),okText:o("Upload Image"),onOk:()=>{M(Hr)}}):(setTimeout((()=>{let t=0,a=0;var l;if(e===Hr&&U.current)""===de.keywords&&(null===(l=$.current)||void 0===l||l.focus({cursor:"start"})),t=300,a=572;else if(e===Dr&&q.current)t=q.current.offsetHeight+62,a=572;else if(e===jr&&Z.current){var o;""===de.keywords&&(null===(o=J.current)||void 0===o||o.focus({cursor:"start"})),t=130,a=572,be.length>0&&(a=1060,t="84vh")}else if(e===zr&&X.current){var n;""===de.keywords&&(null===(n=Q.current)||void 0===n||n.focus({cursor:"start"})),t=130,a=572,pe.length>0&&(a=1060,t="84vh")}else if(e===Wr&&K.current){var r;if(""===Ae&&0===Ee.length)null===(r=ee.current)||void 0===r||r.focus({cursor:"start"}),t=130;else t=K.current.offsetHeight+82;a=572}ae(t),oe(a)}),0),M(e))},items:ze,style:{height:te,minHeight:130}}))),l.createElement(Ce.A,{open:Be,onCancel:()=>Te(!1),initialSlide:Re}))};var qr=a(61058);const Zr=({emailElement:e})=>{const{__:t}=(0,y.s9)(),a=(0,Me.XW)(),o=(0,f.wA)(),{projectId:n}=(0,v.g)(),r=(0,nr.fn)(),i=(0,f.d4)(qr.p1),s=(0,f.d4)(qr.RL),d=(0,f.d4)(Ie.Wm),[m,u]=(0,l.useState)(!0),[p,b]=(0,l.useState)(!1),[h,E]=(0,l.useState)([]),[A,_]=(0,l.useState)([]),S=e=>o((0,Ie.mi)(e)),w=(0,l.useCallback)((e=>{o((0,W.no)(e)),r.setValue(null===e||void 0===e?void 0:e.html.replaceAll("\r\n","\n"))}),[r,o]),{data:k}=M.Nq.useGetProjectQuery(Number(n),{skip:!n}),[x,B]=(0,l.useState)([]);(0,l.useEffect)((()=>{if(k){const{owner:e,admins:t,users:a}=null===k||void 0===k?void 0:k.members;B([e&&{...e},t&&Array.isArray(t)&&t.map((e=>({...e}))),a&&Array.isArray(a)&&a.map((e=>({...e})))].filter((e=>e)).flat(1).map((e=>({id:e.ID,display_name:e.display_name}))))}}),[k,null===k||void 0===k?void 0:k.members,t]);const[T,N]=(0,l.useState)(1),[L,P]=(0,l.useState)(!1);(0,l.useEffect)((()=>{const e=Array.isArray(i)&&i.length&&(null===i||void 0===i?void 0:i.map((e=>{var a;return{key:e.id,author:e.author,date:(0,F.Yq)((0,F.Cl)(e.date||e.modified),t),title:e.title,html:e.html,common_styles:e.common_styles,loading:!1,isAutosave:null===(a=e.slug)||void 0===a?void 0:a.includes("autosave")}})));_(e||[]),E(e),u(!1),s<2&&P(!0)}),[i,s,t]);const I=m||p||L?null:l.createElement("div",{style:{textAlign:"center",marginTop:24,marginBottom:24,height:32,lineHeight:"32px"}},l.createElement(g.Ay,{onClick:()=>{b(!0),_(h.concat([...new Array(3)].map((()=>({loading:!0}))))),o(Z.GY.endpoints.getEmailHistory.initiate({emailId:e.id,page:T+1})).then((e=>{const{data:a,totalPages:l}=e.data,o=Array.isArray(a)&&(null===a||void 0===a?void 0:a.map((e=>({key:e.id,author:e.author,date:(0,F.Yq)((0,F.Cl)(e.date||e.modified),t),title:e.title,html:e.html,loading:!1})))),n=h.concat(o);_(n),E(n),b(!1),window.dispatchEvent(new Event("resize")),T+1>=l&&P(!0),N(T+1)}))}},t("loading more"))),[O,V]=(0,l.useState)(),[H,j]=(0,l.useState)(null),G=(0,l.useRef)();return G.current=e,(0,l.useEffect)((()=>{if(!d&&!H){const e=G.current;e&&j({html:r.getValue(),preheader:e.preheader,common_styles:e.common_styles,subject:e.subject})}}),[d,j,r,H]),(0,l.useEffect)((()=>{d&&H&&(w(H),j(null))}),[d,H,w]),l.createElement(l.Fragment,null,l.createElement(c.A,{className:"secondary-tabs email-settings__collapse secondary-tabs_unset_scroll",size:"large",animated:{inkBar:!1,tabPane:!1},activeKey:D.Vv,items:[{label:l.createElement(l.Fragment,null,t("Version history")),key:D.Vv,forceRender:!0,className:"email-settings__collapse-panel",style:{height:"100%"},children:l.createElement(Zn.A,{className:"history-panel__list",loading:m,itemLayout:"horizontal",loadMore:I,dataSource:A,header:l.createElement("div",{className:"history-panel__list-header"},l.createElement("div",{className:"history-panel__list-date"},t("Time")),l.createElement("div",{className:"history-panel__list-author"},t("Author")),l.createElement("div",{className:"history-panel__restore"},"Set")),renderItem:(e,n)=>{var r;return l.createElement(Zn.A.Item,{onClick:()=>{n!==O&&(V(n),w(h[n])),o((0,Ke.rc)(!0))},className:C()("history-panel__item",{"history-panel__item_active":n===O})},l.createElement(R.A,{title:!1,loading:e.loading||!1,active:!0},l.createElement("div",{className:"history-panel__list-date"},e.date),l.createElement("div",{className:"history-panel__list-author"},(null===(r=x.find((t=>{var a,l;return(null===(a=t.id)||void 0===a?void 0:a.toString())===(null===(l=e.author)||void 0===l?void 0:l.toString())})))||void 0===r?void 0:r.display_name)||"\u2013"),e.isAutosave&&O!==n&&l.createElement("div",{style:{opacity:.45},className:"history-panel__list-autosave"},t("Auto")),!e.isAutosave&&l.createElement(g.Ay,{size:"small",className:"history-panel__restore",type:"link",onClick:e=>{O===n&&e.stopPropagation(),w(h[n]),V(null),j(null),a({operation:D.Ru.SANDBOX_LOCK_EDIT,data:!1}),o((0,Ie.Fk)())}},t("Set")),e.isAutosave&&O===n&&l.createElement(g.Ay,{size:"small",className:"history-panel__restore",type:"link",onClick:e=>{O===n&&e.stopPropagation(),w(h[n]),S(!0),V(null),j(null),a({operation:D.Ru.SANDBOX_LOCK_EDIT,data:!1})}},t("Set"))))}})}]}),l.createElement(g.Ay,{type:"text",className:"ant-modal-close","aria-label":"Close",onClick:()=>{o((0,Ie.Fk)()),w(H),j(null),S(!0),a({operation:D.Ru.SANDBOX_LOCK_EDIT,data:!1})}},l.createElement(z.A,{icon:"Close"})))};var Xr=a(85897);const Kr=({elementPath:e})=>{const{_x:t}=(0,y.s9)(),a=(0,f.wA)(),o=(0,Me.QC)(),n=(0,l.useCallback)((e=>{o.send({operation:D.Ru.SANDBOX_ELEMENT_ACTIVE_SET,index:e})}),[o]),r=(0,l.useCallback)((()=>{a((0,Ie.PM)(D.rY)),o.send({operation:D.Ru.SANDBOX_LOCK_EDIT,data:!1}),o.send({operation:D.Ru.SANDBOX_ELEMENT_ACTIVE_RESET})}),[o,a]),i={title:l.createElement("span",{onClick:r},l.createElement(z.A,{icon:"Email"})," ",t("Email","letter"))},[s,d]=(0,l.useState)([i]),m=(0,l.useCallback)((e=>{o.send({operation:D.Ru.SANDBOX_ELEMENT_HOVER_SET,index:e})}),[o]),c=(0,l.useCallback)(((e,t)=>{return l.createElement("span",{className:e.className,onClick:()=>{n(t)},onMouseOver:()=>{m(t)}},(a=e.className).includes("em-element-path-item-text")?l.createElement(z.A,{icon:"ElementText"}):a.includes("em-element-path-item-image")?l.createElement(z.A,{icon:"ElementImage"}):a.includes("em-element-path-item-link")?l.createElement(Ht.A,null):a.includes("em-element-path-item-atom")?l.createElement(z.A,{icon:"Atom"}):a.includes("em-element-path-item-column")?l.createElement(z.A,{icon:"Column"}):a.includes("em-element-path-item-block")?l.createElement(z.A,{icon:"Block"}):a.includes("em-element-path-item-group")?l.createElement(z.A,{icon:"Group"}):a.includes("em-element-path-item-button")?l.createElement(z.A,{icon:"Button"}):a.includes("em-element-path-item-table")?l.createElement(z.A,{icon:"Table"}):a.includes("em-element-path-item-amp")?l.createElement(z.A,{icon:"AMP"}):void 0," ",e.title);var a}),[n,m]);return(0,l.useEffect)((()=>{if(e){const a=e.map(((e,t)=>({title:c(e,t)})));d([{title:l.createElement("span",{onClick:r},l.createElement(z.A,{icon:"Email"})," ",t("Email","letter"))},...a])}}),[e,c,r,t]),l.createElement(l.Fragment,null,l.createElement(Xr.A,{items:s,type:"separator",separator:""}))};var Yr=a(69194),$r=a(34401),Qr=a(66711),Jr=a(51717),ei=a(63448),ti=a(42567),ai=a(2952);const{Text:li,Link:oi,Title:ni}=Ae.A,ri="Links",ii="Images",si="Spam assassin",di="Problems",mi="valid",ci="warnings",ui="errors",pi=[mi,ui,ci],gi=({summary:e,__:t,selectedTags:a,setSelectedTags:o})=>l.createElement(ni,{level:5,style:{margin:0,fontSize:"14px"}},l.createElement(s.A,{style:{flexWrap:"wrap"},gap:"6"},pi.map(((n,r)=>l.createElement(x.A.CheckableTag,{key:n+r,checked:null===a||void 0===a?void 0:a.includes(n),onChange:e=>((e,t)=>{const l=t?2===a.length?[]:[...a,e]:a.filter((t=>t!==e));o(l)})(n,e),className:C()(`${n} optimise__button`,{[`${n}_active`]:a.includes(n)})},t(n===mi?"Valid":n===ci?"Warnings":"Errors"),":"," ",(null===e||void 0===e?void 0:e[n])||0))))),bi=()=>{var e,t,a,o,n,r,s;const{__:d}=(0,y.s9)(),c=(0,f.wA)(),p=(0,nr.fn)(),E=(0,Y.rD)(),_=(0,A.hN)(),{emailId:S,projectId:w}=(0,v.g)(),k=(0,Me.QC)(),x=(0,f.d4)(W.rd),B=(0,or.ml)(ir.AZ.ON_LIMIT_ID),[T,R]=(0,ai.Sr)(),[N,L]=(0,ai.ku)(),[P,I]=(0,ai.Ju)(),{data:O,isSuccess:V,refetch:H}=(0,M.fo)(+w,{skip:!!D.EW.isPlugin||!+w}),{limits:j}=D.EW.isPlugin?E.limits?E:{limits:{optimization_limit:0}}:O||{limits:{optimization_limit:0}},{optimization_limit:z}=j,[G,U]=(0,l.useState)(),[q,Z]=(0,l.useState)([]),[X,K]=(0,l.useState)([]),[$,Q]=(0,l.useState)([]),[J,ee]=(0,l.useState)([]),[te,ae]=(0,l.useState)(0),[le,oe]=(0,l.useState)([]),[ne,re]=(0,l.useState)([]),ie=te>=z&&z>0,se=!(!E.limits||!E.counters)&&D.EW.isPlugin,de=(0,l.useCallback)((()=>{B.fire({name:"OptimizationCount",count:te+1})}),[B,te]);(0,l.useEffect)((()=>{var e,t;se?ae((null===E||void 0===E||null===(e=E.counters)||void 0===e?void 0:e.optimization_counter)||0):V&&(null===O||void 0===O||null===(t=O.counters)||void 0===t?void 0:t.optimization_counter)&&ae(O.counters.optimization_counter)}),[se,O,V,E]),(0,l.useEffect)((()=>{var e,t;G===ri&&le.links&&K(q.length>0?null===(e=le.links)||void 0===e?void 0:e.filter((e=>q.includes(e.status))):le.links);G===ii&&ne.images&&Q(q.length>0?null===(t=ne.images)||void 0===t?void 0:t.filter((e=>q.includes(e.status))):ne.images)}),[le.links,ne.images,q,G]);const me=()=>{if(!S)return void _.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:"Save the mail first."}}),placement:"bottomRight"});let e;se&&(ae((e=>e+1)),de());const t=p.getValue(),a=(new DOMParser).parseFromString(t,"text/html"),o={},n={};a.querySelectorAll("a[href]").forEach(((e,t)=>{o[`link_${t}`]=e.getAttribute("href"),n[`link_${t}`]=e.innerText})),k.send({operation:"sandbox_set_attr_to_links"}),N({entity_id:S,data:o}).then((({data:t,error:a})=>{if(a)(0,F.p6)({error:a},_);else if(null!==t&&void 0!==t&&t.result){let a=[...t.result];null===a||void 0===a||a.sort(((e,t)=>e.linkId-t.linkId));const l=e=>{var t,a,l,o;return(null!==e.statusCode?e.statusCode<300&&(null===(t=null===(a=e.page)||void 0===a?void 0:a.secure)||void 0===t||t):"invalid"!==e.type)?mi:(e.statusCode&&e.statusCode<400||200===e.statusCode&&(null===(l=null===(o=e.page)||void 0===o?void 0:o.secure)||void 0===l||l))&&"invalid"!==e.type?ci:ui};e={links:a.map((e=>({...e,text:n[e.linkId],status:l(e)}))),summary:{valid:a.filter((e=>l(e)===mi)).length||0,warnings:a.filter((e=>l(e)===ci)).length||0,errors:a.filter((e=>l(e)===ui)).length||0}},oe(e),(0,F.wB)(d("Links validation was successfully completed"),_),!D.EW.isPlugin&&H()}else t.statusCode>300||!t.success?(0,F.p6)({error:{data:t}},_):_.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:"\u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430"}}),placement:"bottomRight"}),!le.links&&pe("")})).catch((e=>{(0,F.p6)({error:e},_)}))},ce=()=>{if(!S)return void _.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:"Save the mail first."}}),placement:"bottomRight"});se&&(ae((e=>e+1)),de());const e=p.getValue(),t=(new DOMParser).parseFromString(e,"text/html");let a={};t.querySelectorAll("img").forEach(((e,t)=>a[`image_${t}`]=e.src)),k.send({operation:"sandbox_set_attr_to_images"}),P({entity_id:S,data:a}).then((({data:e,error:t})=>{let a;if(t)(0,F.p6)({error:t},_);else if(null!==e&&void 0!==e&&e.result){let t=Object.values(e.result);t.sort(((e,t)=>e.imageId-t.imageId));let l=t.reduce(((e,t)=>e+Math.round(t.image.bytes/1024)),0);const o=e=>null!==e.statusCode&&e.statusCode<300?mi:e.statusCode<400&&e.statusCode>=300||200===e.statusCode&&!e.valid?ci:ui;a={images:t.map((e=>({...e,status:o(e)})))||[],summary:{valid:t.filter((e=>o(e)===mi)).length||0,warnings:t.filter((e=>o(e)===ci)).length||0,errors:t.filter((e=>o(e)===ui)).length||0},summaryTime:{value:(l>1200?l/1e3:l).toFixed(1),name:d(l>1200?"MB":"KB")}},a&&re(a),(0,F.wB)(d("Images validation was successfully completed"),_),!D.EW.isPlugin&&H()}else{var o;e.statusCode>300||!e.success?(0,F.p6)({error:{data:e}},_):_.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:"\u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430"}}),placement:"bottomRight"}),(null===ne||void 0===ne||null===(o=ne.images)||void 0===o||!o.length)&&pe("")}})).catch((e=>{(0,F.p6)({error:e},_)}))},ue=()=>{S?(se&&(ae((e=>e+1)),de()),T({entity_id:S,data:{html:p.getValue()}}).then((({data:e,error:t})=>{if(t)(0,F.p6)({error:t},_);else if(e&&e.success){const t=!!e.result.report&&Object.values(e.result.report);t&&(t.sort(((e,t)=>e.score-t.score)),ee({...e.result,report:t})),(0,F.wB)(d("Spam validation was successfully completed"),_),!D.EW.isPlugin&&H()}else e.statusCode>300||!e.success?(0,F.p6)({error:{data:e}},_):_.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:"\u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430."}}),placement:"bottomRight"}),(null===J||void 0===J||!J.length)&&pe("")})).catch((e=>{(0,F.p6)({error:e},_)}))):_.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:"Save the mail first."}}),placement:"bottomRight"})},pe=e=>{U(e!==G?e:""),Z([])};let ge=null;return(0,l.useEffect)((()=>{z>0&&te>=+z&&_.error({message:d("The usage limit has been exceeded"),description:d("The maximum number of requests for the current subscription period has been reached.\nSelect the appropriate plan to fulfil more requests"),placement:"bottomRight"})}),[te,z,d,_]),l.createElement("div",{className:"optimise selected_form-props-wrapper selected_form-props-wrapper_optimize"},se&&l.createElement(Jn,{counter:te,limits:z}),E.optimizeLinksEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider",style:{marginTop:0,marginBottom:0}}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},d("Links validation"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{var e;pe(ri),null!==le&&void 0!==le&&null!==(e=le.links)&&void 0!==e&&e.length||G===ri||me()},loading:L.isLoading,disabled:ie&&!(null!==le&&void 0!==le&&null!==(e=le.links)&&void 0!==e&&e.length)},!L.isLoading&&(G===ri?l.createElement($r.A,null):l.createElement(Qr.A,null))))),G===ri&&!(null===le||void 0===le||!le.links)&&(0===(null===le||void 0===le||null===(t=le.links)||void 0===t?void 0:t.length)?l.createElement(b.A,{style:{marginBottom:24}},l.createElement(u.A,{message:d("No links found."),type:"info"})):l.createElement(l.Fragment,null,l.createElement(b.A,{style:{marginBottom:14}},l.createElement("div",{className:"optimise__title-wrapper"},l.createElement(gi,{__:d,summary:le.summary,setSelectedTags:Z,selectedTags:q}),l.createElement(g.Ay,{disabled:ie,loading:L.isLoading,onClick:me,icon:l.createElement(Jr.A,null)},d("Refresh")))),l.createElement(b.A,{style:{marginBottom:24}},l.createElement(h.A,{span:24},l.createElement(Zn.A,{itemLayout:"horizontal",dataSource:X,renderItem:(e,t)=>{var a;return l.createElement(Zn.A.Item,{style:{border:"none"},key:t+"_"+e.id},l.createElement(Zn.A.Item.Meta,{avatar:e.status===mi?l.createElement(ei.A,{className:mi}):e.status===ci?l.createElement(ei.A,{className:ci}):l.createElement(ti.A,{className:ui}),title:l.createElement(oi,{className:"optimise__link",style:{color:"#177ddc",textDecoration:"underline",userSelect:"text"},draggable:!1,onClick:()=>{return t=e.linkId,a=600>e.statusCode>399||!e.statusCode,void k.send({operation:D.Ru.SANDBOX_SET_POSITION_TO_LINK,settings:{elementId:t,isError:a}});var t,a}},""===e.url?d("empty link"):e.url),description:l.createElement(l.Fragment,null,!(null===(a=e.text)||void 0===a||!a.length)&&l.createElement(li,{type:"secondary"},e.text),e.page.title&&e.page.title,e.page.secure&&e.status===mi&&l.createElement(l.Fragment,null,l.createElement("span",{className:"image-size-splitter"},"\xa0\u2022\xa0"),l.createElement("span",{className:mi},d("secure"))),!e.resolvedUrl&&!e.statusCode&&"url"===e.type&&l.createElement(l.Fragment,null,l.createElement("span",{className:"image-size-splitter"},"\xa0\u2022\xa0"),l.createElement(li,{type:"secondary"},d("Failed to load"))))}))}})))))),E.optimizeImagesEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider",style:{marginTop:0,marginBottom:0}}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},d("Images validation"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{var e;pe(ii),null!==ne&&void 0!==ne&&null!==(e=ne.images)&&void 0!==e&&e.length||G===ii||ce()},loading:I.isLoading},!I.isLoading&&(G===ii?l.createElement($r.A,null):l.createElement(Qr.A,null))))),G===ii&&!(null===ne||void 0===ne||!ne.images)&&(0===(null===ne||void 0===ne||null===(a=ne.images)||void 0===a?void 0:a.length)?l.createElement(b.A,{style:{marginBottom:24}},l.createElement(u.A,{message:d("No images found."),type:"info"})):l.createElement(l.Fragment,null,l.createElement(b.A,{style:{marginBottom:16}},l.createElement(u.A,{style:{padding:14,paddingBottom:10,width:"100%"},message:l.createElement("div",{className:"optimise__summary"},l.createElement("div",null,l.createElement(ni,{level:4,style:{marginBottom:"0"}},ne.images.length," "),l.createElement("span",{style:{fontSize:"12px"}},d("images"))),l.createElement("div",null,l.createElement(ni,{level:4,style:{marginBottom:"0"}},null===(o=ne.summaryTime)||void 0===o?void 0:o.value,null===(n=ne.summaryTime)||void 0===n?void 0:n.name),l.createElement("span",{style:{fontSize:"12px"}},d("total size"))),l.createElement("div",null,l.createElement(ni,{level:4,style:{marginBottom:"0"}},(Math.max(...ne.images.map((e=>e.image.responseTime)))/1e3).toFixed(2)+d("s")),l.createElement("span",{style:{fontSize:"12px"}},d("time to load")))),type:"warning"})),l.createElement(b.A,{style:{marginBottom:12}},l.createElement("div",{className:"optimise__title-wrapper"},l.createElement(gi,{__:d,summary:ne.summary,setSelectedTags:Z,selectedTags:q}),l.createElement(g.Ay,{icon:l.createElement(Jr.A,null),disabled:ie,loading:I.isLoading,onClick:()=>ce()},d("Refresh")))),l.createElement(b.A,{style:{marginBottom:12}},l.createElement(h.A,{span:24},l.createElement(Zn.A,{className:"optimise__result-list",itemLayout:"horizontal",dataSource:$,renderItem:(e,t)=>l.createElement(Zn.A.Item,{className:"optimise__image-item image-item",style:{border:"none"},key:t},l.createElement(Zn.A.Item.Meta,{className:C()("image-item__meta",{"image-item__meta_fail":!e.resolvedUrl&&!e.statusCode}),avatar:l.createElement(Yr.A,{className:C()("image-item__image",{"image-item__image_fail":!e.resolvedUrl||!e.valid}),width:92,height:"auto",style:{height:"auto"},src:e.resolvedUrl||"",preview:!1,onMouseEnter:()=>{var t;return((e,t)=>{clearTimeout(ge);let a=document.querySelector(".img-preview")?document.querySelector(".img-preview"):null,l=document.querySelector(".img-preview-content")?document.querySelector(".img-preview-content"):null;document.querySelector(".img-preview")||(a=document.createElement("div"),a.classList.add("img-preview"),l=document.createElement("div"),l.classList.add("img-preview-content"),a.append(l),document.querySelector(".email-pane__col_settings-inner").append(a)),l.innerHTML=`<table cellspacing="0" cellpadding="0" border="0" width="100%"><img height="auto" width=${t+"px"} alt="" style="max-width: 100%; object-fit: contain" src=${e}></table>`,"1"!==a.style.opacity&&setTimeout((function(){a.style.opacity="1",a.style.transform="translateX(-100%)"}),10)})(e.url,null===(t=e.image.dimensions)||void 0===t?void 0:t.width)},onMouseLeave:()=>(()=>{let e=document.querySelector(".img-preview");e&&(ge=setTimeout((()=>{e.style.opacity="0",e.style.transform="translateX(-99%)",setTimeout((function(){e.remove()}),300)}),300))})()}),title:e.url?l.createElement(i.A,{placement:"top",title:e.message},l.createElement(oi,{className:"optimise__link",style:{color:"#177ddc",textDecoration:"underline",userSelect:"text"},draggable:!1,onClick:()=>{return t=e.imageId,a=600>e.statusCode>399||!e.statusCode,void k.send({operation:D.Ru.SANDBOX_SET_POSITION_TO_IMG,settings:{elementId:t,isError:a}});var t,a}},""===(null===e||void 0===e?void 0:e.url)?d("empty src"):e.url)):e.message,description:l.createElement(l.Fragment,null,l.createElement("div",{className:"image-size"},e.image.dimensions&&l.createElement(l.Fragment,null,e.image.dimensions.width+" \xd7 "+e.image.dimensions.height,l.createElement("span",{className:"image-size-splitter"}," \xa0\u2022\xa0 "),l.createElement("span",null,Math.round(e.image.bytes/1024),d("kB")),l.createElement("span",{className:"image-size-splitter"}," \xa0\u2022\xa0 "),l.createElement("span",null,e.image.responseTime,d("ms")),l.createElement("span",{className:"image-size-splitter"}," \xa0\u2022\xa0 "),l.createElement("span",{className:"image-size-format"},e.image.contentType)),e.image.secure&&l.createElement(l.Fragment,null,l.createElement("span",{className:"image-size-splitter"}," \xa0\u2022\xa0 "),l.createElement("span",{className:mi},d("secure"))),e.resolvedUrl&&!e.valid&&l.createElement(li,{type:"danger"},d("not valid")))," ",!e.resolvedUrl&&!e.statusCode&&l.createElement(li,{type:"danger"},d("Failed to load")))}))})))))),E.optimizeSpamAssassinEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider",style:{marginTop:0,marginBottom:0}}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},d("SpamAssassin"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",loading:R.isLoading,onClick:()=>{var e;pe(si),null!==(e=J.report)&&void 0!==e&&e.length||ue()},disabled:ie&&!(null!==J&&void 0!==J&&null!==(r=J.report)&&void 0!==r&&r.length)},!R.isLoading&&(G===si?l.createElement($r.A,null):l.createElement(Qr.A,null))))),G===si&&!(null===(s=J.report)||void 0===s||!s.length)&&l.createElement(l.Fragment,null,l.createElement(b.A,{style:{marginBottom:8}},l.createElement("div",{className:"optimise__title-wrapper optimise__title-wrapper_spam"},l.createElement(ni,{level:1,style:{margin:0},type:J.spamScore<2||!J.spamScore||J.spamScore<=J.baseSpamScore-1?"success":J.spamScore<J.baseSpamScore-1?"warning":"danger"},l.createElement("span",{style:{marginRight:"12px"}},J.spamScore||0),l.createElement(li,{style:{marginRight:"12px",fontSize:"20px"}},"Score")),l.createElement(g.Ay,{disabled:ie,icon:l.createElement(Jr.A,null),loading:R.isLoading,onClick:ue},d("Refresh"))),J.spamScore>J.baseSpamScore-1&&l.createElement(li,null,d("Lower scores are better. Aim for a score less than ")+(J.baseSpamScore-1)+".")),l.createElement(b.A,{style:{marginBottom:8}},l.createElement(h.A,{span:24},l.createElement(Zn.A,{itemLayout:"horizontal",dataSource:J.report,renderItem:e=>l.createElement(Zn.A.Item,{style:{border:"none"}},l.createElement(Zn.A.Item.Meta,{title:l.createElement(l.Fragment,null,l.createElement(li,{style:{fontSize:"20px"}},e.score),l.createElement("span",{style:{marginLeft:"12px"}},e.description))}))}))))),E.optimizeCheckCodeEnabled&&l.createElement(l.Fragment,null,l.createElement(m.A,{className:"selected-td-form__divider",style:{marginTop:0,marginBottom:0}}),l.createElement(b.A,{gutter:10,align:"middle"},l.createElement(h.A,{span:20},l.createElement("div",{className:"form-group-title"},d("Source code validation"))),l.createElement(h.A,{span:4,align:"right"},l.createElement(g.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>pe(di)},G===di?l.createElement($r.A,null):l.createElement(Qr.A,null)))),G===di&&l.createElement(l.Fragment,null,null!==x&&void 0!==x&&x.length?l.createElement(b.A,{style:{marginBottom:8}},l.createElement(h.A,{span:24},l.createElement(Zn.A,{itemLayout:"horizontal",dataSource:x,renderItem:e=>l.createElement(Zn.A.Item,{style:{border:"none"}},l.createElement(Zn.A.Item.Meta,{avatar:e.severity<6?l.createElement(ti.A,{className:ci}):l.createElement(ti.A,{className:ui}),title:l.createElement(li,{onClick:()=>(e=>{const t={startColumn:e.startColumn,startLineNumber:e.startLineNumber,endColumn:e.endColumn,endLineNumber:e.endLineNumber};c((0,W.ps)(t))})(e),style:{cursor:"pointer"},className:e.severity<6?"warning":"error"},"Line: ",e.startLineNumber," ",e.startLineNumber!==e.endLineNumber&&" \u2013 "+e.endLineNumber),description:l.createElement(li,null,e.message)}))}))):l.createElement(b.A,{style:{marginBottom:24}},l.createElement(u.A,{message:d("No problems found."),type:"info"})))))};var hi=a(8111),Ei=a(38540),fi=a(15812),vi=a(78915),yi=a(37507);const Ai=(e,t)=>l.createElement(t,Object.assign({className:"email-pane__tab-bar"},e)),{Content:_i}=o.A,{useToken:Ci}=n.A,Si=(0,l.memo)((e=>l.createElement(mr,e))),wi=(0,l.memo)((e=>l.createElement(Sa,e))),ki=(0,l.memo)((e=>l.createElement(Fa,e))),xi=(0,l.memo)((e=>l.createElement(ur.A,e))),Bi=(0,l.memo)((0,l.forwardRef)(((e,t)=>l.createElement(cr.A,Object.assign({},e,{ref:t}))))),Ti=(0,l.memo)((e=>l.createElement(jl,e))),Ri=(0,l.memo)((e=>l.createElement(he,e))),Ni=(0,l.memo)((e=>l.createElement(Zr,e))),Li=({emailElement:e,isSuccess:t,setIsCollaborationEditor:a,isShowAddAllBlocksModal:n,triggerOpenSavedBlocksTab:_,setIsShowAddAllBlocksModal:S})=>{var w,k,x,B,T,R,N;const{__:L,_x:P}=(0,y.s9)(),I=(0,Me.QC)(),{emailId:M,blockId:O,projectId:H}=(0,v.g)(),j=(0,f.wA)(),{modal:G}=r.A.useApp(),U=(0,Y.rD)(),{token:q}=Ci(),Z=(0,A.hN)(),X=(0,Er.p)(),K=(0,f.d4)(Ie.B),$=(0,f.d4)(we.C1),Q=(0,f.d4)(we.B$),J=(0,f.d4)(V.cL),ee=(0,f.d4)(Ie.NQ),te=(0,f.d4)(W.qX),ae=(0,f.d4)(Ke.qX),le=(0,f.d4)(Ie.Fv),oe=(0,f.d4)(Ie.yy),ne=(0,f.d4)(fi.D2),re=(0,f.d4)(fi.jr),ie=(0,f.d4)(fi.hc),se=(0,f.d4)(Ie.Tn),[de]=(0,ar.Ll)(),[me,ce]=(0,l.useState)(!1),[ue,pe]=(0,l.useState)(),[ge,be]=(0,l.useState)(U.defaultBuildPanel||"empty"),[he,Ee]=(0,l.useState)("empty"),[fe,ve]=(0,l.useState)(!1),[ye,Ae]=(0,l.useState)([]),[_e,Se]=(0,l.useState)(!1),[xe,Be]=(0,l.useState)([]),Te=(0,f.d4)(ke.yN),[Re,Ne]=(0,l.useState)(!1),Le=(0,Ra.cR)();let Pe=!Q&&(null===(w=$.id)||void 0===w?void 0:w.toString())===(null===Te||void 0===Te||null===(k=Te.members)||void 0===k?void 0:k.owner.ID)&&!0;const Oe=!D.EW.isPlugin||((null===U||void 0===U?void 0:U.configSwither)||!1);(0,l.useEffect)((()=>{j((0,Ie.sy)())}),[j]),(0,l.useEffect)((()=>{const e=window.localStorage.getItem(D.V0.em_active_tab);e&&j((0,Ie.PM)(e))}),[X,j]);const Ve=M||O,Fe=e.hasOwnProperty("type")?D.IE:D.Tm,De=Fe===D.Tm?te:ae,[He,je]=(0,l.useState)({}),ze=(0,l.useRef)(null),We=(0,l.useRef)(),Ge=(0,l.useRef)(),Ue=(0,l.useRef)(),qe=(0,l.useRef)(),Ze=(0,l.useRef)(),Xe=(0,l.useRef)(null),Ye=(0,l.useRef)(!1),[$e,Qe]=(0,l.useState)(!1),[Je,et]=(0,l.useState)(!1),[tt]=(0,vi.b9)(),[at,lt]=(0,l.useState)(!1),[ot,nt]=(0,l.useState)(0),[rt,it]=(0,l.useState)(D.EW.isPlugin?"pro"===localStorage.getItem("configSwither"):"pro"===$.email_builder_config||Q||(null===(x=$.id)||void 0===x?void 0:x.toString())!==(null===Te||void 0===Te||null===(B=Te.members)||void 0===B?void 0:B.owner.ID)),[st,dt]=(0,l.useState)("FreeMode"),mt=D.EW.isPlugin?U.configSwither&&"pro"===U.mode?"DesignerMode":"EditorMode":rt?"DesignerMode":"EditorMode",ct=(0,l.useCallback)((()=>{clearTimeout(Xe.current);const e=".blocks-search__result-holder";Le.querySelector(e)&&(ne||re||ie)&&(Le.querySelector(e).style.removeProperty("transition"),Le.querySelector(e).style.opacity=0,Le.querySelectorAll(".blocks-search__result-body").forEach((e=>e.style.removeProperty("height"))),Xe.current=setTimeout((()=>{Le.querySelectorAll(".blocks-search__result-body").forEach((e=>{e.style.height=207*e.getBoundingClientRect().height/660+"px"})),Le.querySelector(e)&&(Le.querySelector(e).style.transition="opacity 0.2s",Le.querySelectorAll(e).forEach((e=>e.style.opacity=1)))}),200))}),[re,ne,ie]);function ut(e){setTimeout((()=>{Qe(e.target.closest(".desktop_view")),et(e.target.closest(".mobile_view"))}),100)}(0,l.useEffect)((()=>(document.addEventListener("mouseover",ut),()=>{document.removeEventListener("mouseover",ut)})),[]),(0,l.useEffect)((()=>{j((0,Ie.wr)(me?D.ND:D.Vp))}),[me,j]),(0,l.useEffect)((()=>{"function"===typeof a&&(xe.length>0?a(!0):a(!1))}),[xe]);const[pt]=(0,tr.EQ)(),{data:gt={},refetch:bt,status:ht}=(0,tr.gb)({entity_id:Ve},{skip:!Ve}),[Et,ft]=(0,l.useState)([]),[vt,yt]=(0,l.useState)(""!==U.defaultBuildPanel?D.nA:D.Jy),[At,_t]=(0,l.useState)(null),Ct=(0,l.useCallback)((()=>{var e;const t=null===(e=Ge.current)||void 0===e?void 0:e.getBoundingClientRect(),a=null===ue||void 0===ue?void 0:ue.getBoundingClientRect();I.send({operation:D.Ru.SANDBOX_WINDOW_CHARACTERISTIC,settings:{iframeOffsetTop:le&&"bottom"!==oe?0:30,scrollTop:-(null===t||void 0===t?void 0:t.top)+(null===a||void 0===a?void 0:a.top)+30,innerHeight:window.innerHeight,previewHeight:null===a||void 0===a?void 0:a.height,mode:le&&"bottom"!==oe?"code":"default"}})}),[oe,le,ue,I]),St=t&&e,wt=(0,l.useCallback)((e=>{const t=window.navigator.platform.match("Mac");U.codeEnabled&&U.codeSideEnabled&&e.altKey&&88===e.keyCode&&(j((0,Ie.vs)()),Pe&&(lt(!0),nt(1))),((t?e.metaKey:e.ctrlKey)&&e.shiftKey&&76===e.keyCode||(t?e.metaKey:e.ctrlKey)&&e.shiftKey&&69===e.keyCode||(t?e.metaKey:e.ctrlKey)&&e.shiftKey&&82===e.keyCode)&&e.preventDefault()}),[j,U.codeEnabled,Pe,U.codeSideEnabled]),kt=(0,l.useCallback)((t=>{document.querySelector(".easylogic-colorpicker")||Le.querySelector(".easylogic-colorpicker")||t.target.closest(".email-pane__collapse-wrapper")||t.target.closest(".selected-element-panel__columns-settings__controls__column__remove")||t.target.closest(".email-preview__content-col_main")||t.target.closest(".email-preview-menu")||t.target.closest(".monaco-editor")||t.target.closest(".main__pane-close-btn")||t.target.closest(".main__pane-trigger")||t.target.closest(".ant-modal-wrap")||t.target.closest(".email-pane__sizes")||t.target.closest(".ant-input-clear-icon")||At||t.target.closest(".email-preview-menu__history")||t.target.closest(".selected-element-panel-content")||t.target.closest(".toggle_view")||t.target.closest(".upload-bg-image__menu")||t.target.closest(".email-pane__paths")||t.target.closest(".ant-tabs-extra-content")||t.target.closest(".anticon-delete")||J===D.lx.UPLOAD_IMAGE_MODAL||J===D.lx.UPLOAD_IMAGE_MODAL_AI||J===D.lx.UPLOAD_IMAGE_MODAL_UPLOAD||J===D.lx.UPLOAD_IMAGE_MODAL_EDIT||J===D.lx.IMAGE_EDITOR_MODAL||J===D.lx.UPLOAD_BACKGROUND_MODAL||(K===D.yI&&(j((0,Ie.Fk)()),I.send({operation:D.Ru.SANDBOX_ELEMENT_ACTIVE_RESET}),Ae([])),j((0,Ie.mi)(!0)),I.send({operation:D.Ru.SANDBOX_LOCK_EDIT,data:!1}),setTimeout((()=>{e.type?j((0,Ke.A9)({type:null})):j((0,W.A9)({type:null}))}),300)),_t(null)}),[j,e.type,J,At,K,I]),[xt,Bt]=(0,l.useState)(!0),{data:Tt=[],refetch:Rt}=(0,hi.Cf)(Ve,{skip:!Ve}),[Nt,Lt]=(0,l.useState)(""),[Pt,It]=(0,l.useState)("");(0,l.useEffect)((()=>{Ve&&Rt()}),[K,Ve,Rt]),(0,l.useEffect)((()=>{Ve&&!Object.keys(gt).length&&"fulfilled"===ht&&bt()}),[K,Ve,bt,gt,ht]),(0,l.useEffect)((()=>{var e;const t=new F.jG,a=window.localStorage.getItem(D.V0.em_active_tab);if(0===(null===gt||void 0===gt?void 0:gt.totalCount)&&"pending"!==ht){const e={project_id:H,connection:"chat",entity_id:Ve,context:"default",locale:$.locale.slice(0,2)};a||pt({body:e}).then((()=>{t.isDisposed()||"fulfilled"===ht&&bt()}))}const l={data:{role:"assistant",message:"\u043f\u0435\u0447\u0430\u0442\u0430\u0435\u0442",isLoading:!0}};var o,n;(null===gt||void 0===gt||null===(e=gt.documents)||void 0===e?void 0:e.length)>0?(window.localStorage.removeItem(D.V0.em_active_tab),ft(null===gt||void 0===gt?void 0:gt.documents),null!==gt&&void 0!==gt&&null!==(o=gt.documents[(null===gt||void 0===gt||null===(n=gt.documents)||void 0===n?void 0:n.length)-1].data)&&void 0!==o&&o.userInfo&&ft([...null===gt||void 0===gt?void 0:gt.documents,l])):a||ft([l]);return()=>t.dispose()}),[Ve,$.locale,null===gt||void 0===gt?void 0:gt.totalCount,null===gt||void 0===gt?void 0:gt.documents,H,bt,pt,ht]),(0,l.useEffect)((()=>{je({}),j(Fe===D.Tm?(0,W.A9)({}):(0,Ke.A9)({}))}),[j,Fe]);const Mt=(0,l.useCallback)((e=>{j((0,W.G_)(e))}),[j]),Ot=(0,l.useCallback)((e=>{j((0,Ke.Dz)(e))}),[j]),Vt=(0,l.useCallback)((e=>{j(Fe===D.Tm?(0,W.A9)(e):(0,Ke.A9)(e))}),[j,Fe]);(0,l.useEffect)((()=>{const e=qe.current,t=Ue.current;pe(le?t:e)}),[le,oe]);const Ft=(0,l.useCallback)((e=>{be(e),"search"===e?ve(!0):(ve(!1),Ee(e)),setTimeout(ct,50)}),[ct]),Dt=(0,l.useCallback)((e=>{const t=e.data.operation,a=e.data,l=e.data.action;if(t===D.Ru.APPLICATION_SCROLL_TO&&setTimeout((()=>{var t;null===(t=Ue.current)||void 0===t||t.scrollTo({top:e.data.settings.value,behavior:"smooth"})}),100),t===D.Ru.APPLICATION_PREVIEW_ALERT_SHOW&&Ne(a.settings.show),t===D.Ru.APPLICATION_ACTION&&"toggle_editor"===l&&j((0,Ie.vs)()),t===D.Ru.APPLICATION_IFRAME_SET_HEIGHT&&(Le.querySelector(".email-pane__iframe").style.height=a.settings.height+"px"),t===D.Ru.APPLICATION_EMAIL_SETTINGS_SET){let e=Object.assign({},a.settings);delete e.preheader;Object.values(e).every((e=>!e))?(j((0,W.M7)(!0)),j((0,Ie.Fk)())):Mt(a.settings),a.settings.noBlocks,j((0,Ie.wW)(a.settings.responsive)),Bt(e.structuresMedia)}if(t===D.Ru.APPLICATION_BLOCK_SETTINGS_SET){Object.values(a.settings).every((e=>!e))?(j((0,Ke.rc)(!0)),j((0,Ie.Fk)())):(Ot(a.settings),Bt(a.settings.structuresMedia))}if(t===D.Ru.APPLICATION_ELEMENT_SETTINGS_SET){var o,n;const e=Object.values(D.bV),t=!!a.tab||!e.includes(a.type);var r;if(t&&K===D.yI&&j((0,Ie.Fk)()),a.type===D.bV.EMPTY_TABLE||a.type===D.bV.EMPTY_TD?(j((0,Ie.PM)(D.Bv)),a.type===D.bV.EMPTY_TABLE?(yt(D.nA),a.tab?Ft(a.tab):Ft("common")):a.type===D.bV.EMPTY_TD&&yt(D.Jy)):a.type&&K!==D.yI&&j((0,Ie.PM)(D.yI)),a.type===D.bV.CAROUSEL||a.type===D.bV.ACCORDION?(je({settings:{...a.settings,type:t?null:a.type,caption:a.caption,parent:t?null:a.settings.parent},type:t?null:a.type,parent:t?null:a.settings.parent,caption:a.caption}),Vt({})):(Vt({...a.settings,type:t?null:a.type,parent:t?null:a.settings.parent,caption:a.caption}),je({})),(null===(o=a.settings)||void 0===o||null===(n=o.path)||void 0===n?void 0:n.length)>0)Ae(null===(r=a.settings)||void 0===r?void 0:r.path)}t===D.Ru.APPLICATION_ELEMENT_SETTINGS_CLOSE&&j((0,Ie.Fk)())}),[j,Mt,Ot,Vt,K,Ft,Le]);(0,l.useEffect)((()=>{var e,t;$.email_builder_config&&(it(D.EW.isPlugin?"pro"===localStorage.getItem("configSwither"):"pro"===$.email_builder_config||Q||(null===(e=$.id)||void 0===e?void 0:e.toString())!==(null===Te||void 0===Te||null===(t=Te.members)||void 0===t?void 0:t.owner.ID)),j((0,Po.EV)($.email_builder_config)))}),[$.email_builder_config,j]),(0,l.useEffect)((()=>{var e,t;le&&Pe&&j((0,Ie.vs)()),Q||(null===(e=$.id)||void 0===e?void 0:e.toString())!==(null===Te||void 0===Te||null===(t=Te.members)||void 0===t?void 0:t.owner.ID)?"simple"===U.mode&&(tt({email_builder_config:"pro"}),localStorage.setItem("configSwither","pro"),j((0,Po.EV)("pro"))):(tt({email_builder_config:"simple"}),localStorage.setItem("configSwither","simple"),j((0,Po.EV)("simple")))}),[]);const Ht=e=>{var t,a;(Q||(null===(t=$.id)||void 0===t?void 0:t.toString())!==(null===Te||void 0===Te||null===(a=Te.members)||void 0===a?void 0:a.owner.ID))&&it((e=>!e)),setTimeout((()=>{var t,a;if(Q||(null===(t=$.id)||void 0===t?void 0:t.toString())!==(null===Te||void 0===Te||null===(a=Te.members)||void 0===a?void 0:a.owner.ID)){let t="DesignerMode"===e?"pro":"editor";tt({email_builder_config:t}),localStorage.setItem("configSwither",t),j((0,Po.EV)(t))}else j((0,Po.EV)("pro")),dt("DesignerMode"),lt(!0)}),200)};(0,No.A)(Dt);const jt=(0,l.useRef)(),[zt,Wt]=(0,l.useState)("unset"),Gt=(0,l.useCallback)((()=>{var e,t;let a;const l=null===(e=Ue.current)||void 0===e?void 0:e.getBoundingClientRect();if((null===jt||void 0===jt||null===(t=jt.current)||void 0===t?void 0:t.getBoundingClientRect().top)>=0){const e=l&&Math.round(l&&(null===l||void 0===l?void 0:l.height)-30);jt.current.style.height=`${e}px`,Wt(e-30)}a&&window.clearTimeout(a),a=window.setTimeout((function(){I.isInited()&&Ct()}),100)}),[Ct,I]);(0,l.useEffect)((()=>(K===D.z$?ze.current=setInterval((()=>{bt({entity_id:Ve})}),5e3):clearInterval(ze.current),clearInterval(ze.current))),[Ve,bt,K]);const Ut=window.localStorage.getItem(D.V0.em_code_mode_pane_sizes),[qt,Zt]=(0,l.useState)(+Ut||50),Xt=()=>{let e=Le.querySelector(".block-search__preview");e&&(e.style.opacity="0",e.style.transform="translateX(-99%)",setTimeout((function(){e.remove()}),300))};let Kt=[];U.blocksEmptyEnabled&&Kt.push({label:l.createElement(i.A,{overlayClassName:"email-pane__tooltip",placement:"top",title:L("Empty blocks")},l.createElement("div",{style:{paddingTop:4}},l.createElement(z.A,{icon:"BorderOuterOutlined",style:{fontSize:18}}))),value:"empty"}),U.blocksSavedEnabled&&Kt.push({label:l.createElement(i.A,{overlayClassName:"email-pane__tooltip",placement:"top",title:L("Saved blocks")},l.createElement("div",{style:{paddingTop:4}},l.createElement(z.A,{icon:"AppstoreAddOutlined",style:{fontSize:18}}))),value:"project"}),U.blocksCommonEnabled&&Kt.push({label:l.createElement(i.A,{overlayClassName:"email-pane__tooltip",placement:"top",title:L("Common blocks")},l.createElement("div",{style:{paddingTop:4}},l.createElement(z.A,{icon:"AppstoreOutlined",style:{fontSize:18}}))),value:"common"}),U.blocksTemplateEnabled&&Kt.push({label:l.createElement(i.A,{overlayClassName:"email-pane__tooltip",placement:"top",title:L("Template blocks")},l.createElement("div",{style:{paddingTop:4}},l.createElement(z.A,{icon:"BuildOutlined",style:{fontSize:18}}))),value:"template"}),U.blocksSearchEnabled&&Kt.push({label:l.createElement(i.A,{overlayClassName:"email-pane__tooltip",placement:"top",title:L("Blocks search")},l.createElement("div",{style:{paddingTop:4}},l.createElement(z.A,{icon:"SearchOutlined",style:{fontSize:18}}))),value:"search"});let Yt=[{label:l.createElement("div",{className:"email-pane__tab"},L("Elements")),key:D.Jy,forceRender:!0,className:"email-pane__collapse-panel email-pane__atoms",children:l.createElement(Ti,null)},{label:l.createElement("div",{className:"email-pane__tab"},L("Blocks")),key:D.nA,forceRender:!0,className:"email-pane__collapse-panel email-pane__blocks-search",style:{height:U.blocksSectionsShow?"calc(100% - 44px)":"100%"},children:l.createElement(l.Fragment,null,U.blocksSectionsShow&&l.createElement(l.Fragment,null,l.createElement(s.A.Compact,{block:!0},!fe&&l.createElement(d.A,{block:!0,style:{width:"100%",marginTop:24},onChange:Ft,value:ge,options:Kt}),fe&&l.createElement("div",{style:{width:"100%",height:36}}),fe&&l.createElement("div",{style:{width:36,textAlign:"right",marginTop:22}},l.createElement(z.A,{icon:"CloseOutlined",style:{padding:"0 2px 0",cursor:"pointer"},onClick:()=>{ve(!1),be(he)}}))),l.createElement("div",{className:"blocks-search__divider-wrapper",style:{marginTop:fe?28:12}},l.createElement(m.A,{className:"blocks-search__divider"}))),l.createElement("div",{style:{height:"100%"}},l.createElement("div",{className:"blocks-search__empty-shadow",style:{display:"empty"!==ge||fe?"none":"block"}},xt?l.createElement(ul,null):l.createElement(Qa,null)),l.createElement("div",{style:{height:U.blocksSectionsShow?"calc(100% - 24px)":"100%",display:"empty"!==ge||fe?"block":"none"}},l.createElement(ki,{parentEmailId:null===e||void 0===e?void 0:e.parent_email,blocksTab:ge,search:fe,reloadBlockScreens:ct,email:e,setIsShowAddAllBlocksModal:S}))))}],$t=[{disabled:at,key:D.yI,style:{height:U.sidePanelFloating?le&&"bottom"===oe?zt:"calc(100% - 30px)":"100%"},className:"em-analytics__email-tab-properties",children:l.createElement(l.Fragment,null,(!(null===De||void 0===De||!De.type)||!(null===He||void 0===He||!He.type))&&l.createElement("div",{className:C()("email-pane__collapse-wrapper",{"mobile-view":me,"mobile-properties":me&&se!==D.mX}),onMouseLeave:Xt},l.createElement(qn,{email:e,formSettings:He})))},{disabled:at,key:D.Vv,style:{height:U.sidePanelFloating?le&&"bottom"===oe?zt:"calc(100% - 30px)":"100%"},className:"em-analytics__email-tab-history",children:St&&l.createElement("div",{className:"email-pane__collapse-wrapper",onMouseLeave:Xt},l.createElement(Ni,{setCollapsedHistory:()=>j((0,Ie.mi)(!0)),emailElement:St}))},{key:D.rb,className:"em-analytics__email-tab-properties"},{disabled:at,label:l.createElement(i.A,{overlayClassName:"email-pane__tooltip",placement:"left",title:P("Build","tab")},l.createElement(z.A,{"data-testid":"contentIcon",icon:"PlusCircleOutlined"})),key:D.Bv,className:"em-analytics__email-tab-build",style:{height:U.sidePanelFloating?le&&"bottom"===oe?zt:"calc(100% - 30px)":"100%",overflow:"hidden"},children:l.createElement("div",{className:C()("email-pane__collapse-wrapper",{"email-pane__collapse-wrapper_no-topleft-radius":K===D.Bv||!K}),onMouseLeave:Xt},l.createElement(c.A,{className:C()("secondary-tabs email-pane__collapse",{"secondary-tabs_unset_scroll":vt===D.nA}),size:"large",animated:{inkBar:!1,tabPane:!1},activeKey:vt,onChange:e=>yt(e||""),items:Yt}))},{disabled:at,label:l.createElement(i.A,{overlayClassName:"email-pane__tooltip",overlayInnerStyle:{border:"2px dot-dash red"},overlayStyle:{border:"2px dot-dash red"},placement:"left",title:P("Styles","tab")},l.createElement(l.Fragment,null,l.createElement(z.A,{"data-testid":"stylesIcon",icon:"Styles"}))),key:D.rY,className:"em-analytics__email-tab-styles",style:{height:U.sidePanelFloating?le&&"bottom"===oe?zt:"calc(100% - 30px)":"100%",overflow:"hidden"},children:l.createElement("div",{className:"email-pane__collapse-wrapper"},l.createElement(wi,{email:e}))}];U.commentsEnabled&&$t.push({disabled:at,label:l.createElement(i.A,{overlayClassName:"email-pane__tooltip",placement:"left",title:P("Discuss","tab")},l.createElement(z.A,{"data-testid":"commentsIcon",icon:"CommentOutlined"}),Pe&&l.createElement(z.A,{icon:"Lock",className:"free-mode-firewall-icon free-mode-firewall-icon_emailpane"}),!!Tt.length&&l.createElement("span",{className:"email-pane__comment-counter"},Tt.filter((e=>"deleted"!==e.comment_status)).length)),key:D.hc,className:"email-pane__tab-discuss em-analytics__email-tab-discuss",style:{height:U.sidePanelFloating?le&&"bottom"===oe?zt:"calc(100% - 30px)":"100%",overflow:"hidden"},children:l.createElement("div",{className:"email-pane__collapse-wrapper"},l.createElement(c.A,{className:"secondary-tabs email-settings__collapse",size:"large",animated:{inkBar:!1,tabPane:!1},activeKey:D.hc,items:[{label:l.createElement(l.Fragment,null,L("Discuss")),key:D.hc,forceRender:!0,className:"email-settings__collapse-panel",children:Ve?l.createElement(zl.A,{email:e,comments:Tt,subjectId:Ve,isLoggedIn:!0,emailElementType:Fe}):l.createElement("div",{className:"aside-content-wrapper"},e.hasOwnProperty("type")?l.createElement(u.A,{description:L("Save the block before commenting."),type:"info",showIcon:!0,style:{marginBottom:20}}):l.createElement(u.A,{description:L("Save the email before commenting."),type:"info",showIcon:!0,style:{marginBottom:20}}))}]}))});const Qt=()=>{de({entity_id:Ve}).then((e=>{e.error?Z.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:e.error.data.code}}),description:l.createElement("div",{dangerouslySetInnerHTML:{__html:e.error.data.message}}),placement:"bottomRight"}):e.data.success&&Z.success({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:L("Success")}}),description:l.createElement("div",{dangerouslySetInnerHTML:{__html:e.data.success}}),placement:"bottomRight"}),bt(),Se(!1)}))};U.aiAssistentEnabled&&$t.push({disabled:at,label:l.createElement(i.A,{overlayClassName:"email-pane__tooltip",placement:"left",title:P("AI assistant","tab")},l.createElement(z.A,{"data-testid":"aiAssistentIcon",icon:"AI"}),Pe&&l.createElement(z.A,{icon:"Lock",className:"free-mode-firewall-icon free-mode-firewall-icon_emailpane"}),(null===gt||void 0===gt?void 0:gt.totalCount)>0&&Ve&&l.createElement("span",{className:"email-pane__comment-counter"},null===gt||void 0===gt?void 0:gt.totalCount)),key:D.z$,className:"email-pane__tab-discuss em-analytics__email-tab-discuss",style:{height:U.sidePanelFloating?le&&"bottom"===oe?zt:"calc(100% - 30px)":"100%",overflow:"hidden"},children:l.createElement(l.Fragment,null,l.createElement("div",{className:"email-pane__collapse-wrapper"},l.createElement(c.A,{className:"secondary-tabs email-settings__collapse",size:"large",animated:{inkBar:!1,tabPane:!1},activeKey:D.z$,tabBarExtraContent:l.createElement(i.A,{overlayClassName:"email-pane__tooltip",placement:"top",title:L("Clear chat")},l.createElement(p.A,{description:"Clear chat history?",onConfirm:Qt,okText:"Yes",cancelText:"No",icon:"",placement:"leftTop",title:!1},l.createElement(g.Ay,{type:"text",icon:l.createElement(z.A,{icon:"ClearChat",style:{fontSize:16}}),style:{marginRight:16}}))),items:[{label:l.createElement(l.Fragment,null,L("AI assistant")),key:D.z$,forceRender:!0,className:"email-settings__collapse-panel",children:Ve||window.localStorage.getItem(D.V0.em_active_tab)?l.createElement(Si,{messages:Et.length>0?Et:[{data:{role:"assistant",message:"\u043f\u0435\u0447\u0430\u0442\u0430\u0435\u0442",isLoading:!0}}],newEmailAiGeneratorRef:Ye}):l.createElement("div",{className:"aside-content-wrapper"},e.hasOwnProperty("type")?l.createElement(u.A,{description:L("Save the block before commenting."),type:"info",showIcon:!0,style:{marginBottom:20}}):l.createElement(u.A,{description:L("Save the email before commenting."),type:"info",showIcon:!0,style:{marginBottom:20}}))}]})))}),U.optimizeEnabled&&$t.push({disabled:at,label:l.createElement(i.A,{overlayClassName:"email-pane__tooltip",overlayInnerStyle:{border:"2px dot-dash red"},overlayStyle:{border:"2px dot-dash red"},placement:"left",title:P("Optimize","tab")},l.createElement(l.Fragment,null,l.createElement(z.A,{"data-testid":"optimizeIcon",icon:"Speed"}),Pe&&l.createElement(z.A,{icon:"Lock",className:"free-mode-firewall-icon free-mode-firewall-icon_emailpane"}))),key:D.N7,className:"em-analytics__email-tab-optimise",style:{height:U.sidePanelFloating?le&&"bottom"===oe?zt:"calc(100% - 30px)":"100%",overflow:"hidden"},children:l.createElement("div",{className:"email-pane__collapse-wrapper"},l.createElement(c.A,{className:"secondary-tabs secondary-tabs_optimise email-settings__collapse",size:"large",animated:{inkBar:!1,tabPane:!1},activeKey:D.N7,items:[{label:l.createElement(l.Fragment,null,L("Optimize")),key:D.N7,forceRender:!0,className:"email-settings__collapse-panel",children:l.createElement(bi,null)}]}))}),U.settingsEnabled&&$t.push({disabled:at,label:l.createElement(i.A,{overlayClassName:"email-pane__tooltip",placement:"left",title:P("Settings","tab")},l.createElement(z.A,{"data-testid":"settingsIcon",icon:"SettingOutlined"})),key:D.zx,className:"em-analytics__email-tab-edit",style:{height:U.sidePanelFloating?le&&"bottom"===oe?zt:"calc(100% - 30px)":"100%",overflow:"hidden"},children:l.createElement("div",{className:"email-pane__collapse-wrapper"},l.createElement(Ri,{email:e}))});const[Jt,ea]=(0,l.useState)([]),[ta,aa]=(0,l.useState)(!1),[la,oa]=(0,l.useState)(0),[na,ra]=(0,l.useState)(0),ia=(null===(T=Le.querySelector(".email-pane__col_preview"))||void 0===T?void 0:T.getBoundingClientRect().width)-(U.sidePanelFloating?0:38),[sa,da]=(0,l.useState)(null);(0,l.useEffect)((()=>{Ve&&Rt(Ve)}),[Ve,Rt]),(0,l.useEffect)((()=>{const e=I.onInit((()=>{I.send({operation:D.Ru.SANDBOX_LOCK_EDIT,data:!1}),I.send({operation:D.Ru.SANDBOX_LOCK_DISCUSS,value:ta})}));return()=>e.dispose()}),[ta,I]),(0,l.useEffect)((()=>{if(Jt.length<2){const e=null===ue||void 0===ue?void 0:ue.getBoundingClientRect(),t=setInterval(a,50);function a(){I.isInited()&&e&&(Ct(),clearInterval(t))}ea((e=>[...e,t]))}return clearInterval(Jt[Jt.length-1])}),[Jt,ue,Ct,I]);const ma=(0,l.useCallback)(((e=ee)=>{var t;I.send({operation:D.Ru.SANDBOX_IFRAME_SETSIZE,settings:{iframeWidth:e+2}}),null===(t=We.current)||void 0===t||t.resize()}),[ee,I]);(0,l.useEffect)((()=>{if(aa(K===D.hc),K!==D.rb){var e;const t=Le.querySelector(".email-pane__row"),a=null===t||void 0===t?void 0:t.getBoundingClientRect().width;(null===Ge||void 0===Ge||null===(e=Ge.current)||void 0===e?void 0:e.getBoundingClientRect().width)+540>a&&j((0,Ie.vc)("100%"))}}),[j,K,Le]);const ca=(0,l.useCallback)((()=>{const e=Ge.current;e&&(e.style.borderWidth="1px",U.sidePanelFloating||(e.style.marginLeft="-1px",e.style.marginRight="-1px"),e.style.borderLeftColor=null,e.style.borderRightColor=null)}),[U.sidePanelFloating]),ua=(0,l.useCallback)((e=>{ha(!1),sa&&(setTimeout((()=>ma()),50),da(null)),e.target.classList.contains("email-pane__handle")||ca(),window.localStorage.setItem(D.V0.em_code_mode_pane_sizes,JSON.stringify(qt))}),[ma,sa,qt,ca]),pa=e=>t=>{t.target.classList.contains("email-pane__handle")&&(t.preventDefault(),oa(t.target.parentNode.offsetWidth),ra(t.pageX),da(e),_t(e))},ga=e=>{const t=Ge.current;"string"!==typeof e||sa&&sa!==e?sa||(ca(),Le.querySelector(".email-pane__iframe").style.width="1px",Le.querySelector(".email-pane__iframe").style.removeProperty("margin-left")):(Le.querySelector(".email-pane__iframe").style.width="calc(100% + 1px)","right"===e?(t.style.borderRightColor=q.colorPrimary,t.style.borderRightWidth="2px"):(t.style.borderLeftColor=q.colorPrimary,t.style.borderLeftWidth="2px",Le.querySelector(".email-pane__iframe").style.marginLeft="-1px"))},[ba,ha]=(0,l.useState)(!1),Ea=(0,l.useCallback)((e=>{if(!sa)return;let t=2*(e.pageX-na),a=la+("left"===sa?-t:t);var l;a>318&&a<ia&&(j((0,Ie.vc)(a)),"number"===typeof a&&a<=425?me||ce(!0):me&&ce(!1),null===(l=We.current)||void 0===l||l.resize())}),[j,la,na,sa,ia,me,ce]),fa=(0,l.useCallback)((e=>{if(ba)if("bottom"===oe){const t=Ze.current.getBoundingClientRect().height,a=Ze.current.getBoundingClientRect().top,l=(e.clientY-a)/t*100;if(l<20||l>80)return;Zt(l),Gt()}else{const t=Ze.current.getBoundingClientRect().width,a=Ze.current.getBoundingClientRect().left,l=(e.clientX-a)/t*100,o=Ge.current.getBoundingClientRect().width;if(U.desktopMobileSwitchPanel&&"number"===typeof o&&o<=425&&(j((0,Ie.vc)(425)),me||ce(!0)),l<20||l>80)return;Zt(l)}}),[ba,oe,Gt,me,j,U.desktopMobileSwitchPanel,ce]);(0,l.useEffect)((()=>{Gt()}),[le,Gt]);const va=e=>{j((0,Ie.vc)(e)),setTimeout((()=>ma(e)),700),"number"===typeof e&&e<=425?me||ce(!0):me&&ce(!1)};(0,l.useEffect)((()=>(window.addEventListener("scroll",Gt,!0),window.addEventListener("mousemove",Ea,!0),window.addEventListener("mousemove",fa),window.addEventListener("mouseup",ua,!0),window.addEventListener("click",kt),window.addEventListener("keydown",wt),()=>{window.removeEventListener("mousemove",Ea,!0),window.removeEventListener("mousemove",fa),window.removeEventListener("mouseup",ua,!0),window.removeEventListener("scroll",Gt,!0),window.removeEventListener("keydown",wt),window.removeEventListener("click",kt)})));const[ya,Aa]=(0,l.useState)(U.emailPaneDesktopSize||ee);(0,l.useEffect)((()=>{U.emailPaneDesktopSize&&j((0,Ie.vc)(U.emailPaneDesktopSize))}),[j,U.emailPaneDesktopSize]),(0,l.useEffect)((()=>{Aa(le&&"bottom"!==oe&&!me&&U.desktopMobileSwitchPanel?"100%":ee)}),[j,U.emailPaneDesktopSize,le,oe,me,U.desktopMobileSwitchPanel,ee]);return(0,l.useEffect)((()=>{_&&(yt(D.nA),Ft("project"))}),[_]),l.createElement(o.A,{className:C()("email-pane",{"email-pane_code-mode":le,"email-pane_only_code_mode_mobile":U.onlyCodeModeInMobile,"email-pane_code-mode-bottom":le&&"bottom"===oe,"email-pane_no-element-navigation":!U.switchDesktopMobilePropsEnabled&&!U.stepToOtherElementEnabled&&!U.deleteButtonEnabled,"email-pane_is-mobile":me,"email-pane_path-enabled":U.pathEnabled})},l.createElement(_i,{className:"email-pane__container",ref:qe},((null===De||void 0===De?void 0:De.type)===D.bV.TEXT||(null===De||void 0===De?void 0:De.type)===D.bV.LINK||De.type===D.bV.IMG||De.type===D.bV.BUTTON)&&le&&"bottom"!==oe&&l.createElement(Hn,{className:C()("selected-element-panel__content selected-element-panel__content_abs",{"selected-element-panel__hidden":De.type===D.bV.IMG}),emailElementType:Fe,formSettings:He}),Re&&me&&l.createElement(u.A,{message:L("Template is not mobile-friendly"),description:L("While editing, some elements of the email no longer fit the screen of the mobile device. Check that these elements are set to a smaller width for mobile devices."),type:"warning",className:"email-pane__col__alert",closable:!0}),l.createElement(b.A,{ref:Ze,className:C()("email-pane__row",{"email-pane__left":le&&"right"===oe,"email-pane__right":le&&"left"===oe,"email-pane__bottom":le&&"bottom"===oe,"email-pane__sizeSwitcher":U.desktopMobileSwitchPanel,"email-pane__reverse":"left"===U.menuDirection,"email-pane__pinch":!U.sidePanelFloating})},l.createElement(h.A,{style:{flexGrow:1,overflowY:U.sidePanelFloating?"scroll":"hidden",overflowX:"hidden",height:le&&"bottom"===oe?`calc(${qt}%)`:"100%",width:`${"left"===oe?100-qt:"bottom"===oe?100:qt}%`},id:"pane-content-wrapper",ref:U.sidePanelFloating?Ue:null},l.createElement("div",{className:"email-pane__iframe-scroll-top",id:"iframe-scroll-top"}),U.desktopMobileSwitchPanel&&l.createElement(s.A,{className:"email-pane__sizes-panel-wrapper",direction:"vertical",size:10},l.createElement(s.A,{className:"email-pane__sizes-panel",direction:"vertical",size:0},l.createElement(i.A,{title:L("Desktop view"),placement:"right",open:$e},l.createElement(g.Ay,{type:me?"text":"primary",icon:l.createElement(z.A,{icon:"DesktopOutlined"}),shape:"circle",onClick:()=>va(U.emailPaneDesktopSize||1e3),className:"toggle_view desktop_view"})),l.createElement(i.A,{title:L("Mobile view"),placement:"right",open:Je},l.createElement(g.Ay,{type:me?"primary":"text",icon:l.createElement(z.A,{icon:"MobileOutlined"}),shape:"circle",onClick:()=>va(425),className:"toggle_view mobile_view"}))),U.codeSideEnabled&&l.createElement(i.A,{title:L("Code mode"),placement:"right"},l.createElement(g.Ay,{type:le?"primary":"default",icon:l.createElement(z.A,{icon:"Code"}),shape:"circle",onClick:()=>{return e="right",le?j((0,Ie.vs)()):"string"===typeof e?(j((0,Ie.Uf)(e)),!le&&j((0,Ie.vs)())):j((0,Ie.vs)()),j((0,Ie.Fk)()),setTimeout((()=>{Fe===D.IE?j((0,Ke.A9)({type:null})):j((0,W.A9)({type:null}))}),300),I.send({operation:D.Ru.SANDBOX_ELEMENT_ACTIVE_RESET}),void j((0,Ei.rI)());var e}}))),l.createElement(b.A,{className:C()("email-pane__col-wrapper",{container:le&&"bottom"===oe||!le,"email-pane__col-wrapper_reverse":"left"===U.menuDirection,"email-pane__col-wrapper_pinch":!U.sidePanelFloating}),style:{flexGrow:1,maxWidth:"unset",paddingTop:U.desktopMobileSwitchPanel&&le&&"bottom"!==oe?"60px":""}},l.createElement(h.A,{className:"email-pane__col email-pane__col_preview",style:{flexGrow:1,maxWidth:"unset"},ref:U.sidePanelFloating?null:Ue},U.desktopMobileSwitchRule&&l.createElement("div",{className:`email-pane__sizes ${Nt}`},l.createElement("div",{className:"email-pane__width-selectors-wrapper"},l.createElement("div",{className:"device-width__full",style:{flexGrow:1},onMouseEnter:()=>{Lt("device-width__full-hovered"),It(L("Desktop"))},onMouseLeave:()=>{Lt(""),It("")},onClick:()=>va("100%")}),l.createElement("div",{className:"device-width__768",style:{width:171},onMouseEnter:()=>{Lt("device-width__768-hovered"),It(L("Small desktop \u2013 768px"))},onMouseLeave:()=>{Lt(""),It("")},onClick:()=>va(768)}),l.createElement("div",{className:"device-width__425",style:{width:25},onMouseEnter:()=>{Lt("device-width__425-hovered"),It(L("Mobile L \u2013 425px"))},onMouseLeave:()=>{Lt(""),It("")},onClick:()=>va(425)}),l.createElement("div",{className:"device-width__375",style:{width:28},onMouseEnter:()=>{Lt("device-width__375-hovered"),It(L("Mobile M \u2013 375px"))},onMouseLeave:()=>{Lt(""),It("")},onClick:()=>va(375)}),l.createElement("div",{className:"device-width__320",style:{width:320},onMouseEnter:()=>{Lt("device-width__320-hovered"),It(L("Mobile S \u2013 320px"))},onMouseLeave:()=>{Lt(""),It("")},onClick:()=>va(320)},Pt),l.createElement("div",{className:"device-width__375",style:{width:28},onMouseEnter:()=>{Lt("device-width__375-hovered"),It(L("Mobile M \u2013 375px"))},onMouseLeave:()=>{Lt(""),It("")},onClick:()=>va(375)}),l.createElement("div",{className:"device-width__425",style:{width:25},onMouseEnter:()=>{Lt("device-width__425-hovered"),It(L("Mobile L \u2013 425px"))},onMouseLeave:()=>{Lt(""),It("")},onClick:()=>va(425)},l.createElement(i.A,{title:L("Mobile view"),placement:"bottom"},l.createElement(g.Ay,{type:"default",icon:l.createElement(z.A,{icon:"MobileOutlined"}),size:"small",shape:"circle",style:{right:-12,top:4,zIndex:999,padding:0,position:"absolute",onClick:()=>va(425)}}))),l.createElement("div",{className:"device-width__768",style:{width:171},onMouseEnter:()=>{Lt("device-width__768-hovered"),It(L("Small desktop \u2013 768px"))},onMouseLeave:()=>{Lt(""),It("")},onClick:()=>va(768)},l.createElement(i.A,{title:L("Desktop view"),placement:"bottom"},l.createElement(g.Ay,{type:"default",icon:l.createElement(z.A,{icon:"DesktopOutlined"}),size:"small",shape:"circle",style:{right:-12,top:4,zIndex:999,padding:0,position:"absolute",onClick:()=>va(768)}}))),l.createElement("div",{className:"device-width__full",style:{flexGrow:1},onMouseEnter:()=>{Lt("device-width__full-hovered"),It(L("Desktop"))},onMouseLeave:()=>{Lt(""),It("")},onClick:()=>va("100%")}))),l.createElement("div",{className:C()("email-pane__resizable",{"email-pane__resizable_drag":sa||ba}),style:{maxWidth:ya}},l.createElement("div",{className:"email-pane__handle left",onMouseDown:pa("left"),onMouseEnter:()=>ga("left"),onMouseLeave:ga}),l.createElement("div",{className:"email-pane__handle right",onMouseDown:pa("right"),onMouseEnter:()=>ga("right"),onMouseLeave:ga}),l.createElement("div",{className:C()("email-pane__content-col email-pane__content-col_main",{"email-pane__content-col_disable":sa||ba}),ref:Ge,id:"pane-content-iframe"},l.createElement(Bi,{ref:We,className:"email-pane__iframe",email:e,handlerSendPosition:Gt})))),l.createElement(h.A,{style:{display:le&&"bottom"!==oe?"none":"initial"},ref:jt,className:C()("email-pane__content-col email-pane__content-col_menu email-pane__content-col_tabs email-pane__col email-pane__col_settings",{"email-pane__col_disabled":K===D.rb})},(!le||"bottom"===oe)&&l.createElement(c.A,{className:C()("email-pane__col_settings-inner",{"email-pane__col_settings-inner_reverse":"left"===U.menuDirection}),size:"middle",animated:{inkBar:!1,tabPane:!1},activeKey:K,onTabClick:e=>{let t=Le.querySelector(".atoms__list");if(e===D.Bv&&"Disabled_tab"===K&&t&&setTimeout((()=>{t.style.opacity=1}),300),U.toggleSidePanel&&e===K?(j((0,Ie.PM)(D.rb)),t&&(t.style.opacity=0)):"Optimize"===e?(0,F.Z1)(L,G):e!==D.yI&&e!==D.Vv&&(j((0,Ie.PM)(e)),I.send({operation:D.Ru.SANDBOX_LOCK_EDIT,data:!1}),I.send({operation:D.Ru.SANDBOX_ELEMENT_ACTIVE_RESET}),Ae([])),Pe&&("Discuss"===e||"Optimise"===e||"AiChat"===e))switch(lt(!0),e){case"Discuss":nt(7);break;case"Optimise":nt(6);break;case"AiChat":nt(9);break;default:nt(0)}},renderTabBar:Ai,tabPosition:"right",items:$t,tabBarExtraContent:Oe&&l.createElement(l.Fragment,null,Q||(null===(R=$.id)||void 0===R?void 0:R.toString())!==(null===Te||void 0===Te||null===(N=Te.members)||void 0===N?void 0:N.owner.ID)?l.createElement(d.A,{options:[{value:"DesignerMode",icon:l.createElement(i.A,{placement:"left",title:L("Designer mode")},l.createElement(z.A,{icon:"DesignerMode",style:{fontSize:18,top:2}}))},{value:"EditorMode",icon:l.createElement(i.A,{placement:"left",title:L("Editor mode")},l.createElement(z.A,{icon:"EditorMode",style:{fontSize:18,top:4,left:2}}))}],className:"ant-segmented_editor-mode",onChange:Ht,defaultValue:mt}):l.createElement(d.A,{options:[{value:"FreeMode",icon:l.createElement(i.A,{placement:"left",title:L("Simple mode")},l.createElement("span",{style:{fontSize:14,fontWeight:600,position:"relative",top:-1}},"Free"))},{value:"DesignerMode",icon:l.createElement(i.A,{placement:"left",title:L("Pro mode")},l.createElement(z.A,{icon:"DesignerMode",style:{fontSize:20,top:2}}))}],className:"ant-segmented_editor-mode",onChange:Ht,value:st}))}))),l.createElement("div",{className:"email-pane__iframe-scroll-bottom",id:"iframe-scroll-bottom"})),l.createElement(h.A,{style:{width:`${"right"===oe?100-qt:"bottom"===oe?100:qt}%`,position:"relative",height:"bottom"===oe?`calc(${100-qt}%)`:"unset",display:le?"initial":"none"}},l.createElement("div",{className:"email-pane__code-divider",onMouseDown:()=>ha(!0)}),l.createElement("div",{className:"code-mode__pane code-mode__pane_editor email-pane__pane email-pane__pane_editor"},l.createElement("div",{className:"code-mode__pane-content email-pane__pane-content"},l.createElement(xi,{email:e,setOtherUsers:Be,readOnly:U.lockEditor,newEmailAiGeneratorRef:Ye}))))),U.pathEnabled&&l.createElement("div",{className:"email-pane__paths"},l.createElement(Kr,{elementPath:ye})),l.createElement("div",{className:"collaborator-list"},l.createElement(yi.b,{users:xe,isEditor:D._P.isEditor,isPlugin:D.EW.isPlugin,token:q}))),"img"===(null===He||void 0===He?void 0:He.type)&&le&&"bottom"!==oe&&l.createElement("div",{className:"email-pane__collapse-wrapper email-pane__collapse-wrapper_disabled"},l.createElement(qn,{email:e,formSettings:He})),l.createElement(Ur,null),l.createElement(Ce.A,{open:at,onCancel:()=>{le&&j((0,Ie.vs)()),j((0,Ie.Fk)()),j((0,Po.EV)("simple")),dt("FreeMode"),lt(!1)},initialSlide:ot}),l.createElement(E.A,{title:L("Warning"),centered:!0,open:_e,onOk:Qt,onCancel:()=>{Se(!1)}},l.createElement("p",null,L("Clear chat history?"))))}},79966:(e,t,a)=>{"use strict";a.d(t,{A:()=>z});var l=a(98173),o=a(40120),n=a(71446),r=a(49856),i=a(13785),s=a(37969),d=a(98447),m=a(38927),c=a(64909),u=a(38826),p=a(27264),g=a(2604),b=a(30150),h=a(52218),E=a.n(h),f=a(12543),v=a(52995),y=a(8807),A=a(48956),_=a(23424),C=a(47014),S=a(54838),w=a(1047),k=a(22536),x=a(84572),B=a(98845),T=a(68984),R=a(40835),N=a(32947),L=a(55835),P=a(80223),I=a(40277),M=a(52919),O=a(86095),V=a(27941),F=a(90614),D=a(15626);const H=l.createElement(u.A,{style:{fontSize:20},spin:!0}),{useToken:j}=o.A,z=({emailElement:e,isCollaborationEditor:t})=>{var a,o,h,z;const{__:W}=(0,f.s9)(),G=(0,g.wA)(),U=(0,M.XW)(),{emailId:q,blockId:Z}=(0,b.g)(),X=(0,g.d4)(_.cL),[K,Y]=(0,l.useState)(!1),[$,Q]=(0,R.Zf)(),J=(0,b.Zp)(),ee=(0,g.d4)(C.C1),[te]=(0,B.YE)(q),[ae]=(0,T.lx)(Z),{owner:le}=(0,P.A)(),oe=(0,O.fn)(),ne=(0,O.aD)(oe),re=(0,O.TW)(oe),ie=(0,g.d4)(S.Wm),se=(0,g.d4)(S.Fv),de=(0,g.d4)(S.yy),{token:me}=j(),{modal:ce}=n.A.useApp(),ue=(0,c.hN)(),{confirm:pe}=ce,ge=(0,V.rD)(),be=e.hasOwnProperty("type")?N.IE:N.Tm,he=(0,F.ml)(D.AZ.ON_SHARE_ID),Ee=(0,F.ml)(D.AZ.ON_SHOW_PREVIEW_ID),[fe,ve]=(0,l.useState)(!1),[ye,Ae]=(0,l.useState)(0),_e=(0,g.d4)(x.yN);let Ce=!(0,g.d4)(C.B$)&&(null===(a=ee.id)||void 0===a?void 0:a.toString())===(null===_e||void 0===_e||null===(o=_e.members)||void 0===o?void 0:o.owner.ID)&&!0;const Se=q?"emailId":"blockId",we=null===e||void 0===e?void 0:e.project,ke=e=>{"string"===typeof e?(G((0,S.Uf)(e)),!se&&G((0,S.vs)())):G((0,S.vs)()),setTimeout((()=>{be===N.IE?G((0,k.A9)({type:null})):G((0,w.A9)({type:null}))}),300),U({operation:N.Ru.SANDBOX_ELEMENT_ACTIVE_RESET}),Ce&&(ve(!0),Ae(1))},xe=(0,l.useCallback)((()=>{pe({title:W("Available on the Personal plan and higher."),icon:l.createElement(p.A,null),content:l.createElement("div",{style:{maxWidth:"330px"}},W("Upgrade your plan to use this feature")),centered:!0,okText:W("Choose your plan"),cancelText:W("Close & continue"),width:"unset",onOk(){J("/billing")},onCancel(){}})}),[J,W,pe]);(0,l.useEffect)((()=>{Q.isError&&((0,I.p6)(Q,ue),Y(!1))}),[Q,ue]),(0,l.useEffect)((()=>{if(Q.isSuccess&&K){var e;if(401===(null===(e=Q.data)||void 0===e?void 0:e.status))ue.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:Q.data.code}}),description:l.createElement("div",{dangerouslySetInnerHTML:{__html:Q.data.message}}),placement:"bottomRight"});else if(Q.data){let e=document.createElement("A");e.setAttribute("target","_blank"),e.setAttribute("href",Q.data.message),e.click()}Y(!1)}}),[Q,K,ue]);const[Be,Te]=(0,l.useState)(!1),Re=()=>{U({operation:N.Ru.SANDBOX_LOCK_EDIT,data:ie}),G((0,S.mi)(!ie))},Ne=q?te:ae;let Le=[];const Pe=(0,l.useCallback)((async()=>{const e=await Ee.fire({project:we,id:q});!1!==e.find((e=>!1===e||"string"===typeof e))&&window.open(e.find((e=>e))||`/email/${q}/raw?key=${E()(`${we}${q}${N.KI}`)}`)}),[Ee,we,q]),Ie=(0,l.useCallback)((async()=>{window.open(`/getemail/${q}?secret_hash=${E()(`${we}${q}${N.KI}`)}&raw=true`)}),[we,q]);ge.previewModeEnabled&&Le.push({key:"Preview_mode",icon:l.createElement(y.A,{icon:"EyeOutlined",style:{fontSize:16}}),label:W("Preview mode"),onClick:Pe}),ge.livePreviewEnabled&&Le.push({key:"Live_preview",icon:K?l.createElement(u.A,{style:{fontSize:16}}):l.createElement(y.A,{icon:"CheckCircleOutlined",style:{fontSize:16}}),label:W("Live preview"),onClick:(null===(h=ee.id)||void 0===h?void 0:h.toString())===(null===(z=e.project_author)||void 0===z?void 0:z.toString())&&"community"===ee.subscription.post_name&&le?xe:()=>{if(!K){const t={email:q,subject:encodeURIComponent("#"+e.project+" "+e.title).replaceAll(/%20/gi,"+").replaceAll(/%0A/gi,"%0D%0A"),content:encodeURIComponent((null===oe||void 0===oe?void 0:oe.getValue())||"").replaceAll(/%20/gi,"+").replaceAll(/%0A/gi,"%0D%0A")};$(t),Y(!0)}}}),ge.webversionEnabled&&Le.push({key:"Web version",icon:l.createElement(y.A,{icon:"Web",style:{fontSize:16}}),label:W("Web version"),onClick:Ie}),ge.sharePreviewEnabled&&Le.push({key:"Share",icon:l.createElement(y.A,{icon:"ShareAltOutlined",style:{fontSize:16}}),label:W("Share"),onClick:async()=>{const e=(await he.fire({project:we,id:q})).find((e=>!1===e||"string"===typeof e));!1!==e&&navigator.clipboard.writeText(e||`https://app.emailmaker.ru/email/${q}/raw?key=${E()(`${we}${q}${N.KI}`)}`).then((()=>{(0,I.wB)(W("A shareable link to this page has been copied to the clipboard."),ue)}))},className:"em-analytics__email-share"});const Me=[{key:"Left_mode",icon:l.createElement(y.A,{icon:"PanelLeft",style:{fontSize:"20px",color:"left"===de&&se?me.colorPrimary:"inherit"}}),label:W("Left Code panel"),onClick:()=>ke("left")},{key:"Right_mode",icon:l.createElement(y.A,{icon:"PanelLeft",style:{fontSize:"20px",transform:"rotate(180deg)",color:"right"===de&&se?me.colorPrimary:"inherit"}}),label:W("Right Code panel"),onClick:()=>ke("right")},{key:"Bottom_mode",icon:l.createElement(y.A,{icon:"PanelLeft",style:{fontSize:"20px",transform:"rotate(-90deg)",color:"bottom"===de&&se?me.colorPrimary:"inherit"}}),label:W("Bottom Code panel"),onClick:()=>ke("bottom")}];return l.createElement("div",{className:"email-preview-menu email-preview-menu_new"},l.createElement(r.A,{size:32},l.createElement(r.A,{size:8,style:{borderRadius:"calc(var(--borderRadius) * 1px"}},l.createElement(i.A,{title:W(t?L.LJ:"Undo (Ctrl+Z)"),placement:"bottom"},l.createElement(s.Ay,{type:"text",icon:l.createElement(y.A,{icon:"UndoOutlined",style:{fontSize:20}}),onClick:()=>{ne.undo()},disabled:!re.canUndo})),l.createElement(i.A,{title:W(t?L.LJ:"Redo (Ctrl+Shift+Z)"),placement:"bottom"},l.createElement(s.Ay,{type:"text",icon:l.createElement(y.A,{icon:"RedoOutlined",style:{fontSize:20}}),onClick:()=>{ne.redo()},disabled:!re.canRedo})),ge.historyEnabled&&l.createElement(i.A,{title:W("Version history"),placement:"bottom"},l.createElement(s.Ay,{type:ie?"text":"primary",ghost:!ie,onClick:()=>{ie?(Te(!0),Ne({[Se]:null===e||void 0===e?void 0:e.id}).then((e=>{e.isSuccess?0===e.data.data.length&&ue.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:W("No history records available.")}}),placement:"bottomRight"}):e.isError&&(0,I.p6)(e,ue),Re(),G((0,S.PM)(N.Vv)),Te(!1),Ce&&(ve(!0),Ae(4))}))):(G((0,S.Fk)()),Re())},disabled:e.isNew||Be,className:"email-preview-menu__history",icon:Be?l.createElement(d.A,{indicator:H}):l.createElement(l.Fragment,null,l.createElement(y.A,{icon:"HistoryOutlined",style:{fontSize:20},className:"email-preview-menu__list-item-icon email-preview-menu__list-item-icon_revert"}),Ce&&l.createElement(y.A,{icon:"Lock",className:"free-mode-firewall-icon"}))}))),l.createElement(r.A,{size:8,style:{borderRadius:"calc(var(--borderRadius) * 1px"}},ge.codeEnabled&&l.createElement(m.A,{arrow:!0,key:"Code mode",placement:"bottom",menu:{items:Me},trigger:"hover",mouseEnterDelay:0},l.createElement(s.Ay,{type:se?"primary":"text",ghost:se,icon:l.createElement(l.Fragment,null,l.createElement(y.A,{icon:"Code",style:{fontSize:20}}),Ce&&l.createElement(y.A,{icon:"Lock",className:"free-mode-firewall-icon"})),onClick:ke})),ge.previewIconEnabled&&l.createElement(m.A,{arrow:!0,key:"Preview",placement:"bottom",menu:{items:Le}},l.createElement(s.Ay,{type:"text",target:"_blank",rel:"noreferrer",icon:ge.previewModeEnabled?l.createElement("span",{onClick:Pe,style:{fontSize:"18px",color:me.colorText}},l.createElement(y.A,{icon:"EyeOutlined",style:{fontSize:20},className:"email-preview-menu__list-item-icon"})):l.createElement(y.A,{icon:"EyeOutlined",style:{fontSize:20},className:"email-preview-menu__list-item-icon"}),disabled:!re.canUndo})),ge.sendTestEnabled&&l.createElement(i.A,{title:W("Send a test email"),placement:"bottom"},l.createElement(s.Ay,{className:"em-analytics__email-open-test",type:"text",icon:l.createElement(y.A,{icon:"SendOutlined",style:{fontSize:20}}),onClick:()=>{G((0,_.qf)(N.lx.SEND_TEST_EMAIL))}})))),l.createElement(v.A,{isModalVisible:X===N.lx.SEND_TEST_EMAIL,email:e}),l.createElement(A.A,{open:fe,onCancel:()=>{ie||(Re(),G((0,S.Fk)())),se&&G((0,S.vs)()),ve(!1)},initialSlide:ye}))}},47091:(e,t,a)=>{"use strict";a.d(t,{A:()=>me});var l=a(98173),o=a(40120),n=a(71446),r=a(49856),i=a(67034),s=a(38927),d=a(10423),m=a(71832),c=a(59010),u=a(38976),p=a(83991),g=a(73477),b=a(40186),h=a(78446),E=a(10267),f=a(82648),v=a(47214),y=a(6969),A=a(35076),_=a(38256),C=a(71879),S=a(83612),w=a(79245),k=a(30150),x=a(2604),B=(a(65053),a(47638)),T=a(26298),R=a.n(T),N=a(45271),L=a(50209),P=a(37969),I=a(52218),M=a.n(I),O=a(40277),V=a(96734),F=a(89613),D=a(12543),H=a(32947);const{useToken:j}=o.A,z=({element:e,setSearchFilters:t=(e,t)=>{}})=>{var a;const{projectId:o}=(0,k.g)(),n=(0,k.Zp)(),s=(0,V.p)(),{token:m}=j(),{__:c}=(0,D.s9)(),u=e.type?H.IE:H.Tm,p=`/projects/${o}/emails/new`,g=(0,F.u)(),b=(0,l.useRef)(null);return l.createElement(d.A,{className:`element-card element-card_${u} element-card_template`,hoverable:!0,id:e.id,style:{cursor:"pointer"},"data-testid":e.id,cover:l.createElement(l.Fragment,null,l.createElement("div",{ref:b,className:"element-card__img-wrapper"},l.createElement("img",{className:"element-card__img",alt:e.title,src:((e,t=o,a)=>`https://scr.emcdn.ru/screenshot?delay=1000&width=800&fullPage=true&deviceScaleFactor=0.8&format=jpg&force=false${a?`&cacheControl=true&cache-hash=${M()(a)}`:""}&url=${encodeURIComponent(`https://app.emailmaker.ru/get${u}/${e}?secret_hash=${M()(`${t}${e}${H.KI}`)}&raw=true`)}`)(e.id,e.project,e.modified),onMouseMove:e=>(0,O.Hy)(e,b.current),onMouseLeave:O.Tr})),e.is_template&&e.project===+o&&l.createElement("div",{className:"element-card__is-template-wrapper"},c("Template")),(0,O._q)(e,H.zh).length&&l.createElement("div",{className:"element-card__tags-wrapper"},l.createElement(r.A,{wrap:!0,size:8},null===(a=(0,O._q)(e,H.zh))||void 0===a?void 0:a.map((e=>l.createElement(i.A,{bordered:!1,color:m.colorPrimary,style:{borderRadius:6},key:e.id,onClick:()=>t(null,e.id)},e.name)))))),onClick:()=>{return t=e.id,g({event:"select",action:"create_new_email",template_id:t,description:"Create new email from template"}),s.set(H.A9.em_new_email,t),void(0,O.XZ)(n,p);var t}},l.createElement("div",null,l.createElement(P.Ay,{type:"link",className:"element-card__title"},(0,O.ln)(e.title))))};var W=a(56605),G=a(8807),U=a(27499),q=a(48753),Z=a(8218),X=a(23424);const K="description",Y=()=>{const{__:e}=(0,D.s9)(),t=(0,x.wA)(),[a]=U.A.useForm(),o=(0,l.useRef)(null),n=(0,x.d4)(X.cL)===H.lx.ADD_NEW_AI_EMAIL,r=(0,V.p)(),i=(0,k.Zp)(),{projectId:s}=(0,k.g)(),d=(0,l.useCallback)((()=>{a.resetFields(),setTimeout((()=>{var e;return null===(e=o.current)||void 0===e?void 0:e.focus()}),0)}),[a]);(0,l.useEffect)((()=>{n&&d()}),[n,d]);const m=()=>t((0,X.Oo)()),c=()=>{const e=`/projects/${s}/emails/new`,t=String(278056);r.set(H.A9.em_new_email,t),a.validateFields().then((({description:t})=>{window.localStorage.setItem(H.V0.em_active_tab,H.z$),window.localStorage.setItem(H.V0.em_ai_settings,t),(0,O.XZ)(i,e),m()}))};return l.createElement(q.A,{title:l.createElement(l.Fragment,null,l.createElement("span",null,e("I'd be happy to create an email for you! ")),l.createElement("p",null,e("Start with a detailed description of your email."))),open:n,onOk:c,onCancel:m,className:"new-folder-modal",centered:!0,footer:[l.createElement(P.Ay,{key:"submit",type:"primary",size:"large",onClick:c},e("Generate Email"))]},l.createElement(U.A,{form:a,layout:"vertical",name:"add_new_folder_form",onFinish:c,initialValues:{[K]:""},autoComplete:"off",style:{paddingTop:10}},l.createElement(U.A.Item,{name:K,rules:[{required:!0,message:e("Please enter the description")}]},l.createElement(Z.A,{size:"large",placeholder:e("Please enter the description"),ref:o,style:{marginBottom:5}}))))};var $=a(98845),Q=a(92960),J=a(40835),ee=a(79253),te=a(1047),ae=a(84572),le=a(47014),oe=a(80223),ne=a(71854),re=a(23928),ie=a(64909);const{useToken:se}=o.A,de=(e,t)=>`${e.pathname}/${t.id}`,me=({projectId:e,emailsView:t,createPage:a=!1,currentFolderId:o,foldersList:T,refetchProjectFolders:P,projectTags:I=[],activeTagId:M,setActiveTagHandler:j,projectEmailsCounter:U=0,registerFunction:q=()=>{},groupType:Z=null})=>{var K,me,ce,ue,pe,ge,be,he;const{__:Ee,_x:fe}=(0,D.s9)(),ve=(0,x.wA)(),ye=(0,x.d4)(ee.MY),Ae=(0,x.d4)(ee.aO),_e=(0,x.d4)(ae.RP),Ce=(0,x.d4)(ae.AQ),Se=(0,x.d4)(ae.qV),we=(0,x.d4)(le.C1),ke=(0,x.d4)(ee.NP),xe=(0,x.d4)(ee.qM),Be=(0,x.d4)(ee.ux),Te=(0,x.d4)(te.CT),Re=(0,x.d4)(ae.GD),Ne=(0,x.d4)(ae.Rw),[Le,Pe]=(0,w.ok)(),Ie=(0,V.p)(),Me=(0,ie.hN)(),{owner:Oe,admin:Ve}=(0,oe.A)();let Fe=(0,k.zy)();const De=(0,k.Zp)(),{token:He}=se(),{modal:je}=n.A.useApp(),ze=(0,x.Pj)(),{confirm:We}=je,Ge=(0,F.u)(),Ue=[...Re,...Ne],[qe,Ze]=(0,l.useState)(null);(0,l.useEffect)((()=>{Z===H.ti.ALL?Ze(_e+Ce):Z===H.ti.PROJECT?Ze(Ce):Z===H.ti.STANDARD&&Ze(_e)}),[Z,_e,Ce]);const Xe=+Le.get("page"),Ke=Le.get("folder"),Ye=+Le.get("tag"),[$e,Qe]=(0,$.Kh)(),[Je]=(0,$._3)(),[et]=(0,$.dN)(),{refetch:tt}=(0,k.KC)(),[at,lt]=(0,l.useState)(!1),ot=`/projects/${e}/emails/new`,nt=o&&o===H.UW,rt=o===H.y2&&!Ye;(0,l.useEffect)((()=>{ve((0,ee.FC)())}),[ve]);const[it,st]=(0,l.useState)({projectId:e,page:rt?Xe:1,pageSize:H.mU,notEmbed:!0,tags:null,folderTag:null}),{isLoading:dt,isSuccess:mt,isError:ct,isFetching:ut,refetch:pt,error:gt}=(0,$.Xw)({...it,folderTag:null,tags:null,status:"main"},{skip:a||!(null===(K=it.name)||void 0===K||!K.length)&&o!==H.y2}),[bt,ht]=(0,l.useState)({page:Xe||1,pageSize:H.mU,folderTag:null,tags:[],groupType:Z}),{isLoading:Et,isSuccess:ft,isError:vt,isFetching:yt,data:At=[],refetch:_t,error:Ct}=(0,$.PX)({...bt,groupType:Z},{skip:!a||(Math.ceil(_e+Ce/H.mU)||1)<bt.page||Z===H.ti.PROJECT}),{isLoading:St,isSuccess:wt,isError:kt,isFetching:xt,data:Bt=[],refetch:Tt,error:Rt}=(0,$.PX)({...bt,projectId:e,groupType:Z},{skip:!a||(Math.ceil(Ce/H.mU)||1)<bt.page||Z===H.ti.STANDARD}),Nt=(e,t)=>Z===H.ti.ALL?e||t:Z===H.ti.PROJECT?t:e,Lt=Nt(Et,St),Pt=Nt(ft,wt),It=Nt(vt,kt),Mt=Nt(yt,xt),Ot=Nt(_t,Tt),Vt=Nt(Ct,Rt),[Ft,Dt]=(0,l.useState)({projectId:e,page:1,pageSize:H.mU,notEmbed:!0,tags:Ye&&[Ye],folderTag:o}),{isLoading:Ht,isSuccess:jt,isError:zt,isFetching:Wt,error:Gt,refetch:Ut}=(0,$.Xw)({...Ft,tags:o&&Ft.folderTag?null:Ft.tags,status:"custom"},{skip:a||nt||o===H.y2||Ft.folderTag!==o||!(null===(me=Ft.name)||void 0===me||!me.length)&&(nt||o===H.y2)}),[qt,Zt]=(0,l.useState)({projectId:e,page:nt?Xe:1,pageSize:H.mU,notEmbed:!0,tags:Ye&&[Ye],folderTag:null,status:"trash"}),[Xt,Kt]=(0,l.useState)(!1),{isLoading:Yt,isSuccess:$t,isError:Qt,isFetching:Jt,data:ea,refetch:ta,error:aa}=(0,$.Xw)({...qt,status:"trash",folderTag:null,page:Xt?qt.page:1},{skip:a||(Math.ceil(Ae/H.mU)||1)<qt.page||!(null===(ce=qt.name)||void 0===ce||!ce.length)&&!nt||!(null===(ue=qt.tags)||void 0===ue||!ue[0])&&Be>0});(0,l.useEffect)((()=>{Kt(!!ea||Math.ceil(Ae/H.mU)>=qt.page)}),[ea,qt.page,Ae]);let la=[];Z!==H.ti.STANDARD&&Bt&&Se>=bt.page&&la.unshift(...Bt),Z!==H.ti.PROJECT&&At&&(la.push(...At),la=la.slice(0,H.mU));const oa=a?bt:nt?qt:rt?it:Ft,na=a?Pt:nt?$t:rt?mt:jt,ra=a?Lt:nt?Yt:rt?dt:Ht,ia=a?It:nt?Qt:rt?ct:zt,sa=a?Mt:nt?Jt:rt?ut:Wt,da=a?Ot:nt?ta:rt?pt:Ut,ma=a?Vt:nt?aa:rt?gt:Gt,ca=(a?qe:nt?Ae:rt?ye:null===ke||void 0===ke||null===(pe=ke[o||(null===(ge=Ft.tags)||void 0===ge?void 0:ge[0])])||void 0===pe?void 0:pe.total)||0,ua=a?la:nt?Be:rt?xe:null===ke||void 0===ke||null===(be=ke[o||(null===(he=Ft.tags)||void 0===he?void 0:he[0])])||void 0===be?void 0:be.list;(0,l.useEffect)((()=>{na&&da&&q(da)}),[q,da,na]);const pa=(0,l.useCallback)((e=>{a?ht((t=>({...t,...e}))):nt?Zt((t=>({...t,...e}))):rt?st((t=>({...t,...e}))):Dt((t=>({...t,...e})))}),[a,nt,rt]);(0,l.useEffect)((()=>{var e;"rest_post_invalid_page_number"===(null===ma||void 0===ma||null===(e=ma.data)||void 0===e?void 0:e.code)&&pa({page:1})}),[ma,pa]),(0,l.useEffect)((()=>{if(!a){(Ke&&Ke!==o||M&&Ye!==M)&&pa({folderTag:o,page:1});let e={page:Ke===o&&oa.page?oa.page:1};o&&!Ye&&(e.folder=o),M&&(e.tag=M),Pe(e,{replace:!0})}}),[oa.page,De,a,Ke,o,M,Ye,pa,Pe]);const ga=e=>{We({maskClosable:!0,centered:!0,title:fe(nt?"Are you sure to irrevocably delete \u201c":"Are you sure to delete \u201c","email")+e.title+Ee("\u201d email?"),icon:l.createElement(b.A,{style:{color:"#ff4d4f"}}),okText:Ee("Yes"),cancelText:Ee("No"),onOk:()=>(e=>ze.dispatch($.GY.endpoints.deleteEmail.initiate({id:e.id,force:nt})).then((e=>{e.error?(0,O.p6)(e,Me):e.data&&((0,O.wB)(Ee("The email \u201c")+e.data.title+fe("\u201d was successfully removed.","email"),Me),da(),P(),ta(),nt&&tt())})))(e)})},ba=e=>{lt(!0),et({emailId:null===e||void 0===e?void 0:e.id,status:"publish"}).then((t=>{t.error?Me.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:t.error.data.code}}),description:l.createElement("div",{dangerouslySetInnerHTML:{__html:t.error.data.message}}),placement:"bottomRight"}):(e.folder[0]?da():pt(),P(),ta(),Me.success({message:Ee("The email \u201c")+e.title+fe("\u201d was successfully recovered.","recovery"),placement:"bottomRight"})),lt(!1)}))},ha=e=>{lt(!0),Je(null===e||void 0===e?void 0:e.id).then((t=>{var a,o,n,r,i;const s=t.data;$e({title:(0,O.fq)(s.title),project:s.project,subject:s.subject,description:s.description,html:(0,O.el)(s.html||"",s.title),parent_email:s.parent_email||H.iU,common_styles:s.common_styles||"",utm_parameters:{utm_source:null===(a=s.utm_parameters)||void 0===a?void 0:a.utm_source,utm_medium:null===(o=s.utm_parameters)||void 0===o?void 0:o.utm_medium,utm_campaign:null===(n=s.utm_parameters)||void 0===n?void 0:n.utm_campaign,utm_term:null===(r=s.utm_parameters)||void 0===r?void 0:r.utm_term,utm_content:null===(i=s.utm_parameters)||void 0===i?void 0:i.utm_content},emailtags:e.emailtags,folder:s.folder}).then((t=>{var a;t.error?Me.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:t.error.data.code}}),description:l.createElement("div",{dangerouslySetInnerHTML:{__html:t.error.data.message}}),placement:"bottomRight"}):(null!==(a=s.folder)&&void 0!==a&&a[0]?Ut():pt(),P(),Me.success({message:Ee("The copy of email \u201c")+e.title+fe("\u201d was successfully created.","copy"),placement:"bottomRight"}));lt(!1)}))}))},Ea=(e,t)=>{et({emailId:t.id,folder:e.key===H.y2?[]:[e.key]}).then((e=>{var a,l;(null===e||void 0===e||null===(a=e.data)||void 0===a?void 0:a.folder[0])&&ve($.GY.endpoints.getEmails.initiate({...oa,folderTag:(null===e||void 0===e||null===(l=e.data)||void 0===l?void 0:l.folder[0])||null})),o!==H.y2&&(ve((0,ee.X)({folder:o,emailId:t.id})),ve($.GY.endpoints.getEmails.initiate({...oa,folderTag:o||null}))),pt(),P()})).catch((e=>{}))},fa=[{width:"40%",title:fe("Email","letter"),dataIndex:["title"],render:(e,t,a)=>l.createElement(w.N_,{to:nt?"":de(Fe,t),style:{cursor:nt?"default":"pointer"}},e)},{width:"20%",title:Ee("Tags"),dataIndex:["emailtags"],render:(e,t,a)=>l.createElement(r.A,{wrap:!0,size:8},e&&e.map((e=>{const t=null===I||void 0===I?void 0:I.find((t=>{var a;return(null===(a=t.id)||void 0===a?void 0:a.toString())===(null===e||void 0===e?void 0:e.toString())}));return t&&l.createElement(i.A,{color:He.colorPrimary,style:{cursor:"pointer",borderRadius:6,marginRight:0},key:t.id,onClick:()=>j(null,t.id)},t.name)||null})))},{width:"3%",title:"",dataIndex:"lock",render:(e,t,a)=>{var o,n;return e&&l.createElement(h.A,{className:R()("lock-icon",{"lock-icon__disabled":!(Oe||Ve||(null===(o=we.id)||void 0===o?void 0:o.toString())===(null===(n=t.author)||void 0===n?void 0:n.toString()))})})}},{width:"16%",title:Ee("Creator"),dataIndex:["_embedded","author"],render:(e,t,a)=>{var l;return(null===e||void 0===e||null===(l=e[0])||void 0===l?void 0:l.name)||""}},{width:"9%",title:Ee("Created"),className:"nobr",dataIndex:"date",render:(e,t,a)=>(0,O.Yq)((0,S.A)(e),Ee),sorter:!0,sortOrder:(0,O.Np)(oa.order)},{width:"3%",title:"",dataIndex:"",key:"x",onCell:()=>({style:{padding:0}}),render:(e,t)=>{var a,o,n,r,i,d,m,c;const u=t.folder[0]||null,p={icon:l.createElement(E.A,{style:{fontSize:18}}),label:Ee("New emails"),key:H.y2,onClick:e=>Ea(e,t)},g=null===T||void 0===T?void 0:T.map((e=>({icon:l.createElement(f.A,{style:{fontSize:18}}),label:e.name,key:e.id,className:e.id,onClick:e=>Ea(e,t)}))),S=(null===g||void 0===g?void 0:g.filter((e=>!u||e.key!==u)))||[];u&&(null===S||void 0===S||S.unshift(p));let k=[];return(Oe||Ve||(null===(a=we.id)||void 0===a?void 0:a.toString())===(null===(o=t.author)||void 0===o?void 0:o.toString()))&&!nt&&k.push({label:l.createElement(N.A,{key:"Lock",element:t}),icon:t.lock?l.createElement(v.A,{style:{fontSize:"16px"}}):l.createElement(h.A,{style:{fontSize:"16px"}})}),(Oe||Ve||(null===(n=we.id)||void 0===n?void 0:n.toString())===(null===(r=t.author)||void 0===r?void 0:r.toString()))&&!nt&&S.length>0&&k.push({label:Ee("Transfer to folder"),icon:l.createElement(f.A,{style:{fontSize:"16px"}}),children:S}),!nt&&k.push({label:l.createElement(w.N_,{to:de(Fe,t)},Ee("Edit")),icon:l.createElement(y.A,{style:{fontSize:"16px"}}),key:"Enter",className:"em-analytics__email-enter"},{label:Ee("Clone"),key:"Clone",icon:l.createElement(A.A,{style:{fontSize:"16px"}}),className:"em-analytics__email-clone",disabled:Qe.isLoading,onClick:()=>ha(t)}),(Oe||Ve||(null===(i=we.id)||void 0===i?void 0:i.toString())===(null===(d=t.author)||void 0===d?void 0:d.toString()))&&nt&&k.push({label:Ee("Recover"),icon:l.createElement(_.A,{style:{fontSize:"16px"}}),key:"Recover",onClick:()=>ba(t)}),(Oe||Ve||(null===(m=we.id)||void 0===m?void 0:m.toString())===(null===(c=t.author)||void 0===c?void 0:c.toString()))&&k.push({label:Ee("Remove"),icon:l.createElement(b.A,{style:{fontSize:"16px"}}),key:"Remove",className:"em-analytics__email-remove",style:{color:"#ff4d4f"},onClick:()=>ga(t)}),l.createElement(s.A,{arrow:"true",placement:"bottom",menu:{items:k},trigger:["hover"]},l.createElement("span",{className:"projects-table__actions"},l.createElement(C.A,null)))}}],[va,ya]=(0,l.useState)(!1);(0,l.useEffect)((()=>{var e,t;for(let a in Te)if(a||""===a||0===a.length){ya(!0),pa({...Te,folderTag:o,page:1});break}(null!==(e=Te.tags)&&void 0!==e&&e.length||Te.name)&&pa({...Te,folderTag:o,page:1}),null!==(t=Te.group)&&void 0!==t&&t.length&&ht({...Te,group:Te.group,page:1,pageSize:H.mU})}),[Te,ve,o,nt,pa,a]);const[Aa,_a]=(0,l.useState)(!1),[Ca]=(0,Q.mI)(),[Sa]=(0,J.dS)(),{data:wa}=(0,k.KC)(),ka=async e=>{const t=e[0];try{_a(!0);const e=await(0,ne.q2)(t,(async(e,t)=>{try{const a=await(0,ne.zn)(e,Ca);if(!a)return"string"===typeof e?e:"";const l=(0,ne.Qm)(t,a.type,B),o=new File([a],l.toLowerCase()),n=await Sa({user_id:we.id,folder:wa.id,file:o});return(0,ne.$K)(n,e)}catch(gt){return"string"===typeof e?e:""}}),(e=>{e.title=e.title||(0,re.Ay)(t.name)[0]})),[a]=(0,re.Ay)(t.name),o=(0,O.ez)(e)||a||"";return $e({title:o,project:wa.id,subject:o,description:"",html:e,parent_email:H.iU,folder:[]}).then((e=>{e&&(e.error?Me.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:e.error.data.code}}),description:l.createElement("div",{dangerouslySetInnerHTML:{__html:e.error.data.message}}),placement:"bottomRight"}):(De(`/projects/${wa.id}/emails/${e.data.id}`),Ge({event:"upload_file",action:"import_email"})))})).finally((()=>_a(!1)))}catch(a){_a(!1);const e=a instanceof Error?a.message:a;Me.error({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:e}}),placement:"bottomRight"})}};return l.createElement("div",{className:"project-page__list"},a&&l.createElement("div",{className:"project-page__cards-grid create-buttons"},l.createElement(d.A,{className:"element-card element-card_email element-card_template element-card_template-empty",hoverable:!0,style:{cursor:"pointer"},cover:l.createElement("div",{className:"element-card__empty-template"},l.createElement(G.A,{icon:"NewEmail"}),l.createElement("div",{className:"element-card__empty-template__text"},l.createElement("div",{className:"element-card__empty-template__title"},Ee("Blank template")),l.createElement("div",{className:"element-card__empty-template__description"},Ee("Start from scratch")))),onClick:()=>{return e=278056,Ge({event:"select",action:"create_new_email",template_id:"0",description:"Create new email from scratch (template = 0)"}),Ie.set(H.A9.em_new_email,e),t&&(window.localStorage.setItem(H.V0.em_active_tab,t),window.localStorage.setItem(H.V0.em_ai_settings,t)),void(0,O.XZ)(De,ot);var e,t}}),l.createElement(d.A,{className:"element-card element-card_email element-card_template element-card_template-empty",hoverable:!0,style:{cursor:"pointer"},loading:Aa,cover:l.createElement("div",{className:"element-card__empty-template"},l.createElement(G.A,{icon:"Import"}),l.createElement("div",{className:"element-card__empty-template__text"},l.createElement("div",{className:"element-card__empty-template__title"},Ee("Import email")),l.createElement("div",{className:"element-card__empty-template__description"},Ee("Work with your markup"))," ")),onClick:()=>{Ge({event:"click",action:"import_email"}),(0,ne.QM)("application/zip, message/rfc822, text/html",ka)}}),l.createElement(d.A,{className:"element-card element-card_email element-card_template element-card_template-empty",hoverable:!0,style:{cursor:"pointer"},cover:l.createElement("div",{className:"element-card__empty-template"},l.createElement(G.A,{icon:"generationAI"}),l.createElement("div",{className:"element-card__empty-template__text"},l.createElement("div",{className:"element-card__empty-template__title"},Ee("AI email generation")),l.createElement("div",{className:"element-card__empty-template__description"},Ee("Creating an email on request")," "))),onClick:()=>ve((0,X.qf)(H.lx.ADD_NEW_AI_EMAIL))})),a&&(!!qe||!!Ue.length)&&l.createElement("div",{className:"element-card__group-tag-wrapper"},l.createElement(m.A,{gap:"10px",style:{marginBottom:15,marginLeft:4},wrap:!0},Ue.map((e=>l.createElement(i.A,{className:"blue-color element-card__group-tag",key:e.key,color:"#1677ff"},e.name," ",l.createElement(G.A,{onClick:()=>{const t=Ue.filter((t=>t.key!==e.key));ve(Re.length?(0,ae.es)(t):(0,ae.BN)(t)),ve((0,te.ry)({[Re.length?"group":"projectGroup"]:t,[Re.length?"projectGroup":"group"]:[]}))},icon:"CloseTag"})))),Ue.length>1&&l.createElement(i.A,{className:"blue-color element-card__group-tag element-card__group-tag_close"},Ee("Clear all")," ",l.createElement(G.A,{onClick:()=>{ve((0,ae.mb)()),ve((0,te.ry)({group:[],projectGroup:[]}))},icon:"CloseAll"})))),ra&&!(null!==ua&&void 0!==ua&&ua.length)&&l.createElement(c.A,{active:!0}),ia&&l.createElement(u.A,{message:Ee("Error"),description:Ee("Error when receiving data. Try again (reload page) or contact support."),type:"error",showIcon:!0}),!ra&&!sa&&0===(null===ua||void 0===ua?void 0:ua.length)&&(va||U>0?l.createElement(u.A,{message:Ee("Emails not found"),description:"",type:"info",showIcon:!0}):o!==H.y2?l.createElement(u.A,{message:Ee("You don't have any emails in this folder."),description:Ee("Add your first email to the folder..."),type:"info",showIcon:!0}):l.createElement(u.A,{message:Ee("You don't have any emails yet."),description:Ee("Add your first email by clicking the Create a new email button."),type:"info",showIcon:!0})),(null===ua||void 0===ua?void 0:ua.length)>0&&t===H.rl&&l.createElement(p.A,{rowKey:e=>e.id,bordered:!0,dataSource:ua,columns:fa,loading:sa||at,onChange:(e,t,{order:a,field:l},{action:o})=>{"sort"===o&&pa(a?{page:oa.page||1,order:(0,O.gq)(a),orderby:l,pageSize:H.mU}:{page:oa.page||1,pageSize:H.mU})},showSizeChanger:!1,pageSize:H.mU,pagination:{current:oa.page||1,total:ca,hideOnSinglePage:!0,showSizeChanger:!1,pageSize:H.mU,position:["bottomLeft"],onChange:(t,a)=>pa({projectId:e,page:t,pageSize:a})}}),((null===ua||void 0===ua?void 0:ua.length)>0||na)&&t===H.Y$&&l.createElement(l.Fragment,null,(sa||at||Aa)&&l.createElement("div",{className:"project-page__loader"},l.createElement(W.A,{small:!0})),l.createElement("div",{className:"project-page__cards-grid"},ua&&ua.map((e=>a?l.createElement(z,{key:e.id,element:e,setSearchFilters:j}):l.createElement(L.A,{key:e.id,element:e,setSearchFilters:j,isTrash:nt,foldersList:T,refetch:pt,projectTags:I,foldersHandlers:{handleRemove:ga,handleRecover:ba,handleClone:ha,handlerChangeFolder:Ea}})))),l.createElement(g.A,{current:oa.page||1,total:ca,hideOnSinglePage:!0,showSizeChanger:!1,pageSize:H.mU,onChange:(e,t)=>pa({page:e,pageSize:t})})),l.createElement(Y,null))}},35895:(e,t,a)=>{"use strict";a.d(t,{A:()=>y});var l=a(98173),o=a(84893),n=a(26298),r=a.n(n),i=a(40120),s=a(49856),d=a(37969),m=a(2604),c=a(71446),u=a(94160),p=a(47014),g=a(8807),b=a(40277),h=a(12543);const E=()=>{const{__:e}=(0,h.s9)(),{notification:t}=c.A.useApp(),a=(0,m.d4)(p.C1),[o]=(0,u.C)(),[n,r]=(0,l.useState)(!1);(0,l.useEffect)((()=>{a.hasOwnProperty("email_confirmation")&&r(a.email_confirmation)}),[a,n]);return null!==a&&void 0!==a&&a.email_confirmation||null===a||void 0===a||!a.privacy_policy_agreement?null:l.createElement("div",{className:"main__ribbon"},l.createElement("span",null,l.createElement(g.A,{icon:"EmailConfirmation",style:{fontSize:20,position:"relative",top:2}})," ",e("Confirmation email was sent to"),"\xa0",l.createElement("em",null,a.email),".\xa0",e("Didn't receive an email?"),"\xa0",l.createElement(d.Ay,{type:"primary",size:"small",style:{fontSize:16,lineHeight:1},onClick:()=>{o({userId:a.id,email:a.email}).then((({data:l,error:o})=>{l?(0,b.wB)(e("Confirmation email has been sent to {confirmedEmail}.").replace("{confirmedEmail}",a.email),t):o&&(0,b.p6)(o,t)}))}},e("Resend")," ",l.createElement(g.A,{icon:"SendOutlined",style:{verticalAlign:"middle"}}))))};var f=a(27941);const{useToken:v}=i.A,y=({className:e,leftBlock:t,rightBlock:a,isHeaderCodeMenuOpen:n=!1})=>{const{token:i}=v(),d=(0,l.useRef)(),m=(0,f.rD)();return l.createElement(l.Fragment,null,l.createElement(E,null),m.headerShow&&l.createElement("header",{className:r()("header",{[e]:e}),style:{borderColor:i.colorBorder}},!n&&l.createElement(o.A,{nodeRef:d,in:!n,timeout:300,classNames:"transition"},l.createElement("div",{className:"header__container container"},l.createElement("div",{className:"header__left",style:{flexGrow:1}},t),l.createElement("div",{className:"header__right"},l.createElement(s.A,{size:10},a))))))}},47908:(e,t,a)=>{"use strict";a.d(t,{A:()=>Ce});var l=a(98173),o=a(30150),n=a(47555),r=a(40120),i=a(64909),s=a(86406),d=a(77073),m=a(91321),c=a(2604),u=a(26298),p=a.n(u),g=a(37969),b=a(93771),h=a(79245),E=a(12543),f=a(16238),v=a(76428),y=a(58316),A=a(87690),_=a(62296),C=a(1549),S=a(95331),w=a(10267),k=a(6311),x=a(70178),B=a(51070),T=a(85758),R=a(27352),N=a(23424),L=a(84572),P=a(47014),I=a(78915),M=a(40277),O=a(96734),V=a(32947);const F=({isMenuCollapsed:e,setIsMenuCollapsed:t,isLocked:a})=>{var n;const{__:r}=(0,E.s9)();let i=(0,c.wA)(),s=(0,o.Zp)();const{projectId:d}=(0,o.g)(),{pathname:m}=(0,o.zy)(),[u,F]=(0,l.useState)(""),D=(0,c.d4)(L.yN),H=(0,c.d4)(P.C1),j=(0,O.p)(),z=(0,l.useCallback)((()=>{m.includes("blocks")?F("Blocks"):m.includes("emails")?F("Emails"):m.includes("members")&&F("Members"),!a&&t(!0)}),[m,t,a]);(0,l.useEffect)((()=>{z()}),[z]);let W=[],G=[];const U=(null===D||void 0===D?void 0:D.title)||"";let q=[{label:l.createElement("a",{href:"https://emailmaker.ru/help/",target:"_blank",rel:"noopener noreferrer"},r("Help")),key:"Help center",icon:l.createElement(f.A,{style:{fontSize:"16px"}}),className:"help-center"},{label:r("Chat support"),key:"Support chat",icon:l.createElement(v.A,{style:{fontSize:"16px"}}),className:"open-support-chat",onClick:()=>{try{window.carrotquest.open()}catch(e){}}}],Z=[{label:r("Account settings"),key:"Account settings",icon:l.createElement(y.A,{style:{fontSize:"16px"}}),className:"em-analytics__account-settings",onClick:()=>{i((0,N.qf)(V.lx.EDIT_PROFILE_MODAL)),!a&&t(!0)}},{label:l.createElement(h.N_,{to:"/billing"},r("Billing")),key:"Billing",icon:l.createElement(A.A,{style:{fontSize:"16px"}}),className:"em-analytics__billing"},{label:r("Sign out"),icon:l.createElement(_.A,{style:{fontSize:"16px"}}),key:"Sign out",className:"em-analytics__sign-out",onClick:()=>{(0,M.Id)(j),i(I.Q2.util.resetApiState()),s("/auth",{replace:!0})}}];const X="/projects"+(d?"/"+d+"/emails?page=1":""),K=[{label:l.createElement(h.N_,{style:{fontSize:16},to:X},U),key:"Project",popupOffset:[0,16],style:{fontWeight:500},icon:d?l.createElement(h.N_,{to:X,className:"project-menu__block",style:{fontSize:"18px",zIndex:99}},l.createElement(g.Ay,{type:"primary",className:"project-menu__block-button"},null===U||void 0===U?void 0:U.split(" ").slice(0,2).map((e=>Array.from(e)[0])))):l.createElement(h.N_,{to:X,rel:"noopener noreferrer",className:"project-menu__block",style:{fontSize:"28px"}},l.createElement("b",null,l.createElement("span",{className:"letters"},"E"),(!e||a)&&l.createElement("span",{className:"hidden-text"},"mail")),l.createElement("span",{className:"letters"},"M"),(!e||a)&&l.createElement("span",{className:"hidden-text"},"aker")),className:p()("project-menu__list-item project-menu__list-item_project project-menu__list-item_project",{"project-menu__list-item_logo":!d,"project-menu__list-item_project":d}),children:d&&[{label:r("Project settings"),key:"Project settings",className:"em-analytics__account-settings",icon:l.createElement(C.A,{style:{fontSize:"16px"}}),onClick:()=>{i((0,N.qf)(V.lx.EDIT_PROJECT_MODAL)),!a&&t(!0)}},{label:l.createElement(h.N_,{to:"/projects"},r("List of projects")),key:"List of projects",icon:l.createElement(S.A,{style:{fontSize:"16px"}}),className:"em-analytics__sign-out"}]},{type:"divider"}];return W.push({icon:l.createElement(w.A,{style:{fontSize:20}}),label:l.createElement(h.N_,{to:`/projects/${d}/emails`,rel:"noopener noreferrer"},r("Emails")),key:"Emails",className:"project-menu__list-item em-analytics__project-menu-emails"},{icon:l.createElement(k.A,{style:{fontSize:20}}),label:l.createElement(h.N_,{to:`/projects/${d}/blocks`,rel:"noopener noreferrer"},r("Blocks")),key:"Blocks",className:"project-menu__list-item em-analytics__project-menu-blocks"},{icon:l.createElement(x.A,{style:{fontSize:20}}),label:l.createElement(h.N_,{to:`/projects/${d}/members`,rel:"noopener noreferrer"},r("Members")),key:"Members",className:"project-menu__list-item em-analytics__project-menu-members"}),"community"===H.subscription.post_name&&d&&H.counters.emails_counter>2&&G.push({icon:l.createElement(B.A,{style:{fontSize:20,lineHeight:"44px"}}),label:l.createElement(h.N_,{to:"/billing",rel:"noopener noreferrer",style:{fontSize:16,color:"white"}},r("Upgrade")),key:"Emails",className:"project-menu__list-item"}),G.push({icon:l.createElement(T.A,{style:{fontSize:18}}),label:r("Help menu"),key:"Help menu",className:"project-menu__list-item support-center-menu",children:q},{icon:l.createElement(R.A,{style:{fontSize:18}}),label:r("What's new"),key:"What's new",className:"project-menu__list-item ducalis-changelog-widget em-analytics__project-menu-ducalis"},{icon:l.createElement("span",{style:{width:"20px",height:"20px",fontSize:"20px"},className:"user-profile__avatar anticon"},null!==H&&void 0!==H&&null!==(n=H.avatar_urls)&&void 0!==n&&n[24]?[l.createElement("img",{style:{width:"100%"},key:"img",src:null===H||void 0===H?void 0:H.avatar_urls[24],alt:null!==H&&void 0!==H&&H.name?`${null===H||void 0===H?void 0:H.name} avatar`:"User avatar",className:"user-profile__avatar-img"}),l.createElement(y.A,{key:"UserOutlined",style:{position:"absolute",fontSize:20,borderRadius:100,overflow:"hidden",height:20,width:20,lineHeight:0,zIndex:-1}})]:l.createElement(y.A,{style:{color:"white"}})),label:(null===H||void 0===H?void 0:H.name)||null,key:"User profile",className:"project-menu__list-item user-profile",children:Z}),l.createElement(l.Fragment,null,l.createElement("div",{className:"project-menu"},l.createElement("div",null,l.createElement(b.A,{disabledOverflow:!0,className:"project-menu__list project-menu__list_top",style:{fontSize:16},items:K,triggerSubMenuAction:"hover",subMenuOpenDelay:.3,subMenuCloseDelay:.6,selectable:!1}),d&&l.createElement(b.A,{disabledOverflow:!0,selectable:!0,selectedKeys:[u],className:"project-menu__list project-menu__list_second",style:{fontSize:16,marginTop:30},items:W,triggerSubMenuAction:"hover"})),l.createElement(b.A,{disabledOverflow:!0,selectable:!0,selectedKeys:["Emails"],forceSubMenuRender:"true",className:"project-menu__list project-menu__list_bottom",style:{fontSize:14,marginBottom:6},subMenuOpenDelay:.3,subMenuCloseDelay:.6,items:G,triggerSubMenuAction:"hover"})))};var D=a(63837),H=a(49823),j=a(27499),z=a(201),W=a(66964),G=a(8218),U=a(29123),q=a(48753),Z=a(93511),X=a(352),K=a(5457),Y=a(94780),$=a(76762),Q=a(1047),J=a(80877),ee=a(39420),te=a(52919);const{Option:ae}=H.A,le="profile",oe=({isModalVisible:e})=>{const{__:t}=(0,E.s9)(),a=(0,c.d4)(P.C1),o=(0,c.d4)(P.yf),n=(0,i.hN)(),r=(0,te.XW)(),s=(0,c.wA)(),[d]=j.A.useForm(),[m,u]=(0,I.b9)(),[p,b]=(0,I.hZ)(),[h,f]=(0,l.useState)([]),[v,A]=(0,l.useState)([]),[_,C]=(0,l.useState)(le),[S,w]=(0,l.useState)({currentPassword:!1,newPassword:!1,confirmPassword:!1}),[k,x]=(0,l.useState)((()=>a.locale)),B=(0,l.useRef)(null),T=t("If you turn the switch off, lines of code will not wrap. If you turn the switch on, lines of code will wrap at the viewport.");(0,l.useEffect)((()=>{if(d&&e){C(le),p(void 0,!0);const e=a.code_editor;x(a.locale),d.setFieldsValue({firstName:a.first_name,lastName:a.last_name,email:a.email,theme:a.theme,currentPassword:"",newPassword:"",confirmPassword:"",autosaves:Boolean(a.autosaves),hideMergetags:Boolean(a.hide_mergetags),language:a.locale,newsLetterConsent:Boolean(a.newsletter_consent),codeEditor:{fontSize:e.font_size||10,fontFamily:e.font_family,tabSize:e.tab_size||2,wordWrap:Boolean(e.word_wrap),minimap:Boolean(e.minimap),insertSpaces:Boolean(e.insert_spaces)}})}}),[a,d,e,p,x]),(0,l.useEffect)((()=>{if(d&&e){if(b.isSuccess){var t,a,l,r;let e=null===(t=(0,M.EU)(o,["acf","theme"]))||void 0===t||null===(a=t.items)||void 0===a?void 0:a.enum;const n=null===(l=(0,M.EU)(o,["acf","code_editor","font_family"]))||void 0===l||null===(r=l.items)||void 0===r?void 0:r.enum;f((0,M.d_)(e)),A((0,M.d_)(n))}b.isError&&(0,M.p6)(b,n)}}),[b,d,e,o,n]);const R=()=>{const e=window.localStorage.getItem(V.V0.em_color_scheme),t=matchMedia(V.F3).matches?V.nd:V.T;r({operation:V.Ru.UPDATE_PREVIEW,theme:e||t}),d.validateFields().then((e=>{const t=e.codeEditor;e.currentPassword&&e.newPassword?m({password:e.newPassword,old_password:e.currentPassword}):m({first_name:e.firstName,last_name:e.lastName,email:e.email,locale:e.language,autosaves:e.autosaves,hide_mergetags:e.hideMergetags,theme:e.theme,newsletter_consent:e.newsLetterConsent,code_editor:t?{font_size:t.fontSize,font_family:t.fontFamily,tab_size:t.tabSize,word_wrap:t.wordWrap,minimap:t.minimap,insert_spaces:t.insertSpaces}:null})}))};(0,l.useEffect)((()=>{u.isError&&(0,M.p6)(u,n)}),[u,n]),(0,l.useEffect)((()=>{u.isSuccess&&((0,M.wB)(t("Your profile was successfully updated."),n),s((0,N.Oo)()))}),[s,u,t,n]);const[L,O]=(0,l.useState)("");(0,l.useEffect)((()=>{const t=window.localStorage.getItem(V.V0.em_color_scheme);e&&(d.setFieldsValue({theme:null!==t?t:V.IJ}),O(null!==t?t:V.IJ))}),[d,e]);const F=(0,l.useCallback)((e=>{let t;if((0,ee.Hk)(e),e===V.IJ){const e=matchMedia(V.F3).matches?V.nd:V.T;localStorage.removeItem(V.V0.em_color_scheme),t=e}else localStorage.setItem(V.V0.em_color_scheme,e),t=e;s((0,Q.eX)(t===V.nd?`vs-${t}`:V.T)),(0,ee.A5)(t)}),[s]),D=(0,l.useCallback)((()=>{L!==d.getFieldValue("theme")&&F(L),s((0,P.ww)(a.code_editor)),s((0,P.ko)(k)),s((0,N.Oo)())}),[a.code_editor,s,d,L,F,k]);let oe=[{label:l.createElement(l.Fragment,null,l.createElement(X.A,null),t("Profile")),key:le,className:"em-analytics__profile-user",children:l.createElement(l.Fragment,null,l.createElement(z.A,{gutter:16},l.createElement(W.A,{span:12}," ",l.createElement(j.A.Item,{label:t("First name"),name:"firstName"},l.createElement(G.A,{placeholder:t("Enter your first name")}))),l.createElement(W.A,{span:12},l.createElement(j.A.Item,{label:t("Last name"),name:"lastName"},l.createElement(G.A,{placeholder:t("Enter your last name")})))),l.createElement(z.A,{gutter:16},l.createElement(W.A,{span:12},l.createElement(j.A.Item,{label:t("Email"),name:"email"},l.createElement(G.A,{disabled:!0,placeholder:t("Enter your email")}))),l.createElement(W.A,{span:12},l.createElement(j.A.Item,{label:t("Theme"),name:"theme"},l.createElement(H.A,{placeholder:t("Select a theme")},h.map((e=>{let a="";switch(e.value){case"light":a=t("Light");break;case"dark":a=t("Dark");break;default:a=t("System")}return l.createElement(ae,{key:e.value,value:e.value},a)})))))),l.createElement(z.A,{gutter:16},l.createElement(W.A,{span:12},l.createElement(j.A.Item,{label:t("Newsletter Subscription"),valuePropName:"checked",name:["newsLetterConsent"]},l.createElement(U.A,null))),l.createElement(W.A,{span:12},l.createElement(j.A.Item,{label:t("Autosave in editor"),valuePropName:"checked",name:["autosaves"]},l.createElement(U.A,null)))))},{label:l.createElement(l.Fragment,null,l.createElement(K.A,null),t("Code editor")),key:"editor",className:"account-settings-codeiditor-tab-content em-analytics__profile-code-editor",children:l.createElement(l.Fragment,null,l.createElement(z.A,{gutter:16},l.createElement(W.A,{span:8},l.createElement(j.A.Item,{label:t("Font size"),name:["codeEditor","fontSize"]},l.createElement(J.A,{min:6,max:100}))),l.createElement(W.A,{span:8},l.createElement(j.A.Item,{label:t("Tab size"),name:["codeEditor","tabSize"]},l.createElement(J.A,{min:1,max:10}))),l.createElement(W.A,{span:8},l.createElement(j.A.Item,{label:t("Font family"),name:["codeEditor","fontFamily"]},l.createElement(H.A,{placeholder:t("Select a font family")},v.map((e=>l.createElement(ae,{key:e.value,value:e.value},e.label))))))),l.createElement(z.A,{gutter:16},l.createElement(W.A,{span:8},l.createElement(j.A.Item,{label:t("Line wrap"),valuePropName:"checked",name:["codeEditor","wordWrap"],tooltip:{title:T,icon:l.createElement(Y.A,null)}},l.createElement(U.A,null))),l.createElement(W.A,{span:8},l.createElement(j.A.Item,{label:t("Minimap"),valuePropName:"checked",name:["codeEditor","minimap"],tooltip:{title:t("Display the minimap."),icon:l.createElement(Y.A,null)}},l.createElement(U.A,null))),l.createElement(W.A,{span:8},l.createElement(j.A.Item,{label:t("Insert spaces"),valuePropName:"checked",name:["codeEditor","insertSpaces"],tooltip:{title:t("Prefer spaces over tabs."),icon:l.createElement(Y.A,null)}},l.createElement(U.A,null)))))},{label:l.createElement(l.Fragment,null,l.createElement($.A,null),t("Security")),key:"security",className:"account-settings-security-tab-content em-analytics__profile-code-editor",children:l.createElement(l.Fragment,null,l.createElement(z.A,{gutter:16},l.createElement(W.A,{span:12},l.createElement(j.A.Item,{label:t("Current password"),name:"currentPassword"},l.createElement(G.A.Password,{readOnly:!S.currentPassword,onFocus:()=>w((e=>({...e,currentPassword:!0}))),ref:B,placeholder:t("Enter your current password")})))),l.createElement(z.A,{gutter:16},l.createElement(W.A,{span:12},l.createElement(j.A.Item,{label:t("New password"),name:"newPassword",extra:t("At least 8 characters, including a combination of uppercase and lowercase letters, numbers, and special characters."),validateTrigger:["onSubmit"],rules:[{required:!1,message:t("Enter your new password")},({getFieldValue:e})=>({validator(a,l){if("security"===_){return e("currentPassword")?l.length>=8&&/[0-9]/.test(l)&&/[a-z]/.test(l)&&/[A-Z]/.test(l)&&/\W+|_/g.test(l)?Promise.resolve():Promise.reject(new Error(t("The password is too simple."))):Promise.reject(new Error("Enter your current password"))}return Promise.resolve()}})]},l.createElement(G.A.Password,{readOnly:!S.newPassword,onFocus:()=>w((e=>({...e,newPassword:!0}))),placeholder:t("Enter your new password")}))),l.createElement(W.A,{span:12},l.createElement(j.A.Item,{label:t("Confirmation"),name:"confirmPassword",validateTrigger:["onSubmit"],rules:[{required:"security"===_,message:t("Repeat the new password")},({getFieldValue:e})=>({validator:(a,l)=>l&&e("newPassword")!==l?Promise.reject(new Error(t("The two passwords that you entered do not match!"))):Promise.resolve()})]},l.createElement(G.A.Password,{readOnly:!S.confirmPassword,onFocus:()=>w((e=>({...e,confirmPassword:!0}))),placeholder:t("Repeat the new password")})))))}];return l.createElement(q.A,{width:572,className:"account-settings blocks-modal",title:l.createElement("div",null,l.createElement(y.A,null)," ",t("Account settings")),open:e,onOk:R,onCancel:D,centered:!0,footer:[l.createElement(g.Ay,{key:"Update",size:"large",className:"em-analytics__profile-save",type:"primary",loading:u.isLoading,onClick:R},t("Update"))]},l.createElement(j.A,{form:d,layout:"vertical",name:"edit_profile_form",onFinish:R,initialValues:{remember:!1,firstName:"",lastName:"",email:"",theme:"system",currentPassword:"",newPassword:"",confirmPassword:"",autosaves:!1,email_builder_config:"simple",hideMergetags:!0,newsLetterConsent:!1,code_editor:{fontSize:10,fontFamily:"Anonymous Pro",tabSize:2,wordWrap:!0,minimap:!1,insertSpaces:!1}},onValuesChange:e=>{e.theme&&F(e.theme);const t=e.codeEditor;e.language&&s((0,P.ko)(e.language)),e.codeEditor&&s((0,P.ww)({font_size:t.fontSize,font_family:t.fontFamily,tab_size:t.tabSize,word_wrap:t.wordWrap,minimap:t.minimap,insert_spaces:t.insertSpaces}))},autoComplete:"off"},l.createElement(Z.A,{activeKey:_,onChange:e=>C(e),items:oe})))};var ne=a(62913),re=a(13785),ie=a(8807);const se=()=>{var e;const{__:t}=(0,E.s9)(),a=(0,c.wA)(),[o]=(0,I.b9)(),[n,r]=(0,l.useState)(null===(e=window)||void 0===e?void 0:e.localStorage.getItem(V.V0.em_color_scheme)),i=(0,te.XW)(),s=(0,l.useCallback)(((e=null)=>{const t=e;(e=>{let t;if((0,ee.Hk)(e),null===e){const e=matchMedia(V.F3).matches?V.nd:V.T;localStorage.removeItem(V.V0.em_color_scheme),t=e}else localStorage.setItem(V.V0.em_color_scheme,e),t=e;a((0,Q.eX)(t===V.nd?`vs-${t}`:V.T)),(0,ee.A5)(t),i({operation:V.Ru.UPDATE_PREVIEW,theme:t}),o({theme:e})})(t),r(t)}),[a,o,i]);return(0,l.useEffect)((()=>{matchMedia(V.F3).onchange=()=>s()}),[s]),l.createElement("div",{onClick:e=>e.stopPropagation()},l.createElement(ne.A,{className:"theme-switcher",style:{cursor:"pointer",color:"var(--colorText)"},value:n,options:[{label:l.createElement(re.A,{title:t("Light theme")},l.createElement(ie.A,{icon:"LightMode",style:{fontSize:18}})),value:V.T},{label:l.createElement(re.A,{title:t("System theme")},l.createElement(ie.A,{icon:"AutoMode",style:{fontSize:18}})),value:null},{label:l.createElement(re.A,{title:t("Dark theme")},l.createElement(ie.A,{icon:"DarkMode",style:{fontSize:18}})),value:V.nd}],onChange:e=>s(e)}))};var de=a(705),me=a(22536),ce=a(12741);const ue=()=>{const e=(0,O.p)(),t=(0,c.wA)(),a=(0,c.d4)(ce.$S);let n=(0,o.zy)();(0,l.useEffect)((()=>{n.pathname.endsWith("/new")||(e.remove(V.A9.em_new_email),e.remove(V.A9.em_template_email),a&&t((0,ce.Et)()))}),[n,a,t,e])};var pe=a(39206);const ge=()=>{const e=(0,c.wA)(),t=(0,O.p)(),a=(0,c.d4)(pe.Sl);let n=(0,o.zy)();(0,l.useEffect)((()=>{n.pathname.endsWith("/new")||a&&(e((0,pe.X8)()),t.remove(V.A9.em_new_block))}),[n,a,e,t])};var be=a(98845);const he=()=>{const e=(0,c.wA)(),t=(0,c.d4)(Q.zn);let a=(0,o.zy)();(0,l.useEffect)((()=>{/emails\/[0-9]+$/.test(a.pathname)||t&&e(be.GY.util.invalidateTags([{type:"Emails",id:+t}]))}),[a,e,t])};var Ee=a(86095),fe=a(90121),ve=a(27941),ye=a(13668);const{Sider:Ae}=n.A,{useToken:_e}=r.A,Ce=()=>{const{token:e}=_e();let t=(0,o.zy)();const a=(0,c.wA)(),r=(0,o.Zp)(),{emailId:u,blockId:g}=(0,o.g)(),b=(0,c.d4)(P.C1),h=(0,c.d4)(N.cL),E=(0,l.useRef)(),[f]=(0,de.bw)(),v=(0,i.hN)();E.current||(E.current=(0,Ee.$Z)()),(0,l.useEffect)((()=>{(0,ee.FN)(e)}),[e]);const{data:y=[],isSuccess:A}=(0,de.I9)(b.id,{pollingInterval:3e4,skip:h});(0,l.useEffect)((()=>{const e=y.filter((e=>""===e.seen||null===e.seen));setTimeout((()=>{e.length&&A&&e.forEach((e=>{var t,a;v[e.type]({message:l.createElement("div",{dangerouslySetInnerHTML:{__html:(null===(t=e.title)||void 0===t?void 0:t.rendered)||e.title||""}}),description:l.createElement("div",{dangerouslySetInnerHTML:{__html:(null===(a=e.content)||void 0===a?void 0:a.rendered)||""}}),placement:"bottomRight"});const o=(new Date).toLocaleString();f({id:e.id,datetime:o}).unwrap()}))}),5e3)}),[A,f,y,v]),ue(),ge(),he(),(0,l.useEffect)((()=>{g||a((0,me.nJ)()),u||a((0,Q.ss)())}),[g,u,a,t.pathname]);let _=null;u||g||t.pathname.endsWith("/new")?_=E.current:E.current&&E.current.getValue()&&setTimeout((()=>E.current.setValue("")),1e3);const C=JSON.parse(localStorage.getItem(V.V0.em_menu_is_locked)),[S,w]=(0,l.useState)((null===C||void 0===C?void 0:C.isLocked)||!1),[k,x]=(0,l.useState)(!0);return(0,l.useEffect)((()=>{const e=()=>localStorage.setItem(V.V0.em_menu_is_locked,JSON.stringify({isLocked:S}));return e(),e()}),[S]),(0,fe.D3)(ye._1,(0,l.useCallback)((e=>{const t=(0,ve.Mu)(e);r(t)}),[r])),l.createElement("div",{className:"main"},l.createElement(Ee.kx.Provider,{value:_},l.createElement("div",{className:"main__pane main__pane_main"},l.createElement("div",{className:"main__pane-content",id:"pane-content-iframe"},l.createElement(n.A,{className:"main__pane-layout",hasSider:!0},!V.EW.isPlugin&&l.createElement(Ae,{theme:"light",style:{borderColor:e.colorBorder,position:"fixed",overflow:window.innerWidth>1400?"hidden":""},collapsible:!0,collapsed:!S&&k,defaultCollapsed:!0,reverseArrow:!S&&!k||S&&!k,trigger:l.createElement("div",{className:"main__pane-trigger"},S?l.createElement(m.A,{style:{fontSize:window.innerWidth>1400?18:13}}):l.createElement(l.Fragment,null,l.createElement(s.A,{style:{fontSize:window.innerWidth>1400?18:13}}),l.createElement(d.A,{style:{fontSize:window.innerWidth>1400?18:13}})),l.createElement(se,null)),className:p()("main__menu",{main__menu_lock:S}),width:260,collapsedWidth:window.innerWidth>1400?80:0,zeroWidthTriggerStyle:{},onCollapse:(e,t)=>{e?!S&&x(!0):x(!e),w(!S)},onMouseEnter:()=>!S&&x(!1),onMouseLeave:()=>!S&&x(!0)},l.createElement(F,{isMenuCollapsed:k,setIsMenuCollapsed:x,isLocked:S})),l.createElement(D.A,{isModalVisible:h===V.lx.EDIT_PROJECT_MODAL}),l.createElement(oe,{isModalVisible:h===V.lx.EDIT_PROFILE_MODAL}),l.createElement(o.sv,null))))))}},48956:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var l=a(98173),o=a(48753),n=a(82021),r=a(37969),i=a(12543),s=a(30150),d=a(89613),m=a(98173);const c=({open:e,sideOnOk:t,onCancel:a,initialSlide:c=0})=>{const{__:u}=(0,i.s9)(),p=(0,s.Zp)(),[g,b]=(0,l.useState)(c),h=(0,l.useRef)(null),E=(0,d.u)();(0,l.useEffect)((()=>{e&&h.current&&(h.current.goTo(c,!0),b(c))}),[e,c]);const f=(0,l.useMemo)((()=>[{image:u("https://cdn.useblocks.io/1351/241017_18_1sGjUaZ.png"),backgroundColor:"var(--blue-2)",title:u("More editing features"),description:u("Use our visual editor to customize every element to your needs: change borders and their radius, box shadows, paddings, background, and much more.")},{image:u("https://cdn.useblocks.io/1351/241017_18_J7QtvZ3.png"),backgroundColor:"var(--purple-2)",title:u("Work with the HTML code"),description:u("Edit the HTML version of your email template in the Code mode and see the changes in real time. Builder has no code restrictions \u2014 you can create templates of any complexity!")},{image:u("https://cdn.useblocks.io/1351/241017_18_2fjDRfL.png"),backgroundColor:"var(--cyan-2)",title:u("AI image generation"),description:u("Generate stunning visuals for your emails with ease. We have trained our AI model to ensure the highest quality images.")},{image:u("https://cdn.useblocks.io/1351/241017_18_D5C25Zp.png"),backgroundColor:"var(--green-2)",title:u("Stock photos and GIFs"),description:u("Search the vast gallery of stock photos and GIFs to find visuals for any occasion. You can filter the results by image orientation, color scheme, and more.")},{image:u("https://cdn.useblocks.io/1351/241017_18_NDYloAO.png"),backgroundColor:"var(--magenta-2)",title:u("Version history"),description:u("Check who and when made changes to the email template and, if necessary, restore one of the previous versions.")},{image:u("https://cdn.useblocks.io/1351/241017_18_g5mVlmh.png"),backgroundColor:"var(--red-2)",title:u("Image editor"),description:u("Want to resize an image, add some text, or apply a filter? No need to leave builder! You can make all the basic changes in our image editor.")},{image:u("https://cdn.useblocks.io/1351/241017_18_ur8Lh3W.png"),backgroundColor:"var(--orange-2)",title:u("Email optimization"),description:u("Check your email against broken links, missing alt texts, large images, and other issues that might prevent your emails from hitting inboxes.")},{image:u("https://cdn.useblocks.io/1351/241017_18_S5Pld9p.png"),backgroundColor:"var(--volcano-2)",title:u("Team collaboration"),description:u("Share the project with your team and collaborate in real time. Add comments to individual email blocks and discuss necessary edits right in the builder.")},{image:u("https://cdn.useblocks.io/1351/241017_18_tGbb2j9.png"),backgroundColor:"var(--geekblue-2)",title:u("Email testing"),description:u("Check how your email appears across various devices and email clients.")},{image:u("https://cdn.useblocks.io/1351/241017_18_gDXi4uM.png"),backgroundColor:"var(--geekblue-2)",title:u("AI assistant"),description:u("Let our AI assistant enhance your email template! From creating subject lines and preheaders based on the email copy to generating the whole email with your website in mind!")}]),[u]);return(0,l.useEffect)((()=>{if(e&&h.current){h.current.goTo(c,!0),b(c);const e=f[c];E({event:"open_modal",action:"open_premium-features_modal",modal_id:"premium-features",offer_id:e.title})}}),[e,f,c,E]),m.createElement(o.A,{open:e,footer:null,onCancel:a,centered:!0,closable:!1,className:"premium-features-modal",classNames:{mask:"premium-features-modal-mask"},styles:{mask:{background:"rgba(0, 0, 0, 0.65)"}},width:1100,style:{maxWidth:"80%"}},m.createElement(n.A,{dots:!0,slidesToShow:1,slidesToScroll:1,autoplay:!0,className:"carousel-slider",draggable:!0,autoplaySpeed:5e3,initialSlide:g,ref:h},f.map(((e,t)=>m.createElement("div",{key:t},m.createElement("div",{className:"carousel-slide",style:{background:`${e.backgroundColor}`}},m.createElement("div",{className:"slide-item-image"},m.createElement("img",{src:e.image,alt:`slide-${t}`})),m.createElement("div",{className:"slide-item-content"},m.createElement("h3",{className:"slide-title"},e.title),m.createElement("p",{className:"slide-description"},e.description))))))),m.createElement("div",{className:"modal-subtitle"},u("This and other features are available for you on any paid plan.")),m.createElement("div",{className:"modal-buttons"},m.createElement(r.Ay,{size:"large",onClick:()=>a(!1)},u("Cancel")),m.createElement(r.Ay,{type:"primary",size:"large",onClick:()=>{t&&t(),p("/billing"),a(!1)},style:{padding:"0 30px"}},u("Select plan"))))}},1753:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var l=a(98173),o=a(49856),n=a(98447),r=a(38826);const i=l.createElement(r.A,{style:{fontSize:48},rev:null,spin:!0}),s=(0,l.lazy)((()=>Promise.all([a.e(6819),a.e(1880),a.e(5346),a.e(8084)]).then(a.bind(a,10275)))),d={height:"100%",display:"flex",justifyContent:"center",alignItems:"center"};function m(e){return l.createElement(l.Suspense,{fallback:l.createElement(o.A,{size:"large",style:d},l.createElement(n.A,{indicator:i}))},l.createElement(s,e))}},89687:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var l=a(98173),o=a(30150);const n=({lastProjectId:e})=>{const{pathname:t,search:a}=(0,o.zy)();return!1===e?l.createElement(o.C5,{to:"/projects"}):e&&l.createElement(o.C5,{to:`/projects/${e+t+a}`})}},67007:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var l=a(98173),o=a(30150);const n=({to:e})=>l.createElement(o.C5,{to:e})},96087:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var l=a(98173),o=a(47555),n=a(72570),r=a(37969),i=a(30150),s=a(12543),d=a(40277);const{Content:m}=o.A,c=()=>{const{__:e}=(0,s.s9)();let t=(0,i.Zp)();return l.createElement(o.A,null,l.createElement(m,{className:"container"},l.createElement(n.Ay,{status:"500",title:"404",subTitle:e("Sorry, the page you visited does not exist."),extra:l.createElement(r.Ay,{type:"primary",onClick:()=>(0,d.XZ)(t,"/projects")},e("Back Home"))})))}},56605:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var l=a(98173),o=a(49856),n=a(98447),r=a(38826);const i=({small:e=!1,style:t,wrap:a=!1})=>{const i={width:e?"100%":"100vw",height:"80vh",display:"flex",justifyContent:"center",alignItems:"center",...t},s=l.createElement(r.A,{style:{fontSize:48},spin:!0});return l.createElement(o.A,{size:"large",style:i,wrap:a},l.createElement(n.A,{indicator:s}))}},97041:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var l=a(98173),o=a(64909),n=a(30150),r=a(79245),i=a(78915),s=a(40277),d=a(96734),m=a(89613),c=a(32947);const u="emailmaker.ru",p=({children:e})=>{const t=(0,n.zy)(),a=(0,o.hN)(),p=(0,d.p)(),[g,b]=(0,r.ok)(),h=(0,m.u)(),[E,{isError:f,isSuccess:v,error:y,data:A}]=(0,i.i2)(),{isError:_,isUninitialized:C,isLoading:S,isSuccess:w,error:k,data:x,refetch:B}=(0,i.CR)("",{skip:c.EW.isPlugin||!p.get(c.A9.em_token)}),T=(0,l.useMemo)((()=>({email:g.get("email"),hash:g.get("hash"),event:"confirmation"===g.get("event")})),[g]);if((0,l.useEffect)((()=>{f?(0,s.p6)({error:y},a):v&&(h({event:"email_confirmation",user_email:null===A||void 0===A?void 0:A.email}),(0,s.wB)(A.message,a),x&&B())}),[A,y,f,v,a,x,B,h]),(0,l.useEffect)((()=>{!(T.email&&T.hash&&T.event)||!1!==(null===x||void 0===x?void 0:x.email_confirmation)&&p.get(c.A9.em_token)||A||E({hash:T.hash,email:T.email,event:T.event}).catch((e=>{})).finally((()=>b("")))}),[T,E,x,p,b,A]),(0,l.useEffect)((()=>{_&&k&&((0,s.p6)({error:k},a),(0,s.Id)(p))}),[x,_,k,a,p]),c.EW.isPlugin)return e;if(!c.EW.isPlugin&&!p.get(c.A9.em_token)&&!t.pathname.includes("auth"))return l.createElement(n.C5,{to:"/auth",state:{from:t}});if((C||S)&&!t.pathname.includes("auth"))return l.createElement(l.Fragment,null);if(_&&!t.pathname.includes("auth"))return l.createElement(n.C5,{to:"/auth",state:{from:t}});if(w){const{id:a,email:o,name:r,locale:i,carrotquest_hash:s,ducalis_hash:d,email_subscription_consent:m,last_used_project:g}=x;return p.set(c.A9.em_id,a,{domain:u}),p.set(c.A9.em_email,o,{domain:u}),p.set(c.A9.em_name,r,{domain:u}),p.set(c.A9.em_locale,i,{domain:u}),p.set(c.A9.em_carrotquest_hash,s,{domain:u}),p.set(c.A9.em_ducalis_hash,d,{domain:u}),p.set(c.A9.em_email_subscription_consent,m,{domain:u}),g&&"/"===t.pathname?l.createElement(n.C5,{to:`/projects/${g}/emails`,replace:!0}):e}return t.pathname.includes("auth")?e:void 0}},14107:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var l=a(98173),o=a(30150),n=a(2604),r=a(47555),i=a(72570),s=a(37969),d=a(12543),m=a(65716),c=a(84572),u=a(56605),p=a(40277),g=a(32947);const{Content:b}=r.A,h=()=>{var e;const{__:t}=(0,d.s9)(),{projectId:a}=(0,o.g)();let h=(0,o.Zp)(),E=(0,o.zy)();const f=(0,n.wA)(),v=(0,m.fo)(+a,{skip:!a}),{isLoading:y,isError:A,error:_,isSuccess:C,data:S}=v;return(0,l.useEffect)((()=>{C&&(null===S||void 0===S?void 0:S.id)!==a&&f((0,c.od)(S))}),[C,S,f,a]),(0,l.useEffect)((()=>{C&&a&&E.pathname.endsWith(a)&&h(`${E.pathname}/emails`)}),[C,E,h,a]),l.createElement(l.Fragment,null,y&&l.createElement(u.A,null),A&&_&&l.createElement(r.A,{className:"project-outlet"},l.createElement(b,{className:"project-outlet__container container"},l.createElement(i.Ay,{status:_.status,title:_.status,subTitle:null===(e=_.data)||void 0===e?void 0:e.message,extra:l.createElement(s.Ay,{type:"primary",onClick:()=>(0,p.XZ)(h,"/projects")},t("Back To Projects"))}))),(C||g.EW.isPlugin)&&l.createElement(o.sv,{context:{...v}}))}},40409:(e,t,a)=>{"use strict";a.d(t,{A:()=>C});var l=a(98173),o=a(80703),n=a(13785),r=a(37969),i=a(64909),s=a(30150),d=a(2604),m=a(12543),c=a(52218),u=a.n(c),p=a(68984),g=a(65716),b=a(83027),h=a(62093),E=a(22536),f=a(40277),v=a(89613),y=a(86095),A=a(32947);const _=({block:e,isEditableRights:t,rightCol:a,autoSaveBlockResult:c})=>{const{__:_}=(0,m.s9)(),{projectId:C,blockId:S}=(0,s.g)();let w=(0,d.d4)(E.Fv),k=(0,d.d4)(E.Fv),x=(0,d.wA)();const B=(0,i.hN)(),T=(0,y.fn)(),R=(0,d.Pj)(),[N,L]=(0,l.useState)(!1),[P,I]=(0,l.useState)(null),[M,O]=(0,l.useState)(!1),[V,F]=(0,l.useState)(!1),D=(0,v.u)();(0,l.useEffect)((()=>{var e,t;null!==(e=window)&&void 0!==e&&null!==(t=e.navigator)&&void 0!==t&&t.userAgent.includes("Macintosh")&&I(!0)}),[]);const{data:H,refetch:j}=(0,g.fo)(+C,{skip:!+C}),[z]=(0,p.Gr)(),[W,G]=(0,p.OZ)(),[U,q]=(0,p.pP)(),[Z]=(0,g.OD)(),X=`project_${C}`,K=H&&(0,f._q)(H,A.YY).find((e=>e.name===X)),Y=H&&(0,f.HT)(H,A.YY),$=(0,l.useCallback)((a=>{var l,o;if(O(!0),!t&&e.lock&&V)return B.error({id:"BLOCK_ACCESS_TO_LOCKED_ERROR",message:_("No access to edit the letter."),placement:"bottomRight",data:(0,i.x_)(e)}),void O(!1);if(((null===(l=e.tags)||void 0===l?void 0:l.length)||(null===(o=e.blocktags)||void 0===o?void 0:o.length))>10&&V)return B.error({id:"BLOCK_TOO_MANY_TAGS_ERROR",message:_("Maximum 10 tags available."),placement:"bottomRight",data:(0,i.x_)(e)}),void O(!1);if(""===e.type)return B.error({message:_("Set the type"),description:_("Please set the 'Type' field in the Settings section."),placement:"bottomRight"}),void O(!1);const n=t=>{var l;const o=null===(l=e.tags)||void 0===l?void 0:l.map((e=>{const a=null===Y||void 0===Y?void 0:Y.find((t=>t.name===e));return a?a.id:z({name:e,parent:t}).then((({error:t,data:a})=>{var l,o;return 400===(null===t||void 0===t?void 0:t.status)?null===t||void 0===t||null===(l=t.data)||void 0===l||null===(o=l.data)||void 0===o?void 0:o.term_id:a?a.id:void(t&&(B.fromError("TAG_CREATING_ERROR",e,t),O(!1)))}))})),n=(l=null)=>{const o=a=>{R.dispatch(b.kE.endpoints.getTags.initiate({parent:t})),j(),V&&(B.success({id:"BLOCK_EDITING_SUCCESS",message:_("The block was successfully saved.","block"),data:(0,i.x_)(e)}),O(!1)),fetch(((e,t,a,l)=>`https://scr.emcdn.ru/screenshot?delay=1000&width=800&fullPage=true&deviceScaleFactor=0.8&format=jpg&clearCache=true${l?`&cacheControl=true&cache-hash=${u()(l)}`:""}&url=${encodeURIComponent(`https://dev-backend-1.emailmaker.ru/get${e}/${a}?secret_hash=${u()(`${t}${a}${A.KI}`)}&raw=true`)}`)(A.IE,C,a.id,a.modified),{mode:"no-cors"}).then((()=>{}))},n=(0,f._q)(e,A.zh).filter((t=>(l||e.blocktags).includes(t.id))).map((e=>e.name));e.isNew?q.status!==A.eG&&U({source:a,title:null===e.title?_("New block title"):e.title,project:e.project,type:e.type?e.type:"Other",description:e.description,html:(null===T||void 0===T?void 0:T.getValue())||"",blocktags:l?l.join(","):e.blocktags,tags:n}).then((({data:t,error:a})=>{a?(B.fromError("BLOCK_CREATING_ERROR",{title:e.title,html:(null===T||void 0===T?void 0:T.getValue())||""},a),O(!1)):o(t)})):G.status!==A.eG&&W({blockId:e.id,source:a,title:e.title,project:e.project,type:e.type?e.type:"Other",description:e.description,html:(null===T||void 0===T?void 0:T.getValue())||"",blocktags:l||e.blocktags,tags:n}).then((({data:t,error:a})=>{a&&V?(B.fromError("BLOCK_EDITING_ERROR",(0,i.x_)(e),a),O(!1)):o(t)}))};o?Promise.all(o).then((e=>n(e))):n(null)};O(!0),K?n(K.id):z({name:X}).then((async({data:t,error:a})=>{if(a)B.fromError("FOLDER_CREATING_ERROR",X,a),O(!1);else{const{data:a,error:l}=await Z({projectId:C,blocktags:t.id});l?(B.fromError("BLOCK_CLONING_ERROR",(0,i.x_)(e),l),O(!1)):a&&n(a.blocktags&&a.blocktags[0])}})).catch((e=>{}))}),[q.status,U,G.status,W,e,t,z,Z,C,_,V,T,B,Y,j,R,K,X]);(0,l.useEffect)((()=>{V&&($(),F(!1))}),[V,$]);const Q=(0,l.useCallback)((e=>{(e.ctrlKey||e.metaKey)&&83===e.keyCode&&(e.preventDefault(),F(!0))}),[]);(0,l.useEffect)((()=>(document.addEventListener("keydown",Q),()=>{document.removeEventListener("keydown",Q)})),[Q]);const J=(0,l.useCallback)((e=>{const t=e.data.operation,a=e.data.action;t===A.Ru.APPLICATION_ACTION&&"save_email"===a&&F(!0)}),[]);return(0,h.A)(J),(0,l.useEffect)((()=>{q.isError&&(O(!1),(0,f.p6)(q,B))}),[x,q,B]),(0,l.useEffect)((()=>{const e=setTimeout((()=>{L(!0)}),1e4);return()=>{clearTimeout(e)}}),[]),(0,l.useEffect)((()=>{e.isNew&&!S&&N&&($(),L(!1))}),[N,e,$,S]),l.createElement(n.A,{title:_(P?"Save by \u2318S":"Save by Ctrl+S"),placement:a?"right":"bottomRight"},l.createElement(r.Ay,{type:"primary",block:a,className:"em-analytics__block-save",icon:l.createElement(o.A,null),onClick:()=>{D({event:"click",action:"save_block"}),F(!0)},loading:G.isLoading||Z.isLoading||q.isLoading||M||c},a||w||k?"":_("Save")))};_.defaultProps={block:null};const C=_},52995:(e,t,a)=>{"use strict";a.d(t,{A:()=>T});var l=a(98173),o=a(2604),n=a(30150),r=a(40120),i=a(27499),s=a(48753),d=a(37969),m=a(8218),c=a(49823),u=a(67034),p=a(64909),g=a(94780),b=a(12543),h=a(8807),E=a(23424),f=a(47014),v=a(65716),y=a(40835),A=a(40277),_=a(32947),C=a(86095),S=a(90614),w=a(15626),k=a(27941);const{useToken:x}=r.A,B=({isModalVisible:e,email:t})=>{const{__:a}=(0,b.s9)(),[r]=i.A.useForm(),B=(0,o.wA)(),{emailId:T}=(0,n.g)(),R=(0,o.d4)(f.C1),[N,L]=(0,y.lg)(),{token:P}=x(),I=(0,p.hN)(),M=(0,o.Pj)(),[O,V]=(0,l.useState)(!1),F=t.project,[D,H]=(0,v.OD)(),{data:j}=v.Nq.endpoints.getProject.select(+F)(M.getState()),{testEmails:z}=(0,k.rD)(),[W,G]=(0,l.useState)([]),[U,q]=(0,l.useState)(!1),Z=(0,S.ml)(w.AZ.ON_SEND_EMAIL_MODAL_ID);(0,l.useEffect)((()=>{_.EW.isPlugin&&e?Z.fire(t).then((t=>{t.some((e=>!1===e))?B((0,E.Oo)()):V(e)})):V(e)}),[e,B,V,t,Z]),(0,l.useEffect)((()=>{if(j&&!_.EW.isPlugin){const{owner:e,admins:t,users:a,invited_users:l}=j.members;let o=[];const n=localStorage.getItem(_.V0.em_test_emails)?JSON.parse(localStorage.getItem(_.V0.em_test_emails)):[];if(n.length&&n[F]&&n[F].map((({prevLSEmail:e})=>o.push(e))),l&&l.map((({invited_user_email:e})=>o.push(e))),a&&a.map((({user_email:e})=>o.push(e))),e&&o.push(e.user_email),t&&t.map((({user_email:e})=>o.push(e))),j.projects_test_emails){const e=j.projects_test_emails.map((({projects_test_email:e})=>e));o.push(...e)}const r=Array.from(new Set(o));o.length&&G(r.map((e=>({value:e}))))}}),[j,F]),(0,l.useEffect)((()=>{_.EW.isPlugin&&G(z.map((e=>({value:e}))))}),[z]),(0,l.useEffect)((()=>{var e;const t=localStorage.getItem(_.V0.em_test_emails);if(t&&O&&0===(null===(e=r.getFieldValue("recipients"))||void 0===e?void 0:e.length)){const e=JSON.parse(t);null!==e&&void 0!==e&&e[F]&&r.setFieldsValue({recipients:e[F]})}}),[F,O,r]),(0,l.useEffect)((()=>{r.setFieldsValue({subject:t.subject})}),[r,t.subject]);const X=(0,C.fn)();return(0,l.useEffect)((()=>{if(L.isSuccess&&U){var e;if(200!==(null===(e=L.data)||void 0===e?void 0:e.status)){var l,o;(0,A.p6)({error:{data:{code:null===(l=L.data)||void 0===l?void 0:l.code,message:null===(o=L.data)||void 0===o?void 0:o.message}}},I)}else{const e=[...new Set([...W.map((e=>e.value)),...r.getFieldValue("recipients")])];D({projectId:F,projects_test_emails:e.map((e=>({projects_test_email:e})))});const l=localStorage.getItem(_.V0.em_test_emails)?JSON.parse(localStorage.getItem(_.V0.em_test_emails)):[];let o=r.getFieldValue("recipients");localStorage.setItem(_.V0.em_test_emails,JSON.stringify({...l,[F]:[...new Set(o)]})),(0,A.wB)(a("The email \u201c")+t.title+a("\u201d was successfully sent."),I)}q(!1),r.resetFields(),B((0,E.Oo)())}}),[L,r,F,D,W,U,B,t.title,H,a,I]),(0,l.useEffect)((()=>{H.isError&&((0,A.p6)(H,I),q(!1),r.resetFields(),B((0,E.Oo)()))}),[B,H,r,I]),(0,l.useEffect)((()=>{r.setFieldsValue({subject:t.subject||t.title})}),[t,r]),l.createElement(s.A,{width:572,title:l.createElement("div",null,l.createElement(h.A,{icon:"SendOutlined"})," ",a("Send a test email")),className:"blocks-modal",open:O,onCancel:()=>{B((0,E.Oo)()),r.resetFields()},centered:!0,footer:[l.createElement(d.Ay,{key:"submit",size:"large",className:"em-analytics__email-send-test",type:"primary",htmlType:"submit",form:"Send mail",loading:H.isLoading,icon:l.createElement(h.A,{icon:"SendOutlined",className:"email-preview-menu__list-item-icon"}),onClick:()=>{r.validateFields().then((()=>{const e={user_id:R.id,project_id:F,email_id:T,subject:r.getFieldValue("subject"),email:r.getFieldValue("recipients").join(","),html:(t=(null===X||void 0===X?void 0:X.getValue())||"",t.replace(/[\\]/g,"\\\\").replace(/["]/g,'\\"').replace(/[/]/g,"\\/").replace(/[\b]/g,"\\b").replace(/[\f]/g,"\\f").replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r").replace(/[\t]/g,"\\t"))};var t;N(e),q(!0)})).catch((e=>{}))},disabled:L.isLoading},a("Send"))],forceRender:!0},l.createElement(i.A,{form:r,layout:"vertical",name:"send_mail_form",initialValues:{subject:t.subject||t.title,recipients:[]},autoComplete:"off",style:{padding:"10px 24px 0"}},l.createElement(i.A.Item,{label:a("Subject"),name:"subject",rules:[{required:!1,message:a("Please type subject")}]},l.createElement(m.A,{size:"large",placeholder:a("Type subject")})),l.createElement(i.A.Item,{label:a("Recipients"),name:"recipients",tooltip:{title:a("The test email will be sent to the specified addresses."),icon:l.createElement(g.A,null)},rules:[{required:!0,validator:(e,t)=>t.length>10?Promise.reject(new Error(a("A test email can be sent to a maximum of 10 addresses."))):0!==t.length?t.every((e=>A.au.test(e.toLowerCase())))?Promise.resolve():Promise.reject(new Error(a("Please type correct emails"))):Promise.reject(new Error(a("Please type emails")))}]},l.createElement(c.A,{size:"large",mode:"tags",placeholder:a("Add up to 10 recipients"),tooltip:{title:"Tooltip with customize icon",icon:l.createElement(g.A,null)},options:W,tagRender:e=>{const{label:t,closable:a,onClose:o}=e;return l.createElement(u.A,{color:P.colorPrimary,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},closable:a,onClose:o,style:{borderRadius:6}},t)},getPopupContainer:()=>document.getElementById("send_mail_form")}))))};B.defaultProps={isModalVisible:!1,email:null};const T=B},45271:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var l=a(98173),o=a(2407),n=a.n(o),r=a(12543),i=a(64909),s=a(98845),d=a(68984),m=a(40277);const c=({element:e})=>{const{__:t,_x:a}=(0,r.s9)(),[o]=(0,s.dN)(),[n]=(0,d.OZ)(),c=(0,i.hN)(),u=(e,l)=>{if(e.error)return(0,m.p6)(e,c),!1;(0,m.wB)(t("The ")+(l.hasOwnProperty("type")?t("block"):a("email","letter"))+" "+t("\u201c")+e.data.title+t("\u201d")+t("was successfully")+" "+(l.lock?l.hasOwnProperty("type")?a("unlocked.","block"):a("unlocked.","email"):l.hasOwnProperty("type")?a("locked.","block"):a("locked.","email")),c)};return l.createElement("div",{className:e.hasOwnProperty("type")?"em-analytics__block-lock":"em-analytics__email-lock",onClick:()=>{e.hasOwnProperty("type")?n({blockId:e.id,lock:!e.lock}).then((t=>{u(t,e)})):o({emailId:e.id,lock:!e.lock}).then((t=>{u(t,e)}))}},e.lock?t("Unlock"):t("Lock"))};c.defaultProps={element:n().shape({lock:null,id:null})};const u=c},41882:(e,t,a)=>{"use strict";a.d(t,{A:()=>y});var l=a(98173),o=a(47555),n=a(63719),r=a(49856),i=a(13785),s=a(37969),d=a(30150),m=a(50078),c=a(12543),u=a(47091),p=a(79890),g=a(35895),b=a(40277),h=a(32947),E=a(96734);const{Content:f}=o.A,{Paragraph:v}=n.A,y=()=>{const{__:e}=(0,c.s9)(),{projectId:t,emailId:a}=(0,d.g)(),n=(0,E.p)();let y=(0,d.Zp)();const A=n.get(h.A9.em_template_email)||a;(0,l.useEffect)((()=>{document.body.classList.remove("editor")}),[]);const _=l.createElement(l.Fragment,null,l.createElement(r.A,{size:10},l.createElement(i.A,{title:e("To emails"),placement:"left"},l.createElement(s.Ay,{type:"text",icon:l.createElement(m.A,null),onClick:()=>(0,b.XZ)(y,`/projects/${t}`),shape:"circle"})),l.createElement(v,{className:"ant-page-header-heading-title"},e("Select email template")),l.createElement(p.A,{isBlocks:!1,templateEmailId:A}))),C=l.createElement(l.Fragment,null);return l.createElement(o.A,{className:"template-page"},l.createElement(g.A,{leftBlock:_,rightBlock:C}),l.createElement(f,{className:"template-page__container"},l.createElement("div",{className:"template-page__content container"},l.createElement(u.A,{projectId:h.p5,emailsView:h.Y$,templateEmailId:A}))))}},33932:(e,t,a)=>{"use strict";a.d(t,{EQ:()=>s,YG:()=>m,Zs:()=>i,gb:()=>d});var l=a(14721),o=a(39539),n=a(58521);const r="Ai",i=(0,l.xP)({reducerPath:"AiApi",tagTypes:[r],baseQuery:(0,n.hI)({baseUrl:"https://app.emailmaker.ru/api/wp-json/save-file/v1/"}),endpoints:e=>({sendMessage:e.mutation({queryFn:({body:e},t)=>(0,n.KU)(t).saveFile.ai_create(e,{type:o.cM.FormData})}),getDialog:e.query({queryFn:({entity_id:e,connection:t="chat"},a)=>(0,n.KU)(a).saveFile.ai_status_list({connection:t,entity_id:e}),providesTags:e=>null!==e&&void 0!==e&&e.documents?[...e.documents.map((({id:e})=>({type:r,id:e}))),{type:r,id:"LIST"}]:[{type:r,id:"LIST"}]})})}),{useSendMessageMutation:s,useGetDialogQuery:d,useLazyGetDialogQuery:m}=i},12744:(e,t,a)=>{"use strict";a.d(t,{Uu:()=>m,MN:()=>b,Ll:()=>p,y4:()=>g});var l=a(14721),o=a(58521),n=a(32947);var r=a(79596),i=a(18987),s=a(12352),d=a(3792);const m=(0,l.xP)({reducerPath:"AiApiGenerator",baseQuery:async(e,t,a)=>{const l=(0,o.KU)(t).baseUrl.replaceAll(/[\\/]$/g,""),n=(0,o.hI)({baseUrl:l});let r=await n(e,t,a);if(r.error){let e=r.error;if("function"===typeof e.json)try{e=await e.json()}catch{e=await e}return{error:e}}return r},endpoints:e=>({generateIdForTask:e.mutation({queryFn:(e,t)=>(0,o.u$)(t).tasks.tasksControllerCreateTask(e).then((e=>e))}),clearAiChat:e.query({queryFn:(e,t)=>(0,o.KU)(t).aiGenerator.clear_history_list(e).then((e=>e))}),getGeneratedContent:e.query({queryFn:e=>({data:[]}),async onCacheEntryAdded({id:e,setError:t},a){const{updateCachedData:l,cacheEntryRemoved:m}=a;let c=(0,o.KU)(a).baseUrl.indexOf("emailmaker")>=0?n.e3.maker:n.e3.blocks;const u=n.EW.isPlugin?await d.di.getInstance(a,s.Y):i.A.get(n.A9.em_token),p=u?{Authorization:`Bearer ${u}`}:{},g=new r.EventSourcePolyfill(`${c}/tasks/${e}`,{headers:p});g.onmessage=e=>{const t=JSON.parse(e.data);l((e=>{e.push(t)}))},g.onerror=e=>{t("Error connecting to EventSource"),g.close()},await m,g.close()}}),getAiGenerateStatus:e.mutation({query:e=>({url:"/constructor/v1/ai-save-task",method:"POST",body:e})})})}),{useGenerateIdForTaskMutation:c,useGetGeneratedContentQuery:u,useLazyClearAiChatQuery:p,useLazyGetGeneratedContentQuery:g,useGetAiGenerateStatusMutation:b}=m},8111:(e,t,a)=>{"use strict";a.d(t,{Jg:()=>m,z2:()=>u,HI:()=>p,vn:()=>b,kk:()=>g,Cf:()=>c});var l=a(14721),o=a(39539),n=a(93778),r=a(31926);function i({id:e,post:t,parent:a,author:l,content:o,acf:{status:n,target_id:i},...s}){return{...s,id:(0,r.WY)(e),post:(0,r.WY)(t),parent:(0,r.WY)(a),author:(0,r.WY)(l),content:(0,r.vf)(o),target_id:i,comment_status:n}}var s=a(58521);const d="Comments",m=(0,l.xP)({reducerPath:"commentsApi",tagTypes:[d],baseQuery:(0,s.hI)({baseUrl:"https://app.emailmaker.ru/api/wp-json/wp/v2/"}),endpoints:e=>({getComments:e.query({queryFn:function(e,t){return(0,s.KU)(t).wp.comments_list({post:[(0,r.mQ)(e)],per_page:50,order:"asc"}).then((0,n.Ih)(i))},providesTags:e=>e?[...e.map((({id:e})=>({type:d,id:e}))),{type:d,id:"LIST"}]:[{type:d,id:"LIST"}]}),addComment:e.mutation({queryFn({subjectId:e,author:t,parent:a,content:l,author_name:d,author_email:m,targetId:c},u){const p=(0,s.KU)(u),g={post:(0,r.mQ)(e),author:(0,r.mQ)(t),author_name:d,author_email:m},b={};return l&&(g.content=l),a&&(g.parent=(0,r.mQ)(a)),c&&(b["acf[target_id]"]=c),p.wp.comments_create(g,{type:o.cM.UrlEncoded,extraQuery:b}).then((0,n.SC)(i))},invalidatesTags:[{type:d,id:"LIST"}]}),deleteComment:e.mutation({queryFn:(e,t)=>(0,s.KU)(t).wp.comments_delete(e,{}).then((0,n.PI)(i)),invalidatesTags:[{type:d,id:"LIST"}]}),editComment:e.mutation({queryFn({commentId:e,content:t,status:a,targetId:l},r){const d=(0,s.KU)(r),m={},c={};return t&&(m.content=t),a&&(c["acf[status]"]=a),l&&(c["acf[targetId]"]=l),d.wp.comments_update(e,m,{type:o.cM.UrlEncoded,extraQuery:c}).then((0,n.SC)(i))},invalidatesTags:[{type:d,id:"LIST"}]}),deleteTarget:e.mutation({queryFn:(e,t)=>(0,s.KU)(t).wp.comments_delete(e,{},{extraQuery:{"acf[target_id]":""}}).then((0,n.PI)(i)),invalidatesTags:[{type:d,id:"LIST"}]})})}),{useGetCommentsQuery:c,useAddCommentMutation:u,useDeleteCommentMutation:p,useEditCommentMutation:g,useDeleteTargetMutation:b}=m},94160:(e,t,a)=>{"use strict";a.d(t,{C:()=>r,F:()=>n});var l=a(14721),o=a(27943);const n=(0,l.xP)({reducerPath:"confirmationMailApi",baseQuery:(0,o.cw)({baseUrl:"https://px0.emailmaker.ru/",responseHandler:e=>e.text()}),endpoints:e=>({getConfirmationMail:e.query({query:({userId:e,email:t})=>({url:`?proxy_url=${encodeURIComponent(`https://webhook.latenode.com/5868/prod/f0da9c0f-ed12-4d23-8a86-b86f7bf1a276?user_id=${e}&user_email=${t}`)}`})})})}),{useLazyGetConfirmationMailQuery:r}=n},98845:(e,t,a)=>{"use strict";a.d(t,{GY:()=>u,Kh:()=>v,Gr:()=>C,LX:()=>S,dN:()=>y,YV:()=>E,sl:()=>b,Xw:()=>p,PX:()=>g,YE:()=>f,_3:()=>h});var l=a(14721),o=a(39539),n=a(93207),r=a(31926);function i({id:e,title:t,acf:{html:a,common_styles:l},parent:o,excerpt:n,author:i,...s}){return{...s,author:(0,r.WY)(i),id:(0,r.WY)(e),parent:(0,r.WY)(o),title:(0,r.vf)(t)||"",html:a,common_styles:l,excerpt:(0,r.pT)(n)?n.rendered:n}}var s=a(58521),d=a(93778),m=a(50861),c=a(32947);const u=(0,l.xP)({reducerPath:"emailsApi",tagTypes:["Emails","Email","EmailAutosaves","TemplateEmail"],baseQuery:(0,s.hI)({baseUrl:"https://app.emailmaker.ru/api/wp-json/wp/v2/"}),endpoints:e=>({getEmails:e.query({queryFn(e,t){var a,l;const o=(0,s.KU)(t),r={order:"desc",orderby:"modified"},i={};if(e.notEmbed||(i._embed=""),e.projectId&&(i._embed="author",i._fields="id,title,emailtags,folder,group,modified,date,type,acf.lock,acf.project.ID,author,acf.is_template",r["filter[meta_key]"]="project",r["filter[meta_value]"]=e.projectId),e.fields&&(i._fields=e.fields),e.page&&(r.page=e.page),e.order&&(r.order=e.order),e.orderby&&(r.orderby=e.orderby),e.folderTag&&e.folderTag!==c.y2?(r["filter[tax_query][relation]"]="AND",r["filter[tax_query][0][taxonomy]"]="folder",r["filter[tax_query][0][field]"]="id",r["filter[tax_query][0][terms]"]=e.folderTag):e.folderTag===c.y2&&("object"!==typeof e.folderTag||null!==e.folderTag)||null!==(a=e.tags)&&void 0!==a&&a.length||!e.status||"trash"===e.status||(r["filter[tax_query][0][taxonomy]"]="folder",r["filter[tax_query][0][operator]"]="NOT EXISTS"),(null===(l=e.tags)||void 0===l?void 0:l.length)>0&&"trash"!==e.status){r["filter[tax_query][relation]"]="AND";for(let t=0,a=e.tags.length;t<a;t++){const a=e.tags[t];r[`filter[tax_query][${t+1}][taxonomy]`]="emailtags",r[`filter[tax_query][${t+1}][field]`]="id",r[`filter[tax_query][${t+1}][terms]`]=a}}return e.name&&(r.search=e.name),e.pageSize&&(r.per_page=e.pageSize),"trash"===e.status&&(i.status="trash"),o.wp.email_list(r,{extraQuery:i}).then((0,d.Ih)(n.V))},providesTags:(e,t,a,{response:l})=>{var o,n;const r=(null===l||void 0===l?void 0:l.headers.get("X-WP-Total"))||0;return e?[...e.map((({id:e})=>{var t;return{type:"Emails",id:`${a.folderTag||(null===(t=a.tags)||void 0===t?void 0:t[0])||a.projectId}_${a.page}_${a.status}_${r}`}})),{type:"Emails",id:`${a.folderTag||(null===(o=a.tags)||void 0===o?void 0:o[0])||a.projectId}_${a.page}_${a.status}_${r}`}]:[{type:"Emails",id:`${a.folderTag||(null===(n=a.tags)||void 0===n?void 0:n[0])||a.projectId}_${a.page}_${a.status}_${r}`}]},keepUnusedDataFor:0}),getTemplateEmails:e.query({queryFn(e,t){var a,l,o;const r=(0,s.KU)(t);let i={"filter[meta_query][1][key]":"is_template","filter[meta_query][1][value]":"1","filter[meta_query][0][compare]":"LIKE",orderby:"modified",order:"desc"};const m={_embed:"wp:term",_fields:"_embedded,id,title,emailtags,folder,group,modified,date,type,acf.lock,acf.project.ID,acf.is_template"};if(e.emailId&&(i["filter[meta_query][0][key]"]="parent_email",i["filter[meta_query][0][value]"]=e.emailId),e.fields&&(m._fields=e.fields),(null===(a=e.group)||void 0===a?void 0:a.length)>0||(null===(l=e.projectGroup)||void 0===l?void 0:l.length)>0){const t=[...e.group||[],...e.projectGroup||[]].reduce(((e,{key:t,parentId:a})=>(e[a]||(e[a]=[]),e[a].push(String(t)),e)),{}),a=Object.values(t).map((e=>e.sort()));i["filter[tax_query][relation]"]="AND",a.forEach(((e,t)=>{i[`filter[tax_query][${t}][relation]`]="OR",e.forEach(((e,a)=>{i[`filter[tax_query][${t}][${a}][taxonomy]`]="group",i[`filter[tax_query][${t}][${a}][field]`]="id",i[`filter[tax_query][${t}][${a}][terms]`]=e}))}))}if((null===(o=e.tags)||void 0===o?void 0:o.length)>0){i["filter[tax_query][relation]"]="AND";for(let t=0,a=e.tags.length;t<a;t++){const a=e.tags[t];i[`filter[tax_query][${t}][taxonomy]`]="emailtags",i[`filter[tax_query][${t}][field]`]="id",i[`filter[tax_query][${t}][terms]`]=a}}if(e.type&&(i["filter[meta_query][2][key]"]="type",i["filter[meta_query][2][value]"]=e.type),e.name&&(i.search=e.name),e.pageSize&&(i.per_page=e.pageSize),e.page){var u,p;i.page=e.page;const a=t.getState(),{groupsTemplateProjectTotal:l,groupsTemplateProjectTotalPages:o}=null===a||void 0===a?void 0:a.projectSlice;if((null===(u=e.projectGroup)||void 0===u||!u.length)&&(null===(p=e.group)||void 0===p||!p.length)&&o<e.page&&e.groupType===c.ti.ALL&&l&&o&&!e.projectId){const t=c.mU-l%c.mU+(e.page-(o+1))*c.mU;t&&(i.page=1,i.offset=t)}}return e.projectId&&(i["filter[meta_key]"]="project",i["filter[meta_value]"]=e.projectId),r.wp.email_list(i,{extraQuery:m}).then((0,d.Ih)(n.V))},keepUnusedDataFor:0}),getEmail:e.query({queryFn:(e,t)=>(0,s.KU)(t).wp.email_detail({id:(0,r.mQ)(e)},{extraQuery:{_embed:"wp:term",_fields:"_embedded,id,author,title,emailtags,folder,group,modified,date,type,parent,date_gmt\n acf.description,\n acf.html,\n acf.common_styles,\n acf.is_template,\n acf.lock,\n acf.parent_email,\n acf.project,\n acf.secret_hash,\n acf.subject,\n acf.utm_parameters\n "}}).then((0,d.SC)(n.V)),providesTags:(e,t,a)=>[{type:"Email",id:a}],keepUnusedDataFor:0}),getTemplateEmail:e.query({queryFn:(e,t)=>(0,s.KU)(t).wp.email_detail({id:(0,r.mQ)(e)},{extraQuery:{_embed:"wp:term",_fields:"_embedded,id,author,title,emailtags,folder,group,modified,date,type,parent,date_gmt\n acf.description,\n acf.html,\n acf.common_styles,\n acf.is_template,\n acf.lock,\n acf.parent_email,\n acf.project,\n acf.secret_hash,\n acf.subject,\n acf.utm_parameters\n "}}).then((0,d.SC)(n.V)),providesTags:(e,t,a)=>[{type:"TemplateEmail",id:a}],keepUnusedDataFor:0}),getEmailHistory:e.query({queryFn:({emailId:e,page:t=1},a)=>(0,s.KU)(a).wp.email_revisions_detail({parent:e,per_page:20,page:t},{extraQuery:{_fields:"author,slug,date,modified,title,acf.html,acf.common_styles,id,parent,date_gmt"}}).then((a=>(0,d.SA)(a,((a,l)=>({data:a.filter((e=>e.acf.html)).map((e=>({...e,acf:{...e.acf,html:e.acf.html}}))).map(i),totalPages:+l.response.headers.get("X-WP-TotalPages"),args:{emailId:e,page:t}}))))),providesTags:e=>e?[...e.data.map((({id:e})=>({type:"EmailAutosaves",id:e}))),{type:"EmailAutosaves",id:"LIST"}]:[{type:"EmailAutosaves",id:"LIST"}],keepUnusedDataFor:0}),addEmail:e.mutation({queryFn:(0,m.p)((e=>({source:t,...a})=>(0,s.KU)(e).wp.email_create({status:"publish",...(0,n.v)(a)},{type:o.cM.Json}).then((0,d.SC)(n.V)))),invalidatesTags:[{type:"Emails",id:"LIST"}]}),editEmail:e.mutation({queryFn:(0,m.p)((e=>({emailId:t,source:a,...l})=>{const i=(0,s.KU)(e),m=(0,r.TB)((0,n.v)(l));return i.wp.email_partial_update(t,m,{type:o.cM.Json,extraQuery:{_embed:"wp:term",_fields:"_embedded,id,author,title,emailtags,folder,group,modified,date,type,acf.description,acf.html,acf.common_styles,acf.is_template,acf.lock,acf.parent_email,acf.project,acf.secret_hash,acf.subject,acf.utm_parameters"}}).then((0,d.SC)(n.V))}))}),deleteEmail:e.mutation({queryFn(e,t){const a=(0,s.KU)(t);let l,o;return"object"===typeof e?(l=e.id,o=e.force):(l=e,o=!1),a.wp.email_delete(l,{force:o}).then((0,d.PI)(n.V))},invalidatesTags:(e,t,a)=>[{type:"Emails",id:a}]}),addTag:e.mutation({queryFn:(e,t)=>(0,s.KU)(t).wp.emailtags_create({...e},{type:o.cM.Json})}),getDeletableTag:e.query({queryFn:([e,t],a)=>(0,s.KU)(a).wp.email_list({status:["private"],"filter[meta_key]":"project","filter[meta_value]":e,emailtags:[t]},{extraQuery:{"_fields[]":"emailtags"}}).then((0,d.Ih)(n.V))}),autoSaveEmail:e.mutation({queryFn({emailId:e,body:t},a){const l=(0,s.KU)(a),n=function({parent:e,title:t,html:a,project:l,subject:o,preheader:n,common_styles:i,author:s,parent_email:d,...m}){return{...m,author:(0,r.mQ)(s),title:t,parent:(0,r.mQ)(e),"acf[html]":a,"acf[project]":l,"acf[parent_email]":d,"acf[common_styles]":i}}(t);return l.wp.email_autosaves_create(e,n,{type:o.cM.FormData}).then((0,d.SC)(i))}})})}),{useGetEmailsQuery:p,useGetTemplateEmailsQuery:g,useGetEmailQuery:b,useLazyGetEmailQuery:h,useGetEmailHistoryQuery:E,useLazyGetEmailHistoryQuery:f,useAddEmailMutation:v,useEditEmailMutation:y,useDeleteEmailMutation:A,useGetDeletableTagQuery:_,useAddTagMutation:C,useAutoSaveEmailMutation:S}=u},38251:(e,t,a)=>{"use strict";a.d(t,{U8:()=>r,cA:()=>s,ri:()=>i});var l=a(27943),o=a(14721),n=a(40277);const r=(0,o.xP)({reducerPath:"exportPngApi",baseQuery:async(e,t,a)=>{try{const{notification:o,...n}=e,r=await(0,l.cw)({baseUrl:"https://racs.rest/v3"})(n,t,a);if(r.error)throw new Error;return r}catch(o){const t=null===e||void 0===e?void 0:e.notification;return(0,n.p6)(o,t),{error:o}}},endpoints:e=>({makeTemporaryMailForPng:e.mutation({query:({file:e,title:t,notification:a})=>{const l=new Blob([e],{type:"text/html"}),o=new FormData;return o.append("file",l,"base.html"),o.append("contentType","text/html"),{url:"?resource=exportPngApi",method:"POST",body:o,notification:a}}}),deleteTemporaryMail:e.mutation({query:({id:e,notification:t})=>({url:`/${e}?resource=exportPngApi`,method:"DELETE",notification:t})})})}),{useMakeTemporaryMailForPngMutation:i,useDeleteTemporaryMailMutation:s}=r},30397:(e,t,a)=>{"use strict";a.d(t,{C:()=>n,N:()=>r});var l=a(14721),o=a(27943);const n=(0,l.xP)({reducerPath:"webHookApi",baseQuery:(0,o.cw)({baseUrl:"https://px0.emailmaker.ru/"}),endpoints:e=>({postDataByWebHook:e.mutation({query:({url:e,body:t})=>({url:`?proxy_url=${encodeURIComponent(e)}`,method:"POST",body:t})})})}),{usePostDataByWebHookMutation:r}=n},64706:(e,t,a)=>{"use strict";a.d(t,{N:()=>r,m:()=>i});var l=a(27943),o=a(14721),n=a(40277);const r=(0,o.xP)({reducerPath:"htmlToPdfPlusApi",baseQuery:async(e,t,a)=>{try{const{notification:o,...n}=e,r=await(0,l.cw)({baseUrl:"https://html2pdf.emcdn.ru/convert/html-to-pdf"})(n,t,a);if(r.error)throw new Error;return r}catch(o){const t=null===e||void 0===e?void 0:e.notification;return(0,n.p6)(o,t),{error:o}}},endpoints:e=>({generateHtmlToPdf:e.mutation({query:({htmlContent:e,notification:t})=>({url:"",method:"POST",body:e,notification:t,responseHandler:e=>e.blob()})})})}),{useGenerateHtmlToPdfMutation:i}=r},871:(e,t,a)=>{"use strict";a.d(t,{CL:()=>c,FQ:()=>u,Jg:()=>A,Mv:()=>E,eo:()=>C,gg:()=>w,h4:()=>b});var l=a(14721),o=a(79596),n=a(39539),r=a(58521),i=a(18987),s=a(32947),d=a(12352),m=a(3792);const c=(0,l.xP)({reducerPath:"imageApi",baseQuery:void 0,endpoints:e=>({getImageInfo:e.query({queryFn:async function(e,t){try{var a,l;const o=(null===(a=t.getState().configSlice)||void 0===a||null===(l=a.config)||void 0===l?void 0:l.imageInfoToolUrl)||"https://scr.emcdn.ru/imageinfo",n=await fetch(`${o}?url=${encodeURIComponent(e)}`);return{data:await n.json()}}catch(o){}}}),getSearchImage:e.query({queryFn:async function({query:e,page:t}){const a=e.keywords.replace(/[^\w\d\s\u0430-\u044f\u0451\u0410-\u042f\u0401]|_/g,"").replace(/[\s_-]+/g," ");try{let l=`https://api.unsplash.com/search/photos?client_id=S5iNcLqYgRBIOLQdluHdTsCJnjCvahzhG7JfYQOrV7o&lang=ru&per_page=18&query=${a}&page=${t}`;""!==e.color&&(l+=`&color=${e.color}`),""!==e.orientation&&(l+=`&orientation=${e.orientation}`);const o=await fetch(l);return{data:await o.json()}}catch(l){}}}),getUnsplashImage:e.query({queryFn:async function(e){try{const t=await fetch(`${e}&client_id=S5iNcLqYgRBIOLQdluHdTsCJnjCvahzhG7JfYQOrV7o`);return{data:await t.json()}}catch(t){}}}),sendAiImageRequest:e.query({queryFn:async function({body:e},t){try{const a=(0,r.KU)(t);return await a.saveFile.ai_create(e,{type:n.cM.FormData})}catch(a){throw new Error(a)}}}),getAiImage:e.query({queryFn:async function(e,t){try{const a=(0,r.KU)(t);return await a.saveFile.ai_status_list(e)}catch(a){}}}),getAiImageSSE:e.query({queryFn:e=>({data:[]}),async onCacheEntryAdded({task_id:e,entity_id:t,setError:a},l){const{updateCachedData:n,cacheEntryRemoved:c}=l;let u=(0,r.KU)(l).baseUrl.indexOf("emailmaker")>=0?s.Rn.maker:s.Rn.blocks;const p=s.EW.isPlugin?await m.di.getInstance(l,d.Y):i.A.get(s.A9.em_token),g=p?{Authorization:`Bearer ${p}`}:{},b=new o.EventSourcePolyfill(` ${u}/wp-json/ai-generator/v1/ai-status?entity_id=${t}&stream=1&task_id=${e}`,{headers:g});b.onmessage=e=>{const t=JSON.parse(e.data);n((e=>{e.push(t)})),100===t.progress&&b.close()},b.onerror=e=>{b.close()},await c,b.close()}}),getSearchGif:e.query({queryFn:async function({query:e,page:t}){const a=e.keywords.replace(/[^\w\d\s\u0430-\u044f\u0451\u0410-\u042f\u0401]|_/g,"").replace(/[\s_-]+/g," ");try{let e=`https://api.giphy.com/v1/gifs/search?api_key=Nh77eBlPeMn1ed9MBAvL542NUGeNO26F&q=${a}&limit=25&offset=${t}&lang=en`;const l=await fetch(e);return{data:await l.json()}}catch(l){}}})})}),{useLazyGetImageInfoQuery:u,useGetImageInfoQuery:p,useGetSearchImageQuery:g,useLazyGetSearchImageQuery:b,useSendAiImageRequestQuery:h,useLazySendAiImageRequestQuery:E,useGetAiImageQuery:f,useLazyGetAiImageQuery:v,useGetUnsplashImageQuery:y,useLazyGetUnsplashImageQuery:A,useGetSearchGifQuery:_,useLazyGetSearchGifQuery:C,useGetAiImageSSEQuery:S,useLazyGetAiImageSSEQuery:w}=c},12005:(e,t,a)=>{"use strict";a.d(t,{Ad:()=>i,HO:()=>c,Yj:()=>m});var l=a(14721),o=a(27943),n=a(58521);const r="LOCALES",i=(0,l.xP)({reducerPath:"localesApi",tagTypes:[r],baseQuery:(0,o.cw)({baseUrl:"https://app.emailmaker.ru/api/wp-json/translations/v1"}),endpoints:e=>({getLocale:e.query({async queryFn({id:e},t){const a=(0,n.KU)(t);try{return await a.translations.get_translations3(e,"react_app")}catch(l){return a.translations.get_translations3("en_US","react_app")}},providesTags:(e,t,a)=>[{type:r,id:a}]}),getLocales:e.query({queryFn:function(e,t){return(0,n.KU)(t).translations.get_translations2("react_app")},providesTags:(e,t,a)=>[{type:r,id:"react_app"}]})})}),{useGetLocalesQuery:s,useGetLocaleQuery:d,useLazyGetLocaleQuery:m,useLazyGetLocalesQuery:c}=i},15422:(e,t,a)=>{"use strict";a.d(t,{F:()=>r,Y:()=>n});var l=a(31926),o=a(39218);function n({id:e,type:t,title:a,excerpt:n,author:r,acf:{subject:i,description:s,html:d,project:m,related_email:c,tags:u,type:p,is_template:g,lock:b},...h}){return{...h,id:String(e),author:String(r),renderGuid:(0,o.l)(),description:s,html:d,excerpt:(0,l.vf)(a),project:(0,l.pT)(m)?m.ID:m,project_author:(0,l.pT)(m)?m.post_author:void 0,project_title:(0,l.pT)(m)?m.post_title:void 0,tags:u,is_template:g,type:p,related_email:(0,l.WY)((0,l.pT)(c)?c.ID:c),title:(0,l.vf)(a)||"",lock:b}}function r({title:e,subject:t,description:a,renderGuid:o,html:n,project:r,tags:i,type:s,related_email:d,is_template:m,lock:c,author:u,...p}){return{...p,author:(0,l.mQ)(u),title:e,acf:{description:a,related_email:(0,l.mQ)(d),html:n,project:r,tags:i,type:s,is_template:m,lock:c}}}},98664:(e,t,a)=>{"use strict";a.d(t,{n:()=>o});var l=a(31926);function o({parent:e,title:t,html:a,project:o,author:n,...r}){return{...r,author:(0,l.mQ)(n),parent:(0,l.mQ)(e),title:(0,l.vf)(t),"acf[html]":a,"acf[project]":o}}},17487:(e,t,a)=>{"use strict";a.d(t,{H:()=>o});var l=a(31926);function o({id:e,title:t,acf:{html:a},excerpt:o,parent:n,author:r,...i}){return{...i,id:(0,l.WY)(e),author:(0,l.WY)(r),parent:(0,l.WY)(n),title:(0,l.vf)(t)||"",html:a,excerpt:(0,l.pT)(o)?o.rendered:o}}},93207:(e,t,a)=>{"use strict";a.d(t,{V:()=>n,v:()=>r});var l=a(31926),o=a(39218);function n({id:e,title:t,type:a,guid:n,acf:{lock:r,subject:i,description:s,html:d,project:m,tags:c,utm_parameters:u,parent_email:p,common_styles:g,is_template:b},author:h,...E}){return{...E,id:(0,l.WY)(e),author:(0,l.WY)(h),title:(0,l.vf)(t)||"",lock:r,renderGuid:(0,o.l)(),description:s,html:d,project:(0,l.pT)(m)?m.ID:m,project_author:(0,l.pT)(m)?m.post_author:void 0,project_title:(0,l.pT)(m)?m.post_title:void 0,tags:c,utm_parameters:u,parent_email:(0,l.WY)(p instanceof Array&&p[0]?p[0].ID:p),common_styles:g,is_template:b}}function r({title:e,lock:t,subject:a,description:o,html:n,project:r,tags:i,renderGuid:s,utm_parameters:d,parent_email:m,common_styles:c,is_template:u,author:p,...g}){return{...g,author:(0,l.mQ)(p),title:e,acf:{lock:t,description:o,html:n,project:r,tags:i,utm_parameters:d,parent_email:(0,l.mQ)(m),common_styles:c,is_template:u}}}},16618:(e,t,a)=>{"use strict";a.d(t,{b:()=>n,d:()=>o});var l=a(31926);function o({title:e,acf:{members:t,projects_test_emails:a,ftp_settings:o,emails:n,blocks:r,webhook:i},...s}){return{...s,title:(0,l.vf)(e)||"",members:(0,l.pT)(t)?{admins:t.admins&&t.admins.map((e=>({...e,ID:(0,l.WY)(e.ID)}))),users:t.users&&t.users.map((e=>({...e,ID:(0,l.WY)(e.ID)}))),invited_users:t.invited_users&&t.invited_users.map((e=>({...e,ID:(0,l.WY)(e.ID)}))),owner:(0,l.pT)(t.owner)?{...t.owner,ID:(0,l.WY)(t.owner.ID)}:t.owner}:void 0,projects_test_emails:a,ftp_settings:o,webhook:i,emails:n,blocks:r}}function n({title:e,members:t,projects_test_emails:a,ftp_settings:o,webhook:n,emails:r,blocks:i,...s}){const d=e=>({ID:(0,l.mQ)(e.ID||e)}),m=e=>{return(t=e,Array.isArray(t)?t:t?[t]:[]).map(d);var t};return{...s,title:e,acf:{members:t&&{admins:m(t.admins),users:m(t.users),invited_users:m(t.invited_users),owner:t.owner&&d(t.owner)},webhook:n,projects_test_emails:a,ftp_settings:o,emails:r,blocks:i}}}},68936:(e,t,a)=>{"use strict";a.d(t,{i:()=>o});var l=a(31926);function o({title:e,acf:{limits:t,price:a},...o}){return{...o,title:(0,l.vf)(e)||"",limits:t,price:a}}},71676:(e,t,a)=>{"use strict";a.d(t,{F:()=>o,L:()=>n});var l=a(31926);function o({acf:{autosaves:e,hide_mergetags:t,theme:a,newsletter_consent:o,code_editor:n,counters:r,subscription:i,subscription_end:s,recurring_payments:d,subscription_id:m,promocode:c,subscription_amount:u,enterprise_users_limit:p,enterprise_price:g,enterprise_12_price:b,privacy_policy_agreement:h,last_used_project:E,email_confirmation:f,email_builder_config:v},id:y,...A}){return{...A,id:(0,l.WY)(y),autosaves:e,hide_mergetags:t,theme:a,newsletter_consent:o,code_editor:n?{...n,font_size:Number(n.font_size)}:void 0,counters:Object.keys(r).reduce(((e,t)=>(e[t]=Number(r[t]),e)),{}),subscription:i,subscription_end:s,recurring_payments:d,subscription_id:m,promocode:c,subscription_amount:u,enterprise_users_limit:p,enterprise_price:g,enterprise_12_price:b,privacy_policy_agreement:h,last_used_project:E,email_confirmation:f,email_builder_config:v}}function n({autosaves:e,theme:t,newsletter_consent:a,code_editor:o,counters:n,subscription:r,subscription_end:i,recurring_payments:s,subscription_id:d,promocode:m,subscription_amount:c,enterprise_users_limit:u,enterprise_price:p,enterprise_12_price:g,privacy_policy_agreement:b,locale:h,last_used_project:E,email_confirmation:f,email_builder_config:v,id:y,...A}){return{...A,id:(0,l.mQ)(y),locale:h,acf:{autosaves:e,theme:t,newsletter_consent:a,code_editor:o?{...o,font_size:String(o.font_size)}:void 0,counters:n,subscription:r,subscription_end:i,recurring_payments:s,subscription_id:d,promocode:m,subscription_amount:c,enterprise_users_limit:u,enterprise_price:p,enterprise_12_price:g,privacy_policy_agreement:b,last_used_project:E,email_confirmation:f,email_builder_config:v}}}},31926:(e,t,a)=>{"use strict";function l(e,t=!1){const a={};for(const o of Object.keys(e)){let n=e[o];void 0===n||"number"===typeof n&&Number.isNaN(n)||(t&&"object"===typeof n&&null!==n&&(n=l(n)),a[o]=n)}return a}function o(e){return"object"===typeof e&&e}function n(e){const t=Number(e);return isNaN(t)?e:t}function r(e){return"number"===typeof e?String(e):e}function i(e){return"object"===typeof e?e.rendered:e}a.d(t,{TB:()=>l,WY:()=>r,mQ:()=>n,pT:()=>o,vf:()=>i})},705:(e,t,a)=>{"use strict";a.d(t,{vx:()=>m,I9:()=>c,bw:()=>u});var l=a(14721),o=a(39539),n=a(93778),r=a(31926);function i({title:e,content:t,acf:{seen:a,type:l},...o}){return{...o,seen:a,type:l,title:(0,r.vf)(e),content:t}}var s=a(58521);const d="Notifications",m=(0,l.xP)({reducerPath:"notificationsApi",tagTypes:[d],baseQuery:(0,s.hI)({baseUrl:"https://app.emailmaker.ru/api/wp-json/wp/v2/"}),endpoints:e=>({getNotifications:e.query({queryFn:(e,t)=>(0,s.KU)(t).wp.notification_list({author:[Number(e)]}).then((0,n.Ih)(i)),providesTags:e=>e?[...e.map((({id:e})=>({type:d,id:e}))),{type:d,id:"LIST"}]:[{type:d,id:"LIST"}]}),notificationShown:e.mutation({queryFn:({id:e,datetime:t},a)=>(0,s.KU)(a).wp.notification_create2(e,{},{type:o.cM.Json,extraQuery:{"acf[seen]":t}}).then((0,n.SC)(i)),invalidatesTags:[{type:d,id:"LIST"}]})})}),{useGetNotificationsQuery:c,useNotificationShownMutation:u}=m},2952:(e,t,a)=>{"use strict";a.d(t,{Ju:()=>s,Sr:()=>d,ku:()=>i,tO:()=>r});var l=a(14721),o=a(58521);const n="Optimise",r=(0,l.xP)({reducerPath:"optimiseApi",tagTypes:[n],baseQuery:async(e,t,a)=>{const l=(0,o.KU)(t).baseUrl.replaceAll(/[\\/]$/g,""),n=(0,o.hI)({baseUrl:`${l}/optimization/v1/validate`});let r=await n(e,t,a);if(r.error){let e=r.error;if("function"===typeof e.json)try{e=await e.json()}catch{e=await e}return{error:e}}return r},endpoints:e=>({editLinks:e.mutation({query:e=>({headers:{"Content-Type":"application/json",Accept:"application/json"},method:"POST",type:"application/json",url:"/links",body:e}),invalidatesTags:[n]}),editImages:e.mutation({query:e=>({headers:{"Content-Type":"application/json",Accept:"application/json"},method:"POST",type:"application/json",url:"/images",body:e})}),editSpam:e.mutation({query:e=>({headers:{"Content-Type":"application/json",Accept:"application/json"},method:"POST",type:"application/json",url:"/spamassasin",body:e})})})}),{useEditLinksMutation:i,useEditImagesMutation:s,useEditSpamMutation:d}=r},59089:(e,t,a)=>{"use strict";a.d(t,{So:()=>n});var l=a(14721),o=a(58521);const n=(0,l.xP)({reducerPath:"promoApi",baseQuery:(0,o.hI)({baseUrl:"https://app.emailmaker.ru/api/wp-json/promo/v1/"}),endpoints:e=>({checkPromo:e.mutation({queryFn:({code:e,type:t},a)=>(0,o.KU)(a).promo.set_code_create({code:e,type:t})}),getPromoInfo:e.query({queryFn:({code:e},t)=>(0,o.KU)(t).promo.get_code_info_list({code:e})})})}),{useCheckPromoMutation:r,useGetPromoInfoQuery:i}=n},92960:(e,t,a)=>{"use strict";a.d(t,{Z8:()=>n,mI:()=>i});var l=a(14721),o=a(58521);const n=(0,l.xP)({reducerPath:"proxyApi",tagTypes:["Proxy"],baseQuery:(0,o.hI)({baseUrl:"https://app.emailmaker.ru/api/wp-json/cors-proxy/v1/get"}),endpoints:e=>({getFile:e.query({queryFn({url:e,tryFetch:t=!0,type:a},l){const n=(0,o.KU)(l),r=t?fetch(e):Promise.reject(),i=e=>(e=>{switch(a){case"json":return e.json();case"text":return e.text();default:return e.blob()}})(e).then((e=>({data:e})));return r.then((e=>i(e))).catch((()=>n.corsProxy.get_list({format:"blob",extraQuery:{url:encodeURIComponent(e)}})))}})})}),{useGetFileQuery:r,useLazyGetFileQuery:i}=n},40835:(e,t,a)=>{"use strict";a.d(t,{Zf:()=>d,dS:()=>i,lg:()=>s,tb:()=>m,yH:()=>r});var l=a(14721),o=a(39539),n=a(58521);const r=(0,l.xP)({reducerPath:"saveFileApi",tagTypes:["Images"],baseQuery:(0,n.hI)({baseUrl:"https://app.emailmaker.ru/api/wp-json/save-file/v1/"}),endpoints:e=>({uploadImage:e.mutation({queryFn:(e,t)=>(0,n.KU)(t).saveFile.upload_create(e,{type:o.cM.FormData})}),sendTestEmail:e.mutation({queryFn:(e,t)=>(0,n.KU)(t).saveFile.send_email_create(e,{type:o.cM.FormData})}),sendLivePreview:e.mutation({queryFn:(e,t)=>(0,n.KU)(t).saveFile.get_link_create(e,{type:o.cM.FormData})}),sendShortLink:e.mutation({queryFn:(e,t)=>(0,n.KU)(t).saveFile.shortener_create(e,{type:o.cM.FormData})})})}),{useUploadImageMutation:i,useSendTestEmailMutation:s,useSendLivePreviewMutation:d,useSendShortLinkMutation:m}=r},53774:(e,t,a)=>{"use strict";a.d(t,{i:()=>n,$:()=>o});const l={pro:{config:{mode:"pro",autosaveTimeout:1e4,theme:"",themes:{},mergeTags:void 0,styles:"",revisionService:!1,headerShow:!0,headerTitleVisible:!0,headerPreheaderVisible:!0,headerArrowBackVisible:!0,historyEnabled:!0,codeEnabled:!0,codeSideEnabled:!0,previewIconEnabled:!0,previewModeEnabled:!0,livePreviewEnabled:!0,sendTestEnabled:!0,sharePreviewEnabled:!0,webversionEnabled:!0,emailDropdownMenuEnabled:!0,emailDropdownMenuClone:!0,emailDropdownMenuImport:!0,emailDropdownMenuLock:!0,emailDropdownMenuRemove:!0,emailExportEnabled:!0,exportHtmlEnabled:!0,exportZipEnabled:!0,exportClipboardEnabled:!0,exportWebHookEnabled:!0,exportOutlookEnabled:!0,exportPdfEnabled:!0,exportPngEnabled:!0,nextButtonEnabled:!1,nextButtonText:"",saveButtonEnabled:!0,saveButtonText:"",commandButtonsEnabled:!0,emailIdShow:!1,sidePanelFloating:!0,desktopMobileSwitchRule:!0,desktopMobileSwitchPanel:!1,onlyCodeModeInMobile:!1,pathEnabled:!0,copyPasteEnabled:!0,saveBlockEnabled:!0,editImageControlEnabled:!0,lockEditor:!1,menuDirection:"right",defaultBuildPanel:"",commentsEnabled:!0,aiAssistentEnabled:!0,optimizeEnabled:!0,optimizeLinksEnabled:!0,optimizeImagesEnabled:!0,optimizeSpamAssassinEnabled:!0,optimizeCheckCodeEnabled:!0,settingsEnabled:!0,UTMEnabled:!0,subjectEnabled:!0,preheaderEnabled:!0,descriptionEnabled:!0,tagsEnabled:!0,isTemplateEnabled:!0,switchDesktopMobilePropsEnabled:!0,stepToOtherElementEnabled:!0,deleteButtonEnabled:!0,toggleSidePanel:!0,blocksSectionsShow:!0,blocksEmptyEnabled:!0,blocksSavedEnabled:!0,blocksCommonEnabled:!0,blocksTemplateEnabled:!0,blocksSearchEnabled:!0,blocksAddPanelEnabled:!0,imagePathDropdownEnabled:!0,formFieldImageTitleEnabled:!0,formFieldBorderEnabled:!0,formFieldBorderRadiusEnabled:!0,formFieldBoxShadowEnabled:!0,formFieldVisibilityEnabled:!0,formFieldExportAsPictureEnabled:!0,emailPaneDesktopSize:0,formButtonFieldInsertImageEnabled:!0,formButtonFieldVerticalAlignEnabled:!0,formButtonFieldTextAlignEnabled:!0,formButtonFieldBackgroundImageEnabled:!0,formButtonFieldPaddingsEnabled:!0,formCellFieldVerticalAlignEnabled:!0,formCellFieldBackgroundImageEnabled:!0,formCellFieldPaddingsEnabled:!0,formLinkFieldInsertImageEnabled:!0,formTableFieldBackgroundImageEnabled:!0,formDivFieldBackgroundImageEnabled:!0,formEmailFieldBackgroundImageEnabled:!0,elementImageEnabled:!0,elementTextEnabled:!0,elementHeaderEnabled:!0,elementButtonEnabled:!0,elementListULEnabled:!0,elementListOLEnabled:!0,elementDividerEnabled:!0,elementSpacerEnabled:!0,elementSocialEnabled:!0,elementTableEnabled:!0,elementCountdownEnabled:!0,elementVideoEnabled:!0,elementAIimageEnabled:!0,elementAItextEnabled:!0,elementCarouselEnabled:!0,elementAccordionEnabled:!0,elementFormEnabled:!0,preventSendDataToEM:!1,imageInfoToolUrl:"",imageCenterStockEnabled:!0,imageCenterGifEnabled:!0,imageCenterEditorEnabled:!0,compressMaxSize:.7,compressMaxWidthOrHeight:2e3,ampExportEnabled:!0,formFieldAmpVisibilityEnabled:!0,testEmails:[],pushToGTM:!0},project:void 0,page:{isNew:!0,type:"email",project:0,id:""}},editor:{config:{mode:"editor",autosaveTimeout:1e4,theme:"",themes:{},mergeTags:void 0,styles:"",headerShow:!0,headerTitleVisible:!0,headerPreheaderVisible:!0,headerArrowBackVisible:!0,historyEnabled:!0,codeEnabled:!0,codeSideEnabled:!0,previewIconEnabled:!0,previewModeEnabled:!0,livePreviewEnabled:!0,sendTestEnabled:!0,sharePreviewEnabled:!0,webversionEnabled:!0,emailDropdownMenuEnabled:!0,emailDropdownMenuClone:!0,emailDropdownMenuImport:!0,emailDropdownMenuLock:!0,emailDropdownMenuRemove:!0,emailExportEnabled:!0,exportHtmlEnabled:!0,exportZipEnabled:!0,exportClipboardEnabled:!0,exportWebHookEnabled:!0,exportOutlookEnabled:!0,exportPdfEnabled:!0,exportPngEnabled:!0,nextButtonEnabled:!1,nextButtonText:"",saveButtonEnabled:!0,saveButtonText:"",commandButtonsEnabled:!0,emailIdShow:!1,sidePanelFloating:!0,desktopMobileSwitchRule:!0,desktopMobileSwitchPanel:!1,onlyCodeModeInMobile:!1,pathEnabled:!0,copyPasteEnabled:!0,saveBlockEnabled:!1,editImageControlEnabled:!0,lockEditor:!1,menuDirection:"right",defaultBuildPanel:"",commentsEnabled:!0,aiAssistentEnabled:!0,optimizeEnabled:!0,optimizeLinksEnabled:!0,optimizeImagesEnabled:!0,optimizeSpamAssassinEnabled:!0,optimizeCheckCodeEnabled:!0,settingsEnabled:!0,UTMEnabled:!0,subjectEnabled:!0,preheaderEnabled:!0,descriptionEnabled:!0,tagsEnabled:!0,isTemplateEnabled:!0,switchDesktopMobilePropsEnabled:!0,stepToOtherElementEnabled:!0,deleteButtonEnabled:!0,toggleSidePanel:!0,blocksSectionsShow:!0,blocksEmptyEnabled:!0,blocksSavedEnabled:!0,blocksCommonEnabled:!0,blocksTemplateEnabled:!0,blocksSearchEnabled:!0,blocksAddPanelEnabled:!0,imagePathDropdownEnabled:!0,formFieldImageTitleEnabled:!0,formFieldBorderEnabled:!1,formFieldBorderRadiusEnabled:!1,formFieldBoxShadowEnabled:!1,formFieldVisibilityEnabled:!1,formFieldExportAsPictureEnabled:!1,emailPaneDesktopSize:0,formButtonFieldInsertImageEnabled:!0,formButtonFieldVerticalAlignEnabled:!0,formButtonFieldTextAlignEnabled:!0,formButtonFieldBackgroundImageEnabled:!0,formButtonFieldPaddingsEnabled:!0,formCellFieldVerticalAlignEnabled:!0,formCellFieldBackgroundImageEnabled:!0,formCellFieldPaddingsEnabled:!1,formLinkFieldInsertImageEnabled:!0,formTableFieldBackgroundImageEnabled:!0,formDivFieldBackgroundImageEnabled:!0,formEmailFieldBackgroundImageEnabled:!0,elementImageEnabled:!0,elementTextEnabled:!0,elementHeaderEnabled:!0,elementButtonEnabled:!0,elementListULEnabled:!0,elementListOLEnabled:!0,elementDividerEnabled:!0,elementSpacerEnabled:!0,elementSocialEnabled:!0,elementTableEnabled:!0,elementCountdownEnabled:!0,elementVideoEnabled:!0,elementAIimageEnabled:!0,elementAItextEnabled:!0,elementCarouselEnabled:!0,elementAccordionEnabled:!0,elementFormEnabled:!0,preventSendDataToEM:!1,imageInfoToolUrl:"",imageCenterStockEnabled:!0,imageCenterGifEnabled:!0,imageCenterEditorEnabled:!0,compressMaxSize:.7,compressMaxWidthOrHeight:2e3,ampExportEnabled:!0,formFieldAmpVisibilityEnabled:!0,testEmails:[],pushToGTM:!0},project:void 0,page:{isNew:!1,type:"email",project:0,id:""}},simple:{config:{mode:"simple",autosaveTimeout:1e4,theme:"",themes:{},mergeTags:void 0,styles:"",headerShow:!0,headerTitleVisible:!0,headerPreheaderVisible:!0,headerArrowBackVisible:!0,historyEnabled:!0,codeEnabled:!0,codeSideEnabled:!0,previewIconEnabled:!0,previewModeEnabled:!0,livePreviewEnabled:!0,sendTestEnabled:!0,sharePreviewEnabled:!0,emailDropdownMenuEnabled:!0,emailDropdownMenuClone:!0,emailDropdownMenuImport:!0,emailDropdownMenuLock:!0,emailDropdownMenuRemove:!0,emailExportEnabled:!0,exportHtmlEnabled:!0,exportZipEnabled:!0,exportClipboardEnabled:!0,exportWebHookEnabled:!0,exportOutlookEnabled:!1,exportPdfEnabled:!0,exportPngEnabled:!0,nextButtonEnabled:!1,nextButtonText:"",saveButtonEnabled:!0,saveButtonText:"",commandButtonsEnabled:!0,emailIdShow:!1,sidePanelFloating:!0,desktopMobileSwitchRule:!0,desktopMobileSwitchPanel:!1,onlyCodeModeInMobile:!1,pathEnabled:!0,copyPasteEnabled:!0,saveBlockEnabled:!0,editImageControlEnabled:!0,lockEditor:!1,menuDirection:"right",defaultBuildPanel:"",commentsEnabled:!0,aiAssistentEnabled:!0,optimizeEnabled:!0,optimizeLinksEnabled:!0,optimizeImagesEnabled:!0,optimizeSpamAssassinEnabled:!0,optimizeCheckCodeEnabled:!0,settingsEnabled:!0,UTMEnabled:!1,subjectEnabled:!0,preheaderEnabled:!0,descriptionEnabled:!0,tagsEnabled:!0,isTemplateEnabled:!0,switchDesktopMobilePropsEnabled:!0,stepToOtherElementEnabled:!0,deleteButtonEnabled:!0,toggleSidePanel:!0,blocksSectionsShow:!0,blocksEmptyEnabled:!0,blocksSavedEnabled:!0,blocksCommonEnabled:!0,blocksTemplateEnabled:!0,blocksSearchEnabled:!0,blocksAddPanelEnabled:!0,imagePathDropdownEnabled:!0,formFieldImageTitleEnabled:!0,formFieldBorderEnabled:!1,formFieldBorderRadiusEnabled:!1,formFieldBoxShadowEnabled:!1,formFieldVisibilityEnabled:!1,formFieldExportAsPictureEnabled:!1,emailPaneDesktopSize:0,formButtonFieldInsertImageEnabled:!0,formButtonFieldVerticalAlignEnabled:!0,formButtonFieldTextAlignEnabled:!0,formButtonFieldBackgroundImageEnabled:!0,formButtonFieldPaddingsEnabled:!0,formCellFieldVerticalAlignEnabled:!0,formCellFieldBackgroundImageEnabled:!0,formCellFieldPaddingsEnabled:!0,formLinkFieldInsertImageEnabled:!0,formTableFieldBackgroundImageEnabled:!0,formDivFieldBackgroundImageEnabled:!0,formEmailFieldBackgroundImageEnabled:!0,elementImageEnabled:!0,elementTextEnabled:!0,elementHeaderEnabled:!0,elementButtonEnabled:!0,elementListULEnabled:!0,elementListOLEnabled:!0,elementDividerEnabled:!0,elementSpacerEnabled:!0,elementSocialEnabled:!0,elementTableEnabled:!0,elementCountdownEnabled:!1,elementVideoEnabled:!1,elementAIimageEnabled:!0,elementAItextEnabled:!1,elementCarouselEnabled:!1,elementAccordionEnabled:!1,elementFormEnabled:!1,preventSendDataToEM:!1,imageInfoToolUrl:"",imageCenterStockEnabled:!0,imageCenterGifEnabled:!0,imageCenterEditorEnabled:!0,compressMaxSize:.7,compressMaxWidthOrHeight:2e3,ampExportEnabled:!1,formFieldAmpVisibilityEnabled:!1,testEmails:[],pushToGTM:!0},project:void 0,page:{isNew:!1,type:"email",project:0,id:""}},blocks:{config:{mode:"freeUserBlocks",autosaveTimeout:1e4,theme:"",themes:{},mergeTags:void 0,styles:"",revisionService:!1,headerShow:!0,headerTitleVisible:!0,headerPreheaderVisible:!0,headerArrowBackVisible:!0,historyEnabled:!0,codeEnabled:!0,codeSideEnabled:!0,previewIconEnabled:!0,previewModeEnabled:!0,livePreviewEnabled:!0,sendTestEnabled:!0,sharePreviewEnabled:!0,webversionEnabled:!0,emailDropdownMenuEnabled:!0,emailDropdownMenuClone:!0,emailDropdownMenuImport:!0,emailDropdownMenuLock:!0,emailDropdownMenuRemove:!0,emailExportEnabled:!0,exportHtmlEnabled:!0,exportZipEnabled:!0,exportClipboardEnabled:!0,exportWebHookEnabled:!0,exportOutlookEnabled:!0,exportPdfEnabled:!0,exportPngEnabled:!0,nextButtonEnabled:!1,nextButtonText:"",saveButtonEnabled:!0,saveButtonText:"",commandButtonsEnabled:!0,emailIdShow:!1,sidePanelFloating:!0,desktopMobileSwitchRule:!0,desktopMobileSwitchPanel:!1,onlyCodeModeInMobile:!1,pathEnabled:!0,copyPasteEnabled:!0,saveBlockEnabled:!0,editImageControlEnabled:!0,lockEditor:!1,menuDirection:"right",defaultBuildPanel:"",commentsEnabled:!0,aiAssistentEnabled:!0,optimizeEnabled:!0,optimizeLinksEnabled:!0,optimizeImagesEnabled:!0,optimizeSpamAssassinEnabled:!0,optimizeCheckCodeEnabled:!0,settingsEnabled:!0,UTMEnabled:!0,subjectEnabled:!0,preheaderEnabled:!0,descriptionEnabled:!0,tagsEnabled:!0,isTemplateEnabled:!0,switchDesktopMobilePropsEnabled:!0,stepToOtherElementEnabled:!0,deleteButtonEnabled:!0,toggleSidePanel:!0,blocksSectionsShow:!0,blocksEmptyEnabled:!0,blocksSavedEnabled:!0,blocksCommonEnabled:!0,blocksTemplateEnabled:!0,blocksSearchEnabled:!0,blocksAddPanelEnabled:!0,imagePathDropdownEnabled:!0,formFieldImageTitleEnabled:!0,formFieldBorderEnabled:!0,formFieldBorderRadiusEnabled:!0,formFieldBoxShadowEnabled:!0,formFieldVisibilityEnabled:!0,formFieldExportAsPictureEnabled:!0,emailPaneDesktopSize:0,formButtonFieldInsertImageEnabled:!0,formButtonFieldVerticalAlignEnabled:!0,formButtonFieldTextAlignEnabled:!0,formButtonFieldBackgroundImageEnabled:!0,formButtonFieldPaddingsEnabled:!0,formCellFieldVerticalAlignEnabled:!0,formCellFieldBackgroundImageEnabled:!0,formCellFieldPaddingsEnabled:!0,formLinkFieldInsertImageEnabled:!0,formTableFieldBackgroundImageEnabled:!0,formDivFieldBackgroundImageEnabled:!0,formEmailFieldBackgroundImageEnabled:!0,elementImageEnabled:!0,elementTextEnabled:!0,elementHeaderEnabled:!0,elementButtonEnabled:!0,elementListULEnabled:!0,elementListOLEnabled:!0,elementDividerEnabled:!0,elementSpacerEnabled:!0,elementSocialEnabled:!0,elementTableEnabled:!0,elementCountdownEnabled:!0,elementVideoEnabled:!0,elementAIimageEnabled:!0,elementAItextEnabled:!0,elementCarouselEnabled:!0,elementAccordionEnabled:!0,elementFormEnabled:!0,preventSendDataToEM:!1,imageInfoToolUrl:"",imageCenterStockEnabled:!0,imageCenterGifEnabled:!0,imageCenterEditorEnabled:!0,compressMaxSize:.7,compressMaxWidthOrHeight:2e3,ampExportEnabled:!0,formFieldAmpVisibilityEnabled:!0,testEmails:[],pushToGTM:!0},project:void 0,page:{isNew:!0,type:"email",project:0,id:""}}},o=e=>{const t=l[e];return t||l.editor},n=["mode","formFieldBorderEnabled","formFieldBorderRadiusEnabled","formFieldBoxShadowEnabled","formFieldVisibilityEnabled","formFieldExportAsPictureEnabled","formButtonFieldInsertImageEnabled","formButtonFieldVerticalAlignEnabled","formButtonFieldTextAlignEnabled","formButtonFieldBackgroundImageEnabled","formButtonFieldPaddingsEnabled","formCellFieldVerticalAlignEnabled","formCellFieldBackgroundImageEnabled","formCellFieldPaddingsEnabled","formLinkFieldInsertImageEnabled","formTableFieldBackgroundImageEnabled","formDivFieldBackgroundImageEnabled","formEmailFieldBackgroundImageEnabled"]},38540:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>m,M:()=>d,YT:()=>s,rI:()=>i});var l=a(1029);const o=(0,a(93778).ur)({isCollapsed:!0,isMonacoFocusing:!1}),n="defaultModePanesSlice",r=(0,l.createSlice)({name:n,initialState:o,reducers:{setMonacoFocusing:(e,t)=>{e.isMonacoFocusing=t.payload},resetPanes:()=>o}}),{resetPanes:i,setMonacoFocusing:s}=r.actions,d=e=>e[n].isMonacoFocusing,m=r},1047:(e,t,a)=>{"use strict";a.d(t,{A9:()=>p,AJ:()=>v,Ay:()=>W,Bj:()=>w,Bu:()=>x,CT:()=>M,G_:()=>u,HO:()=>E,Hs:()=>O,M7:()=>g,RC:()=>T,S_:()=>B,UI:()=>H,Up:()=>N,VK:()=>A,VO:()=>S,VZ:()=>F,Wm:()=>C,dH:()=>j,eX:()=>c,iy:()=>I,mD:()=>z,no:()=>_,om:()=>b,pl:()=>f,ps:()=>k,qX:()=>P,rY:()=>D,rd:()=>V,ry:()=>h,ss:()=>y,uJ:()=>L,zn:()=>R});var l=a(1029),o=a(93778),n=a(98845),r=a(83027),i=a(65716);const s=(0,o.ur)({invalidateEmailId:null,editorThemeColor:"light",isSettingsDisabled:!1,settings:{backgroundColor:"",backgroundImage:[{type:"url",value:""}],backgroundPositionX:"",backgroundPositionY:"",backgroundRepeat:"",textStrong:!1,textItalic:!1,textUnderline:!1},elementSettings:{},searchFilters:{},emailCommonStyles:"",saveTime:null,mobileViewActive:{shutdown:!0,styles:!0},email:{id:void 0,is_inited:!1,isNew:!1,subject:void 0,preheader:void 0,description:"",html:"",project:void 0,project_author:"",project_title:"",tags:[],utm_parameters:{utm_source:"",utm_medium:"",utm_campaign:"",utm_term:"",utm_content:""},parent_email:null,common_styles:"{}",title:null,emailtags:[],group:[],isAmp:!1},emailIsEdit:!1,isCodeMode:!1,codeModeDirection:void 0,emailViewType:void 0,changeKey:null,problemsList:[],activeProblemRange:null,emailGroups:{},parentGroupOfProject:null,projectGroups:[],isNeedUpdateAppearance:!1,isNeedUpdateContentAppearance:!1}),d="emailSlice",m=(0,l.createSlice)({name:d,initialState:s,reducers:{setEditorThemeColor:(e,t)=>{e.editorThemeColor=t.payload},setEmailFromHistory:(e,{payload:t})=>{const a=e.email,l=void 0===(null===t||void 0===t?void 0:t.preheader),o=void 0===(null===t||void 0===t?void 0:t.subject);e.email={...a,html:null===t||void 0===t?void 0:t.html,preheader:l?a.preheader:null===t||void 0===t?void 0:t.preheader,subject:o?a.subject:null===t||void 0===t?void 0:t.subject,common_styles:"string"===typeof(null===t||void 0===t?void 0:t.common_styles)&&null!==t&&void 0!==t&&t.common_styles.startsWith("{")?null===t||void 0===t?void 0:t.common_styles:a.common_styles||"{}"},e.isNeedUpdateAppearance=!0,e.isNeedUpdateContentAppearance=!0},setEmailSettings:(e,{payload:t})=>{Object.assign(e,{...e,settings:{...t},isSettingsDisabled:!1})},setEmailSettingsDisable:(e,t)=>{e.isSettingsDisabled=t.payload},setElementSettings:(e,{payload:t})=>{e.elementSettings=t},setSearchFilters:(e,t)=>{e.searchFilters=t.payload},updateSearchFilters:(e,t)=>{const a=e.searchFilters;e.searchFilters={...a,...t.payload}},setEmailHTML:(e,t)=>{e.email.html=t.payload},setEmailSubject:(e,t)=>{e.email.title!==e.email.subject&&(e.email.subject||e.email.title)||(e.email.title=t.payload),e.email.subject=t.payload},setEmailPreheader:(e,t)=>{e.email.preheader=t.payload},resetEmailSlice:()=>s,setEmailTitle:(e,t)=>{e.email.title=t.payload},setIsInited:(e,t)=>{e.email.is_inited=t.payload},setEmailIsAmp:(e,t)=>{e.email.isAmp=t.payload},setProblemsList:(e,t)=>{e.problemsList=t.payload},setActiveProblemRange:(e,t)=>{e.activeProblemRange=t.payload},setIsNeedUpdateContentAppearance:(e,t)=>{e.isNeedUpdateContentAppearance=t.payload},setIsNeedUpdateAppearance:(e,t)=>{e.isNeedUpdateAppearance=t.payload},setEmailGroups:(e,{payload:t})=>{const a=Object.keys(t)[0],l=e.emailGroups,o=e.parentGroupOfProject,n=e.projectGroups,r={};var i;o&&n.length&&(null===(i=t[a])||void 0===i||i.forEach((e=>{const t=n.find((e=>e.id===+a)),l=null===t||void 0===t?void 0:t.children.find((t=>t.id===+e));l?(r.hasOwnProperty(t.id)||(r[t.id]=[]),r[t.id].push({label:l.name,value:l.id})):(r.hasOwnProperty(a)||(r[a]=[]),r[a].push({label:e,value:null}))})),0===t[a].length&&(r[a]=[]));e.emailGroups={...l,...r}}},extraReducers:e=>{e.addMatcher((e=>"emailsApi/queries/queryResultPatched"===e.type),((e,t)=>{var a,l;const o=t.payload.queryCacheKey.match(/\("([0-9]+)"\)/),n=null===(a=t.payload)||void 0===a?void 0:a.patches[0];null!==n&&void 0!==n&&null!==(l=n.path)&&void 0!==l&&l[0]&&(e.email[null===n||void 0===n?void 0:n.path[0]]=n.value),null!==o&&void 0!==o&&o[1]&&(e.invalidateEmailId=o[1]),e.emailIsEdit=!0})),e.addMatcher((e=>"emailsApi/invalidateTags"===e.type),((e,t)=>{if(t.payload[0].id===+e.invalidateEmailId)return s})),e.addMatcher(n.GY.endpoints.editEmail.matchFulfilled,((e,{payload:t})=>{e.invalidateEmailId=null,e.email={...e.email,...t,renderGuid:e.email.renderGuid}})),e.addMatcher(n.GY.endpoints.autoSaveEmail.matchFulfilled,((e,t)=>{var a,l;(null===(a=e.email.id)||void 0===a?void 0:a.toString())===(null===(l=t.payload.id)||void 0===l?void 0:l.toString())&&(e.email.html=t.payload.html)})),e.addMatcher(n.GY.endpoints.getEmail.matchFulfilled,((e,{payload:t})=>{var a,l;e.email={...s.email,...t,is_inited:t.is_inited||(t.id===(null===(a=e.email)||void 0===a?void 0:a.id)?null===(l=e.email)||void 0===l?void 0:l.is_inited:s.email.is_inited),common_styles:"string"===typeof(null===t||void 0===t?void 0:t.common_styles)&&null!==t&&void 0!==t&&t.common_styles.startsWith("{")?null===t||void 0===t?void 0:t.common_styles:"{}"},e.emailIsEdit=!1})),e.addMatcher(r.kE.endpoints.getGroups.matchFulfilled,((e,{meta:t,payload:a})=>{const l=e.email.group,o=t.arg.originalArgs.parent,n=a;o&&(e.parentGroupOfProject=o,n.length>0&&(e.projectGroups=n));const r={};o&&l.length&&n.length&&(null===l||void 0===l||l.forEach((e=>{null===n||void 0===n||n.forEach((t=>{const a=t.children.find((t=>t.id===e));a&&(r.hasOwnProperty(t.id)||(r[t.id]=[]),r[t.id].push({label:a.name,value:a.id}))}))}))),e.emailGroups=r})),e.addMatcher(i.Nq.endpoints.getProject.matchFulfilled,((e,{meta:t,payload:a})=>{var l;e.parentGroupOfProject=(null===(l=a.group)||void 0===l?void 0:l[0])||null}))}}),{setEditorThemeColor:c,setEmailSettings:u,setElementSettings:p,setEmailSettingsDisable:g,setSearchFilters:b,updateSearchFilters:h,setEmailSubject:E,setEmailPreheader:f,setEmailHTML:v,resetEmailSlice:y,setEmailTitle:A,setEmailFromHistory:_,setIsInited:C,setEmailIsAmp:S,setProblemsList:w,setActiveProblemRange:k,setEmailGroups:x,setIsNeedUpdateAppearance:B,setIsNeedUpdateContentAppearance:T}=m.actions,R=e=>e[d].invalidateEmailId,N=e=>e[d].editorThemeColor,L=e=>e[d].settings,P=e=>e[d].elementSettings,I=e=>e[d].isSettingsDisabled,M=e=>e[d].searchFilters,O=e=>e[d].email,V=e=>e[d].problemsList,F=e=>e[d].activeProblemRange,D=e=>e[d].emailGroups,H=e=>e[d].projectGroups,j=e=>e[d].isNeedUpdateContentAppearance,z=e=>e[d].isNeedUpdateAppearance,W=m},80772:(e,t,a)=>{"use strict";a.d(t,{Ac:()=>g,Ay:()=>b,BK:()=>c,Uf:()=>p,Yw:()=>d,e_:()=>m,js:()=>u,tm:()=>s});var l=a(1029),o=a(93778);const n="imageSlice",r=(0,o.ur)({currentImage:"",currentBackground:"",currentImageName:""}),i=(0,l.createSlice)({name:n,initialState:r,reducers:{setCurrentImageName(e,t){e.currentImageName=t.payload},setCurrentImage(e,t){e.currentImage=t.payload},setCurrentBackground(e,t){e.currentBackground=t.payload},clearCurrentImages(e,t){e.currentImage="",e.currentBackground="",e.currentImageName=""}}}),{setCurrentImage:s,setCurrentImageName:d,setCurrentBackground:m,clearCurrentImages:c}=i.actions,u=e=>e[n].currentImage,p=e=>e[n].currentImageName,g=e=>e[n].currentBackground,b=i},12741:(e,t,a)=>{"use strict";a.d(t,{$S:()=>P,Ay:()=>I,BQ:()=>h,Et:()=>T,K3:()=>S,MZ:()=>b,P3:()=>k,TC:()=>y,TU:()=>E,Uh:()=>R,YG:()=>L,Zs:()=>v,aY:()=>A,lg:()=>N,mk:()=>x,ol:()=>w,x3:()=>f,yY:()=>C,zH:()=>B});var l=a(1029),o=a(98845),n=a(65716),r=a(32947),i=a(31557),s=a.n(i),d=a(93778),m=a(39218),c=a(40277);const u=(0,d.ur)({emailtags:[],email:{isNew:!0,is_inited:!1,subject:void 0,preheader:void 0,description:"",html:s(),project:void 0,project_title:"",tags:[],utm_parameters:{utm_source:"",utm_medium:"",utm_campaign:"",utm_term:"",utm_content:""},parent_email:null,common_styles:"{}",title:"",emailtags:[],isAmp:!1},hasChanged:!1}),p="newEmailSlice",g=(0,l.createSlice)({name:p,initialState:u,reducers:{setNewEmailAll:(e,{payload:{id:t,subject:a,description:l="",preheader:o,html:n=s(),utm_parameters:{utm_source:i="",utm_medium:d="",utm_campaign:m="",utm_term:u="",utm_content:p=""}={},common_styles:g="{}",emailtags:b=null,renderGuid:h,title:E,_embedded:f,isAmp:v=!1}})=>{var y;e.hasChanged||(e.hasChanged=!0),e.email.isAmp=v,e.email.title=E,e.emailtags=b,e.email.subject=a,e.email.description=l,e.email.common_styles=g||JSON.stringify(r.BD),e.email.preheader=o,e.email.is_template=!1,e.email.html=n,e.email.tags=(null===(y=(0,c._q)({_embedded:f},r.zh))||void 0===y?void 0:y.map((e=>e.name)))||[],e.email.renderGuid=h,e.email.parent_email=t,e.email.utm_parameters={utm_source:i,utm_medium:d,utm_campaign:m,utm_term:u,utm_content:p}},setNewEmailTitle:(e,t)=>{e.hasChanged||(e.hasChanged=!0),e.email.title=t.payload},setNewEmailSubject:(e,t)=>{e.hasChanged||e.email.subject===t.payload||(e.hasChanged=!0),e.email.title!==e.email.subject&&(e.email.subject||e.email.title)||(e.email.title=t.payload),e.email.subject=t.payload},setNewEmailPreheader:(e,t)=>{e.hasChanged||e.email.preheader===t.payload||(e.hasChanged=!0),e.email.preheader=t.payload},setNewEmailDescription:(e,t)=>{e.hasChanged||(e.hasChanged=!0),e.email.description=t.payload},setNewEmailIsTemplate:(e,t)=>{e.hasChanged||(e.hasChanged=!0),e.email.is_template=t.payload},setNewEmailHtml:(e,t)=>{e.hasChanged||(e.hasChanged=!0),t.payload&&(e.email.html=t.payload)},setNewCommonStyles:(e,t)=>{e.hasChanged||(e.hasChanged=!0),t.payload&&(e.email.common_styles=t.payload)},setNewEmailTags:(e,t)=>{e.hasChanged||(e.hasChanged=!0),e.email.tags=t.payload},setNewEmailUtmSource:(e,t)=>{e.hasChanged||(e.hasChanged=!0),e.email.utm_parameters.utm_source=t.payload},setNewEmailUtmMedium:(e,t)=>{e.hasChanged||(e.hasChanged=!0),e.email.utm_parameters.utm_medium=t.payload},setNewEmailUtmCampaign:(e,t)=>{e.hasChanged||(e.hasChanged=!0),e.email.utm_parameters.utm_campaign=t.payload},setNewEmailUtmTerm:(e,t)=>{e.hasChanged||(e.hasChanged=!0),e.email.utm_parameters.utm_term=t.payload},setNewEmailUtmContent:(e,t)=>{e.hasChanged||(e.hasChanged=!0),e.email.utm_parameters.utm_content=t.payload},setNewIsInited:(e,t)=>{e.email.is_inited=t.payload},setNewEmailIsAmp:(e,t)=>{e.email.isAmp=t.payload},resetNewEmailSlice:e=>({...u,email:{...u.email,guid:(0,m.l)(),project:e.email.project,project_title:e.email.project_title}})},extraReducers:e=>{e.addMatcher(n.Nq.endpoints.getProject.matchFulfilled,((e,t)=>{e.email.project=t.payload.id,e.email.project_title=t.payload.title})),e.addMatcher(o.GY.endpoints.getEmail.matchFulfilled,(e=>({...u,email:{...u.email,project:e.email.project,project_title:e.email.project_title}})))}}),{setNewEmailAll:b,setNewEmailTitle:h,setNewEmailSubject:E,setNewEmailPreheader:f,setNewEmailDescription:v,setNewEmailIsTemplate:y,setNewEmailHtml:A,setNewCommonStyles:_,setNewEmailTags:C,setNewEmailUtmSource:S,setNewEmailUtmMedium:w,setNewEmailUtmCampaign:k,setNewEmailUtmContent:x,setNewEmailUtmTerm:B,resetNewEmailSlice:T,setNewIsInited:R,setNewEmailIsAmp:N}=g.actions,L=e=>e[p].email,P=e=>e[p].hasChanged,I=g},84572:(e,t,a)=>{"use strict";a.d(t,{AQ:()=>f,Ay:()=>y,BN:()=>u,GD:()=>b,RP:()=>E,Rw:()=>h,es:()=>c,mb:()=>p,od:()=>m,qV:()=>v,yN:()=>g});var l=a(1029),o=a(93778),n=a(65716),r=a(98845);const i=(0,o.ur)({project:null,activeGroupsTags:[],activeProjectGroupsTags:[],groupsTemplateTotal:null,groupsTemplateProjectTotalPages:null,groupsTemplateProjectTotal:null}),s="projectSlice",d=(0,l.createSlice)({name:s,initialState:i,reducers:{setProject:(e,{payload:t})=>{e.project=t},setActiveGroupsTags:(e,{payload:t})=>{e.activeGroupsTags=t,t.length&&(e.activeProjectGroupsTags=[])},setActiveProjectGroupsTags:(e,{payload:t})=>{e.activeProjectGroupsTags=t,t.length&&(e.activeGroupsTags=[])},resetAllTags:e=>{e.activeProjectGroupsTags=[],e.activeGroupsTags=[]}},extraReducers:e=>{e.addMatcher(n.Nq.endpoints.getProject.matchFulfilled,((e,{payload:t})=>{e.project={...i.project,...t}})),e.addMatcher(n.Nq.endpoints.editProject.matchFulfilled,((e,{payload:t})=>{e.project={...i.project,...t}})),e.addMatcher(r.GY.endpoints.getTemplateEmails.matchFulfilled,((e,{payload:t,meta:a})=>{const{projectId:l}=a.arg.originalArgs;var o,n,r;l?(e.groupsTemplateProjectTotal=+(null===(o=a.baseQueryMeta)||void 0===o?void 0:o.response.headers.get("X-WP-Total")),e.groupsTemplateProjectTotalPages=+(null===(n=a.baseQueryMeta)||void 0===n?void 0:n.response.headers.get("X-WP-TotalPages"))):e.groupsTemplateTotal=+(null===(r=a.baseQueryMeta)||void 0===r?void 0:r.response.headers.get("X-WP-Total"))}))}}),{setProject:m,setActiveGroupsTags:c,setActiveProjectGroupsTags:u,resetAllTags:p}=d.actions,g=e=>e[s].project,b=e=>e[s].activeGroupsTags,h=e=>e[s].activeProjectGroupsTags,E=e=>e[s].groupsTemplateTotal,f=e=>e[s].groupsTemplateProjectTotal,v=e=>e[s].groupsTemplateProjectTotalPages,y=d},61058:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>p,RL:()=>u,p1:()=>c,qX:()=>d});var l=a(1029),o=a(98845),n=a(68984);const r=(0,a(93778).ur)({historyData:[],elementHistoryTotalPages:1}),i="revisionHistorySlice",s=(0,l.createSlice)({name:i,initialState:r,reducers:{resetElementHistorySlice:()=>({...r}),setElementHistory:(e,t)=>{0!==t.payload.length&&(e.historyData=t.payload)}},extraReducers:e=>{e.addMatcher(o.GY.endpoints.getEmailHistory.matchFulfilled,((e,{meta:t,payload:a})=>{var l;e.elementHistoryTotalPages=+(null===(l=t.baseQueryMeta)||void 0===l?void 0:l.response.headers.get("X-WP-TotalPages")),t.arg.originalArgs.page&&1!==t.arg.originalArgs.page||(e.historyData=a.data||[])})),e.addMatcher(n.VM.endpoints.getBlockHistory.matchFulfilled,((e,{meta:t,payload:a})=>{var l;e.elementHistoryTotalPages=+(null===(l=t.baseQueryMeta)||void 0===l?void 0:l.response.headers.get("X-WP-TotalPages")),a.args.page&&1!==a.args.page||(e.historyData=a.data||[])}))}}),{resetElementHistorySlice:d}=s.actions,{setElementHistory:m}=s.actions,c=e=>e[i].historyData,u=e=>e[i].elementHistoryTotalPages,p=s},47014:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>A,B:()=>h,B$:()=>y,C1:()=>E,hZ:()=>v,ko:()=>p,ku:()=>c,ww:()=>d,yf:()=>f});var l=a(1029),o=a(78915),n=a(32947),r=a(40277);const i=(0,a(93778).ur)({currentUser:{},currentSchema:{},monacoOptions:n.rW,monacoDidMount:!1}),s="userSlice",d=(0,l.createAsyncThunk)("user/setMonacoOptions",(async(e,{getState:t})=>{const a=t()[s],l="string"===typeof e.font_family?`${e.font_family}, sans-serif`:void 0,o=void 0!==e.word_wrap?e.word_wrap?"on":"off":void 0;return l&&a.monacoOptions.fontFamily!==l&&await(0,r.iV)(e.font_family),{tabSize:e.tab_size,fontFamily:l,fontSize:e.font_size,wordWrap:o,insertSpaces:e.insert_spaces,minimap:{enabled:e.minimap}}})),m=(0,l.createSlice)({name:s,initialState:i,reducers:{setMonacoDidMount:(e,{payload:t})=>{e.monacoDidMount=t},setTheme:(e,{payload:t})=>{e.currentUser.theme=t},setUserLocale:(e,{payload:t})=>{e.currentUser.locale=t},setUserAutosaves:(e,{payload:t})=>{e.currentUser.autosaves=t},setUser:(e,{payload:t})=>{e.currentUser={...e.currentUser,...t}}},extraReducers:e=>{e.addCase(d.fulfilled,((e,t)=>{const a=t.payload;e.monacoOptions=(0,r.i0)({...e.monacoOptions},a)})),e.addMatcher(o.Q2.endpoints.editMe.matchFulfilled,((e,t)=>{e.currentUser=t.payload})),e.addMatcher(o.Q2.endpoints.getMe.matchFulfilled,((e,t)=>{e.currentUser=t.payload})),e.addMatcher(o.Q2.endpoints.getSchema.matchFulfilled,((e,t)=>{e.currentSchema=t.payload.schema}))}}),{setMonacoDidMount:c,setTheme:u,setUserLocale:p,setUserAutosaves:g,setUser:b}=m.actions,h=e=>{var t;return null===(t=e[s].currentUser)||void 0===t?void 0:t.locale},E=e=>e[s].currentUser,f=e=>e[s].currentSchema,v=e=>e[s].monacoOptions,y=e=>{var t;return 3891!==(null===(t=e[s].currentUser.subscription)||void 0===t?void 0:t.ID)},A=m},93718:(e,t,a)=>{var l={"./en_US.ts":[53640,2466],"./ru_RU.ts":[48755,6859]};function o(e){if(!a.o(l,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=l[e],o=t[0];return a.e(t[1]).then((()=>a(o)))}o.keys=()=>Object.keys(l),o.id=93718,e.exports=o},16403:()=>{},63779:()=>{},77199:()=>{}}]);