1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`20260924-39003-d97a9715`},e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:textmagic-web-app":!0});var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`9b53fd29-d31e-4cfc-929e-ffd258071641`,e._sentryDebugIdIdentifier=`sentry-dbid-9b53fd29-d31e-4cfc-929e-ffd258071641`)}catch{}})();import{Cr as e,Or as t,Vn as n}from"./DLkVZSuR.js";import{A as r,At as i,Ct as a,D as o,E as s,F as c,Ft as l,H as u,K as d,L as f,Nt as p,O as m,P as h,Qt as g,U as _,Vt as v,Wt as y,Z as b,_ as x,ct as S,dn as C,dt as ee,f as te,gn as w,gt as T,it as E,k as D,kt as O,lt as k,m as ne,pn as A,tt as re,ut as j,vt as M,wt as ie,x as N,yt as P}from"./B_mscWxu.js";import{Bm as ae,Cm as F,Go as I,Mo as oe,dl as L,hp as se,jo as R,mr as ce,om as le,pr as ue,so as de,tm as fe,um as pe,xp as me,ym as z}from"./Cf_pgd7T.js";import{Ko as he,Na as ge,Vc as _e,Vf as ve,ep as B,js as ye,pc as be,zr as xe}from"./BmC5PC1V.js";import{a as V}from"./BdV1yl7S.js";import{Ar as H}from"./HxBUjrm7.js";import{Q as Se,_ as Ce}from"./TOafxiyp.js";import{n as we,t as Te}from"./WKYXWZrj.js";import{H as Ee,J as U,q as W}from"./BGPWR1KF.js";import{t as De}from"./NRYWtru9.js";import{I as Oe,f as ke,p as Ae}from"./B3iWy3R1.js";import{t as je}from"./j5WDZqmw.js";import{Lr as Me,di as G}from"./index_Dp5kRkmW.js";import{a as Ne}from"./B686B0cY2.js";import{c as Pe}from"./D9E7SP-p2.js";import{n as Fe}from"./D3asB4kd2.js";import{t as Ie}from"./BOx7c-0m.js";import{a as Le,c as Re,i as ze,l as K,o as q,r as Be,s as Ve}from"./DdTNtU2x.js";import{t as He}from"./GJYGMb5P.js";import{o as Ue}from"./sBg_9Zy1.js";import{o as We}from"./CnFcieTQ.js";import{t as Ge}from"./IT7FqiZF2.js";import{f as Ke,h as qe}from"./B3o38Pa52.js";import{t as Je}from"./BjPKMOIJ2.js";import{c as Ye}from"./CG_jGskJ.js";import{t as Xe}from"./kBJF90_8.js";import{n as Ze,t as Qe}from"./B4Sf4Bz2.js";import{r as $e,t as et}from"./B85OK2ik.js";import{t as tt}from"./t8x-fDq_.js";import{t as nt}from"./DvqRK0EP2.js";import{t as rt}from"./D2f3YgLu.js";import{t as it}from"./MyQrc0bo.js";import{i as at,n as ot,r as st,t as ct}from"./DqERRJhF.js";import{t as lt}from"./B7-5arKn.js";import{n as ut}from"./DtS6AXWs.js";import{t as dt}from"./CmvZljGs.js";import{t as ft}from"./B5bd9HLg.js";u();var pt=e=>{let t=_e(),{updateTotalCost:n}=Ue(),r=[`message`,`recipients`],i=s(()=>t.getProperty(`loading`)||[]),a=s(()=>!e.value&&i.value.some(e=>r.includes(e))),o=s(()=>t.getProperty(`total`)??0),c=s(()=>e.value?0:o.value);return P(o,()=>{n()},{immediate:!0}),{showPriceSpinner:a,totalCost:c}};u();var mt=f({components:{TmTranslate:L,TmAlert:G}
1,props:{keypath:{type:String,default:`messagesSendFormWarnings.shortLink`},domain:{type:String}}});g(),u();var ht={class:`body-text-semi-bold-14`};function gt(e,t,n,r,i,s){let l=j(`tm-translate`),u=j(`tm-alert`);return E(),m(u,{class:`warning`,size:`small`,"is-reduced":``},{default:a(()=>[c(l,{keypath:e.keypath},{domain:a(()=>[o(`span`,ht,w(e.domain),1)]),_:1},8,[`keypath`])]),_:1})}var _t=V(mt,[[`render`,gt]]);u();var vt=f({components:{TmAlert:G},props:{keypath:{type:String,default:`messagesSendFormWarnings.maxLength`}}});g(),u();function yt(e,t,n,r,i,o){let s=j(`tm-alert`);return E(),m(s,{class:`warning`,size:`small`,"is-reduced":``},{default:a(()=>[h(w(e.$t(e.keypath)),1)]),_:1})}var bt=V(vt,[[`render`,yt]]);u(),O(),g();var xt={key:0},St=V(f({__name:`ComposeUnicodeAlert`,props:{unicodeChars:{},maximumUnicodeChars:{default:3}},setup(e){let t=e,n=s(()=>t.unicodeChars.length),i=s(()=>t.unicodeChars.slice(0,t.maximumUnicodeChars)),l=s(()=>n.value-t.maximumUnicodeChars),u=s(()=>l.value>0);return(e,t)=>{let n=ee(`safe-html`);return E(),m(G,{class:`compose-unicode-alert info`,size:`small`,"is-reduced":``},{default:a(()=>
1[c(L,{keypath:`messagesSendFormWarnings.unicode`},{"unicode-chars":a(()=>[(E(!0),r(N,null,S(y(i),(e,i)=>(E(),r(`span`,{key:`char-${i}`,class:C({"compose-unicode-alert--no-others":!y(u)})},[ie(o(`b`,null,null,512),[[n,e]]),t[0]||(t[0]=o(`span`,{class:`compose-unicode-alert__comma`},`,`,-1))],2))),128))]),others:a(()=>[y(u)?(E(),r(`span`,xt,`\xA0`)):D(``,!0),y(u)?(E(),m(L,{key:1,count:y(l),keypath:`messagesSendFormWarnings.unicodeOthers`},{"others-length":a(()=>[h(w(y(l)),1)]),_:1},8,[`count`])):D(``,!0)]),"learn-more":a(()=>[c(je,{href:y(ke),text:e.$t(`common.learnMore`)},null,8,[`href`,`text`])]),_:1})]),_:1})}}}),[[`__scopeId`,`data-v-66bc7fbd`]]);u(),g(),O();var Ct=f({__name:`ComposeMessagePartsAlert`,props:{parts:{}},setup(e){return(t,n)=>(E(),m(G,{class:`info`,size:`small`,"is-reduced":``},{default:a(()=>[c(L,{keypath:`messagesSendFormWarnings.multipleParts`},{parts:a(()=>[o(`b`,null,w(t.$t(`messagesSendFormWarnings.parts`,{count:e.parts})),1)]),"learn-more":a(()=>[c(je,{href:y(Ae),text:t.$t(`common.learnMore`)},null,8,[`href`,`text`])]),_:1})]),_:1}))}});u(),O();var wt={class:`compose-alerts`},Tt=V(f({__name:`ComposeAlerts`,props:{isMaxLength:{type:Boolean},showShortLinkAlert:{type:Boolean},smsInfo:{},shortLink:{}},setup(e){let t=e,n=s(()=>t.smsInfo.parts>1);return(t,i)=>(E(),r(`div`,wt,[e.isMaxLength?(E(),m(bt,{key:0,class:`compose-alerts__alert`})):D(``,!0),e.showShortLinkAlert?(E(),m(_t,{key:1,class:`compose-alerts__alert`,domain:e.shortLink},null,8,[`domain`])):D(``,!0),e.smsInfo.isUnicodeText?(E(),m(St,{key:2,"unicode-chars":e.smsInfo.unicodeChars,class:`compose-alerts__alert`},null,8,[`unicode-chars`])):D(``,!0),y(n)?(E(),m(Ct,{key:3,parts:e.smsInfo.parts,class:`compose-alerts__alert`},null,8,[`parts`])):D(``,!0)]))}}),[[`__scopeId`,`data-v-dcc1cd0f`]]);u(),O();var Et=f({components:{ComposeAlerts:Tt,ComposePartsHint:tt,ComposeCharactersHint:et,TmDelimitedList:Xe,ComposeTotalCostHint:Qe,ComposeHint:rt,FieldMessageEditor:Ze},props:{...we,modelValue:{type:Object,required:!0},errorState:{type:Boolean},editorProps:{type:Object},ignoreError:{type:Boolean},costHintHidden:{type:Boolean},tabIndex:{type:String},processContentOnCreate:{type:Boolean}},emits:{...Ee(),input:e=>!0,blur:()=>!0,"internally-valid-change":e=>!0},setup(e,t){let n=l(!1),r=()=>{n.value=!0},i=_(`formId`),{modelValue:a}=v(e),{shortLink:o,isMaxLength:c,isLargeBulkSession:u,smsInfo:d,updateMessage:f}=Ue(),p=_e(),m=s(()=>!!p.getProperty(`americanRecipientsCount`)),h=l([]),g=s(()=>!d.value.chars),y=s(()=>p.isApproximatePrice(a.value)),{showPriceSpinner:b,totalCost:x}=pt(g),S=s(()=>(u.value||m.value)&&!!o.value);return P([c,S],e=>{t.emit(`internally-valid-change`,!e.includes(!0))},{immediate:!0}),P(()=>e.modelValue,()=>{f(Ie(e.modelValue))},{immediate:!0}),{ErrorPositions:Te,formId:i,availableTags:h,isApproximatePrice:y,shortLink:o,showShortLinkAlert:S,isMaxLength:c,showPriceSpinner:b,totalCost:x,smsInfo:d,isDirtyField:n,onInput:r}}});u();function Dt(e,t,n,i,o,s){let l=j(`field-message-editor`),u=j(`compose-characters-hint`),d=j(`compose-parts-hint`),f=j(`compose-total-cost-hint`),p=j(`tm-delimited-list`),h=j(`compose-hint`),g=j(`compose-alerts`);return E(),r(`div`,null,[c(l,{"error-position":e.ErrorPositions.OUTSIDE,"editor-id":e.formId,"model-value":e.modelValue,errors:e.errors,"error-state":e.errorState,"editor-props":e.editorProps,placeholder:e.$t(`messagesSen
1dForm.messagePlaceholder`),"tab-index":e.tabIndex,"process-content-on-create":e.processContentOnCreate,"onUpdate:modelValue":t[0]||(t[0]=t=>e.$emit(`update:model-value`,t)),onInput:e.onInput,onPaste:e.onInput,onBlur:t[1]||(t[1]=t=>e.$emit(`blur`))},{error:a(()=>[k(e.$slots,`error`,{},void 0,!0)]),_:3},8,[`error-position`,`editor-id`,`model-value`,`errors`,`error-state`,`editor-props`,`placeholder`,`tab-index`,`process-content-on-create`,`onInput`,`onPaste`]),c(h,{class:`mt-1`},{default:a(()=>[c(p,{delimiter:` | `},{default:a(()=>[c(u,{"sms-info":e.smsInfo},null,8,[`sms-info`]),c(d,{"is-dirty":e.isDirtyField,"sms-info":e.smsInfo},null,8,[`is-dirty`,`sms-info`]),e.costHintHidden?D(``,!0):(E(),m(f,{key:0,keypath:`common.costWithColon`,loading:e.showPriceSpinner,"approximate-price":e.isApproximatePrice,"total-cost":e.totalCost},null,8,[`loading`,`approximate-price`,`total-cost`]))]),_:1})]),_:1}),c(g,{"is-max-length":e.isMaxLength,"show-short-link-alert":e.showShortLinkAlert,"short-link":e.shortLink,"sms-info":e.smsInfo},null,8,[`is-max-length`,`show-short-link-alert`,`short-link`,`sms-info`]),k(e.$slots,`alerts`,{},void 0,!0)])}var Ot=V(Et,[[`render`,Dt],[`__scopeId`,`data-v-3b044277`]]),kt=`/** 2Can't use variables here: imports as raw text! 3Used in shadow dom 4 */ 5 6@keyframes q-skeleton--wave { 7 0% { 8 transform: translateX(-100%); 9 } 10 100% { 11 transform: translateX(100%); 12 } 13} 14 15body { 16 margin: 0; 17 padding: 0; 18 min-height: 100%; 19 height: auto; 20 box-sizing: border-box; 21 display: flex; 22 flex-direction: column 23} 24 25.tm-skeleton { 26 background: #ebeef5; 27 max-width: 100%; 28 position: relative; 29 overflow: hidden; 30 z-index: 1; 31 cursor: wait; 32 box-sizing: border-box; 33 border-radius: 4px; 34} 35 36.tm-skeleton::after { 37 content: ''; 38 position: absolute; 39 top: 0; 40 right: 0; 41 bottom: 0; 42 left: 0; 43 z-index: 0; 44 background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)); 45 animation: q-skeleton--wave 1500ms linear 0.5s infinite; 46} 47 48.tm-email-emoji-type-image { 49 background-size: 6100%; 50} 51 52.tm-email-emoji-type-image.tm-email-emoji-set-apple { 53 background-image: url(https://downloads.textmagic.com/email_assets/images/emoji-sprite.png); 54} 55 56mark.blur-highlight { 57 background-color: #80808045; 58 color: inherit; 59} 60 61.tiptap.selection-kept::selection { 62 background-color: transparent; 63} 64 65td.selectedCell { 66 background-color: #008cff63; 67} 68 69/** 70 * Sometimes when content is deleted from the editor, an empty span remains, which for some reason is not deleted and does not occupy any space. 71 * Since there is some content in the editor, Tiptap does not add ProseMirror-trailingBreak. Therefore, the editor collapses. 72 * To prevent this from happening, we add a zero-width space for spans, which is not displayed but occupies height space. 73 */ 74.tiptap > p:nth-of-type(1) > span:not(:has(*)):before { 75 content: '\\200b'; 76} 77 78.tiptap table { 79 max-width: 100%; 80} 81 82.tiptap table td, 83.tiptap table th { 84 position: relative; 85} 86 87@starting-style { 88 .tiptap table .column-resize-handle { 89 translate: 0 100vh; 90 } 91} 92 93@keyframes appear { 94 from { 95 opacity: 0; 96 transform: scaleX(0); 97 } 98} 99 100.tiptap table .column-resize-handle { 101 background-color: #0080EA; 102 bottom: -2px; 103 pointer-events: none; 104 position: absolute; 105 right: -2px; 106 top: 0; 107 width: 3px; 108 animation: appear 300ms ease-in-out; 109} 110 111.tiptap .tableWrapper { 112 max-width: 100%; 113} 114 115.tiptap.resize-cursor { 116 cursor: ew-resize; 117 cursor: col-resize; 118} 119 120.tm-editor-image__replace-button { 121 padding: 5px; 122 border: none; 123 border-radius: 4px; 124 background-color: rgba(233, 233, 234, 0.8); 125 position: absolute; 126 cursor: pointer; 127 display: flex; 128 flex-direction: row; 129 flex-wrap: nowrap; 130 align-items: center; 131 top: calc(100% + 8px); 132} 133.tm-editor-image__replace-button:hover, 134.tm-editor-image__replace-button:active { 135 background-color: #e9e9ea; 136} 137 138.ProseMirror-separator { 139 float: left !important; 140 display: inline !important; 141 height: 0 !important; 142 border: none !important; 143 margin: 0 !important; 144} 145`;u(),O();var At=V(f({__name:`TmTiptapShadowRootMountPoint`,props:{editorId:{}},setup(e,{expose:t}){let n=M(`shadowRootWrapper`),i=l(),{getEditorOrNull:a}=q(e.editorId),o=()=>{let e=y(n);if(!e)return;let t=e.attachShadow({mode:`open`}),r=t.ownerDocument.createElement(`body`);r.setAttribute(`spellcheck`,`true`);let a=t.ownerDocument.createElement(`div`);a.classList.add(`editor-content`,`tm-tiptap-shadow-root-editor`),a.setAttribute(`spellcheck`,`true`),a.style.position=`relative`,a.style.flexGrow=`1`,a.style.display=`flex`,a.style.flexDirection=`column`,r.appendChild(a),t.appendChild(r);let o=t.ownerDocument.createElement(`style`);o.innerHTML=kt,t.prepend(o),i.value=a},s=()=>{a()?.commands.focus()};return re(()=>{o()}),b(()=>{a()?.destroy()}),t({editorWrapperRef:i}),(e,t)=>(E(),r(`div`,{ref:`shadowRootWrapper`,class:`tm-tiptap-shadow-root-editor`,onClick:s},null,512))}}),[[`__scopeId`,`data-v-9d67a9df`]]);u();var jt=f({__name:`TmEmailEditorModeSelect`,props:{modelValue:{default:H.VISUAL},modelModifiers:{}},emits:[`update:modelValue`],setup(e){let t=T(e,`modelValue`),n=[{value:H.VISUAL,label:`Visual`},{value:H.HTML,label:`HTML`}];return(e,r)=>(E(),m(de,{modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=e=>t.value=e),options:n,ripple:!1},null,8,[`modelValue`]))}});u();var Mt={},Nt={class:`tm-email-editor-header`};function Pt(e,t){return E(),r(`div`,Nt,[k(e.$slots,`default`,{},void 0,!0)])}var Ft=V(Mt,[[`render`,Pt],[`__scopeId`,`data-v-e2a64c1c`]]);u(),g();var J=f({__name:`TmEditorBaseButton`,props:{icon:{},tooltipMessagePath:{},isActive:{type:Boolean},disabled:{type:Boolean},color:{default:`transparent`},noBorder:{type:Boolean,default:!0},tooltipDelay:{default:1e3}},emits:[`click`],setup(e){return(t,n)=>(E(),m(F,{flat:``,"icon-only":``,size:`medium`,color:e.color,"no-border":e.noBorder,disable:e.disabled,clicked:e.isActive,onClick:n[0]||(n[0]=e=>t.$emit(`click`))},{default:a(()=>[k(t.$slots,`default`,{},()=>[e.icon?(E(),m(z,{key:0,size:`xLarge`,name:e.icon},null,8,[`name`])):D(``,!0)]),e.tooltipMessagePath?(E(),m(fe,{key:0,delayed:``,"hide-arrow":``,"delay-time":e.tooltipDelay},{default:a(()=>[h(w(t.$t(e.tooltipMessagePath)),1)]),_:1},8,[`delay-time`])):D(``,!0),k(t.$slots,`append`)]),_:3},8,[`color`,`no-border`,`disable`,`clicked`]))}});u(),O();var Y=f({__name:`TmEditorFormattingButton`,props:{editorId:{},command:{},icon:{},tooltipMessagePath:{},toggleAction:{type:Function},isActive:{type:Function},disabled:{type:Boolean}},setup(e){let t=e,{toggleRichEditorCommand:n,activeExtensions:r,waitForEditor:i,getEditorOrNull:a}=q(t.editorId),o=()=>
145{if(!t.toggleAction&&!t.command)throw new xe(`Please specify either toggleAction or command`);if(t.toggleAction){i().then(t.toggleAction);return}n(t.command)},c=s(()=>{let e=a();return t.isActive&&e?t.isActive(e):r.value.has(t.command)});return(t,n)=>(E(),m(J,{icon:e.icon,"tooltip-message-path":e.tooltipMessagePath??`richEditor.formats.${e.command}`,"is-active":y(c),disabled:e.disabled,onClick:o},null,8,[`icon`,`tooltip-message-path`,`is-active`,`disabled`]))}});u(),O();var It={class:`tm-editor-link-button`},Lt=V(f({__name:`TmEditorLinkButton`,props:{editorId:{},disabled:{type:Boolean,default:!1}},setup(e){let{activeExtensions:t}=q(e.editorId),n=l(!1);return(i,o)=>(E(),r(`div`,It,[c($e,{visible:y(n),"editor-id":e.editorId,large:``,onClose:o[0]||(o[0]=e=>n.value=!1),onShow:o[1]||(o[1]=e=>n.value=!0)},{default:a(()=>[c(J,{icon:`link`,"tooltip-message-path":`richEditor.formats.link`,"is-active":y(n)||y(t).has(`link`),disabled:e.disabled},null,8,[`is-active`,`disabled`])]),_:1},8,[`visible`,`editor-id`])]))}}),[[`__scopeId`,`data-v-2be2347b`]]);u(),O();var Rt=f({__name:`TmEditorUploadImageButton`,props:{editorId:{},disabled:{type:Boolean,default:!1}},setup(e){let{commands:{uploadInsertedImage:t},getEditorOrFail:n}=q(e.editorId),{openFileExplorer:r}=Ge({onFilePicked:async e=>{let{activeMode:r,editorView:i}=qe(n()).getStorage();if(r===H.VISUAL){await t(e);return}let{from:a,to:o}=i.state.selection.ranges[0];i.setReadonly(!0);let{url:s}=await ut(e);i.dispatch({changes:{from:a,to:o,insert:s},selection:{anchor:a+1}}),i.setReadonly(!1)},accept:[`image/*`]});return(t,n)=>(E(),m(J,{icon:`image`,"tooltip-message-path":`tickets.ticketMessageEditor.insertImage`,disabled:e.disabled,onClick:y(r)},null,8,[`disabled`,`onClick`]))}});u();var zt={},Bt={class:`tm-wysiwyg-editor-header-divider`};function Vt(e,t){return E(),r(`div`,Bt)}var X=V(zt,[[`render`,Vt],[`__scopeId`,`data-v-7cdcd9ba`]]);u(),g();var Ht={class:`table-settings__segment`},Ut={class:`table-settings__segment-header`},Wt={class:`table-settings__segment-body`},Z=V(f({__name:`TmEditorTableSettingsSegment`,props:{title:{}},setup(e){return(t,n)=>
145(E(),r(`div`,Ht,[o(`div`,Ut,w(e.title),1),o(`div`,Wt,[k(t.$slots,`default`,{},void 0,!0)])]))}}),[[`__scopeId`,`data-v-db1b8048`]]);u(),O(),g();var Gt={class:`tm-editor-color-button align-self-center`},Q=f({__name:`TmEditorColorBaseButton`,props:d({icon:{},activeColor:{default:``},tooltipMessagePath:{},disabled:{type:Boolean,default:!1},automaticBorder:{type:Boolean,default:!1},tooltipDelay:{}},{modelValue:{default:``},modelModifiers:{}}),emits:d([`clear`],[`update:modelValue`]),setup(e,{emit:t}){let n=t,i=T(e,`modelValue`),o=!1,l=()=>{o=!0,n(`clear`)},u=e=>{if(o){o=!1;return}i.value=e},d=s(()=>e.automaticBorder?Fe(i.value,.9):!1);return(t,n)=>(E(),r(`div`,Gt,[c(Ne,{"model-value":i.value,"popup-class":`tm-editor-color-button__color-picker`,format:`hex`,"onUpdate:modelValue":u},{default:a(()=>[c(J,{color:y(d)?`default`:`transparent`,"no-border":!y(d),icon:e.icon,disabled:e.disabled,"tooltip-message-path":e.tooltipMessagePath,style:A({color:e.activeColor}),"tooltip-delay":e.tooltipDelay},null,8,[`color`,`no-border`,`icon`,`disabled`,`tooltip-message-path`,`style`,`tooltip-delay`])]),extra:a(()=>[c(F,{size:`medium`,class:`w100pr`,onClick:l},{default:a(()=>[h(w(t.$t(`common.clear`)),1)]),_:1})]),_:1},8,[`model-value`])]))}});u();var Kt={class:`table-settings`},qt=V(f({__name:`TmEditorTableSettings`,props:{isRowActive:{type:Boolean},isCellActive:{type:Boolean},tableBorderColor:{},tableBgColor:{},cellBorderColor:{},cellBgColor:{}},emits:[`delete-table`,`delete-row`,`delete-column`,`add-column-before`,`add-column-after`,`add-row-before`,`add-row-after`,`split-cell`,`merge-cells`,`update-table-border-color`,`update-table-bg-color`,`update-cell-border-color`,`update-cell-bg-color`],setup(e){return(t,n)=>(E(),r(`div`,Kt,[c(Z,{title:t.$t(`emailEditor.table.table`)},{default:a(()=>[c(Q,{"automatic-border":``,icon:`tmi-table-border-color`,"model-value":e.tableBorderColor,"active-color":e.tableBorderColor,"tooltip-message-path":`emailE
145ditor.table.tableBorderColor`,"tooltip-delay":300,"onUpdate:modelValue":n[0]||(n[0]=e=>t.$emit(`update-table-border-color`,e)),onClear:n[1]||(n[1]=e=>t.$emit(`update-table-border-color`,`unset`))},null,8,[`model-value`,`active-color`]),c(Q,{"automatic-border":``,icon:`tmi-background-color`,"model-value":e.tableBgColor,"active-color":e.tableBgColor,"tooltip-message-path":`emailEditor.table.tableBackgroundColor`,"tooltip-delay":300,"onUpdate:modelValue":n[2]||(n[2]=e=>t.$emit(`update-table-bg-color`,e)),onClear:n[3]||(n[3]=e=>t.$emit(`update-table-bg-color`,`unset`))},null,8,[`model-value`,`active-color`]),c(J,{icon:`tmi-table-remove`,"tooltip-message-path":`emailEditor.table.deleteTable`,"tooltip-delay":300,onClick:n[4]||(n[4]=e=>t.$emit(`delete-table`))})]),_:1},8,[`title`]),c(nt),e.isRowActive?(E(),m(Z,{key:0,title:t.$t(`emailEditor.table.rows`)},{default:a(()=>[c(J,{icon:`tmi-add-row-after`,"tooltip-message-path":`emailEditor.table.addRowBelow`,"tooltip-delay":300,onClick:n[5]||(n[5]=e=>t.$emit(`add-row-after`))}
145),c(J,{icon:`tmi-add-row-before`,"tooltip-message-path":`emailEditor.table.addRowAbove`,"tooltip-delay":300,onClick:n[6]||(n[6]=e=>t.$emit(`add-row-before`))}),c(J,{icon:`tmi-remove-row`,"tooltip-message-path":`emailEditor.table.removeRow`,"tooltip-delay":300,onClick:n[7]||(n[7]=e=>t.$emit(`delete-row`))})]),_:1},8,[`title`])):D(``,!0),c(nt),e.isCellActive?(E(),m(Z,{key:1,title:t.$t(`emailEditor.table.columns`)},{default:a(()=>[c(J,{icon:`tmi-add-column-before`,"tooltip-message-path":`emailEditor.table.addColumnBefore`,"tooltip-delay":300,onClick:n[8]||(n[8]=e=>t.$emit(`add-column-before`))}),c(J,{icon:`tmi-add-column-after`,"tooltip-message-path":`emailEditor.table.addColumnAfter`,"tooltip-delay":300,onClick:n[9]||(n[9]=e=>t.$emit(`add-column-after`))}),c(J,{icon:`tmi-remove-column`,"tooltip-message-path":`emailEditor.table.removeColumn`,"tooltip-delay":300,onClick:n[10]||(n[10]=e=>t.$emit(`delete-column`))})]),_:1},8,[`title`])):D(``,!0),c(nt),e.isCellActive?(E(),m(Z,{key:2,title:t.$t(`emailEditor.table.cells`)},{default:a(()=>[c(Q,{"automatic-border":``,icon:`tmi-cell-border-color`,"model-value":e.cellBorderColor,"active-color":e.cellBorderColor,"tooltip-message-path":`emailE
145ditor.table.cellBorderColor`,"tooltip-delay":300,"onUpdate:modelValue":n[11]||(n[11]=e=>t.$emit(`update-cell-border-color`,e)),onClear:n[12]||(n[12]=e=>t.$emit(`update-cell-border-color`,`unset`))},null,8,[`model-value`,`active-color`]),c(Q,{"automatic-border":``,icon:`tmi-background-color`,"model-value":e.cellBgColor,"active-color":e.cellBgColor,"tooltip-message-path":`emailEditor.table.cellBackgroundColor`,"tooltip-delay":300,"onUpdate:modelValue":n[13]||(n[13]=e=>t.$emit(`update-cell-bg-color`,e)),onClear:n[14]||(n[14]=e=>t.$emit(`update-cell-bg-color`,`unset`))},null,8,[`model-value`,`active-color`]),c(J,{icon:`tmi-split-cell`,"tooltip-message-path":`emailEditor.table.splitCell`,"tooltip-delay":300,onClick:n[15]||(n[15]=e=>t.$emit(`split-cell`))}),c(J,{icon:`tmi-merge-cells`,"tooltip-message-path":`emailEditor.table.mergeCells`,"tooltip-delay":300,onClick:n[16]||(n[16]=e=>t.$emit(`merge-cells`))})]),_:1},8,[`title`])):D(``,!0)]))}}),[[`__scopeId`,`data-v-a9fc9ccd`]]);u(),O();var Jt=V(f({__name:`TmEditorTableSettingsButton`,props:{editorId:{},disabled:{type:Boolean,default:!1}},setup(e){let{activeExtensions:t,getEditorOrFail:n}=q(e.editorId),r=K(`borderColor`),i=K(`border`),o=K(`backgroundColor`),u=s(()=>t.value.has(`table`)),d=s(()=>t.value.has(`tableRow`)),f=s(()=>t.value.has(`tableCell`)),p=l(``),h=l(``),g=l(``),_=l(``),v=()=>He(n(),!0),b=(e,t,n)=>v().updateAttributes(e,{[t]:n}).run();Le(e.editorId,[`selectionUpdate`,`transaction`],({editor:e})=>{let t=e.getAttributes(`table`);p.value=t[r]||``,h.value=t[o]||``;let n=e.getAttributes(`tableCell`),i=e.getAttributes(`tableHeader`);g.value=n[r]||i[r]||``,_.value=n[o]||i[o]||``});let x=e=>{if(e===`unset`){b(`table`,i,`none`),b(`table`,r,`unset`);return}b(`table`,i,`solid 2px ${e}`),b(`table`,r,e)};return(t,n)=>(E(),m(me,{class:`align-self-center`,"close-on-content-click":!1},{menu:a(()=>[y(u)?(E(),m(qt,{key:0,class:`w160px`,"is-row-active":y(d),"is-cell-active":y(f),"table-border-color":y(p),"table-bg-color":y(h),"cell-bg-color":y(_),"cell-border-color":y(g),onDeleteTable:n[0]||(n[0]=e=>v().deleteTable().run()),onDeleteRow:n[1]||(n[1]=e=>v().deleteRow().run()),onDeleteColumn:n[2]||(n[2]=e=>v().deleteColumn().run()),onAddColumnBefore:n[3]||(n[3]=e=>v().addColumnBefore().run()),onAddColumnAfter:n[4]||(n[4]=e=>v().addColumnAfter().run()),onAddRowBefore:n[5]||(n[5]=e=>v().addRowBefore().run()),onAddRowAfter:n[6]||(n[6]=e=>v().addRowAfter().run()),onSplitCell:n[7]||(n[7]=e=>v().splitCell().run()),onMergeCells:n[8]||(n[8]=e=>v().mergeCells().run()),onUpdateTableBorderColor:x,onUpdateTableBgColor:n[9]||(n[9]=e=>b(`table`,y(o),e)),onUpdateCellBorderColor:n[10]||(n[10]=e=>b(`tableCell`,y(r),e)),onUpdateCellBgColor:n[11]||(n[11]=e=>b(`tableCell`,y(o),e))},null,8,[`is-row-active`,`is-cell-active`,`table-border-color`,`table-bg-color`,`cell-bg-color`,`cell-border-color`])):D(``,!0)]),default:a(()=>
145[c(J,{icon:`tmi-table-settings`,"tooltip-message-path":`emailEditor.table.tableSettings`,disabled:!y(u)||e.disabled},null,8,[`disabled`])]),_:1}))}}),[[`__scopeId`,`data-v-8736c3d1`]]);u(),O(),g();var Yt=[`onMouseenter`,`onClick`],Xt={class:`body-text-regular-14 text-center`},Zt=5,Qt=V(f({__name:`TmEditorAddTableMatrix`,emits:[`insert-table`],setup(e,{emit:t}){let n=t,i=p({x:1,y:1}),a=(e,t)=>{i.x=e,i.y=t},s=()=>{i.x=1,i.y=1},c=(e,t)=>{n(`insert-table`,{rows:t,cols:e,withHeaderRow:!1})};return(e,t)=>(E(),r(`div`,{class:`tm-editor-add-table-matrix`,onMouseleave:s},[(E(),r(N,null,S(Zt,e=>o(`div`,{key:`row-${e}`,class:`tm-editor-add-table-matrix__row`},[(E(),r(N,null,S(Zt,t=>o(`div`,{key:`cell-${t}`,class:C([`tm-editor-add-table-matrix__cell`,{"tm-editor-add-table-matrix__cell--hovered":y(i).x>=t&&y(i).y>=e}]),onMouseenter:n=>a(t,e),onClick:n=>c(t,e)},null,42,Yt)),64))])),64)),o(`div`,Xt,w(y(i).x)+` x `+w(y(i).y),1)],32))}}),[[`__scopeId`,`data-v-676d1e35`]]);u();var $t={class:`pa-2`},en=f({__name:`TmEditorAddTableButton`,props:{editorId:{},disabled:{type:Boolean,default:!1}},setup(e){let{getEditorOrFail:t}=q(e.editorId),n=()=>He(t(),!0),r=e=>{n().insertTable(e).run()};return(t,n)=>(E(),m(me,null,{menu:a(()=>[o(`div`,$t,[c(Qt,{onInsertTable:r})])]),default:a(()=>[c(J,{icon:`tmi-table-add`,disabled:e.disabled,"tooltip-message-path":`emailE
145ditor.table.insertTable`},null,8,[`disabled`])]),_:1}))}});u(),O();var tn={class:`tm-email-editor-header-top`},nn=V(f({__name:`TmEmailEditorHeaderTop`,props:{editorId:{},disabled:{type:Boolean,default:!1}},setup(e){let{canUndo:t,canRedo:n,undo:i,redo:a}=at(e.editorId);return(o,s)=>(E(),r(`div`,tn,[c(Y,{"editor-id":e.editorId,icon:`tmi-paste-formatted`,"tooltip-message-path":`richEditor.pasteFormatted`,disabled:e.disabled,"toggle-action":e=>e?.commands?.pasteFormatted()},null,8,[`editor-id`,`disabled`,`toggle-action`]),c(Y,{"editor-id":e.editorId,icon:`tmi-paste-plain-text`,"tooltip-message-path":`richEditor.pastePlainText`,disabled:e.disabled,"toggle-action":e=>e?.commands?.pastePlainText()},null,8,[`editor-id`,`disabled`,`toggle-action`]),c(X),c(Y,{"editor-id":e.editorId,icon:`undo`,"tooltip-message-path":`common.undo`,disabled:!y(t),"toggle-action":()=>y(i)()},null,8,[`editor-id`,`disabled`,`toggle-action`]),c(Y,{"editor-id":e.editorId,icon:`redo`,"tooltip-message-path":`common.redo`,disabled:!y(n),"toggle-action":()=>y(a)()},null,8,[`editor-id`,`disabled`,`toggle-action`]),c(X),c(Rt,{"editor-id":e.editorId},null,8,[`editor-id`]),c(Lt,{"editor-id":e.editorId,disabled:e.disabled},null,8,[`editor-id`,`disabled`]),c(X),c(en,{class:`align-self-center`,"editor-id":e.editorId,disabled:e.disabled},null,8,[`editor-id`,`disabled`]),c(Jt,{"editor-id":e.editorId,disabled:e.disabled},null,8,[`editor-id`,`disabled`]),c(X),c(Y,{"editor-id":e.editorId,disabled:e.disabled,icon:`format_clear`,command:`clear`},null,8,[`editor-id`,`disabled`])]))}}),[[`__scopeId`,`data-v-44c51c67`]]);u(),O();var rn=f({__name:`TmEditorColorButton`,props:d({icon:{},editorId:{},command:{default:`setColor`},clearCommand:{default:`unsetColor`},tooltipMessagePath:{},attributeToCheck:{default:`color`},disabled:{type:Boolean,default:!1}},{modelValue:{default:``},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=T(e,`modelValue`),{commands:n,getCurrentNodeTreeAttribute:r}=q(e.editorId),i=t=>n[e.command](t),a=()=>n[e.clearCommand](),o=s(()=>r(e.attributeToCheck)??void 0);return(n,r)=>(E(),m(Q,{modelValue:t.value,"onUpdate:modelValue":[r[0]||(r[0]=e=>t.value=e),i],icon:e.icon,disabled:e.disabled,"tooltip-message-path":e.tooltipMessagePath,"active-color":y(o),onClear:a},null,8,[`modelValue`,`icon`,`disabled`,`tooltip-message-path`,`active-color`]))}});u(),O(),g();var $=`16px`,an=V(f({__name:`TmEditorSizeSelector`,props:{editorId:{},disabled:{type:Boolean,default:!1}},setup(e){let{setFontSize:t}=ze(e.editorId),n=l($),r=M(`autocompleteRef`),s=[8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72].map(e=>({[W]:`${e}px`,[U]:`${e}px`})),c=()=>{n.value||(r.value?.updateInputValue($,!0),n.value=$),t(n.value),r.value?.blur()},{fontSize:u}=Ve(e.editorId,[`fontSize`]);return P(u,e=>{r.value?.updateInputValue(e||``,!0),n.value=e||$}),(t,r)=>(E(),m(Pe,{ref:`autocompleteRef`,modelValue:y(n),"onUpdate:modelValue":r[0]||(r[0]=e=>i(n)?n.value=e:null),"use-input":``,"hide-selected":``,"fill-input":``,options:y(s),"input-debounce":0,"hide-no-result":``,"hide-clearable-icon":``,"popover-fit-input-width":!1,class:`tm-editor-size-selector`,size:`xSmall`,"menu-fit":!1,"bottom-slots":!1,"is-disabled":e.disabled,"off-filtering":``,"option-auto-height":``,onInputValue:r[1]||(r[1]=e=>n.value=e),onPopupHide:c},{option:a(({opt:e})=>[o(`div`,{class:`body-text-regular-14 lh-1 align-self-center`,style:A({fontSize:e.value,height:e.value})},w(e.text),5)]),_:1},8,[`modelValue`,`options`,`is-disabled`]))}}),[[`__scopeId`,`data-v-8c75f2e2`]]);u(),O(),g();var on=V(f({__name:`TmEditorFontFamilySelect`,props:d({editorId:{},disabled:{type:Boolean,default:!1}},{modelValue:{default:I.TIMES_NEW_ROMAN},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=T(e,`modelValue`),{t:r}=B(),i=new Map,{setFontFamily:s}=ze(e.editorId),c=e=>{for(let t of e){let e=f.value.find(e=>e.value.toLowerCase().includes(t));if(e)return e}return null},{fontFamily:u}=Ve(e.editorId,[`fontFamily`]);P(u,e=>{if(!e||!e.trim()){t.value=`initial`;return}if(i.has(e)){t.value=i.get(e);return}let n=e.replaceAll(`"`,``).replaceAll(`'`,``).replaceAll(`, `,`,`).toLowerCase(),a=f.value.find(e=>e.value.toLowerCase()===n);if(a){i.set(e,a.value),t.value=a.value;return}let o=c(n.split(`,`));if(o){i.set(e,o.value),t.value=o.value;return}f.value.push({[W]:`${e} (${r(`common.custom`).toLowerCase()})`,[U]:e}),i.set(e,e),t.value=e});let d=e=>{n(e)&&s(e)},f=l([{[W]:r(`common.system`),[U]:I.SYSTEM},{[W]:`Arial`,[U]:I.ARIAL},{[W]:`Comic Sans`,[U]:I.COMIC_SANS},{[W]:`Courier New`,[U]:I.COURIER},{[W]:`Georgia`,[U]:I.GEORGIA},{[W]:`Lucida Sans Unicode`,[U]:I.LUCIDA},{[W]:`Tahoma`,[U]:I.TAHOMA},{[W]:`Times New Roman`,[U]:I.TIMES_NEW_ROMAN},{[W]:`Trebuchet`,[U]:I.TREBUCHET},{[W]:`Verdana`,[U]:I.VERDANA}]);return(n,r)=>(E(),m(Me,{modelValue:t.value,"onUpdate:modelValue":[r[0]||(r[0]=e=>t.value=e),d],class:`tm-editor-font-family-select`,options:y(f),clearable:!1,"menu-fit":!1,"is-disabled":e.disabled,size:`xSmall`},{option:a(({opt:e})=>[o(`div`,{class:`font-size-base`,style:A({fontFamily:e.value})},w(e.text),5)]),"selected-item":a(({opt:e})=>[o(`div`,{class:`font-size-base ws-nowrap max-w100pr ellipsis`,style:A({fontFamily:e.value})},w(e.text),5)]),_:1},8,[`modelValue`,`options`,`is-disabled`]))}}),[[`__scopeId`,`data-v-fa2ee624`]]);u(),O(),g();var sn={class:`body-text-regular-12`},cn=f({__name:`TmEditorDynamicFieldsSelector`,props:{editorId:{},disabled:{type:Boolean}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=B(),l=Be(n.editorId),u=s(()=>l.value.length>0?l.value:[{type:`item`,value:R.UNSUBSCRIBE_LINK,label:i.t(`fieldNames.unsubscribeLink`),icon:`link`},{type:`item`,value:R.DEFAULT_FOOTER,label:i.t(`fieldNames.defaultFooter`),icon:`domain`},...Ce(he().getAvailableTags())]),d=e=>{r(`select`,e.value)};return(t,n)=>(E(),m(Je,{menu:y(u),onSelect:d},{default:a(({toggleMenu:n})=>[c(F,{size:`small`,class:`h100pr`,disabled:e.disabled,onClick:n},{default:a(()=>[o(`span`,sn,w(t.$t(`richEditor.insertDynamicField`)),1),c(z,{name:`tmi-arrow-down`,size:`xLarge`,color:`gray6`})]),_:1},8,[`disabled`,`onClick`])]),_:1},8,[`menu`]))}});u(),g();var ln={class:`body-text-regular-12`},un=f({__name:`TmEditorInsertTemplateButton`,props:{editorId:{},disabled:{type:Boolean}},setup(e){let{getEditorOrFail:t,commands:{insertContent:n,insertTemplate:r,setWysiwygEditorContent:i}}=q(e.editorId),{open:s,close:l}=We(),{trackEmailTemplateUsage:u}=ue(),{trackSmsTemplateUsage:d}=ce(),f=()=>s({withEmails:!0,onSelectEmail:async e=>{let n=ye().findEntityByIdOrFail(e);u(e),await i({content:n.body}
145),qe(t()).emitContentUpdate(),l()},onSelect:e=>{let i=Se(ve().htmlToRichEditorJSON(e.emailContent??``,{processExtensionsSet:()=>t().getExtensionsSet().delete(Re).delete(dt)}));d(e.id),i?r(e.content,!0,!0):n(e.emailContent)}});return(t,n)=>(E(),m(F,{size:`small`,disable:e.disabled,onClick:f},{default:a(()=>[c(z,{name:`assignment`,color:e.disabled?void 0:`gray7`,left:``},null,8,[`color`]),o(`span`,ln,w(t.$t(`composeSideButton.insertTemplate`)),1)]),_:1},8,[`disable`]))}});u(),g();var dn={class:`body-text-regular-12`},fn=f({__name:`TmEditorInsertSentEmailButton`,props:{editorId:{},disabled:{type:Boolean}},setup(e){let t=e,{open:n}=Ye(),r=()=>{n({getEditorId:async()=>t.editorId})};return(t,n)=>(E(),m(F,{size:`small`,disable:e.disabled,onClick:r},{default:a(()=>[c(z,{name:`history`,color:e.disabled?void 0:`gray7`,left:``},null,8,[`color`]),o(`span`,dn,w(t.$t(`emailEditor.insertSentEmail`)),1)]),_:1},8,[`disable`]))}});u(),O();var pn={class:`tm-email-editor-header-bottom`},mn=V(f({__name:`TmEmailEditorHeaderBottom`,props:{editorId:{},disabled:{type:Boolean,default:!1}},emits:[`tag-selected`],setup(e){let{isAttributeValue:t,getEditorOrFail:n}=q(e.editorId),i=e=>n().chain().setTextAlign(e).focus().run();return(n,a)=>(E(),r(`div`,pn,[c(on,{"editor-id":e.editorId,disabled:e.disabled},null,8,[`editor-id`,`disabled`]),c(an,{"editor-id":e.editorId,disabled:e.disabled},null,8,[`editor-id`,`disabled`]),c(Y,{"editor-id":e.editorId,disabled:e.disabled,icon:`format_bold`,command:`bold`},null,8,[`editor-id`,`disabled`]),c(Y,{"editor-id":e.editorId,disabled:e.disabled,icon:`format_underlined`,command:`underline`},null,8,[`editor-id`,`disabled`]),c(Y,{"editor-id":e.editorId,disabled:e.disabled,icon:`format_italic`,command:`italic`},null,8,[`editor-id`,`disabled`]),c(Y,{"editor-id":e.editorId,disabled:e.disabled,icon:`strikethrough_s`,command:`strike`},null,8,[`editor-id`,`disabled`]),c(X),c(rn,{"editor-id":e.editorId,icon:`tmi-format-text-color`,disabled:e.disabled,"tooltip-message-path":n.$t(`richEditor.formats.textColor`),"attribute-to-check":y(K)(`color`)},null,8,[`editor-id`,`disabled`,`tooltip-message-path`,`attribute-to-check`]),c(rn,{"editor-id":e.editorId,icon:`tmi-format-text-bg-color`,command:`setBgColor`,"clear-command":`unsetBgColor`,disabled:e.disabled,"tooltip-message-path":n.$t(`richEditor.formats.highlightColor`),"attribute-to-check":y(K)(`backgroundColor`)},null,8,[`editor-id`,`disabled`,`tooltip-message-path`,`attribute-to-check`]),c(X),c(Y,{"editor-id":e.editorId,icon:`format_align_left`,disabled:e.disabled,"toggle-action":()=>i(`left`),"tooltip-message-path":n.$t(`richEditor.formats.textAlignLeft`),"is-active":()=>y(t)(`textAlign`,`left`)},null,8,[`editor-id`,`disabled`,`toggle-action`,`tooltip-message-path`,`is-active`]),c(Y,{"editor-id":e.editorId,icon:`format_align_center`,disabled:e.disabled,"toggle-action":()=>i(`center`),"tooltip-message-path":n.$t(`richEditor.formats.textAlignCenter`),"is-active":()=>y(t)(`textAlign`,`center`)},null,8,[`editor-id`,`disabled`,`toggle-action`,`tooltip-message-path`,`is-active`]),c(Y,{"editor-id":e.editorId,icon:`format_align_right`,disabled:e.disabled,"toggle-action":()=>i(`right`),"tooltip-message-path":n.$t(`richEditor.formats.textAlignRight`),"is-active":()=>y(t)(`textAlign`,`right`)},null,8,[`editor-id`,`disabled`,`toggle-action`,`tooltip-message-path`,`is-active`]),c(Y,{"editor-id":e.editorId,icon:`format_align_justify`,disabled:e.disabled,"toggle-action":()=>i(`justify`),"tooltip-message-path":n.$t(`richEditor.formats.textAlignJustify`),"is-active":()=>y(t)(`textAlign`,`justify`)},null,8,[`editor-id`,`disabled`,`toggle-action`,`tooltip-message-path`,`is-active`]),c(X),c(Y,{"editor-id":e.editorId,disabled:e.disabled,icon:`format_list_bulleted`,command:`bulletList`},null,8,[`editor-id`,`disabled`]),c(Y,{"editor-id":e.editorId,disabled:e.disabled,icon:`format_list_numbered`,command:`orderedList`},null,8,[`editor-id`,`disabled`]),c(X),k(n.$slots,`tag-selector`,{},()=>[c(cn,{"editor-id":e.editorId,onSelect:a[0]||(a[0]=e=>n.$emit(`tag-selected`,e))},null,8,[`editor-id`])],!0),c(un,{"editor-id":e.editorId,disabled:e.disabled},null,8,[`editor-id`,`disabled`]),c(fn,{"editor-id":e.editorId,disabled:e.disabled},null,8,[`editor-id`,`disabled`])]))}}),[[`__scopeId`,`data-v-458ae0cf`]]);u(),g();var hn={class:`tm-code-editor__wrapper`},gn=V(f({__name:`TmHtmlCodeEditorMountPoint`,props:{isEditable:{type:Boolean}},setup(e,{expose:t}){return t({editorElementRef:M(`tmCodeEditor`)}),(t,n)=>(E(),r(`div`,hn,[o(`div`,{ref:`tmCodeEditor`,class:C([`tm-code-editor`,{"tm-code-editor--readonly":!e.isEditable}])},null,2),e.isEditable?D(``,!0):(E(),m(ae,{key:0,class:`tm-code-editor__spinner`,color:`primary`,size:`36px`}))]))}}),[[`__scopeId`,`data-v-1a644e86`]]);te(),u(),O(),g();var _n=V(f({__name:`TmSplitter`,props:{modelValue:{default:.5},minLeft:{default:160},minRight:{default:160},dividerSize:{default:3},resetOnDblClick:{type:Boolean,default:!0},leftOnly:{type:Boolean,default:!1},rightOnly:{type:Boolean,default:!1}},emits:[`update:modelValue`,`resize`],setup(n,{emit:i}){ne(e=>({v63fbe1e7:y(h)}));let a=i,c=l(),u=l(),d=l(0),f=l(!1),p=l(n.modelValue),m=s(()=>!n.leftOnly&&!n.rightOnly),h=s(()=>`${n.dividerSize}px`),g=s(()=>
145{if(n.leftOnly)return d.value;if(d.value===0)return 0;let e=Math.round(p.value*d.value);return Math.max(n.minLeft,Math.min(e,d.value-n.minRight-n.dividerSize))}),_=s(()=>n.rightOnly?d.value:Math.max(0,d.value-g.value-n.dividerSize));P(()=>n.modelValue,e=>{f.value||(p.value=Math.max(0,Math.min(1,e)),x())});let v={x:0,initialWidth:0},b=()=>{c.value&&(d.value=c.value.getBoundingClientRect().width,x())},x=()=>{if(n.leftOnly||n.rightOnly||d.value===0)return;let e=n.minLeft/d.value,t=(d.value-n.minRight-n.dividerSize)/d.value;p.value=Math.max(e,Math.min(t,p.value))},S=e=>{n.leftOnly||n.rightOnly||(f.value=!0,v.x=e.clientX,v.initialWidth=g.value,u.value?.setPointerCapture?.(e.pointerId),document.body.style.userSelect=`none`,document.body.style.cursor=`col-resize`)},ee=e=>{if(!f.value)return;e.preventDefault();let t=e.clientX-v.x,r=v.initialWidth+t,i=Math.max(n.minLeft,Math.min(r,d.value-n.minRight-n.dividerSize));p.value=d.value>0?i/d.value:.5,T()},te=()=>{f.value&&(f.value=!1,document.body.style.userSelect=``,document.body.style.cursor=``,a(`update:modelValue`,p.value),T())},w=()=>{!n.resetOnDblClick||n.leftOnly||n.rightOnly||(p.value=Math.max(0,Math.min(1,n.modelValue)),x(),a(`update:modelValue`,p.value),T())},T=()=>{a(`resize`,{leftPx:g.value,rightPx:_.value,ratio:p.value})};return e(document,`pointermove`,ee),e(document,`pointerup`,te),t(c,b),re(()=>{c.value&&b()}),(e,t)=>(E(),r(`div`,{ref_key:`container`,ref:c,class:C([`tm-splitter`,{"is-dragging":y(f)}])},[n.rightOnly?D(``,!0):(E(),r(`div`,{key:0,class:`tm-splitter__pane`,style:A({width:n.leftOnly?`100%`:`${y(g)}px`})},[k(e.$slots,`left`,{},void 0,!0)],4)),y(m)?(E(),r(`div`,{key:1,ref_key:`divider`,ref:u,class:`tm-splitter__divider`,tabindex:`0`,role:`separator`,"aria-orientation":`vertical`,onPointerdown:S,onDblclick:w},[...t[0]||(t[0]=[o(`div`,{class:`tm-splitter__divider-area`},[o(`div`,{class:`tm-splitter__divider-line`})],-1)])],544)):D(``,!0),n.leftOnly?D(``,!0):(E(),r(`div`,{key:2,class:`tm-splitter__pane`,style:A({width:n.rightOnly?`100%`:`${y(_)}px`})},[k(e.$slots,`right`,{},void 0,!0)],4))],2))}}),[[`__scopeId`,`data-v-2ad37f91`]]);u(),O();var vn=V(f({__name:`TmEmailEditorHtmlWithPreview`,props:d({isCodeEditorEditable:{type:Boolean},previewContent:{default:``},hidePreview:{type:Boolean,default:!1}},{modelValue:{default:``},modelModifiers:{}}),emits:d([`on-iframe-load`],[`update:modelValue`]),setup(e){let t=T(e,`modelValue`),n=be(),{isMobile:r}=le(),i=s(()=>r.value||e.hidePreview),o=s(()=>{let r=e.previewContent||t.value,i=n.parseHTML(r),a=i.head.appendChild(document.createElement(`style`));return a.innerText=`p:empty:after { content: '\\00a0' }`,n.stringify(i)});return(t,n)=>(E(),m(_n,{class:`tm-email-editor-html-with-preview`,"right-only":y(i)},{left:a(()=>[c(it,{content:y(o),onOnLoad:n[0]||(n[0]=e=>t.$emit(`on-iframe-load`,e))},null,8,[`content`])]),right:a(()=>[c(gn,{ref:`htmlCodeEditor`,class:`tm-email-editor-html-with-preview__editor`,"is-editable":e.isCodeEditorEditable},null,8,[`is-editable`])]),_:1},8,[`right-only`]))}}),[[`__scopeId`,`data-v-6f245a6f`]]);u(),O(),g(),te();var yn={class:`tm-wysiwyg-email-editor sentry-block`},bn={class:`flex flex-row w100pr`,style:{"row-gap":`8px`}},xn=[`href`],Sn={class:`tm-wysiwyg-email-editor__editor`},Cn=V(f({__name:`TmEmailEditor`,props:d({editorId:{},defaultEditorMode:{}},{modelValue:{default:``},modelModifiers:{}}),emits:d([`tag-selected`,`create-editor`],[`update:modelValue`]),setup(e,{emit:t}){let n=t,i=T(e,`modelValue`),l=M(`htmlCodeEditor`),u=M(`tiptapEditor`),d=Ke(),f=B(),p=s(()=>[{type:`item`,value:R.UNSUBSCRIBE_LINK,label:f.t(`fieldNames.unsubscribeLink`),icon:`link`},{type:`item`,value:R.DEFAULT_FOOTER,label:f.t(`fieldNames.defaultFooter`),icon:`domain`},...Ce(he().getAvailableTags())]),{activeMode:m,isCodeEditorEditable:g,commands:{changeActiveMode:_}}=ot({modelValue:i,tiptapRoot:()=>u.value?.editorWrapperRef,codemirrorRoot:()=>l.value?.$refs.htmlCodeEditor?.editorElementRef,codemirrorOptions:{additionalOutputPlugins:[ft()],emitStrictlyFromCurrentView:!0,initialMode:e.defaultEditorMode??d.value},editorId:e.editorId,hooks:{onCreate:({editor:t})=>{t.commands.setAvailableMenu(p.value),n(`create-editor`,e.editorId)}}}),{setupPreviewContentTracking:v,onIframeLoad:b}=st(e.editorId),S=v(),C=e=>{d.value=e,_(e)};return(t,n)=>(E(),r(`div`,yn,[c(Ft,null,{default:a(()=>[o(`div`,bn,[c(nn,{"editor-id":e.editorId,disabled:y(m)===y(H).HTML,class:`mr-3`},null,8,[`editor-id`,`disabled`]),c(jt,{"model-value":y(m),"onUpdate:modelValue":C},null,8,[`model-value`]),o(`a`,{href:y(Oe),class:`flex flex-row flex-nowrap align-center align-self-center ml-4 body-text-semi-bold-12`,target:`_blank`},[c(z,{name:`tmi-stars-two-filled mr-1`,size:`medium`}
145),h(` `+w(t.$t(`emailEditor.touchpointLink`))+` `,1),c(z,{name:`tmi-open-in-new ml-1`,size:`xSmall`})],8,xn)]),c(mn,{"editor-id":e.editorId,disabled:y(m)===y(H).HTML,class:`w100pr`,onTagSelected:n[0]||(n[0]=e=>t.$emit(`tag-selected`,e))},{"tag-selector":a(()=>[k(t.$slots,`tag-selector`,{},void 0,!0)]),_:3},8,[`editor-id`,`disabled`])]),_:3}),o(`div`,Sn,[ie(c(At,{ref_key:`tiptapEditor`,ref:u,"editor-id":e.editorId},null,8,[`editor-id`]),[[x,y(m)===`visual`]]),ie(c(vn,{ref_key:`htmlCodeEditor`,ref:l,modelValue:i.value,"onUpdate:modelValue":n[1]||(n[1]=e=>i.value=e),"is-code-editor-editable":y(g),"show-preview":y(m)===`html`,"preview-content":y(S),onOnIframeLoad:y(b)},null,8,[`modelValue`,`is-code-editor-editable`,`show-preview`,`preview-content`,`onOnIframeLoad`]),[[x,y(m)===`html`]])])]))}}),[[`__scopeId`,`data-v-686ce033`]]);u(),O();var wn=f({__name:`FieldEmailEditor`,props:{...we,modelValue:{type:String,required:!0},editorId:{type:String,required:!0},defaultEditorMode:{type:String}},emits:Ee(),setup(e,{emit:t}){let{emitChangeAndInput:n}=De(e,t,[`class`]);return(t,r)=>(E(),m(Cn,{ref:`tmEmailEditor`,"editor-id":e.editorId,"default-editor-mode":e.defaultEditorMode,"model-value":e.modelValue,"onUpdate:modelValue":y(n)},{"tag-selector":a(()=>[k(t.$slots,`tag-selector`)]),_:3},8,[`editor-id`,`default-editor-mode`,`model-value`,`onUpdate:modelValue`]))}});u();var Tn={},En={class:`tm-email-editor-controls-container`};function Dn(e,t){return E(),r(`div`,En,[k(e.$slots,`default`,{},void 0,!0)])}var On=V(Tn,[[`render`,Dn],[`__scopeId`,`data-v-e49653a7`]]);u(),O();var kn=`[ENTER YOUR COMPANY NAME]`,An=`[ENTER YOUR MAILING ADDRESS]`,jn=f({__name:`TmEditorEmailFooterTagsSelector`,props:{editorId:{},disabled:{type:Boolean,default:!1}},setup(e){let t=oe.UNSUBSCRIBE_LINK,n=l(!1),{commands:{insertContent:o},getEditorOrFail:s}=q(e.editorId),u=ge(),d=e=>{let t=document.createElement(`span`);t.style.color=pe,t.style.fontSize=`12px`,t.style.fontFamily=I.ARIAL;let n=t.cloneNode();return n.innerText=e,n.outerHTML},f=(e=``)=>{let t=u.findSettings();if(!t||!e)return e;let{company:n,street:r,zip:i,city:a,paymentCountryEntity:o}=t;switch(e){case kn:return n;case An:return[r,i,a,o].filter(Boolean).join(`, `);default:return e}},p=e=>{if(e===t)o(ct());else{let t=f(e);
145if(!t)return;o(d(t))}let{editorView:n}=qe(s()).getStorage(),{from:r,to:i}=n.state.selection.ranges[0];n.dispatch({changes:{from:r,to:i,insert:e},selection:{anchor:r+1}})},h=[{[W]:B().t(`fieldNames.unsubscribeLink`),[U]:t,icon:`link`},{[W]:B().t(`fieldEmailFooterEditor.fieldNames.companyName`),[U]:kn,icon:`domain`},{[W]:B().t(`fieldEmailFooterEditor.fieldNames.companyAddress`),[U]:An,icon:`domain`}];return(t,o)=>(E(),m(me,{modelValue:y(n),"onUpdate:modelValue":o[0]||(o[0]=e=>i(n)?n.value=e:null)},{menu:a(()=>[(E(),r(N,null,S(h,e=>c(se,{key:e.value,label:e.text,icon:e.icon??`sell`,onClick:t=>p(e.value)},null,8,[`label`,`icon`,`onClick`])),64))]),default:a(()=>[c(J,{icon:`tmi-code-json`,"tooltip-message-path":`richEditor.insertDynamicField`,"is-active":y(n),disable:e.disabled||!h?.length},null,8,[`is-active`,`disable`])]),_:1},8,[`modelValue`]))}});u(),O();var Mn={class:`tm-email-editor-controls`},Nn=V(f({__name:`TmEmailFooterEditorControls`,props:{editorId:{},disabled:{type:Boolean,default:!1}},setup(e){let{isAttributeValue:t,commands:{setTextAlign:n}}=q(e.editorId);return(i,a)=>(E(),r(`div`,Mn,[c(on,{"editor-id":e.editorId,disabled:e.disabled},null,8,[`editor-id`,`disabled`]),c(an,{"editor-id":e.editorId,disabled:e.disabled},null,8,[`editor-id`,`disabled`]),c(Y,{"editor-id":e.editorId,disabled:e.disabled,icon:`format_bold`,command:`bold`},null,8,[`editor-id`,`disabled`]),c(Y,{"editor-id":e.editorId,disabled:e.disabled,icon:`format_underlined`,command:`underline`},null,8,[`editor-id`,`disabled`]),c(Y,{"editor-id":e.editorId,disabled:e.disabled,icon:`format_italic`,command:`italic`},null,8,[`editor-id`,`disabled`]),c(rn,{"editor-id":e.editorId,icon:`tmi-format-text-color`,disabled:e.disabled,"tooltip-message-path":i.$t(`richEditor.formats.textColor`),"attribute-to-check":y(K)(`color`)},null,8,[`editor-id`,`disabled`,`tooltip-message-path`,`attribute-to-check`]),c(X),c(jn,{"editor-id":e.editorId,disabled:e.disabled},null,8,[`editor-id`,`disabled`]),c(Lt,{"editor-id":e.editorId,disabled:e.disabled},null,8,[`editor-id`,`disabled`]),c(Y,{"editor-id":e.editorId,disabled:e.disabled,icon:`format_list_bulleted`,command:`bulletList`},null,8,[`editor-id`,`disabled`]),c(Y,{"editor-id":e.editorId,disabled:e.disabled,icon:`format_list_numbered`,command:`orderedList`},null,8,[`editor-id`,`disabled`]),c(X),c(Y,{"editor-id":e.editorId,icon:`format_align_left`,disabled:e.disabled,"toggle-action":()=>y(n)(`left`),"tooltip-message-path":i.$t(`richEditor.formats.textAlignLeft`),"is-active":()=>y(t)(`textAlign`,`left`)},null,8,[`editor-id`,`disabled`,`toggle-action`,`tooltip-message-path`,`is-active`]),c(Y,{"editor-id":e.editorId,icon:`format_align_center`,disabled:e.disabled,"toggle-action":()=>y(n)(`center`),"tooltip-message-path":i.$t(`richEditor.formats.textAlignCenter`),"is-active":()=>y(t)(`textAlign`,`center`)},null,8,[`editor-id`,`disabled`,`toggle-action`,`tooltip-message-path`,`is-active`]),c(Y,{"editor-id":e.editorId,icon:`format_align_right`,disabled:e.disabled,"toggle-action":()=>y(n)(`right`),"tooltip-message-path":i.$t(`richEditor.formats.textAlignRight`),"is-active":()=>y(t)(`textAlign`,`right`)},null,8,[`editor-id`,`disabled`,`toggle-action`,`tooltip-message-path`,`is-active`]),c(X),c(Y,{"editor-id":e.editorId,disabled:e.disabled,icon:`format_clear`,command:`clear`},null,8,[`editor-id`,`disabled`])]))}}),[[`__scopeId`,`data-v-69070f5b`]]);u();var Pn={class:`tm-wysiwyg-email-footer-editor`},Fn={class:`tm-wysiwyg-email-footer-editor__editor`},In=V(f({__name:`TmEmailFooterEditor`,props:d({editorId:{}},{modelValue:{default:``},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=T(e,`modelValue`),n=M(`tiptapEditor`),i=M(`htmlCodeEditor`);return ot({modelValue:t,tiptapRoot:()=>n.value?.editorWrapperRef,codemirrorRoot:()=>i.value,codemirrorOptions:{additionalOutputPlugins:[ft({prettify:!1})]},editorId:e.editorId,prettify:!1}),(t,s)=>(E(),r(`div`,Pn,[o(`div`,Fn,[c(At,{ref_key:`tiptapEditor`,ref:n,"editor-id":e.editorId},null,8,[`editor-id`]),o(`div`,{ref_key:`htmlCodeEditor`,ref:i},null,512)]),c(On,null,{default:a(()=>[c(Nn,{"editor-id":e.editorId,class:`w100pr`},null,8,[`editor-id`])]),_:1})]))}}),[[`__scopeId`,`data-v-bf8a3fb2`]]);u(),O();var Ln=f({__name:`FieldEmailFooterEditor`,props:{...we,modelValue:{type:String,required:!0},editorId:{type:String,required:!0},emitValueDebounce:Number},emits:Ee(),setup(e,{emit:t}){let{emitChangeAndInput:n}=De(e,t,[`class`]);return(t,r)=>(E(),m(In,{"editor-id":e.editorId,"emit-value-debounce":e.emitValueDebounce,"model-value":e.modelValue,"onUpdate:modelValue":y(n)},null,8,[`editor-id`,`emit-value-debounce`,`model-value`,`onUpdate:modelValue`]))}});
145export{wn as FieldEmailEditor,Ln as FieldEmailFooterEditor,Ze as FieldMessageEditor,Ot as FieldMessageEditorFull,lt as FieldRichEditor}; 146//# sourceMappingURL=BIJgDJw7.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.