@retailrocketgroup/retailrocket-create.transactional-vue-email-template-render 1.0.345181-dev → 1.0.345504
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/main.js +1 -1
- package/package.json +1 -1
package/assets/main.js
CHANGED
|
@@ -79,4 +79,4 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
79
79
|
`:`;
|
|
80
80
|
`)+X+`return __p
|
|
81
81
|
}`;var $e=ig(function(){return Ze(y,me+"return "+X).apply(n,T)});if($e.source=X,sf($e))throw $e;return $e}function xx(r){return Qe(r).toLowerCase()}function Lx(r){return Qe(r).toUpperCase()}function Ox(r,i,u){if(r=Qe(r),r&&(u||i===n))return mm(r);if(!r||!(i=Nn(i)))return r;var f=fr(r),_=fr(i),y=pm(f,_),T=gm(f,_)+1;return vo(f,y,T).join("")}function Ix(r,i,u){if(r=Qe(r),r&&(u||i===n))return r.slice(0,Em(r)+1);if(!r||!(i=Nn(i)))return r;var f=fr(r),_=gm(f,fr(i))+1;return vo(f,0,_).join("")}function Rx(r,i,u){if(r=Qe(r),r&&(u||i===n))return r.replace(Uo,"");if(!r||!(i=Nn(i)))return r;var f=fr(r),_=pm(f,fr(i));return vo(f,_).join("")}function Px(r,i){var u=de,f=Pe;if(St(i)){var _="separator"in i?i.separator:_;u="length"in i?Be(i.length):u,f="omission"in i?Nn(i.omission):f}r=Qe(r);var y=r.length;if(bi(r)){var T=fr(r);y=T.length}if(u>=y)return r;var L=u-Ci(f);if(L<1)return f;var P=T?vo(T,0,L).join(""):r.slice(0,L);if(_===n)return P+f;if(T&&(L+=P.length-L),af(_)){if(r.slice(L).search(_)){var Y,K=P;for(_.global||(_=Cc(_.source,Qe(Ss.exec(_))+"g")),_.lastIndex=0;Y=_.exec(K);)var X=Y.index;P=P.slice(0,X===n?L:X)}}else if(r.indexOf(Nn(_),L)!=L){var se=P.lastIndexOf(_);se>-1&&(P=P.slice(0,se))}return P+f}function Dx(r){return r=Qe(r),r&&nc.test(r)?r.replace(Rt,lT):r}var Nx=Oi(function(r,i,u){return r+(u?" ":"")+i.toUpperCase()}),cf=sp("toUpperCase");function og(r,i,u){return r=Qe(r),i=u?n:i,i===n?rT(r)?fT(r):zC(r):r.match(i)||[]}var ig=Ue(function(r,i){try{return Pn(r,n,i)}catch(u){return sf(u)?u:new Oe(u)}}),Mx=Gr(function(r,i){return Yn(i,function(u){u=Sr(u),Ur(r,u,rf(r[u],r))}),r});function Bx(r){var i=r==null?0:r.length,u=Ee();return r=i?Ct(r,function(f){if(typeof f[1]!="function")throw new Kn(l);return[u(f[0]),f[1]]}):[],Ue(function(f){for(var _=-1;++_<i;){var y=r[_];if(Pn(y[0],this,f))return Pn(y[1],this,f)}})}function kx(r){return l0(qn(r,E))}function ff(r){return function(){return r}}function Fx(r,i){return r==null||r!==r?i:r}var $x=lp(),Wx=lp(!0);function xn(r){return r}function df(r){return Fm(typeof r=="function"?r:qn(r,E))}function Hx(r){return Wm(qn(r,E))}function Ux(r,i){return Hm(r,qn(i,E))}var Vx=Ue(function(r,i){return function(u){return Bs(u,r,i)}}),Gx=Ue(function(r,i){return function(u){return Bs(r,u,i)}});function hf(r,i,u){var f=Yt(i),_=fl(i,f);u==null&&!(St(i)&&(_.length||!f.length))&&(u=i,i=r,r=this,_=fl(i,Yt(i)));var y=!(St(u)&&"chain"in u)||!!u.chain,T=Yr(r);return Yn(_,function(L){var P=i[L];r[L]=P,T&&(r.prototype[L]=function(){var Y=this.__chain__;if(y||Y){var K=r(this.__wrapped__),X=K.__actions__=wn(this.__actions__);return X.push({func:P,args:arguments,thisArg:r}),K.__chain__=Y,K}return P.apply(r,ho([this.value()],arguments))})}),r}function jx(){return Xt._===this&&(Xt._=_T),this}function mf(){}function Yx(r){return r=Be(r),Ue(function(i){return Um(i,r)})}var Kx=Gc(Ct),zx=Gc(um),qx=Gc(pc);function sg(r){return Jc(r)?gc(Sr(r)):S0(r)}function Xx(r){return function(i){return r==null?n:qo(r,i)}}var Jx=cp(),Zx=cp(!0);function pf(){return[]}function gf(){return!1}function Qx(){return{}}function e1(){return""}function t1(){return!0}function n1(r,i){if(r=Be(r),r<1||r>Te)return[];var u=Je,f=ln(r,Je);i=Ee(i),r-=Je;for(var _=vc(f,i);++u<r;)i(u);return _}function r1(r){return Ne(r)?Ct(r,Sr):Mn(r)?[r]:wn(Ap(Qe(r)))}function o1(r){var i=++pT;return Qe(r)+i}var i1=_l(function(r,i){return r+i},0),s1=jc("ceil"),a1=_l(function(r,i){return r/i},1),l1=jc("floor");function u1(r){return r&&r.length?cl(r,xn,Ic):n}function c1(r,i){return r&&r.length?cl(r,Ee(i,2),Ic):n}function f1(r){return dm(r,xn)}function d1(r,i){return dm(r,Ee(i,2))}function h1(r){return r&&r.length?cl(r,xn,Nc):n}function m1(r,i){return r&&r.length?cl(r,Ee(i,2),Nc):n}var p1=_l(function(r,i){return r*i},1),g1=jc("round"),_1=_l(function(r,i){return r-i},0);function E1(r){return r&&r.length?Ec(r,xn):0}function v1(r,i){return r&&r.length?Ec(r,Ee(i,2)):0}return v.after=HS,v.ary=kp,v.assign=LA,v.assignIn=Jp,v.assignInWith=Il,v.assignWith=OA,v.at=IA,v.before=Fp,v.bind=rf,v.bindAll=Mx,v.bindKey=$p,v.castArray=QS,v.chain=Np,v.chunk=lw,v.compact=uw,v.concat=cw,v.cond=Bx,v.conforms=kx,v.constant=ff,v.countBy=ES,v.create=RA,v.curry=Wp,v.curryRight=Hp,v.debounce=Up,v.defaults=PA,v.defaultsDeep=DA,v.defer=US,v.delay=VS,v.difference=fw,v.differenceBy=dw,v.differenceWith=hw,v.drop=mw,v.dropRight=pw,v.dropRightWhile=gw,v.dropWhile=_w,v.fill=Ew,v.filter=yS,v.flatMap=TS,v.flatMapDeep=wS,v.flatMapDepth=SS,v.flatten=Ip,v.flattenDeep=vw,v.flattenDepth=yw,v.flip=GS,v.flow=$x,v.flowRight=Wx,v.fromPairs=bw,v.functions=WA,v.functionsIn=HA,v.groupBy=AS,v.initial=Tw,v.intersection=ww,v.intersectionBy=Sw,v.intersectionWith=Aw,v.invert=VA,v.invertBy=GA,v.invokeMap=LS,v.iteratee=df,v.keyBy=OS,v.keys=Yt,v.keysIn=An,v.map=wl,v.mapKeys=YA,v.mapValues=KA,v.matches=Hx,v.matchesProperty=Ux,v.memoize=Al,v.merge=zA,v.mergeWith=Zp,v.method=Vx,v.methodOf=Gx,v.mixin=hf,v.negate=xl,v.nthArg=Yx,v.omit=qA,v.omitBy=XA,v.once=jS,v.orderBy=IS,v.over=Kx,v.overArgs=YS,v.overEvery=zx,v.overSome=qx,v.partial=of,v.partialRight=Vp,v.partition=RS,v.pick=JA,v.pickBy=Qp,v.property=sg,v.propertyOf=Xx,v.pull=Iw,v.pullAll=Pp,v.pullAllBy=Rw,v.pullAllWith=Pw,v.pullAt=Dw,v.range=Jx,v.rangeRight=Zx,v.rearg=KS,v.reject=NS,v.remove=Nw,v.rest=zS,v.reverse=tf,v.sampleSize=BS,v.set=QA,v.setWith=ex,v.shuffle=kS,v.slice=Mw,v.sortBy=WS,v.sortedUniq=Uw,v.sortedUniqBy=Vw,v.split=Tx,v.spread=qS,v.tail=Gw,v.take=jw,v.takeRight=Yw,v.takeRightWhile=Kw,v.takeWhile=zw,v.tap=uS,v.throttle=XS,v.thru=Tl,v.toArray=zp,v.toPairs=eg,v.toPairsIn=tg,v.toPath=r1,v.toPlainObject=Xp,v.transform=tx,v.unary=JS,v.union=qw,v.unionBy=Xw,v.unionWith=Jw,v.uniq=Zw,v.uniqBy=Qw,v.uniqWith=eS,v.unset=nx,v.unzip=nf,v.unzipWith=Dp,v.update=rx,v.updateWith=ox,v.values=Pi,v.valuesIn=ix,v.without=tS,v.words=og,v.wrap=ZS,v.xor=nS,v.xorBy=rS,v.xorWith=oS,v.zip=iS,v.zipObject=sS,v.zipObjectDeep=aS,v.zipWith=lS,v.entries=eg,v.entriesIn=tg,v.extend=Jp,v.extendWith=Il,hf(v,v),v.add=i1,v.attempt=ig,v.camelCase=ux,v.capitalize=ng,v.ceil=s1,v.clamp=sx,v.clone=eA,v.cloneDeep=nA,v.cloneDeepWith=rA,v.cloneWith=tA,v.conformsTo=oA,v.deburr=rg,v.defaultTo=Fx,v.divide=a1,v.endsWith=cx,v.eq=hr,v.escape=fx,v.escapeRegExp=dx,v.every=vS,v.find=bS,v.findIndex=Lp,v.findKey=NA,v.findLast=CS,v.findLastIndex=Op,v.findLastKey=MA,v.floor=l1,v.forEach=Mp,v.forEachRight=Bp,v.forIn=BA,v.forInRight=kA,v.forOwn=FA,v.forOwnRight=$A,v.get=lf,v.gt=iA,v.gte=sA,v.has=UA,v.hasIn=uf,v.head=Rp,v.identity=xn,v.includes=xS,v.indexOf=Cw,v.inRange=ax,v.invoke=jA,v.isArguments=Zo,v.isArray=Ne,v.isArrayBuffer=aA,v.isArrayLike=Sn,v.isArrayLikeObject=Dt,v.isBoolean=lA,v.isBuffer=yo,v.isDate=uA,v.isElement=cA,v.isEmpty=fA,v.isEqual=dA,v.isEqualWith=hA,v.isError=sf,v.isFinite=mA,v.isFunction=Yr,v.isInteger=Gp,v.isLength=Ll,v.isMap=jp,v.isMatch=pA,v.isMatchWith=gA,v.isNaN=_A,v.isNative=EA,v.isNil=yA,v.isNull=vA,v.isNumber=Yp,v.isObject=St,v.isObjectLike=xt,v.isPlainObject=Us,v.isRegExp=af,v.isSafeInteger=bA,v.isSet=Kp,v.isString=Ol,v.isSymbol=Mn,v.isTypedArray=Ri,v.isUndefined=CA,v.isWeakMap=TA,v.isWeakSet=wA,v.join=xw,v.kebabCase=hx,v.last=Jn,v.lastIndexOf=Lw,v.lowerCase=mx,v.lowerFirst=px,v.lt=SA,v.lte=AA,v.max=u1,v.maxBy=c1,v.mean=f1,v.meanBy=d1,v.min=h1,v.minBy=m1,v.stubArray=pf,v.stubFalse=gf,v.stubObject=Qx,v.stubString=e1,v.stubTrue=t1,v.multiply=p1,v.nth=Ow,v.noConflict=jx,v.noop=mf,v.now=Sl,v.pad=gx,v.padEnd=_x,v.padStart=Ex,v.parseInt=vx,v.random=lx,v.reduce=PS,v.reduceRight=DS,v.repeat=yx,v.replace=bx,v.result=ZA,v.round=g1,v.runInContext=R,v.sample=MS,v.size=FS,v.snakeCase=Cx,v.some=$S,v.sortedIndex=Bw,v.sortedIndexBy=kw,v.sortedIndexOf=Fw,v.sortedLastIndex=$w,v.sortedLastIndexBy=Ww,v.sortedLastIndexOf=Hw,v.startCase=wx,v.startsWith=Sx,v.subtract=_1,v.sum=E1,v.sumBy=v1,v.template=Ax,v.times=n1,v.toFinite=Kr,v.toInteger=Be,v.toLength=qp,v.toLower=xx,v.toNumber=Zn,v.toSafeInteger=xA,v.toString=Qe,v.toUpper=Lx,v.trim=Ox,v.trimEnd=Ix,v.trimStart=Rx,v.truncate=Px,v.unescape=Dx,v.uniqueId=o1,v.upperCase=Nx,v.upperFirst=cf,v.each=Mp,v.eachRight=Bp,v.first=Rp,hf(v,function(){var r={};return Tr(v,function(i,u){rt.call(v.prototype,u)||(r[u]=i)}),r}(),{chain:!1}),v.VERSION=o,Yn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){v[r].placeholder=v}),Yn(["drop","take"],function(r,i){Ye.prototype[r]=function(u){u=u===n?1:Ht(Be(u),0);var f=this.__filtered__&&!i?new Ye(this):this.clone();return f.__filtered__?f.__takeCount__=ln(u,f.__takeCount__):f.__views__.push({size:ln(u,Je),type:r+(f.__dir__<0?"Right":"")}),f},Ye.prototype[r+"Right"]=function(u){return this.reverse()[r](u).reverse()}}),Yn(["filter","map","takeWhile"],function(r,i){var u=i+1,f=u==Tt||u==Le;Ye.prototype[r]=function(_){var y=this.clone();return y.__iteratees__.push({iteratee:Ee(_,3),type:u}),y.__filtered__=y.__filtered__||f,y}}),Yn(["head","last"],function(r,i){var u="take"+(i?"Right":"");Ye.prototype[r]=function(){return this[u](1).value()[0]}}),Yn(["initial","tail"],function(r,i){var u="drop"+(i?"":"Right");Ye.prototype[r]=function(){return this.__filtered__?new Ye(this):this[u](1)}}),Ye.prototype.compact=function(){return this.filter(xn)},Ye.prototype.find=function(r){return this.filter(r).head()},Ye.prototype.findLast=function(r){return this.reverse().find(r)},Ye.prototype.invokeMap=Ue(function(r,i){return typeof r=="function"?new Ye(this):this.map(function(u){return Bs(u,r,i)})}),Ye.prototype.reject=function(r){return this.filter(xl(Ee(r)))},Ye.prototype.slice=function(r,i){r=Be(r);var u=this;return u.__filtered__&&(r>0||i<0)?new Ye(u):(r<0?u=u.takeRight(-r):r&&(u=u.drop(r)),i!==n&&(i=Be(i),u=i<0?u.dropRight(-i):u.take(i-r)),u)},Ye.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},Ye.prototype.toArray=function(){return this.take(Je)},Tr(Ye.prototype,function(r,i){var u=/^(?:filter|find|map|reject)|While$/.test(i),f=/^(?:head|last)$/.test(i),_=v[f?"take"+(i=="last"?"Right":""):i],y=f||/^find/.test(i);_&&(v.prototype[i]=function(){var T=this.__wrapped__,L=f?[1]:arguments,P=T instanceof Ye,Y=L[0],K=P||Ne(T),X=function(Ge){var ze=_.apply(v,ho([Ge],L));return f&&se?ze[0]:ze};K&&u&&typeof Y=="function"&&Y.length!=1&&(P=K=!1);var se=this.__chain__,me=!!this.__actions__.length,ve=y&&!se,$e=P&&!me;if(!y&&K){T=$e?T:new Ye(this);var ye=r.apply(T,L);return ye.__actions__.push({func:Tl,args:[X],thisArg:n}),new zn(ye,se)}return ve&&$e?r.apply(this,L):(ye=this.thru(X),ve?f?ye.value()[0]:ye.value():ye)})}),Yn(["pop","push","shift","sort","splice","unshift"],function(r){var i=qa[r],u=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",f=/^(?:pop|shift)$/.test(r);v.prototype[r]=function(){var _=arguments;if(f&&!this.__chain__){var y=this.value();return i.apply(Ne(y)?y:[],_)}return this[u](function(T){return i.apply(Ne(T)?T:[],_)})}}),Tr(Ye.prototype,function(r,i){var u=v[i];if(u){var f=u.name+"";rt.call(Ai,f)||(Ai[f]=[]),Ai[f].push({name:i,func:u})}}),Ai[gl(n,S).name]=[{name:"wrapper",func:n}],Ye.prototype.clone=DT,Ye.prototype.reverse=NT,Ye.prototype.value=MT,v.prototype.at=cS,v.prototype.chain=fS,v.prototype.commit=dS,v.prototype.next=hS,v.prototype.plant=pS,v.prototype.reverse=gS,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=_S,v.prototype.first=v.prototype.head,Os&&(v.prototype[Os]=mS),v},Ti=dT();Go?((Go.exports=Ti)._=Ti,fc._=Ti):Xt._=Ti}).call(to)})(bu,bu.exports);var qs=bu.exports;const wo={spacer:e=>e!==void 0,oneLineLink:e=>e!==void 0,image:e=>e!==void 0,heightContainer:e=>e!==void 0,button:e=>e!==void 0,spanText:e=>e!==void 0,unsubscribeLink:e=>e!=null,if:e=>e!==void 0},J$=at({__name:"If",props:{deps:{},theme:{},element:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]}},emits:["onImageOriginalSizeAdjusted","onImageSizeAdjusted","onElementClicked"],setup(e,{emit:t}){const n=e,o=t,s=dn({ifResult:!1,isLoading:!0});return n.deps.boolExpressionEvaluator({boolExpression:n.element.Predicate,context:n.context}).then(a=>{s.ifResult=a,s.isLoading=!1}),(a,l)=>(ie(!0),Ce(ot,null,$n(s.ifResult?n.element.True:n.element.False,(c,d)=>(ie(),mt(Na,{key:d,deps:n.deps,theme:n.theme,element:c,context:n.context,path:[...n.path,s.ifResult?"True":"False",d],selectedElementPath:n.selectedElementPath,onOnImageSizeAdjusted:l[0]||(l[0]=m=>o("onImageSizeAdjusted",m)),onOnImageOriginalSizeAdjusted:l[1]||(l[1]=m=>o("onImageOriginalSizeAdjusted",m)),onOnElementClicked:l[2]||(l[2]=m=>o("onElementClicked",m))},null,8,["deps","theme","element","context","path","selectedElementPath"]))),128))}}),bs=e=>({paddingTop:tn({paddingExpression:e.paddings.Top,themeComponentPaddings:e.themeComponentPaddings,themeBodyPaddings:e.themeBodyPaddings})+"px",paddingRight:tn({paddingExpression:e.paddings.Right,themeComponentPaddings:e.themeComponentPaddings,themeBodyPaddings:e.themeBodyPaddings})+"px",paddingBottom:tn({paddingExpression:e.paddings.Bottom,themeComponentPaddings:e.themeComponentPaddings,themeBodyPaddings:e.themeBodyPaddings})+"px",paddingLeft:tn({paddingExpression:e.paddings.Left,themeComponentPaddings:e.themeComponentPaddings,themeBodyPaddings:e.themeBodyPaddings})+"px"}),Z$=e=>({Match:t=>{if(e.Auto!==void 0)return t.whenAuto();if(e.Pixel!==void 0)return t.whenPixels(e.Pixel.Value);if(e.Percentage!==void 0)return t.whenPercentages(e.Percentage.Value);throw Error("")}}),Q$=e=>Z$(e.width).Match({whenAuto:()=>({width:"initial"}),whenPixels:t=>({width:t+"px"}),whenPercentages:t=>({width:t+"%"})}),e2=["align"],t2=at({__name:"HeightContainer",props:{deps:{},theme:{},element:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]}},emits:["onImageOriginalSizeAdjusted","onImageSizeAdjusted","onElementClicked"],setup(e,{emit:t}){const n=e,o=t;return(s,a)=>(ie(),Ce("table",{class:"heightContainerRender",style:Se([{"border-spacing":"0","border-collapse":"separate"},[oe(Q$)({width:n.element.Width})]])},[Z("tbody",null,[Z("tr",null,[Z("td",{align:oe(Jb)({containerAlign:n.element.ContainerAlign}),style:Se([oe(bs)({paddings:n.element.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),{height:n.element.Height?n.element.Height+"px":"",verticalAlign:n.element.VerticalAlign,backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundColor:oe(ao)({color:n.element.BackgroundColor,themeColors:n.theme.Colors})??"inherit"},oe(mi)({border:n.element.Border,themeColors:n.theme.Colors}),oe(No)({borderRadius:n.element.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadiusBanner})])},[(ie(!0),Ce(ot,null,$n(n.element.Elements,(l,c)=>(ie(),mt(Na,{key:c,deps:n.deps,theme:n.theme,element:l,path:[...n.path,"Elements",c],selectedElementPath:n.selectedElementPath,context:n.context,onOnImageSizeAdjusted:a[0]||(a[0]=d=>o("onImageSizeAdjusted",d)),onOnImageOriginalSizeAdjusted:a[1]||(a[1]=d=>o("onImageOriginalSizeAdjusted",d)),onOnElementClicked:a[2]||(a[2]=d=>o("onElementClicked",d))},null,8,["deps","theme","element","path","selectedElementPath","context"]))),128))],12,e2)])])],4))}}),n2=e=>ar(e),r2=e=>ar(e),o2=e=>ar(e),i2=e=>({Match:t=>{switch(e){case"Left":return t.whenLeft();case"Center":return t.whenCenter();case"Right":return t.whenRight();case"Inline":return t.whenInline()}}}),Ta=e=>i2(e.contentAlign).Match({whenLeft:()=>({display:"block",textAlign:"left"}),whenCenter:()=>({display:"block",textAlign:"center"}),whenRight:()=>({display:"block",textAlign:"right"}),whenInline:()=>({})});let Kf;const Cu={mounted(e,t){const n=t.value;Kf=new ResizeObserver(o=>{o.forEach(s=>n(s.contentRect))}),Kf.observe(e)},unmounted(e){Kf.unobserve(e)}},s2=["href"],a2=["src","alt"],l2=["src","alt"],u2=at({__name:"Image",props:{deps:{},theme:{},element:{},path:{},context:{type:[String,Number,Boolean,Array,Object]}},emits:["onImageOriginalSizeAdjusted","onImageSizeAdjusted"],setup(e,{emit:t}){const n=d=>{o("onImageOriginalSizeAdjusted",{Path:s.path,OriginalHeight:d.target.naturalHeight,OriginalWidth:d.target.naturalWidth})},o=t,s=e,a=dn({href:"",src:"",alt:"",isLoaded:!1}),l=async d=>s.deps.stringExpressionEvaluator({stringExpression:d,context:s.context}),c=async()=>{const[d,m,p]=await Promise.all([l(s.element.Src),l(s.element.HRef),l(s.element.Alt)]);a.href=m,a.src=d,a.alt=p,a.isLoaded=!0};return nn(()=>[s.element.Src,s.element.HRef,s.element.Alt,s.context],()=>c()),c(),(d,m)=>s.element.IsLink?(ie(),Ce("a",{key:0,href:a.href,style:Se([oe(Ta)({contentAlign:s.element.ContentAlign})]),onClick:m[0]||(m[0]=fs(()=>{},["prevent"]))},[a.isLoaded?oo((ie(),Ce("img",{key:0,class:"Image cursor-pointer",src:a.src,alt:a.alt,style:Se([oe(No)({borderRadius:s.element.BorderRadius,borderRadiusCard:s.theme.BorderRadiusCard,bodyBorderRadius:s.theme.BorderRadius,borderButtonRadius:s.theme.BorderRadiusButton,borderBannerRadius:s.theme.BorderRadiusBanner}),oe(mi)({border:s.element.Border,themeColors:s.theme.Colors}),{maxWidth:"100%",width:(s.element.IsRetina?s.element.OriginalWidth/2:s.element.OriginalWidth)+"px"},{verticalAlign:s.element.VerticalAlign}]),onLoad:n},null,44,a2)),[[oe(Cu),({width:p,height:E})=>o("onImageSizeAdjusted",{Path:s.path,AdjustedHeight:E,AdjustedWidth:p})]]):vn("",!0)],12,s2)):(ie(),Ce("span",{key:1,style:Se([oe(Ta)({contentAlign:s.element.ContentAlign})])},[a.isLoaded?oo((ie(),Ce("img",{key:0,class:"Image cursor-pointer",src:a.src,alt:a.alt,style:Se([oe(No)({borderRadius:s.element.BorderRadius,borderRadiusCard:s.theme.BorderRadiusCard,bodyBorderRadius:s.theme.BorderRadius,borderButtonRadius:s.theme.BorderRadiusButton,borderBannerRadius:s.theme.BorderRadiusBanner}),oe(mi)({border:s.element.Border,themeColors:s.theme.Colors}),{maxWidth:"100%",width:(s.element.IsRetina?s.element.OriginalWidth/2:s.element.OriginalWidth)+"px"},{verticalAlign:s.element.VerticalAlign}]),onLoad:n},null,44,l2)),[[oe(Cu),({width:p,height:E})=>o("onImageSizeAdjusted",{Path:s.path,AdjustedHeight:E,AdjustedWidth:p})]]):vn("",!0)],4))}}),c2=e=>({Match:t=>{if(e.Auto!==void 0)return t.whenAuto();if(e.Pixel!==void 0)return t.whenPixels(e.Pixel.Value);if(e.Percentage!==void 0)return t.whenPercentages(e.Percentage.Value);throw Error("")}}),f2=e=>e.width===void 0?{}:c2(e.width).Match({whenAuto:()=>({width:"auto"}),whenPixels:t=>({width:t+"px"}),whenPercentages:t=>({width:t+"%"})}),d2=e=>({Match:t=>{switch(e){case"Auto":return t.whenAuto();case"FullWidth":return t.whenFullWidth()}}}),h2=e=>d2(e).Match({whenAuto:()=>({width:"auto"}),whenFullWidth:()=>({width:"100%"})}),m2=at({__name:"OneLineList",props:{deps:{},theme:{},element:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]}},emits:["onImageSizeAdjusted","onImageOriginalSizeAdjusted","onElementClicked"],setup(e,{emit:t}){const n=e,o=t;return(s,a)=>(ie(),Ce("table",{class:"oneLineList",style:Se([{"border-spacing":"0","border-collapse":"collapse"},[oe(h2)(n.element.ContainerWidth)]])},[Z("tbody",null,[Z("tr",null,[(ie(!0),Ce(ot,null,$n(n.element.Elements,(l,c)=>(ie(),Ce("td",{key:c,class:"oneLineListItem",style:Se([oe(bs)({paddings:n.element.ItemPaddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),oe(f2)({width:n.element.ItemWidth}),{lineHeight:"normal"}])},[(ie(),mt(Na,{key:c,deps:n.deps,theme:n.theme,element:l,path:[...n.path,"Elements",c],selectedElementPath:n.selectedElementPath,context:n.context,onOnImageSizeAdjusted:a[0]||(a[0]=d=>o("onImageSizeAdjusted",d)),onOnImageOriginalSizeAdjusted:a[1]||(a[1]=d=>o("onImageOriginalSizeAdjusted",d)),onOnElementClicked:a[2]||(a[2]=d=>o("onElementClicked",d))},null,8,["deps","theme","element","path","selectedElementPath","context"]))],4))),128))])])],4))}}),p2={class:"Spacer",width:"100%",style:{"border-spacing":"0","border-collapse":"collapse",width:"100%"}},g2={style:{"border-spacing":"0","border-collapse":"collapse",width:"100%"}},_2=at({__name:"Spacer",props:{theme:{},element:{}},setup(e){const t=e;return(n,o)=>(ie(),Ce("table",p2,[Z("tbody",null,[Z("tr",null,[Z("td",{valign:"middle",style:Se([{height:oe(tn)({paddingExpression:t.element.Height,themeComponentPaddings:t.theme.ComponentPaddings,themeBodyPaddings:t.theme.BodyPaddings})+"px"}])},[Z("table",g2,[Z("tbody",null,[Z("tr",null,[Z("td",{style:Se([{"font-size":"0","line-height":"0","border-bottom":"0","border-left":"0","border-right":"0"},[{borderTop:t.element.Weight+"px",borderStyle:t.element.Weight>0?"solid":"none",borderColor:oe(ao)({color:t.element.Color,themeColors:t.theme.Colors})}]])}," ",4)])])])],4)])])]))}});/*! @license DOMPurify 3.1.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.0/LICENSE */const{entries:Zb,setPrototypeOf:RE,isFrozen:E2,getPrototypeOf:v2,getOwnPropertyDescriptor:y2}=Object;let{freeze:Tn,seal:sr,create:Qb}=Object,{apply:Md,construct:Bd}=typeof Reflect<"u"&&Reflect;Tn||(Tn=function(t){return t});sr||(sr=function(t){return t});Md||(Md=function(t,n,o){return t.apply(n,o)});Bd||(Bd=function(t,n){return new t(...n)});const Kl=Vn(Array.prototype.forEach),PE=Vn(Array.prototype.pop),Xs=Vn(Array.prototype.push),iu=Vn(String.prototype.toLowerCase),zf=Vn(String.prototype.toString),DE=Vn(String.prototype.match),Js=Vn(String.prototype.replace),b2=Vn(String.prototype.indexOf),C2=Vn(String.prototype.trim),pr=Vn(Object.prototype.hasOwnProperty),On=Vn(RegExp.prototype.test),Zs=T2(TypeError);function Vn(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),s=1;s<n;s++)o[s-1]=arguments[s];return Md(e,t,o)}}function T2(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Bd(e,n)}}function je(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:iu;RE&&RE(e,null);let o=t.length;for(;o--;){let s=t[o];if(typeof s=="string"){const a=n(s);a!==s&&(E2(t)||(t[o]=a),s=a)}e[s]=!0}return e}function w2(e){for(let t=0;t<e.length;t++)pr(e,t)||(e[t]=null);return e}function oi(e){const t=Qb(null);for(const[n,o]of Zb(e))pr(e,n)&&(Array.isArray(o)?t[n]=w2(o):o&&typeof o=="object"&&o.constructor===Object?t[n]=oi(o):t[n]=o);return t}function zl(e,t){for(;e!==null;){const o=y2(e,t);if(o){if(o.get)return Vn(o.get);if(typeof o.value=="function")return Vn(o.value)}e=v2(e)}function n(){return null}return n}const NE=Tn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),qf=Tn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Xf=Tn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),S2=Tn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Jf=Tn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),A2=Tn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ME=Tn(["#text"]),BE=Tn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Zf=Tn(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),kE=Tn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ql=Tn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),x2=sr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),L2=sr(/<%[\w\W]*|[\w\W]*%>/gm),O2=sr(/\${[\w\W]*}/gm),I2=sr(/^data-[\-\w.\u00B7-\uFFFF]/),R2=sr(/^aria-[\-\w]+$/),eC=sr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),P2=sr(/^(?:\w+script|data):/i),D2=sr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),tC=sr(/^html$/i),N2=sr(/^[a-z][.\w]*(-[.\w]+)+$/i);var FE=Object.freeze({__proto__:null,MUSTACHE_EXPR:x2,ERB_EXPR:L2,TMPLIT_EXPR:O2,DATA_ATTR:I2,ARIA_ATTR:R2,IS_ALLOWED_URI:eC,IS_SCRIPT_OR_DATA:P2,ATTR_WHITESPACE:D2,DOCTYPE_NAME:tC,CUSTOM_ELEMENT:N2});const M2=function(){return typeof window>"u"?null:window},B2=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null;const s="data-tt-policy-suffix";n&&n.hasAttribute(s)&&(o=n.getAttribute(s));const a="dompurify"+(o?"#"+o:"");try{return t.createPolicy(a,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function nC(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:M2();const t=pe=>nC(pe);if(t.version="3.1.0",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let{document:n}=e;const o=n,s=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:l,Node:c,Element:d,NodeFilter:m,NamedNodeMap:p=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:E,DOMParser:C,trustedTypes:w}=e,N=d.prototype,x=zl(N,"cloneNode"),F=zl(N,"nextSibling"),S=zl(N,"childNodes"),B=zl(N,"parentNode");if(typeof l=="function"){const pe=n.createElement("template");pe.content&&pe.content.ownerDocument&&(n=pe.content.ownerDocument)}let $,A="";const{implementation:H,createNodeIterator:G,createDocumentFragment:U,getElementsByTagName:le}=n,{importNode:ce}=o;let de={};t.isSupported=typeof Zb=="function"&&typeof B=="function"&&H&&H.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Pe,ERB_EXPR:ke,TMPLIT_EXPR:We,DATA_ATTR:Tt,ARIA_ATTR:Bt,IS_SCRIPT_OR_DATA:Le,ATTR_WHITESPACE:ge,CUSTOM_ELEMENT:Te}=FE;let{IS_ALLOWED_URI:qe}=FE,Fe=null;const Je=je({},[...NE,...qf,...Xf,...Jf,...ME]);let De=null;const Gt=je({},[...BE,...Zf,...kE,...ql]);let He=Object.seal(Qb(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),it=null,pt=null,kt=!0,nt=!0,wt=!1,At=!0,lt=!1,Ft=!0,g=!1,h=!1,b=!1,D=!1,M=!1,V=!1,ee=!0,q=!1;const J="user-content-";let z=!0,ne=!1,O={},k=null;const re=je({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ue=null;const we=je({},["audio","video","img","source","image","track"]);let Me=null;const ut=je({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ct="http://www.w3.org/1998/Math/MathML",Ot="http://www.w3.org/2000/svg",ft="http://www.w3.org/1999/xhtml";let on=ft,br=!1,It=null;const sn=je({},[ct,Ot,ft],zf);let Cr=null;const ec=["application/xhtml+xml","text/html"],tc="text/html";let Rt=null,Fr=null;const nc=n.createElement("form"),Ma=function(I){return I instanceof RegExp||I instanceof Function},Cs=function(){let I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Fr&&Fr===I)){if((!I||typeof I!="object")&&(I={}),I=oi(I),Cr=ec.indexOf(I.PARSER_MEDIA_TYPE)===-1?tc:I.PARSER_MEDIA_TYPE,Rt=Cr==="application/xhtml+xml"?zf:iu,Fe=pr(I,"ALLOWED_TAGS")?je({},I.ALLOWED_TAGS,Rt):Je,De=pr(I,"ALLOWED_ATTR")?je({},I.ALLOWED_ATTR,Rt):Gt,It=pr(I,"ALLOWED_NAMESPACES")?je({},I.ALLOWED_NAMESPACES,zf):sn,Me=pr(I,"ADD_URI_SAFE_ATTR")?je(oi(ut),I.ADD_URI_SAFE_ATTR,Rt):ut,ue=pr(I,"ADD_DATA_URI_TAGS")?je(oi(we),I.ADD_DATA_URI_TAGS,Rt):we,k=pr(I,"FORBID_CONTENTS")?je({},I.FORBID_CONTENTS,Rt):re,it=pr(I,"FORBID_TAGS")?je({},I.FORBID_TAGS,Rt):{},pt=pr(I,"FORBID_ATTR")?je({},I.FORBID_ATTR,Rt):{},O=pr(I,"USE_PROFILES")?I.USE_PROFILES:!1,kt=I.ALLOW_ARIA_ATTR!==!1,nt=I.ALLOW_DATA_ATTR!==!1,wt=I.ALLOW_UNKNOWN_PROTOCOLS||!1,At=I.ALLOW_SELF_CLOSE_IN_ATTR!==!1,lt=I.SAFE_FOR_TEMPLATES||!1,Ft=I.SAFE_FOR_XML!==!1,g=I.WHOLE_DOCUMENT||!1,D=I.RETURN_DOM||!1,M=I.RETURN_DOM_FRAGMENT||!1,V=I.RETURN_TRUSTED_TYPE||!1,b=I.FORCE_BODY||!1,ee=I.SANITIZE_DOM!==!1,q=I.SANITIZE_NAMED_PROPS||!1,z=I.KEEP_CONTENT!==!1,ne=I.IN_PLACE||!1,qe=I.ALLOWED_URI_REGEXP||eC,on=I.NAMESPACE||ft,He=I.CUSTOM_ELEMENT_HANDLING||{},I.CUSTOM_ELEMENT_HANDLING&&Ma(I.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(He.tagNameCheck=I.CUSTOM_ELEMENT_HANDLING.tagNameCheck),I.CUSTOM_ELEMENT_HANDLING&&Ma(I.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(He.attributeNameCheck=I.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),I.CUSTOM_ELEMENT_HANDLING&&typeof I.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(He.allowCustomizedBuiltInElements=I.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),lt&&(nt=!1),M&&(D=!0),O&&(Fe=je({},ME),De=[],O.html===!0&&(je(Fe,NE),je(De,BE)),O.svg===!0&&(je(Fe,qf),je(De,Zf),je(De,ql)),O.svgFilters===!0&&(je(Fe,Xf),je(De,Zf),je(De,ql)),O.mathMl===!0&&(je(Fe,Jf),je(De,kE),je(De,ql))),I.ADD_TAGS&&(Fe===Je&&(Fe=oi(Fe)),je(Fe,I.ADD_TAGS,Rt)),I.ADD_ATTR&&(De===Gt&&(De=oi(De)),je(De,I.ADD_ATTR,Rt)),I.ADD_URI_SAFE_ATTR&&je(Me,I.ADD_URI_SAFE_ATTR,Rt),I.FORBID_CONTENTS&&(k===re&&(k=oi(k)),je(k,I.FORBID_CONTENTS,Rt)),z&&(Fe["#text"]=!0),g&&je(Fe,["html","head","body"]),Fe.table&&(je(Fe,["tbody"]),delete it.tbody),I.TRUSTED_TYPES_POLICY){if(typeof I.TRUSTED_TYPES_POLICY.createHTML!="function")throw Zs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof I.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Zs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');$=I.TRUSTED_TYPES_POLICY,A=$.createHTML("")}else $===void 0&&($=B2(w,s)),$!==null&&typeof A=="string"&&(A=$.createHTML(""));Tn&&Tn(I),Fr=I}},Ba=je({},["mi","mo","mn","ms","mtext"]),Ts=je({},["foreignobject","desc","title","annotation-xml"]),rc=je({},["title","style","font","a","script"]),ka=je({},[...qf,...Xf,...S2]),Fa=je({},[...Jf,...A2]),ws=function(I){let te=B(I);(!te||!te.tagName)&&(te={namespaceURI:on,tagName:"template"});const he=iu(I.tagName),st=iu(te.tagName);return It[I.namespaceURI]?I.namespaceURI===Ot?te.namespaceURI===ft?he==="svg":te.namespaceURI===ct?he==="svg"&&(st==="annotation-xml"||Ba[st]):!!ka[he]:I.namespaceURI===ct?te.namespaceURI===ft?he==="math":te.namespaceURI===Ot?he==="math"&&Ts[st]:!!Fa[he]:I.namespaceURI===ft?te.namespaceURI===Ot&&!Ts[st]||te.namespaceURI===ct&&!Ba[st]?!1:!Fa[he]&&(rc[he]||!ka[he]):!!(Cr==="application/xhtml+xml"&&It[I.namespaceURI]):!1},ur=function(I){Xs(t.removed,{element:I});try{I.parentNode.removeChild(I)}catch{I.remove()}},Uo=function(I,te){try{Xs(t.removed,{attribute:te.getAttributeNode(I),from:te})}catch{Xs(t.removed,{attribute:null,from:te})}if(te.removeAttribute(I),I==="is"&&!De[I])if(D||M)try{ur(te)}catch{}else try{te.setAttribute(I,"")}catch{}},$a=function(I){let te=null,he=null;if(b)I="<remove></remove>"+I;else{const jt=DE(I,/^[\r\n\t ]+/);he=jt&&jt[0]}Cr==="application/xhtml+xml"&&on===ft&&(I='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+I+"</body></html>");const st=$?$.createHTML(I):I;if(on===ft)try{te=new C().parseFromString(st,Cr)}catch{}if(!te||!te.documentElement){te=H.createDocument(on,"template",null);try{te.documentElement.innerHTML=br?A:st}catch{}}const Pt=te.body||te.documentElement;return I&&he&&Pt.insertBefore(n.createTextNode(he),Pt.childNodes[0]||null),on===ft?le.call(te,g?"html":"body")[0]:g?te.documentElement:Pt},Wa=function(I){return G.call(I.ownerDocument||I,I,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},oc=function(I){return I instanceof E&&(typeof I.nodeName!="string"||typeof I.textContent!="string"||typeof I.removeChild!="function"||!(I.attributes instanceof p)||typeof I.removeAttribute!="function"||typeof I.setAttribute!="function"||typeof I.namespaceURI!="string"||typeof I.insertBefore!="function"||typeof I.hasChildNodes!="function")},Ha=function(I){return typeof c=="function"&&I instanceof c},cr=function(I,te,he){de[I]&&Kl(de[I],st=>{st.call(t,te,he,Fr)})},Ua=function(I){let te=null;if(cr("beforeSanitizeElements",I,null),oc(I))return ur(I),!0;const he=Rt(I.nodeName);if(cr("uponSanitizeElement",I,{tagName:he,allowedTags:Fe}),I.hasChildNodes()&&!Ha(I.firstElementChild)&&On(/<[/\w]/g,I.innerHTML)&&On(/<[/\w]/g,I.textContent)||I.nodeType===7||Ft&&I.nodeType===8&&On(/<[/\w]/g,I.data))return ur(I),!0;if(!Fe[he]||it[he]){if(!it[he]&&Ga(he)&&(He.tagNameCheck instanceof RegExp&&On(He.tagNameCheck,he)||He.tagNameCheck instanceof Function&&He.tagNameCheck(he)))return!1;if(z&&!k[he]){const st=B(I)||I.parentNode,Pt=S(I)||I.childNodes;if(Pt&&st){const jt=Pt.length;for(let $t=jt-1;$t>=0;--$t)st.insertBefore(x(Pt[$t],!0),F(I))}}return ur(I),!0}return I instanceof d&&!ws(I)||(he==="noscript"||he==="noembed"||he==="noframes")&&On(/<\/no(script|embed|frames)/i,I.innerHTML)?(ur(I),!0):(lt&&I.nodeType===3&&(te=I.textContent,Kl([Pe,ke,We],st=>{te=Js(te,st," ")}),I.textContent!==te&&(Xs(t.removed,{element:I.cloneNode()}),I.textContent=te)),cr("afterSanitizeElements",I,null),!1)},Va=function(I,te,he){if(ee&&(te==="id"||te==="name")&&(he in n||he in nc))return!1;if(!(nt&&!pt[te]&&On(Tt,te))){if(!(kt&&On(Bt,te))){if(!De[te]||pt[te]){if(!(Ga(I)&&(He.tagNameCheck instanceof RegExp&&On(He.tagNameCheck,I)||He.tagNameCheck instanceof Function&&He.tagNameCheck(I))&&(He.attributeNameCheck instanceof RegExp&&On(He.attributeNameCheck,te)||He.attributeNameCheck instanceof Function&&He.attributeNameCheck(te))||te==="is"&&He.allowCustomizedBuiltInElements&&(He.tagNameCheck instanceof RegExp&&On(He.tagNameCheck,he)||He.tagNameCheck instanceof Function&&He.tagNameCheck(he))))return!1}else if(!Me[te]){if(!On(qe,Js(he,ge,""))){if(!((te==="src"||te==="xlink:href"||te==="href")&&I!=="script"&&b2(he,"data:")===0&&ue[I])){if(!(wt&&!On(Le,Js(he,ge,"")))){if(he)return!1}}}}}}return!0},Ga=function(I){return I!=="annotation-xml"&&DE(I,Te)},Ss=function(I){cr("beforeSanitizeAttributes",I,null);const{attributes:te}=I;if(!te)return;const he={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:De};let st=te.length;for(;st--;){const Pt=te[st],{name:jt,namespaceURI:$t,value:$r}=Pt,Vo=Rt(jt);let an=jt==="value"?$r:C2($r);if(he.attrName=Vo,he.attrValue=an,he.keepAttr=!0,he.forceKeepAttr=void 0,cr("uponSanitizeAttribute",I,he),an=he.attrValue,he.forceKeepAttr||(Uo(jt,I),!he.keepAttr))continue;if(!At&&On(/\/>/i,an)){Uo(jt,I);continue}lt&&Kl([Pe,ke,We],xs=>{an=Js(an,xs," ")});const As=Rt(I.nodeName);if(Va(As,Vo,an)){if(q&&(Vo==="id"||Vo==="name")&&(Uo(jt,I),an=J+an),$&&typeof w=="object"&&typeof w.getAttributeType=="function"&&!$t)switch(w.getAttributeType(As,Vo)){case"TrustedHTML":{an=$.createHTML(an);break}case"TrustedScriptURL":{an=$.createScriptURL(an);break}}try{$t?I.setAttributeNS($t,jt,an):I.setAttribute(jt,an),PE(t.removed)}catch{}}}cr("afterSanitizeAttributes",I,null)},ic=function pe(I){let te=null;const he=Wa(I);for(cr("beforeSanitizeShadowDOM",I,null);te=he.nextNode();)cr("uponSanitizeShadowNode",te,null),!Ua(te)&&(te.content instanceof a&&pe(te.content),Ss(te));cr("afterSanitizeShadowDOM",I,null)};return t.sanitize=function(pe){let I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},te=null,he=null,st=null,Pt=null;if(br=!pe,br&&(pe="<!-->"),typeof pe!="string"&&!Ha(pe))if(typeof pe.toString=="function"){if(pe=pe.toString(),typeof pe!="string")throw Zs("dirty is not a string, aborting")}else throw Zs("toString is not a function");if(!t.isSupported)return pe;if(h||Cs(I),t.removed=[],typeof pe=="string"&&(ne=!1),ne){if(pe.nodeName){const $r=Rt(pe.nodeName);if(!Fe[$r]||it[$r])throw Zs("root node is forbidden and cannot be sanitized in-place")}}else if(pe instanceof c)te=$a("<!---->"),he=te.ownerDocument.importNode(pe,!0),he.nodeType===1&&he.nodeName==="BODY"||he.nodeName==="HTML"?te=he:te.appendChild(he);else{if(!D&&!lt&&!g&&pe.indexOf("<")===-1)return $&&V?$.createHTML(pe):pe;if(te=$a(pe),!te)return D?null:V?A:""}te&&b&&ur(te.firstChild);const jt=Wa(ne?pe:te);for(;st=jt.nextNode();)Ua(st)||(st.content instanceof a&&ic(st.content),Ss(st));if(ne)return pe;if(D){if(M)for(Pt=U.call(te.ownerDocument);te.firstChild;)Pt.appendChild(te.firstChild);else Pt=te;return(De.shadowroot||De.shadowrootmode)&&(Pt=ce.call(o,Pt,!0)),Pt}let $t=g?te.outerHTML:te.innerHTML;return g&&Fe["!doctype"]&&te.ownerDocument&&te.ownerDocument.doctype&&te.ownerDocument.doctype.name&&On(tC,te.ownerDocument.doctype.name)&&($t="<!DOCTYPE "+te.ownerDocument.doctype.name+`>
|
|
82
|
-
`+$t),lt&&Kl([Pe,ke,We],$r=>{$t=Js($t,$r," ")}),$&&V?$.createHTML($t):$t},t.setConfig=function(){let pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Cs(pe),h=!0},t.clearConfig=function(){Fr=null,h=!1},t.isValidAttribute=function(pe,I,te){Fr||Cs({});const he=Rt(pe),st=Rt(I);return Va(he,st,te)},t.addHook=function(pe,I){typeof I=="function"&&(de[pe]=de[pe]||[],Xs(de[pe],I))},t.removeHook=function(pe){if(de[pe])return PE(de[pe])},t.removeHooks=function(pe){de[pe]&&(de[pe]=[])},t.removeAllHooks=function(){de={}},t}var $E=nC();const kd={beforeMount(e,t){e.innerHTML=$E.sanitize(t.value)},beforeUpdate(e,t){e.innerHTML=$E.sanitize(t.value)}},k2=e=>({Match:t=>{switch(e.Discriminator){case"EmailBackgroundColor":return t.whenEmailBackgroundColor();case"BodyColor":return t.whenBodyColor();case"TitleColor":return t.whenTitleColor();case"HeadingColor":return t.whenHeadingColor();case"SubHeadingColor":return t.whenSubHeading();case"LargeTextColor":return t.whenLargeTextColor();case"NormalTextColor":return t.whenNormalTextColor();case"DescriptionTextColor":return t.whenDescriptionTextColor();case"PrimaryTextColor":return t.whenPrimaryTextColor();case"SecondaryTextColor":return t.whenSecondaryTextColor();case"ButtonTextColor":return t.whenButtonTextColor();case"LinkColor":return t.whenLinkColor();case"PrimaryColor":return t.whenPrimaryColor();case"SecondaryColor":return t.whenSecondaryColor();case"CardBackgroundColor":return t.whenCardBackgroundColor();case"Custom":return t.whenCustom(e.CustomValue)}}}),F2=e=>k2(e.fontColor).Match({whenEmailBackgroundColor:()=>e.themeColors.EmailBackgroundColor,whenBodyColor:()=>e.themeColors.BodyColor,whenTitleColor:()=>e.themeColors.TitleColor,whenHeadingColor:()=>e.themeColors.HeadingColor,whenSubHeading:()=>e.themeColors.SubHeadingColor,whenLargeTextColor:()=>e.themeColors.LargeTextColor,whenNormalTextColor:()=>e.themeColors.NormalTextColor,whenDescriptionTextColor:()=>e.themeColors.DescriptionTextColor,whenPrimaryTextColor:()=>e.themeColors.PrimaryTextColor,whenSecondaryTextColor:()=>e.themeColors.SecondaryTextColor,whenLinkColor:()=>e.themeColors.LinkColor,whenPrimaryColor:()=>e.themeColors.PrimaryColor,whenSecondaryColor:()=>e.themeColors.SecondaryColor,whenCardBackgroundColor:()=>e.themeColors.CardBackgroundColor,whenButtonTextColor:()=>e.themeColors.ButtonTextColor,whenCustom:t=>t}),$2=e=>({Match:t=>{switch(e){case"None":return t.whenNone();case"Underline":return t.whenUnderline();case"LineThrough":return t.whenLineThrough()}}}),rC=e=>$2(e.textDecoration).Match({whenNone:()=>"none",whenUnderline:()=>"underline",whenLineThrough:()=>"line-through"}),W2=e=>({fontSize:e.customFontSettings.FontSize,lineHeight:e.customFontSettings.LineHeight,fontWeight:e.customFontSettings.IsBold?"bold":"normal",fontStyle:e.customFontSettings.IsItalic?"italic":"normal",textDecoration:rC({textDecoration:e.customFontSettings.Decoration}),fontFamily:e.customFontSettings.FontFamily,color:F2({fontColor:e.customFontSettings.FontColor,themeColors:e.themeColors})}),oC=e=>({Match:t=>{switch(e.Discriminator){case"Heading":return t.whenHeading();case"Title":return t.whenTitle();case"SubHeading":return t.whenSubHeading();case"LargeText":return t.whenLargeText();case"NormalText":return t.whenNormalText();case"DescriptionText":return t.whenDescriptionText();case"Link":return t.whenLink();case"Button":return t.whenButton();case"Custom":return t.whenCustom(e.CustomFontSettings);default:return _s(e.Discriminator)}}}),H2=e=>({Match:t=>{switch(e.Discriminator){case"StyleLinkedColor":return t.whenFontStyle();case"EmailBackgroundColor":return t.whenEmailBackgroundColor();case"BodyColor":return t.whenBodyColor();case"TitleColor":return t.whenTitleColor();case"HeadingColor":return t.whenHeadingColor();case"SubHeadingColor":return t.whenSubHeading();case"LargeTextColor":return t.whenLargeTextColor();case"NormalTextColor":return t.whenNormalTextColor();case"DescriptionTextColor":return t.whenDescriptionTextColor();case"PrimaryTextColor":return t.whenPrimaryTextColor();case"SecondaryTextColor":return t.whenSecondaryTextColor();case"ButtonTextColor":return t.whenButtonTextColor();case"LinkColor":return t.whenLinkColor();case"PrimaryColor":return t.whenPrimaryColor();case"SecondaryColor":return t.whenSecondaryColor();case"CardBackgroundColor":return t.whenCardBackgroundColor();case"Custom":return t.whenCustom(e.CustomValue)}}}),U2=e=>H2(e.fontStyleColor).Match({whenFontStyle:()=>oC(e.fontStyle).Match({whenHeading:()=>e.themeColors.HeadingColor,whenTitle:()=>e.themeColors.TitleColor,whenSubHeading:()=>e.themeColors.SubHeadingColor,whenLargeText:()=>e.themeColors.LargeTextColor,whenNormalText:()=>e.themeColors.NormalTextColor,whenDescriptionText:()=>e.themeColors.DescriptionTextColor,whenButton:()=>e.themeColors.ButtonTextColor,whenLink:()=>e.themeColors.LinkColor,whenCustom:t=>ao({color:t.FontColor,themeColors:e.themeColors})}),whenEmailBackgroundColor:()=>e.themeColors.EmailBackgroundColor,whenBodyColor:()=>e.themeColors.BodyColor,whenTitleColor:()=>e.themeColors.TitleColor,whenHeadingColor:()=>e.themeColors.HeadingColor,whenSubHeading:()=>e.themeColors.SubHeadingColor,whenLargeTextColor:()=>e.themeColors.LargeTextColor,whenNormalTextColor:()=>e.themeColors.NormalTextColor,whenDescriptionTextColor:()=>e.themeColors.DescriptionTextColor,whenPrimaryTextColor:()=>e.themeColors.PrimaryTextColor,whenSecondaryTextColor:()=>e.themeColors.SecondaryTextColor,whenLinkColor:()=>e.themeColors.LinkColor,whenPrimaryColor:()=>e.themeColors.PrimaryColor,whenSecondaryColor:()=>e.themeColors.SecondaryColor,whenCardBackgroundColor:()=>e.themeColors.CardBackgroundColor,whenButtonTextColor:()=>e.themeColors.ButtonTextColor,whenCustom:t=>t}),V2={Arial:"Arial",Georgia:"Georgia",Tahoma:"Tahoma",TimesNewRoman:"Times New Roman",Verdana:"Verdana"},Bh=e=>({fontSize:e.fontSize+"px",lineHeight:e.lineHeight+"px",fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:V2[e.fontFamily],textDecoration:e.textDecoration,color:e.color}),kh=e=>{const t=n=>({fontSize:n.FontSize,lineHeight:n.LineHeight,fontWeight:n.IsBold?"bold":"normal",fontStyle:n.IsItalic?"italic":"normal",fontFamily:e.fontFamily,textDecoration:rC({textDecoration:n.Decoration}),color:U2({fontStyleColor:e.fontStyle.FontColor,fontStyle:e.fontStyle,themeColors:e.themeColors})});return oC(e.fontStyle).Match({whenHeading:()=>t(e.themeFontSettings.Heading),whenTitle:()=>t(e.themeFontSettings.Title),whenSubHeading:()=>t(e.themeFontSettings.SubHeading),whenLargeText:()=>t(e.themeFontSettings.LargeText),whenNormalText:()=>t(e.themeFontSettings.NormalText),whenDescriptionText:()=>t(e.themeFontSettings.DescriptionText),whenLink:()=>t(e.themeFontSettings.Link),whenButton:()=>t(e.themeFontSettings.Button),whenCustom:n=>W2({customFontSettings:n,themeColors:e.themeColors})})},G2=e=>({Match:t=>{switch(e.Discriminator){case"Theme":return t.whenTheme();case"Custom":return t.whenCustom(e.CustomValue);default:return _s(e.Discriminator)}}}),j2=e=>G2(e.buttonPaddings).Match({whenTheme:()=>({TopBottom:e.themeButtonPaddings.TopBottom,LeftRight:e.themeButtonPaddings.LeftRight}),whenCustom:t=>({TopBottom:t.TopBottom,LeftRight:t.LeftRight})}),Y2={style:{"border-spacing":"0","border-collapse":"collapse",width:"100%"}},K2=["align"],z2={class:"Button"},q2=["href"],X2=at({__name:"ButtonVue",props:{deps:{},theme:{},element:{},context:{type:[String,Number,Boolean,Array,Object]}},setup(e){const t=e,n=Re(()=>Bh(kh({fontFamily:t.theme.FontFamily,fontStyle:t.element.TextStyle,themeFontSettings:t.theme.FontSettingsPresets,themeColors:t.theme.Colors}))),o=Re(()=>ou({borderColor:t.element.Border.Left.Color,themeColors:t.theme.Colors})),s=Re(()=>j2({buttonPaddings:t.element.Paddings,themeButtonPaddings:t.theme.ButtonPaddings})),a=Re(()=>ao({color:t.element.BackgroundColor,themeColors:t.theme.Colors})),l=Re(()=>{switch(t.element.ContentAlign){case"Center":return"center";case"Left":return"left";case"Right":return"right";default:return"center"}}),c=dn({href:"",text:"",isLoading:!0}),d=t.deps.stringExpressionEvaluator,m=()=>{Promise.all([d({stringExpression:t.element.HRef,context:t.context}),d({stringExpression:t.element.Text,context:t.context})]).then(([p,E])=>{c.href=p,c.text=E,c.isLoading=!1})};return m(),nn(()=>[t.element.HRef,t.element.Text,t.context],()=>m()),(p,E)=>(ie(),Ce("table",Y2,[Z("tbody",null,[Z("tr",null,[Z("td",{align:l.value},[Z("div",z2,[Z("a",{style:Se([{display:"block","text-decoration":"none"},[n.value]]),href:c.href,onClick:E[0]||(E[0]=fs(()=>{},["prevent"]))},[Z("table",{align:"center",style:Se([{"text-align":"center","border-spacing":"0","border-collapse":"separate"},[{backgroundColor:a.value},oe(No)({borderRadius:t.element.BorderRadius,borderRadiusCard:t.theme.BorderRadiusCard,bodyBorderRadius:t.theme.BorderRadius,borderButtonRadius:t.theme.BorderRadiusButton,borderBannerRadius:t.theme.BorderRadiusBanner}),{width:t.element.FullWidth?"100%":"auto"},oe(mi)({border:t.element.Border,themeColors:p.theme.Colors}),{borderColor:o.value}]])},[Z("tbody",null,[Z("tr",null,[Z("td",{align:"center",style:Se([{"line-height":"normal"},[{paddingTop:s.value.TopBottom+"px",paddingBottom:s.value.TopBottom+"px",paddingLeft:s.value.LeftRight+"px",paddingRight:s.value.LeftRight+"px"}]])},[oo(Z("p",{class:"user-select-none",style:Se([n.value])},null,4),[[oe(kd),c.text]])],4)])])],4)],12,q2)])],8,K2)])])]))}}),J2=["href"],Z2=at({__name:"SpanText",props:{deps:{},theme:{},element:{},context:{type:[String,Number,Boolean,Array,Object]}},setup(e){const t=e,n=t.deps.stringExpressionEvaluator,o=Re(()=>{const l=kh({fontFamily:t.theme.FontFamily,fontStyle:t.element.Style,themeFontSettings:t.theme.FontSettingsPresets,themeColors:t.theme.Colors});return{...Bh(l),minHeight:t.element.MinNumberOfLines*l.lineHeight+"px"}}),s=dn({href:"",text:"",isLoading:!0}),a=()=>{Promise.all([n({stringExpression:t.element.HRef,context:t.context}),n({stringExpression:t.element.Text,context:t.context})]).then(([l,c])=>{s.href=l,s.text=c,s.isLoading=!1})};return a(),nn(()=>[t.context,t.element.HRef,t.element.Text],()=>a()),(l,c)=>t.element.IsLink?oo((ie(),Ce("a",{key:0,href:s.href,class:"SpanText cursor-pointer user-select-none",style:Se([{margin:"0"},[o.value,oe(Ta)({contentAlign:t.element.ContentAlign})]]),onClick:c[0]||(c[0]=fs(()=>{},["prevent"]))},null,12,J2)),[[oe(kd),s.text]]):oo((ie(),Ce("span",{key:1,class:"SpanText cursor-pointer user-select-none",style:Se([{margin:"0"},[o.value,oe(Ta)({contentAlign:t.element.ContentAlign})]])},null,4)),[[oe(kd),s.text]])}});const Q2=Gn(Z2,[["__scopeId","data-v-24009fb3"]]),eW=at({__name:"UnsubscribeLink",props:{theme:{},element:{}},setup(e){const t=e,n=Re(()=>{const o=kh({fontFamily:t.theme.FontFamily,fontStyle:t.element.Style,themeFontSettings:t.theme.FontSettingsPresets,themeColors:t.theme.Colors});return{...Bh(o)}});return(o,s)=>(ie(),Ce("a",{href:"#",class:"cursor-pointer user-select-none",style:Se([{margin:"0"},[n.value,oe(Ta)({contentAlign:t.element.ContentAlign})]]),onClick:s[0]||(s[0]=fs(()=>{},["prevent"]))},Ud(t.element.Text),5))}});const tW=Gn(eW,[["__scopeId","data-v-5cffc6e3"]]),Na=at({__name:"Elements",props:{deps:{},theme:{},element:{},path:{},context:{type:[String,Number,Boolean,Array,Object]},selectedElementPath:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted"],setup(e,{emit:t}){const n=e,o=t,s=(a,l)=>{o("onElementClicked",{element:a,path:[...n.path,l]})};return(a,l)=>(ie(),Ce("span",{onClick:l[16]||(l[16]=fs(()=>{},["stop"]))},[oe(wo).button(n.element.Button)?(ie(),mt(X2,{key:0,deps:n.deps,theme:n.theme,element:n.element.Button,context:n.context,class:gr({"element-selected":oe(qs.isEqual)(n.selectedElementPath,[...n.path,"Button"])}),onClick:l[0]||(l[0]=c=>s(n.element,"Button"))},null,8,["deps","theme","element","context","class"])):vn("",!0),oe(wo).heightContainer(n.element.HeightContainer)?(ie(),mt(t2,{key:1,deps:n.deps,theme:n.theme,element:n.element.HeightContainer,path:[...n.path,"HeightContainer"],selectedElementPath:n.selectedElementPath,context:n.context,onOnImageOriginalSizeAdjusted:l[1]||(l[1]=c=>o("onImageOriginalSizeAdjusted",c)),onOnImageSizeAdjusted:l[2]||(l[2]=c=>o("onImageSizeAdjusted",c)),onOnElementClicked:l[3]||(l[3]=c=>o("onElementClicked",c))},null,8,["deps","theme","element","path","selectedElementPath","context"])):vn("",!0),oe(wo).image(n.element.Image)?(ie(),mt(u2,{key:2,deps:n.deps,theme:n.theme,element:n.element.Image,context:n.context,path:[...n.path,"Image"],class:gr({"element-selected":oe(qs.isEqual)(n.selectedElementPath,[...n.path,"Image"])}),onOnImageOriginalSizeAdjusted:l[4]||(l[4]=c=>o("onImageOriginalSizeAdjusted",c)),onOnImageSizeAdjusted:l[5]||(l[5]=c=>o("onImageSizeAdjusted",c)),onClick:l[6]||(l[6]=c=>s(n.element,"Image"))},null,8,["deps","theme","element","context","path","class"])):vn("",!0),oe(wo).spacer(n.element.Spacer)?(ie(),mt(_2,{key:3,element:n.element.Spacer,theme:n.theme,class:gr({"element-selected":oe(qs.isEqual)(n.selectedElementPath,[...n.path,"Spacer"])}),onClick:l[7]||(l[7]=c=>s(n.element,"Spacer"))},null,8,["element","theme","class"])):vn("",!0),oe(wo).spanText(n.element.SpanText)?(ie(),mt(Q2,{key:4,deps:n.deps,theme:n.theme,element:n.element.SpanText,context:n.context,class:gr({"element-selected":oe(qs.isEqual)(n.selectedElementPath,[...n.path,"SpanText"])}),onClick:l[8]||(l[8]=c=>s(n.element,"SpanText"))},null,8,["deps","theme","element","context","class"])):vn("",!0),oe(wo).oneLineLink(n.element.OneLineList)?(ie(),mt(m2,{key:5,deps:n.deps,theme:n.theme,element:n.element.OneLineList,path:[...n.path,"OneLineList"],selectedElementPath:n.selectedElementPath,context:n.context,onOnImageOriginalSizeAdjusted:l[9]||(l[9]=c=>o("onImageOriginalSizeAdjusted",c)),onOnImageSizeAdjusted:l[10]||(l[10]=c=>o("onImageSizeAdjusted",c)),onOnElementClicked:l[11]||(l[11]=c=>o("onElementClicked",c))},null,8,["deps","theme","element","path","selectedElementPath","context"])):vn("",!0),oe(wo).if(n.element.If)?(ie(),mt(J$,{key:6,deps:n.deps,theme:n.theme,element:n.element.If,context:n.context,path:[...n.path,"If"],selectedElementPath:n.selectedElementPath,onOnImageOriginalSizeAdjusted:l[12]||(l[12]=c=>o("onImageOriginalSizeAdjusted",c)),onOnImageSizeAdjusted:l[13]||(l[13]=c=>o("onImageSizeAdjusted",c)),onOnElementClicked:l[14]||(l[14]=c=>o("onElementClicked",c))},null,8,["deps","theme","element","context","path","selectedElementPath"])):vn("",!0),oe(wo).unsubscribeLink(n.element.UnsubscribeLink)?(ie(),mt(tW,{key:7,theme:n.theme,element:n.element.UnsubscribeLink,class:gr({"element-selected":oe(qs.isEqual)(n.selectedElementPath,[...n.path,"UnsubscribeLink"])}),onClick:l[15]||(l[15]=c=>s(n.element,"UnsubscribeLink"))},null,8,["theme","element","class"])):vn("",!0)]))}}),nW=at({__name:"IteratedColumn",props:{deps:{},theme:{},iteratedColumn:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]},containerWidth:{}},emits:["onImageSizeAdjusted","onImageOriginalSizeAdjusted","onElementClicked"],setup(e,{emit:t}){ku(a=>({"6300cb1b":s.value}));const n=e,o=t,s=Re(()=>n.iteratedColumn.WidthInPercents*n.containerWidth+"px");return(a,l)=>(ie(),Ce("div",{class:"iterated-column",style:Se({display:"inline-block",verticalAlign:n.iteratedColumn.VerticalAlign})},[Z("table",{style:Se([[oe(zb)({borderCollapse:n.iteratedColumn.BorderCollapse})],{width:"100%","border-spacing":"0"}]),width:"100%"},[Z("tbody",null,[Z("tr",null,[Z("td",{style:Se([{"line-height":"normal"},[oe(Xb)({containerAlign:n.iteratedColumn.ContainerAlign}),oe(bs)({paddings:n.iteratedColumn.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),oe(mi)({border:n.iteratedColumn.Border,themeColors:n.theme.Colors}),{backgroundColor:oe(ao)({color:n.iteratedColumn.BgColor,themeColors:n.theme.Colors})},oe(No)({borderRadius:n.iteratedColumn.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadiusBanner})]])},[(ie(!0),Ce(ot,null,$n(n.iteratedColumn.Elements,(c,d)=>(ie(),mt(Na,{key:d,deps:n.deps.elementsDeps,theme:n.theme,element:c,context:n.context,path:[...n.path,"Elements",d],selectedElementPath:n.selectedElementPath,onOnElementClicked:l[0]||(l[0]=m=>o("onElementClicked",m)),onOnImageSizeAdjusted:l[1]||(l[1]=m=>o("onImageSizeAdjusted",m)),onOnImageOriginalSizeAdjusted:l[2]||(l[2]=m=>o("onImageOriginalSizeAdjusted",m))},null,8,["deps","theme","element","context","path","selectedElementPath"]))),128))],4)])])],4)],4))}});const rW=Gn(nW,[["__scopeId","data-v-284c0a90"]]),oW={class:"iterated-column-container",style:{"border-spacing":"0","border-collapse":"collapse",width:"100%",margin:"0 auto"},width:"100%"},iW={align:"center",style:{"font-size":"0"}},sW=at({__name:"IteratedColumnBodyRow",props:{deps:{},theme:{},iteratedColumnBodyRow:{},path:{},selectedElementPath:{},context:{},rowWidth:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted"],setup(e,{emit:t}){ku(c=>({"22b1b0df":a.value}));const n=e,o=dn({dataList:[],isLoaded:!1}),s=()=>n.deps.listExpressionEvaluator({listExpression:n.iteratedColumnBodyRow.DataSource,context:n.context}).then(c=>{o.dataList=c,o.isLoaded=!0});s(),nn(()=>n.context,()=>s());const a=Re(()=>tn({paddingExpression:n.iteratedColumnBodyRow.ColumnSpacerSize,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})+"px"),l=t;return(c,d)=>(ie(),Ce("table",oW,[Z("tbody",null,[Z("tr",null,[Z("td",iW,[(ie(!0),Ce(ot,null,$n(o.dataList,(m,p)=>(ie(),Ce("span",{key:p},[Ke(rW,{class:gr(["iterated-column-bottom-spacer",{"iterated-column__tablet-padding-right":(p+1)%2===1,"iterated-column__tablet-padding-left":(p+1)%2===0,"is-last-desktop-line":p>=o.dataList.length-n.iteratedColumnBodyRow.NumberColumnsInLine,"is-last-tablet-line":p>=o.dataList.length-2,"is-last-mobile-line":p==o.dataList.length-1}]),deps:n.deps.iteratedColumnDeps,theme:n.theme,style:Se(oe(Kb)({numberColumnsInLine:n.iteratedColumnBodyRow.NumberColumnsInLine,index:p,paddingSize:oe(tn)({paddingExpression:n.iteratedColumnBodyRow.ColumnSpacerSize,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),directionRtl:!1})),iteratedColumn:n.iteratedColumnBodyRow.IteratedColumn,path:[...n.path,"IteratedColumn"],selectedElementPath:n.selectedElementPath,context:{...n.context,[n.iteratedColumnBodyRow.IndexName]:m},containerWidth:n.rowWidth,onOnElementClicked:d[0]||(d[0]=E=>l("onElementClicked",E)),onOnImageOriginalSizeAdjusted:d[1]||(d[1]=E=>l("onImageOriginalSizeAdjusted",E)),onOnImageSizeAdjusted:d[2]||(d[2]=E=>l("onImageSizeAdjusted",E))},null,8,["deps","theme","class","style","iteratedColumn","path","selectedElementPath","context","containerWidth"])]))),128))])])])]))}});const aW=Gn(sW,[["__scopeId","data-v-7d644c9d"]]),lW={style:{"border-spacing":"0","border-collapse":"collapse",width:"100%",margin:"0 auto"}},uW=at({__name:"IteratedBodyRow",props:{theme:{},deps:{},iteratedBodyRow:{},path:{},selectedElementPath:{},context:{},containerWidth:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted","onColumnWidthAdjusted"],setup(e,{emit:t}){const n=e,o=dn({dataList:[]});n.deps.listExpressionEvaluator({listExpression:n.iteratedBodyRow.DataSource,context:n.context}).then(a=>o.dataList=a);const s=t;return(a,l)=>(ie(),Ce("table",lW,[(ie(!0),Ce(ot,null,$n(o.dataList,(c,d)=>(ie(),Ce("tr",{key:d},[Z("td",{style:Se([oe(bs)({paddings:n.iteratedBodyRow.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})])},[Ke(lC,{emailComponentBodyRow:n.iteratedBodyRow.BodyRow,deps:{iteratedColumnBodyRowDeps:n.deps.iteratedColumnBodyRowDeps,multipleColumnBodyRowDeps:n.deps.multipleColumnBodyRowDeps,listExpressionEvaluator:n.deps.listExpressionEvaluator},theme:n.theme,context:{...n.context,[n.iteratedBodyRow.IndexName]:c},rowWidth:n.containerWidth,path:[...n.path,"BodyRow"],selectedElementPath:n.selectedElementPath,onOnElementClicked:l[0]||(l[0]=m=>s("onElementClicked",m)),onOnImageOriginalSizeAdjusted:l[1]||(l[1]=m=>s("onImageOriginalSizeAdjusted",m)),onOnImageSizeAdjusted:l[2]||(l[2]=m=>s("onImageSizeAdjusted",m)),onOnColumnWidthAdjusted:l[3]||(l[3]=m=>s("onColumnWidthAdjusted",m))},null,8,["emailComponentBodyRow","deps","theme","context","rowWidth","path","selectedElementPath"])],4)]))),128))]))}});var su={},iC={},Qu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isNone=e.isSome=e.None=e.Some=e.OptionType=void 0,e.OptionType={Some:Symbol(":some"),None:Symbol(":none")};function t(l){return typeof l>"u"?o():n(l)}e.Some=t,e.None=o();function n(l){return{type:e.OptionType.Some,isSome(){return!0},isNone(){return!1},match(c){return c.some(l)},map(c){return n(c(l))},andThen(c){return c(l)},or(c){return this},and(c){return c},unwrapOr(c){return l},unwrap(){return l}}}function o(){return{type:e.OptionType.None,isSome(){return!1},isNone(){return!0},match(l){const{none:c}=l;return typeof c=="function"?c():c},map(l){return o()},andThen(l){return o()},or(l){return l},and(l){return o()},unwrapOr(l){if(l==null)throw new Error("Cannot call unwrapOr with a missing value.");return l},unwrap(){throw new ReferenceError("Trying to unwrap None.")}}}function s(l){return l.isSome()}e.isSome=s;function a(l){return l.isNone()}e.isNone=a})(Qu);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isRight=e.isLeft=e.Right=e.Left=e.EitherType=void 0;const t=Qu;e.EitherType={Left:Symbol(":left"),Right:Symbol(":right")};function n(l){return{type:e.EitherType.Left,isLeft(){return!0},isRight(){return!1},left(){return(0,t.Some)(l)},leftAndThen(c){return c(l)},right(){return t.None},rightAndThen(c){return n(l)},unwrap(){return l},unwrapLeft(){return l},unwrapLeftOr(c){return l},unwrapLeftOrElse(c){return l},unwrapRight(){throw new ReferenceError("Cannot unwrap Right value of Either.Left")},unwrapRightOr(c){return c},unwrapRightOrElse(c){return c(l)},match(c){return c.left(l)},map(c){return n(c(l))},mapLeft(c){return n(c(l))},mapRight(c){return n(l)}}}e.Left=n;function o(l){return{type:e.EitherType.Right,isLeft(){return!1},isRight(){return!0},left(){return t.None},leftAndThen(c){return o(l)},right(){return(0,t.Some)(l)},rightAndThen(c){return c(l)},unwrap(){return l},unwrapLeft(){throw new ReferenceError("Cannot unwrap Left value of Either.Right")},unwrapLeftOr(c){return c},unwrapLeftOrElse(c){return c(l)},unwrapRight(){return l},unwrapRightOr(c){return l},unwrapRightOrElse(c){return l},match(c){return c.right(l)},map(c){return o(c(l))},mapLeft(c){return o(l)},mapRight(c){return o(c(l))}}}e.Right=o;function s(l){return l.isLeft()}e.isLeft=s;function a(l){return l.isRight()}e.isRight=a})(iC);var sC={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isErr=e.isOk=e.Err=e.Ok=e.ResultType=void 0;const t=Qu;e.ResultType={Ok:Symbol(":ok"),Err:Symbol(":err")};function n(l){return{type:e.ResultType.Ok,isOk(){return!0},isErr(){return!1},ok(){return(0,t.Some)(l)},err(){return t.None},unwrap(){return l},unwrapOr(c){return l},unwrapOrElse(c){return l},unwrapErr(){throw new ReferenceError("Cannot unwrap Err value of Result.Ok")},match(c){return c.ok(l)},map(c){return n(c(l))},mapErr(c){return n(l)},andThen(c){return c(l)},orElse(c){return n(l)}}}e.Ok=n;function o(l){return{type:e.ResultType.Err,isOk(){return!1},isErr(){return!0},ok(){return t.None},err(){return(0,t.Some)(l)},unwrap(){throw new ReferenceError("Cannot unwrap Ok value of Result.Err")},unwrapOr(c){return c},unwrapOrElse(c){return c(l)},unwrapErr(){return l},match(c){return c.err(l)},map(c){return o(l)},mapErr(c){return o(c(l))},andThen(c){return o(l)},orElse(c){return c(l)}}}e.Err=o;function s(l){return l.isOk()}e.isOk=s;function a(l){return l.isErr()}e.isErr=a})(sC);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Ok=e.isOk=e.isErr=e.Err=e.Some=e.None=e.isSome=e.isNone=e.Right=e.Left=e.isRight=e.isLeft=void 0;var t=iC;Object.defineProperty(e,"isLeft",{enumerable:!0,get:function(){return t.isLeft}}),Object.defineProperty(e,"isRight",{enumerable:!0,get:function(){return t.isRight}}),Object.defineProperty(e,"Left",{enumerable:!0,get:function(){return t.Left}}),Object.defineProperty(e,"Right",{enumerable:!0,get:function(){return t.Right}});var n=Qu;Object.defineProperty(e,"isNone",{enumerable:!0,get:function(){return n.isNone}}),Object.defineProperty(e,"isSome",{enumerable:!0,get:function(){return n.isSome}}),Object.defineProperty(e,"None",{enumerable:!0,get:function(){return n.None}}),Object.defineProperty(e,"Some",{enumerable:!0,get:function(){return n.Some}});var o=sC;Object.defineProperty(e,"Err",{enumerable:!0,get:function(){return o.Err}}),Object.defineProperty(e,"isErr",{enumerable:!0,get:function(){return o.isErr}}),Object.defineProperty(e,"isOk",{enumerable:!0,get:function(){return o.isOk}}),Object.defineProperty(e,"Ok",{enumerable:!0,get:function(){return o.Ok}})})(su);const cW=e=>({Match:t=>{switch(e){case"Top":return t.whenTop();case"Middle":return t.whenMiddle();case"Bottom":return t.whenBottom();case"Baseline":return t.whenBaseline()}}}),fW=e=>cW(e).Match({whenTop:()=>"start",whenMiddle:()=>"center",whenBottom:()=>"end",whenBaseline:()=>"baseline"}),Qf={justifyWidth:e=>(e==null?void 0:e.WidthInPixels)!==void 0,shrinkToContentWidth:e=>(e==null?void 0:e.WidthInPixels)!==void 0,widthInPercents:e=>e!==void 0},aC=e=>({Match:t=>{if(e.JustifyWidth!==void 0)return t.whenJustifyWidth(e.JustifyWidth.WidthInPixels);if(e.ShrinkToContentWidth!==void 0)return t.whenShrinkToContentWidth(e.ShrinkToContentWidth.WidthInPixels);if(e.WidthInPercents!==void 0)return t.whenWidthInPercents(e.WidthInPercents.Value);throw Error("")}}),dW=e=>({Match:t=>aC(e).Match({whenJustifyWidth:n=>t.whenJustifyWidth?t.whenJustifyWidth(n):t.default(),whenWidthInPercents:n=>t.whenWidthInPercents?t.whenWidthInPercents(n):t.default(),whenShrinkToContentWidth:n=>t.whenShrinkToContentWidth?t.whenShrinkToContentWidth(n):t.default()})}),hW=e=>({JustifyWidth:{WidthInPixels:e}}),mW=e=>({ShrinkToContentWidth:{WidthInPixels:e}}),pW=["align"],gW=at({__name:"MultipleColumn",props:{deps:{},theme:{},multipleColumn:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]},containerWidth:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted","onColumnWidthAdjusted"],setup(e,{emit:t}){ku(d=>({"505fd5fb":c.value,"89e91a86":l.value,"6083c43a":a.value}));const n=e,o=t,s=d=>{aC(n.multipleColumn.Width).Match({whenJustifyWidth:()=>su.Some(hW(d)),whenShrinkToContentWidth:()=>su.Some(mW(d)),whenWidthInPercents:()=>su.None}).map(m=>o("onColumnWidthAdjusted",{Path:n.path,Width:m}))},a=Re(()=>dW(n.multipleColumn.Width).Match({default:()=>"",whenWidthInPercents:d=>d*n.containerWidth+"px"})),l=Re(()=>fW(n.multipleColumn.VerticalAlign)),c=Re(()=>n.multipleColumn.VerticalAlign);return(d,m)=>oo((ie(),Ce("div",{class:gr(["multiple-column",{"multiple-column--justifyWidth":oe(Qf).justifyWidth(n.multipleColumn.Width.JustifyWidth),"multiple-column--shrinkToContentWidth":oe(Qf).shrinkToContentWidth(n.multipleColumn.Width.ShrinkToContentWidth),"multiple-column--widthInPercents":oe(Qf).widthInPercents(n.multipleColumn.Width.WidthInPercents)}]),style:{direction:"ltr"}},[Z("table",{style:Se([{width:"100%","border-spacing":"0"},[oe(zb)({borderCollapse:n.multipleColumn.BorderCollapse})]]),width:"100%"},[Z("tbody",null,[Z("tr",null,[Z("td",{align:oe(Jb)({containerAlign:n.multipleColumn.ContainerAlign}),style:Se([{"line-height":"normal"},[oe(mi)({border:n.multipleColumn.Border,themeColors:n.theme.Colors}),oe(No)({borderRadius:n.multipleColumn.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadiusBanner}),{backgroundColor:oe(ao)({color:n.multipleColumn.BgColor,themeColors:n.theme.Colors})},oe(bs)({paddings:n.multipleColumn.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})]])},[(ie(!0),Ce(ot,null,$n(n.multipleColumn.Elements,(p,E)=>(ie(),mt(Na,{key:E,deps:n.deps.elementsDeps,theme:n.theme,element:p,context:n.context,path:[...n.path,"Elements",E],selectedElementPath:n.selectedElementPath,onOnElementClicked:m[0]||(m[0]=C=>o("onElementClicked",C)),onOnImageSizeAdjusted:m[1]||(m[1]=C=>o("onImageSizeAdjusted",C)),onOnImageOriginalSizeAdjusted:m[2]||(m[2]=C=>o("onImageOriginalSizeAdjusted",C))},null,8,["deps","theme","element","context","path","selectedElementPath"]))),128))],12,pW)])])],4)],2)),[[oe(Cu),p=>s(p.width)]])}});const _W=Gn(gW,[["__scopeId","data-v-9630cdcf"]]),EW=at({__name:"MultipleColumnBodyRow",props:{deps:{},theme:{},multipleColumnBodyRow:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]},rowWidth:{}},emits:["onElementClicked","onImageSizeAdjusted","onImageOriginalSizeAdjusted","onColumnWidthAdjusted"],setup(e,{emit:t}){ku(a=>({"308ed3d8":s.value}));const n=e,o=t,s=Re(()=>tn({paddingExpression:n.multipleColumnBodyRow.ColumnSpacerSize,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})+"px");return(a,l)=>(ie(),Ce("table",{class:"multiple-column-container",style:Se([{"border-spacing":"0","border-collapse":"collapse",width:"100%",margin:"0 auto"},[oe(mi)({border:n.multipleColumnBodyRow.Border,themeColors:n.theme.Colors}),oe(No)({borderRadius:n.multipleColumnBodyRow.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadius}),{backgroundColor:oe(ao)({color:n.multipleColumnBodyRow.BgColor,themeColors:n.theme.Colors})}]]),width:"100%"},[Z("tbody",null,[Z("tr",null,[Z("td",{class:"multiple-column-container__inner",style:Se([{"font-size":"0"},[oe(Xb)({containerAlign:n.multipleColumnBodyRow.ContainerAlign}),oe(bs)({paddings:n.multipleColumnBodyRow.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),n.multipleColumnBodyRow.DirectionRtl?{direction:"rtl"}:{direction:"ltr"}]])},[(ie(!0),Ce(ot,null,$n(n.multipleColumnBodyRow.Columns,(c,d)=>(ie(),mt(_W,{key:d,deps:n.deps.multipleColumnDeps,theme:n.theme,multipleColumn:c,path:[...n.path,"Columns",d],selectedElementPath:n.selectedElementPath,context:n.context,containerWidth:n.rowWidth-oe(tn)({paddingExpression:n.multipleColumnBodyRow.Paddings.Left,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})-oe(tn)({paddingExpression:n.multipleColumnBodyRow.Paddings.Right,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})-n.multipleColumnBodyRow.Border.Left.Width-n.multipleColumnBodyRow.Border.Right.Width,style:Se(oe(Kb)({numberColumnsInLine:n.multipleColumnBodyRow.Columns.length,index:d,paddingSize:oe(tn)({paddingExpression:n.multipleColumnBodyRow.ColumnSpacerSize,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),directionRtl:n.multipleColumnBodyRow.DirectionRtl})),class:gr({"is-last-tablet-line":d==n.multipleColumnBodyRow.Columns.length-1,"is-last-mobile-line":d==n.multipleColumnBodyRow.Columns.length-1}),onOnElementClicked:l[0]||(l[0]=m=>o("onElementClicked",m)),onOnColumnWidthAdjusted:l[1]||(l[1]=m=>o("onColumnWidthAdjusted",m)),onOnImageSizeAdjusted:l[2]||(l[2]=m=>o("onImageSizeAdjusted",m)),onOnImageOriginalSizeAdjusted:l[3]||(l[3]=m=>o("onImageOriginalSizeAdjusted",m))},null,8,["deps","theme","multipleColumn","path","selectedElementPath","context","containerWidth","style","class"]))),128))],4)])])],4))}});const vW=Gn(EW,[["__scopeId","data-v-c2d3f20e"]]),lC=at({__name:"EmailComponentBodyRow",props:{deps:{},theme:{},emailComponentBodyRow:{},path:{},selectedElementPath:{},context:{},rowWidth:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted","onColumnWidthAdjusted"],setup(e,{emit:t}){const n=e,o={multipleColumns:a=>a!==void 0,iteratedColumns:a=>a!==void 0,iteratedBodyRow:a=>a!==void 0},s=t;return(a,l)=>(ie(),Ce("div",null,[o.multipleColumns(n.emailComponentBodyRow.MultipleColumnBodyRow)?(ie(),mt(vW,{key:0,deps:n.deps.multipleColumnBodyRowDeps,theme:n.theme,multipleColumnBodyRow:n.emailComponentBodyRow.MultipleColumnBodyRow,path:[...n.path,"MultipleColumnBodyRow"],selectedElementPath:n.selectedElementPath,context:a.context,rowWidth:n.rowWidth,onOnColumnWidthAdjusted:l[0]||(l[0]=c=>s("onColumnWidthAdjusted",c)),onOnImageOriginalSizeAdjusted:l[1]||(l[1]=c=>s("onImageOriginalSizeAdjusted",c)),onOnImageSizeAdjusted:l[2]||(l[2]=c=>s("onImageSizeAdjusted",c)),onOnElementClicked:l[3]||(l[3]=c=>s("onElementClicked",c))},null,8,["deps","theme","multipleColumnBodyRow","path","selectedElementPath","context","rowWidth"])):vn("",!0),o.iteratedColumns(n.emailComponentBodyRow.IteratedColumnBodyRow)?(ie(),mt(aW,{key:1,deps:n.deps.iteratedColumnBodyRowDeps,theme:n.theme,iteratedColumnBodyRow:n.emailComponentBodyRow.IteratedColumnBodyRow,path:[...n.path,"IteratedColumnBodyRow"],selectedElementPath:n.selectedElementPath,context:a.context,rowWidth:n.rowWidth,onOnElementClicked:l[4]||(l[4]=c=>s("onElementClicked",c)),onOnImageOriginalSizeAdjusted:l[5]||(l[5]=c=>s("onImageOriginalSizeAdjusted",c)),onOnImageSizeAdjusted:l[6]||(l[6]=c=>s("onImageSizeAdjusted",c))},null,8,["deps","theme","iteratedColumnBodyRow","path","selectedElementPath","context","rowWidth"])):vn("",!0),o.iteratedBodyRow(n.emailComponentBodyRow.IteratedBodyRow)?(ie(),mt(uW,{key:2,deps:{iteratedColumnBodyRowDeps:n.deps.iteratedColumnBodyRowDeps,multipleColumnBodyRowDeps:n.deps.multipleColumnBodyRowDeps,listExpressionEvaluator:n.deps.listExpressionEvaluator},theme:n.theme,iteratedBodyRow:n.emailComponentBodyRow.IteratedBodyRow,path:[...n.path,"IteratedBodyRow"],selectedElementPath:n.selectedElementPath,context:a.context,containerWidth:n.rowWidth,onOnElementClicked:l[7]||(l[7]=c=>s("onElementClicked",c)),onOnImageOriginalSizeAdjusted:l[8]||(l[8]=c=>s("onImageOriginalSizeAdjusted",c)),onOnImageSizeAdjusted:l[9]||(l[9]=c=>s("onImageSizeAdjusted",c))},null,8,["deps","theme","iteratedBodyRow","path","selectedElementPath","context","containerWidth"])):vn("",!0)]))}}),yW={key:0},bW={key:1,class:"empty-email-component"},CW={class:"bootstrap-styles w-100 d-flex justify-content-center gap-5"},TW=at({__name:"EmailComponent",props:{deps:{},theme:{},emailComponent:{},path:{},selectedElementPath:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted","onColumnWidthAdjusted"],setup(e,{emit:t}){const n=e,o=dn({context:{},ifResult:!n.emailComponent.ContextBuilderExpression,isLoaded:!1}),s=l=>{o.isLoaded=!1,n.deps.dataStructExpressionEvaluator({dataStructBuilderExpression:l,context:{}}).then(c=>{(n.emailComponent.IfExpression?n.deps.boolExpressionEvaluatorDelegate({boolExpression:n.emailComponent.IfExpression,context:c}):Promise.resolve(!0)).then(d=>{o.context=c,o.ifResult=d,o.isLoaded=!0})})};nn(()=>n.emailComponent.ContextBuilderExpression,l=>{l&&s(l)});const a=t;return n.emailComponent.ContextBuilderExpression?s(n.emailComponent.ContextBuilderExpression):o.isLoaded=!0,(l,c)=>{const d=LL("VSkeletonLoader");return o.isLoaded?(ie(),Ce("div",yW,[o.ifResult?(ie(),Ce("table",{key:0,style:Se([{"border-spacing":"0","border-collapse":"collapse",width:"100%",margin:"0 auto"},[{backgroundColor:oe(ao)({color:n.emailComponent.InnerBgColor,themeColors:n.theme.Colors})},oe(No)({borderRadius:n.emailComponent.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadiusBanner}),{maxWidth:n.theme.BodyWidth+"px"}]])},[Z("tbody",null,[Z("tr",null,[Z("td",{class:"row__inner",style:Se([oe(IE)({paddings:n.emailComponent.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings,fullWidth:n.emailComponent.FullWidth})])},[(ie(!0),Ce(ot,null,$n(n.emailComponent.BodyRowList,(m,p)=>(ie(),mt(lC,{key:p,deps:n.deps.emailComponentBodyRowDeps,theme:n.theme,emailComponentBodyRow:m,context:o.context,rowWidth:n.emailComponent.FullWidth?n.theme.BodyWidth:n.theme.BodyWidth-n.theme.BodyPaddings.Left-n.theme.BodyPaddings.Right,path:[...n.path,"BodyRowList",p],selectedElementPath:n.selectedElementPath,onOnElementClicked:c[0]||(c[0]=E=>a("onElementClicked",E)),onOnImageSizeAdjusted:c[1]||(c[1]=E=>a("onImageSizeAdjusted",E)),onOnImageOriginalSizeAdjusted:c[2]||(c[2]=E=>a("onImageOriginalSizeAdjusted",E)),onOnColumnWidthAdjusted:c[3]||(c[3]=E=>a("onColumnWidthAdjusted",E))},null,8,["deps","theme","emailComponentBodyRow","context","rowWidth","path","selectedElementPath"]))),128))],4)])])],4)):(ie(),Ce("div",bW,[c[5]||(c[5]=ih(" Товарная полка скрыта из-за недостатка товаров ")),oo((ie(),Ce("i",null,c[4]||(c[4]=[Z("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Z("path",{d:"M6.99967 13.6663C3.31777 13.6663 0.333008 10.6815 0.333008 6.99967C0.333008 3.31777 3.31777 0.333008 6.99967 0.333008C10.6815 0.333008 13.6663 3.31777 13.6663 6.99967C13.6663 10.6815 10.6815 13.6663 6.99967 13.6663ZM6.99967 12.333C9.94521 12.333 12.333 9.94521 12.333 6.99967C12.333 4.05415 9.94521 1.66634 6.99967 1.66634C4.05415 1.66634 1.66634 4.05415 1.66634 6.99967C1.66634 9.94521 4.05415 12.333 6.99967 12.333ZM6.33301 3.66634H7.66634V4.99967H6.33301V3.66634ZM6.33301 6.33301H7.66634V10.333H6.33301V6.33301Z",fill:"var(--gray-500)"})],-1)]))),[[oe(Yb),{placement:"top",title:"Товарная полка не будет отображаться у получателей письма пока в ней недостаточно товаров"}]])]))])):(ie(),Ce("div",{key:1,class:"bootstrap-styles w-100",style:Se([oe(IE)({paddings:n.emailComponent.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings,fullWidth:n.emailComponent.FullWidth}),{backgroundColor:oe(ao)({color:n.emailComponent.InnerBgColor,themeColors:n.theme.Colors})||"transparent"}])},[Ke(d,{type:"text"}),Z("div",CW,[(ie(),Ce(ot,null,$n(3,m=>Ke(d,{key:m,type:"image, text, text, text, button",style:{width:"100%"}})),64))])],4))}}});const uC=Gn(TW,[["__scopeId","data-v-a8102873"]]),wW={class:"scale-to-width-fit-component",style:{display:"inline-block","transform-origin":"left top"}},cC=at({__name:"ScaleToWidthFit",emits:["scaledElement"],setup(e,{emit:t}){const n=t;return(o,s)=>oo((ie(),Ce("div",wW,[sd(o.$slots,"default")])),[[oe(Cu),({width:a})=>{o.$el.style.transform=`scale(${o.$el.parentElement.clientWidth/a}`,n("scaledElement",o.$el)}]])}}),SW={class:"bootstrap-styles modal fade show d-block position-absolute"},AW={class:"bootstrap-styles modal-dialog modal-dialog-centered"},xW={class:"bootstrap-styles modal-content border rounded-3 shadow","data-test":"modal-window__content"},LW={class:"bootstrap-styles modal-header p-0"},OW={class:"bootstrap-styles container-fluid border-bottom g-0"},IW={class:"bootstrap-styles d-flex justify-content-between align-items-center px-11 py-7"},RW={class:"bootstrap-styles modal-title border-0","data-test":"modal-window__header-text"},PW={class:"bootstrap-styles modal-body p-0","data-test":"modal-window__body"},DW={class:"bootstrap-styles modal-footer p-0 g-0"},NW={class:"bootstrap-styles container-fluid border-top"},MW={class:"bootstrap-styles d-flex justify-content-end py-8 px-11"},BW={class:"bootstrap-styles col-6 d-flex justify-content-end","data-test":"modal-window__footer-actions"},kW=at({__name:"ModalWindow",props:{headerText:{}},emits:["close"],setup(e,{emit:t}){const n=e,o=t;return(s,a)=>(ie(),Ce("div",SW,[Z("div",{class:"bootstrap-styles modal-blur d-block position-fixed top-0 left-0 w-100 vh-100","data-test":"modal-window__outside",onClick:a[0]||(a[0]=l=>o("close"))}),Z("div",AW,[Z("div",xW,[Z("div",LW,[Z("div",OW,[Z("div",IW,[Z("h5",RW,Ud(n.headerText),1),oo((ie(),Ce("button",{type:"button","aria-label":"Close","data-bs-dismiss":"modal","data-test":"modal-window__close-button",onClick:a[1]||(a[1]=l=>o("close"))},a[2]||(a[2]=[Z("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[Z("path",{d:"M3 3L13 13",stroke:"var(--gray-500)"}),Z("path",{d:"M13 3L3 13",stroke:"var(--gray-500)"})],-1)]))),[[oe(Yb),{title:"Закрыть",placement:"top"}]])])])]),Z("div",PW,[sd(s.$slots,"body",{},void 0,!0)]),Z("div",DW,[Z("div",NW,[Z("div",MW,[Z("div",BW,[sd(s.$slots,"footer-actions",{},void 0,!0)])])])])])])]))}});const FW=Gn(kW,[["__scopeId","data-v-51d20551"]]),$W={class:"email-template-preview__inner-padding scrollable"},WW={class:"webkit emailTemplate--desktop"},HW={class:"emailTemplate-border-top"},UW={class:"emailTemplate-border-bottom"},VW=at({__name:"EmailTemplatePreviewModalWindow",props:{template:{},deps:{}},emits:["favoriteTemplateSelected","close"],setup(e,{emit:t}){const n=e,o=a=>{const l=a.parentElement;l&&(l.style.height=a.getBoundingClientRect().height+"px")},s=t;return(a,l)=>(ie(),mt(FW,{headerText:"Предпросмотр",class:"email-component__preview-modal-window",onClose:l[3]||(l[3]=()=>s("close"))},{body:ra(()=>[Z("div",{style:Se({backgroundColor:a.template.Theme.Colors.EmailBackgroundColor})},[Ke(cC,{onScaledElement:l[0]||(l[0]=c=>o(c))},{default:ra(()=>[Z("div",$W,[Z("div",{class:"bootstrap-styles pe-none email-template-preview",style:Se({backgroundColor:n.template.Theme.Colors.EmailBackgroundColor,fontFamily:n.template.Theme.FontFamily,width:a.template.Theme.BodyWidth+"px"})},[Z("div",WW,[Z("div",HW,[Z("table",{style:Se([[{maxWidth:n.template.Theme.BodyWidth+"px",width:"100%",backgroundColor:n.template.Theme.Colors.BodyColor,borderTopLeftRadius:n.template.Theme.BorderRadius.TopLeft+"px",borderTopRightRadius:n.template.Theme.BorderRadius.TopRight+"px"}],{"border-spacing":"0"}])},[Z("tbody",null,[Z("tr",null,[Z("td",{style:Se([{paddingTop:n.template.Theme.BodyPaddings.Top+"px"},{"font-size":"0","line-height":"0"}])}," ",4)])])],4)]),(ie(!0),Ce(ot,null,$n(n.template.Components,(c,d)=>(ie(),Ce("div",{key:d},[Ke(uC,{deps:a.deps.emailComponentDeps,theme:n.template.Theme,emailComponent:c,path:[],selectedElementPath:[]},null,8,["deps","theme","emailComponent"])]))),128)),Z("div",UW,[Z("table",{style:Se([[{maxWidth:n.template.Theme.BodyWidth+"px",width:"100%",backgroundColor:n.template.Theme.Colors.BodyColor,borderBottomLeftRadius:n.template.Theme.BorderRadius.BottomLeft+"px",borderBottomRightRadius:n.template.Theme.BorderRadius.BottomRight+"px"}],{"border-spacing":"0"}])},[Z("tbody",null,[Z("tr",null,[Z("td",{style:Se([{paddingBottom:n.template.Theme.BodyPaddings.Bottom+"px"},{"font-size":"0","line-height":"0"}])}," ",4)])])],4)])])],4)])]),_:1})],4)]),"footer-actions":ra(()=>[Z("button",{type:"button",class:"modal-footer__button bootstrap-styles d-flex justify-content-center align-center py-1 px-3 me-3 border border-blue-selected rounded-2 bg-blue-selected button__hover-blue-100 text-color-selected",onClick:l[1]||(l[1]=fs(()=>s("close"),["stop"]))}," Отмена "),Z("button",{type:"submit",class:"modal-footer__button bootstrap-styles d-flex justify-content-center align-center py-1 px-3 border rounded-2 bg-color-selected text-white cursor-pointer",onClick:l[2]||(l[2]=()=>{s("favoriteTemplateSelected")})}," Выбрать ")]),_:1}))}});const GW=Gn(VW,[["__scopeId","data-v-7bb60afa"]]),jW={class:"email-template-preview__inner-padding scrollable"},YW={class:"webkit emailTemplate--desktop"},KW={class:"emailTemplate-border-top"},zW={class:"emailTemplate-border-bottom"},qW=at({__name:"EmailTemplatePreviewTile",props:{deps:{},template:{}},emits:["favoriteTemplateSelected"],setup(e,{emit:t}){const n=e,o=dn({isPreviewComponentModalWindowShown:!1}),s=l=>{const c=l.parentElement;c&&(c.style.height=l.getBoundingClientRect().height+"px")},a=t;return(l,c)=>(ie(),Ce(ot,null,[Z("div",{class:"bootstrap-styles h-100",style:Se({backgroundColor:n.template.Theme.Colors.EmailBackgroundColor}),onClick:c[1]||(c[1]=()=>{o.isPreviewComponentModalWindowShown=!0})},[Ke(cC,{onScaledElement:c[0]||(c[0]=d=>s(d))},{default:ra(()=>[Z("div",jW,[Z("div",{class:"bootstrap-styles pe-none email-template-preview",style:Se({backgroundColor:n.template.Theme.Colors.EmailBackgroundColor,fontFamily:n.template.Theme.FontFamily,width:l.template.Theme.BodyWidth+"px"})},[Z("div",YW,[Z("div",KW,[Z("table",{style:Se([[{maxWidth:n.template.Theme.BodyWidth+"px",width:"100%",backgroundColor:n.template.Theme.Colors.BodyColor,borderTopLeftRadius:n.template.Theme.BorderRadius.TopLeft+"px",borderTopRightRadius:n.template.Theme.BorderRadius.TopRight+"px"}],{"border-spacing":"0"}])},[Z("tbody",null,[Z("tr",null,[Z("td",{style:Se([{paddingTop:n.template.Theme.BodyPaddings.Top+"px"},{"font-size":"0","line-height":"0"}])}," ",4)])])],4)]),(ie(!0),Ce(ot,null,$n(n.template.Components,(d,m)=>(ie(),Ce("div",{key:m},[Ke(uC,{deps:n.deps.emailComponentDeps,theme:n.template.Theme,emailComponent:d,path:[],selectedElementPath:[]},null,8,["deps","theme","emailComponent"])]))),128)),Z("div",zW,[Z("table",{style:Se([[{maxWidth:n.template.Theme.BodyWidth+"px",width:"100%",backgroundColor:n.template.Theme.Colors.BodyColor,borderBottomLeftRadius:n.template.Theme.BorderRadius.BottomLeft+"px",borderBottomRightRadius:n.template.Theme.BorderRadius.BottomRight+"px"}],{"border-spacing":"0"}])},[Z("tbody",null,[Z("tr",null,[Z("td",{style:Se([{paddingBottom:n.template.Theme.BodyPaddings.Bottom+"px"},{"font-size":"0","line-height":"0"}])}," ",4)])])],4)])])],4)])]),_:1})],4),(ie(),mt(_L,{to:"#app"},[o.isPreviewComponentModalWindowShown?(ie(),mt(GW,{key:0,template:n.template,deps:n.deps.emailTemplatePreviewModalWindowDeps,onClose:c[2]||(c[2]=()=>o.isPreviewComponentModalWindowShown=!1),onFavoriteTemplateSelected:c[3]||(c[3]=()=>a("favoriteTemplateSelected"))},null,8,["template","deps"])):vn("",!0)]))],64))}});const XW=Gn(qW,[["__scopeId","data-v-f6f330d3"]]),JW=e=>at((t,n)=>()=>Bu(XW,{template:e.template,deps:e.emailTemplatePreviewTileDeps,onFavoriteTemplateSelected:e.onFavoriteTemplateSelected})),ZW=e=>({elementsDeps:e.elementsDeps}),QW=e=>({iteratedColumnDeps:ZW({elementsDeps:e.elementsDeps}),listExpressionEvaluator:e.listExpressionEvaluator}),eH=e=>({elementsDeps:e.elementsDeps}),tH=e=>({multipleColumnDeps:eH({elementsDeps:e.elementsDeps})}),nH=e=>({iteratedColumnBodyRowDeps:QW({elementsDeps:e.elementsDeps,listExpressionEvaluator:e.listExpressionEvaluator}),multipleColumnBodyRowDeps:tH({elementsDeps:e.elementsDeps}),listExpressionEvaluator:e.listExpressionEvaluator}),fC=e=>({emailComponentBodyRowDeps:nH({elementsDeps:e.elementsDeps,listExpressionEvaluator:e.listExpressionEvaluator}),boolExpressionEvaluatorDelegate:e.boolExpressionEvaluator,dataStructExpressionEvaluator:e.dataStructExpressionEvaluator}),rH=e=>({expressionEvaluator:e.expressionEvaluator}),dC=e=>({listExpressionEvaluator:e.listExpressionEvaluator,numberExpressionEvaluator:e.numberExpressionEvaluator,stringExpressionEvaluator:e.stringExpressionEvaluator,expressionVueDeps:rH({expressionEvaluator:e.expressionEvaluator}),boolExpressionEvaluator:e.boolExpressionEvaluator}),oH=e=>ar(e),iH=e=>ar(e),sH=e=>({predicate:t,context:n})=>Promise.all([e.numberExpressionEvaluator({numberExpression:t.Left,context:n}),e.numberExpressionEvaluator({numberExpression:t.Right,context:n})]).then(([o,s])=>o===s),aH=e=>ar(e),lH=e=>({predicate:t,context:n})=>Promise.all([e.numberExpressionEvaluator({numberExpression:t.Left,context:n}),e.numberExpressionEvaluator({numberExpression:t.Right,context:n})]).then(([o,s])=>o<s),uH=e=>({predicate:t,context:n})=>Promise.all([e.numberExpressionEvaluator({numberExpression:t.Left,context:n}),e.numberExpressionEvaluator({numberExpression:t.Right,context:n})]).then(([o,s])=>o>s),cH=e=>{const t=sH({numberExpressionEvaluator:e.numberExpressionEvaluator}),n=uH({numberExpressionEvaluator:e.numberExpressionEvaluator}),o=lH({numberExpressionEvaluator:e.numberExpressionEvaluator});return({numberPredicate:s,context:a})=>aH(s).Match({whenEqual:l=>t({predicate:l,context:a}),whenGreaterThan:l=>n({predicate:l,context:a}),whenLessThan:l=>o({predicate:l,context:a})})},fH=e=>({predicate:t,context:n})=>Promise.all([e.stringExpressionEvaluator({stringExpression:t.Left,context:n}),e.stringExpressionEvaluator({stringExpression:t.Right,context:n})]).then(([o,s])=>o>s),dH=e=>ar(e),hH=e=>({predicate:t,context:n})=>Promise.all([e.stringExpressionEvaluator({stringExpression:t.Left,context:n}),e.stringExpressionEvaluator({stringExpression:t.Contains,context:n})]).then(([o,s])=>o>s),mH=e=>{const t=fH({stringExpressionEvaluator:e.stringExpressionEvaluator}),n=hH({stringExpressionEvaluator:e.stringExpressionEvaluator});return({stringPredicate:o,context:s})=>dH(o).Match({whenContains:a=>n({predicate:a,context:s}),whenEqual:a=>t({predicate:a,context:s})})},pH=e=>{const t=cH({numberExpressionEvaluator:e.numberExpressionEvaluator}),n=mH({stringExpressionEvaluator:e.stringExpressionEvaluator});return({predicate:o,context:s})=>iH(o).Match({whenNumberPredicate:a=>t({numberPredicate:a,context:s}),whenStringPredicate:a=>n({stringPredicate:a,context:s})})},hC=e=>{const t=pH({numberExpressionEvaluator:e.numberExpressionEvaluator,stringExpressionEvaluator:e.stringExpressionEvaluator}),n=({boolExpression:o,context:s})=>oH(o).Match({whenAndExpression:a=>Promise.all(a.Expressions.map(l=>n({boolExpression:l,context:s}))).then(l=>l.every(c=>c)),whenOrExpression:a=>Promise.all(a.Expressions.map(l=>n({boolExpression:l,context:s}))).then(l=>l.some(c=>c)),whenNotExpression:async a=>!await n({boolExpression:a.Expression,context:s}),whenPredicate:a=>t({predicate:a,context:s})});return n},gH=e=>{const t=hC({numberExpressionEvaluator:e.numberExpressionEvaluator,stringExpressionEvaluator:e.stringExpressionEvaluator});return{emailComponentDeps:fC({elementsDeps:dC({listExpressionEvaluator:e.listExpressionEvaluator,numberExpressionEvaluator:e.numberExpressionEvaluator,stringExpressionEvaluator:e.stringExpressionEvaluator,expressionEvaluator:e.expressionEvaluator,boolExpressionEvaluator:t}),listExpressionEvaluator:e.listExpressionEvaluator,boolExpressionEvaluator:t,dataStructExpressionEvaluator:e.dataStructExpressionEvaluator})}},_H=e=>{const t=hC({numberExpressionEvaluator:e.numberExpressionEvaluator,stringExpressionEvaluator:e.stringExpressionEvaluator});return{emailComponentDeps:fC({elementsDeps:dC({listExpressionEvaluator:e.listExpressionEvaluator,numberExpressionEvaluator:e.numberExpressionEvaluator,stringExpressionEvaluator:e.stringExpressionEvaluator,expressionEvaluator:e.expressionEvaluator,boolExpressionEvaluator:t}),listExpressionEvaluator:e.listExpressionEvaluator,boolExpressionEvaluator:t,dataStructExpressionEvaluator:e.dataStructExpressionEvaluator}),emailTemplatePreviewModalWindowDeps:gH({listExpressionEvaluator:e.listExpressionEvaluator,dataStructExpressionEvaluator:e.dataStructExpressionEvaluator,numberExpressionEvaluator:e.numberExpressionEvaluator,stringExpressionEvaluator:e.stringExpressionEvaluator,expressionEvaluator:e.expressionEvaluator})}},EH=e=>{const t=document.createElement("form");t.method=e.method,t.action=e.action;for(const[n,o]of e.formData.entries()){if(o instanceof File)continue;const s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name",n),s.setAttribute("value",o),t.appendChild(s)}return t},vH=e=>async({context:t,expression:n})=>e.numberExpressionEvaluator({numberExpression:n.ProductId,context:t}).then(o=>"https://cdn.retailrocket.net/api/1.0/partner/"+e.partnerId+"/item/"+o+"/picture/?format=png&width="+n.ImageSize.Width+"&height="+n.ImageSize.Height+"&scale=both"),yH=e=>{const t=n=>{const o=e.stringExpressionDataSourceEvaluatorFactory(t);return o2(n.stringExpression).Match({whenConcatStringExpressions:s=>wH({concatStringExpressions:s,stringExpressionEvaluator:t,context:n.context}),whenContextValueExpression:s=>bH({contextValueExpression:s,context:n.context}),whenConstValueExpression:s=>SH({stringConstValueExpression:s}),whenTruncateValueExpression:s=>CH({truncateValueExpression:s,context:n.context,stringExpressionEvaluator:t}),whenDataSource:s=>o({stringExpressionDataSource:s,context:n.context}),whenNumberToStringExpression:s=>TH({numberToStringExpression:s,context:n.context,numberExpressionEvaluator:e.numberExpressionEvaluator})})};return t},bH=e=>Promise.resolve(WN(e.contextValueExpression.Path,e.context)),CH=async e=>(await e.stringExpressionEvaluator({stringExpression:e.truncateValueExpression.StringExpression,context:e.context})).slice(0,e.truncateValueExpression.MaxLength)+e.truncateValueExpression.Tail,TH=async e=>(await e.numberExpressionEvaluator({numberExpression:e.numberToStringExpression.NumberExpression,context:e.context})).toString(),wH=e=>Promise.all(e.concatStringExpressions.StringExpressions.map(t=>e.stringExpressionEvaluator({stringExpression:t,context:e.context}))).then(t=>t.join("")),SH=e=>Promise.resolve(e.stringConstValueExpression.Value),AH=e=>{const t=n=>n2(n.listExpression).Match({whenContextValueExpression:o=>Promise.resolve($N(o.Path,n.context)),whenChunkExpression:async o=>{const s=await t({listExpression:o.ListExpression,context:n.context});return s.slice(0,Math.floor(s.length/o.ChunkSize)*o.ChunkSize)},whenLimitExpression:async o=>(await t({listExpression:o.ListExpression,context:n.context})).slice(0,o.Limit),whenDataSource:o=>e.listExpressionDataSourceEvaluator(o)});return t},xH=e=>t=>r2(t.numberExpression).Match({whenContextValueExpression:n=>Promise.resolve(jy(n.Path,t.context)),whenConstValueExpression:n=>Promise.resolve(n.Value),whenListLengthExpression:async n=>e.listExpressionEvaluator({listExpression:n.ListExpression,context:t.context}).then(o=>o.length),whenDataSource:n=>Promise.resolve(e.numberExpressionDataSourceEvaluator(n))}),WE=e=>({dataStructBuilderExpression:t,context:n})=>Promise.all(Object.entries(t).map(async([o,s])=>({key:o,value:await e.expressionEvaluator({expression:s,context:n})}))).then(o=>Object.fromEntries(o.map(s=>[s.key,s.value]))),LH=e=>ar(e),OH=e=>{const t=({expression:n,context:o})=>{const s=e.dataStructBuilderExpressionEvaluatorFactory(t);return LH(n).Match({whenNumberExpression:a=>e.numberExpressionEvaluator({numberExpression:a,context:o}),whenStringExpression:a=>e.stringExpressionEvaluator({stringExpression:a,context:o}),whenListExpression:a=>e.listExpressionEvaluator({listExpression:a,context:o}),whenRecordBuilderExpression:a=>s({dataStructBuilderExpression:a,context:o})})};return t},HE={Subject:"",Preheader:"",Theme:{BodyWidth:600,FontFamily:"Arial",Colors:{EmailBackgroundColor:"#EEEEEE",BodyColor:"#FFFFFF",PrimaryColor:"#557aff",PrimaryTextColor:"#ffffff",SecondaryColor:"#F6F6F6",SecondaryTextColor:"#000000",CardBackgroundColor:"#F2F2F2",HeadingColor:"#2F2F2F",TitleColor:"#2F2F2F",SubHeadingColor:"#2F2F2F",LargeTextColor:"#2F2F2F",NormalTextColor:"#2F2F2F",DescriptionTextColor:"#999999",LinkColor:"#65A0FA",ButtonTextColor:"#ffffff"},BorderRadius:{TopLeft:20,TopRight:20,BottomLeft:20,BottomRight:20},BorderRadiusCard:{TopLeft:0,TopRight:0,BottomLeft:0,BottomRight:0},BorderRadiusButton:{TopLeft:5,TopRight:5,BottomLeft:5,BottomRight:5},BorderRadiusBanner:{TopLeft:0,TopRight:0,BottomLeft:0,BottomRight:0},BodyPaddings:{Left:20,Right:20,Top:10,Bottom:10},ComponentPaddings:{Small:8,Medium:16,Large:24,Huge:40},ButtonPaddings:{TopBottom:12,LeftRight:14},FontSettingsPresets:{Title:{FontSize:24,LineHeight:28,IsBold:!0,IsItalic:!1,Decoration:"None"},Heading:{FontSize:20,LineHeight:24,IsBold:!0,IsItalic:!1,Decoration:"None"},SubHeading:{FontSize:14,LineHeight:16,IsBold:!0,IsItalic:!1,Decoration:"None"},LargeText:{FontSize:14,LineHeight:18,IsBold:!1,IsItalic:!1,Decoration:"None"},NormalText:{FontSize:12,LineHeight:15,IsBold:!1,IsItalic:!1,Decoration:"None"},DescriptionText:{FontSize:10,LineHeight:13,IsBold:!1,IsItalic:!1,Decoration:"None"},Button:{FontSize:12,LineHeight:14,IsBold:!0,IsItalic:!1,Decoration:"None"},Link:{FontSize:12,LineHeight:14,IsBold:!1,IsItalic:!1,Decoration:"None"}}},Components:[{BorderRadius:{TopLeft:{Discriminator:"CustomBorderRadius",CustomValue:0},TopRight:{Discriminator:"CustomBorderRadius",CustomValue:0},BottomRight:{Discriminator:"CustomBorderRadius",CustomValue:0},BottomLeft:{Discriminator:"CustomBorderRadius",CustomValue:0}},InnerBgColor:{Discriminator:"BodyColor",CustomValue:"#000000"},Paddings:{Top:{ThemePadding:"ThemePaddingsLarge"},Bottom:{ThemePadding:"ThemePaddingsLarge"}},FullWidth:!1,BodyRowList:[{MultipleColumnBodyRow:{ColumnSpacerSize:{CustomValue:0},DirectionRtl:!1,Paddings:{Left:{CustomValue:0},Top:{CustomValue:0},Right:{CustomValue:0},Bottom:{CustomValue:0}},Border:{Left:{Width:0,Style:"None",Color:{Discriminator:"Custom",CustomValue:"#FFFFFF"}},Top:{Width:0,Style:"None",Color:{Discriminator:"Custom",CustomValue:"#FFFFFF"}},Right:{Width:0,Style:"None",Color:{Discriminator:"Custom",CustomValue:"#FFFFFF"}},Bottom:{Width:0,Style:"None",Color:{Discriminator:"Custom",CustomValue:"#FFFFFF"}}},BorderRadius:{TopLeft:{Discriminator:"CustomBorderRadius",CustomValue:0},TopRight:{Discriminator:"CustomBorderRadius",CustomValue:0},BottomRight:{Discriminator:"CustomBorderRadius",CustomValue:0},BottomLeft:{Discriminator:"CustomBorderRadius",CustomValue:0}},BgColor:{Discriminator:"None",CustomValue:"#ffffff"},ContainerAlign:"Center",Columns:[{VerticalAlign:"Top",BgColor:{Discriminator:"None",CustomValue:"#ffffff"},Paddings:{Top:{CustomValue:0},Right:{CustomValue:0},Bottom:{CustomValue:0},Left:{CustomValue:0}},Border:{Left:{Width:0,Style:"None",Color:{Discriminator:"Custom",CustomValue:"#FFFFFF"}},Top:{Width:0,Style:"None",Color:{Discriminator:"Custom",CustomValue:"#FFFFFF"}},Right:{Width:0,Style:"None",Color:{Discriminator:"Custom",CustomValue:"#FFFFFF"}},Bottom:{Width:0,Style:"None",Color:{Discriminator:"Custom",CustomValue:"#FFFFFF"}}},BorderRadius:{TopLeft:{Discriminator:"CustomBorderRadius",CustomValue:0},TopRight:{Discriminator:"CustomBorderRadius",CustomValue:0},BottomRight:{Discriminator:"CustomBorderRadius",CustomValue:0},BottomLeft:{Discriminator:"CustomBorderRadius",CustomValue:0}},ContainerAlign:"Center",Elements:[{SpanText:{MinNumberOfLines:1,IsLink:!1,HRef:{ConstValueExpression:{Value:""}},Text:{ConstValueExpression:{Value:"Cервис создания электронных писем"}},Style:{Discriminator:"Heading",FontColor:{Discriminator:"StyleLinkedColor",CustomValue:"#000000"},CustomFontSettings:{FontFamily:"Arial",FontSize:16,LineHeight:20,IsBold:!1,IsItalic:!1,Decoration:"None",FontColor:{Discriminator:"NormalTextColor",CustomValue:"#000000"}}},ContentAlign:"Inline"}},{Spacer:{Height:{ThemePadding:"ThemePaddingsLarge"},Weight:0,Color:{Discriminator:"None",CustomValue:"#FFFFFF"}}},{SpanText:{MinNumberOfLines:1,IsLink:!1,HRef:{ConstValueExpression:{Value:""}},Text:{ConstValueExpression:{Value:"Мы рады представить вам наш новый продукт - сервис создания электронных писем. С помощью этого удобного и интуитивно понятного инструмента, вы сможете легко создавать красивые и профессиональные письма всего в несколько простых шагов."}},Style:{Discriminator:"LargeText",FontColor:{Discriminator:"StyleLinkedColor",CustomValue:"#000000"},CustomFontSettings:{FontFamily:"Arial",FontSize:16,LineHeight:20,IsBold:!1,IsItalic:!1,Decoration:"None",FontColor:{Discriminator:"NormalTextColor",CustomValue:"#000000"}}},ContentAlign:"Inline"}}],Width:{JustifyWidth:{WidthInPixels:560}}}]}}]}]},mC="#app",Qn=document.querySelector(mC),Zt={partnerId:Qn.getAttribute("data-partner-id"),wysiwygTemplateEditorBffBaseUrl:Qn.getAttribute("data-wysiwyg-template-editor-bff-base-url"),wysiwygBffProxyBaseUrl:Qn.getAttribute("data-wysiwyg-bff-proxy-base-url"),antiForgeryHeaderTokenName:Qn.getAttribute("data-anti-forgery-header-token-name"),antiForgeryHeaderTokenValue:Qn.getAttribute("data-anti-forgery-header-token-value"),antiForgeryFormTokenName:Qn.getAttribute("data-anti-forgery-form-token-name"),antiForgeryFormTokenValue:Qn.getAttribute("data-anti-forgery-form-token-value"),createEmailTemplateSubmitUrl:Qn.getAttribute("data-create-email-template-submit-url"),initialEmailTemplateJson:Qn.getAttribute("data-initial-transactional-template"),transactionalFavoritesTemplates:JSON.parse(Qn.getAttribute("data-transactional-favorites-templates")),commonFavoritesTemplates:JSON.parse(Qn.getAttribute("data-common-favorites-templates")),exitLink:Qn.getAttribute("data-exit-link")},IH=e=>vN({baseUrl:e.baseUrl,antiForgeryTokenHeaderName:Zt.antiForgeryHeaderTokenName,antiForgeryTokenValue:Zt.antiForgeryHeaderTokenValue}),RH=Gy(IH({baseUrl:Zt.wysiwygBffProxyBaseUrl})),pC=e=>{const t=new FormData;t.append(Zt.antiForgeryFormTokenName,Zt.antiForgeryFormTokenValue),t.append("template",JSON.stringify(e.template)),t.append("previewData",JSON.stringify(e.previewData));const n=EH({method:"POST",action:Zt.createEmailTemplateSubmitUrl,formData:t});document.body.appendChild(n),n.submit()},PH={},UE=e=>{const t=EN({partnerId:Zt.partnerId,getTransactionalTemplateData:()=>e.templateData,listExpressionDataSourceBffClient:RH,customerStockId:void 0}),n=AH({listExpressionDataSourceEvaluator:t}),o=HN({getTransactionalTemplateData:()=>e.templateData}),s=xH({listExpressionEvaluator:n,numberExpressionDataSourceEvaluator:o}),a=yH({listExpressionEvaluator:n,numberExpressionEvaluator:s,stringExpressionDataSourceEvaluatorFactory:()=>MN({getTransactionalTemplateData:()=>e.templateData,productImageUrlBuilderExpressionEvaluator:vH({partnerId:Zt.partnerId,numberExpressionEvaluator:s}),contactCustomData:PH})}),l=OH({listExpressionEvaluator:n,numberExpressionEvaluator:s,stringExpressionEvaluator:a,dataStructBuilderExpressionEvaluatorFactory:d=>WE({expressionEvaluator:d})}),c=WE({expressionEvaluator:l});return JW({template:e.template,emailTemplatePreviewTileDeps:_H({listExpressionEvaluator:n,numberExpressionEvaluator:s,stringExpressionEvaluator:a,dataStructExpressionEvaluator:c,expressionEvaluator:l}),onFavoriteTemplateSelected:()=>{console.log("onFavoriteTemplateSelected"),pC({template:e.template,previewData:e.templateData})}})},Fh=HO(JR,{onInitialTemplateSelected:()=>{console.log("onInitialTemplateSelected"),pC({template:Zt.initialEmailTemplateJson.length?JSON.parse(Zt.initialEmailTemplateJson):HE,previewData:{}})},exitLink:Zt.exitLink,deps:uN({partnerId:Zt.partnerId,emailTemplatePreviewComponents:[...Zt.commonFavoritesTemplates.map(e=>UE({template:JSON.parse(e.templateJson),templateData:{}})),...Zt.transactionalFavoritesTemplates.map(e=>UE({template:JSON.parse(e.templateJson),templateData:JSON.parse(e.dataJson)}))],initialEmailTemplate:Zt.initialEmailTemplateJson.length?JSON.parse(Zt.initialEmailTemplateJson):HE,exitLink:Zt.exitLink})});Fh.use(gy({components:{VSkeletonLoader:sN}}));Fh.use(Uy);Fh.mount(mC);
|
|
82
|
+
`+$t),lt&&Kl([Pe,ke,We],$r=>{$t=Js($t,$r," ")}),$&&V?$.createHTML($t):$t},t.setConfig=function(){let pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Cs(pe),h=!0},t.clearConfig=function(){Fr=null,h=!1},t.isValidAttribute=function(pe,I,te){Fr||Cs({});const he=Rt(pe),st=Rt(I);return Va(he,st,te)},t.addHook=function(pe,I){typeof I=="function"&&(de[pe]=de[pe]||[],Xs(de[pe],I))},t.removeHook=function(pe){if(de[pe])return PE(de[pe])},t.removeHooks=function(pe){de[pe]&&(de[pe]=[])},t.removeAllHooks=function(){de={}},t}var $E=nC();const kd={beforeMount(e,t){e.innerHTML=$E.sanitize(t.value)},beforeUpdate(e,t){e.innerHTML=$E.sanitize(t.value)}},k2=e=>({Match:t=>{switch(e.Discriminator){case"EmailBackgroundColor":return t.whenEmailBackgroundColor();case"BodyColor":return t.whenBodyColor();case"TitleColor":return t.whenTitleColor();case"HeadingColor":return t.whenHeadingColor();case"SubHeadingColor":return t.whenSubHeading();case"LargeTextColor":return t.whenLargeTextColor();case"NormalTextColor":return t.whenNormalTextColor();case"DescriptionTextColor":return t.whenDescriptionTextColor();case"PrimaryTextColor":return t.whenPrimaryTextColor();case"SecondaryTextColor":return t.whenSecondaryTextColor();case"ButtonTextColor":return t.whenButtonTextColor();case"LinkColor":return t.whenLinkColor();case"PrimaryColor":return t.whenPrimaryColor();case"SecondaryColor":return t.whenSecondaryColor();case"CardBackgroundColor":return t.whenCardBackgroundColor();case"Custom":return t.whenCustom(e.CustomValue)}}}),F2=e=>k2(e.fontColor).Match({whenEmailBackgroundColor:()=>e.themeColors.EmailBackgroundColor,whenBodyColor:()=>e.themeColors.BodyColor,whenTitleColor:()=>e.themeColors.TitleColor,whenHeadingColor:()=>e.themeColors.HeadingColor,whenSubHeading:()=>e.themeColors.SubHeadingColor,whenLargeTextColor:()=>e.themeColors.LargeTextColor,whenNormalTextColor:()=>e.themeColors.NormalTextColor,whenDescriptionTextColor:()=>e.themeColors.DescriptionTextColor,whenPrimaryTextColor:()=>e.themeColors.PrimaryTextColor,whenSecondaryTextColor:()=>e.themeColors.SecondaryTextColor,whenLinkColor:()=>e.themeColors.LinkColor,whenPrimaryColor:()=>e.themeColors.PrimaryColor,whenSecondaryColor:()=>e.themeColors.SecondaryColor,whenCardBackgroundColor:()=>e.themeColors.CardBackgroundColor,whenButtonTextColor:()=>e.themeColors.ButtonTextColor,whenCustom:t=>t}),$2=e=>({Match:t=>{switch(e){case"None":return t.whenNone();case"Underline":return t.whenUnderline();case"LineThrough":return t.whenLineThrough()}}}),rC=e=>$2(e.textDecoration).Match({whenNone:()=>"none",whenUnderline:()=>"underline",whenLineThrough:()=>"line-through"}),W2=e=>({fontSize:e.customFontSettings.FontSize,lineHeight:e.customFontSettings.LineHeight,fontWeight:e.customFontSettings.IsBold?"bold":"normal",fontStyle:e.customFontSettings.IsItalic?"italic":"normal",textDecoration:rC({textDecoration:e.customFontSettings.Decoration}),fontFamily:e.customFontSettings.FontFamily,color:F2({fontColor:e.customFontSettings.FontColor,themeColors:e.themeColors})}),oC=e=>({Match:t=>{switch(e.Discriminator){case"Heading":return t.whenHeading();case"Title":return t.whenTitle();case"SubHeading":return t.whenSubHeading();case"LargeText":return t.whenLargeText();case"NormalText":return t.whenNormalText();case"DescriptionText":return t.whenDescriptionText();case"Link":return t.whenLink();case"Button":return t.whenButton();case"Custom":return t.whenCustom(e.CustomFontSettings);default:return _s(e.Discriminator)}}}),H2=e=>({Match:t=>{switch(e.Discriminator){case"StyleLinkedColor":return t.whenFontStyle();case"EmailBackgroundColor":return t.whenEmailBackgroundColor();case"BodyColor":return t.whenBodyColor();case"TitleColor":return t.whenTitleColor();case"HeadingColor":return t.whenHeadingColor();case"SubHeadingColor":return t.whenSubHeading();case"LargeTextColor":return t.whenLargeTextColor();case"NormalTextColor":return t.whenNormalTextColor();case"DescriptionTextColor":return t.whenDescriptionTextColor();case"PrimaryTextColor":return t.whenPrimaryTextColor();case"SecondaryTextColor":return t.whenSecondaryTextColor();case"ButtonTextColor":return t.whenButtonTextColor();case"LinkColor":return t.whenLinkColor();case"PrimaryColor":return t.whenPrimaryColor();case"SecondaryColor":return t.whenSecondaryColor();case"CardBackgroundColor":return t.whenCardBackgroundColor();case"Custom":return t.whenCustom(e.CustomValue)}}}),U2=e=>H2(e.fontStyleColor).Match({whenFontStyle:()=>oC(e.fontStyle).Match({whenHeading:()=>e.themeColors.HeadingColor,whenTitle:()=>e.themeColors.TitleColor,whenSubHeading:()=>e.themeColors.SubHeadingColor,whenLargeText:()=>e.themeColors.LargeTextColor,whenNormalText:()=>e.themeColors.NormalTextColor,whenDescriptionText:()=>e.themeColors.DescriptionTextColor,whenButton:()=>e.themeColors.ButtonTextColor,whenLink:()=>e.themeColors.LinkColor,whenCustom:t=>ao({color:t.FontColor,themeColors:e.themeColors})}),whenEmailBackgroundColor:()=>e.themeColors.EmailBackgroundColor,whenBodyColor:()=>e.themeColors.BodyColor,whenTitleColor:()=>e.themeColors.TitleColor,whenHeadingColor:()=>e.themeColors.HeadingColor,whenSubHeading:()=>e.themeColors.SubHeadingColor,whenLargeTextColor:()=>e.themeColors.LargeTextColor,whenNormalTextColor:()=>e.themeColors.NormalTextColor,whenDescriptionTextColor:()=>e.themeColors.DescriptionTextColor,whenPrimaryTextColor:()=>e.themeColors.PrimaryTextColor,whenSecondaryTextColor:()=>e.themeColors.SecondaryTextColor,whenLinkColor:()=>e.themeColors.LinkColor,whenPrimaryColor:()=>e.themeColors.PrimaryColor,whenSecondaryColor:()=>e.themeColors.SecondaryColor,whenCardBackgroundColor:()=>e.themeColors.CardBackgroundColor,whenButtonTextColor:()=>e.themeColors.ButtonTextColor,whenCustom:t=>t}),V2={Arial:"Arial",Georgia:"Georgia",Tahoma:"Tahoma",TimesNewRoman:"Times New Roman",Verdana:"Verdana"},Bh=e=>({fontSize:e.fontSize+"px",lineHeight:e.lineHeight+"px",fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:V2[e.fontFamily],textDecoration:e.textDecoration,color:e.color}),kh=e=>{const t=n=>({fontSize:n.FontSize,lineHeight:n.LineHeight,fontWeight:n.IsBold?"bold":"normal",fontStyle:n.IsItalic?"italic":"normal",fontFamily:e.fontFamily,textDecoration:rC({textDecoration:n.Decoration}),color:U2({fontStyleColor:e.fontStyle.FontColor,fontStyle:e.fontStyle,themeColors:e.themeColors})});return oC(e.fontStyle).Match({whenHeading:()=>t(e.themeFontSettings.Heading),whenTitle:()=>t(e.themeFontSettings.Title),whenSubHeading:()=>t(e.themeFontSettings.SubHeading),whenLargeText:()=>t(e.themeFontSettings.LargeText),whenNormalText:()=>t(e.themeFontSettings.NormalText),whenDescriptionText:()=>t(e.themeFontSettings.DescriptionText),whenLink:()=>t(e.themeFontSettings.Link),whenButton:()=>t(e.themeFontSettings.Button),whenCustom:n=>W2({customFontSettings:n,themeColors:e.themeColors})})},G2=e=>({Match:t=>{switch(e.Discriminator){case"Theme":return t.whenTheme();case"Custom":return t.whenCustom(e.CustomValue);default:return _s(e.Discriminator)}}}),j2=e=>G2(e.buttonPaddings).Match({whenTheme:()=>({TopBottom:e.themeButtonPaddings.TopBottom,LeftRight:e.themeButtonPaddings.LeftRight}),whenCustom:t=>({TopBottom:t.TopBottom,LeftRight:t.LeftRight})}),Y2={style:{"border-spacing":"0","border-collapse":"collapse",width:"100%"}},K2=["align"],z2={class:"Button"},q2=["href"],X2=at({__name:"ButtonVue",props:{deps:{},theme:{},element:{},context:{type:[String,Number,Boolean,Array,Object]}},setup(e){const t=e,n=Re(()=>Bh(kh({fontFamily:t.theme.FontFamily,fontStyle:t.element.TextStyle,themeFontSettings:t.theme.FontSettingsPresets,themeColors:t.theme.Colors}))),o=Re(()=>ou({borderColor:t.element.Border.Left.Color,themeColors:t.theme.Colors})),s=Re(()=>j2({buttonPaddings:t.element.Paddings,themeButtonPaddings:t.theme.ButtonPaddings})),a=Re(()=>ao({color:t.element.BackgroundColor,themeColors:t.theme.Colors})),l=Re(()=>{switch(t.element.ContentAlign){case"Center":return"center";case"Left":return"left";case"Right":return"right";default:return"center"}}),c=dn({href:"",text:"",isLoading:!0}),d=t.deps.stringExpressionEvaluator,m=()=>{Promise.all([d({stringExpression:t.element.HRef,context:t.context}),d({stringExpression:t.element.Text,context:t.context})]).then(([p,E])=>{c.href=p,c.text=E,c.isLoading=!1})};return m(),nn(()=>[t.element.HRef,t.element.Text,t.context],()=>m()),(p,E)=>(ie(),Ce("table",Y2,[Z("tbody",null,[Z("tr",null,[Z("td",{align:l.value},[Z("div",z2,[Z("a",{style:Se([{display:"block","text-decoration":"none"},[n.value]]),href:c.href,onClick:E[0]||(E[0]=fs(()=>{},["prevent"]))},[Z("table",{align:"center",style:Se([{"text-align":"center","border-spacing":"0","border-collapse":"separate"},[{backgroundColor:a.value},oe(No)({borderRadius:t.element.BorderRadius,borderRadiusCard:t.theme.BorderRadiusCard,bodyBorderRadius:t.theme.BorderRadius,borderButtonRadius:t.theme.BorderRadiusButton,borderBannerRadius:t.theme.BorderRadiusBanner}),{width:t.element.FullWidth?"100%":"auto"},oe(mi)({border:t.element.Border,themeColors:p.theme.Colors}),{borderColor:o.value}]])},[Z("tbody",null,[Z("tr",null,[Z("td",{align:"center",style:Se([{"line-height":"normal"},[{paddingTop:s.value.TopBottom+"px",paddingBottom:s.value.TopBottom+"px",paddingLeft:s.value.LeftRight+"px",paddingRight:s.value.LeftRight+"px"}]])},[oo(Z("p",{class:"user-select-none",style:Se([n.value])},null,4),[[oe(kd),c.text]])],4)])])],4)],12,q2)])],8,K2)])])]))}}),J2=["href"],Z2=at({__name:"SpanText",props:{deps:{},theme:{},element:{},context:{type:[String,Number,Boolean,Array,Object]}},setup(e){const t=e,n=t.deps.stringExpressionEvaluator,o=Re(()=>{const l=kh({fontFamily:t.theme.FontFamily,fontStyle:t.element.Style,themeFontSettings:t.theme.FontSettingsPresets,themeColors:t.theme.Colors});return{...Bh(l),minHeight:t.element.MinNumberOfLines*l.lineHeight+"px"}}),s=dn({href:"",text:"",isLoading:!0}),a=()=>{Promise.all([n({stringExpression:t.element.HRef,context:t.context}),n({stringExpression:t.element.Text,context:t.context})]).then(([l,c])=>{s.href=l,s.text=c,s.isLoading=!1})};return a(),nn(()=>[t.context,t.element.HRef,t.element.Text],()=>a()),(l,c)=>t.element.IsLink?oo((ie(),Ce("a",{key:0,href:s.href,class:"SpanText cursor-pointer user-select-none",style:Se([{margin:"0"},[o.value,oe(Ta)({contentAlign:t.element.ContentAlign})]]),onClick:c[0]||(c[0]=fs(()=>{},["prevent"]))},null,12,J2)),[[oe(kd),s.text]]):oo((ie(),Ce("span",{key:1,class:"SpanText cursor-pointer user-select-none",style:Se([{margin:"0"},[o.value,oe(Ta)({contentAlign:t.element.ContentAlign})]])},null,4)),[[oe(kd),s.text]])}});const Q2=Gn(Z2,[["__scopeId","data-v-24009fb3"]]),eW=at({__name:"UnsubscribeLink",props:{theme:{},element:{}},setup(e){const t=e,n=Re(()=>{const o=kh({fontFamily:t.theme.FontFamily,fontStyle:t.element.Style,themeFontSettings:t.theme.FontSettingsPresets,themeColors:t.theme.Colors});return{...Bh(o)}});return(o,s)=>(ie(),Ce("a",{href:"#",class:"cursor-pointer user-select-none",style:Se([{margin:"0"},[n.value,oe(Ta)({contentAlign:t.element.ContentAlign})]]),onClick:s[0]||(s[0]=fs(()=>{},["prevent"]))},Ud(t.element.Text),5))}});const tW=Gn(eW,[["__scopeId","data-v-5cffc6e3"]]),Na=at({__name:"Elements",props:{deps:{},theme:{},element:{},path:{},context:{type:[String,Number,Boolean,Array,Object]},selectedElementPath:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted"],setup(e,{emit:t}){const n=e,o=t,s=(a,l)=>{o("onElementClicked",{element:a,path:[...n.path,l]})};return(a,l)=>(ie(),Ce("span",{onClick:l[16]||(l[16]=fs(()=>{},["stop"]))},[oe(wo).button(n.element.Button)?(ie(),mt(X2,{key:0,deps:n.deps,theme:n.theme,element:n.element.Button,context:n.context,class:gr({"element-selected":oe(qs.isEqual)(n.selectedElementPath,[...n.path,"Button"])}),onClick:l[0]||(l[0]=c=>s(n.element,"Button"))},null,8,["deps","theme","element","context","class"])):vn("",!0),oe(wo).heightContainer(n.element.HeightContainer)?(ie(),mt(t2,{key:1,deps:n.deps,theme:n.theme,element:n.element.HeightContainer,path:[...n.path,"HeightContainer"],selectedElementPath:n.selectedElementPath,context:n.context,onOnImageOriginalSizeAdjusted:l[1]||(l[1]=c=>o("onImageOriginalSizeAdjusted",c)),onOnImageSizeAdjusted:l[2]||(l[2]=c=>o("onImageSizeAdjusted",c)),onOnElementClicked:l[3]||(l[3]=c=>o("onElementClicked",c))},null,8,["deps","theme","element","path","selectedElementPath","context"])):vn("",!0),oe(wo).image(n.element.Image)?(ie(),mt(u2,{key:2,deps:n.deps,theme:n.theme,element:n.element.Image,context:n.context,path:[...n.path,"Image"],class:gr({"element-selected":oe(qs.isEqual)(n.selectedElementPath,[...n.path,"Image"])}),onOnImageOriginalSizeAdjusted:l[4]||(l[4]=c=>o("onImageOriginalSizeAdjusted",c)),onOnImageSizeAdjusted:l[5]||(l[5]=c=>o("onImageSizeAdjusted",c)),onClick:l[6]||(l[6]=c=>s(n.element,"Image"))},null,8,["deps","theme","element","context","path","class"])):vn("",!0),oe(wo).spacer(n.element.Spacer)?(ie(),mt(_2,{key:3,element:n.element.Spacer,theme:n.theme,class:gr({"element-selected":oe(qs.isEqual)(n.selectedElementPath,[...n.path,"Spacer"])}),onClick:l[7]||(l[7]=c=>s(n.element,"Spacer"))},null,8,["element","theme","class"])):vn("",!0),oe(wo).spanText(n.element.SpanText)?(ie(),mt(Q2,{key:4,deps:n.deps,theme:n.theme,element:n.element.SpanText,context:n.context,class:gr({"element-selected":oe(qs.isEqual)(n.selectedElementPath,[...n.path,"SpanText"])}),onClick:l[8]||(l[8]=c=>s(n.element,"SpanText"))},null,8,["deps","theme","element","context","class"])):vn("",!0),oe(wo).oneLineLink(n.element.OneLineList)?(ie(),mt(m2,{key:5,deps:n.deps,theme:n.theme,element:n.element.OneLineList,path:[...n.path,"OneLineList"],selectedElementPath:n.selectedElementPath,context:n.context,onOnImageOriginalSizeAdjusted:l[9]||(l[9]=c=>o("onImageOriginalSizeAdjusted",c)),onOnImageSizeAdjusted:l[10]||(l[10]=c=>o("onImageSizeAdjusted",c)),onOnElementClicked:l[11]||(l[11]=c=>o("onElementClicked",c))},null,8,["deps","theme","element","path","selectedElementPath","context"])):vn("",!0),oe(wo).if(n.element.If)?(ie(),mt(J$,{key:6,deps:n.deps,theme:n.theme,element:n.element.If,context:n.context,path:[...n.path,"If"],selectedElementPath:n.selectedElementPath,onOnImageOriginalSizeAdjusted:l[12]||(l[12]=c=>o("onImageOriginalSizeAdjusted",c)),onOnImageSizeAdjusted:l[13]||(l[13]=c=>o("onImageSizeAdjusted",c)),onOnElementClicked:l[14]||(l[14]=c=>o("onElementClicked",c))},null,8,["deps","theme","element","context","path","selectedElementPath"])):vn("",!0),oe(wo).unsubscribeLink(n.element.UnsubscribeLink)?(ie(),mt(tW,{key:7,theme:n.theme,element:n.element.UnsubscribeLink,class:gr({"element-selected":oe(qs.isEqual)(n.selectedElementPath,[...n.path,"UnsubscribeLink"])}),onClick:l[15]||(l[15]=c=>s(n.element,"UnsubscribeLink"))},null,8,["theme","element","class"])):vn("",!0)]))}}),nW=at({__name:"IteratedColumn",props:{deps:{},theme:{},iteratedColumn:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]},containerWidth:{}},emits:["onImageSizeAdjusted","onImageOriginalSizeAdjusted","onElementClicked"],setup(e,{emit:t}){ku(a=>({"6300cb1b":s.value}));const n=e,o=t,s=Re(()=>n.iteratedColumn.WidthInPercents*n.containerWidth+"px");return(a,l)=>(ie(),Ce("div",{class:"iterated-column",style:Se({display:"inline-block",verticalAlign:n.iteratedColumn.VerticalAlign})},[Z("table",{style:Se([[oe(zb)({borderCollapse:n.iteratedColumn.BorderCollapse})],{width:"100%","border-spacing":"0"}]),width:"100%"},[Z("tbody",null,[Z("tr",null,[Z("td",{style:Se([{"line-height":"normal"},[oe(Xb)({containerAlign:n.iteratedColumn.ContainerAlign}),oe(bs)({paddings:n.iteratedColumn.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),oe(mi)({border:n.iteratedColumn.Border,themeColors:n.theme.Colors}),{backgroundColor:oe(ao)({color:n.iteratedColumn.BgColor,themeColors:n.theme.Colors})},oe(No)({borderRadius:n.iteratedColumn.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadiusBanner})]])},[(ie(!0),Ce(ot,null,$n(n.iteratedColumn.Elements,(c,d)=>(ie(),mt(Na,{key:d,deps:n.deps.elementsDeps,theme:n.theme,element:c,context:n.context,path:[...n.path,"Elements",d],selectedElementPath:n.selectedElementPath,onOnElementClicked:l[0]||(l[0]=m=>o("onElementClicked",m)),onOnImageSizeAdjusted:l[1]||(l[1]=m=>o("onImageSizeAdjusted",m)),onOnImageOriginalSizeAdjusted:l[2]||(l[2]=m=>o("onImageOriginalSizeAdjusted",m))},null,8,["deps","theme","element","context","path","selectedElementPath"]))),128))],4)])])],4)],4))}});const rW=Gn(nW,[["__scopeId","data-v-284c0a90"]]),oW={class:"iterated-column-container",style:{"border-spacing":"0","border-collapse":"collapse",width:"100%",margin:"0 auto"},width:"100%"},iW={align:"center",style:{"font-size":"0"}},sW=at({__name:"IteratedColumnBodyRow",props:{deps:{},theme:{},iteratedColumnBodyRow:{},path:{},selectedElementPath:{},context:{},rowWidth:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted"],setup(e,{emit:t}){ku(c=>({"22b1b0df":a.value}));const n=e,o=dn({dataList:[],isLoaded:!1}),s=()=>n.deps.listExpressionEvaluator({listExpression:n.iteratedColumnBodyRow.DataSource,context:n.context}).then(c=>{o.dataList=c,o.isLoaded=!0});s(),nn(()=>n.context,()=>s());const a=Re(()=>tn({paddingExpression:n.iteratedColumnBodyRow.ColumnSpacerSize,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})+"px"),l=t;return(c,d)=>(ie(),Ce("table",oW,[Z("tbody",null,[Z("tr",null,[Z("td",iW,[(ie(!0),Ce(ot,null,$n(o.dataList,(m,p)=>(ie(),Ce("span",{key:p},[Ke(rW,{class:gr(["iterated-column-bottom-spacer",{"iterated-column__tablet-padding-right":(p+1)%2===1,"iterated-column__tablet-padding-left":(p+1)%2===0,"is-last-desktop-line":p>=o.dataList.length-n.iteratedColumnBodyRow.NumberColumnsInLine,"is-last-tablet-line":p>=o.dataList.length-2,"is-last-mobile-line":p==o.dataList.length-1}]),deps:n.deps.iteratedColumnDeps,theme:n.theme,style:Se(oe(Kb)({numberColumnsInLine:n.iteratedColumnBodyRow.NumberColumnsInLine,index:p,paddingSize:oe(tn)({paddingExpression:n.iteratedColumnBodyRow.ColumnSpacerSize,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),directionRtl:!1})),iteratedColumn:n.iteratedColumnBodyRow.IteratedColumn,path:[...n.path,"IteratedColumn"],selectedElementPath:n.selectedElementPath,context:{...n.context,[n.iteratedColumnBodyRow.IndexName]:m},containerWidth:n.rowWidth,onOnElementClicked:d[0]||(d[0]=E=>l("onElementClicked",E)),onOnImageOriginalSizeAdjusted:d[1]||(d[1]=E=>l("onImageOriginalSizeAdjusted",E)),onOnImageSizeAdjusted:d[2]||(d[2]=E=>l("onImageSizeAdjusted",E))},null,8,["deps","theme","class","style","iteratedColumn","path","selectedElementPath","context","containerWidth"])]))),128))])])])]))}});const aW=Gn(sW,[["__scopeId","data-v-7d644c9d"]]),lW={style:{"border-spacing":"0","border-collapse":"collapse",width:"100%",margin:"0 auto"}},uW=at({__name:"IteratedBodyRow",props:{theme:{},deps:{},iteratedBodyRow:{},path:{},selectedElementPath:{},context:{},containerWidth:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted","onColumnWidthAdjusted"],setup(e,{emit:t}){const n=e,o=dn({dataList:[]});n.deps.listExpressionEvaluator({listExpression:n.iteratedBodyRow.DataSource,context:n.context}).then(a=>o.dataList=a);const s=t;return(a,l)=>(ie(),Ce("table",lW,[(ie(!0),Ce(ot,null,$n(o.dataList,(c,d)=>(ie(),Ce("tr",{key:d},[Z("td",{style:Se([oe(bs)({paddings:n.iteratedBodyRow.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})])},[Ke(lC,{emailComponentBodyRow:n.iteratedBodyRow.BodyRow,deps:{iteratedColumnBodyRowDeps:n.deps.iteratedColumnBodyRowDeps,multipleColumnBodyRowDeps:n.deps.multipleColumnBodyRowDeps,listExpressionEvaluator:n.deps.listExpressionEvaluator},theme:n.theme,context:{...n.context,[n.iteratedBodyRow.IndexName]:c},rowWidth:n.containerWidth,path:[...n.path,"BodyRow"],selectedElementPath:n.selectedElementPath,onOnElementClicked:l[0]||(l[0]=m=>s("onElementClicked",m)),onOnImageOriginalSizeAdjusted:l[1]||(l[1]=m=>s("onImageOriginalSizeAdjusted",m)),onOnImageSizeAdjusted:l[2]||(l[2]=m=>s("onImageSizeAdjusted",m)),onOnColumnWidthAdjusted:l[3]||(l[3]=m=>s("onColumnWidthAdjusted",m))},null,8,["emailComponentBodyRow","deps","theme","context","rowWidth","path","selectedElementPath"])],4)]))),128))]))}});var su={},iC={},Qu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isNone=e.isSome=e.None=e.Some=e.OptionType=void 0,e.OptionType={Some:Symbol(":some"),None:Symbol(":none")};function t(l){return typeof l>"u"?o():n(l)}e.Some=t,e.None=o();function n(l){return{type:e.OptionType.Some,isSome(){return!0},isNone(){return!1},match(c){return c.some(l)},map(c){return n(c(l))},andThen(c){return c(l)},or(c){return this},and(c){return c},unwrapOr(c){return l},unwrap(){return l}}}function o(){return{type:e.OptionType.None,isSome(){return!1},isNone(){return!0},match(l){const{none:c}=l;return typeof c=="function"?c():c},map(l){return o()},andThen(l){return o()},or(l){return l},and(l){return o()},unwrapOr(l){if(l==null)throw new Error("Cannot call unwrapOr with a missing value.");return l},unwrap(){throw new ReferenceError("Trying to unwrap None.")}}}function s(l){return l.isSome()}e.isSome=s;function a(l){return l.isNone()}e.isNone=a})(Qu);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isRight=e.isLeft=e.Right=e.Left=e.EitherType=void 0;const t=Qu;e.EitherType={Left:Symbol(":left"),Right:Symbol(":right")};function n(l){return{type:e.EitherType.Left,isLeft(){return!0},isRight(){return!1},left(){return(0,t.Some)(l)},leftAndThen(c){return c(l)},right(){return t.None},rightAndThen(c){return n(l)},unwrap(){return l},unwrapLeft(){return l},unwrapLeftOr(c){return l},unwrapLeftOrElse(c){return l},unwrapRight(){throw new ReferenceError("Cannot unwrap Right value of Either.Left")},unwrapRightOr(c){return c},unwrapRightOrElse(c){return c(l)},match(c){return c.left(l)},map(c){return n(c(l))},mapLeft(c){return n(c(l))},mapRight(c){return n(l)}}}e.Left=n;function o(l){return{type:e.EitherType.Right,isLeft(){return!1},isRight(){return!0},left(){return t.None},leftAndThen(c){return o(l)},right(){return(0,t.Some)(l)},rightAndThen(c){return c(l)},unwrap(){return l},unwrapLeft(){throw new ReferenceError("Cannot unwrap Left value of Either.Right")},unwrapLeftOr(c){return c},unwrapLeftOrElse(c){return c(l)},unwrapRight(){return l},unwrapRightOr(c){return l},unwrapRightOrElse(c){return l},match(c){return c.right(l)},map(c){return o(c(l))},mapLeft(c){return o(l)},mapRight(c){return o(c(l))}}}e.Right=o;function s(l){return l.isLeft()}e.isLeft=s;function a(l){return l.isRight()}e.isRight=a})(iC);var sC={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isErr=e.isOk=e.Err=e.Ok=e.ResultType=void 0;const t=Qu;e.ResultType={Ok:Symbol(":ok"),Err:Symbol(":err")};function n(l){return{type:e.ResultType.Ok,isOk(){return!0},isErr(){return!1},ok(){return(0,t.Some)(l)},err(){return t.None},unwrap(){return l},unwrapOr(c){return l},unwrapOrElse(c){return l},unwrapErr(){throw new ReferenceError("Cannot unwrap Err value of Result.Ok")},match(c){return c.ok(l)},map(c){return n(c(l))},mapErr(c){return n(l)},andThen(c){return c(l)},orElse(c){return n(l)}}}e.Ok=n;function o(l){return{type:e.ResultType.Err,isOk(){return!1},isErr(){return!0},ok(){return t.None},err(){return(0,t.Some)(l)},unwrap(){throw new ReferenceError("Cannot unwrap Ok value of Result.Err")},unwrapOr(c){return c},unwrapOrElse(c){return c(l)},unwrapErr(){return l},match(c){return c.err(l)},map(c){return o(l)},mapErr(c){return o(c(l))},andThen(c){return o(l)},orElse(c){return c(l)}}}e.Err=o;function s(l){return l.isOk()}e.isOk=s;function a(l){return l.isErr()}e.isErr=a})(sC);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Ok=e.isOk=e.isErr=e.Err=e.Some=e.None=e.isSome=e.isNone=e.Right=e.Left=e.isRight=e.isLeft=void 0;var t=iC;Object.defineProperty(e,"isLeft",{enumerable:!0,get:function(){return t.isLeft}}),Object.defineProperty(e,"isRight",{enumerable:!0,get:function(){return t.isRight}}),Object.defineProperty(e,"Left",{enumerable:!0,get:function(){return t.Left}}),Object.defineProperty(e,"Right",{enumerable:!0,get:function(){return t.Right}});var n=Qu;Object.defineProperty(e,"isNone",{enumerable:!0,get:function(){return n.isNone}}),Object.defineProperty(e,"isSome",{enumerable:!0,get:function(){return n.isSome}}),Object.defineProperty(e,"None",{enumerable:!0,get:function(){return n.None}}),Object.defineProperty(e,"Some",{enumerable:!0,get:function(){return n.Some}});var o=sC;Object.defineProperty(e,"Err",{enumerable:!0,get:function(){return o.Err}}),Object.defineProperty(e,"isErr",{enumerable:!0,get:function(){return o.isErr}}),Object.defineProperty(e,"isOk",{enumerable:!0,get:function(){return o.isOk}}),Object.defineProperty(e,"Ok",{enumerable:!0,get:function(){return o.Ok}})})(su);const cW=e=>({Match:t=>{switch(e){case"Top":return t.whenTop();case"Middle":return t.whenMiddle();case"Bottom":return t.whenBottom();case"Baseline":return t.whenBaseline()}}}),fW=e=>cW(e).Match({whenTop:()=>"start",whenMiddle:()=>"center",whenBottom:()=>"end",whenBaseline:()=>"baseline"}),Qf={justifyWidth:e=>(e==null?void 0:e.WidthInPixels)!==void 0,shrinkToContentWidth:e=>(e==null?void 0:e.WidthInPixels)!==void 0,widthInPercents:e=>e!==void 0},aC=e=>({Match:t=>{if(e.JustifyWidth!==void 0)return t.whenJustifyWidth(e.JustifyWidth.WidthInPixels);if(e.ShrinkToContentWidth!==void 0)return t.whenShrinkToContentWidth(e.ShrinkToContentWidth.WidthInPixels);if(e.WidthInPercents!==void 0)return t.whenWidthInPercents(e.WidthInPercents.Value);throw Error("")}}),dW=e=>({Match:t=>aC(e).Match({whenJustifyWidth:n=>t.whenJustifyWidth?t.whenJustifyWidth(n):t.default(),whenWidthInPercents:n=>t.whenWidthInPercents?t.whenWidthInPercents(n):t.default(),whenShrinkToContentWidth:n=>t.whenShrinkToContentWidth?t.whenShrinkToContentWidth(n):t.default()})}),hW=e=>({JustifyWidth:{WidthInPixels:e}}),mW=e=>({ShrinkToContentWidth:{WidthInPixels:e}}),pW=["align"],gW=at({__name:"MultipleColumn",props:{deps:{},theme:{},multipleColumn:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]},containerWidth:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted","onColumnWidthAdjusted"],setup(e,{emit:t}){ku(d=>({"505fd5fb":c.value,"89e91a86":l.value,"6083c43a":a.value}));const n=e,o=t,s=d=>{aC(n.multipleColumn.Width).Match({whenJustifyWidth:()=>su.Some(hW(d)),whenShrinkToContentWidth:()=>su.Some(mW(d)),whenWidthInPercents:()=>su.None}).map(m=>o("onColumnWidthAdjusted",{Path:n.path,Width:m}))},a=Re(()=>dW(n.multipleColumn.Width).Match({default:()=>"",whenWidthInPercents:d=>d*n.containerWidth+"px"})),l=Re(()=>fW(n.multipleColumn.VerticalAlign)),c=Re(()=>n.multipleColumn.VerticalAlign);return(d,m)=>oo((ie(),Ce("div",{class:gr(["multiple-column",{"multiple-column--justifyWidth":oe(Qf).justifyWidth(n.multipleColumn.Width.JustifyWidth),"multiple-column--shrinkToContentWidth":oe(Qf).shrinkToContentWidth(n.multipleColumn.Width.ShrinkToContentWidth),"multiple-column--widthInPercents":oe(Qf).widthInPercents(n.multipleColumn.Width.WidthInPercents)}]),style:{direction:"ltr"}},[Z("table",{style:Se([{width:"100%","border-spacing":"0"},[oe(zb)({borderCollapse:n.multipleColumn.BorderCollapse})]]),width:"100%"},[Z("tbody",null,[Z("tr",null,[Z("td",{align:oe(Jb)({containerAlign:n.multipleColumn.ContainerAlign}),style:Se([{"line-height":"normal"},[oe(mi)({border:n.multipleColumn.Border,themeColors:n.theme.Colors}),oe(No)({borderRadius:n.multipleColumn.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadiusBanner}),{backgroundColor:oe(ao)({color:n.multipleColumn.BgColor,themeColors:n.theme.Colors})},oe(bs)({paddings:n.multipleColumn.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})]])},[(ie(!0),Ce(ot,null,$n(n.multipleColumn.Elements,(p,E)=>(ie(),mt(Na,{key:E,deps:n.deps.elementsDeps,theme:n.theme,element:p,context:n.context,path:[...n.path,"Elements",E],selectedElementPath:n.selectedElementPath,onOnElementClicked:m[0]||(m[0]=C=>o("onElementClicked",C)),onOnImageSizeAdjusted:m[1]||(m[1]=C=>o("onImageSizeAdjusted",C)),onOnImageOriginalSizeAdjusted:m[2]||(m[2]=C=>o("onImageOriginalSizeAdjusted",C))},null,8,["deps","theme","element","context","path","selectedElementPath"]))),128))],12,pW)])])],4)],2)),[[oe(Cu),p=>s(p.width)]])}});const _W=Gn(gW,[["__scopeId","data-v-9630cdcf"]]),EW=at({__name:"MultipleColumnBodyRow",props:{deps:{},theme:{},multipleColumnBodyRow:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]},rowWidth:{}},emits:["onElementClicked","onImageSizeAdjusted","onImageOriginalSizeAdjusted","onColumnWidthAdjusted"],setup(e,{emit:t}){ku(a=>({"308ed3d8":s.value}));const n=e,o=t,s=Re(()=>tn({paddingExpression:n.multipleColumnBodyRow.ColumnSpacerSize,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})+"px");return(a,l)=>(ie(),Ce("table",{class:"multiple-column-container",style:Se([{"border-spacing":"0","border-collapse":"collapse",width:"100%",margin:"0 auto"},[oe(mi)({border:n.multipleColumnBodyRow.Border,themeColors:n.theme.Colors}),oe(No)({borderRadius:n.multipleColumnBodyRow.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadius}),{backgroundColor:oe(ao)({color:n.multipleColumnBodyRow.BgColor,themeColors:n.theme.Colors})}]]),width:"100%"},[Z("tbody",null,[Z("tr",null,[Z("td",{class:"multiple-column-container__inner",style:Se([{"font-size":"0"},[oe(Xb)({containerAlign:n.multipleColumnBodyRow.ContainerAlign}),oe(bs)({paddings:n.multipleColumnBodyRow.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),n.multipleColumnBodyRow.DirectionRtl?{direction:"rtl"}:{direction:"ltr"}]])},[(ie(!0),Ce(ot,null,$n(n.multipleColumnBodyRow.Columns,(c,d)=>(ie(),mt(_W,{key:d,deps:n.deps.multipleColumnDeps,theme:n.theme,multipleColumn:c,path:[...n.path,"Columns",d],selectedElementPath:n.selectedElementPath,context:n.context,containerWidth:n.rowWidth-oe(tn)({paddingExpression:n.multipleColumnBodyRow.Paddings.Left,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})-oe(tn)({paddingExpression:n.multipleColumnBodyRow.Paddings.Right,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})-n.multipleColumnBodyRow.Border.Left.Width-n.multipleColumnBodyRow.Border.Right.Width,style:Se(oe(Kb)({numberColumnsInLine:n.multipleColumnBodyRow.Columns.length,index:d,paddingSize:oe(tn)({paddingExpression:n.multipleColumnBodyRow.ColumnSpacerSize,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),directionRtl:n.multipleColumnBodyRow.DirectionRtl})),class:gr({"is-last-tablet-line":d==n.multipleColumnBodyRow.Columns.length-1,"is-last-mobile-line":d==n.multipleColumnBodyRow.Columns.length-1}),onOnElementClicked:l[0]||(l[0]=m=>o("onElementClicked",m)),onOnColumnWidthAdjusted:l[1]||(l[1]=m=>o("onColumnWidthAdjusted",m)),onOnImageSizeAdjusted:l[2]||(l[2]=m=>o("onImageSizeAdjusted",m)),onOnImageOriginalSizeAdjusted:l[3]||(l[3]=m=>o("onImageOriginalSizeAdjusted",m))},null,8,["deps","theme","multipleColumn","path","selectedElementPath","context","containerWidth","style","class"]))),128))],4)])])],4))}});const vW=Gn(EW,[["__scopeId","data-v-c2d3f20e"]]),lC=at({__name:"EmailComponentBodyRow",props:{deps:{},theme:{},emailComponentBodyRow:{},path:{},selectedElementPath:{},context:{},rowWidth:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted","onColumnWidthAdjusted"],setup(e,{emit:t}){const n=e,o={multipleColumns:a=>a!==void 0,iteratedColumns:a=>a!==void 0,iteratedBodyRow:a=>a!==void 0},s=t;return(a,l)=>(ie(),Ce("div",null,[o.multipleColumns(n.emailComponentBodyRow.MultipleColumnBodyRow)?(ie(),mt(vW,{key:0,deps:n.deps.multipleColumnBodyRowDeps,theme:n.theme,multipleColumnBodyRow:n.emailComponentBodyRow.MultipleColumnBodyRow,path:[...n.path,"MultipleColumnBodyRow"],selectedElementPath:n.selectedElementPath,context:a.context,rowWidth:n.rowWidth,onOnColumnWidthAdjusted:l[0]||(l[0]=c=>s("onColumnWidthAdjusted",c)),onOnImageOriginalSizeAdjusted:l[1]||(l[1]=c=>s("onImageOriginalSizeAdjusted",c)),onOnImageSizeAdjusted:l[2]||(l[2]=c=>s("onImageSizeAdjusted",c)),onOnElementClicked:l[3]||(l[3]=c=>s("onElementClicked",c))},null,8,["deps","theme","multipleColumnBodyRow","path","selectedElementPath","context","rowWidth"])):vn("",!0),o.iteratedColumns(n.emailComponentBodyRow.IteratedColumnBodyRow)?(ie(),mt(aW,{key:1,deps:n.deps.iteratedColumnBodyRowDeps,theme:n.theme,iteratedColumnBodyRow:n.emailComponentBodyRow.IteratedColumnBodyRow,path:[...n.path,"IteratedColumnBodyRow"],selectedElementPath:n.selectedElementPath,context:a.context,rowWidth:n.rowWidth,onOnElementClicked:l[4]||(l[4]=c=>s("onElementClicked",c)),onOnImageOriginalSizeAdjusted:l[5]||(l[5]=c=>s("onImageOriginalSizeAdjusted",c)),onOnImageSizeAdjusted:l[6]||(l[6]=c=>s("onImageSizeAdjusted",c))},null,8,["deps","theme","iteratedColumnBodyRow","path","selectedElementPath","context","rowWidth"])):vn("",!0),o.iteratedBodyRow(n.emailComponentBodyRow.IteratedBodyRow)?(ie(),mt(uW,{key:2,deps:{iteratedColumnBodyRowDeps:n.deps.iteratedColumnBodyRowDeps,multipleColumnBodyRowDeps:n.deps.multipleColumnBodyRowDeps,listExpressionEvaluator:n.deps.listExpressionEvaluator},theme:n.theme,iteratedBodyRow:n.emailComponentBodyRow.IteratedBodyRow,path:[...n.path,"IteratedBodyRow"],selectedElementPath:n.selectedElementPath,context:a.context,containerWidth:n.rowWidth,onOnElementClicked:l[7]||(l[7]=c=>s("onElementClicked",c)),onOnImageOriginalSizeAdjusted:l[8]||(l[8]=c=>s("onImageOriginalSizeAdjusted",c)),onOnImageSizeAdjusted:l[9]||(l[9]=c=>s("onImageSizeAdjusted",c))},null,8,["deps","theme","iteratedBodyRow","path","selectedElementPath","context","containerWidth"])):vn("",!0)]))}}),yW={key:0},bW={key:1,class:"empty-email-component"},CW={class:"bootstrap-styles w-100 d-flex justify-content-center gap-5"},TW=at({__name:"EmailComponent",props:{deps:{},theme:{},emailComponent:{},path:{},selectedElementPath:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted","onColumnWidthAdjusted"],setup(e,{emit:t}){const n=e,o=dn({context:{},ifResult:!n.emailComponent.ContextBuilderExpression,isLoaded:!1}),s=l=>{o.isLoaded=!1,n.deps.dataStructExpressionEvaluator({dataStructBuilderExpression:l,context:{}}).then(c=>{(n.emailComponent.IfExpression?n.deps.boolExpressionEvaluatorDelegate({boolExpression:n.emailComponent.IfExpression,context:c}):Promise.resolve(!0)).then(d=>{o.context=c,o.ifResult=d,o.isLoaded=!0})})};nn(()=>n.emailComponent.ContextBuilderExpression,l=>{l&&s(l)});const a=t;return n.emailComponent.ContextBuilderExpression?s(n.emailComponent.ContextBuilderExpression):o.isLoaded=!0,(l,c)=>{const d=LL("VSkeletonLoader");return o.isLoaded?(ie(),Ce("div",yW,[o.ifResult?(ie(),Ce("table",{key:0,style:Se([{"border-spacing":"0","border-collapse":"collapse",width:"100%",margin:"0 auto"},[{backgroundColor:oe(ao)({color:n.emailComponent.InnerBgColor,themeColors:n.theme.Colors})},oe(No)({borderRadius:n.emailComponent.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadiusBanner}),{maxWidth:n.theme.BodyWidth+"px"}]])},[Z("tbody",null,[Z("tr",null,[Z("td",{class:"row__inner",style:Se([oe(IE)({paddings:n.emailComponent.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings,fullWidth:n.emailComponent.FullWidth})])},[(ie(!0),Ce(ot,null,$n(n.emailComponent.BodyRowList,(m,p)=>(ie(),mt(lC,{key:p,deps:n.deps.emailComponentBodyRowDeps,theme:n.theme,emailComponentBodyRow:m,context:o.context,rowWidth:n.emailComponent.FullWidth?n.theme.BodyWidth:n.theme.BodyWidth-n.theme.BodyPaddings.Left-n.theme.BodyPaddings.Right,path:[...n.path,"BodyRowList",p],selectedElementPath:n.selectedElementPath,onOnElementClicked:c[0]||(c[0]=E=>a("onElementClicked",E)),onOnImageSizeAdjusted:c[1]||(c[1]=E=>a("onImageSizeAdjusted",E)),onOnImageOriginalSizeAdjusted:c[2]||(c[2]=E=>a("onImageOriginalSizeAdjusted",E)),onOnColumnWidthAdjusted:c[3]||(c[3]=E=>a("onColumnWidthAdjusted",E))},null,8,["deps","theme","emailComponentBodyRow","context","rowWidth","path","selectedElementPath"]))),128))],4)])])],4)):(ie(),Ce("div",bW,[c[5]||(c[5]=ih(" Товарная полка скрыта из-за недостатка товаров ")),oo((ie(),Ce("i",null,c[4]||(c[4]=[Z("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Z("path",{d:"M6.99967 13.6663C3.31777 13.6663 0.333008 10.6815 0.333008 6.99967C0.333008 3.31777 3.31777 0.333008 6.99967 0.333008C10.6815 0.333008 13.6663 3.31777 13.6663 6.99967C13.6663 10.6815 10.6815 13.6663 6.99967 13.6663ZM6.99967 12.333C9.94521 12.333 12.333 9.94521 12.333 6.99967C12.333 4.05415 9.94521 1.66634 6.99967 1.66634C4.05415 1.66634 1.66634 4.05415 1.66634 6.99967C1.66634 9.94521 4.05415 12.333 6.99967 12.333ZM6.33301 3.66634H7.66634V4.99967H6.33301V3.66634ZM6.33301 6.33301H7.66634V10.333H6.33301V6.33301Z",fill:"var(--gray-500)"})],-1)]))),[[oe(Yb),{placement:"top",title:"Товарная полка не будет отображаться у получателей письма пока в ней недостаточно товаров"}]])]))])):(ie(),Ce("div",{key:1,class:"bootstrap-styles w-100",style:Se([oe(IE)({paddings:n.emailComponent.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings,fullWidth:n.emailComponent.FullWidth}),{backgroundColor:oe(ao)({color:n.emailComponent.InnerBgColor,themeColors:n.theme.Colors})||"transparent"}])},[Ke(d,{type:"text"}),Z("div",CW,[(ie(),Ce(ot,null,$n(3,m=>Ke(d,{key:m,type:"image, text, text, text, button",style:{width:"100%"}})),64))])],4))}}});const uC=Gn(TW,[["__scopeId","data-v-a8102873"]]),wW={class:"scale-to-width-fit-component",style:{display:"inline-block","transform-origin":"left top"}},cC=at({__name:"ScaleToWidthFit",emits:["scaledElement"],setup(e,{emit:t}){const n=t;return(o,s)=>oo((ie(),Ce("div",wW,[sd(o.$slots,"default")])),[[oe(Cu),({width:a})=>{o.$el.style.transform=`scale(${o.$el.parentElement.clientWidth/a}`,n("scaledElement",o.$el)}]])}}),SW={class:"bootstrap-styles modal fade show d-block position-absolute"},AW={class:"bootstrap-styles modal-dialog modal-dialog-centered"},xW={class:"bootstrap-styles modal-content border rounded-3 shadow","data-test":"modal-window__content"},LW={class:"bootstrap-styles modal-header p-0"},OW={class:"bootstrap-styles container-fluid border-bottom g-0"},IW={class:"bootstrap-styles d-flex justify-content-between align-items-center px-11 py-7"},RW={class:"bootstrap-styles modal-title border-0","data-test":"modal-window__header-text"},PW={class:"bootstrap-styles modal-body p-0","data-test":"modal-window__body"},DW={class:"bootstrap-styles modal-footer p-0 g-0"},NW={class:"bootstrap-styles container-fluid border-top"},MW={class:"bootstrap-styles d-flex justify-content-end py-8 px-11"},BW={class:"bootstrap-styles col-6 d-flex justify-content-end","data-test":"modal-window__footer-actions"},kW=at({__name:"ModalWindow",props:{headerText:{}},emits:["close"],setup(e,{emit:t}){const n=e,o=t;return(s,a)=>(ie(),Ce("div",SW,[Z("div",{class:"bootstrap-styles modal-blur d-block position-fixed top-0 left-0 w-100 vh-100","data-test":"modal-window__outside",onClick:a[0]||(a[0]=l=>o("close"))}),Z("div",AW,[Z("div",xW,[Z("div",LW,[Z("div",OW,[Z("div",IW,[Z("h5",RW,Ud(n.headerText),1),oo((ie(),Ce("button",{type:"button","aria-label":"Close","data-bs-dismiss":"modal","data-test":"modal-window__close-button",onClick:a[1]||(a[1]=l=>o("close"))},a[2]||(a[2]=[Z("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[Z("path",{d:"M3 3L13 13",stroke:"var(--gray-500)"}),Z("path",{d:"M13 3L3 13",stroke:"var(--gray-500)"})],-1)]))),[[oe(Yb),{title:"Закрыть",placement:"top"}]])])])]),Z("div",PW,[sd(s.$slots,"body",{},void 0,!0)]),Z("div",DW,[Z("div",NW,[Z("div",MW,[Z("div",BW,[sd(s.$slots,"footer-actions",{},void 0,!0)])])])])])])]))}});const FW=Gn(kW,[["__scopeId","data-v-51d20551"]]),$W={class:"email-template-preview__inner-padding scrollable"},WW={class:"webkit emailTemplate--desktop"},HW={class:"emailTemplate-border-top"},UW={class:"emailTemplate-border-bottom"},VW=at({__name:"EmailTemplatePreviewModalWindow",props:{template:{},deps:{}},emits:["favoriteTemplateSelected","close"],setup(e,{emit:t}){const n=e,o=a=>{const l=a.parentElement;l&&(l.style.height=a.getBoundingClientRect().height+"px")},s=t;return(a,l)=>(ie(),mt(FW,{headerText:"Предпросмотр",class:"email-component__preview-modal-window",onClose:l[3]||(l[3]=()=>s("close"))},{body:ra(()=>[Z("div",{style:Se({backgroundColor:a.template.Theme.Colors.EmailBackgroundColor})},[Ke(cC,{onScaledElement:l[0]||(l[0]=c=>o(c))},{default:ra(()=>[Z("div",$W,[Z("div",{class:"bootstrap-styles pe-none email-template-preview",style:Se({backgroundColor:n.template.Theme.Colors.EmailBackgroundColor,fontFamily:n.template.Theme.FontFamily,width:a.template.Theme.BodyWidth+"px"})},[Z("div",WW,[Z("div",HW,[Z("table",{style:Se([[{maxWidth:n.template.Theme.BodyWidth+"px",width:"100%",backgroundColor:n.template.Theme.Colors.BodyColor,borderTopLeftRadius:n.template.Theme.BorderRadius.TopLeft+"px",borderTopRightRadius:n.template.Theme.BorderRadius.TopRight+"px"}],{"border-spacing":"0"}])},[Z("tbody",null,[Z("tr",null,[Z("td",{style:Se([{paddingTop:n.template.Theme.BodyPaddings.Top+"px"},{"font-size":"0","line-height":"0"}])}," ",4)])])],4)]),(ie(!0),Ce(ot,null,$n(n.template.Components,(c,d)=>(ie(),Ce("div",{key:d},[Ke(uC,{deps:a.deps.emailComponentDeps,theme:n.template.Theme,emailComponent:c,path:[],selectedElementPath:[]},null,8,["deps","theme","emailComponent"])]))),128)),Z("div",UW,[Z("table",{style:Se([[{maxWidth:n.template.Theme.BodyWidth+"px",width:"100%",backgroundColor:n.template.Theme.Colors.BodyColor,borderBottomLeftRadius:n.template.Theme.BorderRadius.BottomLeft+"px",borderBottomRightRadius:n.template.Theme.BorderRadius.BottomRight+"px"}],{"border-spacing":"0"}])},[Z("tbody",null,[Z("tr",null,[Z("td",{style:Se([{paddingBottom:n.template.Theme.BodyPaddings.Bottom+"px"},{"font-size":"0","line-height":"0"}])}," ",4)])])],4)])])],4)])]),_:1})],4)]),"footer-actions":ra(()=>[Z("button",{type:"button",class:"modal-footer__button bootstrap-styles d-flex justify-content-center align-center py-1 px-3 me-3 border border-blue-selected rounded-2 bg-blue-selected button__hover-blue-100 text-color-selected",onClick:l[1]||(l[1]=fs(()=>s("close"),["stop"]))}," Отмена "),Z("button",{type:"submit",class:"modal-footer__button bootstrap-styles d-flex justify-content-center align-center py-1 px-3 border rounded-2 bg-color-selected text-white cursor-pointer",onClick:l[2]||(l[2]=()=>{s("favoriteTemplateSelected")})}," Выбрать ")]),_:1}))}});const GW=Gn(VW,[["__scopeId","data-v-7bb60afa"]]),jW={class:"email-template-preview__inner-padding scrollable"},YW={class:"webkit emailTemplate--desktop"},KW={class:"emailTemplate-border-top"},zW={class:"emailTemplate-border-bottom"},qW=at({__name:"EmailTemplatePreviewTile",props:{deps:{},template:{}},emits:["favoriteTemplateSelected"],setup(e,{emit:t}){const n=e,o=dn({isPreviewComponentModalWindowShown:!1}),s=l=>{const c=l.parentElement;c&&(c.style.height=l.getBoundingClientRect().height+"px")},a=t;return(l,c)=>(ie(),Ce(ot,null,[Z("div",{class:"bootstrap-styles h-100",style:Se({backgroundColor:n.template.Theme.Colors.EmailBackgroundColor}),onClick:c[1]||(c[1]=()=>{o.isPreviewComponentModalWindowShown=!0})},[Ke(cC,{onScaledElement:c[0]||(c[0]=d=>s(d))},{default:ra(()=>[Z("div",jW,[Z("div",{class:"bootstrap-styles pe-none email-template-preview",style:Se({backgroundColor:n.template.Theme.Colors.EmailBackgroundColor,fontFamily:n.template.Theme.FontFamily,width:l.template.Theme.BodyWidth+"px"})},[Z("div",YW,[Z("div",KW,[Z("table",{style:Se([[{maxWidth:n.template.Theme.BodyWidth+"px",width:"100%",backgroundColor:n.template.Theme.Colors.BodyColor,borderTopLeftRadius:n.template.Theme.BorderRadius.TopLeft+"px",borderTopRightRadius:n.template.Theme.BorderRadius.TopRight+"px"}],{"border-spacing":"0"}])},[Z("tbody",null,[Z("tr",null,[Z("td",{style:Se([{paddingTop:n.template.Theme.BodyPaddings.Top+"px"},{"font-size":"0","line-height":"0"}])}," ",4)])])],4)]),(ie(!0),Ce(ot,null,$n(n.template.Components,(d,m)=>(ie(),Ce("div",{key:m},[Ke(uC,{deps:n.deps.emailComponentDeps,theme:n.template.Theme,emailComponent:d,path:[],selectedElementPath:[]},null,8,["deps","theme","emailComponent"])]))),128)),Z("div",zW,[Z("table",{style:Se([[{maxWidth:n.template.Theme.BodyWidth+"px",width:"100%",backgroundColor:n.template.Theme.Colors.BodyColor,borderBottomLeftRadius:n.template.Theme.BorderRadius.BottomLeft+"px",borderBottomRightRadius:n.template.Theme.BorderRadius.BottomRight+"px"}],{"border-spacing":"0"}])},[Z("tbody",null,[Z("tr",null,[Z("td",{style:Se([{paddingBottom:n.template.Theme.BodyPaddings.Bottom+"px"},{"font-size":"0","line-height":"0"}])}," ",4)])])],4)])])],4)])]),_:1})],4),(ie(),mt(_L,{to:"#app"},[o.isPreviewComponentModalWindowShown?(ie(),mt(GW,{key:0,template:n.template,deps:n.deps.emailTemplatePreviewModalWindowDeps,onClose:c[2]||(c[2]=()=>o.isPreviewComponentModalWindowShown=!1),onFavoriteTemplateSelected:c[3]||(c[3]=()=>a("favoriteTemplateSelected"))},null,8,["template","deps"])):vn("",!0)]))],64))}});const XW=Gn(qW,[["__scopeId","data-v-f6f330d3"]]),JW=e=>at((t,n)=>()=>Bu(XW,{template:e.template,deps:e.emailTemplatePreviewTileDeps,onFavoriteTemplateSelected:e.onFavoriteTemplateSelected})),ZW=e=>({elementsDeps:e.elementsDeps}),QW=e=>({iteratedColumnDeps:ZW({elementsDeps:e.elementsDeps}),listExpressionEvaluator:e.listExpressionEvaluator}),eH=e=>({elementsDeps:e.elementsDeps}),tH=e=>({multipleColumnDeps:eH({elementsDeps:e.elementsDeps})}),nH=e=>({iteratedColumnBodyRowDeps:QW({elementsDeps:e.elementsDeps,listExpressionEvaluator:e.listExpressionEvaluator}),multipleColumnBodyRowDeps:tH({elementsDeps:e.elementsDeps}),listExpressionEvaluator:e.listExpressionEvaluator}),fC=e=>({emailComponentBodyRowDeps:nH({elementsDeps:e.elementsDeps,listExpressionEvaluator:e.listExpressionEvaluator}),boolExpressionEvaluatorDelegate:e.boolExpressionEvaluator,dataStructExpressionEvaluator:e.dataStructExpressionEvaluator}),rH=e=>({expressionEvaluator:e.expressionEvaluator}),dC=e=>({listExpressionEvaluator:e.listExpressionEvaluator,numberExpressionEvaluator:e.numberExpressionEvaluator,stringExpressionEvaluator:e.stringExpressionEvaluator,expressionVueDeps:rH({expressionEvaluator:e.expressionEvaluator}),boolExpressionEvaluator:e.boolExpressionEvaluator}),oH=e=>ar(e),iH=e=>ar(e),sH=e=>({predicate:t,context:n})=>Promise.all([e.numberExpressionEvaluator({numberExpression:t.Left,context:n}),e.numberExpressionEvaluator({numberExpression:t.Right,context:n})]).then(([o,s])=>o===s),aH=e=>ar(e),lH=e=>({predicate:t,context:n})=>Promise.all([e.numberExpressionEvaluator({numberExpression:t.Left,context:n}),e.numberExpressionEvaluator({numberExpression:t.Right,context:n})]).then(([o,s])=>o<s),uH=e=>({predicate:t,context:n})=>Promise.all([e.numberExpressionEvaluator({numberExpression:t.Left,context:n}),e.numberExpressionEvaluator({numberExpression:t.Right,context:n})]).then(([o,s])=>o>s),cH=e=>{const t=sH({numberExpressionEvaluator:e.numberExpressionEvaluator}),n=uH({numberExpressionEvaluator:e.numberExpressionEvaluator}),o=lH({numberExpressionEvaluator:e.numberExpressionEvaluator});return({numberPredicate:s,context:a})=>aH(s).Match({whenEqual:l=>t({predicate:l,context:a}),whenGreaterThan:l=>n({predicate:l,context:a}),whenLessThan:l=>o({predicate:l,context:a})})},fH=e=>({predicate:t,context:n})=>Promise.all([e.stringExpressionEvaluator({stringExpression:t.Left,context:n}),e.stringExpressionEvaluator({stringExpression:t.Right,context:n})]).then(([o,s])=>o>s),dH=e=>ar(e),hH=e=>({predicate:t,context:n})=>Promise.all([e.stringExpressionEvaluator({stringExpression:t.Left,context:n}),e.stringExpressionEvaluator({stringExpression:t.Contains,context:n})]).then(([o,s])=>o>s),mH=e=>{const t=fH({stringExpressionEvaluator:e.stringExpressionEvaluator}),n=hH({stringExpressionEvaluator:e.stringExpressionEvaluator});return({stringPredicate:o,context:s})=>dH(o).Match({whenContains:a=>n({predicate:a,context:s}),whenEqual:a=>t({predicate:a,context:s})})},pH=e=>{const t=cH({numberExpressionEvaluator:e.numberExpressionEvaluator}),n=mH({stringExpressionEvaluator:e.stringExpressionEvaluator});return({predicate:o,context:s})=>iH(o).Match({whenNumberPredicate:a=>t({numberPredicate:a,context:s}),whenStringPredicate:a=>n({stringPredicate:a,context:s})})},hC=e=>{const t=pH({numberExpressionEvaluator:e.numberExpressionEvaluator,stringExpressionEvaluator:e.stringExpressionEvaluator}),n=({boolExpression:o,context:s})=>oH(o).Match({whenAndExpression:a=>Promise.all(a.Expressions.map(l=>n({boolExpression:l,context:s}))).then(l=>l.every(c=>c)),whenOrExpression:a=>Promise.all(a.Expressions.map(l=>n({boolExpression:l,context:s}))).then(l=>l.some(c=>c)),whenNotExpression:async a=>!await n({boolExpression:a.Expression,context:s}),whenPredicate:a=>t({predicate:a,context:s})});return n},gH=e=>{const t=hC({numberExpressionEvaluator:e.numberExpressionEvaluator,stringExpressionEvaluator:e.stringExpressionEvaluator});return{emailComponentDeps:fC({elementsDeps:dC({listExpressionEvaluator:e.listExpressionEvaluator,numberExpressionEvaluator:e.numberExpressionEvaluator,stringExpressionEvaluator:e.stringExpressionEvaluator,expressionEvaluator:e.expressionEvaluator,boolExpressionEvaluator:t}),listExpressionEvaluator:e.listExpressionEvaluator,boolExpressionEvaluator:t,dataStructExpressionEvaluator:e.dataStructExpressionEvaluator})}},_H=e=>{const t=hC({numberExpressionEvaluator:e.numberExpressionEvaluator,stringExpressionEvaluator:e.stringExpressionEvaluator});return{emailComponentDeps:fC({elementsDeps:dC({listExpressionEvaluator:e.listExpressionEvaluator,numberExpressionEvaluator:e.numberExpressionEvaluator,stringExpressionEvaluator:e.stringExpressionEvaluator,expressionEvaluator:e.expressionEvaluator,boolExpressionEvaluator:t}),listExpressionEvaluator:e.listExpressionEvaluator,boolExpressionEvaluator:t,dataStructExpressionEvaluator:e.dataStructExpressionEvaluator}),emailTemplatePreviewModalWindowDeps:gH({listExpressionEvaluator:e.listExpressionEvaluator,dataStructExpressionEvaluator:e.dataStructExpressionEvaluator,numberExpressionEvaluator:e.numberExpressionEvaluator,stringExpressionEvaluator:e.stringExpressionEvaluator,expressionEvaluator:e.expressionEvaluator})}},EH=e=>{const t=document.createElement("form");t.method=e.method,t.action=e.action;for(const[n,o]of e.formData.entries()){if(o instanceof File)continue;const s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name",n),s.setAttribute("value",o),t.appendChild(s)}return t},vH=e=>async({context:t,expression:n})=>e.numberExpressionEvaluator({numberExpression:n.ProductId,context:t}).then(o=>"https://cdn.retailrocket.net/api/1.0/partner/"+e.partnerId+"/item/"+o+"/picture/?format=png&width="+n.ImageSize.Width+"&height="+n.ImageSize.Height+"&scale=both"),yH=e=>{const t=n=>{const o=e.stringExpressionDataSourceEvaluatorFactory(t);return o2(n.stringExpression).Match({whenConcatStringExpressions:s=>wH({concatStringExpressions:s,stringExpressionEvaluator:t,context:n.context}),whenContextValueExpression:s=>bH({contextValueExpression:s,context:n.context}),whenConstValueExpression:s=>SH({stringConstValueExpression:s}),whenTruncateValueExpression:s=>CH({truncateValueExpression:s,context:n.context,stringExpressionEvaluator:t}),whenDataSource:s=>o({stringExpressionDataSource:s,context:n.context}),whenNumberToStringExpression:s=>TH({numberToStringExpression:s,context:n.context,numberExpressionEvaluator:e.numberExpressionEvaluator})})};return t},bH=e=>Promise.resolve(WN(e.contextValueExpression.Path,e.context)),CH=async e=>{const t=e.truncateValueExpression.MaxLength,n=await e.stringExpressionEvaluator({stringExpression:e.truncateValueExpression.StringExpression,context:e.context});return t<n.length?n.slice(0,e.truncateValueExpression.MaxLength)+e.truncateValueExpression.Tail:n},TH=async e=>(await e.numberExpressionEvaluator({numberExpression:e.numberToStringExpression.NumberExpression,context:e.context})).toString(),wH=e=>Promise.all(e.concatStringExpressions.StringExpressions.map(t=>e.stringExpressionEvaluator({stringExpression:t,context:e.context}))).then(t=>t.join("")),SH=e=>Promise.resolve(e.stringConstValueExpression.Value),AH=e=>{const t=n=>n2(n.listExpression).Match({whenContextValueExpression:o=>Promise.resolve($N(o.Path,n.context)),whenChunkExpression:async o=>{const s=await t({listExpression:o.ListExpression,context:n.context});return s.slice(0,Math.floor(s.length/o.ChunkSize)*o.ChunkSize)},whenLimitExpression:async o=>(await t({listExpression:o.ListExpression,context:n.context})).slice(0,o.Limit),whenDataSource:o=>e.listExpressionDataSourceEvaluator(o)});return t},xH=e=>t=>r2(t.numberExpression).Match({whenContextValueExpression:n=>Promise.resolve(jy(n.Path,t.context)),whenConstValueExpression:n=>Promise.resolve(n.Value),whenListLengthExpression:async n=>e.listExpressionEvaluator({listExpression:n.ListExpression,context:t.context}).then(o=>o.length),whenDataSource:n=>Promise.resolve(e.numberExpressionDataSourceEvaluator(n))}),WE=e=>({dataStructBuilderExpression:t,context:n})=>Promise.all(Object.entries(t).map(async([o,s])=>({key:o,value:await e.expressionEvaluator({expression:s,context:n})}))).then(o=>Object.fromEntries(o.map(s=>[s.key,s.value]))),LH=e=>ar(e),OH=e=>{const t=({expression:n,context:o})=>{const s=e.dataStructBuilderExpressionEvaluatorFactory(t);return LH(n).Match({whenNumberExpression:a=>e.numberExpressionEvaluator({numberExpression:a,context:o}),whenStringExpression:a=>e.stringExpressionEvaluator({stringExpression:a,context:o}),whenListExpression:a=>e.listExpressionEvaluator({listExpression:a,context:o}),whenRecordBuilderExpression:a=>s({dataStructBuilderExpression:a,context:o})})};return t},HE={Subject:"",Preheader:"",Theme:{BodyWidth:600,FontFamily:"Arial",Colors:{EmailBackgroundColor:"#EEEEEE",BodyColor:"#FFFFFF",PrimaryColor:"#557aff",PrimaryTextColor:"#ffffff",SecondaryColor:"#F6F6F6",SecondaryTextColor:"#000000",CardBackgroundColor:"#F2F2F2",HeadingColor:"#2F2F2F",TitleColor:"#2F2F2F",SubHeadingColor:"#2F2F2F",LargeTextColor:"#2F2F2F",NormalTextColor:"#2F2F2F",DescriptionTextColor:"#999999",LinkColor:"#65A0FA",ButtonTextColor:"#ffffff"},BorderRadius:{TopLeft:20,TopRight:20,BottomLeft:20,BottomRight:20},BorderRadiusCard:{TopLeft:0,TopRight:0,BottomLeft:0,BottomRight:0},BorderRadiusButton:{TopLeft:5,TopRight:5,BottomLeft:5,BottomRight:5},BorderRadiusBanner:{TopLeft:0,TopRight:0,BottomLeft:0,BottomRight:0},BodyPaddings:{Left:20,Right:20,Top:10,Bottom:10},ComponentPaddings:{Small:8,Medium:16,Large:24,Huge:40},ButtonPaddings:{TopBottom:12,LeftRight:14},FontSettingsPresets:{Title:{FontSize:24,LineHeight:28,IsBold:!0,IsItalic:!1,Decoration:"None"},Heading:{FontSize:20,LineHeight:24,IsBold:!0,IsItalic:!1,Decoration:"None"},SubHeading:{FontSize:14,LineHeight:16,IsBold:!0,IsItalic:!1,Decoration:"None"},LargeText:{FontSize:14,LineHeight:18,IsBold:!1,IsItalic:!1,Decoration:"None"},NormalText:{FontSize:12,LineHeight:15,IsBold:!1,IsItalic:!1,Decoration:"None"},DescriptionText:{FontSize:10,LineHeight:13,IsBold:!1,IsItalic:!1,Decoration:"None"},Button:{FontSize:12,LineHeight:14,IsBold:!0,IsItalic:!1,Decoration:"None"},Link:{FontSize:12,LineHeight:14,IsBold:!1,IsItalic:!1,Decoration:"None"}}},Components:[{BorderRadius:{TopLeft:{Discriminator:"CustomBorderRadius",CustomValue:0},TopRight:{Discriminator:"CustomBorderRadius",CustomValue:0},BottomRight:{Discriminator:"CustomBorderRadius",CustomValue:0},BottomLeft:{Discriminator:"CustomBorderRadius",CustomValue:0}},InnerBgColor:{Discriminator:"BodyColor",CustomValue:"#000000"},Paddings:{Top:{ThemePadding:"ThemePaddingsLarge"},Bottom:{ThemePadding:"ThemePaddingsLarge"}},FullWidth:!1,BodyRowList:[{MultipleColumnBodyRow:{ColumnSpacerSize:{CustomValue:0},DirectionRtl:!1,Paddings:{Left:{CustomValue:0},Top:{CustomValue:0},Right:{CustomValue:0},Bottom:{CustomValue:0}},Border:{Left:{Width:0,Style:"None",Color:{Discriminator:"Custom",CustomValue:"#FFFFFF"}},Top:{Width:0,Style:"None",Color:{Discriminator:"Custom",CustomValue:"#FFFFFF"}},Right:{Width:0,Style:"None",Color:{Discriminator:"Custom",CustomValue:"#FFFFFF"}},Bottom:{Width:0,Style:"None",Color:{Discriminator:"Custom",CustomValue:"#FFFFFF"}}},BorderRadius:{TopLeft:{Discriminator:"CustomBorderRadius",CustomValue:0},TopRight:{Discriminator:"CustomBorderRadius",CustomValue:0},BottomRight:{Discriminator:"CustomBorderRadius",CustomValue:0},BottomLeft:{Discriminator:"CustomBorderRadius",CustomValue:0}},BgColor:{Discriminator:"None",CustomValue:"#ffffff"},ContainerAlign:"Center",Columns:[{VerticalAlign:"Top",BgColor:{Discriminator:"None",CustomValue:"#ffffff"},Paddings:{Top:{CustomValue:0},Right:{CustomValue:0},Bottom:{CustomValue:0},Left:{CustomValue:0}},Border:{Left:{Width:0,Style:"None",Color:{Discriminator:"Custom",CustomValue:"#FFFFFF"}},Top:{Width:0,Style:"None",Color:{Discriminator:"Custom",CustomValue:"#FFFFFF"}},Right:{Width:0,Style:"None",Color:{Discriminator:"Custom",CustomValue:"#FFFFFF"}},Bottom:{Width:0,Style:"None",Color:{Discriminator:"Custom",CustomValue:"#FFFFFF"}}},BorderRadius:{TopLeft:{Discriminator:"CustomBorderRadius",CustomValue:0},TopRight:{Discriminator:"CustomBorderRadius",CustomValue:0},BottomRight:{Discriminator:"CustomBorderRadius",CustomValue:0},BottomLeft:{Discriminator:"CustomBorderRadius",CustomValue:0}},ContainerAlign:"Center",Elements:[{SpanText:{MinNumberOfLines:1,IsLink:!1,HRef:{ConstValueExpression:{Value:""}},Text:{ConstValueExpression:{Value:"Cервис создания электронных писем"}},Style:{Discriminator:"Heading",FontColor:{Discriminator:"StyleLinkedColor",CustomValue:"#000000"},CustomFontSettings:{FontFamily:"Arial",FontSize:16,LineHeight:20,IsBold:!1,IsItalic:!1,Decoration:"None",FontColor:{Discriminator:"NormalTextColor",CustomValue:"#000000"}}},ContentAlign:"Inline"}},{Spacer:{Height:{ThemePadding:"ThemePaddingsLarge"},Weight:0,Color:{Discriminator:"None",CustomValue:"#FFFFFF"}}},{SpanText:{MinNumberOfLines:1,IsLink:!1,HRef:{ConstValueExpression:{Value:""}},Text:{ConstValueExpression:{Value:"Мы рады представить вам наш новый продукт - сервис создания электронных писем. С помощью этого удобного и интуитивно понятного инструмента, вы сможете легко создавать красивые и профессиональные письма всего в несколько простых шагов."}},Style:{Discriminator:"LargeText",FontColor:{Discriminator:"StyleLinkedColor",CustomValue:"#000000"},CustomFontSettings:{FontFamily:"Arial",FontSize:16,LineHeight:20,IsBold:!1,IsItalic:!1,Decoration:"None",FontColor:{Discriminator:"NormalTextColor",CustomValue:"#000000"}}},ContentAlign:"Inline"}}],Width:{JustifyWidth:{WidthInPixels:560}}}]}}]}]},mC="#app",Qn=document.querySelector(mC),Zt={partnerId:Qn.getAttribute("data-partner-id"),wysiwygTemplateEditorBffBaseUrl:Qn.getAttribute("data-wysiwyg-template-editor-bff-base-url"),wysiwygBffProxyBaseUrl:Qn.getAttribute("data-wysiwyg-bff-proxy-base-url"),antiForgeryHeaderTokenName:Qn.getAttribute("data-anti-forgery-header-token-name"),antiForgeryHeaderTokenValue:Qn.getAttribute("data-anti-forgery-header-token-value"),antiForgeryFormTokenName:Qn.getAttribute("data-anti-forgery-form-token-name"),antiForgeryFormTokenValue:Qn.getAttribute("data-anti-forgery-form-token-value"),createEmailTemplateSubmitUrl:Qn.getAttribute("data-create-email-template-submit-url"),initialEmailTemplateJson:Qn.getAttribute("data-initial-transactional-template"),transactionalFavoritesTemplates:JSON.parse(Qn.getAttribute("data-transactional-favorites-templates")),commonFavoritesTemplates:JSON.parse(Qn.getAttribute("data-common-favorites-templates")),exitLink:Qn.getAttribute("data-exit-link")},IH=e=>vN({baseUrl:e.baseUrl,antiForgeryTokenHeaderName:Zt.antiForgeryHeaderTokenName,antiForgeryTokenValue:Zt.antiForgeryHeaderTokenValue}),RH=Gy(IH({baseUrl:Zt.wysiwygBffProxyBaseUrl})),pC=e=>{const t=new FormData;t.append(Zt.antiForgeryFormTokenName,Zt.antiForgeryFormTokenValue),t.append("template",JSON.stringify(e.template)),t.append("previewData",JSON.stringify(e.previewData));const n=EH({method:"POST",action:Zt.createEmailTemplateSubmitUrl,formData:t});document.body.appendChild(n),n.submit()},PH={},UE=e=>{const t=EN({partnerId:Zt.partnerId,getTransactionalTemplateData:()=>e.templateData,listExpressionDataSourceBffClient:RH,customerStockId:void 0}),n=AH({listExpressionDataSourceEvaluator:t}),o=HN({getTransactionalTemplateData:()=>e.templateData}),s=xH({listExpressionEvaluator:n,numberExpressionDataSourceEvaluator:o}),a=yH({listExpressionEvaluator:n,numberExpressionEvaluator:s,stringExpressionDataSourceEvaluatorFactory:()=>MN({getTransactionalTemplateData:()=>e.templateData,productImageUrlBuilderExpressionEvaluator:vH({partnerId:Zt.partnerId,numberExpressionEvaluator:s}),contactCustomData:PH})}),l=OH({listExpressionEvaluator:n,numberExpressionEvaluator:s,stringExpressionEvaluator:a,dataStructBuilderExpressionEvaluatorFactory:d=>WE({expressionEvaluator:d})}),c=WE({expressionEvaluator:l});return JW({template:e.template,emailTemplatePreviewTileDeps:_H({listExpressionEvaluator:n,numberExpressionEvaluator:s,stringExpressionEvaluator:a,dataStructExpressionEvaluator:c,expressionEvaluator:l}),onFavoriteTemplateSelected:()=>{console.log("onFavoriteTemplateSelected"),pC({template:e.template,previewData:e.templateData})}})},Fh=HO(JR,{onInitialTemplateSelected:()=>{console.log("onInitialTemplateSelected"),pC({template:Zt.initialEmailTemplateJson.length?JSON.parse(Zt.initialEmailTemplateJson):HE,previewData:{}})},exitLink:Zt.exitLink,deps:uN({partnerId:Zt.partnerId,emailTemplatePreviewComponents:[...Zt.commonFavoritesTemplates.map(e=>UE({template:JSON.parse(e.templateJson),templateData:{}})),...Zt.transactionalFavoritesTemplates.map(e=>UE({template:JSON.parse(e.templateJson),templateData:JSON.parse(e.dataJson)}))],initialEmailTemplate:Zt.initialEmailTemplateJson.length?JSON.parse(Zt.initialEmailTemplateJson):HE,exitLink:Zt.exitLink})});Fh.use(gy({components:{VSkeletonLoader:sN}}));Fh.use(Uy);Fh.mount(mC);
|
package/package.json
CHANGED