@emailmaker/emailmaker 1.0.36 → 1.0.38

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 (115) hide show
  1. package/README.md +1 -1
  2. package/asset-manifest.json +80 -80
  3. package/emailmaker-esm.js +1 -1
  4. package/emailmaker.d.ts +1 -0
  5. package/emailmaker.js +1 -1
  6. package/iframe/429.js +1 -1
  7. package/iframe/css/sandbox.css +12 -6
  8. package/iframe/{iframe-eblock.603d533b4efe6f5579a6.html → iframe-eblock.06d3786ea0462c884b7e.html} +1 -1
  9. package/iframe/{iframe.603d533b4efe6f5579a6.html → iframe.06d3786ea0462c884b7e.html} +1 -1
  10. package/iframe/js/cssbeautify.js +1 -1
  11. package/iframe/sandbox-eblock.js +1 -1
  12. package/iframe/sandbox.js +1 -1
  13. package/package.json +1 -1
  14. package/plugin.html +1 -1
  15. package/plugin_blocks_test.html +1 -1
  16. package/plugin_default.html +1 -1
  17. package/plugin_s.html +1 -1
  18. package/static/css/2208.56ea0abb.css +1 -0
  19. package/static/css/{5571.e9720eda.css → 5571.504f05c9.css} +1 -1
  20. package/static/css/6677.6f28a0c0.css +1 -0
  21. package/static/css/8458.31d6cfe0.css +0 -0
  22. package/static/js/1399.f981f0f4.js +1 -0
  23. package/static/js/160.c2020dc9.js +1 -0
  24. package/static/js/18.7d3e3257.js +1 -0
  25. package/static/js/2059.6f21f841.js +2 -0
  26. package/static/js/2208.cb758bc6.js +1 -0
  27. package/static/js/2299.afe87d63.chunk.js +1 -0
  28. package/static/js/2587.4ec88069.js +2 -0
  29. package/static/js/2896.ce4941ab.js +2 -0
  30. package/static/js/3447.63d0aafa.js +1 -0
  31. package/static/js/{3682.d155b110.js → 3682.4db8ba34.js} +2 -2
  32. package/static/js/3710.193d2d5a.chunk.js +1 -0
  33. package/static/js/4035.1e8d8ad5.js +1 -0
  34. package/static/js/4877.5b496b72.js +1 -0
  35. package/static/js/5552.9e96baf9.js +1 -0
  36. package/static/js/5571.30a43d6b.js +1 -0
  37. package/static/js/723.e748d062.js +2 -0
  38. package/static/js/7291.e2615c74.js +1 -0
  39. package/static/js/78.8f294da6.js +1 -0
  40. package/static/js/8458.657f471c.js +1 -0
  41. package/static/js/8689.63fa1dc3.chunk.js +1 -0
  42. package/static/js/9154.7ebae9e2.js +1 -0
  43. package/static/js/9335.20ecdadf.js +1 -0
  44. package/static/js/9560.50289051.js +2 -0
  45. package/static/js/9593.8a0e7a2e.js +2 -0
  46. package/static/js/{2582.d77da683.js.LICENSE.txt → 9593.8a0e7a2e.js.LICENSE.txt} +16 -0
  47. package/static/js/emailmaker_core.24103916.js +1 -0
  48. package/static/js/mergeTags/locale1.490fa827.chunk.js +1 -0
  49. package/static/media/fb.png +0 -0
  50. package/static/media/ig.png +0 -0
  51. package/static/media/tg.png +0 -0
  52. package/static/media/tw.png +0 -0
  53. package/static/media/vk.png +0 -0
  54. package/static/media/yd.png +0 -0
  55. package/static/media/yt.png +0 -0
  56. package/translations.pot +256 -212
  57. package/static/css/2256.d0db3199.css +0 -1
  58. package/static/css/6677.3a2b7cfe.css +0 -1
  59. package/static/css/698.9a48c3be.css +0 -1
  60. package/static/js/1399.cb6eb2fa.js +0 -1
  61. package/static/js/1792.81307cce.js +0 -1
  62. package/static/js/1795.8ada4a9a.js +0 -1
  63. package/static/js/197.a135382e.js +0 -1
  64. package/static/js/2223.17806e9a.js +0 -2
  65. package/static/js/2256.ade5bf3a.js +0 -1
  66. package/static/js/2464.2c009f8c.js +0 -2
  67. package/static/js/2582.d77da683.js +0 -2
  68. package/static/js/2896.fac80e3c.js +0 -2
  69. package/static/js/3959.42824ee0.js +0 -1
  70. package/static/js/4877.b90d1691.js +0 -1
  71. package/static/js/515.16219a24.js +0 -2
  72. package/static/js/515.16219a24.js.LICENSE.txt +0 -6
  73. package/static/js/5571.383ce8ce.js +0 -1
  74. package/static/js/5606.a93f532c.js +0 -1
  75. package/static/js/5927.d93485f1.chunk.js +0 -1
  76. package/static/js/5957.d2ad88af.js +0 -2
  77. package/static/js/6567.e70469eb.js +0 -1
  78. package/static/js/698.6e8cee9e.js +0 -1
  79. package/static/js/7471.ae85b39d.js +0 -1
  80. package/static/js/8179.acf16a1a.chunk.js +0 -1
  81. package/static/js/8236.bdefaa6b.js +0 -2
  82. package/static/js/8689.e2d021af.chunk.js +0 -1
  83. package/static/js/8738.3ba7b2e7.js +0 -2
  84. package/static/js/8738.3ba7b2e7.js.LICENSE.txt +0 -87
  85. package/static/js/9019.7efd13af.js +0 -2
  86. package/static/js/9019.7efd13af.js.LICENSE.txt +0 -96
  87. package/static/js/9328.74394e00.js +0 -1
  88. package/static/js/9649.b9c16408.js +0 -1
  89. package/static/js/9907.0d22d89d.js +0 -1
  90. package/static/js/emailmaker_core.ea017ac4.js +0 -1
  91. package/static/js/mergeTags/locale1.3448e6cb.chunk.js +0 -1
  92. /package/static/css/{1795.3b54559d.css → 5552.3b54559d.css} +0 -0
  93. /package/static/js/{8236.bdefaa6b.js.LICENSE.txt → 2059.6f21f841.js.LICENSE.txt} +0 -0
  94. /package/static/js/{2223.17806e9a.js.LICENSE.txt → 2587.4ec88069.js.LICENSE.txt} +0 -0
  95. /package/static/js/{2896.fac80e3c.js.LICENSE.txt → 2896.ce4941ab.js.LICENSE.txt} +0 -0
  96. /package/static/js/{3682.d155b110.js.LICENSE.txt → 3682.4db8ba34.js.LICENSE.txt} +0 -0
  97. /package/static/js/{5957.d2ad88af.js.LICENSE.txt → 723.e748d062.js.LICENSE.txt} +0 -0
  98. /package/static/js/{2464.2c009f8c.js.LICENSE.txt → 9560.50289051.js.LICENSE.txt} +0 -0
  99. /package/static/media/{ai-image.7c42c2e1.png → ai-image.png} +0 -0
  100. /package/static/media/{codicon.f13d28f3.ttf → codicon.ttf} +0 -0
  101. /package/static/media/{empty-image.1827d656.png → empty-image.png} +0 -0
  102. /package/static/media/{frame_dark.318d7ed5.png → frame_dark.png} +0 -0
  103. /package/static/media/{frame_light.22a9b4ec.png → frame_light.png} +0 -0
  104. /package/static/media/{frame_template_gallery.85693b39.png → frame_template_gallery.png} +0 -0
  105. /package/static/media/{sign_up_01.33327158.png → sign_up_01.png} +0 -0
  106. /package/static/media/{sign_up_01_blocks.5538cfdb.png → sign_up_01_blocks.png} +0 -0
  107. /package/static/media/{sign_up_02.d99d2aa6.png → sign_up_02.png} +0 -0
  108. /package/static/media/{sign_up_02_blocks.837fc2c9.png → sign_up_02_blocks.png} +0 -0
  109. /package/static/media/{sign_up_03.5545ffad.png → sign_up_03.png} +0 -0
  110. /package/static/media/{sign_up_03_blocks.126601f7.png → sign_up_03_blocks.png} +0 -0
  111. /package/static/media/{sign_up_04.398a4ca5.png → sign_up_04.png} +0 -0
  112. /package/static/media/{sign_up_04_blocks.255c5c07.png → sign_up_04_blocks.png} +0 -0
  113. /package/static/media/{sign_up_05.4c58df1b.png → sign_up_05.png} +0 -0
  114. /package/static/media/{sign_up_05_blocks.431b6844.png → sign_up_05_blocks.png} +0 -0
  115. /package/static/media/{video.854adea5.png → video.png} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[]).push([[698],{28381:(e,t,o)=>{o.d(t,{A:()=>b});var i=o(92810),l=o(12280),s=o(20984),r=o(81e3),a=o(66726),d=o(23287),n=o(62303),m=o(85163),c=o(45695),u=o(70082);const h=({form:e,elementSettings:t,imgParent:o,name:h="align"})=>{const{__:b}=(0,d.s9)(),g=(0,c.XW)(),[p,x]=(0,i.useState)(t[h]),A=o=>{const i=o.target.value,l={[h]:""};i!==p?x(i):(x(""),e.setFieldsValue(l),g({operation:m.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:l}))};return(0,u.jsx)(l.A.Item,{name:h,children:(0,u.jsx)(s.Ay.Group,{disabled:o&&!t.parent,children:(0,u.jsxs)(r.A,{size:8,children:[(0,u.jsx)(a.A,{placement:"bottom",title:b("Align left"),children:(0,u.jsx)(s.Ay.Button,{value:"left",onClick:A,children:(0,u.jsx)(n.A,{icon:"AlignHorizontalLeft"})})}),(0,u.jsx)(a.A,{placement:"bottom",title:b("Center horizontally"),children:(0,u.jsx)(s.Ay.Button,{value:"center",onClick:A,children:(0,u.jsx)(n.A,{icon:"AlignHorizontalCenter"})})}),(0,u.jsx)(a.A,{placement:"bottom",title:b("Align right "),children:(0,u.jsx)(s.Ay.Button,{value:"right",onClick:A,children:(0,u.jsx)(n.A,{icon:"AlignHorizontalRight"})})})]})})})};h.defaultProps={imgParent:!1};const b=h},68031:(e,t,o)=>{o.d(t,{A:()=>x});var i=o(92810),l=o(12280),s=o(20984),r=o(81e3),a=o(66726),d=o(73170),n=o(87984),m=o(98885),c=o(23287),u=o(85163),h=o(62303),b=o(45695),g=o(70082);const p=({form:e,elementSettings:t,imgParent:o,name:p="align",setAlignStateHandle:x=(e=>{})})=>{const{__:A}=(0,c.s9)(),f=(0,b.XW)(),[j,v]=(0,i.useState)(t[p]),[_,S]=(0,i.useState)(null);(0,i.useEffect)((()=>{var e,t;null!==(e=window)&&void 0!==e&&null!==(t=e.navigator)&&void 0!==t&&t.userAgent.includes("Macintosh")&&S(!0)}),[]);const B=o=>{const i=o.target.value;x(i);const l={[p]:""};i!==j?v(i):(v(""),e.setFieldsValue(l),f({operation:u.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:l}))};return(0,g.jsx)(l.A.Item,{name:p,children:(0,g.jsx)(s.Ay.Group,{disabled:o&&!t.parent,children:(0,g.jsxs)(r.A,{size:8,children:[(0,g.jsx)(a.A,{placement:"bottom",title:A(_?"Text align left ( \u2318+Shift+L )":"Text align left ( Ctrl+Shift+L )"),children:(0,g.jsx)(s.Ay.Button,{value:"left",onClick:B,children:(0,g.jsx)(d.A,{})})}),(0,g.jsx)(a.A,{placement:"bottom",title:A(_?"Text align center ( \u2318+Shift+E )":"Text align center ( Ctrl+Shift+E )"),children:(0,g.jsx)(s.Ay.Button,{value:"center",onClick:B,children:(0,g.jsx)(n.A,{})})}),(0,g.jsx)(a.A,{placement:"bottom",title:A(_?"Text align right ( \u2318+Shift+R )":"Text align right ( Ctrl+Shift+R )"),children:(0,g.jsx)(s.Ay.Button,{value:"right",onClick:B,children:(0,g.jsx)(m.A,{})})}),(0,g.jsx)(a.A,{placement:"bottom",title:A(_?"Text align justify ( \u2318+Shift+J )":"Text align justify ( Ctrl+Shift+J )"),children:(0,g.jsx)(s.Ay.Button,{value:"justify",onClick:B,children:(0,g.jsx)(h.A,{icon:"Justify"})})})]})})})};p.defaultProps={imgParent:!1};const x=p},78541:(e,t,o)=>{o.d(t,{A:()=>m});o(92810);var i=o(12280),l=o(20984),s=o(81e3),r=o(66726),a=o(23287),d=o(70082);const n=()=>{const{__:e}=(0,a.s9)();return(0,d.jsx)(i.A.Item,{name:"ampShow",children:(0,d.jsx)(l.Ay.Group,{children:(0,d.jsxs)(s.A,{size:8,children:[(0,d.jsx)(l.Ay.Button,{value:"all",children:e("Both")}),(0,d.jsx)(r.A,{placement:"top",title:e("AMP"),children:(0,d.jsx)(l.Ay.Button,{value:"amp",children:"AMP"})}),(0,d.jsx)(r.A,{placement:"top",title:e("HTML"),children:(0,d.jsx)(l.Ay.Button,{value:"html",children:"HTML"})})]})})})};n.defaultProps={};const m=n},21519:(e,t,o)=>{o.d(t,{A:()=>R});o(92810);var i=o(95838),l=o(2018),s=o(7744),r=o(12280),a=o(78159),d=o(20984),n=o(81e3),m=o(66726),c=o(38587),u=o(12751),h=o(14473),b=o(37822),g=o(68285),p=o(57032),x=o(26461),A=o(69118),f=o(10930),j=o(38883),v=o.n(j),_=o(23287),S=o(45934),B=o(26238),y=o(65983),w=o(70082);const{useToken:k}=i.A,R=({borders:e})=>{const t=(0,S.d4)(y.uJ),{__:o,_x:i}=(0,_.s9)(),j=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:R}=k();return(0,w.jsxs)(l.A,{gutter:30,children:[(0,w.jsxs)(s.A,{span:12,className:"selected-td-form__border-col",children:[(0,w.jsx)(r.A.Item,{name:"borderColor",className:"form-item-margin-xs",children:(0,w.jsx)(B.A,{placeholder:o("Color"),usedColors:t.usedColors})}),(0,w.jsx)(r.A.Item,{name:"borderWidth",className:"form-item-margin-xs",children:(0,w.jsx)(a.A,{min:0,placeholder:i("Width","border"),addonAfter:"px"})}),(0,w.jsx)(r.A.Item,{name:"borderStyle",className:"form-item-margin-xs",children:(0,w.jsx)(d.Ay.Group,{children:(0,w.jsxs)(n.A,{size:8,children:[(0,w.jsx)(m.A,{placement:"bottom",title:o("None"),children:(0,w.jsx)(d.Ay.Button,{value:"",children:(0,w.jsx)(c.A,{})})}),(0,w.jsx)(m.A,{placement:"bottom",title:o("Solid"),children:(0,w.jsx)(d.Ay.Button,{value:"solid",children:(0,w.jsx)(u.A,{})})}),(0,w.jsx)(m.A,{placement:"bottom",title:o("Dashed"),children:(0,w.jsx)(d.Ay.Button,{value:"dashed",children:(0,w.jsx)(h.A,{})})}),(0,w.jsx)(m.A,{placement:"bottom",title:o("Dotted"),children:(0,w.jsx)(d.Ay.Button,{value:"dotted",children:(0,w.jsx)(b.A,{})})})]})})})]}),(0,w.jsx)(s.A,{span:12,style:{textAlign:"center"},children:(0,w.jsx)(r.A.Item,{label:"",name:"borderPosition",labelCol:{span:8},children:(0,w.jsx)(d.Ay.Group,{children:(0,w.jsxs)(n.A,{size:R.formItemMarginBottomXS,direction:"vertical",children:[(0,w.jsx)(l.A,{children:(0,w.jsx)(m.A,{placement:"top",title:o("Above"),children:(0,w.jsx)(d.Ay.Button,{value:"top",style:{margin:"auto"},className:v()("",{"selected-td-form__border-radio":j(null===e||void 0===e?void 0:e.top)}),children:(0,w.jsx)(g.A,{})})})}),(0,w.jsx)(l.A,{children:(0,w.jsxs)(n.A,{size:R.formItemMarginBottomXS,children:[(0,w.jsx)(m.A,{placement:"left",title:o("On the left"),children:(0,w.jsx)(d.Ay.Button,{value:"left",className:v()("",{"selected-td-form__border-radio":j(null===e||void 0===e?void 0:e.left)}),children:(0,w.jsx)(p.A,{})})}),(0,w.jsx)(m.A,{placement:"top",title:o("Around"),children:(0,w.jsx)(d.Ay.Button,{value:"all",className:v()("",{"selected-td-form__border-radio":j(null===e||void 0===e?void 0:e.all)}),children:(0,w.jsx)(x.A,{})})}),(0,w.jsx)(m.A,{placement:"right",title:o("On the right"),children:(0,w.jsx)(d.Ay.Button,{value:"right",className:v()("",{"selected-td-form__border-radio":j(null===e||void 0===e?void 0:e.right)}),children:(0,w.jsx)(A.A,{})})})]})}),(0,w.jsx)(l.A,{children:(0,w.jsx)(m.A,{placement:"bottom",title:o("Below"),children:(0,w.jsx)(d.Ay.Button,{value:"bottom",className:v()("",{"selected-td-form__border-radio":j(null===e||void 0===e?void 0:e.bottom)}),style:{margin:"auto"},children:(0,w.jsx)(f.A,{})})})})]})})})})]})}},71495:(e,t,o)=>{o.d(t,{A:()=>v});o(92810);var i=o(2018),l=o(7744),s=o(81e3),r=o(12280),a=o(43005),d=o(66726),n=o(1728),m=o(82051),c=o(11696),u=o(87042),h=o(38883),b=o.n(h),g=o(23287),p=o(88647),x=o(44997),A=o(45695),f=o(85163),j=o(70082);const v=({form:e,oneBorderRadiusValue:t,setOneBorderRadiusValue:o,elementSettings:h})=>{const{__:v}=(0,g.s9)(),_=(0,A.XW)();return(0,j.jsxs)(i.A,{gutter:10,children:[(0,j.jsx)(l.A,{span:12,children:(0,j.jsx)(s.A,{size:10,align:"start",children:(0,j.jsx)(r.A.Item,{name:"borderRadiusAll",children:(0,j.jsx)(x.A,{min:0,placeholder:v("Border radius"),prefix:(0,j.jsx)(p.h,{className:"selected-td-form__icon-radius"}),disabled:!t,addonAfter:"px"})})})}),(0,j.jsx)(l.A,{span:12,children:(0,j.jsx)(a.Ay,{className:b()("selected-td-form__button",{"selected-td-form__button--active":!t}),onClick:()=>{const i=e.getFieldsValue(!0);let l;if(t)e.setFieldsValue({borderRadiusTopLeft:i.borderRadiusAll||null,borderRadiusBottomLeft:i.borderRadiusAll||null,borderRadiusTopRight:i.borderRadiusAll||null,borderRadiusBottomRight:i.borderRadiusAll||null}),l={borderRadius:{[f.wF.borderRadiusTopLeft]:i.borderRadiusAll||0,[f.wF.borderRadiusBottomLeft]:i.borderRadiusAll||0,[f.wF.borderRadiusTopRight]:i.borderRadiusAll||0,[f.wF.borderRadiusBottomRight]:i.borderRadiusAll||0}};else{const t=i.borderRadiusTopLeft===i.borderRadiusBottomLeft&&i.borderRadiusTopLeft===i.borderRadiusTopRight&&i.borderRadiusTopLeft===i.borderRadiusBottomRight;t?(e.setFieldsValue({borderRadiusAll:t?i.borderRadiusTopLeft:null}),l={borderRadius:{[f.wF.borderRadiusAll]:i.borderRadiusTopLeft}}):(e.setFieldsValue({borderRadiusAll:null,borderRadiusTopLeft:null,borderRadiusBottomLeft:null,borderRadiusTopRight:null,borderRadiusBottomRight:null}),l={borderRadius:{[f.wF.borderRadiusAll]:0,[f.wF.borderRadiusTopLeft]:0,[f.wF.borderRadiusBottomLeft]:0,[f.wF.borderRadiusTopRight]:0,[f.wF.borderRadiusBottomRight]:0}})}_({operation:f.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:h.type,settings:{...h,borderRadius:{...h.borderRadius,...l.borderRadius}}}),o((e=>!e))},children:(0,j.jsx)(p.h,{className:"selected-td-form__icon-radius"})})}),(0,j.jsx)(l.A,{children:(0,j.jsxs)(i.A,{gutter:10,style:{marginTop:-10},children:[(0,j.jsxs)(l.A,{span:12,children:[(0,j.jsx)(d.A,{placement:"bottom",title:v("Top left corner"),children:(0,j.jsx)(r.A.Item,{hidden:t,name:"borderRadiusTopLeft",className:"form-item-margin-xs",children:(0,j.jsx)(x.A,{min:0,prefix:(0,j.jsx)(n.A,{}),style:{minHeight:10},addonAfter:"px"})})}),(0,j.jsx)(d.A,{placement:"bottom",title:v("Bottom left corner"),children:(0,j.jsx)(r.A.Item,{hidden:t,name:"borderRadiusBottomLeft",children:(0,j.jsx)(x.A,{min:0,prefix:(0,j.jsx)(m.A,{}),style:{minHeight:10},addonAfter:"px"})})})]}),(0,j.jsxs)(l.A,{span:12,children:[(0,j.jsx)(d.A,{placement:"bottom",title:v("Top right corner"),children:(0,j.jsx)(r.A.Item,{hidden:t,name:"borderRadiusTopRight",className:"form-item-margin-xs",children:(0,j.jsx)(x.A,{min:0,prefix:(0,j.jsx)(c.A,{}),style:{minHeight:10},addonAfter:"px"})})}),(0,j.jsx)(d.A,{placement:"bottom",title:v("Bottom right corner"),children:(0,j.jsx)(r.A.Item,{hidden:t,name:"borderRadiusBottomRight",children:(0,j.jsx)(x.A,{min:0,prefix:(0,j.jsx)(u.A,{}),style:{minHeight:10},addonAfter:"px"})})})]})]})})]})}},58341:(e,t,o)=>{o.d(t,{A:()=>x});o(92810);var i=o(2018),l=o(7744),s=o(66726),r=o(12280),a=o(81e3),d=o(37005),n=o(29258),m=o(23287),c=o(45934),u=o(44997),h=o(26238),b=o(62303),g=o(65983),p=o(70082);const x=()=>{const{__:e}=(0,m.s9)(),t=(0,c.d4)(g.uJ);return(0,p.jsx)(p.Fragment,{children:(0,p.jsxs)(i.A,{gutter:10,children:[(0,p.jsx)(l.A,{span:12,children:(0,p.jsx)(s.A,{placement:"bottom",title:e("Horizontal offset"),children:(0,p.jsx)(r.A.Item,{name:"boxShadowHOffset",className:"form-item-margin-xs",children:(0,p.jsx)(u.A,{placeholder:e("Horizontal offset"),prefix:(0,p.jsx)(n.A,{}),addonAfter:"px"})})})}),(0,p.jsx)(l.A,{span:12,children:(0,p.jsx)(s.A,{placement:"bottom",title:e("Vertical offset"),children:(0,p.jsx)(r.A.Item,{name:"boxShadowVOffset",className:"form-item-margin-xs",children:(0,p.jsx)(u.A,{placeholder:e("Vertical offset"),prefix:(0,p.jsx)(b.A,{icon:"VerticalOffset"}),addonAfter:"px"})})})}),(0,p.jsx)(l.A,{span:12,children:(0,p.jsx)(s.A,{placement:"bottom",title:e("Blur radius"),children:(0,p.jsx)(r.A.Item,{name:"boxShadowBlurRadius",className:"form-item-margin-xs",children:(0,p.jsx)(u.A,{min:0,placeholder:e("Blur radius"),prefix:(0,p.jsx)(b.A,{icon:"Blur",style:{fontSize:16,marginLeft:-2}}),addonAfter:"px"})})})}),(0,p.jsx)(l.A,{span:12,children:(0,p.jsx)(s.A,{placement:"bottom",title:e("Spread radius"),children:(0,p.jsx)(r.A.Item,{name:"boxShadowSpreadRadius",className:"form-item-margin-xs",children:(0,p.jsx)(u.A,{placeholder:e("Spread radius"),prefix:(0,p.jsx)(b.A,{icon:"ZoomOutMap"}),addonAfter:"px"})})})}),(0,p.jsx)(l.A,{span:12,children:(0,p.jsx)(a.A,{size:10,align:"start",children:(0,p.jsx)(r.A.Item,{name:"boxShadowColor",children:(0,p.jsx)(h.A,{usedColors:t.usedColors})})})}),(0,p.jsx)(l.A,{span:12,children:(0,p.jsx)(s.A,{title:e("Shadow inside or outside of the element"),placement:"bottom",children:(0,p.jsx)(r.A.Item,{name:"boxShadowInset",valuePropName:"value",children:(0,p.jsx)(d.A,{style:{width:"100%"},options:[{label:e("Outside"),value:!1},{label:e("Inside"),value:!0}]})})},"inset")})]})})}},48513:(e,t,o)=>{o.d(t,{A:()=>b});var i=o(92810),l=o(12280),s=o(20984),r=o(81e3),a=o(66726),d=o(23287),n=o(62303),m=o(85163),c=o(45695),u=o(70082);const h=({form:e,elementSettings:t,imgParent:o,name:h="mobileAlign"})=>{var b;const{__:g}=(0,d.s9)(),[p,x]=(0,i.useState)(null===(b=t[h])||void 0===b?void 0:b.value),A=(0,c.XW)(),f=o=>{const i=o.target.value,l={[h]:{classNamePrefix:"em-mob-text_align-",value:""}};i!==p?x(i):(x(""),e.setFieldsValue(l),A({operation:m.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:l}))};return(0,u.jsx)(l.A.Item,{name:h,children:(0,u.jsx)(s.Ay.Group,{disabled:o&&!t.parent,children:(0,u.jsxs)(r.A,{size:8,children:[(0,u.jsx)(a.A,{placement:"bottom",title:g("Align left"),children:(0,u.jsx)(s.Ay.Button,{value:"left",onClick:f,children:(0,u.jsx)(n.A,{icon:"AlignHorizontalLeft"})})}),(0,u.jsx)(a.A,{placement:"bottom",title:g("Center horizontally"),children:(0,u.jsx)(s.Ay.Button,{value:"center",onClick:f,children:(0,u.jsx)(n.A,{icon:"AlignHorizontalCenter"})})}),(0,u.jsx)(a.A,{placement:"bottom",title:g("Align right "),children:(0,u.jsx)(s.Ay.Button,{value:"right",onClick:f,children:(0,u.jsx)(n.A,{icon:"AlignHorizontalRight"})})}),(0,u.jsx)(a.A,{placement:"bottom",title:g("Text align justify"),children:(0,u.jsx)(s.Ay.Button,{value:"justify",onClick:f,children:(0,u.jsx)(n.A,{icon:"Justify"})})})]})})})};h.defaultProps={imgParent:!1};const b=h},40187:(e,t,o)=>{o.d(t,{A:()=>x});var i=o(92810),l=o(12280),s=o(20984),r=o(81e3),a=o(66726),d=o(23287),n=o(73170),m=o(87984),c=o(98885),u=o(85163),h=o(62303),b=o(45695),g=o(70082);const p=({form:e,elementSettings:t,imgParent:o,name:p="mobileAlign"})=>{var x;const{__:A}=(0,d.s9)(),[f,j]=(0,i.useState)(null===(x=t[p])||void 0===x?void 0:x.value),v=(0,b.XW)(),_=o=>{const i=o.target.value,l={[p]:{classNamePrefix:"em-mob-text_align-",value:""}};i!==f?j(i):(j(""),e.setFieldsValue(l),v({operation:u.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:l}))};return(0,g.jsx)(l.A.Item,{name:p,children:(0,g.jsx)(s.Ay.Group,{disabled:o&&!t.parent,children:(0,g.jsxs)(r.A,{size:8,children:[(0,g.jsx)(a.A,{placement:"bottom",title:A("Text align left"),children:(0,g.jsx)(s.Ay.Button,{value:"left",onClick:_,children:(0,g.jsx)(n.A,{})})}),(0,g.jsx)(a.A,{placement:"bottom",title:A("Text align center"),children:(0,g.jsx)(s.Ay.Button,{value:"center",onClick:_,children:(0,g.jsx)(m.A,{})})}),(0,g.jsx)(a.A,{placement:"bottom",title:A("Text align right"),children:(0,g.jsx)(s.Ay.Button,{value:"right",onClick:_,children:(0,g.jsx)(c.A,{})})}),(0,g.jsx)(a.A,{placement:"bottom",title:A("Text align justify"),children:(0,g.jsx)(s.Ay.Button,{value:"justify",onClick:_,children:(0,g.jsx)(h.A,{icon:"Justify"})})})]})})})};p.defaultProps={imgParent:!1};const x=p},45509:(e,t,o)=>{o.d(t,{A:()=>g});var i=o(92810),l=o(95838),s=o(66726),r=o(12280),a=o(81e3),d=o(8701),n=o(23287),m=o(26238),c=o(85163),u=o(45695),h=o(70082);const{useToken:b}=l.A,g=({form:e,elementSettings:t,label:o})=>{var l;const{__:g}=(0,n.s9)(),p=(0,i.useRef)(),[x,A]=(0,i.useState)("none"===(null===(l=t.mobileBackgroundColor)||void 0===l?void 0:l.value)),{token:f}=b(),j=(0,u.XW)();return(0,h.jsx)(h.Fragment,{children:(0,h.jsxs)(s.A,{trigger:["hover"],title:g("Background color"),placement:"left",children:[(0,h.jsx)(r.A.Item,{name:"mobileBackgroundColor",style:{marginBottom:f.formItemMarginBottomXS/2},children:(0,h.jsx)(m.A,{onChange:e=>{A(!1)},placeholder:o,usedColors:t.usedColors})}),(0,h.jsxs)(a.A,{size:8,align:"end",children:[(0,h.jsx)(d.A,{ref:p,size:"small",checked:x,onChange:o=>{e.setFieldsValue({mobileBackgroundColor:""}),A((e=>!e)),j({operation:c.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:{mobileBackgroundColor:{classNamePrefix:"em-mob-background_color-",value:x?"":"none"}}})},id:"without-background-color"}),(0,h.jsx)("div",{className:"ant-form-item-switch-label-small",style:{position:"relative",top:2},children:(0,h.jsx)("label",{htmlFor:"without-background-color",children:g("Without background color")})})]})]})})}},35015:(e,t,o)=>{o.d(t,{A:()=>R});o(92810);var i=o(95838),l=o(2018),s=o(7744),r=o(12280),a=o(78159),d=o(20984),n=o(81e3),m=o(66726),c=o(38587),u=o(12751),h=o(14473),b=o(37822),g=o(68285),p=o(57032),x=o(26461),A=o(69118),f=o(10930),j=o(38883),v=o.n(j),_=o(23287),S=o(45934),B=o(26238),y=o(65983),w=o(70082);const{useToken:k}=i.A,R=({mobileBorders:e})=>{const{__:t}=(0,_.s9)(),o=(0,S.d4)(y.uJ),i=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:j}=k();return(0,w.jsxs)(l.A,{gutter:30,children:[(0,w.jsxs)(s.A,{span:12,className:"selected-td-form__border-col",children:[(0,w.jsx)(r.A.Item,{name:"mobileBorderColor",className:"form-item-margin-xs",children:(0,w.jsx)(B.A,{usedColors:o.usedColors})}),(0,w.jsx)(r.A.Item,{name:"mobileBorderWidth",className:"form-item-margin-xs",children:(0,w.jsx)(a.A,{min:0,placeholder:t("Border width"),addonAfter:"px"})}),(0,w.jsx)(r.A.Item,{name:"mobileBorderStyle",className:"form-item-margin-xs",children:(0,w.jsx)(d.Ay.Group,{children:(0,w.jsxs)(n.A,{size:8,children:[(0,w.jsx)(m.A,{placement:"bottom",title:t("None"),children:(0,w.jsx)(d.Ay.Button,{value:"",children:(0,w.jsx)(c.A,{})})}),(0,w.jsx)(m.A,{placement:"bottom",title:t("Solid"),children:(0,w.jsx)(d.Ay.Button,{value:"solid",children:(0,w.jsx)(u.A,{})})}),(0,w.jsx)(m.A,{placement:"bottom",title:t("Dashed"),children:(0,w.jsx)(d.Ay.Button,{value:"dashed",children:(0,w.jsx)(h.A,{})})}),(0,w.jsx)(m.A,{placement:"bottom",title:t("Dotted"),children:(0,w.jsx)(d.Ay.Button,{value:"dotted",children:(0,w.jsx)(b.A,{})})})]})})})]}),(0,w.jsx)(s.A,{span:12,style:{textAlign:"center"},children:(0,w.jsx)(r.A.Item,{label:"",name:"mobileBorderPosition",labelCol:{span:8},children:(0,w.jsx)(d.Ay.Group,{children:(0,w.jsxs)(n.A,{size:j.formItemMarginBottomXS,direction:"vertical",children:[(0,w.jsx)(l.A,{children:(0,w.jsx)(m.A,{placement:"top",title:t("Above"),children:(0,w.jsx)(d.Ay.Button,{value:"top",style:{margin:"auto"},className:v()("",{"selected-td-form__border-radio":i(null===e||void 0===e?void 0:e.top)}),children:(0,w.jsx)(g.A,{})})})}),(0,w.jsx)(l.A,{children:(0,w.jsxs)(n.A,{size:j.formItemMarginBottomXS,children:[(0,w.jsx)(m.A,{placement:"left",title:t("On the left"),children:(0,w.jsx)(d.Ay.Button,{value:"left",className:v()("",{"selected-td-form__border-radio":i(null===e||void 0===e?void 0:e.left)}),children:(0,w.jsx)(p.A,{})})}),(0,w.jsx)(m.A,{placement:"top",title:t("Around"),children:(0,w.jsx)(d.Ay.Button,{value:"all",className:v()("",{"selected-td-form__border-radio":i(null===e||void 0===e?void 0:e.all)}),children:(0,w.jsx)(x.A,{})})}),(0,w.jsx)(m.A,{placement:"right",title:t("On the right"),children:(0,w.jsx)(d.Ay.Button,{value:"right",className:v()("",{"selected-td-form__border-radio":i(null===e||void 0===e?void 0:e.right)}),children:(0,w.jsx)(A.A,{})})})]})}),(0,w.jsx)(l.A,{children:(0,w.jsx)(m.A,{placement:"bottom",title:t("Below"),children:(0,w.jsx)(d.Ay.Button,{value:"bottom",className:v()("",{"selected-td-form__border-radio":i(null===e||void 0===e?void 0:e.bottom)}),style:{margin:"auto"},children:(0,w.jsx)(f.A,{})})})})]})})})})]})}},99983:(e,t,o)=>{o.d(t,{A:()=>f});o(92810);var i=o(2018),l=o(7744),s=o(81e3),r=o(12280),a=o(43005),d=o(66726),n=o(1728),m=o(82051),c=o(11696),u=o(87042),h=o(38883),b=o.n(h),g=o(23287),p=o(88647),x=o(44997),A=o(70082);const f=({form:e,oneMobileBorderRadiusValue:t,setOneMobileBorderRadiusValue:o})=>{const{__:h}=(0,g.s9)();return(0,A.jsxs)(i.A,{gutter:10,children:[(0,A.jsx)(l.A,{span:12,children:(0,A.jsx)(s.A,{size:10,align:"start",children:(0,A.jsx)(r.A.Item,{name:"mobileBorderRadiusAll",children:(0,A.jsx)(x.A,{min:0,placeholder:h("Border radius"),prefix:(0,A.jsx)(p.h,{className:"selected-td-form__icon-radius"}),disabled:!t,addonAfter:"px"})})})}),(0,A.jsx)(l.A,{span:12,children:(0,A.jsx)(a.Ay,{className:b()("selected-td-form__button",{"selected-td-form__button--active":!t}),onClick:()=>{const i=e.getFieldsValue(!0);t&&e.setFieldsValue({mobileRadiusTopLeft:i.mobileBorderRadiusAll,mobileRadiusBottomLeft:i.mobileBorderRadiusAll,mobileRadiusTopRight:i.mobileBorderRadiusAll,mobileRadiusBottomRight:i.mobileBorderRadiusAll}),o((e=>!e))},children:(0,A.jsx)(p.h,{className:"selected-td-form__icon-radius"})})}),(0,A.jsx)(l.A,{children:(0,A.jsxs)(i.A,{gutter:10,style:{marginTop:-10},children:[(0,A.jsxs)(l.A,{span:12,children:[(0,A.jsx)(d.A,{placement:"bottom",title:h("Top left corner"),children:(0,A.jsx)(r.A.Item,{hidden:t,name:"mobileRadiusTopLeft",className:"form-item-margin-xs",children:(0,A.jsx)(x.A,{min:0,prefix:(0,A.jsx)(n.A,{}),style:{minHeight:10},addonAfter:"px"})})}),(0,A.jsx)(d.A,{placement:"bottom",title:h("Bottom left corner"),children:(0,A.jsx)(r.A.Item,{hidden:t,name:"mobileRadiusBottomLeft",children:(0,A.jsx)(x.A,{min:0,prefix:(0,A.jsx)(m.A,{}),style:{minHeight:10},addonAfter:"px"})})})]}),(0,A.jsxs)(l.A,{span:12,children:[(0,A.jsx)(d.A,{placement:"bottom",title:h("Top right corner"),children:(0,A.jsx)(r.A.Item,{hidden:t,name:"mobileRadiusTopRight",className:"form-item-margin-xs",children:(0,A.jsx)(x.A,{min:0,prefix:(0,A.jsx)(c.A,{}),style:{minHeight:10},addonAfter:"px"})})}),(0,A.jsx)(d.A,{placement:"bottom",title:h("Bottom right corner"),children:(0,A.jsx)(r.A.Item,{hidden:t,name:"mobileRadiusBottomRight",children:(0,A.jsx)(x.A,{min:0,prefix:(0,A.jsx)(u.A,{}),style:{minHeight:10},addonAfter:"px"})})})]})]})})]})}},18405:(e,t,o)=>{o.d(t,{A:()=>v});var i=o(92810),l=o(81e3),s=o(8701),r=o(2018),a=o(7744),d=o(66726),n=o(12280),m=o(37005),c=o(29258),u=o(23287),h=o(45934),b=o(26238),g=o(62303),p=o(44997),x=o(85163),A=o(45695),f=o(65983),j=o(70082);const v=({form:e,elementSettings:t})=>{const{__:o}=(0,u.s9)(),v=(0,i.useRef)(),_=(0,h.d4)(f.uJ),[S,B]=(0,i.useState)(!t.mobileBoxShadow||0===t.mobileBoxShadow.hOffset&&0===t.mobileBoxShadow.vOffset&&0===t.mobileBoxShadow.blurRadius&&0===t.mobileBoxShadow.spreadRadius&&0===t.mobileBoxShadow.spreadRadius),y=(0,A.XW)(),w=e=>{B(!1)};return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("div",{style:{float:"right",marginTop:-9,marginRight:50},children:(0,j.jsxs)(l.A,{size:8,align:"end",children:[(0,j.jsx)(s.A,{ref:v,size:"small",checked:S,onChange:o=>{B((e=>!e)),e.setFieldsValue({mobileBoxShadowHOffset:S?"":0,mobileBoxShadowVOffset:S?"":0,mobileBoxShadowBlurRadius:S?"":0,mobileBoxShadowSpreadRadius:S?"":0,mobileBoxShadowColor:"",mobileBoxShadowInset:!1}),y({operation:x.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:{mobileBoxShadow:{classNamePrefix:"em-mob-box_shadow-",hOffset:S?null:0,vOffset:S?null:0,blurRadius:S?null:0,spreadRadius:S?null:0,color:null,inset:!1}}})},id:"without-shadow"}),(0,j.jsx)("div",{className:"ant-form-item-switch-label-small",style:{position:"relative",top:2},children:(0,j.jsx)("label",{htmlFor:"without-shadow",children:o("Without shadow")})})]})}),(0,j.jsx)("p",{style:{paddingBottom:"8px",margin:"-30px 0 0"},children:"\xa0"}),(0,j.jsxs)(r.A,{gutter:10,children:[(0,j.jsx)(a.A,{span:12,children:(0,j.jsx)(d.A,{placement:"bottom",title:o("Horizontal offset"),children:(0,j.jsx)(n.A.Item,{name:"mobileBoxShadowHOffset",className:"form-item-margin-xs",children:(0,j.jsx)(p.A,{min:0,placeholder:o("Horizontal offset"),prefix:(0,j.jsx)(c.A,{}),addonAfter:"px",onChange:w})})})}),(0,j.jsx)(a.A,{span:12,children:(0,j.jsx)(d.A,{placement:"bottom",title:o("Vertical offset"),children:(0,j.jsx)(n.A.Item,{name:"mobileBoxShadowVOffset",className:"form-item-margin-xs",children:(0,j.jsx)(p.A,{min:0,placeholder:o("Vertical offset"),prefix:(0,j.jsx)(c.A,{style:{transform:"rotate(90deg)"}}),addonAfter:"px",onChange:w})})})}),(0,j.jsx)(a.A,{span:12,children:(0,j.jsx)(d.A,{placement:"bottom",title:o("Blur radius"),children:(0,j.jsx)(n.A.Item,{name:"mobileBoxShadowBlurRadius",className:"form-item-margin-xs",children:(0,j.jsx)(p.A,{min:0,placeholder:o("Blur radius"),prefix:(0,j.jsx)(g.A,{icon:"Blur",style:{fontSize:16,marginLeft:-2}}),addonAfter:"px",onChange:w})})})}),(0,j.jsx)(a.A,{span:12,children:(0,j.jsx)(d.A,{placement:"bottom",title:o("Spread radius"),children:(0,j.jsx)(n.A.Item,{name:"mobileBoxShadowSpreadRadius",className:"form-item-margin-xs",children:(0,j.jsx)(p.A,{placeholder:o("Spread radius"),prefix:(0,j.jsx)(g.A,{icon:"ZoomOutMap"}),addonAfter:"px",onChange:w})})})}),(0,j.jsx)(a.A,{span:12,children:(0,j.jsx)(l.A,{size:10,align:"start",children:(0,j.jsx)(n.A.Item,{name:"mobileBoxShadowColor",children:(0,j.jsx)(b.A,{usedColors:_.usedColors})})})}),(0,j.jsx)(a.A,{span:12,children:(0,j.jsx)(d.A,{title:o("Shadow inside or outside of the element"),placement:"bottom",children:(0,j.jsx)(n.A.Item,{name:"mobileBoxShadowInset",valuePropName:"checked",children:(0,j.jsx)(m.A,{style:{width:"100%"},options:[{label:o("Outside"),value:!1},{label:o("Inside"),value:!0}]})})},"inset")})]})]})}},65655:(e,t,o)=>{o.d(t,{A:()=>n});o(92810);var i=o(66726),l=o(12280),s=o(7166),r=o(23287),a=o(44997),d=o(70082);const n=()=>{const{__:e}=(0,r.s9)();return(0,d.jsx)(i.A,{trigger:["hover"],title:e("The font-size CSS property sets the size of the font."),placement:"top",children:(0,d.jsx)(l.A.Item,{name:"mobileFontSize",children:(0,d.jsx)(a.A,{min:0,placeholder:e("Font size"),prefix:(0,d.jsx)(s.A,{}),addonAfter:"px"})})})}},95955:(e,t,o)=>{o.d(t,{A:()=>g});var i=o(92810),l=o(95838),s=o(12280),r=o(81e3),a=o(8701),d=o(11007),n=o(23287),m=o(85163),c=o(44997),u=o(45695),h=o(70082);const{useToken:b}=l.A,g=({form:e,name:t,elementSettings:o,isPicture:l})=>{var g;const{__:p}=(0,n.s9)(),x=(0,u.XW)(),A=(0,i.useRef)(),f=(0,i.useRef)(),[j,v]=(0,i.useState)("auto"===(null===(g=o.mobileHeight)||void 0===g?void 0:g.value)),{token:_}=b();return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(s.A.Item,{name:t,style:{marginBottom:_.formItemMarginBottomXS/2},children:(0,h.jsx)(c.A,{ref:A,min:0,placeholder:p("Height"),onChange:e=>{v(!1)},prefix:(0,h.jsx)(d.A,{}),addonAfter:"px"})}),!l&&(0,h.jsxs)(r.A,{size:8,align:"end",children:[(0,h.jsx)(a.A,{ref:f,size:"small",checked:j,onChange:t=>{A.current.value=null,e.setFieldsValue({mobileHeight:"",mobileHeightDim:"px"}),v((e=>!e)),x({operation:m.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:{mobileHeight:{classNamePrefix:"em-mob-height-",value:j?null:"auto",dim:""}}})},id:"auto-height"}),(0,h.jsx)("div",{className:"ant-form-item-switch-label-small",style:{position:"relative",top:2},children:(0,h.jsx)("label",{htmlFor:"auto-height",children:p("Auto")})})]})]})}},34353:(e,t,o)=>{o.d(t,{A:()=>x});o(92810);var i=o(95838),l=o(7744),s=o(66726),r=o(12280),a=o(43005),d=o(38883),n=o.n(d),m=o(23287),c=o(85163),u=o(44997),h=o(62303),b=o(45695),g=o(70082);const{useToken:p}=i.A,x=({form:e,elementSettings:t,mobilePaddingsExt:o,setMobilePaddingsExt:i})=>{const{__:d}=(0,m.s9)(),{token:x}=p(),A=(0,b.XW)();return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(l.A,{span:10,style:{width:156,flex:"auto",maxWidth:"none"},children:[(0,g.jsx)("div",{className:"padding-collapsed",style:{display:o?"block":"none"},children:(0,g.jsx)(s.A,{title:d("Horizontal padding"),placement:"bottom",children:(0,g.jsx)(r.A.Item,{name:"mobilePaddingLeftRight",children:(0,g.jsx)(u.A,{min:0,placeholder:d("Horizontal"),prefix:(0,g.jsx)(h.A,{icon:"PaddingLeftRight"}),addonAfter:"px"})})})}),(0,g.jsxs)("div",{className:"padding-extended",style:{display:o?"none":"block"},children:[(0,g.jsx)(s.A,{trigger:["hover"],title:d("Left padding"),placement:"bottom",children:(0,g.jsx)(r.A.Item,{name:"mobilePaddingLeft",style:{marginBottom:x.formItemMarginBottomXS},children:(0,g.jsx)(u.A,{min:0,placeholder:d("Left"),prefix:(0,g.jsx)(h.A,{icon:"PaddingLeft"}),addonAfter:"px"})})}),(0,g.jsx)(s.A,{trigger:["hover"],title:d("Right padding"),placement:"bottom",children:(0,g.jsx)(r.A.Item,{name:"mobilePaddingRight",children:(0,g.jsx)(u.A,{min:0,placeholder:d("Right"),prefix:(0,g.jsx)(h.A,{icon:"PaddingRight"}),addonAfter:"px"})})})]})]}),(0,g.jsxs)(l.A,{span:10,style:{width:156,flex:"auto",maxWidth:"none"},children:[(0,g.jsx)("div",{className:"padding-collapsed",style:{display:o?"block":"none"},children:(0,g.jsx)(s.A,{title:d("Vertical padding"),placement:"bottom",children:(0,g.jsx)(r.A.Item,{name:"mobilePaddingTopBottom",children:(0,g.jsx)(u.A,{min:0,placeholder:d("Vertical"),prefix:(0,g.jsx)(h.A,{icon:"PaddingTopBottom"}),addonAfter:"px"})})})}),(0,g.jsxs)("div",{className:"padding-extended",style:{display:o?"none":"block"},children:[(0,g.jsx)(s.A,{trigger:["hover"],title:d("Top padding"),placement:"bottom",children:(0,g.jsx)(r.A.Item,{name:"mobilePaddingTop",style:{marginBottom:x.formItemMarginBottomXS},children:(0,g.jsx)(u.A,{min:0,placeholder:d("Top"),prefix:(0,g.jsx)(h.A,{icon:"PaddingTop"}),addonAfter:"px"})})}),(0,g.jsx)(s.A,{trigger:["hover"],title:d("Bottom padding"),placement:"bottom",children:(0,g.jsx)(r.A.Item,{name:"mobilePaddingBottom",children:(0,g.jsx)(u.A,{min:0,placeholder:d("Bottom"),prefix:(0,g.jsx)(h.A,{icon:"PaddingBottom"}),addonAfter:"px"})})})]})]}),(0,g.jsx)(l.A,{span:4,style:{width:45,flex:"auto",maxWidth:"none"},children:(0,g.jsx)(s.A,{title:d("Individual padding"),placement:"bottom",children:(0,g.jsx)(a.Ay,{className:n()("selected-td-form__button",{"selected-td-form__button--active":!o}),onClick:()=>{i((e=>!e));const l=e.getFieldsValue(!0);o||(l.mobilePaddingLeftRight=l.mobilePaddingLeft,l.mobilePaddingTopBottom=l.mobilePaddingTop,l.mobilePaddingRight=l.mobilePaddingLeft,l.mobilePaddingBottom=l.mobilePaddingTop,A({operation:c.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_"}}}))},children:(0,g.jsx)(h.A,{icon:"PaddingSwitcher"})})})})]})}},24615:(e,t,o)=>{o.d(t,{A:()=>A});var i=o(92810),l=o(81662),s=o(95838),r=o(12280),a=o(81e3),d=o(8701),n=o(62767),m=o(23287),c=o(85163),u=o(45695),h=o(44997),b=o(70082);const{Option:g}=l.A,p=(0,b.jsxs)(l.A,{className:"select-after",getPopupContainer:e=>e.parentNode,children:[(0,b.jsx)(g,{value:"px",children:"px"}),(0,b.jsx)(g,{value:"%",children:"%"})]}),{useToken:x}=s.A,A=({form:e,name:t,elementSettings:o,isPicture:l})=>{var s;const{__:g}=(0,m.s9)(),A=(0,u.XW)(),f=(0,i.useRef)(),j=(0,i.useRef)(),[v,_]=(0,i.useState)("auto"===(null===(s=o[t])||void 0===s?void 0:s.value)),{token:S}=x(),[B,y]=(0,i.useState)("");return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(r.A.Item,{name:t,style:{marginBottom:S.formItemMarginBottomXS/2},children:(0,b.jsx)(h.A,{ref:f,min:0,max:B,placeholder:g("Width"),onChange:o=>{_(!1),y("%"===e.getFieldsValue(!0)[t+"Dim"]?100:"")},prefix:(0,b.jsx)(n.A,{}),addonAfter:(0,b.jsx)(r.A.Item,{name:t+"Dim",noStyle:!0,children:p})})}),!l&&(0,b.jsxs)(a.A,{size:8,align:"end",children:[(0,b.jsx)(d.A,{ref:j,size:"small",checked:v,onChange:i=>{f.current.value=null,e.setFieldsValue({[t]:"",[t+"Dim"]:"px"}),_((e=>!e)),A({operation:c.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:{[t]:{classNamePrefix:"em-mob-width-",value:v?null:"auto",dim:""}}})},id:"auto-width"}),(0,b.jsx)("div",{className:"ant-form-item-switch-label-small",style:{position:"relative",top:2},children:(0,b.jsx)("label",{htmlFor:"auto-width",children:g("Auto")})})]})]})}},13071:(e,t,o)=>{o.d(t,{A:()=>u});o(92810);var i=o(12280),l=o(20984),s=o(81e3),r=o(66726),a=o(68912),d=o(50295),n=o(23287),m=o(70082);const c=({form:e,elementSettings:t})=>{const{__:o}=(0,n.s9)();return(0,m.jsx)(i.A.Item,{name:"show",children:(0,m.jsx)(l.Ay.Group,{children:(0,m.jsxs)(s.A,{size:8,children:[(0,m.jsx)(l.Ay.Button,{value:"all",children:o("Both")}),(0,m.jsx)(r.A,{placement:"top",title:o("Desktop"),children:(0,m.jsx)(l.Ay.Button,{value:"desktop",children:(0,m.jsx)(a.A,{})})}),(0,m.jsx)(r.A,{placement:"top",title:o("Mobile"),children:(0,m.jsx)(l.Ay.Button,{value:"mobile",children:(0,m.jsx)(d.A,{})})})]})})})};c.defaultProps={};const u=c},73721:(e,t,o)=>{o.d(t,{A:()=>b});var i=o(92810),l=o(12280),s=o(66726),r=o(43005),a=o(23287),d=o(85163),n=o(45695),m=o(38883),c=o.n(m),u=o(70082);const h=({form:e,elementSettings:t,name:o,icon:m,tooltipTitle:h=null,showTooltip:b=!0})=>{const{__:g}=(0,a.s9)(),p=e.getFieldValue(o),x=(0,n.XW)(),[A,f]=(0,i.useState)(t[o]);(0,i.useEffect)((()=>{t[o]!==e.getFieldValue(o)&&(e.setFieldValue(o,t[o]),f(t[o]))}),[t,e,o]),(0,i.useEffect)((()=>{A!==p&&f(p)}),[p,A,o]);const j=()=>{const i={[o]:!A};e.setFieldValue(o,!A),x({operation:d.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:i}),f((e=>!e))};return(0,u.jsx)(l.A.Item,{name:o,children:b?(0,u.jsx)(s.A,{placement:"bottom",title:h||g(`${o.substring(4)}`),children:(0,u.jsx)(r.Ay,{className:c()("selected-td-form__button selected-td-form__button_style",{"selected-td-form__button--active":A}),onClick:j,children:m})}):(0,u.jsx)(r.Ay,{className:c()("selected-td-form__button selected-td-form__button_style",{"selected-td-form__button--active":A}),onClick:j,children:m})})};h.defaultProps={imgParent:!1};const b=h},26021:(e,t,o)=>{o.d(t,{A:()=>h});var i=o(92810),l=o(12280),s=o(20984),r=o(81e3),a=o(66726),d=o(23287),n=o(62303),m=o(85163),c=o(45695),u=o(70082);const h=({form:e,elementSettings:t,tooltipTitle:o,disabled:h=!1})=>{const{__:b}=(0,d.s9)(),g=(0,c.XW)(),[p,x]=(0,i.useState)(t.valign),A=o=>{const i=o.target.value,l={valign:""};i!==p?x(i):(x(""),e.setFieldsValue(l),g({operation:m.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:l}))};return(0,u.jsx)(l.A.Item,{name:"valign",children:(0,u.jsx)(s.Ay.Group,{disabled:h,children:(0,u.jsxs)(r.A,{size:8,children:[(0,u.jsx)(a.A,{placement:"bottom",title:b("Align top"),children:(0,u.jsx)(s.Ay.Button,{value:"top",onClick:A,children:(0,u.jsx)(n.A,{icon:"AlignVerticalTop"})})}),(0,u.jsx)(a.A,{placement:"bottom",title:b("Center vertically"),children:(0,u.jsx)(s.Ay.Button,{value:"middle",onClick:A,children:(0,u.jsx)(n.A,{icon:"AlignVerticalCenter"})})}),(0,u.jsx)(a.A,{placement:"bottom",title:b("Align bottom"),children:(0,u.jsx)(s.Ay.Button,{value:"bottom",onClick:A,children:(0,u.jsx)(n.A,{icon:"AlignVerticalBottom"})})})]})})})}},34275:(e,t,o)=>{o.d(t,{A:()=>d});o(92810);var i=o(38883),l=o.n(i),s=o(31838),r=(o(37981),o(70082));const a=({className:e,selectedElement:t,formSettings:o,emailElementType:i})=>(0,r.jsx)("div",{className:l()("selected-element-panel",{[e]:e}),style:{height:"100%"},children:(0,r.jsx)(s.A,{className:l()("selected-element-panel__content SelectedElementPanel",{"column-settings-show":!!t.floatBlocks&&t.floatBlocks.items.length>1}),emailElementType:i,formSettings:o})});a.defaultProps={className:null,selectedElement:{parent:!1}};const d=a},31838:(e,t,o)=>{o.d(t,{A:()=>jt});var i=o(92810),l=o(99215),s=o(38883),r=o.n(s),a=o(45934),d=o(65983),n=o(7760),m=o(64617),c=o(95838),u=o(12280),h=o(66726),b=o(29234),g=o(2018),p=o(7744),x=o(71086),A=o(43005),f=o(79579),j=o(81e3),v=o(55039),_=o(7228),S=o(62767),B=o(11007),y=o(54316),w=o(4815),k=o(6890),R=o(14523),P=o.n(R),N=o(49343),T=o(21519),E=o(71495),I=o(28381),C=o(26021),L=o(58341),O=o(24615),D=o(95955),F=o(35015),V=o(99983),M=o(18405),W=o(48513),H=o(20984),X=o(23287),z=o(62303),G=o(85163),U=o(45695),Y=o(70082);const q=({form:e,elementSettings:t,tooltipTitle:o})=>{var l;const{__:s}=(0,X.s9)(),[r,a]=(0,i.useState)(null===(l=t.mobileVerticalAlign)||void 0===l?void 0:l.value),d=(0,U.XW)(),n=o=>{const i=o.target.value,l={mobileVerticalAlign:{classNamePrefix:"em-mob-vertical_align",value:""}};i!==r?a(i):(a(""),e.setFieldsValue(l),d({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:l}))};return(0,Y.jsx)(u.A.Item,{name:"mobileVerticalAlign",children:(0,Y.jsx)(H.Ay.Group,{children:(0,Y.jsxs)(j.A,{size:8,children:[(0,Y.jsx)(h.A,{placement:"bottom",title:s("Align top"),children:(0,Y.jsx)(H.Ay.Button,{value:"top",onClick:n,children:(0,Y.jsx)(z.A,{icon:"AlignVerticalTop"})})}),(0,Y.jsx)(h.A,{placement:"bottom",title:s("Center vertically"),children:(0,Y.jsx)(H.Ay.Button,{value:"middle",onClick:n,children:(0,Y.jsx)(z.A,{icon:"AlignVerticalCenter"})})}),(0,Y.jsx)(h.A,{placement:"bottom",title:s("Align bottom"),children:(0,Y.jsx)(H.Ay.Button,{value:"bottom",onClick:n,children:(0,Y.jsx)(z.A,{icon:"AlignVerticalBottom"})})})]})})})};var K=o(13071),$=o(94104),J=o(81662),Q=o(8701),Z=o(78159),ee=o(7166),te=o(6391),oe=o(69372),ie=o(26238);const{useToken:le}=c.A,se=({form:e,elementSettings:t,handleChangeValues:o})=>{const{__:l}=(0,X.s9)(),s=(0,i.useRef)(),{token:a}=le(),[d,n]=(0,i.useState)(!1),[m,c]=(0,i.useState)(!1),[b,x]=(0,i.useState)(!1),[f,v]=(0,i.useState)(!1),[_,S]=(0,i.useState)(!1);(0,i.useEffect)((()=>{let e=new URL("https://emailmaker.ru/?"+t.countdown);n(e.searchParams.get("font1").endsWith("-b")||e.searchParams.get("font1").endsWith("-bi")),c(e.searchParams.get("font1").endsWith("-i")||e.searchParams.get("font1").endsWith("-bi")),x(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")),S("true"===e.searchParams.get("tp"))}),[t]);const B=[{value:"-12",label:l("-12:00 Apia")},{value:"-11",label:l("-11:00 Pago Pago, Midway Atoll")},{value:"-10",label:l("-10:00 Honolulu, Anchorage")},{value:"-9",label:l("-9:00 Anchorage, Yukon")},{value:"-8",label:l("-8:00 Los Angeles, Vancouver")},{value:"-7",label:l("-7:00 Denver, Phoenix")},{value:"-6",label:l("-6:00 Mexico City, Guadalajara")},{value:"-5",label:l("-5:00 New York, Toronto, Havana")},{value:"-4",label:l("-4:00 Caracas, Santo Domingo")},{value:"-3",label:l("-3:00 Buenos Aires, Santiago, Montevideo")},{value:"-2",label:l("-2:00 South Georgia, Saint Helena")},{value:"-1",label:l("-1:00 Azores, Cape Verde")},{value:"0",label:l("+0:00 London, Lisbon, Dublin")},{value:"1",label:l("+1:00 Paris, Berlin, Rome")},{value:"2",label:l("+2:00 Athens, Kiev, Istanbul")},{value:"3",label:l("+3:00 Istanbul, Doha, Baghdad")},{value:"4",label:l("+4:00 Baku, Dubai, Tbilisi")},{value:"5",label:l("+5:00 Karachi, Tashkent, Islamabad")},{value:"6",label:l("+6:00 Almaty, Dhaka, Bishkek")},{value:"7",label:l("+7:00 Bangkok, Ho Chi Minh City, Jakarta")},{value:"8",label:l("+8:00 Beijing, Hong Kong, Singapore")},{value:"9",label:l("+9:00 Tokyo, Seoul, Jayapura")},{value:"10",label:l("+10:00 Sydney, Melbourne, Port Moresby")},{value:"11",label:l("+11:00 Honiara, Nuku'alofa, Apia")}],y=[{value:"20",label:l("20 c")},{value:"40",label:l("40 c")},{value:"60",label:l("60 c")}],w=[{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"}],k=e=>{var t;e.target.closest(".ant-picker-dropdown")||(null===(t=s.current)||void 0===t||t.blur())};(0,i.useEffect)((()=>(window.addEventListener("scroll",k,!0),()=>{window.removeEventListener("scroll",k,!0)})));return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(g.A,{gutter:10,children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(u.A.Item,{label:l("End time"),name:"countdownTime",children:(0,Y.jsx)($.A,{ref:s,format:"DD.MM.YYYY HH:mm",disabledDate:e=>e&&e<P()().endOf("day")-864e5,showTime:!0,getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),allowClear:!1,allowEmpty:!1})})}),(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(u.A.Item,{label:l("Time zone"),name:"countdownTimeZone",style:{width:"100%"},children:(0,Y.jsx)(J.A,{placeholder:l("Select the time zone"),getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel"),children:B.map((e=>(0,Y.jsx)(J.A.Option,{value:e.value,children:e.label},e.value)))})})})]}),(0,Y.jsxs)(g.A,{gutter:20,children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(u.A.Item,{label:l("Background color"),name:"countdownBackgroundColor",className:"countdown-color",children:(0,Y.jsx)(ie.A,{placeholder:l("Background color"),isDisabled:_,usedColors:t.usedColors})})}),(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsxs)(j.A,{size:10,align:"baseline",style:{paddingTop:29},children:[(0,Y.jsx)(u.A.Item,{name:"countdownTransparency",valuePropName:"checked",children:(0,Y.jsx)(Q.A,{size:"small",id:"countdownTransparency",onChange:e=>{S(e)}})}),(0,Y.jsx)("span",{style:{position:"relative",top:2},children:(0,Y.jsx)("label",{htmlFor:"countdownTransparency",children:l("Transparency")})})]})})]}),(0,Y.jsx)("div",{className:"form-group-title",style:{paddingTop:0,paddingBottom:8},children:l("Countdown font settings")}),(0,Y.jsxs)(g.A,{gutter:10,children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(u.A.Item,{name:"countdownNumbersFont",style:{marginBottom:a.formItemMarginBottomXS},children:(0,Y.jsx)(J.A,{getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel"),options:w})})}),(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(u.A.Item,{name:"countdownNumbersColor",className:"countdown-color",style:{marginBottom:a.formItemMarginBottomXS},children:(0,Y.jsx)(ie.A,{usedColors:t.usedColors})})}),(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(u.A.Item,{name:"countdownNumbersFontSize",children:(0,Y.jsx)(Z.A,{min:12,placeholder:l("Font size"),prefix:(0,Y.jsx)(ee.A,{}),addonAfter:"px"})})}),(0,Y.jsx)(p.A,{span:3,children:(0,Y.jsx)(h.A,{placement:"bottom",title:l("Strong"),children:(0,Y.jsx)(u.A.Item,{name:"countdownNumbersStrong",children:(0,Y.jsx)(A.Ay,{className:r()("selected-td-form__button selected-td-form__button_style",{"selected-td-form__button--active":d}),onClick:()=>{const t=!d;e.setFieldValue("countdownNumbersStrong",t),o({countdownNumbersStrong:t}),n(t)},children:(0,Y.jsx)(te.A,{className:"selected-td-form__icon-radius"})})})})}),(0,Y.jsx)(p.A,{span:3,children:(0,Y.jsx)(h.A,{placement:"bottom",title:l("Italic"),children:(0,Y.jsx)(u.A.Item,{name:"countdownNumbersItalic",children:(0,Y.jsx)(A.Ay,{className:r()("selected-td-form__button selected-td-form__button_style",{"selected-td-form__button--active":m}),onClick:()=>{const t=!m;e.setFieldValue("countdownNumbersItalic",t),o({countdownNumbersItalic:t}),c(t)},children:(0,Y.jsx)(oe.A,{className:"selected-td-form__icon-radius"})})})})})]}),(0,Y.jsx)("div",{className:"form-group-title",style:{paddingTop:0,paddingBottom:8},children:l("Time units font settings")}),(0,Y.jsxs)(g.A,{gutter:10,children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(u.A.Item,{name:"countdownLabelsFont",style:{marginBottom:a.formItemMarginBottomXS},children:(0,Y.jsx)(J.A,{getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel"),options:w})})}),(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(u.A.Item,{name:"countdownLabelsColor",className:"countdown-color",style:{marginBottom:a.formItemMarginBottomXS},children:(0,Y.jsx)(ie.A,{usedColors:t.usedColors})})}),(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(u.A.Item,{name:"countdownLabelsFontSize",children:(0,Y.jsx)(Z.A,{min:8,placeholder:l("Font size"),addonAfter:"px",prefix:(0,Y.jsx)(ee.A,{})})})}),(0,Y.jsx)(p.A,{span:3,children:(0,Y.jsx)(h.A,{placement:"bottom",title:l("Strong"),children:(0,Y.jsx)(u.A.Item,{name:"countdownLabelsStrong",children:(0,Y.jsx)(A.Ay,{className:r()("selected-td-form__button selected-td-form__button_style",{"selected-td-form__button--active":b}),onClick:()=>{const t=!b;e.setFieldValue("countdownLabelsStrong",t),o({countdownLabelsStrong:t}),x(t)},children:(0,Y.jsx)(te.A,{className:"selected-td-form__icon-radius"})})})})}),(0,Y.jsx)(p.A,{span:3,children:(0,Y.jsx)(h.A,{placement:"bottom",title:l("Italic"),children:(0,Y.jsx)(u.A.Item,{name:"countdownLabelsItalic",children:(0,Y.jsx)(A.Ay,{className:r()("selected-td-form__button selected-td-form__button_style",{"selected-td-form__button--active":f}),onClick:()=>{const t=!f;e.setFieldValue("countdownLabelsItalic",t),o({countdownLabelsItalic:t}),v(t)},children:(0,Y.jsx)(oe.A,{className:"selected-td-form__icon-radius"})})})})})]}),(0,Y.jsxs)(g.A,{gutter:10,style:{marginBottom:4},children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(u.A.Item,{label:l("Language"),name:"countdownLanguage",style:{width:"100%"},children:(0,Y.jsx)(J.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"}]})})}),(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(u.A.Item,{label:l("Duration"),name:"countdownDuration",style:{width:"100%"},children:(0,Y.jsx)(J.A,{getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel"),options:y})})})]})]})};var re=o(85778),ae=o(85085),de=o(13417),ne=o(12108);const{useToken:me}=c.A,ce=({form:e,elementSettings:t})=>{const{__:o}=(0,X.s9)(),{token:i}=me();return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(h.A,{trigger:["hover"],title:o("URL of the video clip."),placement:"right",children:(0,Y.jsx)(u.A.Item,{name:"videoSource",className:"selected-image-form__alt",children:(0,Y.jsx)(v.A,{allowClear:!0,placeholder:o("Video URL"),prefix:(0,Y.jsx)(re.A,{})})})}),(0,Y.jsx)(u.A.Item,{label:o("Play button"),name:"videoPlayButton",style:{width:"100%",marginBottom:i.formItemMarginBottomMD+4},children:(0,Y.jsxs)(J.A,{getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel"),children:[(0,Y.jsxs)(J.A.Option,{value:"youtube_red",children:[(0,Y.jsx)(ae.A,{style:{color:"#FF0000"}})," ",o("Youtube Red")]}),(0,Y.jsxs)(J.A.Option,{value:"youtube_black",children:[(0,Y.jsx)(ae.A,{})," ",o("Youtube Black")]}),(0,Y.jsxs)(J.A.Option,{value:"youtube_white",children:[(0,Y.jsx)(ae.A,{style:{color:"#aaa"}})," ",o("Youtube White")]}),(0,Y.jsxs)(J.A.Option,{value:"vimeo",children:[(0,Y.jsx)(z.A,{icon:"Vimeo"})," ",o("Vimeo")]}),(0,Y.jsxs)(J.A.Option,{value:"white_circle",children:[(0,Y.jsx)(de.A,{style:{color:"#aaa"}})," ",o("White circle")]}),(0,Y.jsxs)(J.A.Option,{value:"black_circle",children:[(0,Y.jsx)(de.A,{})," ",o("Black circle")]}),(0,Y.jsxs)(J.A.Option,{value:"white_circle_outlined",children:[(0,Y.jsx)(ne.A,{style:{color:"#aaa"}})," ",o("White circle outlined")]}),(0,Y.jsxs)(J.A.Option,{value:"black_circle_outlined",children:[(0,Y.jsx)(ne.A,{})," ",o("Black circle outlined")]}),(0,Y.jsxs)(J.A.Option,{value:"none",children:[" ",o("Without button")]})]})})]})};var ue=o(78541),he=o(44997),be=o(64037),ge=o(63531),pe=o(64936),xe=o(47358),Ae=o(86286),fe=o(77532),je=o(56991),ve=o(71157),_e=o(32269),Se=o(47520),Be=o(18398);o(37981);const{useToken:ye}=c.A,we=({elementSettings:e})=>{const{__:t}=(0,X.s9)(),{token:o}=ye(),[l]=u.A.useForm();let s=(0,a.wA)();const d=(0,je.rD)(),{projectId:n}=(0,m.g)(),c=(0,ve.hN)(),R=(0,U.XW)(),H=(0,U.K9)(),$=(0,a.d4)(xe.Ct),J=(0,a.d4)(xe.CS),Q=(0,a.d4)(Ae.C1),Z=(0,a.d4)(xe.Fv),ee=(0,a.d4)(xe.yy),[te]=(0,ge.dS)(),[oe,ie]=(0,ge.tb)(),le=(0,i.useRef)(null),re=(0,i.useRef)(null),ae=(0,i.useRef)(null),de=(0,i.useRef)(null),ne=(0,i.useRef)(null),me=(0,i.useRef)(null),we=(0,i.useRef)(null),ke=(0,i.useRef)(null),Re=(0,i.useRef)(null),[Pe,Ne]=(0,i.useState)({}),[Te,Ee]=(0,i.useState)({}),[Ie,Ce]=(0,i.useState)({}),[Le,Oe]=(0,i.useState)({}),[De,Fe]=(0,i.useState)(!0),[Ve,Me]=(0,i.useState)(!0),[We,He]=(0,i.useState)(""),[Xe,ze]=(0,i.useState)(""),[Ge,Ue]=(0,i.useState)(""),[Ye,qe]=(0,i.useState)(!1),[Ke,$e]=(0,i.useState)(!1),[Je,Qe]=(0,i.useState)(!1),[Ze,et]=(0,i.useState)(!1),[tt,ot]=(0,i.useState)(!1),[it,lt]=(0,i.useState)(!1),[st,rt]=(0,i.useState)(!1),[at,dt]=(0,i.useState)(!1),[nt,mt]=(0,i.useState)("https://"),[ct,ut]=(0,i.useState)(),[ht,bt]=(0,i.useState)(!1),[gt,pt]=(0,i.useState)(null),[xt,At]=(0,i.useState)({start:0,end:0}),[ft,jt]=(0,i.useState)(!1),[vt,_t]=(0,i.useState)(!1),St=Z&&"bottom"!==ee,Bt=(0,a.d4)(Be.GH);(0,i.useEffect)((()=>{var e;null!==Bt&&void 0!==Bt&&null!==(e=Bt.items)&&void 0!==e&&e.length&&ut((0,je.cM)(Bt.items,t,((e,t)=>{bt(!1),H(G.Ru.SANDBOX_ADD_MERGETAG,e),t.stopPropagation(),t.preventDefault()})))}),[Bt,ut,t,bt,H]);(0,i.useEffect)((()=>{const e=({target:e})=>{e.closest('[id="merge_tags_wrapper"]')||pt(e)},t=({target:e})=>{e.closest(".merge-tags")||e.closest("#merge_tags_button")||bt(!1)};return window.addEventListener("focusin",e),window.addEventListener("click",t),()=>{window.removeEventListener("focusin",e),window.addEventListener("click",t)}}),[]);const yt=({target:e})=>{if(e&&!ft){const{selectionStart:t,selectionEnd:o}=e;At({start:t,end:o})}jt(!1)};(0,i.useEffect)((()=>{if(e){var t,o,i,s,r,a,d,n,m,c,u,h,b,g,p,x,A,f,j,v,_,S,B,y,w,k,R,N,T,E,I,C,L;const F=e.border,V=e.mobileBorder,M=e.boxShadow,W=e.mobileBoxShadow;Ne(F),Ee(V),Ce(M),Oe(W);const H=Object.keys(F).find((e=>{var t,o,i;return(null===(t=F[e])||void 0===t?void 0:t.width)||(null===(o=F[e])||void 0===o?void 0:o.style)||(null===(i=F[e])||void 0===i?void 0:i.color)})),X=Object.keys(V).find((e=>{var t,o,i;return(null===(t=V[e])||void 0===t?void 0:t.width)||(null===(o=V[e])||void 0===o?void 0:o.style)||(null===(i=V[e])||void 0===i?void 0:i.color)}));if(e.link&&mt((0,Se.TW)(e.link,"https://")),l.setFieldsValue({...e,link:e.link?e.link:"https://",width:null===(t=e.width)||void 0===t?void 0:t.value,widthDim:null===(o=e.width)||void 0===o?void 0:o.dim,height:null===(i=e.height)||void 0===i?void 0:i.value,heightDim:null===(s=e.height)||void 0===s?void 0:s.dim,borderPosition:H||"all",borderWidth:null!==(null===(r=F[H])||void 0===r?void 0:r.width)?null===(a=F[H])||void 0===a?void 0:a.width:"",borderColor:(null===(d=F[H])||void 0===d?void 0:d.color)||"",borderStyle:(null===(n=F[H])||void 0===n?void 0:n.style)||"",borderRadiusAll:(0,Se.ok)(e.borderRadius.all),borderRadiusTopLeft:(0,Se.ok)(e.borderRadius.topLeft),borderRadiusBottomLeft:(0,Se.ok)(e.borderRadius.bottomLeft),borderRadiusTopRight:(0,Se.ok)(e.borderRadius.topRight),borderRadiusBottomRight:(0,Se.ok)(e.borderRadius.bottomRight),boxShadowInset:(0,Se.ok)(null===(m=e.boxShadow)||void 0===m?void 0:m.inset)||!1,boxShadowHOffset:(0,Se.ok)(null===(c=e.boxShadow)||void 0===c?void 0:c.hOffset),boxShadowVOffset:(0,Se.ok)(null===(u=e.boxShadow)||void 0===u?void 0:u.vOffset),boxShadowBlurRadius:(0,Se.ok)(null===(h=e.boxShadow)||void 0===h?void 0:h.blurRadius),boxShadowSpreadRadius:(0,Se.ok)(null===(b=e.boxShadow)||void 0===b?void 0:b.spreadRadius),boxShadowColor:(0,Se.ok)(null===(g=e.boxShadow)||void 0===g?void 0:g.color),mobileWidth:(0,Se.xc)(null===(p=e.mobileWidth)||void 0===p?void 0:p.value),mobileWidthDim:null===(x=e.mobileWidth)||void 0===x?void 0:x.dim,mobileHeight:(0,Se.xc)(null===(A=e.mobileHeight)||void 0===A?void 0:A.value),mobileHeightDim:null===(f=e.mobileHeight)||void 0===f?void 0:f.dim,mobileBorderPosition:X||"all",mobileBorderWidth:null!==(null===(j=V[X])||void 0===j?void 0:j.width)?null===(v=V[X])||void 0===v?void 0:v.width:"",mobileBorderColor:(null===(_=V[X])||void 0===_?void 0:_.color)||"",mobileBorderStyle:(null===(S=V[X])||void 0===S?void 0:S.style)||"",mobileBorderRadiusAll:(0,Se.ok)(e.mobileBorderRadius.all),mobileRadiusTopLeft:(0,Se.ok)(null!==e.mobileBorderRadius.topLeft?e.mobileBorderRadius.topLeft:e.mobileBorderRadius.all),mobileRadiusBottomLeft:(0,Se.ok)(null!==e.mobileBorderRadius.bottomLeft?e.mobileBorderRadius.bottomLeft:e.mobileBorderRadius.all),mobileRadiusTopRight:(0,Se.ok)(null!==e.mobileBorderRadius.topRight?e.mobileBorderRadius.topRight:e.mobileBorderRadius.all),mobileRadiusBottomRight:(0,Se.ok)(null!==e.mobileBorderRadius.bottomRight?e.mobileBorderRadius.bottomRight:e.mobileBorderRadius.all),mobileBoxShadowInset:(0,Se.ok)(null===(B=e.mobileBoxShadow)||void 0===B?void 0:B.inset)||!1,mobileBoxShadowHOffset:(0,Se.ok)(null===(y=e.mobileBoxShadow)||void 0===y?void 0:y.hOffset),mobileBoxShadowVOffset:(0,Se.ok)(null===(w=e.mobileBoxShadow)||void 0===w?void 0:w.vOffset),mobileBoxShadowBlurRadius:(0,Se.ok)(null===(k=e.mobileBoxShadow)||void 0===k?void 0:k.blurRadius),mobileBoxShadowSpreadRadius:(0,Se.ok)(null===(R=e.mobileBoxShadow)||void 0===R?void 0:R.spreadRadius),mobileBoxShadowColor:(0,Se.ok)(null===(N=e.mobileBoxShadow)||void 0===N?void 0:N.color),mobileAlign:(0,Se.ok)(null===(T=e.mobileAlign)||void 0===T?void 0:T.value),mobileVerticalAlign:(0,Se.ok)(null===(E=e.mobileVerticalAlign)||void 0===E?void 0:E.value),show:e.show?e.show:"all",altSrc:e.src}),e.countdown){let t=new URL("https://emailmaker.ru/?"+e.countdown),o=t.searchParams.get("font1"),i=!1,s=!1;o.endsWith("-b")?(o=o.substring(0,o.length-2),i=!0):o.endsWith("-i")?(o=o.substring(0,o.length-2),s=!0):o.endsWith("-bi")&&(o=o.substring(0,o.length-3),i=!0,s=!0);let r=t.searchParams.get("font2"),a=!1,d=!1;r.endsWith("-b")?(r=r.substring(0,r.length-2),a=!0):r.endsWith("-i")?(r=r.substring(0,r.length-2),d=!0):r.endsWith("-bi")&&(r=r.substring(0,r.length-3),a=!0,d=!0),l.setFieldsValue({countdownTime:P()(new Date(Date.parse(t.searchParams.get("time"))+36e5*t.searchParams.get("timezone")+(new Date).getTimezoneOffset()/60*36e5).toISOString()),countdownDuration:t.searchParams.get("frames"),countdownTimeZone:t.searchParams.get("timezone"),countdownLanguage:t.searchParams.get("locale").replace("-","_"),countdownBackgroundColor:"#"+t.searchParams.get("bg"),countdownTransparency:"true"===t.searchParams.get("tp")?"checked":"",countdownNumbersFont:o,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:i,countdownNumbersItalic:s,countdownLabelsStrong:a,countdownLabelsItalic:d})}var O,D;if(e.video)l.setFieldsValue({videoPlayButton:null!==(O=e.video.playButton)&&void 0!==O?O:"youtube_red",videoSource:null!==(D=e.video.source)&&void 0!==D?D:""});!(0,Se.ok)(e.borderRadius.all)&&((0,Se.ok)(e.borderRadius.topLeft)||(0,Se.ok)(e.borderRadius.bottomLeft)||(0,Se.ok)(e.borderRadius.topRight)||(0,Se.ok)(e.borderRadius.bottomRight))?Fe(!1):Fe(!0),(0,Se.ok)(e.mobileBorderRadius.topLeft)||(0,Se.ok)(e.mobileBorderRadius.bottomLeft)||(0,Se.ok)(e.mobileBorderRadius.topRight)||(0,Se.ok)(e.mobileBorderRadius.bottomRight)?Me(!1):Me(!0),qe(!(null===(I=F[H])||void 0===I||!I.width)),$e(!(null===(C=V[X])||void 0===C||!C.width)),Qe(!!e.borderRadius.all||!!e.borderRadius.topLeft||!!e.borderRadius.bottomLeft||!!e.borderRadius.topRight||!!e.borderRadius.bottomRight),et(!!e.mobileBorderRadius.all||!!e.mobileBorderRadius.topLeft||!!e.mobileBorderRadius.bottomLeft||!!e.mobileBorderRadius.topRight||!!e.mobileBorderRadius.bottomRight),ot(!!e.boxShadow),lt(!!e.mobileBoxShadow.blurRadius||!!e.mobileBoxShadow.color||!!e.mobileBoxShadow.hOffset||!!e.mobileBoxShadow.inset||!!e.mobileBoxShadow.spreadRadius||!!e.mobileBoxShadow.vOffset),rt(!!e.mobileWidth.value||!!e.mobileHeight.value),He(e.link),ze(e.alt),Ue(e.title),_t(null===(L=e.imgReplacer)||void 0===L?void 0:L.length)}}),[l,e]);const wt=async(e,t,o)=>{const i={};i.user_id=Q.id,i.folder=e,t&&("image/gif"!==t.type&&(t=await(0,k.A)(t,{maxSizeMB:d.compressMaxSize||.45,maxWidthOrHeight:d.compressMaxWidthOrHeight||2e3})),i.file=t),o&&(i.page_url=o);const l=await te(i);var s,r,a;if(l.error)c.fromError("IMAGE_UPLOAD_ERROR",t,l.error,!0);else if(400!==(null===(s=l.data.data)||void 0===s?void 0:s.status))return null===(r=l.data)||void 0===r||null===(a=r[0])||void 0===a?void 0:a.file_url},kt=((e,t)=>{let o;return function(...i){clearTimeout(o),o=setTimeout((()=>{clearTimeout(o),e(...i)}),t)}})((()=>{const t=l.getFieldsValue(!0);let o=new URL("https://cdt3.emcdn.ru/timer/?"+e.countdown),i=t.countdownNumbersFont;t.countdownNumbersStrong&&t.countdownNumbersItalic?i+="-bi":t.countdownNumbersStrong?i+="-b":t.countdownNumbersItalic&&(i+="-i");let s=t.countdownLabelsFont;t.countdownLabelsStrong&&t.countdownLabelsItalic?s+="-bi":t.countdownLabelsStrong?s+="-b":t.countdownLabelsItalic&&(s+="-i"),o.searchParams.set("time",new Date(t.countdownTime.$d-36e5*t.countdownTimeZone-(new Date).getTimezoneOffset()/60*36e5).toISOString()),o.searchParams.set("bg",t.countdownBackgroundColor.substring(1)||"#FFFFFF"),o.searchParams.set("tp",!!t.countdownTransparency),o.searchParams.set("font1",i),o.searchParams.set("size1",2*t.countdownNumbersFontSize||12),o.searchParams.set("color1",t.countdownNumbersColor.substring(1)||"#000000"),o.searchParams.set("font2",s),o.searchParams.set("size2",2*t.countdownLabelsFontSize||8),o.searchParams.set("color2",t.countdownLabelsColor.substring(1)||"#959595"),o.searchParams.set("spacing",Math.round(.4*t.countdownNumbersFontSize)||5),o.searchParams.set("locale",t.countdownLanguage.replace("_","-")),o.searchParams.set("timezone",t.countdownTimeZone),o.searchParams.set("frames",t.countdownDuration),oe({link:JSON.stringify({target:o.href})}),dt(!0)}),500),Rt=(t,...o)=>{const i=l.getFieldsValue(!0),r=Object.keys(t)[0];let a;switch(r){case"link":let e=t[r];"https://http"===e.substring(0,12)&&(e=e.substring(8,e.length),l.setFieldValue("link",e)),a={link:e};break;case"boxShadowInset":case"boxShadowHOffset":case"boxShadowVOffset":case"boxShadowBlurRadius":case"boxShadowSpreadRadius":case"boxShadowColor":a={boxShadow:{hOffset:i.boxShadowHOffset,vOffset:i.boxShadowVOffset,blurRadius:i.boxShadowBlurRadius,spreadRadius:i.boxShadowSpreadRadius,color:i.boxShadowColor,inset:i.boxShadowInset}};break;case"borderStyle":a={border:{[i.borderPosition]:{...Pe[i.borderPosition],style:t[r]}}},"all"===i.borderPosition?Ne((e=>({...G.iV,[i.borderPosition]:{...e[i.borderPosition],style:t[r]}}))):Ne((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],style:t[r]}})));break;case"borderColor":a={border:{[i.borderPosition]:{...Pe[i.borderPosition],color:t[r]}}},"all"===i.borderPosition?Ne((e=>({...G.iV,[i.borderPosition]:{...e[i.borderPosition],color:t[r]}}))):Ne((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],color:t[r]}})));break;case"borderWidth":a={border:{[i.borderPosition]:{...Pe[i.borderPosition],width:t[r]}}},"all"===i.borderPosition?Ne((e=>({...G.iV,[i.borderPosition]:{...e[i.borderPosition],width:t[r]}}))):Ne((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],width:t[r]}})));break;case"borderPosition":l.setFieldsValue({borderWidth:Pe[t[r]].width||"",borderColor:Pe[t[r]].color||"",borderStyle:Pe[t[r]].style||""});break;case"width":a={[r]:{value:t[r],dim:i.widthDim}};break;case"widthDim":a={width:{value:i.width,dim:t[r]}};break;case"height":a={[r]:{value:t[r],dim:i.heightDim}};break;case"heightDim":a={height:{value:i.height,dim:t[r]}};break;case"borderRadiusAll":case"borderRadiusTopLeft":case"borderRadiusBottomLeft":case"borderRadiusTopRight":case"borderRadiusBottomRight":a={borderRadius:{[G.wF[r]]:+t[r]}};break;case"mobileWidth":a={[r]:{classNamePrefix:"em-mob-width-",value:t[r],dim:i.mobileWidthDim}};break;case"mobileWidthDim":a={mobileWidth:{classNamePrefix:"em-mob-width-",value:i.mobileWidth,dim:t[r]}};break;case"mobileHeight":a={[r]:{classNamePrefix:"em-mob-height-",value:t[r],dim:i.mobileHeightDim}};break;case"mobileHeightDim":a={mobileHeight:{classNamePrefix:"em-mob-height-",value:i.mobileHeight,dim:t[r]}};break;case"mobileBorderStyle":a={mobileBorder:{[i.mobileBorderPosition]:{...Te[i.mobileBorderPosition],style:t[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?Ee((e=>({...G.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],style:t[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):Ee((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],style:t[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderColor":a={mobileBorder:{[i.mobileBorderPosition]:{...Te[i.mobileBorderPosition],color:t[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?Ee((e=>({...G.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],color:t[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):Ee((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],color:t[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderWidth":a={mobileBorder:{[i.mobileBorderPosition]:{...Te[i.mobileBorderPosition],width:t[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?Ee((e=>({...G.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],width:t[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):Ee((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],width:t[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderPosition":l.setFieldsValue({mobileBorderWidth:Te[t[r]].width||"",mobileBorderColor:Te[t[r]].color||"",mobileBorderStyle:Te[t[r]].style||""});break;case"mobileBorderRadiusAll":case"mobileRadiusTopLeft":case"mobileRadiusBottomLeft":case"mobileRadiusTopRight":case"mobileRadiusBottomRight":a={mobileBorderRadius:{[Se.NW[r]]:t[r],classNamePrefix:"em-mob-border_radius_"+Se.NW[r]+"-"}};break;case"mobileBoxShadowInset":case"mobileBoxShadowHOffset":case"mobileBoxShadowVOffset":case"mobileBoxShadowBlurRadius":case"mobileBoxShadowSpreadRadius":case"mobileBoxShadowColor":a={mobileBoxShadow:{hOffset:i.mobileBoxShadowHOffset,vOffset:i.mobileBoxShadowVOffset,blurRadius:i.mobileBoxShadowBlurRadius,spreadRadius:i.mobileBoxShadowSpreadRadius,color:i.mobileBoxShadowColor,inset:i.mobileBoxShadowInset,classNamePrefix:"em-mob-box_shadow-"}};break;case"mobileAlign":a={[r]:{classNamePrefix:"em-mob-text_align-",value:t[r]}};break;case"mobileVerticalAlign":a={[r]:{classNamePrefix:"em-mob-vertical_align-",value:t[r]}};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":kt();break;case"videoSource":case"videoPlayButton":(async()=>{const e=l.getFieldsValue(!0);e.videoSource&&wt("tmp",null,e.videoSource).then((t=>{var o=document.createElement("canvas"),i=o.getContext("2d"),l=new Image,r=new Image;let a=t,m="https://emcdn.ru/app/"+e.videoPlayButton+".png";l.crossOrigin="Anonymous",r.crossOrigin="Anonymous";let c=!1,u=!1;l.onload=function(){i.clearRect(0,0,o.width,o.height),i.drawImage(l,0,0,o.width,o.height),c=!0},l.src=a,r.onload=function(){var e=o.width/2-r.width/2,t=o.height/2-r.height/2;i.drawImage(r,e,t,r.width,r.height),u=!0},r.src=m;let h=setInterval((function(){if(c&&u){o.width=Math.max(l.width,r.width),o.height=Math.max(l.height,r.height),i.clearRect(0,0,o.width,o.height),i.drawImage(l,0,0,l.width,l.height);var e=o.width/2-r.width/2,t=o.height/2-r.height/2;i.drawImage(r,e,t,r.width,r.height),o.toBlob((async function(e){const t=await(0,k.A)(new File([e],"image.jpeg",{type:"image/jpeg"}),{maxSizeMB:d.compressMaxSize||.45,maxWidthOrHeight:d.compressMaxWidthOrHeight||2e3});wt(n,t).then((e=>{s((0,fe.tm)(e))}))}),"image/jpg",1),clearInterval(h)}}),300)}))})(),i.link=i.videoSource,R({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:"video",settings:{video:{source:i.videoSource,playButton:i.videoPlayButton},link:i.link}});break;default:a=t}"borderPosition"!==r&&"mobileBorderPosition"!==r&&-1===r.indexOf("countdown")&&"videoSource"!==r&&"videoPlayButton"!==r&&R({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:a})};(0,i.useEffect)((()=>{ie.isError&&((0,_e.p6)(ie,c),dt(!1))}),[ie,c]),(0,i.useEffect)((()=>{if(ie.isSuccess&&at){var t;if(400===(null===(t=ie.data.data)||void 0===t?void 0:t.status))c.error({message:(0,Y.jsx)("div",{dangerouslySetInnerHTML:{__html:ie.data.code}}),description:(0,Y.jsx)("div",{dangerouslySetInnerHTML:{__html:ie.data.message}}),placement:"bottomRight"});else{let t=new URL(ie.data.target),o={countdown:{link:ie.data.link,params:t.search.substring(1)}};R({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:o})}dt(!1)}}),[ie,at,e,c,R]);(0,be.A)((t=>{const o=t.data.operation;o===G.Ru.APPLICATION_OPEN_IMAGE_AI_POPUP?(s((0,fe.tm)(e.src)),s((0,pe.qf)(G.lx.UPLOAD_IMAGE_MODAL_AI))):o===G.Ru.APPLICATION_OPEN_IMAGE_UPLOAD_POPUP?(s((0,fe.tm)(e.src)),s((0,pe.qf)(G.lx.UPLOAD_IMAGE_MODAL_UPLOAD))):o===G.Ru.APPLICATION_OPEN_IMAGE_EDIT_POPUP?(s((0,fe.tm)(e.src)),s((0,pe.qf)(G.lx.UPLOAD_IMAGE_MODAL_EDIT))):o===G.Ru.APPLICATION_OPEN_IMAGE_GIF_POPUP?(s((0,fe.tm)(e.src)),s((0,pe.qf)(G.lx.UPLOAD_IMAGE_MODAL_GIF))):o===G.Ru.APPLICATION_OPEN_IMAGE_STOCK_POPUP?(s((0,fe.tm)(e.src)),s((0,pe.qf)(G.lx.UPLOAD_IMAGE_MODAL_STOCK))):o===G.Ru.APPLICATION_CLOSE_IMAGE_EDIT_POPUP&&(s((0,pe.Os)()),s((0,pe.Oo)()))}));const Pt=()=>{We?(He(""),l.setFieldValue("link",""),R({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{link:""}})):(He(le.current&&le.current.input.value?le.current.input.value:"..."),setTimeout((()=>{le.current.focus()})))},Nt=e=>{""===e.target.value?He("..."):(re.current.classList.add("selected-td-form__button--active"),He(e.target.value));const t=e.target.value;"https://"===t.substring(0,8)?mt("https://"):"mailto:"===t.substring(0,7)?mt("mailto:"):"tel:"===t.substring(0,4)?mt("tel:"):"sms:"===t.substring(0,4)?mt("sms:"):"ftp://"===t.substring(0,6)?mt("ftp://"):"skype:"===t.substring(0,6)?mt("skype:"):"viber:"===t.substring(0,6)?mt("viber:"):mt("")},Tt=()=>{const t=l.getFieldsValue(!0);Xe?(ze(""),t.alt="",R({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{alt:""}})):(ze(ae.current&&ae.current.input.value?ae.current.input.value:"..."),setTimeout((()=>{ae.current.focus()})))},Et=e=>{""===e.target.value?ze("..."):(de.current.classList.add("selected-td-form__button--active"),ze(e.target.value))},It=()=>{const t=l.getFieldsValue(!0);Ge?(Ue(""),t.title="",R({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{title:""}})):(Ue(ne.current&&ne.current.input.value?ne.current.input.value:"..."),setTimeout((()=>{ne.current.focus()})))},Ct=e=>{""===e.target.value?Ue("..."):(me.current.classList.add("selected-td-form__button--active"),Ue(e.target.value))};return(0,Y.jsxs)(u.A,{form:l,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:Rt,autoComplete:"off",className:"element-controls",children:[!St&&(0,Y.jsx)(h.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",children:(0,Y.jsx)(b.A,{className:"selected_form-mobile-props-title",message:t("Appearance on mobile devices"),type:"info"})}),$===G.ND&&J.styles?(0,Y.jsx)("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",children:(0,Y.jsxs)("div",{className:"selected_form-mobile-props-wrapper",children:[(0,Y.jsxs)(g.A,{gutter:30,style:{paddingBottom:4},children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(W.A,{form:l,elementSettings:e,imgParent:!0})}),(0,Y.jsx)(p.A,{span:12,align:"right",children:(0,Y.jsx)(q,{form:l,elementSettings:e})})]}),!!e.showOnMobile&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider",style:{marginBottom:"countdown"===e.type?15:24}}),"countdown"===e.type&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(se,{form:l,elementSettings:e}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider",style:{marginBottom:24}})]}),"video"===e.type&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(ce,{form:l,elementSettings:e}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider",style:{marginBottom:24}})]}),("img"===e.type||"video"===e.type)&&(0,Y.jsx)(u.A.Item,{style:{marginBottom:0},children:(0,Y.jsx)(N.A,{form:l,label:t("Image path"),name:"src",placeholder:t("Image path"),elementSettings:e,tooltipTitle:""})}),(0,Y.jsxs)(j.A,{size:8,style:{marginBottom:Xe||We||Ge?o.formItemMarginBottomXS:o.formItemMarginBottomMD+4},children:[(0,Y.jsx)(h.A,{title:We||t("Hyperlink URL"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,Y.jsx)(A.Ay,{className:r()("selected-td-form__button",{"selected-td-form__button--active":!!We}),icon:(0,Y.jsx)(_.A,{className:"selected-td-form__icon-radius"}),onClick:Pt,ref:re})}),(0,Y.jsx)(h.A,{title:Xe||t("Alternative text"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,Y.jsx)(A.Ay,{className:r()("selected-td-form__button",{"selected-td-form__button--active":!!Xe}),onClick:Tt,ref:de,children:(0,Y.jsx)("span",{className:"addon-text-content",children:"Alt"})})}),d.formFieldImageTitleEnabled&&(0,Y.jsx)(h.A,{title:Ge||t("Tooltip text"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,Y.jsx)(A.Ay,{className:r()("selected-td-form__button",{"selected-td-form__button--active":!!Ge}),onClick:It,ref:me,children:(0,Y.jsx)("span",{className:"addon-text-content",children:"Title"})})})]}),(!!We||!!Xe||!!Ge)&&(0,Y.jsxs)("div",{style:{marginBottom:o.formItemMarginBottomMD+4},children:[!!We&&(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Hyperlink URL"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"link",className:"selected-image-form__alt",style:{marginBottom:o.formItemMarginBottomXS},children:(0,Y.jsx)(v.A,{ref:le,allowClear:!0,placeholder:t("Hyperlink URL"),prefix:(0,Y.jsx)(_.A,{}),onChange:Nt})})}),!!Xe&&(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Alternative text"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"alt",className:"selected-image-form__alt",style:{marginBottom:o.formItemMarginBottomXS},children:(0,Y.jsx)(v.A,{placeholder:t("Alternative text"),allowClear:!0,prefix:(0,Y.jsx)("span",{className:"addon-text-content",children:"Alt"}),onChange:Et,ref:ae})})}),d.formFieldImageTitleEnabled&&!!Ge&&(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Tooltip text"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"title",className:"selected-image-form__alt",style:{marginBottom:o.formItemMarginBottomXS},children:(0,Y.jsx)(v.A,{placeholder:t("Tooltip text"),allowClear:!0,prefix:(0,Y.jsx)("span",{className:"addon-text-content",children:"Title"}),onChange:Ct,ref:ne})})})]})]}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Size")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{rt((e=>!e)),st&&(t.mobileWidth="",t.mobileHeight="",R({operation:G.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-"}}}))}))},children:st?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),st&&(0,Y.jsxs)(g.A,{gutter:10,style:{paddingBottom:24},children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(O.A,{form:l,name:"mobileWidth",elementSettings:e,isPicture:"true"})}),(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(D.A,{form:l,name:"mobileHeight",elementSettings:e,isPicture:"true"})})]}),d.formFieldBorderEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Borders")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{$e((e=>!e)),Ke&&(t.mobileBorderWidth=null,t.mobileBorderColor="",t.mobileBorderStyle=""),Ee((e=>({...G.iV,[t.mobileBorderPosition]:{...e[t.mobileBorderPosition],width:t.mobileBorderWidth,color:t.mobileBorderColor,style:t.mobileBorderStyle}}))),R({operation:G.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+"-"}}}})}))},children:Ke?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),Ke&&(0,Y.jsx)("div",{style:{marginBottom:4},children:(0,Y.jsx)(F.A,{mobileBorders:Te})})]}),d.formFieldBorderRadiusEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Border radius")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{et((e=>!e)),t.mobileBorderRadiusAll=Ze?null:5,R({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorderRadius:{all:t.mobileBorderRadiusAll,classNamePrefix:"em-mob-border_radius_all-"}}})}))},children:Ze?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),Ze&&(0,Y.jsx)("div",{style:{marginBottom:4},children:(0,Y.jsx)(V.A,{form:l,oneMobileBorderRadiusValue:Ve,setOneMobileBorderRadiusValue:Me})})]}),d.formFieldBoxShadowEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Box shadow")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{lt((e=>!e)),it?(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"),R({operation:G.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-"}}})}))},children:it?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),it&&(0,Y.jsx)("div",{style:{marginBottom:4},children:(0,Y.jsx)(M.A,{mobileBoxShadow:Le,form:l,elementSettings:e})})]}),d.formFieldVisibilityEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsx)("div",{className:"form-group-title",children:t("Display control")}),(0,Y.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(K.A,{elementSettings:e,form:l})})})]}),d.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsx)("div",{className:"form-group-title",children:t("Amp visibility")}),(0,Y.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(ue.A,{})})})]})]})}):(0,Y.jsx)("div",{id:"selected_element_form_desktop_props",children:(0,Y.jsxs)("div",{className:"selected_form-props-wrapper",children:[(0,Y.jsxs)(g.A,{gutter:10,style:{marginBottom:4},children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(I.A,{form:l,elementSettings:e,imgParent:!0})}),(0,Y.jsx)(p.A,{span:12,align:"right",children:(0,Y.jsx)(C.A,{form:l,elementSettings:e})})]}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider",style:{marginBottom:"countdown"===e.type?15:24}}),"countdown"===e.type&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(se,{form:l,elementSettings:e,handleChangeValues:Rt}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider",style:{marginBottom:24}})]}),ct&&(0,Y.jsx)(p.A,{span:24,id:"merge_tags_wrapper",children:(0,Y.jsxs)(u.A.Item,{style:{marginBottom:24},children:[(0,Y.jsx)(A.Ay,{id:"merge_tags_button",icon:(0,Y.jsx)(z.A,{icon:"MergeTags"}),style:{width:"100%",display:ht?"none":"block"},onClick:()=>bt(!0),children:t("Merge tags")}),(0,Y.jsx)(f.A,{ref:Re,popupClassName:"merge-tags",options:ct,placeholder:t("Start typing the title"),showSearch:{filter:(e,t)=>t.some((t=>t.label.toLowerCase().indexOf(e.toLowerCase())>-1)),render:(e,t)=>{const o=t.map(((t,o)=>{const i=t.label.split(new RegExp(`(${e})`,"gi"));return(0,Y.jsxs)("span",{children:[0!==o&&(0,Y.jsx)("span",{children:"\xa0/\xa0"}),i.map(((t,o)=>t.toLowerCase()===e.toLowerCase()?(0,Y.jsx)("span",{style:{color:"red"},children:t},o):t))]},t.value)}));return(0,Y.jsx)("div",{title:t.map((e=>e.label)).join(" / "),children:o})}},spellCheck:"false",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),onChange:(t,o)=>{if(bt(!1),t){const i=Bt.syntax.length>1?ct.findIndex((e=>e.key===o[0].key)):0,s=Bt.syntax[i].replace("%value%",t[t.length-1]);"selected_image_form_title"===(null===gt||void 0===gt?void 0:gt.getAttribute("id"))||"selected_image_form_alt"===(null===gt||void 0===gt?void 0:gt.getAttribute("id"))||"selected_image_form_link"===(null===gt||void 0===gt?void 0:gt.getAttribute("id"))||"selected_image_form_imgReplacer"===(null===gt||void 0===gt?void 0:gt.getAttribute("id"))?((t,o)=>{const i=document.getElementById(o);if(i){var s,r;const a="selected_image_form_",d=o.substring(o.indexOf(a)+a.length),n=null===(s=i.value)||void 0===s?void 0:s.substring(0,xt.start),m=null===(r=i.value)||void 0===r?void 0:r.substring(xt.end);R({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{...e,[d]:n+t+m}}),l.setFieldValue(d,n+t+m),i.focus(),setTimeout((()=>{i.selectionStart=xt.start,i.selectionEnd=xt.start+t.length}),400),jt(!0)}})(s,null===gt||void 0===gt?void 0:gt.getAttribute("id")):(l.setFieldValue("imgReplacer",s),R({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{imgReplacer:s}}))}},style:{display:ht?"block":"none"},open:ht,onKeyDown:e=>{"Escape"===e.key&&bt(!1)}})]})}),"video"===e.type&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(ce,{form:l,elementSettings:e}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider",style:{marginBottom:24}})]}),("img"===e.type||"video"===e.type)&&(0,Y.jsx)(u.A.Item,{style:{marginBottom:0},children:(0,Y.jsx)(N.A,{form:l,label:t("Image path"),name:"src",placeholder:t("Image path"),elementSettings:e,tooltipTitle:""})}),(0,Y.jsxs)(j.A,{size:8,style:{marginBottom:Xe||We||Ge||vt?o.formItemMarginBottomXS:o.formItemMarginBottomMD+4},children:[(0,Y.jsx)(h.A,{title:Xe||t("Alternative text"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,Y.jsx)(A.Ay,{className:r()("selected-td-form__button",{"selected-td-form__button--active":!!Xe}),onClick:Tt,ref:de,children:(0,Y.jsx)("span",{className:"addon-text-content",children:"Alt"})})}),d.formFieldImageTitleEnabled&&(0,Y.jsx)(h.A,{title:Ge||t("Tooltip text"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,Y.jsx)(A.Ay,{className:r()("selected-td-form__button",{"selected-td-form__button--active":!!Ge}),onClick:It,ref:me,children:(0,Y.jsx)("span",{className:"addon-text-content",children:"Title"})})}),(0,Y.jsx)(h.A,{title:We||t("Hyperlink URL"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,Y.jsx)(A.Ay,{className:r()("selected-td-form__button",{"selected-td-form__button--active":!!We}),icon:(0,Y.jsx)(_.A,{className:"selected-td-form__icon-radius"}),onClick:Pt,ref:re})}),(0,Y.jsx)(h.A,{title:t("Image replacer"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,Y.jsx)(A.Ay,{className:r()("selected-td-form__button",{"selected-td-form__button--active":vt}),icon:(0,Y.jsx)(z.A,{icon:"Replacer",className:"selected-td-form__icon-radius"}),onClick:()=>{_t(!vt),vt?(l.setFieldValue("imgReplacer",""),R({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{imgReplacer:""}})):setTimeout((()=>we.current.focus()))},ref:ke})})]}),(!!We||!!Xe||!!Ge||!!vt)&&(0,Y.jsxs)("div",{style:{marginBottom:o.formItemMarginBottomMD+4},children:[!!We&&(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Hyperlink URL"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"link",className:"selected-image-form__alt",style:{marginBottom:o.formItemMarginBottomXS},children:(0,Y.jsx)(v.A,{addonBefore:(0,Y.jsx)(Se.Ai,{linkProtocol:nt,handleLinkProtocolsChange:e=>{l.setFieldValue("link","mergetag"!==e?e:""),mt(e)},__:t}),placeholder:t("Hyperlink URL"),allowClear:!0,ref:le,onChange:Nt,onSelect:yt,prefix:(0,Y.jsx)(Se.RM,{linkProtocol:nt})})})}),!!Xe&&(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Alternative text"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"alt",className:"selected-image-form__alt",style:{marginBottom:o.formItemMarginBottomXS},children:(0,Y.jsx)(v.A,{placeholder:t("Alternative text"),allowClear:!0,prefix:(0,Y.jsx)("span",{className:"addon-text-content",children:"Alt"}),onChange:Et,ref:ae,onSelect:yt})})}),d.formFieldImageTitleEnabled&&!!Ge&&(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Tooltip text"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"title",className:"selected-image-form__alt",style:{marginBottom:o.formItemMarginBottomXS},children:(0,Y.jsx)(v.A,{placeholder:t("Enter the title of the image"),allowClear:!0,prefix:(0,Y.jsx)("span",{className:"addon-text-content",children:"Title"}),onChange:Ct,ref:ne,onSelect:yt})})}),!!vt&&(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Image src"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"imgReplacer",className:"selected-image-form__alt",style:{marginBottom:o.formItemMarginBottomXS},children:(0,Y.jsx)(v.A,{placeholder:t("\u0421ode that will replace the image `src`"),allowClear:!0,prefix:(0,Y.jsx)("span",{className:"addon-text-content",children:t("Image src")}),onChange:e=>{""!==e.target.value&&ke.current.classList.add("selected-td-form__button--active")},ref:we,onSelect:yt})})})]}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsx)("div",{className:"form-group-title",children:t("Size")}),(0,Y.jsxs)(g.A,{gutter:o.marginSM,style:{marginBottom:4},children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(h.A,{title:t("Width"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"width",style:{marginBottom:o.formItemMarginBottomXS},children:(0,Y.jsx)(he.A,{min:0,max:e.maxWidth,placeholder:t("Width"),prefix:(0,Y.jsx)(S.A,{}),addonAfter:"px"})})})}),(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(h.A,{title:t("Height"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"height",children:(0,Y.jsx)(he.A,{min:0,placeholder:t("Height"),prefix:(0,Y.jsx)(B.A,{}),addonAfter:"px"})})})})]}),d.formFieldBorderEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Borders")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{qe((e=>!e)),Ye&&(t.borderWidth=null,t.borderColor="",t.borderStyle=""),Ne((e=>({...G.iV,[t.borderPosition]:{...e[t.borderPosition],width:t.borderWidth,color:t.borderColor,style:t.borderStyle}}))),R({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{border:{all:{color:t.borderColor,style:t.borderStyle,width:t.borderWidth}}}})}))},children:Ye?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),Ye&&(0,Y.jsx)("div",{style:{marginBottom:4},children:(0,Y.jsx)(T.A,{borders:Pe})})]}),d.formFieldBorderRadiusEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Border radius")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{Qe((e=>!e)),t.borderRadiusAll=Je?0:5,R({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{borderRadius:{all:t.borderRadiusAll}}})}))},children:Je?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),Je&&(0,Y.jsx)("div",{style:{marginBottom:4},children:(0,Y.jsx)(E.A,{form:l,oneBorderRadiusValue:De,setOneBorderRadiusValue:Fe,elementSettings:e})})]}),d.formFieldBoxShadowEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Box shadow")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{ot((e=>!e)),tt?(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"),R({operation:G.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}}})}))},children:tt?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),tt&&(0,Y.jsx)("div",{style:{marginBottom:4},children:(0,Y.jsx)(L.A,{boxShadow:Ie})})]}),d.formFieldVisibilityEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsx)("div",{className:"form-group-title",children:t("Display control")}),(0,Y.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(K.A,{elementSettings:e,form:l})})})]}),d.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsx)("div",{className:"form-group-title",children:t("Amp visibility")}),(0,Y.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(ue.A,{})})})]})]})})]})};var ke=o(28348),Re=o(65655),Pe=o(46929),Ne=o(77416),Te=o(40187);const Ee=({elementSettings:e})=>{const{__:t}=(0,X.s9)(),o=(0,U.XW)(),[l]=u.A.useForm(),s=(0,a.d4)(xe.Ct),r=(0,a.d4)(xe.CS),d=(0,a.d4)(xe.Fv),n=(0,a.d4)(xe.yy),m=d&&"bottom"!==n,[c,x]=(0,i.useState)("https://");(0,i.useEffect)((()=>{var t,o,i,s,r;e&&l.setFieldsValue({...e,linkHref:e.linkHref?e.linkHref:"https://",mobileFontSize:(0,Se.ok)(null===(t=e.mobileFontSize)||void 0===t?void 0:t.value),mobileFontSizeDim:null===(o=e.mobileFontSize)||void 0===o?void 0:o.dim,mobileLineHeight:(0,Se.ok)(null===(i=e.mobileLineHeight)||void 0===i?void 0:i.value),mobileLineHeightDim:null===(s=e.mobileLineHeight)||void 0===s?void 0:s.dim,mobileTextAlign:(0,Se.ok)(null===(r=e.mobileTextAlign)||void 0===r?void 0:r.value)})}),[l,e]);return(0,Y.jsxs)(u.A,{form:l,layout:"vertical",name:"selected_text_form",autoComplete:"off",onValuesChange:t=>{const i=l.getFieldsValue(!0),s=Object.keys(t)[0];let r;switch(s){case"mobileFontSize":r={[s]:{classNamePrefix:"em-mob-font_size-",value:t[s],dim:i.mobileFontSizeDim}};break;case"mobileLineHeight":r={[s]:{classNamePrefix:"em-mob-line_height-",value:t[s],dim:i.mobileLineHeightDim}};break;case"mobileTextAlign":r={[s]:{classNamePrefix:"em-mob-text_align-",value:t[s]}};break;case"linkHref":let e=t[s];"https://http"===e.substring(0,12)&&(e=e.substring(8,e.length),l.setFieldValue("linkHref",e)),r={[s]:e},"https://"===t[s].substring(0,8)||"http://"===t[s].substring(0,7)?x("https://"):"mailto:"===t[s].substring(0,7)?x("mailto:"):"tel:"===t[s].substring(0,4)?x("tel:"):"sms:"===t[s].substring(0,4)?x("sms:"):"ftp://"===t[s].substring(0,6)?x("ftp://"):"skype:"===t[s].substring(0,6)?x("skype:"):"viber:"===t[s].substring(0,6)?x("viber:"):x("");break;default:r=t}o({operation:G.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:""},children:[!m&&(0,Y.jsx)(h.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",children:(0,Y.jsx)(b.A,{className:"selected_form-mobile-props-title",message:t("Appearance on mobile devices"),type:"info"})}),!(s===G.ND&&!m&&r.styles)&&(0,Y.jsx)("div",{id:"selected_element_form_desktop_props",style:{paddingRight:0},children:(0,Y.jsx)("div",{className:"selected_form-props-wrapper",children:m?(0,Y.jsx)(Ne.A,{form:l,elementSettings:e}):(0,Y.jsx)(Pe.A,{form:l,elementSettings:e,linkProtocol:c,setLinkProtocol:x})})}),!m&&(0,Y.jsx)("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",style:{display:s===G.ND&&r.styles?"block":"none"},children:(0,Y.jsxs)("div",{className:"selected_form-mobile-props-wrapper",children:[(0,Y.jsx)(g.A,{gutter:20,children:(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(Te.A,{form:l,elementSettings:e,name:"mobileTextAlign"})})}),!!e.showOnMobile&&(0,Y.jsx)(Pe.A,{form:l,elementSettings:e,linkProtocol:c,setLinkProtocol:x}),(0,Y.jsxs)(g.A,{gutter:10,style:{marginBottom:4},children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(Re.A,{})}),(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(u.A.Item,{name:"mobileLineHeight",children:(0,Y.jsx)(he.A,{min:0,placeholder:t("Line height"),prefix:(0,Y.jsx)(ke.A,{}),addonAfter:"px"})})})]})]})})]})};var Ie=o(45509);o(9439);const Ce=(e,t)=>{const{__:o}=(0,X.s9)();return(0,Y.jsx)(h.A,{title:o("During export, the element is converted into an image."),children:(0,Y.jsxs)(j.A,{size:10,align:"baseline",children:[(0,Y.jsx)(u.A.Item,{name:"exportAsPicture",valuePropName:"checked",children:(0,Y.jsx)(Q.A,{size:"small",id:"convern-in-image"})}),(0,Y.jsx)("span",{className:"ant-form-item-switch-label",style:{position:"relative",top:2},children:(0,Y.jsx)("label",{htmlFor:"convern-in-image",children:o("Convert into an image")})})]})},"exportAsPicture")},{Option:Le}=J.A,Oe=(0,Y.jsxs)(J.A,{className:"select-after",getPopupContainer:e=>e.parentNode,children:[(0,Y.jsx)(Le,{value:"px",children:"px"}),(0,Y.jsx)(Le,{value:"%",children:"%"})]}),{useToken:De}=c.A,Fe=({elementSettings:e})=>{const{__:t}=(0,X.s9)(),o=(0,U.XW)(),[l]=u.A.useForm(),[s,r]=(0,i.useState)({}),[d,n]=(0,i.useState)({}),[m,c]=(0,i.useState)(!0),[f,j]=(0,i.useState)({}),[v,_]=(0,i.useState)({}),[B,k]=(0,i.useState)(!0),R=(0,a.d4)(xe.Ct),P=(0,a.d4)(xe.CS),C=(0,je.rD)(),[D,H]=(0,i.useState)(""===e.backgroundImage[0].value),{token:q}=De(),$=(0,a.d4)(xe.Fv),Q=(0,a.d4)(xe.yy),Z=$&&"bottom"!==Q,[ee,te]=(0,i.useState)(!1),[oe,le]=(0,i.useState)(!1),[se,re]=(0,i.useState)(!1),[ae,de]=(0,i.useState)(!1),[ne,me]=(0,i.useState)(!1),[ce,be]=(0,i.useState)(!1),[ge,pe]=(0,i.useState)(!1),[Ae,fe]=(0,i.useState)(!1),[ve,_e]=(0,i.useState)(!1),[Be,ye]=(0,i.useState)(!1),[we,ke]=(0,i.useState)(!1),Re=[{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"}];(0,i.useEffect)((()=>{if(e){var t,o,i,s,a,d,m,u,h,b,g,p,x,A,f,v,S,B,y,w,R,P,N,T,E,I,C,L,O,D,F,V,M,W,X,z,G,U,Y;const q=e.border,K=e.boxShadow,$=e.mobileBorder,J=e.mobileBoxShadow;r(q),n(K),j($),_(J);const Q=Object.keys(q).find((e=>{var t,o,i;return(null===(t=q[e])||void 0===t?void 0:t.width)||(null===(o=q[e])||void 0===o?void 0:o.style)||(null===(i=q[e])||void 0===i?void 0:i.color)})),Z=Object.keys($).find((e=>{var t,o,i;return(null===(t=$[e])||void 0===t?void 0:t.width)||(null===(o=$[e])||void 0===o?void 0:o.style)||(null===(i=$[e])||void 0===i?void 0:i.color)}));l.setFieldsValue({...e,width:null===(t=e.width)||void 0===t?void 0:t.value,widthDim:null===(o=e.width)||void 0===o?void 0:o.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===(a=e.minWidth)||void 0===a?void 0:a.value,minWidthDim:null===(d=e.minWidth)||void 0===d?void 0:d.dim,backgroundImage:e.backgroundImage[0].value,show:e.show?e.show:"all",borderPosition:Q||"all",borderWidth:(null===(m=q[Q])||void 0===m?void 0:m.width)||"",borderColor:(null===(u=q[Q])||void 0===u?void 0:u.color)||"",borderStyle:(null===(h=q[Q])||void 0===h?void 0:h.style)||"",borderRadiusAll:(0,Se.ok)(e.borderRadius.all),borderRadiusTopLeft:(0,Se.ok)(e.borderRadius.topLeft),borderRadiusBottomLeft:(0,Se.ok)(e.borderRadius.bottomLeft),borderRadiusTopRight:(0,Se.ok)(e.borderRadius.topRight),borderRadiusBottomRight:(0,Se.ok)(e.borderRadius.bottomRight),boxShadowInset:(0,Se.ok)(null===(b=e.boxShadow)||void 0===b?void 0:b.inset)||!1,boxShadowHOffset:(0,Se.ok)(null===(g=e.boxShadow)||void 0===g?void 0:g.hOffset),boxShadowVOffset:(0,Se.ok)(null===(p=e.boxShadow)||void 0===p?void 0:p.vOffset),boxShadowBlurRadius:(0,Se.ok)(null===(x=e.boxShadow)||void 0===x?void 0:x.blurRadius),boxShadowSpreadRadius:(0,Se.ok)(null===(A=e.boxShadow)||void 0===A?void 0:A.spreadRadius),boxShadowColor:(0,Se.ok)(null===(f=e.boxShadow)||void 0===f?void 0:f.color),mobileWidth:(0,Se.xc)(null===(v=e.mobileWidth)||void 0===v?void 0:v.value),mobileWidthDim:null===(S=e.mobileWidth)||void 0===S?void 0:S.dim,mobileAlign:null===(B=e.mobileAlign)||void 0===B?void 0:B.value,mobileBorderPosition:Z||"all",mobileBorderWidth:null!==(null===(y=$[Z])||void 0===y?void 0:y.width)?null===(w=$[Z])||void 0===w?void 0:w.width:"",mobileBorderColor:(null===(R=$[Z])||void 0===R?void 0:R.color)||"",mobileBorderStyle:(null===(P=$[Z])||void 0===P?void 0:P.style)||"",mobileBorderRadiusAll:(0,Se.ok)(e.mobileBorderRadius.all),mobileRadiusTopLeft:(0,Se.ok)(null!==e.mobileBorderRadius.topLeft?e.mobileBorderRadius.topLeft:e.mobileBorderRadius.all),mobileRadiusBottomLeft:(0,Se.ok)(null!==e.mobileBorderRadius.bottomLeft?e.mobileBorderRadius.bottomLeft:e.mobileBorderRadius.all),mobileRadiusTopRight:(0,Se.ok)(null!==e.mobileBorderRadius.topRight?e.mobileBorderRadius.topRight:e.mobileBorderRadius.all),mobileRadiusBottomRight:(0,Se.ok)(null!==e.mobileBorderRadius.bottomRight?e.mobileBorderRadius.bottomRight:e.mobileBorderRadius.all),mobileBoxShadowInset:(0,Se.ok)(null===(N=e.mobileBoxShadow)||void 0===N?void 0:N.inset)||!1,mobileBoxShadowHOffset:(0,Se.ok)(null===(T=e.mobileBoxShadow)||void 0===T?void 0:T.hOffset),mobileBoxShadowVOffset:(0,Se.ok)(null===(E=e.mobileBoxShadow)||void 0===E?void 0:E.vOffset),mobileBoxShadowBlurRadius:(0,Se.ok)(null===(I=e.mobileBoxShadow)||void 0===I?void 0:I.blurRadius),mobileBoxShadowSpreadRadius:(0,Se.ok)(null===(C=e.mobileBoxShadow)||void 0===C?void 0:C.spreadRadius),mobileBoxShadowColor:(0,Se.ok)(null===(L=e.mobileBoxShadow)||void 0===L?void 0:L.color),mobileBackgroundColor:(0,Se.ok)("none"!==(null===(O=e.mobileBackgroundColor)||void 0===O?void 0:O.value)?null===(D=e.mobileBackgroundColor)||void 0===D?void 0:D.value:""),mobileBackgroundImage:"none"!==e.mobileBackgroundImage[0].value?e.mobileBackgroundImage[0].value:"",mobileBackgroundPositionX:(0,Se.ok)(null===(F=e.mobileBackgroundPositionX)||void 0===F?void 0:F.value),mobileBackgroundPositionY:(0,Se.ok)(null===(V=e.mobileBackgroundPositionY)||void 0===V?void 0:V.value),mobileBackgroundRepeat:null!==(M=e.mobileBackgroundRepeat)&&void 0!==M&&M.value?null===(W=e.mobileBackgroundRepeat)||void 0===W?void 0:W.value:"none",exportAsPicture:null===e||void 0===e?void 0:e.exportAsPicture}),!(0,Se.ok)(e.borderRadius.all)&&((0,Se.ok)(e.borderRadius.topLeft)||(0,Se.ok)(e.borderRadius.bottomLeft)||(0,Se.ok)(e.borderRadius.topRight)||(0,Se.ok)(e.borderRadius.bottomRight))?c(!1):c(!0),(0,Se.ok)(e.mobileBorderRadius.topLeft)||(0,Se.ok)(e.mobileBorderRadius.bottomLeft)||(0,Se.ok)(e.mobileBorderRadius.topRight)||(0,Se.ok)(e.mobileBorderRadius.bottomRight)?k(!1):k(!0),H(""===e.backgroundImage[0].value),te(!(null===(X=q[Q])||void 0===X||!X.width)),le(!(null===(z=$[Z])||void 0===z||!z.width)),re(!!e.borderRadius.all||!!e.borderRadius.topLeft||!!e.borderRadius.bottomLeft||!!e.borderRadius.topRight||!!e.borderRadius.bottomRight),de(!!e.mobileBorderRadius.all||!!e.mobileBorderRadius.topLeft||!!e.mobileBorderRadius.bottomLeft||!!e.mobileBorderRadius.topRight||!!e.mobileBorderRadius.bottomRight),me(!!e.boxShadow),be(!!e.mobileBoxShadow.blurRadius||!!e.mobileBoxShadow.color||!!e.mobileBoxShadow.hOffset||!!e.mobileBoxShadow.inset||!!e.mobileBoxShadow.spreadRadius||!!e.mobileBoxShadow.vOffset),pe(!(null===(G=e.width)||void 0===G||!G.value)||!(null===(U=e.minWidth)||void 0===U||!U.value)||!(null===(Y=e.maxWidth)||void 0===Y||!Y.value)),fe(!!e.mobileWidth.value),_e(!!e.backgroundColor||!!e.backgroundImage[0].value||!!e.backgroundPositionY||!!e.backgroundPositionX||"repeat"!==e.backgroundRepeat||!e.backgroundRepeat),ye(!!e.mobileBackgroundColor.value),ke(!!e.exportAsPicture)}}),[l,e]);return(0,Y.jsxs)(u.A,{form:l,layout:"vertical",name:"selected_table_form",initialValues:{backgroundColor:"",backgroundImage:"",backgroundPositionX:"",backgroundPositionY:"",backgroundRepeat:"",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 i=l.getFieldsValue(!0),a=Object.keys(t)[0];let d;switch(a){case"exportAsPicture":d={exportAsPicture:i.exportAsPicture};break;case"boxShadowInset":case"boxShadowHOffset":case"boxShadowVOffset":case"boxShadowBlurRadius":case"boxShadowSpreadRadius":case"boxShadowColor":d={boxShadow:{hOffset:i.boxShadowHOffset,vOffset:i.boxShadowVOffset,blurRadius:i.boxShadowBlurRadius,spreadRadius:i.boxShadowSpreadRadius,color:i.boxShadowColor,inset:i.boxShadowInset}};break;case"borderStyle":d={border:{[i.borderPosition]:{...s[i.borderPosition],style:t[a]}}},"all"===i.borderPosition?r((e=>({...G.iV,[i.borderPosition]:{...e[i.borderPosition],style:t[a]}}))):r((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],style:t[a]}})));break;case"borderColor":d={border:{[i.borderPosition]:{...s[i.borderPosition],color:t[a]}}},"all"===i.borderPosition?r((e=>({...G.iV,[i.borderPosition]:{...e[i.borderPosition],color:t[a]}}))):r((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],color:t[a]}})));break;case"borderWidth":d={border:{[i.borderPosition]:{...s[i.borderPosition],width:t[a]}}},"all"===i.borderPosition?r((e=>({...G.iV,[i.borderPosition]:{...e[i.borderPosition],width:t[a]}}))):r((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],width:t[a]}})));break;case"borderPosition":l.setFieldsValue({borderWidth:s[t[a]].width||"",borderColor:s[t[a]].color||"",borderStyle:s[t[a]].style||""});break;case"width":d={[a]:{value:t[a],dim:i.widthDim}};break;case"widthDim":d={width:{value:i.width,dim:t[a]}};break;case"maxWidth":d={[a]:{value:t[a],dim:i.maxWidthDim}};break;case"maxWidthDim":d={maxWidth:{value:i.maxWidth,dim:t[a]}};break;case"minWidth":d={[a]:{value:t[a],dim:i.minWidthDim}};break;case"minWidthDim":d={minWidth:{value:i.minWidth,dim:t[a]}};break;case"backgroundImage":H(""===t[a]),d={[a]:[{...e.backgroundImage[0],value:t[a]}]};break;case"borderRadiusAll":case"borderRadiusTopLeft":case"borderRadiusBottomLeft":case"borderRadiusTopRight":case"borderRadiusBottomRight":d={borderRadius:{[G.wF[a]]:+t[a]}};break;case"mobileWidth":d={[a]:{classNamePrefix:"em-mob-width-",value:t[a],dim:i.mobileWidthDim}};break;case"mobileWidthDim":d={mobileWidth:{classNamePrefix:"em-mob-width-",value:i.mobileWidth,dim:t[a]}};break;case"mobileBorderStyle":d={mobileBorder:{[i.mobileBorderPosition]:{...f[i.mobileBorderPosition],style:t[a],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?j((e=>({...G.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],style:t[a],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):j((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],style:t[a],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderColor":d={mobileBorder:{[i.mobileBorderPosition]:{...f[i.mobileBorderPosition],color:t[a],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?j((e=>({...G.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],color:t[a],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):j((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],color:t[a],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderWidth":d={mobileBorder:{[i.mobileBorderPosition]:{...f[i.mobileBorderPosition],width:t[a],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?j((e=>({...G.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],width:t[a],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):j((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],width:t[a],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderPosition":l.setFieldsValue({mobileBorderWidth:f[t[a]].width||"",mobileBorderColor:f[t[a]].color||"",mobileBorderStyle:f[t[a]].style||""});break;case"mobileBorderRadiusAll":case"mobileRadiusTopLeft":case"mobileRadiusBottomLeft":case"mobileRadiusTopRight":case"mobileRadiusBottomRight":d={mobileBorderRadius:{[Se.NW[a]]:t[a],classNamePrefix:"em-mob-border_radius_"+Se.NW[a]+"-"}};break;case"mobileBoxShadowInset":case"mobileBoxShadowHOffset":case"mobileBoxShadowVOffset":case"mobileBoxShadowBlurRadius":case"mobileBoxShadowSpreadRadius":case"mobileBoxShadowColor":d={mobileBoxShadow:{hOffset:i.mobileBoxShadowHOffset,vOffset:i.mobileBoxShadowVOffset,blurRadius:i.mobileBoxShadowBlurRadius,spreadRadius:i.mobileBoxShadowSpreadRadius,color:i.mobileBoxShadowColor,inset:i.mobileBoxShadowInset,classNamePrefix:"em-mob-box_shadow-"}};break;case"mobileBackgroundColor":d={[a]:{classNamePrefix:"em-mob-background_color-",value:t[a]}};break;case"mobileBackgroundImage":d={[a]:[{...e.mobileBackgroundImage[0],classNamePrefix:"em-mob-background_image-",value:t[a]}]};break;case"mobileBackgroundPositionX":d={[a]:{classNamePrefix:"em-mob-background_position_x-",value:t[a]}};break;case"mobileBackgroundPositionY":d={[a]:{classNamePrefix:"em-mob-background_position_x-",value:t[a]}};break;case"mobileBackgroundRepeat":d={[a]:{classNamePrefix:"em-mob-background_repeat-",value:t[a]}};break;case"mobileAlign":d={[a]:{classNamePrefix:"em-mob-table_align-",value:t[a]}};break;default:d=t}"borderPosition"!==a&&o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:d})},autoComplete:"off",className:"element-controls",children:[!Z&&(0,Y.jsx)(h.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",children:(0,Y.jsx)(b.A,{className:"selected_form-mobile-props-title",message:t("Appearance on mobile devices"),type:"info"})}),R===G.ND&&P.styles?(0,Y.jsx)("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",children:(0,Y.jsxs)("div",{className:"selected_form-mobile-props-wrapper",children:[(0,Y.jsx)("div",{style:{paddingBottom:4},children:(0,Y.jsx)(W.A,{form:l,elementSettings:e})}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Size")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{fe((e=>!e)),Ae&&(t.mobileWidth="",o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileWidth:{value:null,dim:"px",classNamePrefix:"em-mob-width-"}}}))}))},children:Ae?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),Ae&&(0,Y.jsx)(Y.Fragment,{children:(0,Y.jsx)(g.A,{gutter:10,children:(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Table width"),placement:"left",children:(0,Y.jsx)("div",{style:{marginBottom:q.formItemMarginBottomMD+4},children:(0,Y.jsx)(O.A,{form:l,name:"mobileWidth",elementSettings:e})})})})})}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Background")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{ye((e=>!e)),t.mobileBackgroundColor=Be?"":"#E5E5E5",o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBackgroundColor:{classNamePrefix:"em-mob-background_color-",value:t.mobileBackgroundColor}}})}))},children:Be?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),Be&&(0,Y.jsx)("div",{style:{marginBottom:(C.formTableFieldBackgroundImageEnabled,q.formItemMarginBottomMD+4)},children:(0,Y.jsx)(Ie.A,{form:l,elementSettings:e})}),!1,C.formFieldBorderEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Borders")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{le((e=>!e)),oe&&(t.mobileBorderWidth=null,t.mobileBorderColor="",t.mobileBorderStyle=""),j((e=>({...G.iV,[t.mobileBorderPosition]:{...e[t.mobileBorderPosition],width:t.mobileBorderWidth,color:t.mobileBorderColor,style:t.mobileBorderStyle}}))),o({operation:G.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+"-"}}}})}))},children:oe?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),oe&&(0,Y.jsx)("div",{style:{paddingBottom:4},children:(0,Y.jsx)(F.A,{mobileBorders:f})})]}),C.formFieldBorderRadiusEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Border radius")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{de((e=>!e)),t.mobileBorderRadiusAll=ae?null:5,o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorderRadius:{all:t.mobileBorderRadiusAll,classNamePrefix:"em-mob-border_radius_all-"}}})}))},children:ae?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),ae&&(0,Y.jsx)("div",{style:{paddingBottom:4},children:(0,Y.jsx)(V.A,{form:l,oneMobileBorderRadiusValue:B,setOneMobileBorderRadiusValue:k})})]}),C.formFieldBoxShadowEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Box shadow")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{be((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"),o({operation:G.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-"}}})}))},children:ce?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),ce&&(0,Y.jsx)("div",{style:{paddingBottom:4},children:(0,Y.jsx)(M.A,{mobileBoxShadow:v,form:l,elementSettings:e})})]}),C.formFieldVisibilityEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsx)("div",{className:"form-group-title",children:t("Display control")}),(0,Y.jsx)(g.A,{gutter:20,children:(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)("div",{style:{paddingBottom:4},children:(0,Y.jsx)(K.A,{elementSettings:e,form:l})})})})]}),C.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsx)("div",{className:"form-group-title",children:t("Amp visibility")}),(0,Y.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(ue.A,{})})})]})]})}):(0,Y.jsx)("div",{id:"selected_element_form_desktop_props",children:(0,Y.jsxs)("div",{className:"selected_form-props-wrapper",children:[(0,Y.jsx)("div",{style:{paddingBottom:4},children:(0,Y.jsx)(I.A,{form:l,elementSettings:e,tooltipTitle:t("The align attribute sets the horizontal alignment of the table.")})}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Size")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{pe((e=>!e)),ge&&(t.width="",t.minWidth="",t.maxWidth="",o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{width:{value:null,dim:"px"},minWidth:{value:null,dim:"px"},maxWidth:{value:null,dim:"px"}}}))}))},children:ge?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),ge&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Table width"),placement:"left",children:(0,Y.jsx)(u.A.Item,{name:"width",style:{marginBottom:q.formItemMarginBottomXS},children:(0,Y.jsx)(he.A,{min:0,placeholder:t("Width"),prefix:(0,Y.jsx)(S.A,{}),addonAfter:(0,Y.jsx)(u.A.Item,{name:"widthDim",noStyle:!0,children:Oe}),style:{width:"100%"}})})}),(0,Y.jsxs)(g.A,{gutter:10,style:{marginBottom:4},children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Minimum width"),placement:"left",children:(0,Y.jsx)(u.A.Item,{name:"minWidth",children:(0,Y.jsx)(he.A,{min:0,placeholder:t("Table min width"),prefix:(0,Y.jsx)(z.A,{icon:"MinWidth"}),addonAfter:(0,Y.jsx)(u.A.Item,{name:"minWidthDim",noStyle:!0,children:Oe})})})})}),(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Maximum width"),placement:"top",children:(0,Y.jsx)(u.A.Item,{name:"maxWidth",children:(0,Y.jsx)(he.A,{min:0,placeholder:t("Table max width"),prefix:(0,Y.jsx)(z.A,{icon:"MaxWidth"}),addonAfter:(0,Y.jsx)(u.A.Item,{name:"maxWidthDim",noStyle:!0,children:Oe})})})})})]})]}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Background")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{_e((e=>!e)),ve?(t.backgroundColor="",t.backgroundImage="",t.backgroundPositionX="",t.backgroundPositionY="",t.backgroundRepeat="none",H(!0)):t.backgroundColor="#E5E5E5",o({operation:G.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}})}))},children:ve?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),ve&&(0,Y.jsxs)(g.A,{gutter:10,style:{marginBottom:D?16:0},children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Background color"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,Y.jsx)(u.A.Item,{name:"backgroundColor",style:{marginBottom:C.formTableFieldBackgroundImageEnabled?q.formItemMarginBottomXS:q.formItemMarginBottomMD+4},children:(0,Y.jsx)(ie.A,{placeholder:t("Background color"),usedColors:e.usedColors})})})}),C.formTableFieldBackgroundImageEnabled&&(0,Y.jsxs)(p.A,{span:D?12:24,children:[(0,Y.jsx)("div",{style:{paddingBottom:D?4:0},children:(0,Y.jsx)(N.A,{form:l,label:t("Background image"),name:"backgroundImage",tooltipTitle:t("Background image"),placeholder:"Background image link/route"})}),!D&&(0,Y.jsxs)(u.A.Item,{style:{marginBottom:"0"},children:[(0,Y.jsxs)(g.A,{gutter:10,children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Horizontal position"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"backgroundPositionX",style:{marginBottom:q.formItemMarginBottomXS},children:(0,Y.jsx)(he.A,{placeholder:t("Horizontal position"),prefix:(0,Y.jsx)(z.A,{icon:"BgPositionHorizontal"})})})})}),(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Vertical position"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"backgroundPositionY",style:{marginBottom:q.formItemMarginBottomXS},children:(0,Y.jsx)(he.A,{placeholder:t("Vertical position"),prefix:(0,Y.jsx)(z.A,{icon:"BgPositionVertical"})})})})})]}),(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Background image repeat"),placement:"left",children:(0,Y.jsx)(u.A.Item,{name:"backgroundRepeat",style:{marginBottom:q.formItemMarginBottomMD+4},children:(0,Y.jsx)(J.A,{placeholder:"Please choose",options:Re,getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")})})})]})]})]}),C.formFieldBorderEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Borders")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{te((e=>!e)),ee&&(t.borderWidth=null,t.borderColor="",t.borderStyle=""),r((e=>({...G.iV,[t.borderPosition]:{...e[t.borderPosition],width:t.borderWidth,color:t.borderColor,style:t.borderStyle}}))),o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{border:{all:{color:t.borderColor,style:t.borderStyle,width:t.borderWidth}}}})}))},children:ee?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),ee&&(0,Y.jsx)("div",{style:{paddingBottom:4},children:(0,Y.jsx)(T.A,{borders:s})})]}),C.formFieldBorderRadiusEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Border radius")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{re((e=>!e)),t.borderRadiusAll=se?0:5,o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{borderRadius:{all:t.borderRadiusAll}}})}))},children:se?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),se&&(0,Y.jsx)("div",{style:{paddingBottom:4},children:(0,Y.jsx)(E.A,{form:l,oneBorderRadiusValue:m,setOneBorderRadiusValue:c,elementSettings:e})})]}),C.formFieldBoxShadowEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Box shadow")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{me((e=>!e)),ne?(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:G.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}}})}))},children:ne?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),ne&&(0,Y.jsx)("div",{style:{paddingBottom:4},children:(0,Y.jsx)(L.A,{boxShadow:d})})]}),C.formFieldExportAsPictureEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Export settings")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{ke((e=>!e)),we&&(t.exportAsPicture=!1,o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{exportAsPicture:!1}}))}))},children:we?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),we&&(0,Y.jsx)(Ce,{form:l,elementSettings:e})]}),C.formFieldVisibilityEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsx)("div",{className:"form-group-title",children:t("Display control")}),(0,Y.jsx)(g.A,{gutter:20,children:(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)("div",{style:{paddingBottom:4},children:(0,Y.jsx)(K.A,{elementSettings:e,form:l})})})})]}),C.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsx)("div",{className:"form-group-title",children:t("Amp visibility")}),(0,Y.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(ue.A,{})})})]})]})})]})};var Ve=o(90042);const Me=({elementSettings:e})=>{const{__:t}=(0,X.s9)(),o=(0,U.XW)(),[l]=u.A.useForm(),s=(0,je.rD)(),r=(0,a.d4)(xe.Fv),d=(0,a.d4)(xe.yy);(0,i.useEffect)((()=>{e&&l.setFieldsValue(e)}),[l,e]);return(0,Y.jsx)(u.A,{form:l,layout:"vertical",name:"selected_link_form",initialValues:{href:"https://",target:"",textStrong:!1,textItalic:!1,textStrikethrough:!1,textUnderline:!1,textReplacer:""},onValuesChange:t=>{o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:t})},autoComplete:"off",className:"element-controls",children:r&&"bottom"!==d?(0,Y.jsx)(Ne.A,{form:l,elementSettings:e,showAddParagraph:!1}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Hyperlink URL"),placement:"left",children:(0,Y.jsx)(u.A.Item,{name:"href",style:{marginBottom:24,paddingRight:10},children:(0,Y.jsx)(v.A,{allowClear:!0,placeholder:"href",prefix:(0,Y.jsx)(_.A,{})})})}),s.formLinkFieldInsertImageEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsx)("div",{className:"form-group-title",children:t("Actions with the chosen text")}),(0,Y.jsx)(u.A.Item,{children:(0,Y.jsx)(A.Ay,{icon:(0,Y.jsx)(Ve.A,{}),onClick:()=>{return e="add_img",void o({operation:G.Ru.SANDBOX_ELEMENT_TEXT,action:e});var e},children:t("Add inline image")})})]}),(0,Y.jsx)(Pe.A,{form:l,elementSettings:e,showAddParagraph:!1})]})})},We=({elementSettings:e})=>{const{__:t}=(0,X.s9)(),[o]=u.A.useForm(),l=(0,U.XW)(),s=(0,a.d4)(xe.Ct),r=(0,a.d4)(xe.CS),d=(0,a.d4)(xe.Fv),n=(0,a.d4)(xe.yy),m=d&&"bottom"!==n;(0,i.useEffect)((()=>{var t,i,l,s,r;e&&o.setFieldsValue({...e,height:null===(t=e.height)||void 0===t?void 0:t.value,heightDim:null===(i=e.height)||void 0===i?void 0:i.dim,mobileHeight:(r=null===(l=e.mobileHeight)||void 0===l?void 0:l.value,r&&"auto"!==r?r:0===r?"0":""),mobileHeightDim:null===(s=e.mobileHeight)||void 0===s?void 0:s.dim})}),[o,e]);return(0,Y.jsxs)(u.A,{form:o,layout:"vertical",name:"selected_vindent_form",initialValues:{height:"",heightDim:"",mobileHeight:"",mobileHeightDim:""},onValuesChange:t=>{const i=o.getFieldsValue(!0),s=Object.keys(t)[0];let r;switch(s){case"height":r={[s]:{value:t[s],dim:i.heightDim}};break;case"heightDim":r={height:{value:i.height,dim:t[s]}};break;case"mobileHeight":r={[s]:{classNamePrefix:"em-mob-height-",value:t[s],dim:i.mobileHeightDim}};break;case"mobileHeightDim":r={mobileHeight:{classNamePrefix:"em-mob-height-",value:i.mobileHeight,dim:t[s]}};break;default:r=t}l({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:r})},autoComplete:"off",children:[!m&&(0,Y.jsx)(h.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",children:(0,Y.jsx)(b.A,{className:"selected_form-mobile-props-title",message:t("Appearance on mobile devices"),type:"info"})}),s===G.ND&&r.styles?(0,Y.jsx)("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",style:{display:s===G.ND&&r.styles?"block":"none",marginBottom:10},children:(0,Y.jsx)("div",{className:"selected_form-mobile-props-wrapper",children:(0,Y.jsx)(g.A,{gutter:10,style:{marginBottom:20},children:(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(D.A,{form:o,name:"mobileHeight",elementSettings:e})})})})}):(0,Y.jsx)("div",{id:"selected_element_form_desktop_props",style:{display:s===G.ND&&r.styles?"none":"block"},children:(0,Y.jsx)("div",{className:"selected_form-props-wrapper",children:(0,Y.jsx)(g.A,{gutter:10,children:(0,Y.jsx)(p.A,{span:14,children:(0,Y.jsx)(u.A.Item,{name:"height",children:(0,Y.jsx)(he.A,{min:0,placeholder:t("Indent height"),prefix:(0,Y.jsx)(B.A,{}),addonAfter:"px"})})})})})})]})};var He=o(58013),Xe=o(26786);const ze=({form:e,elementSettings:t})=>{const{__:o}=(0,X.s9)(),l=(0,U.XW)(),[s,r]=(0,i.useState)(t.direction),a=o=>{const i=o.target.value,a={direction:""};i!==s?r(i):(r(""),e.setFieldsValue(a),l({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:a}))};return(0,Y.jsx)(u.A.Item,{name:"direction",children:(0,Y.jsx)(H.Ay.Group,{children:(0,Y.jsxs)(j.A,{size:8,children:[(0,Y.jsx)(h.A,{placement:"top",title:o("Right to left"),children:(0,Y.jsx)(H.Ay.Button,{value:"rtl",onClick:a,children:(0,Y.jsx)(He.A,{})})}),(0,Y.jsx)(h.A,{placement:"top",title:o("Left to right"),children:(0,Y.jsx)(H.Ay.Button,{value:"ltr",onClick:a,children:(0,Y.jsx)(Xe.A,{})})})]})})})};ze.defaultProps={};const Ge=ze;var Ue=o(68031),Ye=o(34353);const qe=({form:e,elementSettings:t})=>{var o;const{__:l}=(0,X.s9)(),[s,r]=(0,i.useState)(null===(o=t.mobileDirection)||void 0===o?void 0:o.value),a=(0,U.XW)(),d=o=>{const i=o.target.value,l={mobileDirection:{classNamePrefix:"em-mob-direction-",value:""}};i!==s?r(i):(r(""),e.setFieldsValue(l),a({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:l}))};return(0,Y.jsx)(u.A.Item,{name:"mobileDirection",children:(0,Y.jsx)(H.Ay.Group,{children:(0,Y.jsxs)(j.A,{size:8,children:[(0,Y.jsx)(h.A,{placement:"top",title:l("Right to left"),children:(0,Y.jsx)(H.Ay.Button,{value:"rtl",onClick:d,children:(0,Y.jsx)(He.A,{})})}),(0,Y.jsx)(h.A,{placement:"top",title:l("Left to right"),children:(0,Y.jsx)(H.Ay.Button,{value:"ltr",onClick:d,children:(0,Y.jsx)(Xe.A,{})})})]})})})};qe.defaultProps={};const Ke=qe,{Option:$e}=J.A,Je=(0,Y.jsxs)(J.A,{className:"select-after",getPopupContainer:e=>e.parentNode,children:[(0,Y.jsx)($e,{value:"px",children:"px"}),(0,Y.jsx)($e,{value:"%",children:"%"})]}),{useToken:Qe}=c.A,Ze=({elementSettings:e})=>{const{__:t}=(0,X.s9)(),o=(0,U.XW)(),l=(0,a.wA)(),[s]=u.A.useForm(),[m,c]=(0,i.useState)(""),[f,j]=(0,i.useState)({}),[_,k]=(0,i.useState)({}),[R,P]=(0,i.useState)({}),[I,H]=(0,i.useState)({}),[$,Q]=(0,i.useState)(!0),[Z,ee]=(0,i.useState)(!0),te=(0,a.d4)(xe.Ct),oe=(0,a.d4)(xe.CS),le=(0,a.d4)(d.Hs),se=(0,je.rD)(),[re,ae]=(0,i.useState)(""===e.backgroundImage[0].value),{token:de}=Qe(),ne=(0,a.d4)(xe.Fv),me=(0,a.d4)(xe.yy),ce=ne&&"bottom"!==me,[be,ge]=(0,i.useState)(!1),[pe,Ae]=(0,i.useState)(!1),[fe,ve]=(0,i.useState)(!1),[_e,Be]=(0,i.useState)(!1),[ye,we]=(0,i.useState)(!1),[ke,Re]=(0,i.useState)(!1),[Pe,Ne]=(0,i.useState)(!1),[Te,Ee]=(0,i.useState)(!1),[Le,Oe]=(0,i.useState)(!1),[De,Fe]=(0,i.useState)(!1),[Ve,Me]=(0,i.useState)(!1),[We,He]=(0,i.useState)(!1),[Xe,ze]=(0,i.useState)(!1),[qe,$e]=(0,i.useState)(!1),Ze=le.hasOwnProperty("type")?G.IE:G.Tm,et=[{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"}];(0,i.useEffect)((()=>{if(e){var t,o,i,l,r,a,d,n,m,c,u,h,b,g,p,x,A,f,v,_,S,B,y,w,R,N,T,E,I,C,L,O,D,F,V,M,W,X,z,G,U,Y,q,K,$,J,Z,te,oe,ie,le,se,re;const de=e.border,ne=e.boxShadow,me=e.mobileBorder,ce=e.mobileBoxShadow;j(de),P(ne),k(me),H(ce);const ue=Object.keys(de).find((e=>{var t,o,i;return(null===(t=de[e])||void 0===t?void 0:t.width)||(null===(o=de[e])||void 0===o?void 0:o.style)||(null===(i=de[e])||void 0===i?void 0:i.color)})),he=Object.keys(me).find((e=>{var t,o,i;return(null===(t=me[e])||void 0===t?void 0:t.width)||(null===(o=me[e])||void 0===o?void 0:o.style)||(null===(i=me[e])||void 0===i?void 0:i.color)}));s.setFieldsValue({...e,width:null===(t=e.width)||void 0===t?void 0:t.value,widthDim:null===(o=e.width)||void 0===o?void 0:o.dim,height:null===(i=e.height)||void 0===i?void 0:i.value,heightDim:null===(l=e.height)||void 0===l?void 0:l.dim,backgroundImage:e.backgroundImage[0].value,show:e.show?e.show:"all",borderPosition:ue||"all",borderWidth:(null===(r=de[ue])||void 0===r?void 0:r.width)||"",borderColor:(null===(a=de[ue])||void 0===a?void 0:a.color)||"",borderStyle:(null===(d=de[ue])||void 0===d?void 0:d.style)||"",paddingTop:(0,Se.ok)(null===(n=e.padding)||void 0===n?void 0:n.all)||(0,Se.ok)(null===(m=e.padding)||void 0===m?void 0:m.top),paddingLeft:(0,Se.ok)(null===(c=e.padding)||void 0===c?void 0:c.all)||(0,Se.ok)(null===(u=e.padding)||void 0===u?void 0:u.left),paddingRight:(0,Se.ok)(null===(h=e.padding)||void 0===h?void 0:h.all)||(0,Se.ok)(null===(b=e.padding)||void 0===b?void 0:b.right),paddingBottom:(0,Se.ok)(null===(g=e.padding)||void 0===g?void 0:g.all)||(0,Se.ok)(null===(p=e.padding)||void 0===p?void 0:p.bottom),paddingLeftRight:(0,Se.ok)(null===(x=e.padding)||void 0===x?void 0:x.left)||(0,Se.ok)(null===(A=e.padding)||void 0===A?void 0:A.right),paddingTopBottom:(0,Se.ok)(null===(f=e.padding)||void 0===f?void 0:f.top)||(0,Se.ok)(null===(v=e.padding)||void 0===v?void 0:v.bottom),borderRadiusAll:(0,Se.ok)(e.borderRadius.all),borderRadiusTopLeft:(0,Se.ok)(e.borderRadius.topLeft),borderRadiusBottomLeft:(0,Se.ok)(e.borderRadius.bottomLeft),borderRadiusTopRight:(0,Se.ok)(e.borderRadius.topRight),borderRadiusBottomRight:(0,Se.ok)(e.borderRadius.bottomRight),boxShadowInset:(0,Se.ok)(null===(_=e.boxShadow)||void 0===_?void 0:_.inset)||!1,boxShadowHOffset:(0,Se.ok)(null===(S=e.boxShadow)||void 0===S?void 0:S.hOffset),boxShadowVOffset:(0,Se.ok)(null===(B=e.boxShadow)||void 0===B?void 0:B.vOffset),boxShadowBlurRadius:(0,Se.ok)(null===(y=e.boxShadow)||void 0===y?void 0:y.blurRadius),boxShadowSpreadRadius:(0,Se.ok)(null===(w=e.boxShadow)||void 0===w?void 0:w.spreadRadius),boxShadowColor:(0,Se.ok)(null===(R=e.boxShadow)||void 0===R?void 0:R.color),mobileWidth:(0,Se.xc)(null===(N=e.mobileWidth)||void 0===N?void 0:N.value),mobileWidthDim:null===(T=e.mobileWidth)||void 0===T?void 0:T.dim,mobileHeight:(0,Se.xc)(null===(E=e.mobileHeight)||void 0===E?void 0:E.value),mobileHeightDim:null===(I=e.mobileHeight)||void 0===I?void 0:I.dim,mobileBorderPosition:he||"all",mobileBorderWidth:null!==(null===(C=me[he])||void 0===C?void 0:C.width)?null===(L=me[he])||void 0===L?void 0:L.width:"",mobileBorderColor:(null===(O=me[he])||void 0===O?void 0:O.color)||"",mobileBorderStyle:(null===(D=me[he])||void 0===D?void 0:D.style)||"",mobileBorderRadiusAll:(0,Se.ok)(e.mobileBorderRadius.all),mobileRadiusTopLeft:(0,Se.ok)(null!==e.mobileBorderRadius.topLeft?e.mobileBorderRadius.topLeft:e.mobileBorderRadius.all),mobileRadiusBottomLeft:(0,Se.ok)(null!==e.mobileBorderRadius.bottomLeft?e.mobileBorderRadius.bottomLeft:e.mobileBorderRadius.all),mobileRadiusTopRight:(0,Se.ok)(null!==e.mobileBorderRadius.topRight?e.mobileBorderRadius.topRight:e.mobileBorderRadius.all),mobileRadiusBottomRight:(0,Se.ok)(null!==e.mobileBorderRadius.bottomRight?e.mobileBorderRadius.bottomRight:e.mobileBorderRadius.all),mobileBoxShadowInset:(0,Se.ok)(null===(F=e.mobileBoxShadow)||void 0===F?void 0:F.inset)||!1,mobileBoxShadowHOffset:(0,Se.ok)(null===(V=e.mobileBoxShadow)||void 0===V?void 0:V.hOffset),mobileBoxShadowVOffset:(0,Se.ok)(null===(M=e.mobileBoxShadow)||void 0===M?void 0:M.vOffset),mobileBoxShadowBlurRadius:(0,Se.ok)(null===(W=e.mobileBoxShadow)||void 0===W?void 0:W.blurRadius),mobileBoxShadowSpreadRadius:(0,Se.ok)(null===(X=e.mobileBoxShadow)||void 0===X?void 0:X.spreadRadius),mobileBoxShadowColor:(0,Se.ok)(null===(z=e.mobileBoxShadow)||void 0===z?void 0:z.color),mobileAlign:(0,Se.ok)(null===(G=e.mobileAlign)||void 0===G?void 0:G.value),mobileVerticalAlign:(0,Se.ok)(null===(U=e.mobileVerticalAlign)||void 0===U?void 0:U.value),mobileBackgroundColor:(0,Se.ok)("none"!==(null===(Y=e.mobileBackgroundColor)||void 0===Y?void 0:Y.value)?null===(q=e.mobileBackgroundColor)||void 0===q?void 0:q.value:""),mobileBackgroundImage:"none"!==e.mobileBackgroundImage[0].value?e.mobileBackgroundImage[0].value:"",mobileBackgroundPositionX:(0,Se.ok)(null===(K=e.mobileBackgroundPositionX)||void 0===K?void 0:K.value),mobileBackgroundPositionY:(0,Se.ok)(null===($=e.mobileBackgroundPositionY)||void 0===$?void 0:$.value),mobileBackgroundRepeat:null!==(J=e.mobileBackgroundRepeat)&&void 0!==J&&J.value?null===(Z=e.mobileBackgroundRepeat)||void 0===Z?void 0:Z.value:"none",mobilePaddingTop:(0,Se.ok)(e.mobilePadding.all)||(0,Se.ok)(e.mobilePadding.top),mobilePaddingLeft:(0,Se.ok)(e.mobilePadding.all)||(0,Se.ok)(e.mobilePadding.left),mobilePaddingRight:(0,Se.ok)(e.mobilePadding.all)||(0,Se.ok)(e.mobilePadding.right),mobilePaddingBottom:(0,Se.ok)(e.mobilePadding.all)||(0,Se.ok)(e.mobilePadding.bottom),mobilePaddingTopBottom:(0,Se.ok)(e.mobilePadding.top)||(0,Se.ok)(e.mobilePadding.bottom),mobilePaddingLeftRight:(0,Se.ok)(e.mobilePadding.left)||(0,Se.ok)(e.mobilePadding.right),exportAsPicture:null===e||void 0===e?void 0:e.exportAsPicture}),!(0,Se.ok)(e.borderRadius.all)&&((0,Se.ok)(e.borderRadius.topLeft)||(0,Se.ok)(e.borderRadius.bottomLeft)||(0,Se.ok)(e.borderRadius.topRight)||(0,Se.ok)(e.borderRadius.bottomRight))?Q(!1):Q(!0),(0,Se.ok)(e.mobileBorderRadius.topLeft)||(0,Se.ok)(e.mobileBorderRadius.bottomLeft)||(0,Se.ok)(e.mobileBorderRadius.topRight)||(0,Se.ok)(e.mobileBorderRadius.bottomRight)?ee(!1):ee(!0),ae(""===e.backgroundImage[0].value),(0,Se.ok)(e.padding.all)||!((0,Se.ok)(e.padding.top)||(0,Se.ok)(e.padding.right)||(0,Se.ok)(e.padding.bottom)||(0,Se.ok)(e.padding.left))||e.padding.top===e.padding.bottom&&e.padding.right===e.padding.left?ge(!0):ge(!1),(0,Se.ok)(e.mobilePadding.all)||!((0,Se.ok)(e.mobilePadding.top)||(0,Se.ok)(e.mobilePadding.right)||(0,Se.ok)(e.mobilePadding.bottom)||(0,Se.ok)(e.mobilePadding.left))||e.mobilePadding.top===e.mobilePadding.bottom&&e.mobilePadding.right===e.mobilePadding.left?Ae(!0):Ae(!1),ve(!(null===(te=de[ue])||void 0===te||!te.width)||!(null===(oe=de[ue])||void 0===oe||!oe.style)||!(null===(ie=de[ue])||void 0===ie||!ie.color)),Be(!(null===(le=me[he])||void 0===le||!le.width)||!(null===(se=me[he])||void 0===se||!se.style)||!(null===(re=me[he])||void 0===re||!re.color)),we(!!e.borderRadius.all||!!e.borderRadius.topLeft||!!e.borderRadius.bottomLeft||!!e.borderRadius.topRight||!!e.borderRadius.bottomRight),Re(!!e.mobileBorderRadius.all||!!e.mobileBorderRadius.topLeft||!!e.mobileBorderRadius.bottomLeft||!!e.mobileBorderRadius.topRight||!!e.mobileBorderRadius.bottomRight),Ne(!!e.boxShadow),Ee(!!e.mobileBoxShadow.blurRadius||!!e.mobileBoxShadow.color||!!e.mobileBoxShadow.hOffset||!!e.mobileBoxShadow.inset||!!e.mobileBoxShadow.spreadRadius||!!e.mobileBoxShadow.vOffset),Oe(!!e.width.value&&"column"!==e.type||!!e.height.value),Fe(!!e.mobileWidth.value||!!e.mobileHeight.value),Me(!!e.backgroundColor||!!e.backgroundImage[0].value||!!e.backgroundPositionY||!!e.backgroundPositionX||"repeat"!==e.backgroundRepeat||!e.backgroundRepeat),He(!!e.mobileBackgroundColor.value),ze(!!e.exportAsPicture),$e(!!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)}}),[s,e]);const tt=(0,i.useCallback)((e=>{l(Ze===G.Tm?(0,d.A9)(e):(0,n.A9)(e))}),[l,Ze]);return(0,Y.jsxs)(u.A,{form:s,layout:"vertical",name:"selected_td_form",initialValues:{backgroundColor:"",backgroundImage:"",backgroundPositionX:"",backgroundPositionY:"",backgroundRepeat:"",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 i=s.getFieldsValue(!0),l=Object.keys(t)[0];let r;switch(c("%"===s.getFieldsValue(!0).widthDim?100:""),l){case"exportAsPicture":r={exportAsPicture:i.exportAsPicture};break;case"boxShadowInset":case"boxShadowHOffset":case"boxShadowVOffset":case"boxShadowBlurRadius":case"boxShadowSpreadRadius":case"boxShadowColor":r={boxShadow:{hOffset:i.boxShadowHOffset,vOffset:i.boxShadowVOffset,blurRadius:i.boxShadowBlurRadius,spreadRadius:i.boxShadowSpreadRadius,color:i.boxShadowColor,inset:i.boxShadowInset}};break;case"borderStyle":r={border:{[i.borderPosition]:{...f[i.borderPosition],style:t[l]}}},"all"===i.borderPosition?j((e=>({...G.iV,[i.borderPosition]:{...e[i.borderPosition],style:t[l]}}))):j((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],style:t[l]}})));break;case"borderColor":r={border:{[i.borderPosition]:{...f[i.borderPosition],color:t[l]}}},"all"===i.borderPosition?j((e=>({...G.iV,[i.borderPosition]:{...e[i.borderPosition],color:t[l]}}))):j((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],color:t[l]}})));break;case"borderWidth":r={border:{[i.borderPosition]:{...f[i.borderPosition],width:t[l]}}},"all"===i.borderPosition?j((e=>({...G.iV,[i.borderPosition]:{...e[i.borderPosition],width:t[l]}}))):j((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],width:t[l]}})));break;case"borderPosition":s.setFieldsValue({borderWidth:f[t[l]].width||"",borderColor:f[t[l]].color||"",borderStyle:f[t[l]].style||""});break;case"width":r={[l]:{value:t[l],dim:i.widthDim}};break;case"height":r={[l]:{value:t[l],dim:i.heightDim}};break;case"widthDim":r={width:{value:i.width,dim:t[l]}};break;case"heightDim":r={height:{value:i.height,dim:t[l]}};break;case"backgroundImage":ae(""===t[l]),r={[l]:[{...e.backgroundImage[0],value:t[l]}]};break;case"paddingTop":case"paddingLeft":case"paddingRight":case"paddingBottom":r={padding:{left:i.paddingLeft,right:i.paddingRight,top:i.paddingTop,bottom:i.paddingBottom,[Se.yy[l]]:+t[l]}};break;case"paddingTopBottom":r={padding:{left:i.paddingLeft,right:i.paddingRight,top:+t[l],bottom:+t[l]}},i.paddingTop=i.paddingBottom=+t[l];break;case"paddingLeftRight":r={padding:{top:i.paddingTop,bottom:i.paddingBottom,left:+t[l],right:+t[l]}},i.paddingLeft=i.paddingRight=+t[l];break;case"borderRadiusAll":r={borderRadius:{[G.wF[l]]:+t[l]}};break;case"borderRadiusTopLeft":case"borderRadiusBottomLeft":case"borderRadiusTopRight":case"borderRadiusBottomRight":r={borderRadius:{topLeft:i.borderRadiusTopLeft,bottomLeft:i.borderRadiusBottomLeft,topRight:i.borderRadiusTopRight,bottomRight:i.borderRadiusBottomRight,[G.wF[l]]:+t[l]}};break;case"mobileWidth":r={[l]:{classNamePrefix:"em-mob-width-",value:t[l],dim:i.mobileWidthDim}};break;case"mobileWidthDim":r={mobileWidth:{classNamePrefix:"em-mob-width-",value:i.mobileWidth,dim:t[l]}};break;case"mobileHeight":r={[l]:{classNamePrefix:"em-mob-height-",value:t[l],dim:i.mobileHeightDim}};break;case"mobileHeightDim":r={mobileHeight:{classNamePrefix:"em-mob-height-",value:i.mobileHeight,dim:t[l]}};break;case"mobileBorderStyle":r={mobileBorder:{[i.mobileBorderPosition]:{..._[i.mobileBorderPosition],style:t[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?k((e=>({...G.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],style:t[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):k((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],style:t[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderColor":r={mobileBorder:{[i.mobileBorderPosition]:{..._[i.mobileBorderPosition],color:t[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?k((e=>({...G.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],color:t[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):k((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],color:t[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderWidth":r={mobileBorder:{[i.mobileBorderPosition]:{..._[i.mobileBorderPosition],width:t[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?k((e=>({...G.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],width:t[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):k((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],width:t[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderPosition":s.setFieldsValue({mobileBorderWidth:_[t[l]].width||"",mobileBorderColor:_[t[l]].color||"",mobileBorderStyle:_[t[l]].style||""});break;case"mobileBorderRadiusAll":case"mobileRadiusTopLeft":case"mobileRadiusBottomLeft":case"mobileRadiusTopRight":case"mobileRadiusBottomRight":r={mobileBorderRadius:{[Se.NW[l]]:t[l],classNamePrefix:"em-mob-border_radius_"+Se.NW[l]+"-"}};break;case"mobileBoxShadowInset":case"mobileBoxShadowHOffset":case"mobileBoxShadowVOffset":case"mobileBoxShadowBlurRadius":case"mobileBoxShadowSpreadRadius":case"mobileBoxShadowColor":r={mobileBoxShadow:{hOffset:i.mobileBoxShadowHOffset,vOffset:i.mobileBoxShadowVOffset,blurRadius:i.mobileBoxShadowBlurRadius,spreadRadius:i.mobileBoxShadowSpreadRadius,color:i.mobileBoxShadowColor,inset:i.mobileBoxShadowInset,classNamePrefix:"em-mob-box_shadow-"}};break;case"mobileAlign":r={[l]:{classNamePrefix:"em-mob-text_align-",value:t[l]}};break;case"mobileVerticalAlign":r={[l]:{classNamePrefix:"em-mob-vertical_align-",value:t[l]}};break;case"mobileBackgroundColor":r={[l]:{classNamePrefix:"em-mob-background_color-",value:t[l]}};break;case"mobileBackgroundImage":r={[l]:[{...e.mobileBackgroundImage[0],classNamePrefix:"em-mob-background_image-",value:t[l]}]};break;case"mobileBackgroundPositionX":r={[l]:{classNamePrefix:"em-mob-background_position_x-",value:t[l]}};break;case"mobileBackgroundPositionY":r={[l]:{classNamePrefix:"em-mob-background_position_x-",value:t[l]}};break;case"mobileBackgroundRepeat":r={[l]:{classNamePrefix:"em-mob-background_repeat-",value:t[l]}};break;case"mobilePaddingTop":case"mobilePaddingLeft":case"mobilePaddingRight":case"mobilePaddingBottom":r={mobilePadding:{all:null,top:""!==i.mobilePaddingTop?i.mobilePaddingTop:null,right:""!==i.mobilePaddingRight?i.mobilePaddingRight:null,bottom:""!==i.mobilePaddingBottom?i.mobilePaddingBottom:null,left:""!==i.mobilePaddingLeft?i.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;case"mobilePaddingTopBottom":i.mobilePaddingTop=i.mobilePaddingBottom=t[l],r={mobilePadding:{all:null,top:""!==i.mobilePaddingTop?i.mobilePaddingTop:null,right:""!==i.mobilePaddingRight?i.mobilePaddingRight:null,bottom:""!==i.mobilePaddingBottom?i.mobilePaddingBottom:null,left:""!==i.mobilePaddingLeft?i.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;case"mobilePaddingLeftRight":i.mobilePaddingLeft=i.mobilePaddingRight=t[l],r={mobilePadding:{all:null,top:""!==i.mobilePaddingTop?i.mobilePaddingTop:null,right:""!==i.mobilePaddingRight?i.mobilePaddingRight:null,bottom:""!==i.mobilePaddingBottom?i.mobilePaddingBottom:null,left:""!==i.mobilePaddingLeft?i.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;default:r=t}"borderPosition"!==l&&(o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:r}),tt({...e,...r,activateSection:null,changeKey:l}))},autoComplete:"off",className:"element-controls",children:[!ce&&(0,Y.jsx)(h.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",children:(0,Y.jsx)(b.A,{className:"selected_form-mobile-props-title",message:t("Appearance on mobile devices"),type:"info"})}),te===G.ND&&oe.styles?(0,Y.jsx)("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",style:{display:te===G.ND&&oe.styles?"block":"none"},children:(0,Y.jsxs)("div",{className:"selected_form-mobile-props-wrapper",children:[(0,Y.jsxs)(g.A,{gutter:20,children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(W.A,{form:s,elementSettings:e,imgParent:!0})}),se.formCellFieldVerticalAlignEnabled&&"group"!==e.type&&("structure"!==e.type||"structure"===e.type&&1===e.floatBlocks.items.length)&&(0,Y.jsx)(p.A,{span:12,style:{textAlign:"right"},children:(0,Y.jsx)(q,{form:s,elementSettings:e})})]}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),se.formCellFieldPaddingsEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Padding")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=s.getFieldsValue(!0);setTimeout((()=>{$e((e=>!e)),qe&&(t.mobilePaddingLeftRight="",t.mobilePaddingLeft="",t.mobilePaddingRight="",t.mobilePaddingTopBottom="",t.mobilePaddingTop="",t.mobilePaddingBottom="",o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobilePadding:{all:null,top:null,right:null,bottom:null,left:null,classNamePrefix:"em-mob-padding_"}}}))}))},children:qe?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),qe&&(0,Y.jsx)(g.A,{gutter:10,style:{paddingBottom:4},children:(0,Y.jsx)(Y.Fragment,{children:(0,Y.jsx)(Ye.A,{form:s,elementSettings:e,mobilePaddingsExt:pe,setMobilePaddingsExt:Ae})})}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"})]}),"group"!==e.type&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Size")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=s.getFieldsValue(!0);setTimeout((()=>{Fe((e=>!e)),De&&(t.mobileWidth="",t.mobileHeight="",o({operation:G.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-"}}}))}))},children:De?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),De&&(0,Y.jsxs)(g.A,{gutter:10,style:{paddingBottom:9},children:["structure"!==e.type&&(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)("div",{style:{marginBottom:15},children:(0,Y.jsx)(O.A,{form:s,name:"mobileWidth",elementSettings:e})})}),(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)("div",{style:{marginBottom:15},children:(0,Y.jsx)(D.A,{form:s,name:"mobileHeight",elementSettings:e})})})]}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"})]}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Background")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=s.getFieldsValue(!0);setTimeout((()=>{He((e=>!e)),t.mobileBackgroundColor=We?"":"#E5E5E5",o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBackgroundColor:{classNamePrefix:"em-mob-background_color-",value:t.mobileBackgroundColor}}})}))},children:We?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),We&&(0,Y.jsx)(Y.Fragment,{children:(0,Y.jsx)("div",{style:{marginBottom:(se.formCellFieldBackgroundImageEnabled,de.formItemMarginBottomMD+4)},children:(0,Y.jsx)(Ie.A,{form:s,elementSettings:e,label:t("Background color")})})}),!1,se.formFieldBorderEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Borders")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=s.getFieldsValue(!0);setTimeout((()=>{Be((e=>!e)),_e&&(t.mobileBorderWidth=null,t.mobileBorderColor="",t.mobileBorderStyle=""),k((e=>({...G.iV,[t.mobileBorderPosition]:{...e[t.mobileBorderPosition],width:t.mobileBorderWidth,color:t.mobileBorderColor,style:t.mobileBorderStyle}}))),o({operation:G.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+"-"}}}})}))},children:_e?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),_e&&(0,Y.jsx)("div",{style:{marginBottom:4},children:(0,Y.jsx)(F.A,{mobileBorders:_})})]}),se.formFieldBorderRadiusEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Border radius")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=s.getFieldsValue(!0);setTimeout((()=>{Re((e=>!e)),t.mobileBorderRadiusAll=ke?null:5,o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorderRadius:{all:t.mobileBorderRadiusAll,classNamePrefix:"em-mob-border_radius_all-"}}})}))},children:ke?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),ke&&(0,Y.jsx)("div",{style:{marginBottom:4},children:(0,Y.jsx)(V.A,{form:s,oneMobileBorderRadiusValue:Z,setOneMobileBorderRadiusValue:ee})})]}),se.formFieldBoxShadowEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Box shadow")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=s.getFieldsValue(!0);setTimeout((()=>{Ee((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"),o({operation:G.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-"}}})}))},children:Te?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),Te&&(0,Y.jsx)("div",{style:{marginBottom:4},children:(0,Y.jsx)(M.A,{mobileBoxShadow:I,form:s,elementSettings:e})})]}),se.formFieldVisibilityEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsx)("div",{className:"form-group-title",children:t("group"!==e.type?"Display control & Direction":"Display control")}),(0,Y.jsxs)(g.A,{gutter:20,style:{marginBottom:4},children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(K.A,{elementSettings:e,form:s})}),"group"!==e.type&&(0,Y.jsx)(p.A,{span:12,style:{textAlign:"group"!==e.type?"right":"left"},children:(0,Y.jsx)(Ke,{elementSettings:e,form:s})})]})]}),se.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsx)("div",{className:"form-group-title",children:t("Amp visibility")}),(0,Y.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(ue.A,{})})})]})]})}):(0,Y.jsx)("div",{id:"selected_element_form_desktop_props",children:(0,Y.jsxs)("div",{className:"selected_form-props-wrapper",children:[(0,Y.jsxs)(g.A,{gutter:10,style:{paddingBottom:4},children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(Ue.A,{form:s,elementSettings:e})}),se.formCellFieldVerticalAlignEnabled&&"group"!==e.type&&("structure"!==e.type||"structure"===e.type&&1===e.floatBlocks.items.length)&&(0,Y.jsx)(p.A,{span:12,style:{textAlign:"right"},children:(0,Y.jsx)(C.A,{form:s,elementSettings:e})})]}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),se.formCellFieldPaddingsEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)("div",{className:"form-group-title",children:t("Padding")}),(0,Y.jsx)(g.A,{gutter:10,style:{paddingBottom:4},children:(0,Y.jsxs)(Y.Fragment,{children:["group"!==e.type&&"column"!==e.type&&(0,Y.jsxs)(p.A,{span:10,style:{width:156,flex:"auto",maxWidth:"none"},children:[(0,Y.jsx)("div",{className:"padding-collapsed",style:{display:be?"block":"none"},children:(0,Y.jsx)(h.A,{title:t("Horizontal padding"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"paddingLeftRight",children:(0,Y.jsx)(he.A,{min:0,placeholder:t("Horizontal"),prefix:(0,Y.jsx)(z.A,{icon:"PaddingLeftRight"}),addonAfter:"px"})})})}),(0,Y.jsxs)("div",{className:"padding-extended",style:{display:be?"none":"block"},children:[(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Left padding"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"paddingLeft",style:{marginBottom:de.formItemMarginBottomXS},children:(0,Y.jsx)(he.A,{min:0,placeholder:t("Left"),prefix:(0,Y.jsx)(z.A,{icon:"PaddingLeft"}),addonAfter:"px"})})}),(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Right padding"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"paddingRight",children:(0,Y.jsx)(he.A,{min:0,placeholder:t("Right"),prefix:(0,Y.jsx)(z.A,{icon:"PaddingRight"}),addonAfter:"px"})})})]})]}),(0,Y.jsxs)(p.A,{span:10,style:{width:"group"!==e.type&&"column"!==e.type?156:45,flex:"auto",maxWidth:"none"},children:[(0,Y.jsx)("div",{className:"padding-collapsed",style:{display:be?"block":"none"},children:(0,Y.jsx)(h.A,{title:t("Vertical padding"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"paddingTopBottom",children:(0,Y.jsx)(he.A,{min:0,placeholder:t("Vertical"),prefix:(0,Y.jsx)(z.A,{icon:"PaddingTopBottom"}),addonAfter:"px"})})})}),(0,Y.jsxs)("div",{className:"padding-extended",style:{display:be?"none":"block"},children:[(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Top padding"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"paddingTop",style:{marginBottom:de.formItemMarginBottomXS},children:(0,Y.jsx)(he.A,{min:0,placeholder:t("Top"),prefix:(0,Y.jsx)(z.A,{icon:"PaddingTop"}),addonAfter:"px"})})}),(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Bottom padding"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"paddingBottom",children:(0,Y.jsx)(he.A,{min:0,placeholder:t("Bottom"),prefix:(0,Y.jsx)(z.A,{icon:"PaddingBottom"}),addonAfter:"px"})})})]})]}),(0,Y.jsx)(p.A,{span:4,style:{width:45,flex:"auto",maxWidth:"none"},children:(0,Y.jsx)(h.A,{title:t("Individual padding"),placement:"bottom",children:(0,Y.jsx)(A.Ay,{className:r()("selected-td-form__button",{"selected-td-form__button--active":!be}),onClick:()=>{ge((e=>!e));const t=s.getFieldsValue(!0);be||(t.paddingLeftRight=t.paddingLeft,t.paddingTopBottom=t.paddingTop,t.paddingRight=t.paddingLeft,t.paddingBottom=t.paddingTop,o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{padding:{top:t.paddingTopBottom,bottom:t.paddingTopBottom,left:t.paddingLeftRight,right:t.paddingLeftRight}}}))},children:(0,Y.jsx)(z.A,{icon:"PaddingSwitcher"})})})})]})}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"})]}),"group"!==e.type&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Size")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=s.getFieldsValue(!0);setTimeout((()=>{Oe((e=>!e)),Le&&(t.width="",t.height="",o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{width:{value:null,dim:"px"},height:{value:null,dim:"px"}}}))}))},children:Le?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),Le&&(0,Y.jsxs)(g.A,{gutter:10,style:{paddingBottom:4},children:["structure"!==e.type&&"column"!==e.type&&(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(h.A,{title:t("Width"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"width",style:{marginBottom:de.formItemMarginBottomXS},children:(0,Y.jsx)(he.A,{min:0,max:m,placeholder:t("Width"),prefix:(0,Y.jsx)(S.A,{}),addonAfter:(0,Y.jsx)(u.A.Item,{name:"widthDim",noStyle:!0,children:Je})})})})}),(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(h.A,{title:t("Height"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"height",children:(0,Y.jsx)(he.A,{min:0,placeholder:t("Height"),prefix:(0,Y.jsx)(B.A,{}),addonAfter:"px"})})})})]}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"})]}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Background")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=s.getFieldsValue(!0);setTimeout((()=>{Me((e=>!e)),Ve?(t.backgroundColor="",t.backgroundImage="",t.backgroundPositionX="",t.backgroundPositionY="",t.backgroundRepeat="none",ae(!0)):t.backgroundColor="#E5E5E5",o({operation:G.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}})}))},children:Ve?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),Ve&&(0,Y.jsxs)(g.A,{gutter:10,style:{marginBottom:re?16:0},children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Background color"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,Y.jsx)(u.A.Item,{name:"backgroundColor",style:{marginBottom:se.formCellFieldBackgroundImageEnabled?de.formItemMarginBottomXS:de.formItemMarginBottomMD+4},children:(0,Y.jsx)(ie.A,{placeholder:t("Background color"),usedColors:e.usedColors})})})}),se.formCellFieldBackgroundImageEnabled&&(0,Y.jsxs)(p.A,{span:re?12:24,children:[(0,Y.jsx)(N.A,{form:s,label:t("Background image"),name:"backgroundImage",tooltipTitle:t("Background image"),placeholder:"Background image link/route"}),!re&&(0,Y.jsxs)(u.A.Item,{style:{marginBottom:"0"},children:[(0,Y.jsxs)(g.A,{gutter:10,children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Horizontal position"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"backgroundPositionX",style:{marginBottom:de.formItemMarginBottomXS},children:(0,Y.jsx)(v.A,{placeholder:t("Horizontal position"),prefix:(0,Y.jsx)(z.A,{icon:"BgPositionHorizontal"})})})})}),(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Vertical position"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"backgroundPositionY",style:{marginBottom:de.formItemMarginBottomXS},children:(0,Y.jsx)(v.A,{placeholder:t("Vertical position"),prefix:(0,Y.jsx)(z.A,{icon:"BgPositionVertical"})})})})})]}),(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Background image repeat"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"backgroundRepeat",style:{marginBottom:de.formItemMarginBottomMD+4},children:(0,Y.jsx)(J.A,{placeholder:t("Please choose"),options:et,getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")})})})]})]})]}),se.formFieldBorderEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Borders")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=s.getFieldsValue(!0);setTimeout((()=>{ve((e=>!e)),fe&&(t.borderWidth=null,t.borderColor="",t.borderStyle=""),j((e=>({...G.iV,[t.borderPosition]:{...e[t.borderPosition],width:t.borderWidth,color:t.borderColor,style:t.borderStyle}}))),o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{border:{all:{color:t.borderColor,style:t.borderStyle,width:t.borderWidth}}}})}))},children:fe?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),fe&&(0,Y.jsx)("div",{style:{marginBottom:4},children:(0,Y.jsx)(T.A,{borders:f})})]}),se.formFieldBorderRadiusEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Border radius")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=s.getFieldsValue(!0);setTimeout((()=>{we((e=>!e)),t.borderRadiusAll=ye?0:5,o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{borderRadius:{all:t.borderRadiusAll}}})}))},children:ye?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),ye&&(0,Y.jsx)("div",{style:{marginBottom:4},children:(0,Y.jsx)(E.A,{form:s,oneBorderRadiusValue:$,setOneBorderRadiusValue:Q,elementSettings:e})})]}),se.formFieldBoxShadowEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Box shadow")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=s.getFieldsValue(!0);setTimeout((()=>{Ne((e=>!e)),Pe?(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:G.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}}})}))},children:Pe?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),Pe&&(0,Y.jsx)("div",{style:{marginBottom:4},children:(0,Y.jsx)(L.A,{boxShadow:R})})]}),se.formFieldExportAsPictureEnabled&&"group"!==e.type&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Export settings")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=s.getFieldsValue(!0);setTimeout((()=>{ze((e=>!e)),Xe&&(t.exportAsPicture=!1,o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{exportAsPicture:!1}}))}))},children:Xe?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),Xe&&(0,Y.jsx)(Y.Fragment,{children:(0,Y.jsx)(Ce,{form:s,elementSettings:e})})]}),se.formFieldVisibilityEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsx)("div",{className:"form-group-title",children:t("group"!==e.type?"Display control & Direction":"Display control")}),(0,Y.jsxs)(g.A,{gutter:20,style:{marginBottom:4},children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(K.A,{elementSettings:e,form:s})}),"group"!==e.type&&(0,Y.jsx)(p.A,{span:12,style:{textAlign:"group"!==e.type?"right":"left"},children:(0,Y.jsx)(Ge,{elementSettings:e,form:s})})]})]}),se.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsx)("div",{className:"form-group-title",children:t("Amp visibility")}),(0,Y.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(ue.A,{})})})]})]})})]})},{Option:et}=J.A,tt=(0,Y.jsxs)(J.A,{className:"select-after",getPopupContainer:e=>e.parentNode,children:[(0,Y.jsx)(et,{value:"px",children:"px"}),(0,Y.jsx)(et,{value:"%",children:"%"})]}),{useToken:ot}=c.A,it=({elementSettings:e})=>{const{__:t}=(0,X.s9)(),o=(0,U.XW)(),[l]=u.A.useForm(),[s,d]=(0,i.useState)({}),[n,m]=(0,i.useState)({}),[c,f]=(0,i.useState)(!0),[j,_]=(0,i.useState)({}),[k,R]=(0,i.useState)({}),[P,I]=(0,i.useState)(!0),W=(0,a.d4)(xe.Ct),H=(0,a.d4)(xe.CS),$=(0,je.rD)(),[Q,Z]=(0,i.useState)(""===e.backgroundImage[0].value),{token:ee}=ot(),te=(0,a.d4)(xe.Fv),oe=(0,a.d4)(xe.yy),le=te&&"bottom"!==oe,[se,re]=(0,i.useState)(!1),[ae,de]=(0,i.useState)(!1),[ne,me]=(0,i.useState)(!1),[ce,be]=(0,i.useState)(!1),[ge,pe]=(0,i.useState)(!1),[Ae,fe]=(0,i.useState)(!1),[ve,_e]=(0,i.useState)(!1),[Be,ye]=(0,i.useState)(!1),[we,ke]=(0,i.useState)(!1),[Re,Pe]=(0,i.useState)(!1),[Ne,Ee]=(0,i.useState)(!1),[Le,Oe]=(0,i.useState)(!1),[De,Fe]=(0,i.useState)(!1),[Ve,Me]=(0,i.useState)(!1),[We,He]=(0,i.useState)(!1),[Xe,ze]=(0,i.useState)(""),qe=[{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"}];(0,i.useEffect)((()=>{if(e){var t,o,i,s,r,a,n,c,u,h,b,g,p,x,A,j,v,S,B,y,w,k,P,N,T,E,C,L,O,D,F,V,M,W,H,X,z,G,U,Y,q,K,$,J,Q,ee,te,oe,ie,le,se;const ae=e.border,ne=e.boxShadow,ce=e.mobileBorder,ue=e.mobileBoxShadow;d(ae),m(ne),_(ce),R(ue);const he=Object.keys(ae).find((e=>{var t,o,i;return(null===(t=ae[e])||void 0===t?void 0:t.width)||(null===(o=ae[e])||void 0===o?void 0:o.style)||(null===(i=ae[e])||void 0===i?void 0:i.color)})),ge=Object.keys(ce).find((e=>{var t,o,i;return(null===(t=ce[e])||void 0===t?void 0:t.width)||(null===(o=ce[e])||void 0===o?void 0:o.style)||(null===(i=ce[e])||void 0===i?void 0:i.color)}));l.setFieldsValue({...e,width:null===(t=e.width)||void 0===t?void 0:t.value,widthDim:null===(o=e.width)||void 0===o?void 0:o.dim,height:null===(i=e.height)||void 0===i?void 0:i.value,heightDim:null===(s=e.height)||void 0===s?void 0:s.dim,maxWidth:null===(r=e.maxWidth)||void 0===r?void 0:r.value,maxWidthDim:null===(a=e.maxWidth)||void 0===a?void 0:a.dim,minWidth:null===(n=e.minWidth)||void 0===n?void 0:n.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:he||"all",borderWidth:(null===(u=ae[he])||void 0===u?void 0:u.width)||"",borderColor:(null===(h=ae[he])||void 0===h?void 0:h.color)||"",borderStyle:(null===(b=ae[he])||void 0===b?void 0:b.style)||"",paddingTop:(0,Se.ok)(e.padding.all)||(0,Se.ok)(e.padding.top),paddingLeft:(0,Se.ok)(e.padding.all)||(0,Se.ok)(e.padding.left),paddingRight:(0,Se.ok)(e.padding.all)||(0,Se.ok)(e.padding.right),paddingBottom:(0,Se.ok)(e.padding.all)||(0,Se.ok)(e.padding.bottom),paddingLeftRight:(0,Se.ok)(null===(g=e.padding)||void 0===g?void 0:g.left)||(0,Se.ok)(null===(p=e.padding)||void 0===p?void 0:p.right),paddingTopBottom:(0,Se.ok)(null===(x=e.padding)||void 0===x?void 0:x.top)||(0,Se.ok)(null===(A=e.padding)||void 0===A?void 0:A.bottom),borderRadiusAll:(0,Se.ok)(e.borderRadius.all),borderRadiusTopLeft:(0,Se.ok)(e.borderRadius.topLeft),borderRadiusBottomLeft:(0,Se.ok)(e.borderRadius.bottomLeft),borderRadiusTopRight:(0,Se.ok)(e.borderRadius.topRight),borderRadiusBottomRight:(0,Se.ok)(e.borderRadius.bottomRight),boxShadowInset:(0,Se.ok)(null===(j=e.boxShadow)||void 0===j?void 0:j.inset)||!1,boxShadowHOffset:(0,Se.ok)(null===(v=e.boxShadow)||void 0===v?void 0:v.hOffset),boxShadowVOffset:(0,Se.ok)(null===(S=e.boxShadow)||void 0===S?void 0:S.vOffset),boxShadowBlurRadius:(0,Se.ok)(null===(B=e.boxShadow)||void 0===B?void 0:B.blurRadius),boxShadowSpreadRadius:(0,Se.ok)(null===(y=e.boxShadow)||void 0===y?void 0:y.spreadRadius),boxShadowColor:(0,Se.ok)(null===(w=e.boxShadow)||void 0===w?void 0:w.color),mobileWidth:(0,Se.xc)(null===(k=e.mobileWidth)||void 0===k?void 0:k.value),mobileWidthDim:null===(P=e.mobileWidth)||void 0===P?void 0:P.dim,mobileHeight:(0,Se.xc)(null===(N=e.mobileHeight)||void 0===N?void 0:N.value),mobileHeightDim:null===(T=e.mobileHeight)||void 0===T?void 0:T.dim,mobileBorderPosition:ge||"all",mobileBorderWidth:null!==(null===(E=ce[ge])||void 0===E?void 0:E.width)?null===(C=ce[ge])||void 0===C?void 0:C.width:"",mobileBorderColor:(null===(L=ce[ge])||void 0===L?void 0:L.color)||"",mobileBorderStyle:(null===(O=ce[ge])||void 0===O?void 0:O.style)||"",mobileBorderRadiusAll:(0,Se.ok)(e.mobileBorderRadius.all),mobileRadiusTopLeft:(0,Se.ok)(null!==e.mobileBorderRadius.topLeft?e.mobileBorderRadius.topLeft:e.mobileBorderRadius.all),mobileRadiusBottomLeft:(0,Se.ok)(null!==e.mobileBorderRadius.bottomLeft?e.mobileBorderRadius.bottomLeft:e.mobileBorderRadius.all),mobileRadiusTopRight:(0,Se.ok)(null!==e.mobileBorderRadius.topRight?e.mobileBorderRadius.topRight:e.mobileBorderRadius.all),mobileRadiusBottomRight:(0,Se.ok)(null!==e.mobileBorderRadius.bottomRight?e.mobileBorderRadius.bottomRight:e.mobileBorderRadius.all),mobileBoxShadowInset:(0,Se.ok)(null===(D=e.mobileBoxShadow)||void 0===D?void 0:D.inset)||!1,mobileBoxShadowHOffset:(0,Se.ok)(null===(F=e.mobileBoxShadow)||void 0===F?void 0:F.hOffset),mobileBoxShadowVOffset:(0,Se.ok)(null===(V=e.mobileBoxShadow)||void 0===V?void 0:V.vOffset),mobileBoxShadowBlurRadius:(0,Se.ok)(null===(M=e.mobileBoxShadow)||void 0===M?void 0:M.blurRadius),mobileBoxShadowSpreadRadius:(0,Se.ok)(null===(W=e.mobileBoxShadow)||void 0===W?void 0:W.spreadRadius),mobileBoxShadowColor:(0,Se.ok)(null===(H=e.mobileBoxShadow)||void 0===H?void 0:H.color),mobileAlign:(0,Se.ok)(null===(X=e.mobileAlign)||void 0===X?void 0:X.value),mobileVerticalAlign:(0,Se.ok)(null===(z=e.mobileVerticalAlign)||void 0===z?void 0:z.value),mobileDirection:(0,Se.ok)(null===(G=e.mobileDirection)||void 0===G?void 0:G.value),mobileBackgroundColor:(0,Se.ok)("none"!==(null===(U=e.mobileBackgroundColor)||void 0===U?void 0:U.value)?null===(Y=e.mobileBackgroundColor)||void 0===Y?void 0:Y.value:""),mobileBackgroundImage:"none"!==e.mobileBackgroundImage[0].value?e.mobileBackgroundImage[0].value:"",mobileBackgroundPositionX:(0,Se.ok)(null===(q=e.mobileBackgroundPositionX)||void 0===q?void 0:q.value),mobileBackgroundPositionY:(0,Se.ok)(null===(K=e.mobileBackgroundPositionY)||void 0===K?void 0:K.value),mobileBackgroundRepeat:null!==($=e.mobileBackgroundRepeat)&&void 0!==$&&$.value?null===(J=e.mobileBackgroundRepeat)||void 0===J?void 0:J.value:"none",mobilePaddingTop:(0,Se.ok)(e.mobilePadding.all)||(0,Se.ok)(e.mobilePadding.top),mobilePaddingLeft:(0,Se.ok)(e.mobilePadding.all)||(0,Se.ok)(e.mobilePadding.left),mobilePaddingRight:(0,Se.ok)(e.mobilePadding.all)||(0,Se.ok)(e.mobilePadding.right),mobilePaddingBottom:(0,Se.ok)(e.mobilePadding.all)||(0,Se.ok)(e.mobilePadding.bottom),mobilePaddingTopBottom:(0,Se.ok)(e.mobilePadding.top)||(0,Se.ok)(e.mobilePadding.bottom),mobilePaddingLeftRight:(0,Se.ok)(e.mobilePadding.left)||(0,Se.ok)(e.mobilePadding.right),exportAsPicture:null===e||void 0===e?void 0:e.exportAsPicture}),!(0,Se.ok)(e.borderRadius.all)&&((0,Se.ok)(e.borderRadius.topLeft)||(0,Se.ok)(e.borderRadius.bottomLeft)||(0,Se.ok)(e.borderRadius.topRight)||(0,Se.ok)(e.borderRadius.bottomRight))?f(!1):f(!0),!(0,Se.ok)(e.mobileBorderRadius.all)&&((0,Se.ok)(e.mobileBorderRadius.topLeft)||(0,Se.ok)(e.mobileBorderRadius.bottomLeft)||(0,Se.ok)(e.mobileBorderRadius.topRight)||(0,Se.ok)(e.mobileBorderRadius.bottomRight))?I(!1):I(!0),Z(""===e.backgroundImage[0].value),(0,Se.ok)(e.padding.all)||!((0,Se.ok)(e.padding.top)||(0,Se.ok)(e.padding.right)||(0,Se.ok)(e.padding.bottom)||(0,Se.ok)(e.padding.left))||e.padding.top===e.padding.bottom&&e.padding.right===e.padding.left?re(!0):re(!1),(0,Se.ok)(e.mobilePadding.all)||!((0,Se.ok)(e.mobilePadding.top)||(0,Se.ok)(e.mobilePadding.right)||(0,Se.ok)(e.mobilePadding.bottom)||(0,Se.ok)(e.mobilePadding.left))||e.mobilePadding.top===e.mobilePadding.bottom&&e.mobilePadding.right===e.mobilePadding.left?de(!0):de(!1),me(!(null===(Q=ae[he])||void 0===Q||!Q.width)),be(!(null===(ee=ce[ge])||void 0===ee||!ee.width)),pe(!!e.borderRadius.all||!!e.borderRadius.topLeft||!!e.borderRadius.bottomLeft||!!e.borderRadius.topRight||!!e.borderRadius.bottomRight),fe(!!e.mobileBorderRadius.all||!!e.mobileBorderRadius.topLeft||!!e.mobileBorderRadius.bottomLeft||!!e.mobileBorderRadius.topRight||!!e.mobileBorderRadius.bottomRight),_e(!!e.boxShadow),ye(!!e.mobileBoxShadow.blurRadius||!!e.mobileBoxShadow.color||!!e.mobileBoxShadow.hOffset||!!e.mobileBoxShadow.inset||!!e.mobileBoxShadow.spreadRadius||!!e.mobileBoxShadow.vOffset),ke(!!e.width.value||!!e.height.value||!!e.minWidth.value||!!e.maxWidth.value),Pe(!!e.mobileWidth.value||!!e.mobileHeight.value),Ee(!!e.backgroundColor||!!e.backgroundImage[0].value||!!e.backgroundPositionY||!!e.backgroundPositionX||"repeat"!==e.backgroundRepeat||!e.backgroundRepeat),Oe(!!e.mobileBackgroundColor.value),Fe(!!e.exportAsPicture),Me(!(null===(te=e.padding)||void 0===te||!te.all)||!(null===(oe=e.padding)||void 0===oe||!oe.top)||!(null===(ie=e.padding)||void 0===ie||!ie.bottom)||!(null===(le=e.padding)||void 0===le||!le.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)}}),[l,e]);return(0,Y.jsxs)(u.A,{form:l,layout:"vertical",name:"selected_div_form",initialValues:{backgroundColor:"",backgroundImage:"",backgroundPositionX:"",backgroundPositionY:"",backgroundRepeat:"",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 i=l.getFieldsValue(!0),r=Object.keys(t)[0];let a;switch(ze("%"===l.getFieldsValue(!0).widthDim?100:""),r){case"exportAsPicture":a={exportAsPicture:i.exportAsPicture};break;case"boxShadowInset":case"boxShadowHOffset":case"boxShadowVOffset":case"boxShadowBlurRadius":case"boxShadowSpreadRadius":case"boxShadowColor":a={boxShadow:{hOffset:i.boxShadowHOffset,vOffset:i.boxShadowVOffset,blurRadius:i.boxShadowBlurRadius,spreadRadius:i.boxShadowSpreadRadius,color:i.boxShadowColor,inset:i.boxShadowInset}};break;case"borderStyle":a={border:{[i.borderPosition]:{...s[i.borderPosition],style:t[r]}}},"all"===i.borderPosition?d((e=>({...G.iV,[i.borderPosition]:{...e[i.borderPosition],style:t[r]}}))):d((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],style:t[r]}})));break;case"borderColor":a={border:{[i.borderPosition]:{...s[i.borderPosition],color:t[r]}}},"all"===i.borderPosition?d((e=>({...G.iV,[i.borderPosition]:{...e[i.borderPosition],color:t[r]}}))):d((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],color:t[r]}})));break;case"borderWidth":a={border:{[i.borderPosition]:{...s[i.borderPosition],width:t[r]}}},"all"===i.borderPosition?d((e=>({...G.iV,[i.borderPosition]:{...e[i.borderPosition],width:t[r]}}))):d((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],width:t[r]}})));break;case"borderPosition":l.setFieldsValue({borderWidth:s[t[r]].width||"",borderColor:s[t[r]].color||"",borderStyle:s[t[r]].style||""});break;case"width":a={[r]:{value:t[r],dim:i.widthDim}};break;case"height":a={[r]:{value:t[r],dim:i.heightDim}};break;case"widthDim":a={width:{value:i.width,dim:t[r]}};break;case"heightDim":a={height:{value:i.height,dim:t[r]}};break;case"maxWidth":a={[r]:{value:t[r],dim:i.maxWidthDim}};break;case"maxWidthDim":a={maxWidth:{value:i.maxWidth,dim:t[r]}};break;case"minWidth":a={[r]:{value:t[r],dim:i.minWidthDim}};break;case"minWidthDim":a={minWidth:{value:i.minWidth,dim:t[r]}};break;case"backgroundImage":Z(""===t[r]),a={[r]:[{...e.backgroundImage[0],value:t[r]}]};break;case"paddingTop":case"paddingLeft":case"paddingRight":case"paddingBottom":a={padding:{[Se.yy[r]]:+t[r]}};break;case"paddingTopBottom":a={padding:{top:+t[r],bottom:+t[r]}},i.paddingTop=i.paddingBottom=+t[r];break;case"paddingLeftRight":a={padding:{left:+t[r],right:+t[r]}},i.paddingLeft=i.paddingRight=+t[r];break;case"borderRadiusAll":case"borderRadiusTopLeft":case"borderRadiusBottomLeft":case"borderRadiusTopRight":case"borderRadiusBottomRight":a={borderRadius:{[G.wF[r]]:+t[r]}};break;case"mobileWidth":a={[r]:{classNamePrefix:"em-mob-width-",value:t[r],dim:i.mobileWidthDim}};break;case"mobileWidthDim":a={mobileWidth:{classNamePrefix:"em-mob-width-",value:i.mobileWidth,dim:t[r]}};break;case"mobileHeight":a={[r]:{classNamePrefix:"em-mob-height-",value:t[r],dim:i.mobileHeightDim}};break;case"mobileHeightDim":a={mobileHeight:{classNamePrefix:"em-mob-height-",value:i.mobileHeight,dim:t[r]}};break;case"mobileBorderStyle":a={mobileBorder:{[i.mobileBorderPosition]:{...j[i.mobileBorderPosition],style:t[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?_((e=>({...G.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],style:t[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):_((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],style:t[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderColor":a={mobileBorder:{[i.mobileBorderPosition]:{...j[i.mobileBorderPosition],color:t[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?_((e=>({...G.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],color:t[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):_((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],color:t[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderWidth":a={mobileBorder:{[i.mobileBorderPosition]:{...j[i.mobileBorderPosition],width:t[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?_((e=>({...G.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],width:t[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):_((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],width:t[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderPosition":l.setFieldsValue({mobileBorderWidth:j[t[r]].width||"",mobileBorderColor:j[t[r]].color||"",mobileBorderStyle:j[t[r]].style||""});break;case"mobileBorderRadiusAll":case"mobileRadiusTopLeft":case"mobileRadiusBottomLeft":case"mobileRadiusTopRight":case"mobileRadiusBottomRight":a={mobileBorderRadius:{[Se.NW[r]]:t[r],classNamePrefix:"em-mob-border_radius_"+Se.NW[r]+"-"}};break;case"mobileBoxShadowInset":case"mobileBoxShadowHOffset":case"mobileBoxShadowVOffset":case"mobileBoxShadowBlurRadius":case"mobileBoxShadowSpreadRadius":case"mobileBoxShadowColor":a={mobileBoxShadow:{hOffset:i.mobileBoxShadowHOffset,vOffset:i.mobileBoxShadowVOffset,blurRadius:i.mobileBoxShadowBlurRadius,spreadRadius:i.mobileBoxShadowSpreadRadius,color:i.mobileBoxShadowColor,inset:i.mobileBoxShadowInset,classNamePrefix:"em-mob-box_shadow-"}};break;case"mobileAlign":a={[r]:{classNamePrefix:"em-mob-text_align-",value:t[r]}};break;case"mobileVerticalAlign":a={[r]:{classNamePrefix:"em-mob-vertical_align-",value:t[r]}};break;case"mobileBackgroundColor":a={[r]:{classNamePrefix:"em-mob-background_color-",value:t[r]}};break;case"mobileBackgroundImage":a={[r]:[{...e.mobileBackgroundImage[0],classNamePrefix:"em-mob-background_image-",value:t[r]}]};break;case"mobileBackgroundPositionX":a={[r]:{classNamePrefix:"em-mob-background_position_x-",value:t[r]}};break;case"mobileBackgroundPositionY":a={[r]:{classNamePrefix:"em-mob-background_position_x-",value:t[r]}};break;case"mobileBackgroundRepeat":a={[r]:{classNamePrefix:"em-mob-background_repeat-",value:t[r]}};break;case"mobilePaddingTop":case"mobilePaddingLeft":case"mobilePaddingRight":case"mobilePaddingBottom":a={mobilePadding:{all:null,top:""!==i.mobilePaddingTop?i.mobilePaddingTop:null,right:""!==i.mobilePaddingRight?i.mobilePaddingRight:null,bottom:""!==i.mobilePaddingBottom?i.mobilePaddingBottom:null,left:""!==i.mobilePaddingLeft?i.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;case"mobilePaddingTopBottom":i.mobilePaddingTop=i.mobilePaddingBottom=t[r],a={mobilePadding:{all:null,top:""!==i.mobilePaddingTop?i.mobilePaddingTop:null,right:""!==i.mobilePaddingRight?i.mobilePaddingRight:null,bottom:""!==i.mobilePaddingBottom?i.mobilePaddingBottom:null,left:""!==i.mobilePaddingLeft?i.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;case"mobilePaddingLeftRight":i.mobilePaddingLeft=i.mobilePaddingRight=t[r],a={mobilePadding:{all:null,top:""!==i.mobilePaddingTop?i.mobilePaddingTop:null,right:""!==i.mobilePaddingRight?i.mobilePaddingRight:null,bottom:""!==i.mobilePaddingBottom?i.mobilePaddingBottom:null,left:""!==i.mobilePaddingLeft?i.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;case"mobileDirection":a={[r]:{classNamePrefix:"em-mob-direction-",value:t[r]}};break;default:a=t}"borderPosition"!==r&&o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:a})},autoComplete:"off",className:"element-controls",children:[!le&&(0,Y.jsx)(h.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",children:(0,Y.jsx)(b.A,{className:"selected_form-mobile-props-title",message:t("Appearance on mobile devices"),type:"info"})}),W===G.ND&&H.styles?(0,Y.jsx)("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",children:(0,Y.jsxs)("div",{className:"selected_form-mobile-props-wrapper",children:[(0,Y.jsxs)(g.A,{gutter:20,style:{paddingBottom:4},children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(Te.A,{form:l,elementSettings:e,imgParent:!0})}),(0,Y.jsx)(p.A,{span:12,style:{textAlign:"right"},children:(0,Y.jsx)(q,{form:l,elementSettings:e})})]}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),$.formCellFieldPaddingsEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Padding")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{He((e=>!e)),We&&(t.mobilePaddingLeftRight="",t.mobilePaddingLeft="",t.mobilePaddingRight="",t.mobilePaddingTopBottom="",t.mobilePaddingTop="",t.mobilePaddingBottom="",o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobilePadding:{all:null,top:null,right:null,bottom:null,left:null,classNamePrefix:"em-mob-padding_"}}}))}))},children:We?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),We&&(0,Y.jsx)(g.A,{gutter:10,style:{paddingBottom:4},children:(0,Y.jsx)(Y.Fragment,{children:(0,Y.jsx)(Ye.A,{form:l,elementSettings:e,mobilePaddingsExt:ae,setMobilePaddingsExt:de})})})]}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Size")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{setTimeout((()=>{Pe((e=>!e))}))},children:Re?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),Re&&(0,Y.jsxs)(g.A,{gutter:10,style:{paddingBottom:8},children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)("div",{style:{marginBottom:2*ee.formItemMarginBottomXS},children:(0,Y.jsx)(O.A,{form:l,name:"mobileWidth",elementSettings:e})})}),(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)("div",{style:{marginBottom:ee.formItemMarginBottomXS},children:(0,Y.jsx)(D.A,{form:l,name:"mobileHeight",elementSettings:e})})})]}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Background")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{Oe((e=>!e)),t.mobileBackgroundColor=Le?"":"#E5E5E5",o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBackgroundColor:{classNamePrefix:"em-mob-background_color-",value:t.mobileBackgroundColor}}})}))},children:Le?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),Le&&(0,Y.jsx)("div",{style:{marginBottom:($.formDivFieldBackgroundImageEnabled,ee.formItemMarginBottomMD+4)},children:(0,Y.jsx)(Ie.A,{form:l,elementSettings:e,label:t("Background color")})}),!1,$.formFieldBorderEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Borders")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{be((e=>!e)),ce&&(t.mobileBorderWidth=null,t.mobileBorderColor="",t.mobileBorderStyle=""),_((e=>({...G.iV,[t.mobileBorderPosition]:{...e[t.mobileBorderPosition],width:t.mobileBorderWidth,color:t.mobileBorderColor,style:t.mobileBorderStyle}}))),o({operation:G.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+"-"}}}})}))},children:ce?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),ce&&(0,Y.jsx)("div",{style:{paddingBottom:4},children:(0,Y.jsx)(F.A,{mobileBorders:j})})]}),$.formFieldBorderRadiusEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Border radius")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{fe((e=>!e)),t.mobileBorderRadiusAll=Ae?null:5,o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorderRadius:{all:t.mobileBorderRadiusAll,classNamePrefix:"em-mob-border_radius_all-"}}})}))},children:Ae?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),Ae&&(0,Y.jsx)("div",{style:{paddingBottom:4},children:(0,Y.jsx)(V.A,{form:l,oneMobileBorderRadiusValue:P,setOneMobileBorderRadiusValue:I})})]}),$.formFieldBoxShadowEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Box shadow")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{ye((e=>!e)),Be?(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:G.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-"}}})}))},children:Be?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),Be&&(0,Y.jsx)("div",{style:{paddingBottom:4},children:(0,Y.jsx)(M.A,{mobileBoxShadow:k,form:l,elementSettings:e})})]}),$.formFieldVisibilityEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsx)("div",{className:"form-group-title",children:t("Display control & Direction")}),(0,Y.jsxs)(g.A,{gutter:20,style:{paddingBottom:4},children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(K.A,{elementSettings:e,form:l})}),(0,Y.jsx)(p.A,{span:12,style:{textAlign:"right"},children:(0,Y.jsx)(Ke,{elementSettings:e,form:l})})]})]}),$.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsx)("div",{className:"form-group-title",children:t("Amp visibility")}),(0,Y.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(ue.A,{})})})]})]})}):(0,Y.jsxs)("div",{id:"selected_element_form_desktop_props",children:[(0,Y.jsx)(b.A,{className:"selected_form-desktop-props-title",message:t("Appearance on mobile devices"),type:"info"}),(0,Y.jsxs)("div",{className:"selected_form-props-wrapper",children:[(0,Y.jsxs)(g.A,{gutter:20,style:{marginBottom:4},children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(Ue.A,{form:l,elementSettings:e})}),(0,Y.jsx)(p.A,{span:12,style:{textAlign:"right"},children:(0,Y.jsx)(C.A,{form:l,elementSettings:e})})]}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),$.formCellFieldPaddingsEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Padding")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{Me((e=>!e)),Ve&&(t.paddingLeftRight="",t.paddingLeft="",t.paddingRight="",t.paddingTopBottom="",t.paddingTop="",t.paddingBottom="",o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{padding:{all:0}}}))}))},children:Ve?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),Ve&&(0,Y.jsx)(g.A,{gutter:10,style:{marginBottom:4},children:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(p.A,{span:10,style:{width:156,flex:"auto",maxWidth:"none"},children:[(0,Y.jsx)("div",{className:"padding-collapsed",style:{display:se?"block":"none"},children:(0,Y.jsx)(h.A,{title:t("Horizontal padding"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"paddingLeftRight",children:(0,Y.jsx)(he.A,{min:0,placeholder:t("Horizontal"),prefix:(0,Y.jsx)(z.A,{icon:"PaddingLeftRight"}),addonAfter:"px"})})})}),(0,Y.jsxs)("div",{className:"padding-extended",style:{display:se?"none":"block"},children:[(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Left padding"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"paddingLeft",style:{marginBottom:ee.formItemMarginBottomXS},children:(0,Y.jsx)(he.A,{min:0,placeholder:t("Left"),prefix:(0,Y.jsx)(z.A,{icon:"PaddingLeft"}),addonAfter:"px"})})}),(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Right padding"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"paddingRight",children:(0,Y.jsx)(he.A,{min:0,placeholder:t("Right"),prefix:(0,Y.jsx)(z.A,{icon:"PaddingRight"}),addonAfter:"px"})})})]})]}),(0,Y.jsxs)(p.A,{span:10,style:{width:156,flex:"auto",maxWidth:"none"},children:[(0,Y.jsx)("div",{className:"padding-collapsed",style:{display:se?"block":"none"},children:(0,Y.jsx)(h.A,{title:t("Vertical padding"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"paddingTopBottom",children:(0,Y.jsx)(he.A,{min:0,placeholder:t("Vertical"),prefix:(0,Y.jsx)(z.A,{icon:"PaddingTopBottom"}),addonAfter:"px"})})})}),(0,Y.jsxs)("div",{className:"padding-extended",style:{display:se?"none":"block"},children:[(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Top padding"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"paddingTop",style:{marginBottom:ee.formItemMarginBottomXS},children:(0,Y.jsx)(he.A,{min:0,placeholder:t("Top"),prefix:(0,Y.jsx)(z.A,{icon:"PaddingTop"}),addonAfter:"px"})})}),(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Bottom padding"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"paddingBottom",children:(0,Y.jsx)(he.A,{min:0,placeholder:t("Bottom"),prefix:(0,Y.jsx)(z.A,{icon:"PaddingBottom"}),addonAfter:"px"})})})]})]}),(0,Y.jsx)(p.A,{span:4,style:{width:45,flex:"auto",maxWidth:"none"},children:(0,Y.jsx)(h.A,{title:t("Individual padding"),placement:"bottom",children:(0,Y.jsx)(A.Ay,{className:r()("selected-td-form__button",{"selected-td-form__button--active":!se}),onClick:()=>{re((e=>!e));const t=l.getFieldsValue(!0);se||(t.paddingLeftRight=t.paddingLeft,t.paddingTopBottom=t.paddingTop,t.paddingRight=t.paddingLeft,t.paddingBottom=t.paddingTop,o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{padding:{top:t.paddingTopBottom,bottom:t.paddingTopBottom,left:t.paddingLeftRight,right:t.paddingLeftRight}}}))},children:(0,Y.jsx)(z.A,{icon:"PaddingSwitcher"})})})})]})})]}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Size")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{setTimeout((()=>{ke((e=>!e))}))},children:we?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),we&&(0,Y.jsxs)(g.A,{gutter:10,style:{marginBottom:4},children:[(0,Y.jsxs)(p.A,{span:12,children:[(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Width"),placement:"bottom",children:(0,Y.jsxs)(u.A.Item,{name:"width",className:"form-item-margin-xs",children:[" ",(0,Y.jsx)(he.A,{min:0,max:Xe,placeholder:t("Width"),prefix:(0,Y.jsx)(S.A,{}),addonAfter:(0,Y.jsx)(u.A.Item,{name:"widthDim",noStyle:!0,children:tt})})]})}),(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Height"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"height",children:(0,Y.jsx)(he.A,{min:0,placeholder:t("Height"),prefix:(0,Y.jsx)(B.A,{}),addonAfter:"px"})})})]}),(0,Y.jsxs)(p.A,{span:12,children:[(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Minimum width"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"minWidth",className:"form-item-margin-xs",children:(0,Y.jsx)(he.A,{min:0,placeholder:t("Min width"),prefix:(0,Y.jsx)(z.A,{icon:"MinWidth"}),addonAfter:(0,Y.jsx)(u.A.Item,{name:"minWidthDim",noStyle:!0,children:tt})})})}),(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Maximum width"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"maxWidth",className:"form-item-margin-xs",children:(0,Y.jsx)(he.A,{min:0,placeholder:t("Max width"),prefix:(0,Y.jsx)(z.A,{icon:"MaxWidth"}),addonAfter:(0,Y.jsx)(u.A.Item,{name:"maxWidthDim",noStyle:!0,children:tt})})})})]})]}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Background")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{Ee((e=>!e)),t.backgroundColor=Ne?"":"#E5E5E5",o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{backgroundColor:t.backgroundColor}})}))},children:Ne?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),Ne&&(0,Y.jsxs)(g.A,{gutter:10,style:{marginBottom:Q?16:0},children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Background color"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,Y.jsx)(u.A.Item,{name:"backgroundColor",style:{marginBottom:$.formDivFieldBackgroundImageEnabled?ee.formItemMarginBottomXS:ee.formItemMarginBottomMD+4},children:(0,Y.jsx)(ie.A,{placeholder:t("Background color"),usedColors:e.usedColors})})})}),$.formDivFieldBackgroundImageEnabled&&(0,Y.jsxs)(p.A,{span:Q?12:24,children:[(0,Y.jsx)("div",{style:{paddingBottom:Q?4:0},children:(0,Y.jsx)(N.A,{form:l,label:t("Background image"),name:"backgroundImage",tooltipTitle:t("Background image"),placeholder:"Background image link/route"})}),!Q&&(0,Y.jsxs)(u.A.Item,{style:{marginBottom:"0"},children:[(0,Y.jsxs)(g.A,{gutter:10,children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Horizontal position"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"backgroundPositionX",style:{marginBottom:ee.formItemMarginBottomXS},children:(0,Y.jsx)(v.A,{placeholder:t("Horizontal position"),prefix:(0,Y.jsx)(z.A,{icon:"BgPositionHorizontal"})})})})}),(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Vertical position"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"backgroundPositionY",style:{marginBottom:ee.formItemMarginBottomXS},children:(0,Y.jsx)(v.A,{placeholder:t("Vertical position"),prefix:(0,Y.jsx)(z.A,{icon:"BgPositionVertical"})})})})})]}),(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Background image repeat"),placement:"left",children:(0,Y.jsx)(u.A.Item,{name:"backgroundRepeat",style:{marginBottom:ee.formItemMarginBottomMD+4},children:(0,Y.jsx)(J.A,{placeholder:t("Please choose"),options:qe,getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")})})})]})]})]}),$.formFieldBorderEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Borders")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{me((e=>!e)),ne&&(t.borderWidth=null,t.borderColor="",t.borderStyle=""),d((e=>({...G.iV,[t.borderPosition]:{...e[t.borderPosition],width:t.borderWidth,color:t.borderColor,style:t.borderStyle}}))),o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{border:{all:{color:t.borderColor,style:t.borderStyle,width:t.borderWidth}}}})}))},children:ne?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),ne&&(0,Y.jsx)("div",{style:{paddingBottom:4},children:(0,Y.jsx)(T.A,{borders:s})})]}),$.formFieldBorderRadiusEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Border radius")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{pe((e=>!e)),t.borderRadiusAll=ge?0:5,o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{borderRadius:{all:t.borderRadiusAll}}})}))},children:ge?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),ge&&(0,Y.jsx)("div",{style:{paddingBottom:4},children:(0,Y.jsx)(E.A,{form:l,oneBorderRadiusValue:c,setOneBorderRadiusValue:f,elementSettings:e})})]}),$.formFieldBoxShadowEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Box shadow")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{_e((e=>!e)),ve?(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:G.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}}})}))},children:ve?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),ve&&(0,Y.jsx)("div",{style:{paddingBottom:4},children:(0,Y.jsx)(L.A,{boxShadow:n})})]}),$.formFieldExportAsPictureEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Export settings")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const t=l.getFieldsValue(!0);setTimeout((()=>{Fe((e=>!e)),De&&(t.exportAsPicture=!1,o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{exportAsPicture:!1}}))}))},children:De?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),De&&(0,Y.jsx)(Ce,{form:l,elementSettings:e})]}),$.formFieldVisibilityEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsx)("div",{className:"form-group-title",children:t("Display control & Direction")}),(0,Y.jsxs)(g.A,{gutter:20,style:{paddingBottom:4},children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(K.A,{elementSettings:e,form:l})}),(0,Y.jsx)(p.A,{span:12,style:{textAlign:"right"},children:(0,Y.jsx)(Ge,{elementSettings:e,form:l})})]})]}),$.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsx)("div",{className:"form-group-title",children:t("Amp visibility")}),(0,Y.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(ue.A,{})})})]})]})]})]})};var lt=o(28777);const{Option:st}=J.A,rt=(0,Y.jsxs)(J.A,{className:"select-after",getPopupContainer:e=>e.parentNode,children:[(0,Y.jsx)(st,{value:"px",children:"px"}),(0,Y.jsx)(st,{value:"%",children:"%"})]}),at=(0,Y.jsx)(J.A,{className:"select-after",getPopupContainer:e=>e.parentNode,children:(0,Y.jsx)(st,{value:"px",children:"px"})});let dt=0;const nt=({elementSettings:e})=>{const{__:t}=(0,X.s9)(),o=(0,U.XW)(),[l]=u.A.useForm(),s=(0,a.d4)(xe.Ct),r=(0,a.d4)(xe.CS),d=(0,a.d4)(xe.Fv),n=(0,a.d4)(xe.yy),m=(0,je.rD)(),c=d&&"bottom"!==n;(0,i.useEffect)((()=>{const t=e=>e&&"auto"!==e?e:0===e?"0":"";var o,i,s,r,a,d,n,m,c,u,h,b,g,p;e&&(l.setFieldsValue({...e,width:null===(o=e.width)||void 0===o?void 0:o.value,widthDim:null===(i=e.width)||void 0===i?void 0:i.dim,gap:null===(s=e.gap)||void 0===s?void 0:s.value,gapDim:null===(r=e.gap)||void 0===r?void 0:r.dim,maxWidth:null===(a=e.maxWidth)||void 0===a?void 0:a.value,maxWidthDim:null===(d=e.maxWidth)||void 0===d?void 0:d.dim,minWidth:null===(n=e.minWidth)||void 0===n?void 0:n.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===(h=e.mobileContentWidth)||void 0===h?void 0:h.value),mobileContentWidthDim:null===(b=e.mobileContentWidth)||void 0===b?void 0:b.dim,mobileVerticalAlign:(p=null===(g=e.mobileVerticalAlign)||void 0===g?void 0:g.value,p||(0===p?"0":""))}),dt=e.width.value+e.gap.value)}),[l,e]);return(0,Y.jsxs)(u.A,{form:l,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 i=l.getFieldsValue(!0),s=Object.keys(t)[0];let r;switch(s){case"width":dt=t[s]+i.gap,r={[s]:{value:t[s],dim:i.widthDim},gap:{value:i.gap}};break;case"widthDim":r={width:{value:i.width,dim:t[s]},gap:{value:i.gap}};break;case"gap":i.width=dt-t[s],r={[s]:{value:t[s],dim:"px"}};break;case"mobileWidth":r={[s]:{classNamePrefix:"em-mob-width-",value:t[s],dim:i.mobileWidthDim}};break;case"mobileWidthDim":r={mobileWidth:{classNamePrefix:"em-mob-width-",value:i.mobileWidth,dim:t[s]}};break;case"mobileContentWidth":r={[s]:{classNamePrefix:"em-mob-width-",value:t[s],dim:i.mobileContentWidthDim}};break;case"mobileContentWidthDim":r={mobileContentWidth:{classNamePrefix:"em-mob-width-",value:i.mobileContentWidth,dim:t[s]}};break;case"mobileVerticalAlign":r={[s]:{classNamePrefix:"em-mob-vertical_align-",value:t[s]}};break;default:r=t}o({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:r})},autoComplete:"off",className:"element-controls",children:[c&&(0,Y.jsx)(h.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",children:(0,Y.jsx)(b.A,{className:"selected_form-mobile-props-title",message:t("Appearance on mobile devices"),type:"info"})}),s===G.ND&&r.styles?(0,Y.jsxs)("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",style:{display:s===G.ND&&r.styles?"block":"none"},children:[(0,Y.jsx)(h.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",children:(0,Y.jsx)(b.A,{className:"selected_form-mobile-props-title",message:t("Appearance on mobile devices"),type:"info"})}),(0,Y.jsxs)("div",{className:"selected_form-mobile-props-wrapper",children:[(0,Y.jsxs)(g.A,{gutter:10,style:{marginBottom:20},children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(O.A,{form:l,name:"mobileWidth",elementSettings:e})}),(0,Y.jsx)(p.A,{span:12})]}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsx)("div",{className:"form-group-title",children:t("Alignments")}),(0,Y.jsx)(q,{form:l,elementSettings:e}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsx)("div",{className:"form-group-title",children:t("Display control")}),(0,Y.jsx)(K.A,{elementSettings:e,form:l}),m.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)("div",{className:"form-group-title",children:t("Amp visibility")}),(0,Y.jsx)(ue.A,{})]})]})]}):(0,Y.jsx)("div",{id:"selected_element_form_desktop_props",children:(0,Y.jsxs)("div",{className:"selected_form-props-wrapper",children:[(0,Y.jsx)(u.A.Item,{style:{marginBottom:"0"},children:(0,Y.jsxs)(g.A,{gutter:10,children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Float block width"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"width",children:(0,Y.jsx)(Z.A,{min:0,placeholder:t("Float block width"),prefix:(0,Y.jsx)(S.A,{}),addonAfter:(0,Y.jsx)(u.A.Item,{name:"widthDim",noStyle:!0,children:rt})})})})}),(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Column gap"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"gap",children:(0,Y.jsx)(Z.A,{min:0,placeholder:t("Column gap"),prefix:(0,Y.jsx)(lt.A,{}),addonAfter:(0,Y.jsx)(u.A.Item,{name:"widthDim",noStyle:!0,children:at})})})})})]})}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsx)("div",{className:"form-group-title",children:t("Vertical alignment")}),(0,Y.jsx)(C.A,{form:l,elementSettings:e}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsx)("div",{className:"form-group-title",children:t("Display control")}),(0,Y.jsx)(K.A,{elementSettings:e,form:l}),m.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)("div",{className:"form-group-title",children:t("Amp visibility")}),(0,Y.jsx)(ue.A,{})]})]})})]})};var mt=o(79907),ct=o(28372);const ut=({elementSettings:e})=>{const{__:t}=(0,X.s9)(),[o]=u.A.useForm(),{TextArea:l}=v.A,s=(0,U.XW)();(0,i.useEffect)((()=>{e&&o.setFieldsValue({...e})}),[o,e]);return(0,Y.jsx)(u.A,{form:o,layout:"vertical",name:"selected_variable_form",initialValues:{value:""},onValuesChange:t=>{s({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:t})},autoComplete:"off",children:(0,Y.jsx)("div",{className:"selected_form-props-wrapper",children:(0,Y.jsx)(u.A.Item,{label:t("Variable value"),name:"value",tooltip:{title:t("Type the output parameters of your platform. E.g., ")+"${Recipient.FirstName}",icon:(0,Y.jsx)(ct.A,{})},style:{marginBottom:35},children:(0,Y.jsx)(l,{rows:4,placeholder:t("Variable value")})})})})};var ht=o(9452);const{useToken:bt}=c.A,gt=({elementSettings:e,setElementSettings:t,postfix:o="",form:l,handleSelect:s})=>{const{__:a}=(0,X.s9)(),{token:d}=bt(),n=(0,je.rD)(),m=(0,U.XW)(),c="src"+o,b="title"+o,g="alt"+o,p="link"+o,x="imgReplacer"+o,f=(0,i.useRef)(null),S=(0,i.useRef)(null),B=(0,i.useRef)(null),y=(0,i.useRef)(null),w=(0,i.useRef)(null),k=(0,i.useRef)(null),R=(0,i.useRef)(null),P=(0,i.useRef)(null),[T,E]=(0,i.useState)(""),[I,C]=(0,i.useState)(""),[L,O]=(0,i.useState)(""),[D,F]=(0,i.useState)(!1),[V,M]=(0,i.useState)("https://");(0,i.useEffect)((()=>{var t,o,i;C(null===(t=e.images)||void 0===t?void 0:t[g]),O(null===(o=e.images)||void 0===o?void 0:o[b]),E(null===(i=e.images)||void 0===i?void 0:i[p])}),[e,g,b,p]);return(0,Y.jsxs)(Y.Fragment,{children:[("img"===e.type||"video"===e.type||"carousel"===e.type)&&(0,Y.jsx)(u.A.Item,{style:{marginBottom:0},children:(0,Y.jsx)(N.A,{form:l,label:a("Image path"),name:c,placeholder:a("Image path"),elementSettings:e,tooltipTitle:""})}),(0,Y.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[(0,Y.jsxs)(j.A,{size:8,style:{marginBottom:I||T||L||D?d.formItemMarginBottomXS:d.formItemMarginBottomMD+4},children:[(0,Y.jsx)(h.A,{title:I||a("Alternative text"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,Y.jsx)(A.Ay,{className:r()("selected-td-form__button",{"selected-td-form__button--active":!!I}),onClick:()=>{I?(C(""),l.setFieldValue("alt",""),m({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{[g]:""}})):(C(B.current&&B.current.input.value?B.current.input.value:"..."),setTimeout((()=>{B.current.focus()})))},ref:y,children:(0,Y.jsx)("span",{className:"addon-text-content",children:"Alt"})})}),n.formFieldImageTitleEnabled&&(0,Y.jsx)(h.A,{title:L||a("Tooltip text"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,Y.jsx)(A.Ay,{className:r()("selected-td-form__button",{"selected-td-form__button--active":!!L}),onClick:()=>{L?(O(!1),l.setFieldValue("title",""),m({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{[b]:""}})):(O(w.current&&w.current.input.value?w.current.input.value:"..."),setTimeout((()=>{w.current.focus()})))},ref:k,children:(0,Y.jsx)("span",{className:"addon-text-content",children:"Title"})})}),(0,Y.jsx)(h.A,{title:T||a("Hyperlink URL"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,Y.jsx)(A.Ay,{className:r()("selected-td-form__button",{"selected-td-form__button--active":!!T}),icon:(0,Y.jsx)(_.A,{className:"selected-td-form__icon-radius"}),onClick:()=>{T?(E(""),l.setFieldValue(p,""),m({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{[p]:""}})):(E(f.current&&f.current.input.value?f.current.input.value:"..."),setTimeout((()=>{f.current.focus()})))},ref:S})}),(0,Y.jsx)(h.A,{title:a("Image replacer"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,Y.jsx)(A.Ay,{className:r()("selected-td-form__button",{"selected-td-form__button--active":D}),icon:(0,Y.jsx)(z.A,{icon:"Replacer",className:"selected-td-form__icon-radius"}),onClick:()=>{F(!D),D?(l.setFieldValue(x,""),m({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{[x]:""}})):setTimeout((()=>R.current.focus()))},ref:P})})]}),(0,Y.jsx)(j.A,{size:8,children:(0,Y.jsx)(h.A,{title:a("Remove slide"),placement:"bottom",children:(0,Y.jsx)(A.Ay,{type:"text",onClick:i=>{var s;const r=l.getFieldsValue(!0),a=+o.substring(1),d=Object.keys(null===r||void 0===r?void 0:r.images).reduce(((e,t)=>(t.includes(o)||(e[t]=r[t]),e)),{}),n=null===(s=e.carouselImages)||void 0===s?void 0:s.filter(((e,t)=>t!==a));t((e=>({...e,settings:{...e.settings,carouselImages:n}}))),m({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:G.bV.CAROUSEL,caption:e.caption,settings:{...e,carouselImages:n}}),l.setFieldsValue({images:d})},icon:(0,Y.jsx)(ht.A,{})})})})]}),(!!T||!!I||!!L||!!D)&&(0,Y.jsxs)("div",{style:{marginBottom:d.formItemMarginBottomMD+4},children:[!!T&&(0,Y.jsx)(h.A,{trigger:["hover"],title:a("Hyperlink URL"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:p,className:"selected-image-form__alt",style:{marginBottom:d.formItemMarginBottomXS},children:(0,Y.jsx)(v.A,{addonBefore:(0,Y.jsx)(Se.Ai,{linkProtocol:V,handleLinkProtocolsChange:e=>{l.setFieldValue("LinkName","mergetag"!==e?e:""),M(e)},__:a}),placeholder:a("Hyperlink URL"),allowClear:!0,ref:f,onChange:e=>{""===e.target.value?E("..."):(S.current.classList.add("selected-td-form__button--active"),E(e.target.value));const t=e.target.value;"https://"===t.substring(0,8)?M("https://"):"mailto:"===t.substring(0,7)?M("mailto:"):"tel:"===t.substring(0,4)?M("tel:"):"sms:"===t.substring(0,4)?M("sms:"):"ftp://"===t.substring(0,6)?M("ftp://"):"skype:"===t.substring(0,6)?M("skype:"):"viber:"===t.substring(0,6)?M("viber:"):M("")},onSelect:s,prefix:(0,Y.jsx)(Se.RM,{linkProtocol:V})})})}),!!I&&(0,Y.jsx)(h.A,{trigger:["hover"],title:a("Alternative text"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:g,className:"selected-image-form__alt",style:{marginBottom:d.formItemMarginBottomXS},children:(0,Y.jsx)(v.A,{placeholder:a("Alternative text"),allowClear:!0,prefix:(0,Y.jsx)("span",{className:"addon-text-content",children:"Alt"}),onChange:e=>{""===e.target.value?C("..."):(y.current.classList.add("selected-td-form__button--active"),C(e.target.value))},ref:B,onSelect:s})})}),n.formFieldImageTitleEnabled&&!!L&&(0,Y.jsx)(h.A,{trigger:["hover"],title:a("Tooltip text"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:b,className:"selected-image-form__alt",style:{marginBottom:d.formItemMarginBottomXS},children:(0,Y.jsx)(v.A,{placeholder:a("Enter the title of the image"),allowClear:!0,prefix:(0,Y.jsx)("span",{className:"addon-text-content",children:"Title"}),onChange:e=>{""===e.target.value?O("..."):(k.current.classList.add("selected-td-form__button--active"),O(e.target.value))},ref:w,onSelect:s})})}),!!D&&(0,Y.jsx)(h.A,{trigger:["hover"],title:a("Image src"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:x,className:"selected-image-form__alt",style:{marginBottom:d.formItemMarginBottomXS},children:(0,Y.jsx)(v.A,{placeholder:a("\u0421ode that will replace the image `src`"),allowClear:!0,prefix:(0,Y.jsx)("span",{className:"addon-text-content",children:a("Image src")}),onChange:e=>{""!==e.target.value&&P.current.classList.add("selected-td-form__button--active")},ref:R,onSelect:s})})})]})]})},pt={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:xt}=c.A,At=({elementSettings:e})=>{const{__:t}=(0,X.s9)(),{token:o}=xt(),[l]=u.A.useForm();let s=(0,a.wA)();const r=(0,je.rD)(),d=(0,U.K9)(),n=(0,U.XW)(),m=(0,a.d4)(xe.Ct),c=(0,a.d4)(xe.CS),[b,_]=(0,i.useState)(!0),[S,B]=(0,i.useState)(!0),[k,R]=(0,i.useState)(!1),[P,N]=(0,i.useState)(!1),[T,I]=(0,i.useState)("https://"),[C,L]=(0,i.useState)(null===l||void 0===l?void 0:l.getFieldsValue(!0)),[O,D]=(0,i.useState)(e),[F,M]=(0,i.useState)(null),[W,H]=(0,i.useState)(),[q,K]=(0,i.useState)(!1),[$,J]=(0,i.useState)(!1),[Z,ee]=(0,i.useState)({start:0,end:0}),te=(0,i.useRef)(null);(0,i.useEffect)((()=>{D(e)}),[e]);const oe=(0,a.d4)(Be.GH);(0,i.useEffect)((()=>{var e;null!==oe&&void 0!==oe&&null!==(e=oe.items)&&void 0!==e&&e.length&&H((0,je.cM)(oe.items,t,((e,t)=>{K(!1),d(G.Ru.SANDBOX_ADD_MERGETAG,e),t.stopPropagation(),t.preventDefault()})))}),[oe,H,t,K,d]);(0,i.useEffect)((()=>{const e=({target:e})=>{e.closest('[id="merge_tags_wrapper"]')||M(e)},t=({target:e})=>{e.closest(".merge-tags")||e.closest("#merge_tags_button")||K(!1)};return window.addEventListener("focusin",e),window.addEventListener("click",t),()=>{window.removeEventListener("focusin",e),window.addEventListener("click",t)}}),[]);(0,i.useEffect)((()=>{const e=null===l||void 0===l?void 0:l.getFieldsValue(!0);L(e)}),[l]);const ie=({target:e})=>{if(e&&!$){const{selectionStart:t,selectionEnd:o}=e;ee({start:t,end:o})}J(!1)};(0,i.useEffect)((()=>{if(O.settings){var e,t,o,i,s,r,a,d,n,m,c,u,h,b,g,p,x,A,f;const j=O.settings,v=(0,Se.AO)(j);null===l||void 0===l||l.setFieldsValue(v),L(v),j.link&&I((0,Se.TW)(j.link,"https://")),!(0,Se.ok)(null===(e=j.borderRadius)||void 0===e?void 0:e.all)&&((0,Se.ok)(null===(t=j.borderRadius)||void 0===t?void 0:t.topLeft)||(0,Se.ok)(null===(o=j.borderRadius)||void 0===o?void 0:o.bottomLeft)||(0,Se.ok)(null===(i=j.borderRadius)||void 0===i?void 0:i.topRight)||(0,Se.ok)(null===(s=j.borderRadius)||void 0===s?void 0:s.bottomRight))?_(!1):_(!0),(0,Se.ok)(null===(r=j.mobileBorderRadius)||void 0===r?void 0:r.topLeft)||(0,Se.ok)(null===(a=j.mobileBorderRadius)||void 0===a?void 0:a.bottomLeft)||(0,Se.ok)(null===(d=j.mobileBorderRadius)||void 0===d?void 0:d.topRight)||(0,Se.ok)(null===(n=j.mobileBorderRadius)||void 0===n?void 0:n.bottomRight)?B(!1):B(!0),R(!(null===(m=j.borderRadius)||void 0===m||!m.all)||!(null===(c=j.borderRadius)||void 0===c||!c.topLeft)||!(null===(u=j.borderRadius)||void 0===u||!u.bottomLeft)||!(null===(h=j.borderRadius)||void 0===h||!h.topRight)||!(null===(b=j.borderRadius)||void 0===b||!b.bottomRight)),N(!(null===(g=j.mobileBorderRadius)||void 0===g||!g.all)||!(null===(p=j.mobileBorderRadius)||void 0===p||!p.topLeft)||!(null===(x=j.mobileBorderRadius)||void 0===x||!x.bottomLeft)||!(null===(A=j.mobileBorderRadius)||void 0===A||!A.topRight)||!(null===(f=j.mobileBorderRadius)||void 0===f||!f.bottomRight))}}),[l,O]);(0,be.A)((e=>{const t=e.data.operation;t===G.Ru.APPLICATION_OPEN_IMAGE_AI_POPUP?(s((0,fe.tm)(O.settings.src)),s((0,pe.qf)(G.lx.UPLOAD_IMAGE_MODAL_AI))):t===G.Ru.APPLICATION_OPEN_IMAGE_UPLOAD_POPUP?(s((0,fe.tm)(O.settings.src)),s((0,pe.qf)(G.lx.UPLOAD_IMAGE_MODAL_UPLOAD))):t===G.Ru.APPLICATION_OPEN_IMAGE_EDIT_POPUP?(s((0,fe.tm)(O.settings.src)),s((0,pe.qf)(G.lx.UPLOAD_IMAGE_MODAL_EDIT))):t===G.Ru.APPLICATION_OPEN_IMAGE_GIF_POPUP?(s((0,fe.tm)(O.settings.src)),s((0,pe.qf)(G.lx.UPLOAD_IMAGE_MODAL_GIF))):t===G.Ru.APPLICATION_OPEN_IMAGE_STOCK_POPUP?(s((0,fe.tm)(O.settings.src)),s((0,pe.qf)(G.lx.UPLOAD_IMAGE_MODAL_STOCK))):t===G.Ru.APPLICATION_CLOSE_IMAGE_EDIT_POPUP&&(s((0,pe.Os)()),s((0,pe.Oo)()))}));return(0,Y.jsx)(u.A,{form:l,layout:"vertical",name:"selected_carousel_form",initialValues:pt,onValuesChange:e=>{const t=(0,Se.Ze)(O.settings,l,e);n({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:G.bV.CAROUSEL,caption:t.caption,settings:t}),D((e=>({...e,settings:{...e.settings,...t}})))},autoComplete:"off",className:"element-controls",children:m===G.ND&&c.styles?(0,Y.jsx)("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",children:(0,Y.jsxs)("div",{className:"selected_form-mobile-props-wrapper",children:[r.formFieldBorderRadiusEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Border radius")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const e=null===l||void 0===l?void 0:l.getFieldsValue(!0);setTimeout((()=>{N((e=>!e)),e.mobileBorderRadiusAll=P?null:5,n({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:G.bV.CAROUSEL,settings:{...O.settings,mobileBorderRadius:{...O.settings.mobileBorderRadius,all:e.mobileBorderRadiusAll,classNamePrefix:"em-mob-border_radius_all-"}}}),D((t=>({...t,settings:{...t.settings,mobileBorderRadius:{...t.settings.mobileBorderRadius,all:e.mobileBorderRadiusAll,classNamePrefix:"em-mob-border_radius_all-"}}})))}))},children:P?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),P&&(0,Y.jsx)("div",{style:{marginBottom:4},children:(0,Y.jsx)(V.A,{form:l,oneMobileBorderRadiusValue:S,setOneMobileBorderRadiusValue:B})})]}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),!!O.settings.showOnMobile&&(0,Y.jsx)(u.A.List,{name:"images",children:()=>{var e,t;return(0,Y.jsx)("div",{style:{paddingTop:o.formItemMarginBottomMD+4},children:null===O||void 0===O||null===(e=O.settings)||void 0===e||null===(t=e.carouselImages)||void 0===t?void 0:t.map(((e,t)=>(0,Y.jsx)(gt,{elementSettings:C,setElementSettings:D,postfix:"_"+t,form:l,handleSelect:ie},t)))})}}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"})]})}):(0,Y.jsx)("div",{id:"selected_element_form_desktop_props",children:(0,Y.jsxs)("div",{className:"selected_form-props-wrapper",children:[(0,Y.jsxs)(g.A,{gutter:20,children:[(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsxs)(j.A,{size:10,align:"baseline",children:[(0,Y.jsx)(u.A.Item,{name:"loop",valuePropName:"checked",children:(0,Y.jsx)(Q.A,{size:"small",id:"Loop"})}),(0,Y.jsx)("span",{style:{position:"relative",top:2},children:(0,Y.jsx)("label",{htmlFor:"Loop",children:t("Loop")})})]})}),(0,Y.jsx)(p.A,{span:12,children:(0,Y.jsxs)(j.A,{size:10,align:"baseline",children:[(0,Y.jsx)(u.A.Item,{name:"autoplay",valuePropName:"checked",children:(0,Y.jsx)(Q.A,{size:"small",id:"Autoplay"})}),(0,Y.jsx)("span",{style:{position:"relative",top:2},children:(0,Y.jsx)("label",{htmlFor:"Autoplay",children:t("Autoplay")})})]})})]}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),(0,Y.jsx)(h.A,{trigger:["hover"],title:t("Hyperlink URL"),placement:"bottom",children:(0,Y.jsx)(u.A.Item,{name:"link",style:{marginBottom:o.formItemMarginBottomMD,marginTop:o.formItemMarginBottomMD},children:(0,Y.jsx)(v.A,{addonBefore:(0,Y.jsx)(Se.Ai,{linkProtocol:T,handleLinkProtocolsChange:e=>{l.setFieldValue("link","mergetag"!==e?e:""),I(e)},__:t}),placeholder:t("Hyperlink URL"),allowClear:!0,onSelect:ie,prefix:(0,Y.jsx)(Se.RM,{linkProtocol:T})})})}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),W&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(p.A,{span:24,id:"merge_tags_wrapper",children:(0,Y.jsxs)(u.A.Item,{style:{marginBottom:o.formItemMarginBottomMD,marginTop:o.formItemMarginBottomMD},children:[(0,Y.jsx)(A.Ay,{id:"merge_tags_button",icon:(0,Y.jsx)(z.A,{icon:"MergeTags"}),style:{width:"100%",display:q?"none":"block"},onClick:()=>K(!0),children:t("Merge tags")}),(0,Y.jsx)(f.A,{ref:te,popupClassName:"merge-tags",options:W,placeholder:t("Start typing the title"),showSearch:{filter:(e,t)=>t.some((t=>t.label.toLowerCase().indexOf(e.toLowerCase())>-1)),render:(e,t)=>{const o=t.map(((t,o)=>{const i=t.label.split(new RegExp(`(${e})`,"gi"));return(0,Y.jsxs)("span",{children:[0!==o&&(0,Y.jsx)("span",{children:"\xa0/\xa0"}),i.map(((t,o)=>t.toLowerCase()===e.toLowerCase()?(0,Y.jsx)("span",{style:{color:"red"},children:t},o):t))]},t.value)}));return(0,Y.jsx)("div",{title:t.map((e=>e.label)).join(" / "),children:o})}},spellCheck:"false",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),onChange:(e,t)=>{if(K(!1),e){const o=oe.syntax.length>1?W.findIndex((e=>e.key===t[0].key)):0,i=oe.syntax[o].replace("%value%",e[e.length-1]);null!==F&&void 0!==F&&F.getAttribute("id").includes(`selected_${O.type}_form${"carousel"===O.type?"_images":""}_imgReplacer`)||null!==F&&void 0!==F&&F.getAttribute("id").includes(`selected_${O.type}_form${"carousel"===O.type?"_images":""}_title`)||null!==F&&void 0!==F&&F.getAttribute("id").includes(`selected_${O.type}_form${"carousel"===O.type?"_images":""}_alt`)||null!==F&&void 0!==F&&F.getAttribute("id").includes(`selected_${O.type}_form${"carousel"===O.type?"_images":""}_src`)||null!==F&&void 0!==F&&F.getAttribute("id").includes(`selected_${O.type}_form${"carousel"===O.type?"_images":""}_link`)?(console.log("1",1),((e,t)=>{const o=document.getElementById(t);if(o){var i,s;const a=`selected_${O.type}_form_${"carousel"===O.type?"_images":""}_`,d=t.substring(t.indexOf(a)+a.length),m=null===(i=o.value)||void 0===i?void 0:i.substring(0,Z.start),c=null===(s=o.value)||void 0===s?void 0:s.substring(Z.end);let u={[d]:m+e+c};var r;d.includes("_")&&(u={carouselImages:[...(null===(r=O.settings)||void 0===r?void 0:r.carouselImages)||[]]},u.carouselImages[d.split("_")[1]][d.split("_")[0]]=m+e+c),n({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:G.bV.CAROUSEL,settings:{...O.settings,...u}}),D((e=>({...e,settings:{...e.settings,...u}}))),l.setFieldValue(d,m+e+c),o.focus(),setTimeout((()=>{o.selectionStart=Z.start,o.selectionEnd=Z.start+e.length}),400),J(!0)}})(i,null===F||void 0===F?void 0:F.getAttribute("id"))):(console.log("2",2),l.setFieldValue("imgReplacer",i),n({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:G.bV.CAROUSEL,settings:{...O.settings,imgReplacer:i}}),D((e=>({...e,settings:{...e.settings,imgReplacer:i}}))))}},style:{display:q?"block":"none"},open:q,onKeyDown:e=>{"Escape"===e.key&&K(!1)}})]})}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"})]}),(0,Y.jsx)(u.A.List,{name:"images",initialValue:null===C||void 0===C?void 0:C.images,children:()=>{var e,t;return(0,Y.jsx)("div",{style:{paddingTop:o.formItemMarginBottomMD+4},children:null===O||void 0===O||null===(e=O.settings)||void 0===e||null===(t=e.carouselImages)||void 0===t?void 0:t.map(((e,t)=>(0,Y.jsx)(gt,{elementSettings:C,setElementSettings:D,postfix:"_"+t,form:l,handleSelect:ie},t)))})}}),(0,Y.jsx)(p.A,{span:24,id:"merge_tags_wrapper",children:(0,Y.jsx)(u.A.Item,{style:{marginBottom:o.formItemMarginBottomMD},children:(0,Y.jsx)(A.Ay,{id:"add_slide_button",icon:(0,Y.jsx)(z.A,{icon:"MergeTags"}),style:{width:"100%",display:q?"none":"block"},onClick:()=>(()=>{var e,t;const{width:o,height:i,renderedWidth:l,renderedHeight:s}=(null===O||void 0===O||null===(e=O.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:o.value,dim:"px"},height:{value:i.value,dim:"px"},alt:"",title:"",link:null,renderedWidth:l,renderedHeight:s,imgReplacer:"",mobileWidth:{value:null,dim:"px"},mobileHeight:{value:null,dim:"px"},mobileBorderRadius:{all:null,topLeft:null,topRight:null,bottomRight:null,bottomLeft:null}},a=[...null===O||void 0===O||null===(t=O.settings)||void 0===t?void 0:t.carouselImages,r];n({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:G.bV.CAROUSEL,settings:{...O.settings,carouselImages:a}}),D((e=>({...e,settings:{...e.settings,carouselImages:a}})))})(),children:t("Add slide")})})}),(0,Y.jsx)(x.A,{className:"selected-td-form__divider"}),r.formFieldBorderRadiusEnabled&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,Y.jsx)(p.A,{span:20,children:(0,Y.jsx)("div",{className:"form-group-title",children:t("Border radius")})}),(0,Y.jsx)(p.A,{span:4,align:"right",children:(0,Y.jsx)(A.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{setTimeout((()=>{R((e=>!e)),l.setFieldValue("borderRadiusAll",k?0:5),n({operation:G.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:G.bV.CAROUSEL,settings:{...O.settings,borderRadius:{...O.settings.borderRadius,all:k?null:5}}}),D((e=>({...e,settings:{...e.settings,borderRadius:{...e.settings.borderRadius,all:k?null:5}}})))}))},children:k?(0,Y.jsx)(w.A,{}):(0,Y.jsx)(y.A,{})})})]}),k&&(0,Y.jsx)("div",{style:{marginBottom:4},children:(0,Y.jsx)(E.A,{form:l,oneBorderRadiusValue:b,setOneBorderRadiusValue:_,elementSettings:O.settings})})]})]})})})},ft=({className:e,formSettings:t,emailElementType:o})=>{const s=(0,a.wA)(),m=(0,_e.Cb)(),c=(0,i.useRef)(),u=(0,a.d4)(xe.B),h=(0,a.d4)(d.qX),b=(0,a.d4)(n.qX),g=o===G.Tm?h:b,[p,x]=(0,i.useState)(g);(0,i.useEffect)((()=>{x(g.type===G.bV.CAROUSEL||g.type===G.bV.IMG?t.settings:g)}),[g,t.settings]);return(0,be.A)((e=>{const t=e.data.operation,o=e.data.action;if(t===G.Ru.APPLICATION_ACTION){function i(e,t=null){const o={[e]:t||!p[e]};m(o,p.type),s((0,d.G_)(o)),x((e=>({...e,...o})))}"toggle_strong"===o&&i("textStrong"),"toggle_italic"===o&&i("textItalic"),"toggle_underline"===o&&i("textUnderline"),"toggle_strikethrough"===o&&i("textStrikethrough"),"textAlign_left"===o&&i("textAlign","left"),"textAlign_right"===o&&i("textAlign","right"),"textAlign_center"===o&&i("textAlign","center")}})),(0,Y.jsx)(l.A,{nodeRef:c,in:u===G.yI,timeout:300,classNames:"transition",children:(0,Y.jsxs)("div",{ref:c,className:r()("selected-element-panel-content",{[e]:e}),children:[g.type===G.bV.IMG&&(0,Y.jsx)(we,{elementSettings:g}),g.type===G.bV.COUNTDOWN&&(0,Y.jsx)(we,{elementSettings:g}),g.type===G.bV.VIDEO&&(0,Y.jsx)(we,{elementSettings:g}),g.type===G.bV.TEXT&&(0,Y.jsx)(Ee,{elementSettings:g}),g.type===G.bV.LINK&&(0,Y.jsx)(Me,{elementSettings:g})," ",g.type===G.bV.TABLE&&(0,Y.jsx)(Fe,{elementSettings:g}),(g.type===G.bV.TD||g.type===G.bV.STRUCTURE||g.type===G.bV.GROUP||g.type===G.bV.COLUMN)&&(0,Y.jsx)(Ze,{elementSettings:g}),g.type===G.bV.VAR&&(0,Y.jsx)(ut,{elementSettings:g}),g.type===G.bV.BUTTON&&(0,Y.jsx)(mt.A,{elementSettings:g}),g.type===G.bV.DIV&&(0,Y.jsx)(it,{elementSettings:g}),g.type===G.bV.VINDENT&&(0,Y.jsx)(We,{elementSettings:g}),g.type===G.bV.FLOAT_BLOCK&&(0,Y.jsx)(nt,{elementSettings:g}),t.type===G.bV.CAROUSEL&&(0,Y.jsx)(At,{elementSettings:t})]})})};ft.defaultProps={className:null};const jt=ft},46929:(e,t,o)=>{o.d(t,{A:()=>M});var i=o(92810),l=o(45934),s=o(95838),r=o(2018),a=o(7744),d=o(71086),n=o(12280),m=o(43005),c=o(4800),u=o(79579),h=o(66726),b=o(55039),g=o(7166),p=o(28348),x=o(6391),A=o(69372),f=o(40886),j=o(14461),v=o(7228),_=o(23287),S=o(38883),B=o.n(S),y=o(73721),w=o(68031),k=o(44997),R=o(88296),P=o(26238),N=o(62303),T=o(18398),E=o(85163),I=o(47520),C=o(45695),L=o(56991),O=o(71157),D=o(64037),F=o(70082);const{useToken:V}=s.A,M=({form:e,elementSettings:t,showAddParagraph:o=!0,isButton:s=!1,linkProtocol:S,setLinkProtocol:M,linkTarget:W})=>{const{__:H}=(0,_.s9)(),{token:X}=V(),z=(0,O.hN)(),G=(0,C.XW)(),U=(0,C.K9)(),Y=(0,i.useRef)(),q=(0,i.useRef)(null),K=(0,i.useRef)(null),[$,J]=(0,i.useState)(!1),[Q,Z]=(0,i.useState)(null),[ee,te]=(0,i.useState)({start:0,end:0}),[oe,ie]=(0,i.useState)(!1);(0,D.A)((e=>{e.data.operation===E.Ru.APPLICATION_FOCUS_IN_IFRAME&&Z(null)}));const[le,se]=(0,i.useState)(null);(0,i.useEffect)((()=>{var e,t;null!==(e=window)&&void 0!==e&&null!==(t=e.navigator)&&void 0!==t&&t.userAgent.includes("Macintosh")&&se(!0)}),[]);const re=(0,i.useRef)(null),ae=e=>{G({operation:E.Ru.SANDBOX_ELEMENT_TEXT,action:e,locale:"ru_RU"}),z.success({message:H("It`s done!"),placement:"bottomRight"})},de=[{key:"1",label:H("This element"),onClick:()=>ae("typograf")},{key:"2",label:H("The whole email"),onClick:()=>ae("typograf_all")}],[ne,me]=(0,i.useState)(),[ce,ue]=(0,i.useState)(!1);(0,i.useEffect)((()=>{t.linkHref&&("https://"===t.linkHref.substring(0,8)||"http://"===t.linkHref.substring(0,7)?M("https://"):"mailto:"===t.linkHref.substring(0,7)?M("mailto:"):"tel:"===t.linkHref.substring(0,4)?M("tel:"):"sms:"===t.linkHref.substring(0,4)?M("sms:"):"ftp://"===t.linkHref.substring(0,6)?M("ftp://"):"skype:"===t.linkHref.substring(0,6)?M("skype:"):"viber:"===t.linkHref.substring(0,6)?M("viber:"):M("")),e.setFieldsValue({linkHref:t.linkHref?t.linkHref:"https://"})}),[e,t,M]);const he=(0,l.d4)(T.GH);(0,i.useEffect)((()=>{var e;null!==he&&void 0!==he&&null!==(e=he.items)&&void 0!==e&&e.length&&me((0,L.cM)(he.items,H,((e,t)=>{ue(!1),U(E.Ru.SANDBOX_ADD_MERGETAG,e),t.stopPropagation(),t.preventDefault()})))}),[he,me,H,ue,U]);(0,i.useEffect)((()=>{ce&&re.current&&re.current.focus()}),[ce]),(0,i.useEffect)((()=>{const e=({target:e})=>{e.closest('[id="merge_tags_wrapper"]')||Z(e)},t=({target:e})=>{e.closest(".merge-tags")||e.closest("#merge_tags_button")||ue(!1)};return window.addEventListener("focusin",e),window.addEventListener("click",t),()=>{window.removeEventListener("focusin",e),window.addEventListener("click",t)}}),[]);const be=(0,i.useCallback)((({target:e})=>{if(e&&!oe){const{selectionStart:t,selectionEnd:o}=e;te({start:t,end:o})}ie(!1)}),[oe]);(0,i.useEffect)((()=>be({target:null===W||void 0===W?void 0:W.target})),[W,be]);const ge=(o,i)=>{const l=document.getElementById(i);if(l){var s,r;const a=null===(s=l.value)||void 0===s?void 0:s.substring(0,ee.start),d=null===(r=l.value)||void 0===r?void 0:r.substring(ee.end),n=i.substring(i.lastIndexOf("_")+1);G({operation:E.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:{[n]:a+o+d}}),e.setFieldValue(n,a+o+d),l.focus(),setTimeout((()=>{l.selectionStart=ee.start,l.selectionEnd=ee.start+o.length}),400),ie(!0)}};return(0,i.useEffect)((()=>{var o;const i=e.getFieldValue("textReplacer");J(!(null===(o=t.textReplacer)||void 0===o||!o.length)||!(null===i||void 0===i||!i.length))}),[t,e]),(0,F.jsxs)(F.Fragment,{children:[o&&!t.showOnMobile&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(r.A,{gutter:20,style:{paddingBottom:4},children:(0,F.jsx)(a.A,{span:12,gutter:20,children:(0,F.jsx)(w.A,{form:e,elementSettings:t,name:"textAlign"})})}),(0,F.jsx)(d.A,{className:"selected-td-form__divider",style:{marginBottom:20}})]}),t.showOnMobile&&(0,F.jsx)(d.A,{className:"selected-td-form__divider",style:{marginBottom:20}}),(0,F.jsxs)(r.A,{gutter:10,children:[(0,F.jsx)(a.A,{span:12,children:(0,F.jsx)(n.A.Item,{name:"AddImage",style:{marginBottom:X.formItemMarginBottomXS},children:(0,F.jsx)(m.Ay,{icon:(0,F.jsx)(N.A,{icon:"AddImage"}),onClick:()=>ae("add_img"),style:{width:"100%"},children:H("Add image")})})}),(0,F.jsx)(a.A,{span:12,children:(0,F.jsx)(n.A.Item,{name:"Typography",style:{marginBottom:X.formItemMarginBottomXS},children:(0,F.jsx)(c.A,{arrow:!0,menu:{items:de},trigger:["hover"],placement:"bottom",getPopupContainer:e=>e.closest(".selected-element-panel"),children:(0,F.jsx)(m.Ay,{icon:(0,F.jsx)(N.A,{icon:"Typograf"}),onClick:()=>ae("typograf"),style:{width:"100%"},children:H("Typography")})})})}),ne&&(0,F.jsxs)(a.A,{span:24,id:"merge_tags_wrapper",style:{marginBottom:0},children:[(0,F.jsx)(m.Ay,{id:"merge_tags_button",icon:(0,F.jsx)(N.A,{icon:"MergeTags"}),style:{width:"100%",display:ce?"none":"block"},onClick:()=>ue(!0),children:H("Merge tags")}),(0,F.jsx)(u.A,{ref:re,popupClassName:"merge-tags",options:ne,placeholder:H("Start typing the title"),showSearch:{filter:(e,t)=>t.some((t=>t.label.toLowerCase().indexOf(e.toLowerCase())>-1)),render:(e,t)=>{const o=t.map(((t,o)=>{const i=t.label.split(new RegExp(`(${e})`,"gi"));return(0,F.jsxs)("span",{children:[0!==o&&(0,F.jsx)("span",{children:"\xa0/\xa0"}),i.map(((t,o)=>t.toLowerCase()===e.toLowerCase()?(0,F.jsx)("span",{style:{color:"red"},children:t},o):t))]},t.value)}));return(0,F.jsx)("div",{title:t.map((e=>e.label)).join(" / "),children:o})}},spellCheck:"false",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),onChange:(o,i)=>{if(ue(!1),o){const l=he.syntax.length>1?ne.findIndex((e=>e.key===i[0].key)):0,s=he.syntax[l].replace("%value%",o[o.length-1]);"selected_button_form_href"===(null===Q||void 0===Q?void 0:Q.getAttribute("id"))||"selected_text_form_linkHref"===(null===Q||void 0===Q?void 0:Q.getAttribute("id"))||"selected_text_form_textReplacer"===(null===Q||void 0===Q?void 0:Q.getAttribute("id"))?ge(s,null===Q||void 0===Q?void 0:Q.getAttribute("id")):(e.setFieldValue("textReplacer",s),G({operation:E.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:{textReplacer:s}}))}},style:{display:ce?"block":"none",width:"100%"},open:ce,onKeyDown:e=>{"Escape"===e.key&&ue(!1)}})]})]}),(0,F.jsx)(d.A,{className:"selected-td-form__divider",style:{marginBottom:t.showOnMobile?20:0,marginTop:20}}),!t.showOnMobile&&(0,F.jsx)("div",{className:"form-group-title",children:H("Text")}),(0,F.jsx)(h.A,{trigger:["hover"],title:H("Text font"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,F.jsx)(n.A.Item,{name:"fontFamily",className:"form-item-margin-xs",children:(0,F.jsx)(R.A,{textEditor:!0})})}),!t.showOnMobile&&(0,F.jsxs)(r.A,{gutter:10,children:[(0,F.jsx)(a.A,{span:12,children:(0,F.jsx)(h.A,{trigger:["hover"],title:H("Font size"),placement:"bottom",children:(0,F.jsx)(n.A.Item,{name:"fontSize",children:(0,F.jsx)(k.A,{min:0,placeholder:H("Font size"),prefix:(0,F.jsx)(g.A,{}),addonAfter:"px"})})})}),(0,F.jsx)(a.A,{span:12,children:(0,F.jsx)(h.A,{trigger:["hover"],title:H("Line height"),placement:"bottom",children:(0,F.jsx)(n.A.Item,{name:"lineHeight",children:(0,F.jsx)(k.A,{min:0,placeholder:H("Line height"),prefix:(0,F.jsx)(p.A,{}),addonAfter:"px"})})})})]}),(0,F.jsxs)(r.A,{gutter:10,children:[(0,F.jsx)(a.A,{span:3,children:(0,F.jsx)(y.A,{form:e,elementSettings:t,name:"textStrong",tooltipTitle:H(le?"Strong ( \u2318B )":"Strong ( Ctrl+B )"),icon:(0,F.jsx)(x.A,{className:"selected-text-common-form__icon-radius"})})}),(0,F.jsx)(a.A,{span:3,children:(0,F.jsx)(y.A,{form:e,elementSettings:t,name:"textItalic",tooltipTitle:H(le?"Italic ( \u2318I )":"Italic ( Ctrl+I )"),icon:(0,F.jsx)(A.A,{className:"selected-text-common-form__icon-radius"})})}),(0,F.jsx)(a.A,{span:3,children:(0,F.jsx)(y.A,{form:e,elementSettings:t,name:"textStrikethrough",tooltipTitle:H(le?"Strikethrough ( \u2318+Shift+X )":"Strikethrough ( Alt+Shift+5 )"),icon:(0,F.jsx)(f.A,{className:"selected-text-common-form__icon-radius"})})}),(0,F.jsx)(a.A,{span:3,children:(0,F.jsx)(y.A,{form:e,elementSettings:t,name:"textUnderline",tooltipTitle:H(le?"Underline ( \u2318U )":"Underline ( Ctrl+U )"),icon:(0,F.jsx)(j.A,{className:"selected-text-common-form__icon-radius"})})}),o&&(0,F.jsx)(a.A,{span:3,children:(0,F.jsx)(y.A,{form:e,className:B()("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:H("Link"),icon:(0,F.jsx)(v.A,{className:"selected-text-common-form__icon-radius"})})}),s&&(0,F.jsx)(a.A,{span:12,children:(0,F.jsx)(h.A,{trigger:["hover"],title:H("Text color"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,F.jsx)(n.A.Item,{name:"textColor",rules:[{message:H("Please set the font color")}],children:(0,F.jsx)(P.A,{placeholder:H("Color"),usedColors:t.usedColors})})})}),!s&&(0,F.jsx)(a.A,{span:3,children:(0,F.jsx)(h.A,{title:H("Text replacer"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,F.jsx)(m.Ay,{className:B()("selected-td-form__button ant-form-item",{"selected-td-form__button--active":$}),icon:(0,F.jsx)(N.A,{icon:"Replacer",className:"selected-td-form__icon-radius"}),onClick:()=>{J(!$),$?(e.setFieldValue("textReplacer",""),G({operation:E.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:{textReplacer:""}})):setTimeout((()=>q.current.focus()))},ref:K})})})]}),o&&"string"===typeof t.linkHref&&(0,F.jsx)(h.A,{trigger:["hover"],title:H("The URL that the hyperlink directs to."),placement:"bottom",children:(0,F.jsx)(n.A.Item,{name:"linkHref",children:(0,F.jsx)(b.A,{ref:Y,addonBefore:(0,F.jsx)(I.Ai,{linkProtocol:S,handleLinkProtocolsChange:t=>{e.setFieldValue("linkHref","mergetag"!==t?t:""),M(t)},__:H}),allowClear:!0,placeholder:H("Hyperlink URL"),autoFocus:null===t||void 0===t?void 0:t.isNewLink,onSelect:be,prefix:(0,F.jsx)(I.RM,{linkProtocol:S})})})}),!s&&$&&(0,F.jsx)(h.A,{trigger:["hover"],title:H("Text"),placement:"bottom",children:(0,F.jsx)(n.A.Item,{name:"textReplacer",children:(0,F.jsx)(b.A,{placeholder:H("The code that will replace this text"),allowClear:!0,prefix:(0,F.jsx)("span",{className:"addon-text-content",children:H("Text")}),onChange:e=>{""!==e.target.value&&K.current.classList.add("selected-td-form__button--active")},ref:q})})}),!s&&(0,F.jsxs)(r.A,{gutter:10,style:{paddingBottom:4},children:[(0,F.jsx)(a.A,{span:12,children:(0,F.jsx)(h.A,{trigger:["hover"],title:H("Text color"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,F.jsx)(n.A.Item,{name:"textColor",rules:[{message:H("Please set the font color")}],children:(0,F.jsx)(P.A,{placeholder:H("Color"),usedColors:t.usedColors})})})}),(0,F.jsx)(a.A,{span:12,children:(0,F.jsx)(h.A,{trigger:["hover"],title:H("Text background"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,F.jsx)(n.A.Item,{name:"textBackgroundColor",rules:[{message:H("Please set the background color")}],children:(0,F.jsx)(P.A,{placeholder:H("Background color"),usedColors:t.usedColors})})})})]})]})}},77416:(e,t,o)=>{o.d(t,{A:()=>D});var i=o(92810),l=o(64617),s=o(81e3),r=o(71086),a=o(66726),d=o(12280),n=o(4800),m=o(55039),c=o(43005),u=o(7166),h=o(28348),b=o(6391),g=o(69372),p=o(40886),x=o(14461),A=o(7228),f=o(98885),j=o(87984),v=o(73170),_=o(38587),S=o(45934),B=o(23287),y=o(73721),w=o(88296),k=o(44997),R=o(68031),P=o(62303),N=o(65983),T=o(47358),E=o(7760),I=o(85163),C=o(45695),L=o(26238),O=o(70082);const D=({form:e,elementSettings:t,showAddParagraph:o=!0,isButton:D=!1})=>{const{__:F}=(0,B.s9)(),V=(0,C.XW)(),M=(0,S.wA)(),{emailId:W}=(0,l.g)(),H=(0,S.d4)(W?N.Hs:E.gm).hasOwnProperty("type")?I.IE:I.Tm,[X,z]=(0,i.useState)(null);(0,i.useEffect)((()=>{var e,t;null!==(e=window)&&void 0!==e&&null!==(t=e.navigator)&&void 0!==t&&t.userAgent.includes("Macintosh")&&z(!0)}),[]);const G=e=>{V({operation:I.Ru.SANDBOX_ELEMENT_TEXT,action:e,locale:"ru_RU"})},U=[{key:"1",label:F("This element"),onClick:()=>G("typograf")},{key:"2",label:F("The whole email"),onClick:()=>G("typograf_all")}],[Y,q]=(0,i.useState)(t.textAlign),[K,$]=(0,i.useState)(t.linkHref),J=e=>q(e);return(0,i.useEffect)((()=>{q(t.textAlign),$(t.linkHref)}),[t]),(0,O.jsx)("div",{className:"selected_text_common_form_mobile",children:(0,O.jsxs)(s.A,{size:"8",split:(0,O.jsx)(r.A,{type:"vertical"}),children:[(0,O.jsxs)(s.A,{size:8,className:"selected_text_common_form_mobile__group",children:[(0,O.jsx)("div",{style:{width:190},children:(0,O.jsx)(a.A,{trigger:["hover"],title:F("Text font"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,O.jsx)(d.A.Item,{name:"fontFamily",children:(0,O.jsx)(w.A,{textEditor:!0,codeMode:!0})})})}),(0,O.jsx)("div",{style:{width:90},children:(0,O.jsx)(a.A,{trigger:["hover"],title:F("Font size"),placement:"bottom",children:(0,O.jsx)(d.A.Item,{name:"fontSize",children:(0,O.jsx)(k.A,{min:0,placeholder:F("Font size"),prefix:(0,O.jsx)(u.A,{}),addonAfter:"px"})})})}),(0,O.jsx)("div",{style:{width:90},children:(0,O.jsx)(a.A,{trigger:["hover"],title:F("Line height"),placement:"bottom",children:(0,O.jsx)(d.A.Item,{name:"lineHeight",children:(0,O.jsx)(k.A,{min:0,placeholder:F("Line height"),prefix:(0,O.jsx)(h.A,{}),addonAfter:"px"})})})})]}),(0,O.jsxs)(s.A,{size:8,className:"selected_text_common_form_mobile__group",children:[(0,O.jsx)(y.A,{form:e,elementSettings:t,name:"textStrong",tooltipTitle:F(X?"Strong ( \u2318B )":"Strong ( Ctrl+B )"),icon:(0,O.jsx)(b.A,{className:"selected-td-form__icon-radius"})}),(0,O.jsx)(y.A,{form:e,elementSettings:t,name:"textItalic",tooltipTitle:F(X?"Italic ( \u2318I )":"Italic ( Ctrl+I )"),icon:(0,O.jsx)(g.A,{className:"selected-td-form__icon-radius"})}),(0,O.jsx)(y.A,{form:e,elementSettings:t,name:"textStrikethrough",tooltipTitle:F(X?"Strikethrough ( \u2318+Shift+X )":"Strikethrough ( Alt+Shift+5 )"),icon:(0,O.jsx)(p.A,{className:"selected-td-form__icon-radius"})}),(0,O.jsx)(y.A,{form:e,elementSettings:t,name:"textUnderline",tooltipTitle:F(X?"Underline ( \u2318U )":"Underline ( Ctrl+U )"),icon:(0,O.jsx)(x.A,{className:"selected-td-form__icon-radius"})})]}),(0,O.jsxs)(s.A,{size:8,className:"selected_text_common_form_mobile__group",children:[(0,O.jsx)(a.A,{trigger:["hover"],title:F("Text color"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,O.jsx)(d.A.Item,{name:"textColor",rules:[{message:F("Please set the font color")}],children:(0,O.jsx)(L.A,{placeholder:F("Color"),usedColors:t.usedColors,codeMode:!0})})}),!D&&(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(a.A,{trigger:["hover"],title:F("Text background"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,O.jsx)(d.A.Item,{name:"textBackgroundColor",rules:[{message:F("Please set the background color")}],children:(0,O.jsx)(L.A,{placeholder:F("Background color"),usedColors:t.usedColors})})})})]}),o&&(0,O.jsx)(s.A,{size:8,className:"selected_text_common_form_mobile__group",children:(0,O.jsxs)(O.Fragment,{children:["string"===typeof K?(0,O.jsx)(n.A,{arrow:!0,dropdownRender:()=>(0,O.jsx)(a.A,{trigger:["hover"],title:F("The URL that the hyperlink directs to."),placement:"bottom",children:(0,O.jsx)(d.A.Item,{name:"linkHref",children:(0,O.jsx)(m.A,{allowClear:!0,placeholder:"href",prefix:(0,O.jsx)(A.A,{}),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"),children:(0,O.jsx)("div",{children:(0,O.jsx)(y.A,{form:e,className:"selected-td-form__button selected-td-form__button_style selected-td-form__button--active",elementSettings:t,name:"textLink",icon:(0,O.jsx)(A.A,{className:"selected-td-form__icon-radius"}),showTooltip:!1})})}):(0,O.jsx)(y.A,{form:e,className:"selected-td-form__button selected-td-form__button_style",elementSettings:t,name:"textLink",tooltipTitle:F("Link"),icon:(0,O.jsx)(A.A,{className:"selected-td-form__icon-radius"})}),(0,O.jsx)(n.A,{arrow:!0,dropdownRender:()=>(0,O.jsx)(R.A,{form:e,elementSettings:t,name:"textAlign",setAlignStateHandle:J}),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"),children:(0,O.jsx)(c.Ay,{icon:"right"===Y?(0,O.jsx)(f.A,{}):"center"===Y?(0,O.jsx)(j.A,{}):(0,O.jsx)(v.A,{}),className:"selected-td-form__button"})})]})}),(0,O.jsxs)(s.A,{size:8,className:"selected_text_common_form_mobile__group",children:[o&&(0,O.jsx)(a.A,{trigger:["hover"],title:F("Add paragraph"),placement:"bottom",children:(0,O.jsx)(c.Ay,{icon:(0,O.jsx)(P.A,{icon:"Paragraph"}),onClick:()=>G("add_p"),className:"selected-td-form__button"})}),(0,O.jsx)(a.A,{trigger:["hover"],title:F("Add inline image"),placement:"bottom",children:(0,O.jsx)(c.Ay,{icon:(0,O.jsx)(P.A,{icon:"Image",style:{fontSize:20,verticalAlign:"text-top"}}),onClick:()=>G("add_img"),className:"selected-td-form__button"})}),(0,O.jsx)(n.A,{arrow:!0,menu:{items:U},trigger:["hover"],placement:"bottom",getPopupContainer:e=>e.closest(".selected_text_common_form_mobile"),overlayStyle:{left:750,top:52,transform:"translateX(0)",marginLeft:57},children:(0,O.jsx)(c.Ay,{icon:(0,O.jsx)(P.A,{icon:"Typograf"}),className:"selected-td-form__button"})}),(0,O.jsx)(c.Ay,{icon:(0,O.jsx)(_.A,{}),type:"icon",style:{marginLeft:26},onClick:()=>{V({operation:I.Ru.SANDBOX_ELEMENT_ACTIVE_RESET}),M((0,T.Fk)()),setTimeout((()=>{H===I.IE?M((0,E.A9)({type:null})):M((0,N.A9)({type:null}))}),300)}})]})]})})}},77019:(e,t,o)=>{o.d(t,{A:()=>N});var i=o(92810),l=o(45934),s=o(64617),r=o(95838),a=o(12280),d=o(14852),n=o(43005),m=o(55039),c=o(81662),u=o(66522),h=o(71157),b=o(28372),g=o(23287),p=o(62303),x=o(64936),A=o(86286),f=o(84568),j=o(63531),v=o(32269),_=o(85163),S=o(32411),B=o(93982),y=o(13522),w=o(56991),k=o(70082);const{useToken:R}=r.A,P=({isModalVisible:e,email:t})=>{const{__:o}=(0,g.s9)(),[r]=a.A.useForm(),P=(0,l.wA)(),{emailId:N}=(0,s.g)(),T=(0,l.d4)(A.C1),[E,I]=(0,j.lg)(),{token:C}=R(),L=(0,h.hN)(),O=(0,l.Pj)(),[D,F]=(0,i.useState)(!1),V=t.project,[M,W]=(0,f.OD)(),{data:H}=f.Nq.endpoints.getProject.select(+V)(O.getState()),{testEmails:X}=(0,w.rD)(),[z,G]=(0,i.useState)([]),[U,Y]=(0,i.useState)(!1),q=(0,B.ml)(y.A.ON_SEND_EMAIL_MODAL_ID);(0,i.useEffect)((()=>{_.EW.isPlugin&&e?q.fire(t).then((t=>{t.some((e=>!1===e))?P((0,x.Oo)()):F(e)})):F(e)}),[e,P,F,t,q]),(0,i.useEffect)((()=>{if(H&&!_.EW.isPlugin){const{owner:e,admins:t,users:o,invited_users:i}=H.members;let l=[];const s=localStorage.getItem(_.V0.em_test_emails)?JSON.parse(localStorage.getItem(_.V0.em_test_emails)):[];if(s.length&&s[V]&&s[V].map((({prevLSEmail:e})=>l.push(e))),i&&i.map((({invited_user_email:e})=>l.push(e))),o&&o.map((({user_email:e})=>l.push(e))),e&&l.push(e.user_email),t&&t.map((({user_email:e})=>l.push(e))),H.projects_test_emails){const e=H.projects_test_emails.map((({projects_test_email:e})=>e));l.push(...e)}const r=Array.from(new Set(l));l.length&&G(r.map((e=>({value:e}))))}}),[H,V]),(0,i.useEffect)((()=>{_.EW.isPlugin&&G(X.map((e=>({value:e}))))}),[X]),(0,i.useEffect)((()=>{var e;const t=localStorage.getItem(_.V0.em_test_emails);if(t&&D&&0===(null===(e=r.getFieldValue("recipients"))||void 0===e?void 0:e.length)){const e=JSON.parse(t);null!==e&&void 0!==e&&e[V]&&r.setFieldsValue({recipients:e[V]})}}),[V,D,r]),(0,i.useEffect)((()=>{r.setFieldsValue({subject:t.subject})}),[r,t.subject]);const K=(0,S.fn)();return(0,i.useEffect)((()=>{if(I.isSuccess&&U){var e;if(200!==(null===(e=I.data)||void 0===e?void 0:e.status)){var i,l;(0,v.p6)({error:{data:{code:null===(i=I.data)||void 0===i?void 0:i.code,message:null===(l=I.data)||void 0===l?void 0:l.message}}},L)}else{const e=[...new Set([...z.map((e=>e.value)),...r.getFieldValue("recipients")])];M({projectId:V,projects_test_emails:e.map((e=>({projects_test_email:e})))});const i=localStorage.getItem(_.V0.em_test_emails)?JSON.parse(localStorage.getItem(_.V0.em_test_emails)):[];let l=r.getFieldValue("recipients");localStorage.setItem(_.V0.em_test_emails,JSON.stringify({...i,[V]:[...new Set(l)]})),(0,v.wB)(o("The email \u201c")+t.title+o("\u201d was successfully sent."),L)}Y(!1),r.resetFields(),P((0,x.Oo)())}}),[I,r,V,M,z,U,P,t.title,W,o,L]),(0,i.useEffect)((()=>{W.isError&&((0,v.p6)(W,L),Y(!1),r.resetFields(),P((0,x.Oo)()))}),[P,W,r,L]),(0,i.useEffect)((()=>{r.setFieldsValue({subject:t.subject||t.title})}),[t,r]),(0,k.jsx)(d.A,{width:572,title:(0,k.jsxs)("div",{children:[(0,k.jsx)(p.A,{icon:"SendOutlined"})," ",o("Send a test email")]}),className:"blocks-modal",open:D,onCancel:()=>{P((0,x.Oo)()),r.resetFields()},centered:!0,footer:[(0,k.jsx)(n.Ay,{size:"large",className:"em-analytics__email-send-test",type:"primary",htmlType:"submit",form:"Send mail",loading:W.isLoading,icon:(0,k.jsx)(p.A,{icon:"SendOutlined",className:"email-preview-menu__list-item-icon"}),onClick:()=>{r.validateFields().then((()=>{const e={user_id:T.id,project_id:V,email_id:N,subject:r.getFieldValue("subject"),email:r.getFieldValue("recipients").join(","),html:(t=(null===K||void 0===K?void 0:K.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;E(e),Y(!0)})).catch((e=>{console.warn(e)}))},disabled:I.isLoading,children:o("Send")},"submit")],forceRender:!0,children:(0,k.jsxs)(a.A,{form:r,layout:"vertical",name:"send_mail_form",initialValues:{subject:t.subject||t.title,recipients:[]},autoComplete:"off",style:{padding:"10px 24px 0"},children:[(0,k.jsx)(a.A.Item,{label:o("Subject"),name:"subject",rules:[{required:!1,message:o("Please type subject")}],children:(0,k.jsx)(m.A,{size:"large",placeholder:o("Type subject")})}),(0,k.jsx)(a.A.Item,{label:o("Recipients"),name:"recipients",tooltip:{title:o("The test email will be sent to the specified addresses."),icon:(0,k.jsx)(b.A,{})},rules:[{required:!0,validator:(e,t)=>t.length>10?Promise.reject(new Error(o("A test email can be sent to a maximum of 10 addresses."))):0!==t.length?t.every((e=>v.au.test(e.toLowerCase())))?Promise.resolve():Promise.reject(new Error(o("Please type correct emails"))):Promise.reject(new Error(o("Please type emails")))}],children:(0,k.jsx)(c.A,{size:"large",mode:"tags",placeholder:o("Add up to 10 recipients"),tooltip:{title:"Tooltip with customize icon",icon:(0,k.jsx)(b.A,{})},options:z,tagRender:e=>{const{label:t,closable:o,onClose:i}=e;return(0,k.jsx)(u.A,{color:C.colorPrimary,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},closable:o,onClose:i,style:{borderRadius:6},children:t})},getPopupContainer:()=>document.getElementById("send_mail_form")})})]})})};P.defaultProps={isModalVisible:!1,email:null};const N=P},90219:(e,t,o)=>{o.d(t,{A:()=>C});var i=o(92810),l=o(95838),s=o(12280),r=o(55039),a=o(81662),d=o(66522),n=o(28372),m=o(45934),c=o(64617),u=o(23287),h=o(38883),b=o.n(h),g=o(55701),p=o(17581),x=o(84568),A=o(8493),f=o(87790),j=o(65983),v=o(56991),_=o(32269),S=o(85163),B=o(70082);const{useToken:y}=l.A,{title:w,description:k,tags:R,type:P,is_template:N}={title:"title",description:"description",tags:"tags",type:"type",is_template:"is_template"},T={[w]:"",[k]:"",[R]:[],[N]:!1},E={[k]:"",[R]:[],[P]:""},I=({className:e,element:t})=>{const{__:o}=(0,u.s9)(),{projectId:l}=(0,c.g)(),h=(0,m.wA)(),[I]=s.A.useForm(),{token:C}=y(),L=(0,v.rD)(),O=(0,m.Pj)(),D=t.hasOwnProperty("type")?S.IE:S.Tm,F=t.hasOwnProperty("type")?S.YY:S.zh;const{data:V}=x.Nq.endpoints.getProject.select(+l)(O.getState());(0,i.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,_.HT)(V,F)))||void 0===e?void 0:e.map((e=>({value:e.name,key:e.id}))))}),[V,F]),(0,i.useEffect)((()=>{if(t){var e,o;const i=null===(e=(0,_._q)(t,F))||void 0===e?void 0:e.map((e=>e.name)),l=t.emailtags||t.blocktags,s=null===(o=(0,_._q)(t,F))||void 0===o?void 0:o.filter((e=>l.includes(e.id))).map((e=>e.name));I.setFieldsValue({title:t.title,description:t.description,tags:t.tags||s||i,type:t.type})}}),[I,t,F]);const{data:M}=(0,g.h1)(),[W,H]=(0,i.useState)([]),[X,z]=(0,i.useState)([]);return(0,i.useEffect)((()=>{if(M){const e=M.schema.properties.acf.properties.type.items.enum;let t=[];const i={Applications:o("Apps"),Articles:o("Article"),Banners:o("Banners"),Buttons:o("Buttons"),"Call to Action":o("Call to Action"),Contacts:o("Contacts"),Content:o("Content"),"E-Commerce":o("E-Commerce"),Feature:o("Features"),Footer:o("Footers"),Header:o("Headers"),Lists:o("Lists"),Menu:o("Menus"),Other:o("Others"),Polls:o("Polls"),Promocodes:o("Promocodes"),Separators:o("Separators")};for(let o in e)t.push({label:i[e[o]],value:e[o]});H(t)}}),[M,o]),(0,B.jsx)("div",{className:b()("settings-panel",{[e]:e}),children:(0,B.jsxs)(s.A,{form:I,layout:"vertical",name:"settings_panel_form",initialValues:D===S.Tm?{EmailInitialValues:T}:E,onValuesChange:e=>{const o=Object.keys(e)[0];switch(o){case w:t.isNew?h((0,A.BQ)(e[o])):h((0,j.VK)(e[o]));break;case k:D===S.Tm?t.isNew?h((0,A.Zs)(e[o])):h(p.GY.util.updateQueryData("getEmail",t.id,(t=>{Object.assign(t,{description:e[o]})}))):t.isNew?h((0,f.AS)(e[o])):h(g.VM.util.updateQueryData("getBlock",t.id,(t=>{Object.assign(t,{description:e[o]})})));break;case N:t.isNew?h((0,A.TC)(e[o])):h(p.GY.util.updateQueryData("getEmail",t.id,(t=>{Object.assign(t,{is_template:e[o]})})));break;case R:{const i=e[o].map((e=>e.trim()));D===S.Tm?t.isNew?h((0,A.yY)(i)):h(p.GY.util.updateQueryData("getEmail",t.id,(e=>{Object.assign(e,{tags:i})}))):t.isNew?h((0,f.TB)(i)):h(g.VM.util.updateQueryData("getBlock",t.id,(e=>{Object.assign(e,{tags:i})})));break}case P:h(g.VM.util.updateQueryData("getBlock",t.id,(t=>{Object.assign(t,{type:e[o]})})));break;default:return}},autoComplete:"off",children:[L.subjectEnabled&&D===S.Tm&&(0,B.jsx)(s.A.Item,{label:o("Title"),name:w,tooltip:{title:o("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:(0,B.jsx)(n.A,{})},children:(0,B.jsx)(r.A.TextArea,{placeholder:o("Type title here"),autoSize:{minRows:1}})}),L.descriptionEnabled&&(0,B.jsx)(s.A.Item,{label:o("Description"),name:k,tooltip:{title:o("Description is used in other sections of the service."),icon:(0,B.jsx)(n.A,{})},children:(0,B.jsx)(r.A.TextArea,{placeholder:o("Type your description here"),autoSize:{minRows:2}})}),L.tagsEnabled&&(0,B.jsx)(s.A.Item,{label:o("Tags"),name:R,tooltip:{title:o("Tags help you find the block in the list."),icon:(0,B.jsx)(n.A,{})},rules:[{message:"Please input your username!",type:"array"}],children:(0,B.jsx)(a.A,{mode:"tags",style:{width:"100%"},placeholder:o("Type your tags here"),options:X,tagRender:e=>{const{label:t,closable:o,onClose:i}=e;return(0,B.jsx)(d.A,{color:C.colorPrimary,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},closable:o,onClose:i,style:{borderRadius:6},children:t})},getPopupContainer:()=>document.querySelector(".email-settings__collapse")})}),D===S.IE&&(0,B.jsx)(s.A.Item,{name:P,label:o("Type"),tooltip:{title:o("Select the block type to find any block on the list faster."),icon:(0,B.jsx)(n.A,{})},rules:[{message:"Please input type!"}],children:(0,B.jsx)(a.A,{placeholder:o("Choose block type"),options:W,getPopupContainer:()=>document.querySelector(".email-settings__collapse")})})]})})};I.defaultProps={className:"",email:void 0};const C=I},13465:(e,t,o)=>{o.d(t,{A:()=>j});o(92810);var i=o(2018),l=o(7744),s=o(68694),r=o.n(s),a=o(38610),d=o.n(a),n=o(73248),m=o.n(n),c=o(41705),u=o.n(c),h=o(96588),b=o.n(h),g=o(97433),p=o.n(g),x=o(32269),A=(o(13591),o(70082));const f=[{sizeArray:[24],name:"column-one",html:r()},{sizeArray:[12,12],name:"column-two-50",html:u()},{sizeArray:[8,8,8],name:"column-three",html:b()},{sizeArray:[6,6,6,6],name:"column-four",html:p()},{sizeArray:[8,16],name:"column-two-33",html:d()},{sizeArray:[16,8],name:"column-two-66",html:m()}],j=()=>{const e=(0,x.sh)(),t=(0,x._9)();return(0,A.jsx)("div",{className:"structures blocks-search__empty-wrapper",children:(0,A.jsx)("div",{className:"structures__list",children:(0,A.jsx)("div",{children:f&&f.map(((o,s)=>(0,A.jsx)("div",{children:(0,A.jsx)("div",{className:"structures__item",draggable:!0,onClick:t=>e(t,o.html),onDragStart:e=>t(e,o.html),children:(0,A.jsx)(i.A,{gutter:[6,6],className:"structures__item-row",children:o.sizeArray.map(((e,t)=>(0,A.jsx)(l.A,{span:e,children:(0,A.jsx)("div",{className:"structures__item-col"})},o.name+t)))})})},o.name)))})})})}},85291:(e,t,o)=>{o.d(t,{A:()=>j});o(92810);var i=o(2018),l=o(7744),s=o(69029),r=o.n(s),a=o(41579),d=o.n(a),n=o(70869),m=o.n(n),c=o(8456),u=o.n(c),h=o(20931),b=o.n(h),g=o(24186),p=o.n(g),x=o(32269),A=(o(13591),o(70082));const f=[{sizeArray:[24],name:"column-one",html:r()},{sizeArray:[12,12],name:"column-two-50",html:u()},{sizeArray:[8,8,8],name:"column-three",html:b()},{sizeArray:[6,6,6,6],name:"column-four",html:p()},{sizeArray:[8,16],name:"column-two-33",html:d()},{sizeArray:[16,8],name:"column-two-66",html:m()}],j=()=>{const e=(0,x.sh)(),t=(0,x._9)();return(0,A.jsx)("div",{className:"structures blocks-search__empty-wrapper",children:(0,A.jsx)("div",{className:"structures__list",children:(0,A.jsx)("div",{children:f&&f.map(((o,s)=>(0,A.jsx)("div",{children:(0,A.jsx)("div",{className:"structures__item",draggable:!0,onClick:t=>e(t,o.html),onDragStart:e=>t(e,o.html),children:(0,A.jsx)(i.A,{gutter:[6,6],className:"structures__item-row",children:o.sizeArray.map(((e,t)=>(0,A.jsx)(l.A,{span:e,children:(0,A.jsx)("div",{className:"structures__item-col"})},o.name+t)))})})},o.name)))})})})}},57903:(e,t,o)=>{o.d(t,{A:()=>u});o(92810);var i=o(59018),l=o.n(i),s=o(23287),r=o(71157),a=o(17581),d=o(55701),n=o(32269),m=o(70082);const c=({element:e})=>{const{__:t,_x:o}=(0,s.s9)(),[i]=(0,a.dN)(),[l]=(0,d.OZ)(),c=(0,r.hN)(),u=(e,i)=>{if(e.error)return(0,n.p6)(e,c),!1;(0,n.wB)(t("The ")+(i.hasOwnProperty("type")?t("block"):o("email","letter"))+" "+t("\u201c")+e.data.title+t("\u201d")+t("was successfully")+" "+(i.lock?i.hasOwnProperty("type")?o("unlocked.","block"):o("unlocked.","email"):i.hasOwnProperty("type")?o("locked.","block"):o("locked.","email")),c)};return(0,m.jsx)("div",{className:e.hasOwnProperty("type")?"em-analytics__block-lock":"em-analytics__email-lock",onClick:()=>{e.hasOwnProperty("type")?l({blockId:e.id,lock:!e.lock}).then((t=>{u(t,e)})):i({emailId:e.id,lock:!e.lock}).then((t=>{u(t,e)}))},children:e.lock?t("Unlock"):t("Lock")})};c.defaultProps={element:l().shape({lock:null,id:null})};const u=c},90775:(e,t,o)=>{o.d(t,{A:()=>x});var i=o(92810),l=o(12280),s=o(14852),r=o(43005),a=o(2018),d=o(7744),n=o(55039),m=o(71157),c=o(45934),u=o(23287),h=o(64936),b=o(32269),g=o(40869),p=o(70082);const x=({isModalVisible:e,userEmail:t,subscriptionRequest:o,userName:x,currentPlane:A})=>{const{__:f}=(0,u.s9)(),j=(0,c.wA)(),[v]=l.A.useForm(),[_,S]=(0,g.E)(),B=(0,m.hN)(),y=()=>{j((0,h.Oo)())},w=()=>{v.validateFields().then((()=>{const e=v.getFieldsValue(!0);_(JSON.stringify(e)).then((e=>{var t,o,i;200===(null===e||void 0===e||null===(t=e.data)||void 0===t||null===(o=t.data)||void 0===o?void 0:o.status)?((0,b.wB)(null===e||void 0===e||null===(i=e.data)||void 0===i?void 0:i.message,B),y()):e.error&&(0,b.p6)(e,B)}))})).catch((e=>{console.warn(e)}))};return(0,i.useEffect)((()=>{o&&(null===v||void 0===v||v.setFieldsValue({request_tariff:o,user_name:x,user_email:t,user_tariff:A}))}),[v,o,A,x,t]),(0,p.jsx)(s.A,{title:f("Request for changing the pricing plan"),className:"blocks-modal",open:e,onOk:w,onCancel:y,centered:!0,width:572,footer:[(0,p.jsx)(r.Ay,{type:"primary",size:"large",onClick:w,disabled:S.isLoading,children:f("Send")},"submit")],forceRender:!0,children:(0,p.jsxs)(l.A,{form:v,layout:"vertical",name:"switch_to_plan_form",onFinish:w,initialValues:{request_email:t,request_phone:"",comment:"",request_tariff:o},autoComplete:"off",style:{padding:"10px 24px 0"},children:[(0,p.jsxs)(a.A,{gutter:16,children:[(0,p.jsxs)(d.A,{span:12,children:[" ",(0,p.jsx)(l.A.Item,{label:f("Email"),name:"request_email",rules:[{required:!0,message:f("Please enter your email address"),validator:(e,t)=>b.au.test(t)?Promise.resolve():Promise.reject(new Error(f("Please enter the correct email.")))}],children:(0,p.jsx)(n.A,{size:"large",placeholder:f("Email"),type:"email"})})]}),(0,p.jsxs)(d.A,{span:12,children:[" ",(0,p.jsx)(l.A.Item,{label:f("Phone number"),name:"request_phone",children:(0,p.jsx)(n.A,{size:"large",placeholder:f("Phone number")})})]})]}),(0,p.jsx)(l.A.Item,{label:f("Comment"),name:"comment",children:(0,p.jsx)(n.A.TextArea,{placeholder:f("Please add a comment to your request"),autoSize:{minRows:2}})})]})})}},4519:(e,t,o)=>{o.d(t,{A:()=>v});var i=o(92810),l=o(41919),s=o(76662),r=o(81e3),a=o(66726),d=o(43005),n=o(64617),m=o(58013),c=o(23287),u=o(98655),h=o(30961),b=o(20757),g=o(32269),p=o(85163),x=o(90070),A=o(70082);const{Content:f}=l.A,{Paragraph:j}=s.A,v=()=>{const{__:e}=(0,c.s9)(),{projectId:t,emailId:o}=(0,n.g)(),s=(0,x.p6)();let v=(0,n.Zp)();const _=s.get(p.A9.em_template_email)||o;(0,i.useEffect)((()=>{document.body.classList.remove("editor")}),[]);const S=(0,A.jsx)(A.Fragment,{children:(0,A.jsxs)(r.A,{size:10,children:[(0,A.jsx)(a.A,{title:e("To emails"),placement:"left",children:(0,A.jsx)(d.Ay,{type:"text",icon:(0,A.jsx)(m.A,{}),onClick:()=>(0,g.XZ)(v,`/projects/${t}`),shape:"circle"})}),(0,A.jsx)(j,{className:"ant-page-header-heading-title",children:e("Select email template")}),(0,A.jsx)(h.A,{isBlocks:!1,templateEmailId:_})]})}),B=(0,A.jsx)(A.Fragment,{});return(0,A.jsxs)(l.A,{className:"template-page",children:[(0,A.jsx)(b.A,{leftBlock:S,rightBlock:B}),(0,A.jsx)(f,{className:"template-page__container",children:(0,A.jsx)("div",{className:"template-page__content container",children:(0,A.jsx)(u.A,{projectId:p.p5,emailsView:p.Y$,templateEmailId:_})})})]})}},70656:(e,t,o)=>{o.d(t,{A:()=>g});var i=o(92810),l=o(37005),s=o(66726),r=o(45934),a=o(39990),d=o(62303),n=o(65983),m=o(69156),c=o(23287),u=o(45695),h=o(85163),b=o(70082);const g=()=>{var e;const{__:t}=(0,c.s9)(),o=(0,r.wA)(),[g]=(0,a.b9)(),[p,x]=(0,i.useState)(null===(e=window)||void 0===e?void 0:e.localStorage.getItem(h.V0.em_color_scheme)),A=(0,u.XW)(),f=(0,i.useCallback)(((e=null)=>{const t=e;(e=>{let t;if((0,m.Hk)(e),null===e){const e=matchMedia(h.F3).matches?h.nd:h.T;localStorage.removeItem(h.V0.em_color_scheme),t=e}else localStorage.setItem(h.V0.em_color_scheme,e),t=e;o((0,n.eX)(t===h.nd?`vs-${t}`:h.T)),(0,m.A5)(t),A({operation:h.Ru.UPDATE_PREVIEW,theme:t}),g({theme:e})})(t),x(t)}),[o,g,A]);return(0,i.useEffect)((()=>{matchMedia(h.F3).onchange=()=>f()}),[f]),(0,b.jsx)("div",{onClick:e=>e.stopPropagation(),children:(0,b.jsx)(l.A,{className:"theme-switcher",style:{cursor:"pointer",color:"var(--colorText)"},value:p,options:[{label:(0,b.jsx)(s.A,{title:t("Light theme"),children:(0,b.jsx)(d.A,{icon:"LightMode",style:{fontSize:18}})}),value:h.T},{label:(0,b.jsx)(s.A,{title:t("System theme"),children:(0,b.jsx)(d.A,{icon:"AutoMode",style:{fontSize:18}})}),value:null},{label:(0,b.jsx)(s.A,{title:t("Dark theme"),children:(0,b.jsx)(d.A,{icon:"DarkMode",style:{fontSize:18}})}),value:h.nd}],onChange:e=>f(e)})})}},54565:(e,t,o)=>{o.d(t,{A:()=>_});var i=o(92810),l=o(12280),s=o(29234),r=o(55039),a=o(28372),d=o(45934),n=o(38883),m=o.n(n),c=o(23287),u=o(17581),h=o(8493),b=o(70082);const{utm_source:g,utm_medium:p,utm_campaign:x,utm_term:A,utm_content:f}={utm_source:"utm_source",utm_medium:"utm_medium",utm_campaign:"utm_campaign",utm_term:"utm_term",utm_content:"utm_content"},j={[g]:"",[p]:"",[x]:"",[A]:"",[f]:""},v=({className:e,email:t})=>{const{__:o}=(0,c.s9)(),n=(0,d.wA)(),[v]=l.A.useForm();(0,i.useEffect)((()=>{var e,o,i,l,s;t&&v.setFieldsValue({utm_source:(null===(e=t.utm_parameters)||void 0===e?void 0:e.utm_source)||"",utm_medium:(null===(o=t.utm_parameters)||void 0===o?void 0:o.utm_medium)||"",utm_campaign:(null===(i=t.utm_parameters)||void 0===i?void 0:i.utm_campaign)||"",utm_term:(null===(l=t.utm_parameters)||void 0===l?void 0:l.utm_term)||"",utm_content:(null===(s=t.utm_parameters)||void 0===s?void 0:s.utm_content)||""})}),[v,t]);return(0,b.jsx)("div",{className:m()("settings-panel",{[e]:e}),children:(0,b.jsxs)(l.A,{form:v,layout:"vertical",name:"settings_panel_form_utm",initialValues:j,onValuesChange:e=>{const o=Object.keys(e)[0];switch(o){case g:t.isNew?n((0,h.K3)(e[o])):n(u.GY.util.updateQueryData("getEmail",t.id,(t=>{Object.assign(t,{utm_parameters:{...t.utm_parameters,utm_source:e[o]}})})));break;case p:t.isNew?n((0,h.ol)(e[o])):n(u.GY.util.updateQueryData("getEmail",t.id,(t=>{Object.assign(t,{utm_parameters:{...t.utm_parameters,utm_medium:e[o]}})})));break;case x:t.isNew?n((0,h.P3)(e[o])):n(u.GY.util.updateQueryData("getEmail",t.id,(t=>{Object.assign(t,{utm_parameters:{...t.utm_parameters,utm_campaign:e[o]}})})));break;case A:t.isNew?n((0,h.zH)(e[o])):n(u.GY.util.updateQueryData("getEmail",t.id,(t=>{Object.assign(t,{utm_parameters:{...t.utm_parameters,utm_term:e[o]}})})));break;case f:t.isNew?n((0,h.mk)(e[o])):n(u.GY.util.updateQueryData("getEmail",t.id,(t=>{Object.assign(t,{utm_parameters:{...t.utm_parameters,utm_content:e[o]}})})));break;default:return}},autoComplete:"off",children:[(0,b.jsx)(s.A,{message:o("The specified parameters will be added to all links when exporting the email."),type:"info",showIcon:!0,style:{marginBottom:20}}),(0,b.jsx)(l.A.Item,{label:o("utm_source"),name:g,tooltip:{title:o("Mandatory. Indicates the traffic source. Example: utm_source=google"),icon:(0,b.jsx)(a.A,{})},children:(0,b.jsx)(r.A,{placeholder:o("google")})}),(0,b.jsx)(l.A.Item,{label:o("utm_medium"),name:p,tooltip:{title:o("Identifies what type of link was used, such as cost per click or email. For example: utm_medium=cpc"),icon:(0,b.jsx)(a.A,{})},children:(0,b.jsx)(r.A,{placeholder:o("cpc")})}),(0,b.jsx)(l.A.Item,{label:o("utm_campaign"),name:x,tooltip:{title:o("Indicates a specific product promotion or a marketing campaign. Example: utm_campaign=spring_sale"),icon:(0,b.jsx)(a.A,{})},children:(0,b.jsx)(r.A,{placeholder:o("spring_sale")})}),(0,b.jsx)(l.A.Item,{label:o("utm_term"),name:A,tooltip:{title:o("Identifies search terms. For example: utm_term=running+shoes"),icon:(0,b.jsx)(a.A,{})},children:(0,b.jsx)(r.A,{placeholder:o("running+shoes")})}),(0,b.jsx)(l.A.Item,{label:o("utm_content"),name:f,tooltip:{title:o("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:(0,b.jsx)(a.A,{})},children:(0,b.jsx)(r.A,{placeholder:o("textlink")})})]})})};v.defaultProps={className:"",email:void 0};const _=v},5559:(e,t,o)=>{o.d(t,{A:()=>_});var i=o(92810),l=o(76662),s=o(43005),r=o(4800),a=o(55039),d=o(66726),n=o(45934),m=o(38883),c=o.n(m),u=o(23287),h=o(77532),b=o(62303),g=o(64936),p=o(95679),x=o(56991),A=o(85163),f=o(85677),j=o(70082);const{Text:v}=l.A,_=({onChange:e,value:t,validateStatus:o,placeholder:l,disabled:m,name:_,elementSettings:S,imageInfo:B})=>{const y=(0,x.rD)(),{__:w}=(0,u.s9)(),[k,R]=(0,i.useState)({width:"",height:"",size:""});let P=(0,n.wA)();const N=(0,n.d4)(h.js),T=(0,n.d4)(h.Uf),E=(0,n.d4)(h.Ac),[I]=(0,p.FQ)();(0,i.useEffect)((()=>{I(t).then((({data:e})=>{e&&R({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,i.useEffect)((()=>{m||(_.startsWith("src")&&N&&((null===S||void 0===S?void 0:S.type)!==A.bV.CAROUSEL||T===_)?e(N):"backgroundImage"!==_||!E||(null===S||void 0===S?void 0:S.type)===A.bV.CAROUSEL&&T!==_||e(E),P((0,h.BK)()))}),[N,T,E,e,_,P,m,null===S||void 0===S?void 0:S.type]);const C=(e=null)=>{_.startsWith("src")?(P((0,h.Yw)(_)),P((0,h.tm)(t)),P((0,g.qf)(e||A.lx.UPLOAD_IMAGE_MODAL))):_.startsWith("backgroundImage")&&(P((0,h.Yw)(_)),P((0,h.e_)(t)),P((0,g.qf)(e||A.lx.UPLOAD_BACKGROUND_MODAL)))},L=[{label:w("Upload"),key:"Upload",onClick:()=>C(_.startsWith("src")?A.lx.UPLOAD_IMAGE_MODAL_UPLOAD:A.lx.UPLOAD_BACKGROUND_MODAL_UPLOAD)},{label:w("Stock"),key:"Stock",onClick:()=>C(_.startsWith("src")?A.lx.UPLOAD_IMAGE_MODAL_STOCK:A.lx.UPLOAD_BACKGROUND_MODAL_STOCK)},{label:w("GIF"),key:"GIF",onClick:()=>C(_.startsWith("src")?A.lx.UPLOAD_IMAGE_MODAL_GIF:A.lx.UPLOAD_BACKGROUND_MODAL_GIF)},{label:w("AI"),key:"AI",onClick:()=>C(_.startsWith("src")?A.lx.UPLOAD_IMAGE_MODAL_AI:A.lx.UPLOAD_BACKGROUND_MODAL_AI)}];return(0,j.jsx)("div",{className:c()("upload-bg-image",{"upload-bg-image_disabled":m}),children:!t||t&&"error"===o?(0,j.jsxs)(s.Ay,{type:"default",block:!0,onClick:()=>C(_.startsWith("src")?A.lx.UPLOAD_IMAGE_MODAL_UPLOAD:A.lx.UPLOAD_BACKGROUND_MODAL_UPLOAD),children:[(0,j.jsx)(b.A,{icon:"Image",style:{fontSize:20,verticalAlign:"text-top"}}),w("Add image")]}):(0,j.jsxs)("div",{className:"ant-input-file-uploader upload-bg-image__inner-wrap",onClick:e=>{var t,o,i,l;null!==(t=e.target)&&void 0!==t&&t.closest(".upload-bg-image__edit")||null!==(o=e.target)&&void 0!==o&&o.closest(".upload-bg-image__edit-menu")||null!==(i=e.target)&&void 0!==i&&i.closest(".upload-bg-image__menu")||null!==(l=e.target)&&void 0!==l&&l.closest(".inputGroup")||C(_.startsWith("src")?A.lx.UPLOAD_IMAGE_MODAL_UPLOAD:A.lx.UPLOAD_BACKGROUND_MODAL_UPLOAD)},children:[(0,j.jsx)(r.A,{arrow:!0,dropdownRender:()=>(0,j.jsx)("div",{className:"inputGroup",children:(0,j.jsx)(a.A,{prefix:(0,j.jsx)(b.A,{icon:"Image",style:{fontSize:20,verticalAlign:"text-top"}}),allowClear:!0,onChange:e,value:t,placeholder:l,name:_,disabled:m,className:"upload-bg-image__input"})}),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"),children:(0,j.jsxs)("div",{className:"upload-bg-image__hover-container",style:{display:"flex",alignItems:"center"},children:[(0,j.jsx)("div",{className:"upload-bg-image__uploader",children:(0,j.jsx)("div",{className:"upload-bg-image__uploader-content",children:(0,j.jsxs)("div",{className:"upload-bg-image__uploader-content-inner",children:[(0,j.jsx)("div",{className:"upload-bg-image__uploader-img-wrap",children:(0,j.jsx)("img",{className:"upload-bg-image__uploader-img",src:t,alt:""})}),(0,j.jsx)("div",{className:"upload-bg-image__uploader-icons-wrap",children:(0,j.jsx)("div",{className:"upload-bg-image__uploader-content"})})]})})}),k.width&&k.height?(0,j.jsxs)("div",{className:"image-size",children:[k.width," \xd7 ",k.height,!!S&&(S.type===A.bV.IMG||S.type===A.bV.CAROUSEL)&&" \u2192 "+B.renderedWidth+" \xd7 "+B.renderedHeight,(0,j.jsx)("span",{className:"image-size-splitter",children:" \xa0\u2022\xa0 "}),(0,j.jsxs)("span",{children:[k.size," ",w("kB")]}),k.format&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("span",{className:"image-size-splitter",children:" \xa0\u2022\xa0 "}),(0,j.jsx)("span",{className:"image-size-format",children:k.format})]})]}):(0,j.jsx)(v,{type:"secondary",className:"image-empty-text",children:l})]})}),(0,j.jsx)("div",{style:{flexGrow:1}}),"gif"!==k.format&&y.imageCenterEditorEnabled&&(0,j.jsx)(d.A,{title:w("Edit"),children:(0,j.jsx)(v,{type:"link",className:"upload-bg-image__edit",children:(0,j.jsx)(f.A,{style:{fontSize:16},onClick:e=>{C(),P((0,g.Wz)(A.lx.IMAGE_EDITOR_MODAL))}})})}),(0,j.jsx)(r.A,{arrow:{pointAtCenter:!0},placement:"bottom",menu:{items:L},overlayClassName:"upload-bg-image__menu",children:(0,j.jsx)(v,{type:"link",className:"upload-bg-image__edit-menu image-change",children:!t||t&&"error"===o?w("Upload"):(0,j.jsx)(b.A,{style:{fontSize:20},icon:"Reload"})})},"Actions")]})})}},9589:()=>{},37981:()=>{},13591:()=>{}}]);