@pobuca/email-builder 1.5.1 → 1.6.0

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.
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs"),require("rxjs/operators"),require("@angular/cdk/drag-drop"),require("@angular/common/http"),require("@angular/material/snack-bar"),require("@angular/material/dialog"),require("@angular/material/bottom-sheet"),require("@angular/platform-browser"),require("@angular/flex-layout"),require("@angular/material/button"),require("@angular/material/button-toggle"),require("@angular/material/divider"),require("@angular/material/expansion"),require("@angular/material/form-field"),require("@angular/material/icon"),require("@angular/material/input"),require("@angular/material/list"),require("@angular/material/menu"),require("@angular/material/progress-bar"),require("@angular/material/select"),require("@angular/material/sidenav"),require("@angular/material/slide-toggle"),require("@angular/material/slider"),require("@angular/material/tabs"),require("@angular/material/toolbar"),require("@angular/material/tooltip"),require("angular-resizable-element"),require("@angular/forms"),require("@angular/common"),require("@angular/cdk/scrolling"),require("quill"),require("ngx-quill"),require("ngx-color/chrome"),require("@angular/cdk/portal"),require("@angular/localize/init")):"function"==typeof define&&define.amd?define("@pobuca/email-builder",["exports","@angular/core","rxjs","rxjs/operators","@angular/cdk/drag-drop","@angular/common/http","@angular/material/snack-bar","@angular/material/dialog","@angular/material/bottom-sheet","@angular/platform-browser","@angular/flex-layout","@angular/material/button","@angular/material/button-toggle","@angular/material/divider","@angular/material/expansion","@angular/material/form-field","@angular/material/icon","@angular/material/input","@angular/material/list","@angular/material/menu","@angular/material/progress-bar","@angular/material/select","@angular/material/sidenav","@angular/material/slide-toggle","@angular/material/slider","@angular/material/tabs","@angular/material/toolbar","@angular/material/tooltip","angular-resizable-element","@angular/forms","@angular/common","@angular/cdk/scrolling","quill","ngx-quill","ngx-color/chrome","@angular/cdk/portal","@angular/localize/init"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).pobuca=e.pobuca||{},e.pobuca["email-builder"]={}),e.ng.core,e.rxjs,e.rxjs.operators,e.ng.cdk.dragDrop,e.ng.common.http,e.ng.material.snackBar,e.ng.material.dialog,e.ng.material.bottomSheet,e.ng.platformBrowser,e.ng.flexLayout,e.ng.material.button,e.ng.material.buttonToggle,e.ng.material.divider,e.ng.material.expansion,e.ng.material.formField,e.ng.material.icon,e.ng.material.input,e.ng.material.list,e.ng.material.menu,e.ng.material.progressBar,e.ng.material.select,e.ng.material.sidenav,e.ng.material.slideToggle,e.ng.material.slider,e.ng.material.tabs,e.ng.material.toolbar,e.ng.material.tooltip,e.angularResizableElement,e.ng.forms,e.ng.common,e.ng.cdk.scrolling,null,e.ng.quill,e.ng.color.chrome,e.ng.cdk.portal)}(this,(function(e,t,n,i,o,r,a,l,s,c,p,u,d,m,g,b,h,f,y,k,v,q,x,w,S,I,C,P,B,T,$,O,j,D,_,M){"use strict";function E(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var L,F=E(t),A=E(r);e.ETemplatesStorage=void 0,(L=e.ETemplatesStorage||(e.ETemplatesStorage={})).LATEST_USED="NGB_LATEST_USED_TEMPLATES",L.STORAGE="NGB_TEMP_TEMPLATES_STORAGE";var z=function(e,t){return(z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function R(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}z(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function U(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{s(i.next(e))}catch(e){r(e)}}function l(e){try{s(i.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((i=i.apply(e,t||[])).next())}))}function H(e,t){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(l){return function(s){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,l[0]&&(a=0)),a;)try{if(n=1,i&&(o=2&l[0]?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,i=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],i=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}Object.create;function N(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function G(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function V(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(G(arguments[t]));return e}function W(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}Object.create;"function"==typeof SuppressedError&&SuppressedError;function Y(e){return void 0===e&&(e={}),JSON.parse(JSON.stringify(e))}function K(e,t){return JSON.stringify(e)===JSON.stringify(t)}function J(e){var t,n;void 0===e&&(e={});for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];try{for(var r=N(i),a=r.next();!a.done;a=r.next()){var l=a.value;for(var s in l)e.hasOwnProperty(s)||(Array.isArray(l[s])||"object"!=typeof l[s]?e[s]=l[s]:e[s]=J(e[s],l[s]))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return e}function Q(e,t){var n;void 0===t&&(t="border");var i=e.color,o=void 0===i?"#000000":i,r=e.style,a=void 0===r?"solid":r,l=e.width,s=void 0===l?4:l,c=e.radius,p=void 0===c?0:c;return(n={})[t]=s+"px "+a+" "+o,n.borderRadius=p+"px",n}function Z(e,t){var n;void 0===t&&(t="padding");var i=e.top,o=void 0===i?10:i,r=e.right,a=void 0===r?25:r,l=e.bottom,s=void 0===l?10:l,c=e.left;return(n={})[t]=o+"px "+a+"px "+s+"px "+(void 0===c?25:c)+"px",n}function X(e){var t=e.top,n=void 0===t?0:t,i=e.bottom;return{margin:n+"px 0 "+(void 0===i?0:i)+"px"}}function ee(e){var t=e.family,n=void 0===t?"":t,i=e.size,o=void 0===i?13:i,r=e.style,a=void 0===r?"normal":r,l=e.weight;return{fontFamily:n,fontSize:o+"px",fontStyle:a,fontWeight:void 0===l?"normal":l}}function te(e){var t=e.value,n=void 0===t?22:t,i=e.unit,o=void 0===i?"px":i;return{lineHeight:"none"!==o?""+n+o:"normal"}}function ne(e){var t=e.value,n=void 0===t?100:t,i=e.unit,o=void 0===i?"%":i,r=e.auto;return(void 0!==r&&r?"auto":["%","px"].indexOf(o)>-1&&""+n+o)||o}function ie(e,t){if(void 0===t&&(t=2),0===e)return"0 Bytes";var n=t<0?0:t,i=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,i)).toFixed(n))+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}function oe(e){return"https://www.mailjet.com/images/theme/v1/icons/ico-social/"+e}function re(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.defer((function(){return n.of.apply(void 0,V(e))}))}var ae={background:{color:"transparent"},border:{width:0,color:"#cccccc",radius:0,style:"solid"},verticalAlign:"top"},le=function(e,t,n){void 0===e&&(e="cols_1"),void 0===t&&(t=[]),this.type=e,this.elements=t,this.columns=1,this.id=Date.now(),this.options={fullWidth:!1,border:{color:"#cccccc",style:"solid",width:0,radius:0},background:{color:"#ffffff",url:"",repeat:"repeat",size:{value:100,unit:"px",auto:!0,units:["px","%","cover","contain"]}},padding:{top:4,right:4,bottom:4,left:4},margin:{top:0,bottom:0},gaps:[4,4]},t.length||(["cols_2","cols_12","cols_21"].includes(e)?this.columns=2:"cols_3"===e?this.columns=3:"cols_4"===e&&(this.columns=4));var i=Array.from({length:this.columns},(function(){return ae})),o=[1];"cols_21"===e?o=[4,6]:"cols_12"===e?o=[6,4]:"cols_2"===e?o=[5,5]:"cols_3"===e?o=[3.33,3.33,3.33]:"cols_4"===e&&(o=[2.5,2.5,2.5,2.5]),this.options=J(n,this.options,{columns:i,columnsWidth:o})},se=0;function ce(){return se+=1,"pb-block-"+Date.now().toString(36)+"-"+se.toString(36)}var pe,ue,de,me,ge,be,he,fe=function(){},ye=function(e,t,n){void 0===n&&(n={disabled:!1,message:""}),this.innerText=e,this.state=n,this.id=ce(),this.type="text",this.icon="text_format",this.options={color:"#000000",font:{fallback:"Arial, Helvetica, sans-serif",family:"Roboto",style:"normal",size:16,weight:400},lineHeight:{value:40,unit:"none"},padding:{top:10,right:25,bottom:10,left:25}},this.title=$localize(pe||(pe=W([":@@text_block:Text"],[":@@text_block:Text"]))),this.options=J(t,this.options)},ke=function(e,t,n){void 0===e&&(e=""),void 0===n&&(n={disabled:!1,message:""}),this.src=e,this.state=n,this.id=ce(),this.type="image",this.icon="image",this.options={border:{color:"#cccccc",style:"solid",width:0,radius:0},width:{value:100,unit:"px",auto:!0,units:["px"]},height:{value:100,unit:"px",auto:!0,units:["px"]},link:{href:"",target:"_blank"},align:"center",title:"",padding:{top:0,right:0,bottom:0,left:0}},this.title=$localize(ue||(ue=W([":@@image_block:Image"],[":@@image_block:Image"]))),this.options=J(t,this.options)},ve=function(e,t,n,i){void 0===e&&(e=""),void 0===t&&(t=""),void 0===n&&(n={border:{color:"#000000",style:"solid",width:0,radius:0}}),void 0===i&&(i={disabled:!1,message:""}),this.src=e,this.posterSrc=t,this.state=i,this.id=ce(),this.type="video",this.icon="videocam",this.options={border:{color:"#000000",style:"solid",width:0,radius:0},width:{value:100,unit:"px",auto:!0,units:["px"]},height:{value:100,unit:"px",auto:!0,units:["px"]},align:"center",title:"",padding:{top:10,right:25,bottom:10,left:25}},this.title=$localize(de||(de=W([":@@video_block:Video"],[":@@video_block:Video"]))),this.options=J(n,this.options)},qe=function(e,t,n){void 0===e&&(e="Click on me"),void 0===n&&(n={disabled:!1,message:""}),this.innerText=e,this.state=n,this.id=ce(),this.type="button",this.icon="radio_button_checked",this.options={backgroundColor:"#414141",border:{color:"#414141",style:"solid",width:0,radius:3},color:"#ffffff",font:{fallback:"Arial, Helvetica, sans-serif",family:"Roboto",size:13,style:"normal",weight:400},align:"center",fullWidth:!1,lineHeight:{value:120,unit:"%"},link:{href:"",target:"_blank"},innerPadding:{top:10,right:25,bottom:10,left:25},padding:{top:10,right:25,bottom:10,left:25}},this.title=$localize(me||(me=W([":@@button_block:Button"],[":@@button_block:Button"]))),this.options=J(t,this.options)},xe=function(e,t){void 0===t&&(t={disabled:!1,message:""}),this.state=t,this.id=ce(),this.type="divider",this.icon="remove",this.options={border:{color:"#000000",style:"solid",width:4},padding:{top:10,right:25,bottom:10,left:25}},this.title=$localize(ge||(ge=W([":@@divider_block:Divider"],[":@@divider_block:Divider"]))),this.options=J(e,this.options)},we=function(e,t){void 0===t&&(t={disabled:!1,message:""}),this.state=t,this.id=ce(),this.type="spacer",this.icon="vertical_align_center",this.title=$localize(be||(be=W([":@@spacer_block:Spacer"],[":@@spacer_block:Spacer"]))),this.options={height:{value:20,unit:"px",units:["px"]}},this.options=J(e,this.options)},Se=function(e,t,n){void 0===e&&(e=[]),void 0===n&&(n={disabled:!1,message:""}),this.networks=e,this.state=n,this.id=ce(),this.type="social",this.icon="share",this.title=$localize(he||(he=W([":@@share_block:Social"],[":@@share_block:Social"]))),this.options={align:"center",mode:"horizontal",font:{fallback:"Arial, Helvetica, sans-serif",family:"Roboto",style:"normal",size:16,weight:400},iconSize:{value:30,unit:"px"},lineHeight:{value:16,unit:"px"},color:"#333333",innerPadding:{top:4,right:4,bottom:4,left:4},padding:{top:10,right:25,bottom:10,left:25}},this.options=J(t,this.options)};function Ie(e,t){return void 0===t&&(t=!1),e.id&&!t||Object.defineProperty(e,"id",{configurable:!0,enumerable:!0,value:ce(),writable:!0}),e.id}var Ce=["github","instagram","web","snapchat","youtube","vimeo","medium","soundcloud","dribbble","facebook","twitter","pinterest","linkedin","tumblr","xing","tiktok"],Pe=new t.InjectionToken("PB Social Networks",{providedIn:"any",factory:function(){return Ce}}),Be=["Open+Sans:300,400,500,700","Droid+Sans:300,400,500,700","Lato:300,400,500,700","Roboto:300,400,700,900","Ubuntu:300,400,500,700","Fira+Sans:300,400,500,700","Mansalva:400"],Te=new t.InjectionToken("PB Google Fonts",{providedIn:"any",factory:function(){return Be}}),$e=["Palatino Linotype, Book Antiqua, Palatino, serif","Times New Roman, Times, serif","Arial, Helvetica, sans-serif","Arial Black, Gadget, sans-serif","Comic Sans MS, cursive, sans-serif","Impact, Charcoal, sans-serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Trebuchet MS, Helvetica, sans-serif","Verdana, Geneva, sans-serif","Courier New, Courier, monospace","Lucida Console, Monaco, monospace"],Oe=new t.InjectionToken("PB Fallback Fonts",{providedIn:"any",factory:function(){return $e}}),je=[new le("cols_1"),new le("cols_2"),new le("cols_3"),new le("cols_4"),new le("cols_12"),new le("cols_21")],De=new t.InjectionToken("PB Structures",{providedIn:"any",factory:function(){return je}}),_e=[new ye,new ke,new ve,new qe,new xe,new we,new Se],Me=new t.InjectionToken("PB Blocks",{providedIn:"any",factory:function(){return _e}}),Ee=Object.freeze({xApiKey:"t7HdQfZjGp6R96fOV4P8v18ggf6LLTQZ1puUI2tz",useSaveButton:!0,usePreviewButton:!0,useDownloadButton:!0,templateListIfEmpty:!0,uploadImageName:"image"}),Le=new t.InjectionToken("PB Builder Configuration",{providedIn:"root",factory:function(){return Ee}}),Fe=new t.InjectionToken("PB Storage factory token",{providedIn:"any",factory:function(){return sessionStorage}}),Ae=new t.InjectionToken("PB Token that stores temporary templates cache",{providedIn:"any",factory:function(){return sessionStorage}}),ze=function(e,t,n){void 0===e&&(e=[]),void 0===t&&(t={name:"",previewText:"",width:{value:600,unit:"px",units:["px"]},background:{color:"#f1f1f1",size:{value:100,unit:"%",auto:!0,units:["px","%","cover","contain"]}},padding:{top:16,right:10,bottom:10,left:10},direction:"ltr",global:{padding:{top:0,right:0,bottom:0,left:0}}}),void 0===n&&(n=[]),this.structures=e,this.general=t,this.customFonts=n},Re=function(e){function t(t){var n=void 0===t?{}:t,i=n.structures,o=n.general,r=n.customFonts;return e.call(this,i,o,r)||this}return R(t,e),t}(ze),Ue={description:"The complete AI-generation contract consumed by the Pobuca Email Builder.",type:"object",properties:{general:{$ref:"#/definitions/IGeneralOptions"},structures:{type:"array",items:{$ref:"#/definitions/IStructure"}},customFonts:{type:"array",items:{$ref:"#/definitions/ICustomFont"}}},additionalProperties:!1,definitions:{IGeneralOptions:{description:"Builder{@linkIPBEmail}general options interface.",type:"object",properties:{width:{$ref:"#/definitions/IWidthHeight"},background:{$ref:"#/definitions/IBackground"},padding:{$ref:"#/definitions/IPadding"},direction:{$ref:"#/definitions/TDirection"},name:{type:"string"},previewText:{type:"string"},global:{type:"object",properties:{fonts:{type:"array",items:{type:"string"}},padding:{$ref:"#/definitions/IPadding"}},additionalProperties:!1,required:["fonts","padding"]}},additionalProperties:!1,required:["width","background","padding","direction","name","previewText","global"]},IWidthHeight:{description:"Builder Width and Height styles interface.",type:"object",properties:{value:{type:"number"},unit:{$ref:"#/definitions/TUnits",description:"Width and Height unit type."},auto:{type:"boolean"},units:{type:"array",items:{$ref:"#/definitions/TUnits",description:"Builder units types."},uniqueItems:!0}},additionalProperties:!1,required:["value","unit","auto","units"]},TUnits:{description:"Builder units types.",enum:["%","contain","cover","px"],type:"string"},IBackground:{description:"Builder background styles interface.",type:"object",properties:{color:{type:"string"},url:{type:"string"},repeat:{$ref:"#/definitions/TBackgroundRepeat"},size:{$ref:"#/definitions/IWidthHeight"}},additionalProperties:!1,required:["color","url","repeat","size"]},TBackgroundRepeat:{description:"Builder background-repeat types.",enum:["no-repeat","repeat","repeat-x","repeat-y"],type:"string"},IPadding:{description:"Builder padding styles interface.",type:"object",properties:{top:{type:"number"},right:{type:"number"},bottom:{type:"number"},left:{type:"number"}},additionalProperties:!1,required:["top","right","bottom","left"]},TDirection:{description:"Builder direction types.",enum:["ltr","rtl"],type:"string"},IStructure:{description:"Builder structure interface.",type:"object",properties:{type:{$ref:"#/definitions/TStructureTypes"},id:{type:"number"},isModule:{description:"If it's module, it can't be edited within email body.",type:"boolean"},options:{$ref:"#/definitions/IStructureOptions"},elements:{type:"array",items:{type:"array",items:{oneOf:[{$ref:"#/definitions/TextBlock"},{$ref:"#/definitions/ImageBlock"},{$ref:"#/definitions/VideoBlock"},{$ref:"#/definitions/ButtonBlock"},{$ref:"#/definitions/DividerBlock"},{$ref:"#/definitions/SpacerBlock"},{$ref:"#/definitions/SocialBlock"}]}}},columns:{type:"number"}},additionalProperties:!1,required:["type","id","isModule","options","elements","columns"],allOf:[{oneOf:[{properties:{type:{const:"cols_1"},columns:{const:1},elements:{minItems:1,maxItems:1},options:{properties:{columns:{minItems:1,maxItems:1},columnsWidth:{minItems:1,maxItems:1}}}}},{properties:{type:{const:"cols_2"},columns:{const:2},elements:{minItems:2,maxItems:2},options:{properties:{columns:{minItems:2,maxItems:2},columnsWidth:{minItems:2,maxItems:2}}}}},{properties:{type:{const:"cols_3"},columns:{const:3},elements:{minItems:3,maxItems:3},options:{properties:{columns:{minItems:3,maxItems:3},columnsWidth:{minItems:3,maxItems:3}}}}},{properties:{type:{const:"cols_4"},columns:{const:4},elements:{minItems:4,maxItems:4},options:{properties:{columns:{minItems:4,maxItems:4},columnsWidth:{minItems:4,maxItems:4}}}}},{properties:{type:{const:"cols_12"},columns:{const:2},elements:{minItems:2,maxItems:2},options:{properties:{columns:{minItems:2,maxItems:2},columnsWidth:{minItems:2,maxItems:2}}}}},{properties:{type:{const:"cols_21"},columns:{const:2},elements:{minItems:2,maxItems:2},options:{properties:{columns:{minItems:2,maxItems:2},columnsWidth:{minItems:2,maxItems:2}}}}}]}]},TStructureTypes:{description:"Builder structure types.",enum:["cols_1","cols_12","cols_2","cols_21","cols_3","cols_4"],type:"string"},IStructureOptions:{description:"Builder structure styles interface.",type:"object",properties:{border:{$ref:"#/definitions/IBorder"},background:{$ref:"#/definitions/IBackground"},padding:{$ref:"#/definitions/IPadding"},margin:{$ref:"#/definitions/IMargin"},disableResponsive:{description:"Disable responsive for entire structure",type:"boolean"},fullWidth:{description:"Mame section full width",type:"boolean"},gaps:{description:"Mind the GAPS! Gaps between structure's columns.",type:"array",items:[{type:"number"},{type:"number"}],minItems:2,maxItems:2},columnsWidth:{type:"array",items:{type:"number",exclusiveMinimum:0}},columns:{type:"array",items:{$ref:"#/definitions/IStructureColumnOptions"}}},additionalProperties:!1,required:["border","background","padding","margin","disableResponsive","fullWidth","gaps","columnsWidth","columns"]},IBorder:{description:"Builder border styles interface.",type:"object",properties:{color:{type:"string"},style:{description:"Border style.",enum:["dashed","dotted","double","groove","solid"],type:"string"},width:{description:"Border width",type:"number"},radius:{description:"Border radius",type:"number"}},additionalProperties:!1,required:["color","style","width","radius"]},IMargin:{description:"Builder margin styles interface.",type:"object",properties:{top:{type:"number"},bottom:{type:"number"}},additionalProperties:!1,required:["top","bottom"]},IStructureColumnOptions:{description:"Builder structure columns' styles interface.",type:"object",properties:{background:{$ref:"#/definitions/IBackground"},border:{$ref:"#/definitions/IBorder"},verticalAlign:{$ref:"#/definitions/TVerticalAlign"}},additionalProperties:!1,required:["background","border","verticalAlign"]},TVerticalAlign:{description:"Builder vertical align types.",enum:["bottom","middle","top"],type:"string"},TextBlock:{type:"object",properties:{id:{type:"string"},type:{type:"string",enum:["text"]},icon:{type:"string",enum:["text_format"]},options:{$ref:"#/definitions/ITextBlockOptions"},title:{type:"string"},innerText:{type:"string"},state:{$ref:"#/definitions/IBlockState"}},additionalProperties:!1,required:["id","type","icon","options","title","innerText","state"]},ITextBlockOptions:{description:"Builder{@linkTextElementComponent}options interface.",type:"object",properties:{color:{type:"string"},font:{$ref:"#/definitions/IFont"},lineHeight:{$ref:"#/definitions/ILineHeight"},padding:{$ref:"#/definitions/IPadding"}},additionalProperties:!1,required:["color","font","lineHeight","padding"]},IFont:{description:"Builder font styles interface.",type:"object",properties:{family:{type:"string"},fallback:{type:"string"},size:{type:"number"},style:{$ref:"#/definitions/TFontStyle"},weight:{description:"Builder font weight types.",anyOf:[{enum:["bold","bolder","inherit","initial","light","normal"],type:"string"},{type:"number"}]}},additionalProperties:!1,required:["family","fallback","size","style","weight"]},TFontStyle:{description:"Builder font style types.",enum:["italic","normal","oblique"],type:"string"},ILineHeight:{description:"Builder line-height styles interface.",type:"object",properties:{value:{type:"number"},unit:{$ref:"#/definitions/TLineHeight"}},additionalProperties:!1,required:["value","unit"]},TLineHeight:{description:"Builder Line-height types.",enum:["%","none","px"],type:"string"},IBlockState:{description:"Builder block state interface. If `disabled: true` it can't be dragged from left sidebar.",type:"object",properties:{disabled:{type:"boolean"},message:{description:"Show a message in case it's disabled.",type:"string"}},additionalProperties:!1,required:["disabled","message"]},ImageBlock:{type:"object",properties:{id:{type:"string"},type:{type:"string",enum:["image"]},icon:{type:"string",enum:["image"]},options:{$ref:"#/definitions/IImageBLockOptions"},title:{type:"string"},src:{type:"string"},state:{$ref:"#/definitions/IBlockState"}},additionalProperties:!1,required:["id","type","icon","options","title","src","state"]},IImageBLockOptions:{description:"Builder{@linkImageComponent}options interface.",type:"object",properties:{border:{$ref:"#/definitions/IBorder"},width:{$ref:"#/definitions/IWidthHeight"},height:{$ref:"#/definitions/IWidthHeight"},link:{$ref:"#/definitions/ILink"},align:{$ref:"#/definitions/TAlign"},title:{type:"string"},padding:{$ref:"#/definitions/IPadding"}},additionalProperties:!1,required:["border","width","height","link","align","title","padding"]},ILink:{description:"Builder link styles interface.",type:"object",properties:{href:{type:"string"},target:{$ref:"#/definitions/TLinkTarget"}},additionalProperties:!1,required:["href","target"]},TLinkTarget:{description:"Builder Link target.",enum:["_blank","_parent","_self","_top"],type:"string"},TAlign:{description:"Builder align types.",enum:["center","left","right"],type:"string"},VideoBlock:{type:"object",properties:{id:{type:"string"},type:{type:"string",enum:["video"]},icon:{type:"string",enum:["videocam"]},options:{$ref:"#/definitions/IVideoBlockOptions"},title:{type:"string"},src:{type:"string"},posterSrc:{type:"string"},state:{$ref:"#/definitions/IBlockState"}},additionalProperties:!1,required:["id","type","icon","options","title","src","posterSrc","state"]},IVideoBlockOptions:{description:"Builder{@linkVideoComponent}options interface.",type:"object",properties:{border:{$ref:"#/definitions/IBorder"},width:{$ref:"#/definitions/IWidthHeight"},height:{$ref:"#/definitions/IWidthHeight"},link:{$ref:"#/definitions/ILink"},align:{$ref:"#/definitions/TAlign"},title:{type:"string"},padding:{$ref:"#/definitions/IPadding"}},additionalProperties:!1,required:["border","width","height","link","align","title","padding"]},ButtonBlock:{type:"object",properties:{id:{type:"string"},type:{type:"string",enum:["button"]},icon:{type:"string",enum:["radio_button_checked"]},options:{$ref:"#/definitions/IButtonBlockOptions"},title:{type:"string"},innerText:{type:"string"},state:{$ref:"#/definitions/IBlockState"}},additionalProperties:!1,required:["id","type","icon","options","title","innerText","state"]},IButtonBlockOptions:{description:"Builder{@linkButtonComponent}options interface.",type:"object",properties:{backgroundColor:{type:"string"},border:{$ref:"#/definitions/IBorder"},color:{type:"string"},font:{$ref:"#/definitions/IFont"},align:{$ref:"#/definitions/TAlign"},fullWidth:{type:"boolean"},lineHeight:{$ref:"#/definitions/ILineHeight"},link:{$ref:"#/definitions/ILink"},innerPadding:{$ref:"#/definitions/IPadding"},padding:{$ref:"#/definitions/IPadding"}},additionalProperties:!1,required:["backgroundColor","border","color","font","align","fullWidth","lineHeight","link","innerPadding","padding"]},DividerBlock:{type:"object",properties:{id:{type:"string"},type:{type:"string",enum:["divider"]},icon:{type:"string",enum:["remove"]},options:{$ref:"#/definitions/IDividerBlockOptions"},title:{type:"string"},state:{$ref:"#/definitions/IBlockState"}},additionalProperties:!1,required:["id","type","icon","options","title","state"]},IDividerBlockOptions:{description:"Builder{@linkDividerComponent}options interface.",type:"object",properties:{border:{$ref:"#/definitions/IBorder"},padding:{$ref:"#/definitions/IPadding"}},additionalProperties:!1,required:["border","padding"]},SpacerBlock:{type:"object",properties:{id:{type:"string"},type:{type:"string",enum:["spacer"]},icon:{type:"string",enum:["vertical_align_center"]},title:{type:"string"},options:{$ref:"#/definitions/ISpacerBlockOptions"},state:{$ref:"#/definitions/IBlockState"}},additionalProperties:!1,required:["id","type","icon","title","options","state"]},ISpacerBlockOptions:{description:"Builder{@linkSpacerComponent}options interface.",type:"object",properties:{height:{$ref:"#/definitions/IWidthHeight"},width:{$ref:"#/definitions/IWidthHeight"}},additionalProperties:!1,required:["height","width"]},SocialBlock:{type:"object",properties:{id:{type:"string"},type:{type:"string",enum:["social"]},icon:{type:"string",enum:["share"]},title:{type:"string"},options:{$ref:"#/definitions/ISocialBlockOptions"},networks:{type:"array",items:{$ref:"#/definitions/ISocialNetwork"}},state:{$ref:"#/definitions/IBlockState"}},additionalProperties:!1,required:["id","type","icon","title","options","networks","state"]},ISocialBlockOptions:{description:"Builder{@linkSocialComponent}options interface.",type:"object",properties:{align:{$ref:"#/definitions/TAlign"},mode:{enum:["horizontal","vertical"],type:"string"},font:{$ref:"#/definitions/IFont"},iconSize:{$ref:"#/definitions/ILineHeight"},lineHeight:{$ref:"#/definitions/ILineHeight"},color:{type:"string"},innerPadding:{$ref:"#/definitions/IPadding"},padding:{$ref:"#/definitions/IPadding"}},additionalProperties:!1,required:["align","mode","font","iconSize","lineHeight","color","innerPadding","padding"]},ISocialNetwork:{description:"Builder{@linkSocialComponent}network options interface.",type:"object",properties:{href:{type:"string"},label:{type:"string"},name:{enum:["dribbble","facebook","github","instagram","linkedin","medium","pinterest","snapchat","soundcloud","tiktok","tumblr","twitter","vimeo","web","xing","youtube"],type:"string"},padding:{$ref:"#/definitions/IPadding"}},additionalProperties:!1,required:["href","label","name","padding"]},ICustomFont:{description:"Custom font interface",type:"object",properties:{family:{type:"string"},url:{type:"string"}},additionalProperties:!1,required:["family","url"]}},$schema:"http://json-schema.org/draft-07/schema#",title:"Pobuca Email Template",required:["general","structures","customFonts"]},He=function(){function e(){}return e.prototype.createHTMLTemplate=function(e){return re(e)},e.prototype.togglePreview=function(e){return re(e)},e.prototype.togglePreviewDevice=function(e){return re(e.value)},e.prototype.chooseTemplate=function(e,t){return re({category:e,template:t})},e.prototype.uploadImage=function(e){return re(e)},e.prototype.addBlock=function(e,t){return re({event:e,column:t})},e.prototype.editBlock=function(e){return re(e)},e.prototype.removeBlock=function(e,t,n){return re({index:e,column:t})},e.prototype.duplicateBlock=function(e,t,n){return re({index:e,column:t,block:n})},e.prototype.disableBlockDragFromList=function(e){return re(!1)},e.prototype.disableBlockDragWithinEmailBody=function(e){return re(!1)},e.prototype.addStructure=function(e){return re(e)},e.prototype.editStructure=function(e){return re(e)},e.prototype.removeStructure=function(e,t){return re(e)},e.prototype.duplicateStructure=function(e,t){return re(e)},e.prototype.disableStructureDragFromList=function(e){return re(!1)},e.prototype.disableStructureDragWithinEmailBody=function(e){return re(!1)},e.prototype.preventWindowExit=function(e){return re(e)},e.prototype.exportFile=function(e){return re(e)},e.prototype.importFile=function(e){return re(e)},e.prototype.catchError=function(e){return re(e)},e}();He.decorators=[{type:t.Injectable}];var Ne="https://ngb-api.wlocalhost.org/v1",Ge=function(){function e(e){this.http=e,this.getAllUserMergeFields$=re([]),this.getAllUserModules$=re([]),this.getAllUserTemplates$=this.http.get(Ne.concat("/templates")).pipe(i.map((function(e){return e.map((function(e){var t=e.category,n=e.templates;return{category:t,templates:n.map((function(e){return{thumbPath:"https://ngb-templates.s3.amazonaws.com/"+t+"-"+e+".jpg",title:e,templateData:null}}))}}))})),i.shareReplay())}return e.prototype.getUserTemplateData$=function(e,t){return t.templateData?re(t):this.http.get(Ne.concat("/templates"),{params:{category:e,template:t.title}}).pipe(i.map((function(e){return Object.assign(Object.assign({},t),{templateData:e})})))},e.prototype.userImageUpload$=function(e,t){return this.http.request("POST",t,{body:e,reportProgress:!0,responseType:"json",observe:"events"})},e.prototype.getUserImages$=function(){return re([])},e.prototype.userImageUploadBase64$=function(e,t){return this.http.post("",{folderPath:t,imageBase64:e})},e.prototype.createHTMLTemplate$=function(e,t){return void 0===t&&(t=Ne),this.http.post(t,e)},e}();Ge.decorators=[{type:t.Injectable}],Ge.ctorParameters=function(){return[{type:r.HttpClient}]};var Ve=function(){function t(e){this.templateStorage=e}return t.prototype.getLatestUsedTemplates=function(){return JSON.parse(this.templateStorage.getItem(e.ETemplatesStorage.LATEST_USED))||[]},t.prototype.addTemplateToLatestUsed=function(t){var n=this.getLatestUsedTemplates().filter((function(e){return e.title!==t.title}));n.unshift(t),this.templateStorage.setItem(e.ETemplatesStorage.LATEST_USED,JSON.stringify(n))},t.prototype.clearLatestUsed=function(){this.templateStorage.removeItem(e.ETemplatesStorage.LATEST_USED)},t.prototype.cacheTemplateList=function(t){this.templateStorage.setItem(e.ETemplatesStorage.STORAGE,JSON.stringify(t))},t.prototype.getCachedTemplateList=function(){return JSON.parse(this.templateStorage.getItem(e.ETemplatesStorage.STORAGE))||[]},t.prototype.clearCachedTemplateList=function(){this.templateStorage.removeItem(e.ETemplatesStorage.STORAGE)},t}();Ve.decorators=[{type:t.Injectable}],Ve.ctorParameters=function(){return[{type:Storage,decorators:[{type:t.Inject,args:[Ae]}]}]};var We=function(){function e(){this.historyStack=[],this.currentIndex=-1,this.maxHistorySize=50,this._canUndo$=new n.BehaviorSubject(!1),this._canRedo$=new n.BehaviorSubject(!1),this.canUndo$=this._canUndo$.asObservable(),this.canRedo$=this._canRedo$.asObservable()}return e.prototype.addState=function(e){if(e){var t=Y(e);this.currentIndex<this.historyStack.length-1&&(this.historyStack=this.historyStack.slice(0,this.currentIndex+1)),this.historyStack.push(t),this.currentIndex++,this.historyStack.length>this.maxHistorySize&&(this.historyStack.shift(),this.currentIndex--),this.updateUndoRedoStatus()}},e.prototype.undo=function(){return this.canUndoNow()?(this.currentIndex--,this.updateUndoRedoStatus(),Y(this.historyStack[this.currentIndex])):null},e.prototype.redo=function(){return this.canRedoNow()?(this.currentIndex++,this.updateUndoRedoStatus(),Y(this.historyStack[this.currentIndex])):null},e.prototype.canUndoNow=function(){return this.currentIndex>0},e.prototype.canRedoNow=function(){return this.currentIndex<this.historyStack.length-1},e.prototype.clear=function(){this.historyStack=[],this.currentIndex=-1,this.updateUndoRedoStatus()},e.prototype.getHistorySize=function(){return this.historyStack.length},e.prototype.getCurrentIndex=function(){return this.currentIndex},e.prototype.updateUndoRedoStatus=function(){this._canUndo$.next(this.canUndoNow()),this._canRedo$.next(this.canRedoNow())},e}();We.ɵprov=F.ɵɵdefineInjectable({factory:function(){return new We},token:We,providedIn:"any"}),We.decorators=[{type:t.Injectable,args:[{providedIn:"any"}]}],We.ctorParameters=function(){return[]};var Ye=function(){function e(e,t,o,r,a,l){var s=this;this.userRestApi=e,this.pbStorage=t,this.userMiddleware=o,this.history=r,this.googleFonts=a,this.config=l,this.Email=new Re,this.clonedEmail=Y(this.Email),this._Email$=new n.BehaviorSubject(this.Email),this.emailAsObservable$=this._Email$.asObservable(),this.emailStructuresAsObservable$=this.emailAsObservable$.pipe(i.pluck("structures")),this.generalEmailOptionsAsObservable$=this.emailAsObservable$.pipe(i.pluck("general")),this.currentEmailHasChanges$=this.emailAsObservable$.pipe(i.map((function(e){return!K(e,s.clonedEmail)}))),this.builderContainerStyles$=this.generalEmailOptionsAsObservable$.pipe(i.map((function(e){var t=e.background,n=e.padding,i=e.direction;return Object.assign({direction:i,backgroundRepeat:t.repeat,backgroundColor:t.color,backgroundSize:ne(t.size),backgroundPosition:"top center"},Z(n))}))),this._Mjml$=new n.BehaviorSubject(""),this.mjmlAsObservable$=this._Mjml$.asObservable(),this._Template$=new n.BehaviorSubject(""),this.templateAsObservable$=this._Template$.asObservable(),this._onTemplateCreated$=new n.Subject,this.onTemplateCreated$=this._onTemplateCreated$.pipe(i.withLatestFrom(this._Email$,this._Template$,this._Mjml$),i.map((function(e){var t=G(e);t[0];return t.slice(1)}))),this.canUndo$=this.history.canUndo$,this.canRedo$=this.history.canRedo$}return Object.defineProperty(e.prototype,"defaultTemplateThumbPath",{get:function(){var e,t;return(null===(t=null===(e=this.config)||void 0===e?void 0:e.apiPath)||void 0===t?void 0:t.replace(/\/+$/,""))+"/images/placeholders/image-placeholder.png"},enumerable:!1,configurable:!0}),e.prototype.assignBlockIds=function(e,t){void 0===t&&(t=!1),e.forEach((function(e){return e.elements.forEach((function(e){return e.forEach((function(e){return Ie(e,t)}))}))}))},e.prototype.createHTMLTemplate$=function(){var e=this;return this.emailAsObservable$.pipe(i.switchMap((function(e){if(!e.structures.length)throw new Error("Please add some structures and blocks to perform this action.");return re(e)})),i.withLatestFrom(n.combineLatest([this.currentEmailHasChanges$,this.templateAsObservable$])),i.exhaustMap((function(t){var o=G(t,2),r=o[0],a=G(o[1],2),l=a[0],s=a[1];return l||!s?e.userMiddleware.createHTMLTemplate(r).pipe(i.exhaustMap((function(t){return e.userRestApi.createHTMLTemplate$(Object.assign(Object.assign({},t),{googleFonts:e.googleFonts}),e.config.apiPath)})),i.map((function(t){if(t.errors.length){var n=t.errors.map((function(e){var t=e.message;return e.tagName+" > "+t})).join("\n");throw new Error(n)}if(r.customFonts&&r.customFonts.length){var i=r.customFonts.filter((function(e){return e.url})).map((function(e){return'<link href="'+e.url+'" rel="stylesheet" type="text/css">'})).join("\n");i&&t.html.includes("</head>")&&(t.html=t.html.replace("</head>",i+"\n</head>"))}return e._Mjml$.next(t.mjml),e._Template$.next(t.html),e.clonedEmail=Y(e.Email),e._onTemplateCreated$.next(),t}))):n.combineLatest([e._Mjml$,e._Template$]).pipe(i.map((function(e){var t=G(e,2),n=t[0];return{html:t[1],mjml:n,errors:[]}})))})))},e.prototype.markForCheck=function(){this._Email$.next(this.Email),this.history.addState(this.Email),this.Email.structures.length&&this.pbStorage.addTemplateToLatestUsed(Y({templateData:this.Email,title:"last-edited",thumbPath:this.defaultTemplateThumbPath}))},e.prototype.setEmail=function(e){if(!e.structures||!e.general)throw new Error("Injected object is not a valid PBEmail");this.assignBlockIds(e.structures),this.Email=e,this.reset()},e.prototype.addStructure=function(e){var t=e.currentIndex,n=void 0===t?0:t,i=e.item,o=this.Email.structures,r=void 0===o?[]:o,a=!0;i.data.elements.length||(a=!1,i.data.elements=Array.from({length:i.data.columns},(function(){return[]})));var l=Object.assign(Object.assign({id:Date.now()},Y(i.data)),{isModule:a});return this.assignBlockIds([l],!0),r.splice(n,0,l),this.markForCheck(),l},e.prototype.changeStructureOrder=function(e){var t=e.previousIndex,n=void 0===t?0:t,i=e.currentIndex,r=void 0===i?0:i;o.moveItemInArray(this.Email.structures,n,r),this.markForCheck()},e.prototype.duplicateStructure=function(e){var t=this.Email.structures,n=void 0===t?[]:t,i=Y(Object.assign(Object.assign({},n[e]),{id:Date.now()}));return this.assignBlockIds([i],!0),n.splice(e,0,i),this.markForCheck(),i},e.prototype.removeStructure=function(e){var t=this.Email.structures;(void 0===t?[]:t).splice(e,1),this.markForCheck()},e.prototype.addBlock=function(e,t){var n=e.previousIndex,i=void 0===n?0:n,r=e.currentIndex,a=void 0===r?0:r,l=e.item,s=e.previousContainer,c=s.id,p=s.data;if("block-elements"===c){var u=Y(l.data);Ie(u,!0),t.splice(a,0,u)}else o.transferArrayItem(p,t,i,a);this.markForCheck()},e.prototype.changeBlockOrder=function(e,t){var n=e.previousIndex,i=void 0===n?0:n,r=e.currentIndex,a=void 0===r?0:r;o.moveItemInArray(t,i,a),this.markForCheck()},e.prototype.duplicateBlock=function(e,t,n){var i=Y(n);return Ie(i,!0),t.splice(e,0,i),this.markForCheck(),i},e.prototype.removeBlock=function(e,t){t.splice(e,1),this.markForCheck()},e.prototype.reset=function(){this._Mjml$.next(null),this._Template$.next(null),this.clonedEmail=Y(this.Email),this.markForCheck()},e.prototype.undo=function(){var e=this.history.undo();return!!e&&(this.Email=e,this._Email$.next(this.Email),this._Template$.next(null),this._Mjml$.next(null),!0)},e.prototype.redo=function(){var e=this.history.redo();return!!e&&(this.Email=e,this._Email$.next(this.Email),this._Template$.next(null),this._Mjml$.next(null),!0)},e}();Ye.ɵprov=F.ɵɵdefineInjectable({factory:function(){return new Ye(F.ɵɵinject(Ge),F.ɵɵinject(Ve),F.ɵɵinject(He),F.ɵɵinject(We),F.ɵɵinject(Te),F.ɵɵinject(Le))},token:Ye,providedIn:"root"}),Ye.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Ye.ctorParameters=function(){return[{type:Ge},{type:Ve},{type:He},{type:We},{type:Array,decorators:[{type:t.Inject,args:[Te]}]},{type:void 0,decorators:[{type:t.Inject,args:[Le]}]}]};var Ke=function(){function e(e,t){var o=this;this.matDialogRef=e,this.templateList=t,this.chooseCategory$=new n.BehaviorSubject("latest"),this.currentCategoryTemplates$=this.chooseCategory$.pipe(i.map((function(e){return o.templateList.find((function(t){return t.category===e}))||{templates:[]}})),i.pluck("templates"),i.map((function(e){return e.length>0?e:null})))}return e.prototype.chooseTemplate=function(e){this.csdTemplate=e},e.prototype.chageCategory=function(e){this.chooseCategory$.next(e)},e.prototype.getTemplatesList=function(){return this.templateList.filter((function(e){return"latest"!==e.category}))},e.prototype.startBuilding=function(){var e=this;this.chooseCategory$.pipe(i.take(1)).subscribe((function(t){e.matDialogRef.close({category:t,template:e.csdTemplate})}))},e}();Ke.decorators=[{type:t.Component,args:[{selector:"pb-template-list-dialog",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<div fxLayout="column" style="height: 100%;">\n <h2 mat-dialog-title i18n="templates|Modal template header">Custom Templates</h2>\n <div class="mat-typography template-list-wrapper" fxLayout fxLayoutGap="1rem" fxFlex>\n <mat-list fxFlex="200px" dense>\n <mat-list-item (click)="chageCategory(\'latest\')" [ngClass]="{active: (chooseCategory$ | async) === \'latest\'}"\n i18n="templates|category name">\n Latest\n </mat-list-item>\n <mat-divider></mat-divider>\n <mat-list-item *ngFor="let list of getTemplatesList()" (click)="chageCategory(list.category)"\n [ngClass]="{active: (chooseCategory$ | async) === list.category}" i18n="templates|category name">\n {{list.category}}\n </mat-list-item>\n </mat-list>\n\n <ng-container *ngIf="currentCategoryTemplates$ | async as templates;else emptyCategory">\n <cdk-virtual-scroll-viewport itemSize="150" [maxBufferPx]="150" fxFlex>\n <div class="template-list">\n <div *cdkVirtualFor="let template of templates" class="template-list-item" (click)="chooseTemplate(template)"\n i18n-matTooltip="templates|Click to choose message" matTooltip="Click to choose">\n <img [src]="template.thumbPath" [alt]="template.title" />\n <div class="description">\n <h3>{{template.title}}</h3>\n </div>\n </div>\n </div>\n </cdk-virtual-scroll-viewport>\n </ng-container>\n </div>\n <mat-dialog-actions align="end">\n <button mat-button mat-dialog-close i18n="actions|Undo">Undo</button>\n <button mat-button (click)="startBuilding()" [disabled]="!csdTemplate" i18n="actions|Start">\n Start\n </button>\n </mat-dialog-actions>\n</div>\n\n\n<ng-template #emptyCategory>\n <div fxFlex fxLayout="column" fxLayoutAlign="center center" class="empty-category-notification">\n <mat-icon>notifications</mat-icon>\n <h2 i18n="templates|No templates in current category message">This category is empty!</h2>\n </div>\n</ng-template>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */:host{display:block;height:inherit}.template-list-wrapper mat-list{position:sticky;top:0}.template-list-wrapper mat-list mat-list-item{text-transform:capitalize;cursor:pointer;border-radius:3px;transition:all .3s linear}.template-list-wrapper mat-list mat-list-item.active,.template-list-wrapper mat-list mat-list-item:hover{background-color:#f3f3f3}.template-list-wrapper .template-list{display:grid;gap:1rem;grid-template:150px/repeat(3,1fr)}@media screen and (max-width:699px){.template-list-wrapper .template-list{grid-template:150px/repeat(2,1fr)}}.template-list-wrapper .template-list-item{border-radius:3px;overflow:hidden;border:1px solid #ccc;padding:.5rem;position:relative;background-color:#f3f3f3}.template-list-wrapper .template-list-item img{-o-object-fit:cover;object-fit:cover;-o-object-position:top;object-position:top;height:calc(200px - 1rem);width:100%;cursor:pointer;animation:objectPosition 3s linear infinite alternate;animation-play-state:paused}.template-list-wrapper .template-list-item .description{position:absolute;bottom:0;right:0;left:0;background-color:#fff;padding:.5rem;opacity:1;transition:all .3s linear;text-transform:capitalize}.template-list-wrapper .template-list-item .description h3{margin:0}.template-list-wrapper .template-list-item:hover img{animation-play-state:running}.template-list-wrapper .template-list-item:hover .description{bottom:-44px;opacity:.6}.empty-category-notification mat-icon{height:50px;width:50px;font-size:50px}.empty-category-notification h2{text-transform:uppercase}@keyframes objectPosition{to{-o-object-position:bottom;object-position:bottom}}"]}]}],Ke.ctorParameters=function(){return[{type:l.MatDialogRef},{type:Array,decorators:[{type:t.Inject,args:[l.MAT_DIALOG_DATA]}]}]};var Je=function(e,t){this.dialogRef=e,this.data=t};Je.decorators=[{type:t.Component,args:[{selector:"pb-confirm-dialog",template:'\n <h2 mat-dialog-title>Are you sure?</h2>\n <mat-dialog-actions fxLayout fxLayoutAlign="space-between center" fxLayoutGap="1rem">\n <button mat-stroked-button mat-dialog-close="0">No</button>\n <button mat-stroked-button color="warn" mat-dialog-close="1">Yes</button>\n </mat-dialog-actions>\n '}]}],Je.ctorParameters=function(){return[{type:l.MatDialogRef},{type:void 0,decorators:[{type:t.Inject,args:[l.MAT_DIALOG_DATA]}]}]};var Qe=function(){function e(e,t){this.pbMiddlewares=e,this.bottomSheetRef=t,this.importing=!1,this.fileReader=new FileReader}return e.prototype.openBrowserModal=function(e){e.preventDefault(),this.uploadInput.nativeElement.click()},e.prototype.startImporting=function(){var e=this;this.importing=!0,this.pbMiddlewares.importFile(this.uploadInput.nativeElement.files.item(0)).pipe(i.take(1),i.catchError((function(t){return e.pbMiddlewares.catchError(t).pipe(i.switchMap((function(){return e.bottomSheetRef.dismiss(t),n.EMPTY})))}))).subscribe((function(t){e.fileReader.readAsText(t,"utf-8")}))},e.prototype.ngOnInit=function(){var e=this;this.fileReader.addEventListener("loadend",(function(){e.importing=!1;try{var t=JSON.parse(e.fileReader.result);e.bottomSheetRef.dismiss(t)}catch(t){throw e.bottomSheetRef.dismiss(null),new Error(t)}}))},e.prototype.ngOnDestroy=function(){},e}();Qe.decorators=[{type:t.Component,args:[{selector:"pb-import-dialog",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<mat-nav-list>\n <mat-list-item (click)="openBrowserModal($event)">\n <div *ngIf="!importing">\n <span mat-line i18n="import|Import JSON file">Import JSON file</span>\n </div>\n <ng-container *ngIf="importing">\n <span mat-line i18n="import|Importing in progress">Importing in progress ...</span>\n \x3c!-- <span mat-line>{{ imageInfo }}</span> --\x3e\n </ng-container>\n </mat-list-item>\n <mat-progress-bar *ngIf="importing" mode="buffer" value="100"></mat-progress-bar>\n</mat-nav-list>\n<input type="file" accept="application/json" fxHide #uploadInput (change)="startImporting()" />\n',styles:["/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */"]}]}],Qe.ctorParameters=function(){return[{type:He},{type:s.MatBottomSheetRef}]},Qe.propDecorators={uploadInput:[{type:t.ViewChild,args:["uploadInput",{read:t.ElementRef,static:!0}]}]};var Ze=function(){function e(e,t,o,r){var a=this;this.emailObjectStore=e,this.matDialog=t,this.bottomSheet=o,this.snackBar=r,this.activeMatProgress$=new n.ReplaySubject,this.cdkDropListConnectedTo$=this.emailObjectStore.emailStructuresAsObservable$.pipe(i.map((function(e){return e.reduce((function(e,t,n){var i=t.elements;return e.push.apply(e,V(i.map((function(e,t){return"column-droplist-"+t+"-"+n})))),e}),[])})),i.distinct(),i.distinctUntilKeyChanged("length"),i.shareReplay()),this._currentEditingStructure$=new n.BehaviorSubject(null),this.currentEditingStructure$=this._currentEditingStructure$.pipe(i.subscribeOn(n.animationFrameScheduler),i.distinctUntilChanged(),i.catchError((function(){return n.of(null)})),i.shareReplay()),this._currentEditingBlock$=new n.BehaviorSubject(null),this.currentEditingBlock$=this._currentEditingBlock$.pipe(i.subscribeOn(n.animationFrameScheduler),i.distinctUntilChanged(),i.catchError((function(){return n.of(null)})),i.shareReplay()),this._blockHighlight$=new n.BehaviorSubject(null),this.blockHighlight$=this._blockHighlight$.asObservable(),this._editGeneralSettings$=new n.Subject,this.editGeneralSettings$=this._editGeneralSettings$.pipe(i.subscribeOn(n.animationFrameScheduler),i.tap((function(){return a.changeTabIndex(2)})),i.distinctUntilChanged(),i.shareReplay()),this._currentTabIndex$=new n.BehaviorSubject(0),this.currentTabIndex$=this._currentTabIndex$.pipe(i.subscribeOn(n.animationFrameScheduler),i.distinctUntilChanged())}return e.prototype.editBlock=function(e){this._currentEditingStructure$.next(null),this._currentEditingBlock$.next(e),this._editGeneralSettings$.next("block")},e.prototype.editStructure=function(e){this._currentEditingBlock$.next(null),this._editGeneralSettings$.next("structure"),this._currentEditingStructure$.next(e)},e.prototype.editGeneralSettings=function(){this.resetElements(),this._editGeneralSettings$.next("general")},e.prototype.changeTabIndex=function(e){this._currentTabIndex$.next(e)},e.prototype.highlightBlock=function(e,t){void 0===t&&(t={}),this._blockHighlight$.next({blockId:e,options:t})},e.prototype.clearBlockHighlight=function(){this._blockHighlight$.next(null)},e.prototype.confirmDialog$=function(){return this.matDialog.open(Je).afterClosed().pipe(i.map((function(e){return"1"===e})))},e.prototype.templatesListDialog$=function(e){return this.matDialog.open(Ke,{data:e,width:"60vw",maxWidth:"800px",height:"70vh",maxHeight:"900px"}).afterClosed().pipe(i.filter((function(e){return Boolean(e)})))},e.prototype.importDialog$=function(){return this.bottomSheet.open(Qe,{ariaLabel:"Browse media"}).afterDismissed()},e.prototype.notify=function(e,t,n){return void 0===t&&(t="dismiss"),void 0===n&&(n=3e3),this.snackBar.open(e,t,{duration:n})},e.prototype.currentEditingBlock=function(){return this._currentEditingBlock$.getValue()},e.prototype.currentEditingStructure=function(){return this._currentEditingStructure$.getValue()},e.prototype.currentStructureEqualWith=function(e){return this.currentEditingStructure()===e},e.prototype.currentBlockEqualWith=function(e){return this.currentEditingBlock()===e},e.prototype.currentStructureContainsActiveBlock=function(e){var t=this;return e.elements.some((function(e){return e.some((function(e){return e===t.currentEditingBlock()}))}))},e.prototype.resetElements=function(){this._currentEditingStructure$.next(null),this._currentEditingBlock$.next(null)},e.prototype.reset=function(){this.resetElements(),this.clearBlockHighlight(),this.changeTabIndex(0)},e}();Ze.decorators=[{type:t.Injectable}],Ze.ctorParameters=function(){return[{type:Ye},{type:l.MatDialog},{type:s.MatBottomSheet},{type:a.MatSnackBar}]};var Xe=function(){function e(e,t,n,o){this.config=e,this.emailObjectStore=t,this.pbMiddleWares=n,this.pbUserInterface=o,this.modules=new Set,this.customTemplates=new Set,this._mergeTags=new Set,this.onTemplateCreated$=this.emailObjectStore.onTemplateCreated$.pipe(i.shareReplay()),this.onSave$=this.onTemplateCreated$,this.isLoading=this.pbUserInterface.activeMatProgress$.asObservable(),this.isLoading$=this.pbUserInterface.activeMatProgress$.asObservable(),this.config=Object.assign(Object.assign({},Ee),this.config)}return e.prototype.openCustomSidebarTab=function(){this.pbUserInterface.changeTabIndex(3)},e.prototype.highlightBlock=function(e,t){return void 0===t&&(t={}),!!this.Email.structures.some((function(t){return t.elements.some((function(t){return t.some((function(t){return t.id===e}))}))}))&&(this.pbUserInterface.highlightBlock(e,t),!0)},e.prototype.clearBlockHighlight=function(){this.pbUserInterface.clearBlockHighlight()},e.prototype.createHTMLTemplate$=function(){var e=this;return this.pbUserInterface.activeMatProgress$.next(!0),this.emailObjectStore.createHTMLTemplate$().pipe(i.tap((function(){return e.pbUserInterface.activeMatProgress$.next(!1)})),i.catchError((function(t){return e.pbMiddleWares.catchError(t).pipe(i.switchMap((function(){return e.pbUserInterface.notify(t.message),e.pbUserInterface.activeMatProgress$.next(!1),n.EMPTY})))})),i.finalize((function(){return e.pbUserInterface.activeMatProgress$.next(!1)})))},e.prototype.saveEmail=function(){return this.createHTMLTemplate$()},Object.defineProperty(e.prototype,"Email",{get:function(){return this.emailObjectStore.Email},set:function(e){this.emailObjectStore.setEmail(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Template",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Mjml",{get:function(){return null},enumerable:!1,configurable:!0}),e.prototype.getEmailAsObservable$=function(){return this.emailObjectStore.emailAsObservable$},e.prototype.getTemplateAsObservable$=function(){return this.emailObjectStore.templateAsObservable$},e.prototype.getMjmlAsObservable$=function(){return this.emailObjectStore.mjmlAsObservable$},e.prototype.onChanges$=function(){return this.onTemplateCreated$},e}();Xe.decorators=[{type:t.Injectable}],Xe.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[Le]}]},{type:Ye},{type:He},{type:Ze}]};var et=function(){function e(e,t,i,o,r,a){this.sanitizer=e,this.ngb=t,this.userRestApi=i,this.userInterface=o,this.middlewares=r,this.bottomSheetRef=a,this.uploading=!1,this.progress=new n.Subject}return Object.defineProperty(e.prototype,"imageInfo",{get:function(){if(this.choosedImage){var e=this.choosedImage,t=e.lastModified,n=e.size;return new Date(t).toLocaleString()+", "+ie(n)+"."}return""},enumerable:!1,configurable:!0}),e.prototype.previewLink=function(){return this.sanitizer.bypassSecurityTrustResourceUrl(this.objectUrl)},e.prototype.openBrowserModal=function(e){e.preventDefault();var t=this.ngb.config.uploadImagePath;!this.uploading&&t?this.uploadInput.nativeElement.click():t||this.userInterface.notify("Hm ... this isn't a bug, it seems 'uploadImagePath' is empty!")},e.prototype.uploadInputChanged=function(){var e=this.uploadInput.nativeElement;e.files.length&&this._startUploading(e.files.item(0))},e.prototype._startUploading=function(e){var t=this;this.objectUrl&&URL.revokeObjectURL(this.objectUrl),this.objectUrl=URL.createObjectURL(e),this.uploading=!0;var o=this.ngb.config,a=o.uploadImagePath,l=o.csrf,s=new FormData;return l&&s.append(l.name,l.token),s.append("image",e),this.userRestApi.userImageUpload$(s,a).pipe(i.catchError((function(e){return t.middlewares.catchError(e).pipe(i.switchMap((function(){return t.userInterface.notify(e.message),n.EMPTY})))})),i.finalize((function(){return t.progress.complete()}))).subscribe((function(e){if(e.type===r.HttpEventType.UploadProgress){var n=Math.round(100*e.loaded/e.total);t.progress.next(n)}else e instanceof r.HttpResponse&&(e.body.success?(t.bottomSheetRef.dismiss(e.body.path),t.userInterface.notify("Successfully uploaded.",null,1e3)):t.userInterface.notify(e.body.message,"Dismiss",null))}))},e.prototype.ngOnDestroy=function(){this.objectUrl&&URL.revokeObjectURL(this.objectUrl)},e}();et.decorators=[{type:t.Component,args:[{selector:"pb-upload-bottom-sheet-dialog",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<mat-nav-list>\n <mat-list-item (click)="openBrowserModal($event)">\n <div *ngIf="!uploading">\n <span mat-line i18n="upload|Browse images from computer">Browse images from computer</span>\n </div>\n <ng-container *ngIf="uploading">\n <img matListAvatar [src]="previewLink()" />\n <span mat-line i18n="upload|Uploading Message">Uploading ...</span>\n <span mat-line>{{ imageInfo }}</span>\n </ng-container>\n </mat-list-item>\n <mat-progress-bar *ngIf="uploading" mode="buffer" [value]="progress | async"></mat-progress-bar>\n</mat-nav-list>\n<input type="file" accept="image/*" fxHide #uploadInput (change)="uploadInputChanged()" />\n',styles:[""]}]}],et.ctorParameters=function(){return[{type:c.DomSanitizer},{type:Xe},{type:Ge},{type:Ze},{type:He},{type:s.MatBottomSheetRef}]},et.propDecorators={uploadInput:[{type:t.ViewChild,args:["uploadInput",{static:!0}]}]};var tt=function(){};tt.decorators=[{type:t.Injectable}];var nt=function(e){function t(t,n){var i=e.call(this)||this;return i.matBottomSheet=t,i.userMiddlewaresService=n,i}return R(t,e),t.prototype.browse$=function(){var e=this;return this.matBottomSheet.open(et,{ariaLabel:"Browse media"}).afterDismissed().pipe(i.switchMap((function(t){return e.userMiddlewaresService.uploadImage(t)})))},t}(tt),it=function(){function e(e,t,n,i,o,r,a){this.imageCategoryList=e,this.userConfig=t,this.matDialogRef=n,this.sanitizer=i,this.userRestApi=o,this.middlewares=r,this.userInterface=a,this.currentMenuItem="gallery"}return e.prototype.changeCurrentMenuItem=function(e){this.currentMenuItem=e},e.prototype.addImageToTemplate=function(e){void 0===e&&(e=this.choseImage),this.matDialogRef.close(e)},e.prototype.previewImage=function(e){var t=e.target;this.uploadImageFile=t.files.item(0),this.imagePreviewObjectUrl&&URL.revokeObjectURL(this.imagePreviewObjectUrl),this.imagePreviewObjectUrl=URL.createObjectURL(this.uploadImageFile),this.uploadImagePreview=this.sanitizer.bypassSecurityTrustResourceUrl(this.imagePreviewObjectUrl)},e.prototype.startUploading=function(){var e=this,t=this.userConfig,o=t.csrf,a=t.uploadImagePath,l=new FormData;return o&&l.append(o.name,o.token),l.append("image",this.uploadImageFile),this.userRestApi.userImageUpload$(l,a).pipe(i.catchError((function(t){return e.middlewares.catchError(t).pipe(i.switchMap((function(){return e.userInterface.notify(t.message),n.EMPTY})))}))).subscribe((function(t){t.type===r.HttpEventType.UploadProgress||t instanceof r.HttpResponse&&(t.body.success?(e.addImageToTemplate(t.body.path),e.userInterface.notify("Successfully uploaded.",null,1e3)):e.userInterface.notify(t.body.message,"Dismiss",null))}))},e.prototype.ngOnDestroy=function(){this.imagePreviewObjectUrl&&URL.revokeObjectURL(this.imagePreviewObjectUrl)},e}();it.decorators=[{type:t.Component,args:[{selector:"pb-upload-image-gallery",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<div fxLayout="column" style="height: 100%;">\n <h2 mat-dialog-title i18n="image-gallery|Modal Image gallery header">Image Gallery</h2>\n <div class="mat-typography gallery-list-wrapper" fxLayout fxLayoutGap="1rem" fxFlex>\n <mat-list fxFlex="200px">\n <mat-list-item (click)="changeCurrentMenuItem(\'gallery\')" [class.active]="currentMenuItem === \'gallery\'"\n i18n="image-gallery|Image list">\n Gallery Image list\n </mat-list-item>\n <mat-list-item (click)="changeCurrentMenuItem(\'upload\')" [class.active]="currentMenuItem === \'upload\'"\n i18n="image-gallery|Upload an image">\n Upload an image\n </mat-list-item>\n </mat-list>\n\n <ng-container *ngIf="currentMenuItem === \'gallery\'">\n <ng-container *ngIf="imageCategoryList.length;else emptyImageList">\n <cdk-virtual-scroll-viewport itemSize="150" [minBufferPx]="150 * 10" fxFlex\n class="gallery-list">\n <div *cdkVirtualFor="let imagePath of imageCategoryList" class="gallery-list-item"\n (click)="choseImage = imagePath" i18n-matTooltip="image-gallery|Click to choose message"\n matTooltip="Click to choose">\n <img [src]="imagePath" />\n </div>\n </cdk-virtual-scroll-viewport>\n </ng-container>\n </ng-container>\n <ng-container *ngIf="currentMenuItem === \'upload\'">\n <div class="upload-image" fxLayout="column" fxLayoutAlign="center center" fxFlex fxLayoutGap="1rem">\n <label class="upload-image-item" [class.empty]="!uploadImagePreview">\n <div class="upload-image-item-overview" fxLayout="column" fxLayoutAlign="center center">\n <mat-icon>backup</mat-icon>\n </div>\n <img class="upload-image-item-preview" *ngIf="uploadImagePreview" [src]="uploadImagePreview" />\n <input type="file" fxHide pattern="image/*" (change)="previewImage($event)">\n </label>\n <button mat-flat-button color="primary" (click)="startUploading()" i18n="image-gallery|Upload and insert into template">\n Upload and insert into template\n </button>\n </div>\n </ng-container>\n </div>\n <mat-dialog-actions align="end">\n <button mat-button mat-dialog-close i18n="actions|Undo">Cancel</button>\n <button mat-stroked-button color="primary" [disabled]="!choseImage" (click)="addImageToTemplate()"\n i18n="actions|Start">\n Add to template\n </button>\n </mat-dialog-actions>\n</div>\n\n\n<ng-template #emptyImageList>\n <div fxFlex fxLayout="column" fxLayoutAlign="center center" class="empty-category-notification">\n <mat-icon>notifications</mat-icon>\n <h2 i18n="image-gallery|Image list is empty message">Image list is empty!</h2>\n </div>\n</ng-template>\n',styles:["/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */mat-list{background-color:#fff}mat-list mat-list-item{cursor:pointer}mat-list mat-list-item.active{background-color:#ccc}.gallery-list ::ng-deep .cdk-virtual-scroll-content-wrapper{display:grid;gap:.3rem;grid-template:auto/repeat(4,1fr)}.gallery-list-item{height:120px;background-color:#ccc;cursor:pointer}.gallery-list-item img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center}.upload-image-item{width:80%;height:200px;background-color:#ccc;position:relative;border-radius:3px;padding:1em;text-align:center}.upload-image-item.empty .upload-image-item-overview,.upload-image-item:hover .upload-image-item-overview{opacity:1}.upload-image-item-overview{opacity:0;position:absolute;top:0;bottom:0;left:0;right:0;cursor:pointer;transition:opacity .5s linear}.upload-image-item-overview mat-icon{height:50px;width:50px;font-size:50px}.upload-image-item-preview{max-height:100%}"]}]}],it.ctorParameters=function(){return[{type:Array,decorators:[{type:t.Inject,args:[l.MAT_DIALOG_DATA]}]},{type:void 0,decorators:[{type:t.Inject,args:[Le]}]},{type:l.MatDialogRef},{type:c.DomSanitizer},{type:Ge},{type:He},{type:Ze}]};var ot=function(e){function t(t,n,i){var o=e.call(this)||this;return o.matDialog=t,o.userMiddleware=n,o.userRestApi=i,o}return R(t,e),t.prototype.browse$=function(){var e=this;return this.userRestApi.getUserImages$().pipe(i.exhaustMap((function(t){return e.matDialog.open(it,{data:t,width:"60vw",maxWidth:"800px",height:"60vh",maxHeight:"800px"}).afterClosed()})),i.filter((function(e){return!!e.length})),i.switchMap((function(t){return e.userMiddleware.uploadImage(t)})))},t}(tt),rt=function(){function e(e,t,i,o){this.userInterfaceService=e,this.emailObjectStore=t,this.chRef=i,this.pbMiddlewaresService=o,this.structure=new le,this.cdkDropListConnectedTo$=this.userInterfaceService.cdkDropListConnectedTo$,this.validate=function(e){var t=+(e.rectangle.width/this.fr).toFixed(2);return t>1&&t<=10-this.structure.columns}.bind(this),this.componentIsDestroyed$=new n.Subject}return Object.defineProperty(e.prototype,"isStructureActive",{get:function(){return this.isActive},enumerable:!1,configurable:!0}),e.prototype.onHostClick=function(e){e.stopImmediatePropagation(),this.editStructure()},e.prototype.removeStructure=function(e){var t=this;e.stopPropagation(),this.pbMiddlewaresService.removeStructure(this.index,this.structure).pipe(i.exhaustMap((function(){return t.userInterfaceService.confirmDialog$()})),i.filter((function(e){return e})),i.take(1)).subscribe((function(){t.emailObjectStore.removeStructure(t.index),t.userInterfaceService.resetElements()}))},e.prototype.duplicateStructure=function(e){var t=this;e.stopPropagation(),this.pbMiddlewaresService.duplicateStructure(this.index,this.structure).pipe(i.map((function(){return t.emailObjectStore.duplicateStructure(t.index)})),i.take(1)).subscribe((function(e){t.editStructure(e)}))},e.prototype.dropNewBlock=function(e,t){var n=this;e.previousContainer===e.container?this.emailObjectStore.addBlock(e,t):this.pbMiddlewaresService.addBlock(e,t).pipe(i.map((function(e){return n.emailObjectStore.addBlock(e.event,e.column)}))).subscribe((function(){n.chRef.markForCheck()}))},e.prototype.disableBlockDrag$=function(e){return this.pbMiddlewaresService.disableBlockDragWithinEmailBody(e).pipe(i.take(1))},e.prototype.editStructure=function(e){var t=this;void 0===e&&(e=this.structure),this.pbMiddlewaresService.editStructure(e).pipe(i.take(1)).subscribe((function(e){t.userInterfaceService.editStructure(e)}))},e.prototype.getResizeEdges=function(e){return{right:e+1!==this.structure.columns,left:0!==e}},e.prototype.createColumnId=function(e){return"column-droplist-"+e+"-"+this.index},e.prototype.getColumnStyles=function(e){var t=this.structure.options,n=t.gaps,i=void 0===n?[4,4]:n,o=t.columns,r=(void 0===o?[]:o)[e]||ae,a="center";return"bottom"===r.verticalAlign?a="flex-end":"top"===r.verticalAlign&&(a="flex-start"),Object.assign({padding:i.map((function(e){return e+"px"})).join(" "),backgroundColor:r.background.color,placeSelf:a+" stretch"},Q(r.border))},e.prototype.onResizeEnd=function(e,t){var n=e.rectangle;this.structure.options.columnsWidth[t]=+(n.width/this.fr).toFixed(2)},e.prototype.ngDoCheck=function(){(this.isActive||this.userInterfaceService.currentStructureContainsActiveBlock(this.structure))&&this.chRef.markForCheck()},e.prototype.ngOnInit=function(){var e=this,t=this.structure.options,n=t.columns,o=t.columnsWidth;if(!n||!o){var r=this.structure,a=r.type,l=r.elements,s=r.options;this.editStructure(new le(a,l,s))}var c=this.emailObjectStore.Email.general.width.value,p=G(this.structure.options.gaps,2)[1];this.fr=(c-p*this.structure.columns)/10,this.userInterfaceService.currentEditingStructure$.pipe(i.map((function(t){return t===e.structure})),i.takeUntil(this.componentIsDestroyed$)).subscribe((function(t){e.isActive=t}))},e.prototype.ngOnDestroy=function(){this.componentIsDestroyed$.next(""),this.componentIsDestroyed$.complete()},e}();rt.decorators=[{type:t.Component,args:[{selector:"pb-structure",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<div class="column" *ngFor="let column of structure.elements; let index = index" cdkDropList mwlResizable\n [enableGhostResize]="false" [resizeSnapGrid]="{ left: fr, right: fr }" [resizeEdges]="getResizeEdges(index)"\n [validateResize]="validate" (resizing)="onResizeEnd($event, index)"\n (cdkDropListDropped)="dropNewBlock($event, column)" [class.empty]="!column.length" [ngStyle]="getColumnStyles(index)"\n [cdkDropListConnectedTo]="cdkDropListConnectedTo$ | async" [cdkDropListData]="column" [id]="createColumnId(index)">\n\n <div *ngIf="!column.length" class="empty-block" i18n="structure|Inside empty block">DnD blocks</div>\n\n <pb-block *ngFor="let block of column; let index = index" cdkDrag [cdkDragData]="block" [block]="block"\n [index]="index" [column]="column" [cdkDragDisabled]="disableBlockDrag$(block) | async">\n <button mat-icon-button class="move" cdkDragHandle i18n-matTooltip="block|Change Block order"\n matTooltip="Change Block order" *ngIf="!(disableBlockDrag$(block) | async)">\n <mat-icon i18n-aria-label="block|Move block" aria-label="Move block" inline>pan_tool</mat-icon>\n </button>\n </pb-block>\n</div>\n\n<ng-content select=".move"></ng-content>\n<div class="tools" fxLayoutGap="0.25rem">\n <button mat-icon-button class="edit" color="primary" i18n-matTooltip="structure|Change structure settings"\n matTooltip="Change structure settings">\n <mat-icon i18n-aria-label="structure|Edit structure" aria-label="Edit structure" inline>edit</mat-icon>\n </button>\n <button mat-icon-button (click)="duplicateStructure($event)" i18n-matTooltip="structure|Duplicate structure"\n matTooltip="Duplicate structure">\n <mat-icon i18n-aria-label="structure|Duplicate structure" aria-label="Duplicate structure" inline>file_copy\n </mat-icon>\n </button>\n <button mat-icon-button color="warn" (click)="removeStructure($event)" i18n-matTooltip="structure|Delete structure"\n matTooltip="Delete structure">\n <mat-icon i18n-aria-label="structure|Remove Structure" aria-label="Remove Structure" inline>delete_forever\n </mat-icon>\n </button>\n</div>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.Emulated,exportAs:"structure",styles:["/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */pb-block>.cdk-drag-handle{position:absolute;top:-30px;right:0;cursor:move;background-color:rgba(63,81,181,.5);color:#fff;border-radius:50% 50% 0 0;opacity:0;height:30px;width:30px;font-size:smaller}pb-block>.cdk-drag-handle mat-icon{margin-top:-8px}pb-block>.cdk-drag-handle:hover{background-color:#3f51b5}pb-block.cdk-drag-preview .cdk-drag-handle,pb-block:hover .cdk-drag-handle{opacity:1}:host{display:grid;border:1px solid #ccc;position:relative;grid-template-columns:1fr}:host>.tools{direction:ltr;position:absolute;opacity:0;left:0;bottom:-25px;color:#ff4081}:host>.tools button{background-color:#fff;border-radius:0 0 3px 3px;height:25px;width:25px;line-height:0}:host.active,:host.cdk-drag-placeholder,:host.cdk-drag-preview,:host:hover{box-shadow:0 0 1px 2px #ff4081;z-index:1}:host:hover>.tools{opacity:1}:host:hover>.tools button{background-color:#ff4081;color:#fff}:host.active>.tools>.edit{display:none}:host.cols_2{grid-template-columns:repeat(2,6fr)}:host.cols_3{grid-template-columns:repeat(3,4fr)}:host.cols_4{grid-template-columns:repeat(4,3fr)}:host.cols_12{grid-template-columns:7fr 5fr}:host.cols_21{grid-template-columns:5fr 7fr}:host .cdk-drop-list-dragging,:host .cdk-drop-list-receiving{height:100%}:host>.column{box-sizing:border-box}:host>.column.empty{height:60px}:host>.column.empty .empty-block{background-color:rgba(101,99,99,.21);height:100%;display:flex;justify-content:center;place-items:center;flex-direction:column;color:rgba(101,99,99,.3);font-size:small}:host>.column.empty.cdk-drop-list-dragging .empty-block{display:none}:host>.column.empty>.cdk-drag-placeholder{min-height:60px!important}"]}]}],rt.ctorParameters=function(){return[{type:Ze},{type:Ye},{type:t.ChangeDetectorRef},{type:He}]},rt.propDecorators={structure:[{type:t.Input}],index:[{type:t.Input}],isStructureActive:[{type:t.HostBinding,args:["class.active"]}],onHostClick:[{type:t.HostListener,args:["click",["$event"]]}]};var at=function(){function e(){}return e.prototype.transform=function(e){var t,n,i={"áÁ":"a","éÉ":"e","íÍ":"i","óÓ":"o","úÚ":"u","ñÑ":"n"};try{for(var o=N(Object.keys(i)),r=o.next();!r.done;r=o.next()){var a=r.value;e=e.replace(new RegExp("["+a+"]","g"),i[a])}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return e.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},e}();at.decorators=[{type:t.Pipe,args:[{name:"slugify"}]}];var lt=function(){function e(e,i,o,r,a,l,s,c,p,u,d,m){var g,b;if(this.ngb=e,this.userRestApiService=i,this.userInterfaceService=o,this.emailObjectStore=r,this.renderer2=a,this.slugifyPipe=l,this.middlewares=s,this.changeDetectorRef=c,this.structures=p,this.blocks=u,this.doc=m,this.customSidebarTabLabel="",this.emailChange=new t.EventEmitter,this.previewTemplate=!1,this.showGeneralSettings$=this.userInterfaceService.editGeneralSettings$,this.currentTabIndex$=this.userInterfaceService.currentTabIndex$,this.cdkDropListConnectedTo$=this.userInterfaceService.cdkDropListConnectedTo$,this.getBuilderContainerStyles$=this.emailObjectStore.builderContainerStyles$,this.currentHTMLTemplate$=this.emailObjectStore.templateAsObservable$,this.activeMatProgress$=this.userInterfaceService.activeMatProgress$.asObservable(),this.customModuleList$=this.userRestApiService.getAllUserModules$,this.canUndo$=this.emailObjectStore.canUndo$,this.canRedo$=this.emailObjectStore.canRedo$,this._onDestroy$=new n.Subject,this.includedFonts=new Set,this.doc)try{for(var h=N(d),f=h.next();!f.done;f=h.next()){var y=f.value,k=this.doc.createElement("link");k.href="https://fonts.googleapis.com/css?family="+y,k.rel="stylesheet",this.includedFonts.add(k),this.doc.head.appendChild(k)}}catch(e){g={error:e}}finally{try{f&&!f.done&&(b=h.return)&&b.call(h)}finally{if(g)throw g.error}}}return e.prototype.writeValue=function(e){try{this.userInterfaceService.clearBlockHighlight(),this.emailObjectStore.setEmail(e),this.previewTemplate=!1,this.changeDetectorRef.markForCheck()}catch(e){this.userInterfaceService.notify(e.message)}},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){console.info("[IpEmailBuilderComponent] Method [setDisabledState] is not implemented.")},e.prototype.saveEmail=function(){var e=this;return this.emailObjectStore.currentEmailHasChanges$.pipe(i.withLatestFrom(this.emailObjectStore.templateAsObservable$),i.exhaustMap((function(t){var n=G(t,2),i=n[0],o=n[1];return i||!o?e.ngb.createHTMLTemplate$():e.userInterfaceService.notify("No changes were detected to be saved!").afterDismissed()})),i.take(1)).subscribe()},e.prototype.disableBlocksList$=function(e){var t=this;return n.iif((function(){var t;return!(null===(t=e.state)||void 0===t?void 0:t.disabled)}),this.emailObjectStore.emailStructuresAsObservable$.pipe(i.map((function(e){return e.length>0})),i.exhaustMap((function(n){return n?t.middlewares.disableBlockDragFromList(e):re(!0)})))).pipe(i.take(1))},e.prototype.disableStructureList$=function(e){return this.middlewares.disableStructureDragFromList(e).pipe(i.take(1))},e.prototype.undo=function(){this.emailObjectStore.undo()&&this.userInterfaceService.notify("Undo applied","short")},e.prototype.redo=function(){this.emailObjectStore.redo()&&this.userInterfaceService.notify("Redo applied","short")},e.prototype.trackByFn=function(e){return e.type},e.prototype.changeTabIndex=function(e){this.userInterfaceService.changeTabIndex(e)},e.prototype.download=function(e){var t=this;return this.middlewares.exportFile(e).pipe(i.exhaustMap((function(){return t.ngb.createHTMLTemplate$().pipe(i.map((function(t){return Object.assign(Object.assign({},t),{type:e})})))})),i.catchError((function(e){return t.middlewares.catchError(e).pipe(i.switchMap((function(){return t.userInterfaceService.notify(e.message),n.EMPTY})))})),i.take(1)).subscribe((function(e){var n=e.type,i=e.html,o=e.mjml,r=t.renderer2.createElement("a"),a=i;"mjml"===n?a=o:"json"===n&&(a=JSON.stringify(t.ngb.Email,null,1));var l=URL.createObjectURL(new Blob([a],{type:"json"===n?"text/json":"text/html"})),s=t.slugifyPipe.transform(t.ngb.Email.general.name||"ngb-template");r.href=l,r.target="_blank",r.download=s+"."+n,r.click(),URL.revokeObjectURL(l)}))},e.prototype.importFile=function(){var e=this;this.userInterfaceService.importDialog$().pipe(i.switchMap((function(e){if(e instanceof Error)throw e;return re(e)})),i.catchError((function(t){return e.middlewares.catchError(t).pipe(i.switchMap((function(){return e.userInterfaceService.notify(t.message),n.EMPTY})))})),i.take(1),i.filter((function(e){return!!e}))).subscribe((function(t){e.writeValue(t),e.userInterfaceService.notify("Email has been imported successfully.")}))},e.prototype.createArrayFromStructureColumns=function(e){var t=e.columns;return new Array(t).fill("")},e.prototype.togglePreview=function(){var e=this;return this.emailObjectStore.createHTMLTemplate$().pipe(i.exhaustMap((function(){return e.middlewares.togglePreview(!e.previewTemplate)})),i.catchError((function(t){return e.middlewares.catchError(t).pipe(i.switchMap((function(){return e.userInterfaceService.notify(t.message),n.EMPTY})))})),i.take(1)).subscribe((function(t){e.previewTemplate=t,e.changeDetectorRef.markForCheck()}))},e.prototype.ngOnInit=function(){var e=this;n.fromEvent(window,"beforeunload").pipe(i.withLatestFrom(this.emailObjectStore.currentEmailHasChanges$),i.filter((function(e){var t=G(e,2);t[0];return t[1]})),i.switchMap((function(t){var n=G(t,1)[0];return e.middlewares.preventWindowExit(n)})),i.takeUntil(this._onDestroy$)).subscribe((function(e){e.preventDefault(),e.returnValue=""})),this.emailObjectStore.emailAsObservable$.pipe(i.takeUntil(this._onDestroy$)).subscribe((function(t){var n,i;null===(n=e.onTouched)||void 0===n||n.call(e),null===(i=e.onChange)||void 0===i||i.call(e,t),e.emailChange.next(t),e.doc&&(null==t?void 0:t.customFonts)&&t.customFonts.forEach((function(t){if(!Array.from(e.includedFonts).find((function(e){return e.href===t.url}))){var n=e.doc.createElement("link");n.href=t.url,n.rel="stylesheet",e.includedFonts.add(n),e.doc.head.appendChild(n)}}))})),n.fromEvent(this.doc,"keydown").pipe(i.filter((function(e){var t=e.ctrlKey||e.metaKey,n=e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement;return t&&!n})),i.takeUntil(this._onDestroy$)).subscribe((function(t){"z"!==t.key&&"Z"!==t.key||(t.shiftKey?t.shiftKey&&(t.preventDefault(),e.redo()):(t.preventDefault(),e.undo()))}))},e.prototype.ngOnChanges=function(e){e.email&&this.writeValue(e.email.currentValue)},e.prototype.ngOnDestroy=function(){this._onDestroy$.next(),this._onDestroy$.complete(),this.userInterfaceService.reset(),this.doc&&this.includedFonts.forEach((function(e){return e.remove()})),this.includedFonts.clear()},e}();lt.decorators=[{type:t.Component,args:[{selector:"pb-email-builder",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<mat-sidenav-container>\n <div class="pb-builder-container" fxLayout="column" fxFlex>\n <mat-progress-bar *ngIf="activeMatProgress$ | async" mode="buffer"></mat-progress-bar>\n <mat-toolbar fxLayoutGap="1rem" fxLayoutAlign="space-between center">\n <ng-content fxLayout fxLayoutGap="0.5rem" select=".top-actions"></ng-content>\n\n <div fxFlexlayout fxLayoutGap="0.5rem">\n <button *ngIf="ngb.config.useSaveButton" type="button" (click)="saveEmail()" mat-stroked-button color="primary"\n i18n="actions|Save Email">\n Save Email\n </button>\n <button *ngIf="ngb.config.usePreviewButton" type="button" (click)="togglePreview()" mat-stroked-button>\n <ng-container [ngSwitch]="previewTemplate">\n <span *ngSwitchDefault i18n="actions|Preview">Preview</span>\n <span *ngSwitchCase="true" i18n="actions|Close Preview">Close Preview</span>\n </ng-container>\n </button>\n\n <button mat-button mat-stroked-button i18n="actions|Import" (click)="importFile()">\n Import\n </button>\n\n <ng-container *ngIf="ngb.config.useDownloadButton">\n <button mat-button [matMenuTriggerFor]="downloadMenu" mat-stroked-button i18n="actions|Export">\n Export\n </button>\n <mat-menu #downloadMenu="matMenu">\n <button mat-menu-item (click)="download(\'html\')" i18n="actions|Export HTML">\n Export HTML\n </button>\n <button mat-menu-item (click)="download(\'mjml\')" i18n="actions|Export MJML">\n Export MJML\n </button>\n <button mat-menu-item (click)="download(\'json\')" i18n="actions|Export JSON">\n Export JSON\n </button>\n </mat-menu>\n </ng-container>\n\n </div>\n <div class="history-actions">\n <button type="button" mat-icon-button (click)="undo()" [disabled]="!(canUndo$ | async) || previewTemplate"\n matTooltip="Undo (Ctrl+Z)" i18n-matTooltip="actions|undo shortcut tooltip"\n class="history-btn">\n <mat-icon>undo</mat-icon>\n </button>\n <button type="button" mat-icon-button (click)="redo()" [disabled]="!(canRedo$ | async) || previewTemplate"\n matTooltip="Redo (Ctrl+Shift+Z)" i18n-matTooltip="actions|redo shortcut tooltip"\n class="history-btn">\n <mat-icon>redo</mat-icon>\n </button>\n </div>\n </mat-toolbar>\n <ng-container [ngSwitch]="previewTemplate">\n <pb-builder-container *ngSwitchDefault [ngStyle]="getBuilderContainerStyles$ | async">\n <ng-content select=".rewrited-empty-email"></ng-content>\n </pb-builder-container>\n\n <pb-preview-template fxLayout fxFlex="auto" fxLayoutAlign="center" [template]="currentHTMLTemplate$ | async"\n *ngSwitchCase="true">\n </pb-preview-template>\n </ng-container>\n </div>\n <mat-sidenav mode="side" fxFlex="0 0 400px" [opened]="!previewTemplate" position="end" class="pb-builder-content">\n <mat-tab-group [selectedIndex]="currentTabIndex$ | async" (selectedIndexChange)="changeTabIndex($event)">\n <mat-tab i18n-label="Content" label="Content">\n <div class="main-padding">\n <cdk-drop-list class="elements" [cdkDropListConnectedTo]="cdkDropListConnectedTo$ | async"\n [cdkDropListData]="blocks" [cdkDropListSortingDisabled]="true" id="block-elements">\n <div cdkDrag *ngFor="let block of blocks; trackBy: trackByFn" [cdkDragData]="block"\n [cdkDragDisabled]="disableBlocksList$(block) | async" class="drag-element"\n [matTooltip]="block.state.message">\n <mat-icon>{{ block.icon }}</mat-icon>\n <div class="drag-element-title">{{ block.title }}</div>\n </div>\n </cdk-drop-list>\n\n <mat-divider style="margin: 1em 0;"></mat-divider>\n \x3c!-- <h3 class="divider"><span>Structures</span></h3> --\x3e\n <cdk-drop-list class="elements structure-elements" cdkDropListConnectedTo="structures-drop-list"\n [cdkDropListSortingDisabled]="true" [cdkDropListData]="structures">\n <div cdkDrag *ngFor="let structure of structures; trackBy: trackByFn" [cdkDragData]="structure"\n [cdkDragDisabled]="disableStructureList$(structure) | async" class="drag-element structure-element"\n [ngClass]="structure.type">\n <div *ngFor="let column of createArrayFromStructureColumns(structure)"></div>\n </div>\n </cdk-drop-list>\n <ng-content fxLayout fxLayoutGap="0.5rem" select=".after-structure-blocks"></ng-content>\n </div>\n </mat-tab>\n <mat-tab i18n-label="Modules" label="Modules" class="modules-tab">\n <cdk-virtual-scroll-viewport itemSize="54" [minBufferPx]="54 * 10" [maxBufferPx]="54 * 20"\n style="height: inherit;"\n *ngIf="customModuleList$ | async as modules; else emptyModuleList">\n <div class="main-padding">\n <div class="custom-modules" cdkDropList cdkDropListConnectedTo="structures-drop-list"\n [cdkDropListData]="modules" [cdkDropListSortingDisabled]="true">\n <div fxLayout="column" fxLayoutGap="1rem">\n <ng-container *cdkVirtualFor="let module of modules">\n <div cdkDrag [cdkDragData]="module.module"\n [cdkDragDisabled]="disableStructureList$(module.module) | async" class="drag-element"\n style="padding: 1em;text-transform: uppercase;height: 54px;">\n <span *ngIf="module.name">{{module.name}}</span>\n \x3c!-- <img *ngIf="module.thumb" [src]="module.thumb" /> --\x3e\n </div>\n </ng-container>\n </div>\n </div>\n <ng-content fxLayout fxLayoutGap="0.5rem" select=".after-content-blocks"></ng-content>\n </div>\n </cdk-virtual-scroll-viewport>\n <ng-template #emptyModuleList>\n <h4 class="main-padding" style="text-align: center;" i18n="modules|empty list message">\n Module list is empty\n </h4>\n </ng-template>\n </mat-tab>\n <mat-tab i18n-label="Settings" label="Settings">\n <div class="pb-builder-options" [ngSwitch]="showGeneralSettings$ | async">\n <pb-general-settings *ngSwitchDefault></pb-general-settings>\n <pb-block-settings *ngSwitchCase="\'block\'"></pb-block-settings>\n <pb-structure-settings *ngSwitchCase="\'structure\'" fxLayout="column"></pb-structure-settings>\n </div>\n </mat-tab>\n <mat-tab *ngIf="customSidebarTabLabel" [label]="customSidebarTabLabel">\n <ng-content select=".custom-sidebar-tab"></ng-content>\n </mat-tab>\n </mat-tab-group>\n </mat-sidenav>\n</mat-sidenav-container>\n',exportAs:"pbEmailBuilder",changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[{provide:T.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return lt})),multi:!0},at],styles:['/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */:host{display:block;height:100vh}.hide{display:none}::ng-deep mat-sidenav-container{height:100%}::ng-deep mat-sidenav-container mat-sidenav-content{width:100%;z-index:unset!important;overflow:unset!important}::ng-deep h3.divider{text-align:center;display:block;overflow:hidden;margin:0 0 1rem}::ng-deep h3.divider span{font-weight:100;position:relative;display:inline-block}::ng-deep h3.divider span:after,::ng-deep h3.divider span:before{content:"";position:absolute;top:50%;height:1px;background:#ccc;width:99999px}::ng-deep h3.divider span:before{left:100%;margin-left:10px}::ng-deep h3.divider span:after{right:100%;margin-right:10px}::ng-deep .pb-builder-content{border-right:1px solid rgba(0,0,0,.12)}::ng-deep .pb-builder-content .overflow{position:absolute;top:0;bottom:0;left:0;right:0;background-color:#fff;opacity:.5;display:none;z-index:3}::ng-deep .pb-builder-content.disabled .overflow{display:block}::ng-deep .pb-builder-content .mat-tab-label{flex:1 1 0;min-width:0;height:64px;font-size:medium;text-transform:uppercase;padding:0 12px}::ng-deep .pb-builder-content .mat-tab-body-wrapper,::ng-deep .pb-builder-content .mat-tab-group{height:100%}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body{padding:0}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body .elements{display:grid;grid-gap:.5rem;margin-bottom:1rem;grid-template:repeat(2,1fr)/repeat(3,1fr)}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body .elements.structure-elements{grid-template:repeat(4,1fr)/1fr}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body .elements.cdk-drop-list-dragging .cdk-drag{transform:none!important}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body input{height:auto;border:none}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body .custom-modules .drag-element img{max-width:100%}::ng-deep .pb-builder-container{position:relative;height:100%}::ng-deep .pb-builder-container mat-progress-bar{position:absolute}::ng-deep .pb-builder-container mat-toolbar{background-color:#fff}::ng-deep .pb-builder-options .mat-expansion-panel{box-shadow:none!important}::ng-deep .pb-builder-options .mat-expansion-panel.mat-expanded{overflow:visible}::ng-deep .pb-builder-options mat-expansion-panel-header:not(.mat-expanded){background:rgba(0,0,0,.04)}::ng-deep .pb-builder-options ::ng-deep .group{display:grid;grid-template:auto/repeat(2,1fr);grid-gap:1rem}::ng-deep .pb-builder-options ::ng-deep .group>*{align-self:center}::ng-deep .pb-builder-options ::ng-deep .group+.group{margin-top:1em}::ng-deep .pb-builder-options ::ng-deep .group.four{grid-template-columns:repeat(4,1fr)}::ng-deep .pb-builder-options ::ng-deep .group.f-large{grid-template-columns:2fr 1fr}::ng-deep .pb-builder-options ::ng-deep .group.l-large{grid-template-columns:1fr 2fr}::ng-deep .pb-builder-options ::ng-deep .group.three{grid-template-columns:repeat(3,1fr)}::ng-deep .pb-builder-options ::ng-deep .group.three.f-small{grid-template-columns:1fr repeat(2,2fr)}::ng-deep .pb-builder-options ::ng-deep .group.three.f-large{grid-template-columns:2fr repeat(2,1fr)}::ng-deep .pb-builder-options ::ng-deep .group.three.l-large{grid-template-columns:repeat(2,1fr) 2fr}::ng-deep .pb-builder-options ::ng-deep .group .mat-form-field-infix{width:auto!important}::ng-deep .drag-element{text-align:center;border:1px solid #ccc;box-sizing:border-box;background:#fff;color:#7b7b7b;cursor:move;transition:box-shadow .3s ease-in-out;will-change:box-shadow;border-radius:3px}::ng-deep .drag-element.cdk-drag-disabled,::ng-deep .drag-element.cdk-drag-placeholder{cursor:not-allowed;opacity:.6}::ng-deep .drag-element:hover{box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}::ng-deep .drag-element .mat-icon{font-size:40px!important;padding:.5rem;width:auto;height:auto}::ng-deep .drag-element img{max-width:100%}::ng-deep .drag-element-title{font-size:.9em;text-transform:uppercase;margin-bottom:.5rem}::ng-deep .drag-element.structure-element{height:60px;position:relative;padding:4px;display:grid;grid-template:1fr/1fr}::ng-deep .drag-element.structure-element>div{background:#ccc;border:4px solid #bbb}::ng-deep .drag-element.structure-element.cols_2{grid-template-columns:repeat(2,5fr)}::ng-deep .drag-element.structure-element.cols_3{grid-template-columns:repeat(3,3.33fr)}::ng-deep .drag-element.structure-element.cols_4{grid-template-columns:repeat(4,2.5fr)}::ng-deep .drag-element.structure-element.cols_12{grid-template-columns:6fr 4fr}::ng-deep .drag-element.structure-element.cols_21{grid-template-columns:4fr 6fr}::ng-deep .main-padding{padding:1rem}::ng-deep .history-actions{margin-inline-start:auto;display:flex;gap:.5rem;align-items:center}::ng-deep .history-actions .history-btn{transition:all .2s ease-in-out;color:rgba(0,0,0,.54)}::ng-deep .history-actions .history-btn:hover:not([disabled]){background-color:rgba(0,0,0,.08);border-radius:4px;color:rgba(0,0,0,.87)}::ng-deep .history-actions .history-btn[disabled]{opacity:.38}::ng-deep .cdk-drop-list-receiving>:not(.cdk-drag){opacity:.6}::ng-deep .cdk-drop-list-dragging>*{pointer-events:none}@keyframes drag-animation{0%{opacity:0;height:0}to{opacity:1}}::ng-deep .cdk-drag-animating{animation:drag-animation 1s cubic-bezier(0,0,.2,1) infinite}::ng-deep .cdk-drag-preview{border-radius:4px;box-shadow:0 0 0 2px rgba(63,81,181,.5);min-height:60px;min-width:100px;background-color:#fff}::ng-deep .cdk-drag.structure-element.cdk-drag-placeholder{box-shadow:0 0 1px 2px #ff4081;width:100%;pointer-events:none}']}]}],lt.ctorParameters=function(){return[{type:Xe},{type:Ge},{type:Ze},{type:Ye},{type:t.Renderer2},{type:at},{type:He},{type:t.ChangeDetectorRef},{type:Array,decorators:[{type:t.Inject,args:[De]}]},{type:Array,decorators:[{type:t.Inject,args:[Me]}]},{type:Array,decorators:[{type:t.Inject,args:[Te]}]},{type:Document,decorators:[{type:t.Inject,args:[$.DOCUMENT]}]}]},lt.propDecorators={email:[{type:t.Input}],customSidebarTabLabel:[{type:t.Input}],emailChange:[{type:t.Output}]};var st=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();st.decorators=[{type:t.Directive}],st.propDecorators={portal:[{type:t.ViewChild,args:[M.CdkPortal,{static:!0}]}]};var ct=function(e){function t(t,o,r){var a=e.call(this)||this;return a.userRestApi=t,a.emailObject=o,a.internalService=r,a.setAsReadOnly$=a.internalService.currentEditingBlock$.pipe(i.map((function(e){return e!==a.block}))),a.staticQuillConfig={toolbar:{container:[["bold","italic","underline","strike"],[{header:[1,2,3,4,5,6,!1]},{size:["small",!1,"large","huge"]}],[{align:[]},"link"],[{list:"ordered"},{list:"bullet"}],[{color:[]},{background:[]}],["clean"]],handlers:{placeholder:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(),i=this.quill.getText(t.index,t.length);this.quill.deleteText(t.index,i.length),this.quill.insertText(t.index,e,n),this.quill.setSelection(t.index,e.length)}}}},a.quillInit$=a.userRestApi.getAllUserMergeFields$.pipe(i.map((function(e){a.staticQuillConfig.toolbar.container.splice(-1,0,[{placeholder:e}])})),i.mapTo(!0),i.take(1)),a.textChanged$=new n.Subject,a.componentDestroyed$=new n.Subject,a}return R(t,e),t.prototype.getTextStyles=function(){var e=this.block.options,t=e.color,n=e.font,i=e.lineHeight,o=e.padding;return Object.assign(Object.assign(Object.assign({color:t,"word-break":"break-all"},te(i)),ee(n)),Z(o))},t.prototype.contentChanged=function(){this.textChanged$.next()},t.prototype.ngOnInit=function(){var e=this;this.textChanged$.pipe(i.debounceTime(600),i.takeUntil(this.componentDestroyed$)).subscribe((function(){e.emailObject.markForCheck()}))},t.prototype.ngOnDestroy=function(){this.componentDestroyed$.next(),this.componentDestroyed$.complete()},t}(st);ct.decorators=[{type:t.Component,args:[{selector:"pb-text-element",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<div [ngStyle]="getTextStyles()">\n <quill-editor *ngIf="quillInit$ | async; else loadingModules" i18n-placeholder="text-element|placeholder"\n placeholder="Insert text here ..." [modules]="staticQuillConfig" [readOnly]="setAsReadOnly$ |async"\n [(ngModel)]="block.innerText" (onContentChanged)="contentChanged()">\n </quill-editor>\n</div>\n\n<ng-template #loadingModules>\n <span i18n="text-element|loading message">Please wait ...</span>\n</ng-template>\n',encapsulation:t.ViewEncapsulation.None,styles:['@charset "UTF-8";\n/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */\n/*!\n * Quill Editor v1.3.7\n * https://quilljs.com/\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n */.ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container.ql-disabled .ql-editor ul[data-checked]>li:before{pointer-events:none}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;-o-tab-size:4;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6,.ql-editor ol,.ql-editor p,.ql-editor pre,.ql-editor ul{margin:0;padding:0;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol,.ql-editor ul{padding-left:1.5em}.ql-editor ol>li,.ql-editor ul>li{list-style-type:none}.ql-editor ul>li:before{content:"•"}.ql-editor ul[data-checked=false],.ql-editor ul[data-checked=true]{pointer-events:none}.ql-editor ul[data-checked=false]>li *,.ql-editor ul[data-checked=true]>li *{pointer-events:all}.ql-editor ul[data-checked=false]>li:before,.ql-editor ul[data-checked=true]>li:before{color:#777;cursor:pointer;pointer-events:all}.ql-editor ul[data-checked=true]>li:before{content:"☑"}.ql-editor ul[data-checked=false]>li:before{content:"☐"}.ql-editor li:before{display:inline-block;white-space:nowrap;width:1.2em}.ql-editor li:not(.ql-direction-rtl):before{margin-left:-1.5em;margin-right:.3em;text-align:right}.ql-editor li.ql-direction-rtl:before{margin-left:.3em;margin-right:-1.5em}.ql-editor ol li:not(.ql-direction-rtl),.ql-editor ul li:not(.ql-direction-rtl){padding-left:1.5em}.ql-editor ol li.ql-direction-rtl,.ql-editor ul li.ql-direction-rtl{padding-right:1.5em}.ql-editor ol li{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.ql-editor ol li:before{content:counter(list-0,decimal) ". "}.ql-editor ol li.ql-indent-1{counter-increment:list-1}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) ". "}.ql-editor ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2{counter-increment:list-2}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) ". "}.ql-editor ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3{counter-increment:list-3}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) ". "}.ql-editor ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4{counter-increment:list-4}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) ". "}.ql-editor ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5{counter-increment:list-5}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) ". "}.ql-editor ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-6{counter-increment:list-6}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) ". "}.ql-editor ol li.ql-indent-6{counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-7{counter-increment:list-7}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) ". "}.ql-editor ol li.ql-indent-7{counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-8{counter-increment:list-8}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) ". "}.ql-editor ol li.ql-indent-8{counter-reset:list-9}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) ". "}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor.ql-blank:before{color:rgba(0,0,0,.6);content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}.ql-bubble.ql-toolbar:after,.ql-bubble .ql-toolbar:after{clear:both;content:"";display:table}.ql-bubble.ql-toolbar button,.ql-bubble .ql-toolbar button{background:none;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px}.ql-bubble.ql-toolbar button svg,.ql-bubble .ql-toolbar button svg{float:left;height:100%}.ql-bubble.ql-toolbar button:active:hover,.ql-bubble .ql-toolbar button:active:hover{outline:none}.ql-bubble.ql-toolbar input.ql-image[type=file],.ql-bubble .ql-toolbar input.ql-image[type=file]{display:none}.ql-bubble.ql-toolbar .ql-picker-item.ql-selected,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected,.ql-bubble.ql-toolbar .ql-picker-item:hover,.ql-bubble .ql-toolbar .ql-picker-item:hover,.ql-bubble.ql-toolbar .ql-picker-label.ql-active,.ql-bubble .ql-toolbar .ql-picker-label.ql-active,.ql-bubble.ql-toolbar .ql-picker-label:hover,.ql-bubble .ql-toolbar .ql-picker-label:hover,.ql-bubble.ql-toolbar button.ql-active,.ql-bubble .ql-toolbar button.ql-active,.ql-bubble.ql-toolbar button:focus,.ql-bubble .ql-toolbar button:focus,.ql-bubble.ql-toolbar button:hover,.ql-bubble .ql-toolbar button:hover{color:#fff}.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-fill,.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-fill,.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-fill,.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-fill,.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-bubble.ql-toolbar button.ql-active .ql-fill,.ql-bubble .ql-toolbar button.ql-active .ql-fill,.ql-bubble.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-bubble .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-bubble.ql-toolbar button:focus .ql-fill,.ql-bubble .ql-toolbar button:focus .ql-fill,.ql-bubble.ql-toolbar button:focus .ql-stroke.ql-fill,.ql-bubble .ql-toolbar button:focus .ql-stroke.ql-fill,.ql-bubble.ql-toolbar button:hover .ql-fill,.ql-bubble .ql-toolbar button:hover .ql-fill,.ql-bubble.ql-toolbar button:hover .ql-stroke.ql-fill,.ql-bubble .ql-toolbar button:hover .ql-stroke.ql-fill{fill:#fff}.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-bubble.ql-toolbar button.ql-active .ql-stroke,.ql-bubble .ql-toolbar button.ql-active .ql-stroke,.ql-bubble.ql-toolbar button.ql-active .ql-stroke-miter,.ql-bubble .ql-toolbar button.ql-active .ql-stroke-miter,.ql-bubble.ql-toolbar button:focus .ql-stroke,.ql-bubble .ql-toolbar button:focus .ql-stroke,.ql-bubble.ql-toolbar button:focus .ql-stroke-miter,.ql-bubble .ql-toolbar button:focus .ql-stroke-miter,.ql-bubble.ql-toolbar button:hover .ql-stroke,.ql-bubble .ql-toolbar button:hover .ql-stroke,.ql-bubble.ql-toolbar button:hover .ql-stroke-miter,.ql-bubble .ql-toolbar button:hover .ql-stroke-miter{stroke:#fff}@media (pointer:coarse){.ql-bubble.ql-toolbar button:hover:not(.ql-active),.ql-bubble .ql-toolbar button:hover:not(.ql-active){color:#ccc}.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#ccc}.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#ccc}}.ql-bubble,.ql-bubble *{box-sizing:border-box}.ql-bubble .ql-hidden{display:none}.ql-bubble .ql-out-bottom,.ql-bubble .ql-out-top{visibility:hidden}.ql-bubble .ql-tooltip{position:absolute;transform:translateY(10px)}.ql-bubble .ql-tooltip a{cursor:pointer;text-decoration:none}.ql-bubble .ql-tooltip.ql-flip{transform:translateY(-10px)}.ql-bubble .ql-formats{display:inline-block;vertical-align:middle}.ql-bubble .ql-formats:after{clear:both;content:"";display:table}.ql-bubble .ql-stroke{fill:none;stroke:#ccc;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-bubble .ql-stroke-miter{fill:none;stroke:#ccc;stroke-miterlimit:10;stroke-width:2}.ql-bubble .ql-fill,.ql-bubble .ql-stroke.ql-fill{fill:#ccc}.ql-bubble .ql-empty{fill:none}.ql-bubble .ql-even{fill-rule:evenodd}.ql-bubble .ql-stroke.ql-thin,.ql-bubble .ql-thin{stroke-width:1}.ql-bubble .ql-transparent{opacity:.4}.ql-bubble .ql-direction svg:last-child{display:none}.ql-bubble .ql-direction.ql-active svg:last-child{display:inline}.ql-bubble .ql-direction.ql-active svg:first-child{display:none}.ql-bubble .ql-editor h1{font-size:2em}.ql-bubble .ql-editor h2{font-size:1.5em}.ql-bubble .ql-editor h3{font-size:1.17em}.ql-bubble .ql-editor h4{font-size:1em}.ql-bubble .ql-editor h5{font-size:.83em}.ql-bubble .ql-editor h6{font-size:.67em}.ql-bubble .ql-editor a{text-decoration:underline}.ql-bubble .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-bubble .ql-editor code,.ql-bubble .ql-editor pre{background-color:#f0f0f0;border-radius:3px}.ql-bubble .ql-editor pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-bubble .ql-editor code{font-size:85%;padding:2px 4px}.ql-bubble .ql-editor pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-bubble .ql-editor img{max-width:100%}.ql-bubble .ql-picker{color:#ccc;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle}.ql-bubble .ql-picker-label{cursor:pointer;display:inline-block;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-bubble .ql-picker-label:before{display:inline-block;line-height:22px}.ql-bubble .ql-picker-options{background-color:#444;display:none;min-width:100%;padding:4px 8px;position:absolute;white-space:nowrap}.ql-bubble .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding-bottom:5px;padding-top:5px}.ql-bubble .ql-picker.ql-expanded .ql-picker-label{color:#777;z-index:2}.ql-bubble .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#777}.ql-bubble .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#777}.ql-bubble .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-bubble .ql-color-picker,.ql-bubble .ql-icon-picker{width:28px}.ql-bubble .ql-color-picker .ql-picker-label,.ql-bubble .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-bubble .ql-color-picker .ql-picker-label svg,.ql-bubble .ql-icon-picker .ql-picker-label svg{right:4px}.ql-bubble .ql-icon-picker .ql-picker-options{padding:4px 0}.ql-bubble .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px}.ql-bubble .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-bubble .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-bubble .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=""]):before,.ql-bubble .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=""]):before,.ql-bubble .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=""]):before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=""]):before,.ql-bubble .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=""]):before,.ql-bubble .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=""]):before{content:attr(data-label)}.ql-bubble .ql-picker.ql-header{width:98px}.ql-bubble .ql-picker.ql-header .ql-picker-item:before,.ql-bubble .ql-picker.ql-header .ql-picker-label:before{content:"Normal"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="1"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="1"]:before{content:"Heading 1"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="2"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="2"]:before{content:"Heading 2"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="3"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="3"]:before{content:"Heading 3"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="4"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="4"]:before{content:"Heading 4"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="5"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="5"]:before{content:"Heading 5"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="6"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="6"]:before{content:"Heading 6"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{font-size:2em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{font-size:1.5em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{font-size:1.17em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{font-size:1em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{font-size:.83em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{font-size:.67em}.ql-bubble .ql-picker.ql-font{width:108px}.ql-bubble .ql-picker.ql-font .ql-picker-item:before,.ql-bubble .ql-picker.ql-font .ql-picker-label:before{content:"Sans Serif"}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=serif]:before,.ql-bubble .ql-picker.ql-font .ql-picker-label[data-value=serif]:before{content:"Serif"}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before,.ql-bubble .ql-picker.ql-font .ql-picker-label[data-value=monospace]:before{content:"Monospace"}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{font-family:Georgia,Times New Roman,serif}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{font-family:Monaco,Courier New,monospace}.ql-bubble .ql-picker.ql-size{width:98px}.ql-bubble .ql-picker.ql-size .ql-picker-item:before,.ql-bubble .ql-picker.ql-size .ql-picker-label:before{content:"Normal"}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=small]:before,.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=small]:before{content:"Small"}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=large]:before,.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=large]:before{content:"Large"}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=huge]:before,.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=huge]:before{content:"Huge"}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=small]:before{font-size:10px}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=large]:before{font-size:18px}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{font-size:32px}.ql-bubble .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-bubble .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-bubble .ql-toolbar .ql-formats{margin:8px 12px 8px 0}.ql-bubble .ql-toolbar .ql-formats:first-child{margin-left:12px}.ql-bubble .ql-color-picker svg{margin:1px}.ql-bubble .ql-color-picker .ql-picker-item.ql-selected,.ql-bubble .ql-color-picker .ql-picker-item:hover{border-color:#fff}.ql-bubble .ql-tooltip{background-color:#444;border-radius:25px;color:#fff}.ql-bubble .ql-tooltip-arrow{border-left:6px solid transparent;border-right:6px solid transparent;content:" ";display:block;left:50%;margin-left:-6px;position:absolute}.ql-bubble .ql-tooltip:not(.ql-flip) .ql-tooltip-arrow{border-bottom:6px solid #444;top:-6px}.ql-bubble .ql-tooltip.ql-flip .ql-tooltip-arrow{border-top:6px solid #444;bottom:-6px}.ql-bubble .ql-tooltip.ql-editing .ql-tooltip-editor{display:block}.ql-bubble .ql-tooltip.ql-editing .ql-formats{visibility:hidden}.ql-bubble .ql-tooltip-editor{display:none}.ql-bubble .ql-tooltip-editor input[type=text]{background:transparent;border:none;color:#fff;font-size:13px;height:100%;outline:none;padding:10px 20px;position:absolute;width:100%}.ql-bubble .ql-tooltip-editor a{top:10px;position:absolute;right:20px}.ql-bubble .ql-tooltip-editor a:before{color:#ccc;content:"×";font-size:16px;font-weight:700}.ql-container.ql-bubble:not(.ql-disabled) a{position:relative;white-space:nowrap}.ql-container.ql-bubble:not(.ql-disabled) a:before{background-color:#444;border-radius:15px;top:-5px;font-size:12px;color:#fff;content:attr(href);font-weight:400;overflow:hidden;padding:5px 15px;text-decoration:none;z-index:1}.ql-container.ql-bubble:not(.ql-disabled) a:after{border-top:6px solid #444;border-left:6px solid transparent;border-right:6px solid transparent;top:0;content:" ";height:0;width:0}.ql-container.ql-bubble:not(.ql-disabled) a:after,.ql-container.ql-bubble:not(.ql-disabled) a:before{left:0;margin-left:50%;position:absolute;transform:translate(-50%,-100%);transition:visibility 0s ease .2s;visibility:hidden}.ql-container.ql-bubble:not(.ql-disabled) a:hover:after,.ql-container.ql-bubble:not(.ql-disabled) a:hover:before{visibility:visible}quill-editor{display:block;word-break:break-word}quill-editor .ql-container{font-family:inherit;font-size:inherit}quill-editor .ql-container .ql-editor{padding:0!important;line-height:inherit;font:inherit;overflow:visible}quill-editor .ql-placeholder .ql-picker-label:before{display:block;content:"Tags";min-width:50px}quill-editor .ql-placeholder.ql-expanded .ql-picker-item:before{content:attr(data-value);width:-moz-min-content;width:min-content}quill-editor .ql-tooltip{z-index:10;line-height:normal}quill-editor .ql-tooltip .ql-picker-options{max-height:300px;overflow:auto}quill-editor .ql-toolbar{width:600px;width:-moz-max-content;width:max-content}quill-editor h1,quill-editor h2,quill-editor h3,quill-editor h4,quill-editor h5,quill-editor h6{font-weight:inherit;line-height:inherit}']}]}],ct.ctorParameters=function(){return[{type:Ge},{type:Ye},{type:Ze}]};var pt=function(e){function t(t,n,i){var o=e.call(this)||this;return o.imageUploader=t,o.chRef=n,o.ngb=i,o.defaultImageWidth={value:110,unit:"px",auto:!1},o}return R(t,e),Object.defineProperty(t.prototype,"align",{get:function(){return this.block.options.align},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"src",{get:function(){return this.block.src||this.defaultImageSrc},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultImageSrc",{get:function(){return this.ngb.config.apiPath+"/images/placeholders/image-placeholder.png"},enumerable:!1,configurable:!0}),t.prototype.uploadImage=function(){return U(this,void 0,void 0,(function(){var e;return H(this,(function(t){switch(t.label){case 0:return[4,this.imageUploader.browse$().toPromise()];case 1:return(e=t.sent())&&(this.block.src=e,this.chRef.markForCheck()),[2]}}))}))},t.prototype.getImageStyles=function(){var e=this.block.options,t=e.border,n=e.width,i=e.height,o=e.padding,r=!(this.block.src||"").trim()?this.defaultImageWidth:n;return Object.assign(Object.assign({width:ne(r),height:ne(i)},Z(o)),Q(t))},t}(st);pt.decorators=[{type:t.Component,args:[{selector:"pb-image",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n\x3c!-- <div\n class="overflow"\n *ngIf="(ngb.currentEditingBlock$ | async) !== block"\n (click)="uploadImage()"\n>\n <mat-icon inline>cloud_upload</mat-icon>\n</div> --\x3e\n<img [src]="src" [title]="block.options.title" [ngStyle]="getImageStyles()" />\n',styles:[":host{display:block;line-height:0}:host:hover .overflow{opacity:1}.overflow{position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgba(0,0,0,.3);opacity:0;will-change:opacity;transition:opacity .3s cubic-bezier(.075,.82,.165,1);cursor:pointer;color:#fff;display:flex;align-items:center;justify-content:center;font-size:3em}.overflow mat-icon{opacity:.8}img{max-width:100%;box-sizing:border-box}"]}]}],pt.ctorParameters=function(){return[{type:tt},{type:t.ChangeDetectorRef},{type:Xe}]},pt.propDecorators={align:[{type:t.HostBinding,args:["style.textAlign"]}]};var ut=function(){function e(e,t){this.http=e,this.pbUserRestApiService=t,this.YOUTUBE_OVERLAY="data:image/svg+xml;base64,"+btoa('\n <svg width="200" height="140" xmlns="http://www.w3.org/2000/svg">\n <rect x="0" y="0" width="200" height="140" rx="20" fill="red" fill-opacity="0.9"/>\n <polygon points="75,45 75,95 130,70" fill="white"/>\n </svg>'),this.VIMEO_OVERLAY="data:image/svg+xml;base64,"+btoa('\n <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg">\n <circle cx="100" cy="100" r="90" fill="#00ADEF" fill-opacity="0.9"/>\n <polygon points="80,65 80,135 140,100" fill="white"/>\n </svg>')}return e.prototype.parseVideoUrl=function(e){if(!e)return null;var t=e.match(/(?:youtu\.be\/|youtube\.com\/(?:watch\?v=|embed\/|v\/|shorts\/))([^\?&"'>]+)/);if(t)return{type:"youtube",id:t[1]};var n=e.match(/(?:vimeo\.com\/|player\.vimeo\.com\/video\/)([0-9]+)/);return n?{type:"vimeo",id:n[1]}:null},e.prototype.getYouTubeThumbnail=function(e){return"https://img.youtube.com/vi/"+e+"/mqdefault.jpg"},e.prototype.getVimeoThumbnail=function(e){return U(this,void 0,void 0,(function(){var t,n;return H(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.http.get("https://vimeo.com/api/oembed.json?url="+encodeURIComponent(e)+"&width=1280").toPromise()];case 1:return[2,(null==(t=i.sent())?void 0:t.thumbnail_url)||null];case 2:return n=i.sent(),console.error("Error fetching Vimeo thumbnail:",n),[2,null];case 3:return[2]}}))}))},e.prototype.loadImage=function(e){return new Promise((function(t,n){var i=new Image;i.crossOrigin="anonymous",i.onload=function(){return t(i)},i.onerror=n,i.src=e}))},e.prototype.compositeImages=function(e,t){return U(this,void 0,void 0,(function(){var n,i,o,r,a,l,s,c,p,u,d;return H(this,(function(m){switch(m.label){case 0:return m.trys.push([0,3,,4]),[4,this.loadImage(e)];case 1:return n=m.sent(),i="youtube"===t?this.YOUTUBE_OVERLAY:this.VIMEO_OVERLAY,[4,this.loadImage(i)];case 2:if(o=m.sent(),r=document.createElement("canvas"),!(a=r.getContext("2d")))throw new Error("Could not get canvas context");return r.width=n.width,r.height=n.height,a.drawImage(n,0,0),l=.25*Math.min(r.width/o.width,r.height/o.height),s=o.width*l,c=o.height*l,p=(r.width-s)/2,u=(r.height-c)/2,a.drawImage(o,p,u,s,c),[2,r.toDataURL("image/png")];case 3:return d=m.sent(),console.error("Error compositing images:",d),[2,e];case 4:return[2]}}))}))},e.prototype.generateThumbnail=function(e){var t;return U(this,void 0,void 0,(function(){var n,i,o,r,a;return H(this,(function(l){switch(l.label){case 0:return(n=this.parseVideoUrl(e))?(i=null,"youtube"!==n.type?[3,1]:(i=this.getYouTubeThumbnail(n.id),[3,3])):[2,null];case 1:return"vimeo"!==n.type?[3,3]:[4,this.getVimeoThumbnail(e)];case 2:i=l.sent(),l.label=3;case 3:return i?[4,this.compositeImages(i,n.type)]:[2,null];case 4:o=l.sent(),l.label=5;case 5:return l.trys.push([5,7,,8]),[4,this.pbUserRestApiService.userImageUploadBase64$(o,"thumbnails").toPromise()];case 6:return(null==(r=l.sent())?void 0:r.succeeded)&&(null===(t=r.result)||void 0===t?void 0:t.url)?[2,r.result.url]:[2,null];case 7:return a=l.sent(),console.error("Error uploading video thumbnail:",a),[2,null];case 8:return[2]}}))}))},e}();ut.ɵprov=F.ɵɵdefineInjectable({factory:function(){return new ut(F.ɵɵinject(A.HttpClient),F.ɵɵinject(Ge))},token:ut,providedIn:"root"}),ut.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],ut.ctorParameters=function(){return[{type:r.HttpClient},{type:Ge}]};var dt=function(e){function t(t,i,o,r){var a=e.call(this)||this;return a.imageUploader=t,a.chRef=i,a.ngb=o,a.videoThumbnailService=r,a.defaultPosterWidth={value:160,unit:"px",auto:!1},a.destroy$=new n.Subject,a.srcChange$=new n.Subject,a.previousSrc="",a.isGeneratingThumbnail=!1,a}return R(t,e),Object.defineProperty(t.prototype,"align",{get:function(){return this.block.options.align},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"src",{get:function(){return this.block.src||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"posterSrc",{get:function(){return(this.block.posterSrc||"").trim()||this.defaultPosterSrc},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultPosterSrc",{get:function(){return this.ngb.config.apiPath+"/images/placeholders/video-placeholder.png"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"errorPosterSrc",{get:function(){return this.ngb.config.apiPath+"/images/placeholders/error-placeholder.png"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"videoUrl",{get:function(){return this.block.src||""},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){var e=this;this.srcChange$.pipe(i.debounceTime(500),i.takeUntil(this.destroy$)).subscribe((function(t){return U(e,void 0,void 0,(function(){return H(this,(function(e){switch(e.label){case 0:return[4,this.generateThumbnail(t)];case 1:return e.sent(),[2]}}))}))})),this.block.src&&(this.previousSrc=this.block.src,this.srcChange$.next(this.block.src))},t.prototype.ngDoCheck=function(){this.block&&this.block.src!==this.previousSrc&&(this.previousSrc=this.block.src||"",this.srcChange$.next(this.previousSrc))},t.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},t.prototype.onVideoUrlChange=function(e){return U(this,void 0,void 0,(function(){return H(this,(function(t){return this.block.src=e,this.previousSrc=e,this.srcChange$.next(e),[2]}))}))},t.prototype.generateThumbnail=function(e){return U(this,void 0,void 0,(function(){var t,n;return H(this,(function(i){switch(i.label){case 0:if(!e)return this.block.posterSrc=this.defaultPosterSrc,this.chRef.markForCheck(),[2];this.isGeneratingThumbnail=!0,this.chRef.markForCheck(),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.videoThumbnailService.generateThumbnail(e)];case 2:if(!(t=i.sent()))throw new Error("Failed to generate thumbnail");return this.block.posterSrc=t,[3,5];case 3:return n=i.sent(),console.error("Error generating thumbnail:",n),this.block.posterSrc=this.errorPosterSrc,[3,5];case 4:return this.isGeneratingThumbnail=!1,this.chRef.markForCheck(),[7];case 5:return[2]}}))}))},t.prototype.uploadVideo=function(){return U(this,void 0,void 0,(function(){var e;return H(this,(function(t){switch(t.label){case 0:return[4,this.imageUploader.browse$().toPromise()];case 1:return(e=t.sent())&&(this.block.src=e,this.chRef.markForCheck()),[2]}}))}))},t.prototype.uploadPoster=function(){return U(this,void 0,void 0,(function(){var e;return H(this,(function(t){switch(t.label){case 0:return[4,this.imageUploader.browse$().toPromise()];case 1:return(e=t.sent())&&(this.block.posterSrc=e,this.chRef.markForCheck()),[2]}}))}))},t.prototype.getVideoStyles=function(){var e=this.block.options,t=e.border,n=e.width,i=e.height,o=e.padding,r=!!(this.block.posterSrc||"").trim()?n:this.defaultPosterWidth;return Object.assign(Object.assign({width:ne(r),height:ne(i)},Z(o)),Q(t))},t}(st);dt.decorators=[{type:t.Component,args:[{selector:"pb-video",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<a [href]="videoUrl || \'#\'" [attr.target]="block.options.link?.target || \'_blank\'"\n style="display: inline-block; text-decoration: none;" [style.pointer-events]="ngb.Email ? \'none\' : \'auto\'">\n <img [src]="posterSrc" [title]="block.options.title" [ngStyle]="getVideoStyles()" alt="Video thumbnail" />\n</a>',styles:[":host{display:block;line-height:0}:host:hover .overflow{opacity:1}.overflow{position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgba(0,0,0,.3);opacity:0;will-change:opacity;transition:opacity .3s cubic-bezier(.075,.82,.165,1);cursor:pointer;color:#fff;display:flex;align-items:center;justify-content:center;font-size:3em}.overflow mat-icon{opacity:.8}img,video{max-width:100%;box-sizing:border-box}"]}]}],dt.ctorParameters=function(){return[{type:tt},{type:t.ChangeDetectorRef},{type:Xe},{type:ut}]},dt.propDecorators={align:[{type:t.HostBinding,args:["style.textAlign"]}]};var mt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return R(t,e),t.prototype.getButtonStyles=function(){var e=this.block.options,t=e.backgroundColor,n=e.border,i=e.color,o=e.font,r=e.lineHeight,a=e.innerPadding,l=e.fullWidth;return Object.assign(Object.assign(Object.assign(Object.assign({color:i,width:l?"100%":"auto",backgroundColor:t},ee(o)),Z(a)),Q(n)),te(r))},t.prototype.getParentStyles=function(){var e=this.block.options,t=e.align,n=e.padding;return Object.assign({justifyContent:("center"===t?"center":"right"===t&&"flex-end")||"flex-start"},Z(n))},t}(st);mt.decorators=[{type:t.Component,args:[{selector:"pb-button",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<div fxLayout [ngStyle]="getParentStyles()">\n <button type="button" [class.full-width]="block.options.fullWidth" [ngStyle]="getButtonStyles()">\n {{ block.innerText }}\n </button>\n</div>\n',encapsulation:t.ViewEncapsulation.Emulated,styles:["button{transition:all .5s cubic-bezier(.445,.05,.55,.95)}"]}]}];var gt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return R(t,e),t.prototype.getDividerStyles=function(){var e=this.block.options,t=e.border,n=e.padding;return Object.assign(Object.assign({},Q(t,"borderTop")),Z(n,"margin"))},t.prototype.ngOnInit=function(){},t}(st);gt.decorators=[{type:t.Component,args:[{selector:"pb-divider",template:'<div [ngStyle]="getDividerStyles()"></div>',styles:["\n :host {\n display: table;\n width: 100%;\n }\n "]}]}];var bt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return R(t,e),Object.defineProperty(t.prototype,"height",{get:function(){return ne(this.block.options.height)},enumerable:!1,configurable:!0}),t}(st);bt.decorators=[{type:t.Component,args:[{selector:"pb-spacer",template:"",styles:["\n :host {\n display: table;\n width: 100%;\n transition: all 500ms cubic-bezier(0.445, 0.05, 0.55, 0.95);\n }\n "]}]}],bt.propDecorators={height:[{type:t.HostBinding,args:["style.height"]}]};var ht=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return R(t,e),t.prototype.getParentStyles=function(){var e=this.block.options,t=e.color,n=e.font,i=e.lineHeight,o=e.padding;return Object.assign(Object.assign(Object.assign({color:t},te(i)),ee(n)),Z(o))},t.prototype.getLabelStyles=function(){var e=this.block.options.innerPadding;return Object.assign(Object.assign({},Z(e)),{lineHeight:0})},t.prototype.getSocialListStyles=function(){var e=this.block.options.align;return{display:"flex",placeContent:("left"===e?"flex-start":"right"===e&&"flex-end")||e}},t.prototype.getSocialListClasses=function(){return"social-list "+this.block.options.mode},t.prototype.getSocialNetworkIcon=function(e){return oe(e+".png")},t}(st);ht.decorators=[{type:t.Component,args:[{selector:"pb-social",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<div fxLayout [ngStyle]="getParentStyles()">\n <div [class]="getSocialListClasses()" [ngStyle]="getSocialListStyles()">\n <ng-container *ngIf="block.networks.length; else noSocialNetworks">\n <div class="social-list-item" *ngFor="let network of block.networks">\n <div [ngStyle]="getLabelStyles()">\n <img [src]="getSocialNetworkIcon(network.name)" [style.backgroundColor]="block.options.color" [width]="block.options.iconSize.value"\n [height]="block.options.iconSize.value" [classList]="network.name" [alt]="network.name" />\n </div>\n <span *ngIf="network.label">{{ network.label }}</span>\n </div>\n </ng-container>\n </div>\n</div>\n\n<ng-template #noSocialNetworks>\n <p i18n="social block|Empty social list message">Please add some social networks.</p>\n</ng-template>\n',styles:["/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */:host{display:block}p{margin:0}.social-list{display:flex;width:100%;flex-wrap:wrap}.social-list.horizontal{flex-direction:row}.social-list.vertical{flex-direction:column}.social-list-item{display:flex;flex-direction:row;align-items:center}.social-list-item img{border-radius:3px;background-color:#000}"]}]}];var ft=new Map,yt=function(){function e(e,t){this.cResolver=e,this.viewContainerRef=t,ft.set("text",ct),ft.set("image",pt),ft.set("video",dt),ft.set("button",mt),ft.set("divider",gt),ft.set("spacer",bt),ft.set("social",ht)}return Object.defineProperty(e.prototype,"pbDynamicComponent",{set:function(e){var t=this.cResolver.resolveComponentFactory(ft.get(e.type));this.viewContainerRef.createComponent(t).instance.block=e},enumerable:!1,configurable:!0}),e}();yt.decorators=[{type:t.Directive,args:[{selector:"[pbDynamicComponent]"}]}],yt.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.ViewContainerRef}]},yt.propDecorators={pbDynamicComponent:[{type:t.Input}]};var kt=function(){function e(e,t,n,i,o,r,a){var l;this.userInterfaceService=e,this.emailObjectStore=t,this.userRestApi=n,this.pbStorage=i,this.pbMiddlewaresService=o,this.sanitizer=r,this.userConfig=a,this.showTemplateList=null===(l=this.userConfig.templateListIfEmpty)||void 0===l||l,this.getStructures$=this.emailObjectStore.emailStructuresAsObservable$,this.activeMatProgress$=this.userInterfaceService.activeMatProgress$}return e.prototype.onHostClick=function(){this.userInterfaceService.editGeneralSettings()},e.prototype.trackBy=function(e){return e.id},e.prototype.disableStructureDrag$=function(e){return this.pbMiddlewaresService.disableStructureDragWithinEmailBody(e).pipe(i.take(1))},e.prototype.openTemplateDialog=function(e){var t=this;e.stopImmediatePropagation(),this.userInterfaceService.activeMatProgress$.next(!0);var o=this.pbStorage.getCachedTemplateList();return n.iif((function(){return o.length>0}),re(o),this.userRestApi.getAllUserTemplates$.pipe(i.tap((function(e){return t.pbStorage.cacheTemplateList(e)})))).pipe(i.map((function(e){return V(e,[{category:"latest",templates:t.pbStorage.getLatestUsedTemplates()}])})),i.finalize((function(){return t.userInterfaceService.activeMatProgress$.next(!1)})),i.exhaustMap((function(e){return(null==e?void 0:e.length)>0?t.userInterfaceService.templatesListDialog$(e):n.throwError(new Error("The template list is empty"))})),i.switchMap((function(e){var n=e.category,i=e.template;return t.pbMiddlewaresService.chooseTemplate(n,i)})),i.exhaustMap((function(e){var n=e.category,o=e.template;return t.userRestApi.getUserTemplateData$(n,o).pipe(i.tap((function(e){"latest"!==n&&t.pbStorage.addTemplateToLatestUsed(e)})))})),i.catchError((function(e){return t.pbMiddlewaresService.catchError(e).pipe(i.switchMap((function(){return t.userInterfaceService.notify(e.message),n.EMPTY})))})),i.take(1)).subscribe((function(e){e?t.emailObjectStore.setEmail(new Re(e.templateData)):t.userInterfaceService.notify("No template was chosen")}))},e.prototype.dropNewStructure=function(e){var t=this;e.previousContainer===e.container?this.emailObjectStore.changeStructureOrder(e):this.pbMiddlewaresService.addStructure(e).pipe(i.tap((function(e){return t.emailObjectStore.addStructure(e)})),i.take(1)).subscribe()},e.prototype.getStructureStyles=function(e){var t=e.options,n=t.border,i=t.background,o=t.padding,r=t.margin,a=t.columnsWidth,l=t.fullWidth;return Object.assign(Object.assign(Object.assign({width:l?"100%":this.emailObjectStore.Email.general.width.value+"px",backgroundRepeat:i.repeat,backgroundColor:i.color,backgroundSize:ne(i.size),backgroundPosition:"top center",gridTemplateColumns:a.map((function(e){return e+"fr"})).join(" ")},Q(n)),Z(o)),X(r))},e.prototype.getBackgroundImage=function(e){var t=e.options.background.url;return this.sanitizer.bypassSecurityTrustStyle(t&&"url("+t+")")},e}();kt.decorators=[{type:t.Component,args:[{selector:"pb-builder-container",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<ng-container *ngIf="getStructures$ | async as structures">\n <div cdkDropList [cdkDropListData]="structures"\n cdkDropListConnectedTo="structures-drop-list" id="structures-drop-list"\n (cdkDropListDropped)="dropNewStructure($event)" fxFlex fxLayout="column" fxLayoutAlign="start center">\n <pb-structure cdkDrag\n *ngFor="let structure of structures; trackBy: trackBy; let index = index" [id]="structure.id"\n [index]="index" [ngClass]="structure.type" [structure]="structure"\n [ngStyle]="getStructureStyles(structure)"\n [style.backgroundImage]="getBackgroundImage(structure)"\n [cdkDragDisabled]="disableStructureDrag$(structure) | async">\n <button cdkDragHandle mat-icon-button class="move" *ngIf="!(disableStructureDrag$(structure) | async)"\n i18n-matTooltip="structure|Move Structure" matTooltip="Move Structure">\n <mat-icon i18n-aria-label="structure|Move Structure" aria-label="Move structure" inline>pan_tool</mat-icon>\n </button>\n </pb-structure>\n\n <div class="empty-email mat-typography" *ngIf="!structures.length">\n <ng-content></ng-content>\n <div class="default-empty-email" *ngIf="showTemplateList">\n <h1 i18n="templates|First header">Choose template from list</h1>\n <p i18n="templates|Description">Or create one from scratch by dragging structures and blocks here!</p>\n <button type="button" color="primary" [disabled]="activeMatProgress$ | async"\n (click)="openTemplateDialog($event)" mat-flat-button i18n="templates|Choose a template button">\n Choose template\n </button>\n </div>\n </div>\n </div>\n</ng-container>\n',providers:[],changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */pb-structure>.cdk-drag-handle{position:absolute;cursor:move;border-radius:50% 50% 0 0;height:30px;width:30px;font-size:smaller;line-height:0;top:-30px;right:0;background-color:#ff4081;color:#fff;opacity:0}pb-structure.cdk-drag-preview>.cdk-drag-handle,pb-structure:hover>.cdk-drag-handle{opacity:.8}pb-structure.cdk-drag-preview>.cdk-drag-handle:hover,pb-structure:hover>.cdk-drag-handle:hover{opacity:1}pb-structure ::ng-deep .cdk-drag-placeholder{background-color:#3f51b5;opacity:.6;cursor:move;border-radius:0}pb-structure ::ng-deep .cdk-drag-placeholder ::ng-deep :not(mat-icon){display:none}pb-structure ::ng-deep .cdk-drag-placeholder ::ng-deep mat-icon{padding:5px;color:#fff}:host{background-color:#f2f2f2;overflow-x:hidden;overflow-y:auto;position:relative;height:100%}:host #structures-drop-list{height:-moz-fit-content;height:fit-content;max-width:100%;padding-bottom:3rem;will-change:box-shadow}:host #structures-drop-list .empty-email{display:flex;justify-content:center;align-items:center;flex-direction:column;flex:1 1 100%;margin-top:10%}:host #structures-drop-list .empty-email .default-empty-email{text-align:center}:host #structures-drop-list.cdk-drop-list-dragging .empty-email{display:none}"]}]}],kt.ctorParameters=function(){return[{type:Ze},{type:Ye},{type:Ge},{type:Ve},{type:He},{type:c.DomSanitizer},{type:void 0,decorators:[{type:t.Inject,args:[Le]}]}]},kt.propDecorators={onHostClick:[{type:t.HostListener,args:["click"]}]};var vt,qt,xt,wt=function(){function e(e,t,n){var i=this;this.pbEmailObject=e,this.fallbackFonts=n,this.fontsMap=new Map,this.stylesMap=new Map([["normal",$localize(vt||(vt=W([":@@font_style_normal:Normal"],[":@@font_style_normal:Normal"])))],["italic",$localize(qt||(qt=W([":@@font_style_italic:Italic"],[":@@font_style_italic:Italic"])))],["oblique",$localize(xt||(xt=W([":@@font_style_oblique:Oblique"],[":@@font_style_oblique:Oblique"])))]]),t.forEach((function(e){var t=G(e.match(/[^\d:,]{2,}|\d{3}/g)),n=t[0],o=t.slice(1);i.fontsMap.set(n.replace("+"," "),V(new Set(o.map(Number))))}))}return Object.defineProperty(e.prototype,"fontWeightList",{get:function(){return this.isGoogleFont()?this.fontsMap.get(this.font.family):[100,400,500,700,900]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"customFonts",{get:function(){return(this.pbEmailObject.Email.customFonts||[]).map((function(e){return e.family}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"customStack",{get:function(){return this.customFonts.join(", ")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontFamilyList",{get:function(){var e=this.customStack;return V(e?[e]:[],this.fontsMap.keys(),this.fallbackFonts)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fallbackFontChoices",{get:function(){var e=this.customStack;return V(e?[e]:[],this.fallbackFonts)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"styles",{get:function(){return V(this.stylesMap.keys())},enumerable:!1,configurable:!0}),e.prototype.markForCheck=function(){this.pbEmailObject.markForCheck()},e.prototype.isCustomFont=function(){return this.customFonts.includes(this.font.family)},e.prototype.isGoogleFont=function(){return this.fontsMap.has(this.font.family)},e.prototype.getStyleLabel=function(e){return this.stylesMap.get(e)},e.prototype.hasProperty=function(e){return this.font.hasOwnProperty(e)},e}();wt.decorators=[{type:t.Component,args:[{selector:"pb-font-styles",template:'\n <div class="group two">\n <mat-form-field appearance="outline" *ngIf="hasProperty(\'family\')">\n <mat-label i18n="settings|Font Family">Family</mat-label>\n <mat-select [(value)]="font.family" disableRipple (selectionChange)="markForCheck()">\n <mat-option *ngFor="let name of fontFamilyList" [ngStyle]="{ fontFamily: name }" [value]="name">\n {{ name }}\n </mat-option>\n </mat-select>\n <mat-hint *ngIf="isGoogleFont()" i18n="settings|Partial support">Partial support.</mat-hint>\n <mat-hint *ngIf="isCustomFont()" i18n="settings|Custom font">Custom font.</mat-hint>\n <mat-hint *ngIf="!isGoogleFont() && !isCustomFont()" i18n="settings|Full support">Full support.</mat-hint>\n </mat-form-field>\n <mat-form-field appearance="outline" *ngIf="hasProperty(\'fallback\')">\n <mat-label i18n="settings|Font Fallback">Fallback</mat-label>\n <mat-select [(value)]="font.fallback" [disabled]="!isGoogleFont() && !isCustomFont()" disableRipple (selectionChange)="markForCheck()">\n <mat-option *ngFor="let name of fallbackFontChoices" [ngStyle]="{ fontFamily: name }" [value]="name">\n {{ name }}\n </mat-option>\n </mat-select>\n <mat-hint i18n="settings|Full support">Full support.</mat-hint>\n </mat-form-field>\n </div>\n\n <div class="group three">\n <mat-form-field appearance="outline" *ngIf="hasProperty(\'size\')">\n <mat-label i18n="settings|Font Size">Size</mat-label>\n <input matInput type="number" max="30" min="10" step="1" (input)="markForCheck()" [(ngModel)]="font.size" />\n </mat-form-field>\n <mat-form-field appearance="outline" *ngIf="hasProperty(\'weight\')">\n <mat-label i18n="settings|Font Weight">Weight</mat-label>\n <mat-select placeholder="Weight" [(value)]="font.weight" disableRipple (selectionChange)="markForCheck()">\n <mat-option *ngFor="let weight of fontWeightList" [value]="weight">\n {{ weight }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field appearance="outline" style="min-width: 90px;">\n <mat-label i18n="settings|Font Style">Style</mat-label>\n <mat-select placeholder="Style" [(value)]="font.style" disableRipple (selectionChange)="markForCheck()">\n <mat-option *ngFor="let style of styles" [value]="style" i18n>\n {{ getStyleLabel(style) }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n width: 100%;\n }\n "]}]}],wt.ctorParameters=function(){return[{type:Ye},{type:Array,decorators:[{type:t.Inject,args:[Te]}]},{type:Array,decorators:[{type:t.Inject,args:[Oe]}]}]},wt.propDecorators={font:[{type:t.Input}]};var St=function(){function e(e){this.emailObject=e}return e.prototype.markForCheck=function(){this.emailObject.markForCheck()},e}();St.decorators=[{type:t.Component,args:[{selector:"pb-padding",template:'\n <div class="group four">\n <mat-form-field appearance="outline">\n <mat-label i18n="Padding Settings|Padding Top">Top</mat-label>\n <input matInput type="number" min="0" step="1" (input)="markForCheck()" [(ngModel)]="padding.top" />\n </mat-form-field>\n <mat-form-field appearance="outline">\n <mat-label i18n="Padding Settings|Padding Right">Right</mat-label>\n <input matInput type="number" min="0" step="1" (input)="markForCheck()" [(ngModel)]="padding.right" />\n </mat-form-field>\n <mat-form-field appearance="outline">\n <mat-label i18n="Padding Settings|Padding Bottom">Bottom</mat-label>\n <input matInput type="number" min="0" step="1" (input)="markForCheck()" [(ngModel)]="padding.bottom" />\n </mat-form-field>\n <mat-form-field appearance="outline">\n <mat-label i18n="Padding Settings|Padding Left">Left</mat-label>\n <input matInput type="number" min="0" step="1" (input)="markForCheck()" [(ngModel)]="padding.left" />\n </mat-form-field>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n width: 100%;\n }\n "]}]}],St.ctorParameters=function(){return[{type:Ye}]},St.propDecorators={padding:[{type:t.Input}]};var It,Ct,Pt,Bt,Tt=function(){function e(e){this.emailObject=e,this.label=$localize(It||(It=W([":@@line_height_label:Line Height"],[":@@line_height_label:Line Height"]))),this.units=["%","px","none"],this.unitsLabels=new Map([["%",$localize(Ct||(Ct=W([":@@unit_percent:Percent"],[":@@unit_percent:Percent"])))],["px",$localize(Pt||(Pt=W([":@@unit_pixels:Pixels"],[":@@unit_pixels:Pixels"])))],["none",$localize(Bt||(Bt=W([":@@unit_none:None"],[":@@unit_none:None"])))]])}return e.prototype.markForCheck=function(){this.emailObject.markForCheck()},e.prototype.getUnitLabel=function(e){return this.unitsLabels.get(e)},e}();Tt.decorators=[{type:t.Component,args:[{selector:"pb-line-height",template:'\n <div class="group">\n <mat-form-field appearance="outline">\n <mat-label>{{ label }}</mat-label>\n <input\n matInput\n [(ngModel)]="lineHeight.value"\n type="number"\n step="1"\n (input)="markForCheck()"\n [disabled]="lineHeight.unit === \'none\'"\n />\n </mat-form-field>\n <mat-form-field appearance="outline">\n <mat-label i18n="Line Height Settings|Change Line Height Unit">Unit</mat-label>\n <mat-select placeholder="Unit" [(value)]="lineHeight.unit" (selectionChange)="markForCheck()" disableRipple>\n <mat-option *ngFor="let unit of units" [value]="unit" i18n>\n {{ getUnitLabel(unit) }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n width: 100%;\n }\n "]}]}],Tt.ctorParameters=function(){return[{type:Ye}]},Tt.propDecorators={lineHeight:[{type:t.Input}],label:[{type:t.Input}],units:[{type:t.Input}]};var $t,Ot,jt,Dt,_t=function(){function e(e){this.emailObject=e,this.disabled=!1,this.units=new Map([["%",$localize($t||($t=W([":@@unit_percent:Percent"],[":@@unit_percent:Percent"])))],["px",$localize(Ot||(Ot=W([":@@unit_pixels:Pixels"],[":@@unit_pixels:Pixels"])))],["contain",$localize(jt||(jt=W([":@@unit_contain:Contain"],[":@@unit_contain:Contain"])))],["cover",$localize(Dt||(Dt=W([":@@unit_cover:Cover"],[":@@unit_cover:Cover"])))]])}return e.prototype.markForCheck=function(){this.emailObject.markForCheck()},e.prototype.getLabel=function(){return this.label},e.prototype.toggleChange=function(e){var t=e.checked;this.model.auto=t,this.markForCheck()},e.prototype.getUnits=function(){return this.model.units||["%","px"]},e.prototype.disableValueField=function(){return this.model.auto||-1===["%","px"].indexOf(this.model.unit)},e.prototype.showAutoSlider=function(){return this.model.hasOwnProperty("auto")},e.prototype.getUnitLabel=function(e){return this.units.get(e)},e}();_t.decorators=[{type:t.Component,args:[{selector:"pb-width-height",template:'\n <div class="group" [ngClass]="{ three: showAutoSlider() }">\n <mat-form-field appearance="outline">\n <mat-label>{{ getLabel() }}</mat-label>\n <input\n matInput\n [(ngModel)]="model.value"\n [disabled]="disableValueField() || disabled"\n type="number"\n [placeholder]="getLabel()"\n (input)="markForCheck()"\n />\n </mat-form-field>\n <mat-form-field appearance="outline">\n <mat-label i18n="Size Settings|Size Unit">Unit</mat-label>\n <mat-select [disabled]="model.auto || disabled" [(value)]="model.unit" (selectionChange)="markForCheck()" disableRipple>\n <mat-option *ngFor="let unit of getUnits()" [value]="unit" i18n>\n {{ getUnitLabel(unit) }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-slide-toggle\n style="margin-top: -20px;"\n *ngIf="showAutoSlider()"\n [checked]="model.auto"\n (change)="toggleChange($event)"\n [disabled]="disabled"\n i18n="Size Settings|Size Auto"\n >\n Auto\n </mat-slide-toggle>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n width: 100%;\n }\n "]}]}],_t.ctorParameters=function(){return[{type:Ye}]},_t.propDecorators={model:[{type:t.Input}],label:[{type:t.Input}],disabled:[{type:t.Input}]};var Mt,Et,Lt,Ft,At,zt=function(){function e(e){this.emailObject=e,this._styleLabels=new Map([["solid",$localize(Mt||(Mt=W([":@@border_style_solid:Solid"],[":@@border_style_solid:Solid"])))],["dotted",$localize(Et||(Et=W([":@@border_style_dotted:Dotted"],[":@@border_style_dotted:Dotted"])))],["dashed",$localize(Lt||(Lt=W([":@@border_style_dashed:Dashed"],[":@@border_style_dashed:Dashed"])))],["double",$localize(Ft||(Ft=W([":@@border_style_double:Double"],[":@@border_style_double:Double"])))],["groove",$localize(At||(At=W([":@@border_style_groove:Groove"],[":@@border_style_groove:Groove"])))]])}return Object.defineProperty(e.prototype,"styleLabels",{get:function(){return V(this._styleLabels.keys())},enumerable:!1,configurable:!0}),e.prototype.getStyleLabel=function(e){return this._styleLabels.get(e)},e.prototype.markForCheck=function(){this.emailObject.markForCheck()},e.prototype.isEven=function(){return Object.keys(this.border).length%2==0},e.prototype.hasOwnProperty=function(e){return this.border.hasOwnProperty(e)},e}();zt.decorators=[{type:t.Component,args:[{selector:"pb-border",template:'\n <div class="group" [class.three]="isEven()">\n <mat-form-field appearance="outline" *ngIf="hasOwnProperty(\'width\')">\n <mat-label i18n="Border Settings|Change Border Width">Width</mat-label>\n <input\n matInput\n [(ngModel)]="border.width"\n type="number"\n min="0"\n step="1"\n (input)="markForCheck()"\n i18n-placeholder\n placeholder="Border Settings|Change Border Width"\n />\n </mat-form-field>\n <mat-form-field appearance="outline" *ngIf="hasOwnProperty(\'radius\')">\n <mat-label i18n="Border Settings|Change Border Radius">Radius</mat-label>\n <input\n matInput\n [(ngModel)]="border.radius"\n type="number"\n min="0"\n step="1"\n (input)="markForCheck()"\n i18n-placeholder\n placeholder="Border Settings|Change Border Radius"\n />\n </mat-form-field>\n <mat-form-field appearance="outline" *ngIf="hasOwnProperty(\'style\')" style="min-width: 90px">\n <mat-label i18n="Border Settings|Change Border Style">Style</mat-label>\n <mat-select\n placeholder="Style"\n [disabled]="!border.width"\n [(value)]="border.style"\n (selectionChange)="markForCheck()"\n disableRipple\n >\n <mat-option *ngFor="let style of styleLabels" [value]="style">\n {{ getStyleLabel(style) }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <pb-color [options]="border" [disabled]="!border.width" *ngIf="hasOwnProperty(\'color\')" key="color"></pb-color>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n width: 100%;\n }\n\n mat-form-field {\n width: 100%;\n }\n "]}]}],zt.ctorParameters=function(){return[{type:Ye}]},zt.propDecorators={border:[{type:t.Input}]};var Rt=function(){function e(e){this.emailObject=e,this.disabled=!1,this.key="backgroundColor",this.transparent=!1,this.showColorPicker=!1}return Object.defineProperty(e.prototype,"currentColorModel",{get:function(){return this.options[this.key]},set:function(e){this.options[this.key]=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentColor",{get:function(){return this.transparent?this.oldValue:this.currentColorModel},set:function(e){this.currentColorModel=e},enumerable:!1,configurable:!0}),e.prototype.onHostMouseLeave=function(){this.showColorPicker=!1},e.prototype.changeColor=function(e){this.currentColor=e.color.hex,this.emailObject.markForCheck()},e.prototype.makeTransparentColor=function(){this.showColorPicker=!1,this.transparent?(this.oldValue=this.currentColorModel,this.currentColor="transparent"):this.currentColor=this.oldValue,this.emailObject.markForCheck()},e.prototype.ngOnInit=function(){"transparent"===this.currentColor&&(this.transparent=!0,this.oldValue="#ffffff")},e}();Rt.decorators=[{type:t.Component,args:[{selector:"pb-color",template:'\n <div class="group" *ngIf="showTransparent">\n <mat-slide-toggle\n [disabled]="disabled"\n [(ngModel)]="transparent"\n (change)="makeTransparentColor()"\n i18n="Color settings|Make color transparent"\n >\n Transparent\n </mat-slide-toggle>\n </div>\n <div class="group two">\n <mat-form-field appearance="outline">\n <mat-label i18n="Color settings|Change color">Color</mat-label>\n <input matInput [disabled]="transparent || disabled" (focus)="showColorPicker = false" [(ngModel)]="currentColor" type="text" />\n </mat-form-field>\n <div class="choose-color" [class.transparent]="transparent || disabled">\n <div class="current-color" (mouseover)="showColorPicker = !transparent" [style.backgroundColor]="currentColor"></div>\n <color-chrome\n [disableAlpha]="true"\n *ngIf="showColorPicker"\n (onChangeComplete)="changeColor($event)"\n [color]="currentColor"\n ></color-chrome>\n </div>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n position: relative;\n }\n\n mat-form-field {\n width: 100%;\n }\n\n .choose-color {\n display: block;\n height: 100%;\n width: 100%;\n }\n\n .current-color {\n width: 100%;\n height: 48px;\n border-radius: 5px;\n margin: 0.25em 0;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid rgba(0, 0, 0, 0.12);\n transition: background-color 500ms cubic-bezier(0.445, 0.05, 0.55, 0.95);\n }\n\n .choose-color.transparent .current-color {\n opacity: 0.5;\n pointer-events: none;\n }\n\n color-chrome {\n position: absolute;\n top: calc(100% - 1em);\n right: 0;\n z-index: 9;\n }\n "]}]}],Rt.ctorParameters=function(){return[{type:Ye}]},Rt.propDecorators={options:[{type:t.Input}],showTransparent:[{type:t.Input}],disabled:[{type:t.Input}],key:[{type:t.Input}],onHostMouseLeave:[{type:t.HostListener,args:["mouseleave"]}]};var Ut,Ht,Nt,Gt,Vt=function(){function e(e){this.emailObject=e,this.targetLabels=new Map([["_blank",$localize(Ut||(Ut=W([":@@link_target_blank:Blank"],[":@@link_target_blank:Blank"])))],["_self",$localize(Ht||(Ht=W([":@@link_target_self:Self"],[":@@link_target_self:Self"])))],["_parent",$localize(Nt||(Nt=W([":@@link_target_parent:Parent"],[":@@link_target_parent:Parent"])))],["_top",$localize(Gt||(Gt=W([":@@link_target_top:Top"],[":@@link_target_top:Top"])))]])}return e.prototype.markForCheck=function(){this.emailObject.markForCheck()},e.prototype.getTargets=function(){return["_blank","_self","_parent","_top"]},e.prototype.getTargetLabel=function(e){return this.targetLabels.get(e)},e}();Vt.decorators=[{type:t.Component,args:[{selector:"pb-link",template:'\n <div class="group f-large">\n <mat-form-field appearance="outline">\n <mat-label i18n="Link Settings|Link">Link</mat-label>\n <input matInput [(ngModel)]="link.href" type="url" placeholder="Link" (blur)="markForCheck()" />\n </mat-form-field>\n <mat-form-field appearance="outline">\n <mat-label i18n="Link Settings|Target">Target</mat-label>\n <mat-select\n placeholder="Target"\n i18n-placeholder="Link Settings|Target"\n [(value)]="link.target"\n disableRipple\n (selectionChange)="markForCheck()"\n >\n <mat-option *ngFor="let target of getTargets()" [value]="target">\n {{ getTargetLabel(target) }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n width: 100%;\n }\n "]}]}],Vt.ctorParameters=function(){return[{type:Ye}]},Vt.propDecorators={link:[{type:t.Input}]};var Wt,Yt,Kt,Jt,Qt,Zt,Xt=function(){function e(e){this.emailObject=e,this.mode="horizontal",this.labels=new Map([["left",$localize(Wt||(Wt=W([":@@horizontal_align_left:Left"],[":@@horizontal_align_left:Left"])))],["center",$localize(Yt||(Yt=W([":@@horizontal_align_center:Center"],[":@@horizontal_align_center:Center"])))],["right",$localize(Kt||(Kt=W([":@@horizontal_align_right:Right"],[":@@horizontal_align_right:Right"])))],["top",$localize(Jt||(Jt=W([":@@vertical_align_top:Top"],[":@@vertical_align_top:Top"])))],["middle",$localize(Qt||(Qt=W([":@@vertical_align_middle:Middle"],[":@@vertical_align_middle:Middle"])))],["bottom",$localize(Zt||(Zt=W([":@@vertical_align_bottom:Bottom"],[":@@vertical_align_bottom:Bottom"])))]])}return Object.defineProperty(e.prototype,"currentModel",{get:function(){return this.model.align||this.model.verticalAlign},set:function(e){this.model.align?this.model.align=e:this.model.verticalAlign=e,this.emailObject.markForCheck()},enumerable:!1,configurable:!0}),e.prototype.getLabel=function(e){return this.labels.get(e)},e.prototype.getPositions=function(){return"vertical"===this.mode?["top","middle","bottom"]:["left","center","right"]},e}();Xt.decorators=[{type:t.Component,args:[{selector:"pb-align",template:'\n <mat-form-field appearance="outline">\n <mat-label [ngSwitch]="mode">\n <ng-container *ngSwitchCase="\'vertical\'" i18n="Align Settings|Vertical Align">Vertical Align</ng-container>\n <ng-container *ngSwitchDefault i18n="Align Settings|Align">Align</ng-container>\n </mat-label>\n <mat-select [(ngModel)]="currentModel" disableRipple [disabled]="disabled">\n <mat-option *ngFor="let position of getPositions()" [value]="position">\n {{ getLabel(position) }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n width: 100%;\n }\n\n mat-form-field {\n width: 100%;\n }\n "]}]}],Xt.ctorParameters=function(){return[{type:Ye}]},Xt.propDecorators={model:[{type:t.Input}],mode:[{type:t.Input}],disabled:[{type:t.Input}]};var en,tn,nn=function(){function e(e){this.emailObject=e,this.dirLabels=new Map([["ltr",$localize(en||(en=W([":@@direction_ltr:Left to right"],[":@@direction_ltr:Left to right"])))],["rtl",$localize(tn||(tn=W([":@@direction_rtl:Right to left"],[":@@direction_rtl:Right to left"])))]])}return e.prototype.markForCheck=function(){this.emailObject.markForCheck()},e.prototype.getDirections=function(){return["ltr","rtl"]},e.prototype.getDirectionLabel=function(e){return this.dirLabels.get(e)},e}();nn.decorators=[{type:t.Component,args:[{selector:"pb-direction",template:'\n <mat-form-field appearance="outline">\n <mat-label i18n="settings|Direction">Direction</mat-label>\n <mat-select\n i18n-placeholder="settings|Direction"\n placeholder="Direction"\n [(value)]="model.direction"\n (selectionChange)="markForCheck()"\n disableRipple\n >\n <mat-option *ngFor="let dir of getDirections()" [value]="dir">\n {{ getDirectionLabel(dir) }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n width: 100%;\n }\n\n mat-form-field {\n width: 100%;\n }\n "]}]}],nn.ctorParameters=function(){return[{type:Ye}]},nn.propDecorators={model:[{type:t.Input}]};var on,rn,an,ln,sn,cn,pn=function(){function e(){this.disabled=!1,this.repeatLabels=new Map([["no-repeat",$localize(on||(on=W([":@@no_repeat:No"],[":@@no_repeat:No"])))],["repeat",$localize(rn||(rn=W([":@@repeat:Repeat"],[":@@repeat:Repeat"])))],["repeat-x",$localize(an||(an=W([":@@repeat_x:X"],[":@@repeat_x:X"])))],["repeat-y",$localize(ln||(ln=W([":@@repeat_y:Y"],[":@@repeat_y:Y"])))],["round",$localize(sn||(sn=W([":@@repeat_round:Round"],[":@@repeat_round:Round"])))],["space",$localize(cn||(cn=W([":@@repeat_space:Space"],[":@@repeat_space:Space"])))]])}return e.prototype.getRepeats=function(){return["no-repeat","repeat","repeat-x","repeat-y"]},e.prototype.getRepeatLabel=function(e){return this.repeatLabels.get(e)},e}();pn.decorators=[{type:t.Component,args:[{selector:"pb-back-repeat",template:'\n <mat-form-field appearance="outline">\n <mat-label i18n="settings|Background Repeat">Repeat</mat-label>\n <mat-select [(value)]="model.repeat" [disabled]="disabled" disableRipple>\n <mat-option *ngFor="let repeat of getRepeats()" [value]="repeat">\n {{ getRepeatLabel(repeat) }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n width: 100%;\n }\n\n mat-form-field {\n width: 100%;\n }\n "]}]}],pn.propDecorators={model:[{type:t.Input}],disabled:[{type:t.Input}]};var un=new Map([["desktop","1 1 100%"],["smartphone","1 1 360px"],["tablet","1 1 768px"]]),dn=function(){function e(e,t){this.middlewares=e,this.sanitizer=t,this.device="desktop"}return e.prototype.changeDevice=function(e){var t=this;return this.middlewares.togglePreviewDevice(e).pipe(i.take(1)).subscribe((function(e){t.device=e}))},e.prototype.getFlexWidth=function(){return un.get(this.device)},e.prototype.ngOnInit=function(){this.src=URL.createObjectURL(new Blob([this.template],{type:"text/html"})),this.templateSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src)},e.prototype.ngOnDestroy=function(){this.src&&URL.revokeObjectURL(this.src)},e}();dn.decorators=[{type:t.Component,args:[{selector:"pb-preview-template",template:'\n <iframe [src]="templateSrc" [fxFlex]="getFlexWidth()"></iframe>\n <mat-button-toggle-group value="desktop" (change)="changeDevice($event)" vertical>\n <mat-button-toggle value="desktop" matTooltip="Desktop / 100%" matTooltipPosition="left">\n <mat-icon>desktop_windows</mat-icon>\n </mat-button-toggle>\n <mat-button-toggle value="tablet" matTooltip="Tablet / 768px" matTooltipPosition="left">\n <mat-icon>tablet</mat-icon>\n </mat-button-toggle>\n <mat-button-toggle value="smartphone" matTooltip="Smartphone / 360px" matTooltipPosition="left">\n <mat-icon>smartphone</mat-icon>\n </mat-button-toggle>\n </mat-button-toggle-group>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n iframe {\n border: 0;\n will-change: width;\n transition: all 500ms ease-in-out;\n }\n\n /* iframe a[href] {\n pointer-events: none;\n } */\n\n /* iframe.active {\n opacity: 1;\n } */\n\n mat-button-toggle-group {\n position: absolute;\n right: 0;\n background: white;\n }\n "]}]}],dn.ctorParameters=function(){return[{type:He},{type:c.DomSanitizer}]},dn.propDecorators={template:[{type:t.Input}]};var mn=function(){function e(e,t,i,o,r){this.pbMiddlewaresService=e,this.userInterfaceService=t,this.emailObjectStore=i,this.chRef=o,this.elementRef=r,this.isActive=!1,this.isHighlighted=!1,this.isDimmed=!1,this.componentIsDestroyed$=new n.Subject}return e.prototype.onHostClick=function(e){e.stopImmediatePropagation(),this.editBlock()},Object.defineProperty(e.prototype,"isBlockActive",{get:function(){return this.isActive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isBlockHighlighted",{get:function(){return this.isHighlighted},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isBlockDimmed",{get:function(){return this.isDimmed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockId",{get:function(){var e;return null===(e=this.block)||void 0===e?void 0:e.id},enumerable:!1,configurable:!0}),e.prototype.removeBlock=function(){var e=this;this.pbMiddlewaresService.removeBlock(this.index,this.column,this.block).pipe(i.exhaustMap((function(){return e.userInterfaceService.confirmDialog$()})),i.filter((function(e){return e})),i.take(1)).subscribe((function(){e.emailObjectStore.removeBlock(e.index,e.column)}))},e.prototype.duplicateBlock=function(){var e=this;this.pbMiddlewaresService.duplicateBlock(this.index,this.column,this.block).pipe(i.map((function(t){return e.emailObjectStore.duplicateBlock(t.index,t.column,t.block)})),i.take(1)).subscribe((function(){}))},e.prototype.clearHighlight=function(e){e.stopPropagation(),this.userInterfaceService.clearBlockHighlight()},e.prototype.editBlock=function(){var e=this;this.pbMiddlewaresService.editBlock(this.block).pipe(i.take(1)).subscribe((function(t){e.userInterfaceService.editBlock(t)}))},e.prototype.ngOnInit=function(){var e=this;this.userInterfaceService.currentEditingBlock$.pipe(i.map((function(t){return t===e.block})),i.takeUntil(this.componentIsDestroyed$)).subscribe((function(t){e.isActive=t})),this.userInterfaceService.blockHighlight$.pipe(i.takeUntil(this.componentIsDestroyed$)).subscribe((function(t){if(e.isHighlighted=(null==t?void 0:t.blockId)===e.block.id,e.isDimmed=Boolean(t)&&!e.isHighlighted,t&&e.isHighlighted&&!1!==t.options.scrollIntoView){var n=e.elementRef.nativeElement.scrollIntoView;"function"==typeof n&&n.call(e.elementRef.nativeElement,{behavior:t.options.behavior||"smooth",block:t.options.block||"center",inline:"nearest"})}e.chRef.markForCheck()}))},e.prototype.ngDoCheck=function(){this.isActive&&this.chRef.markForCheck()},e.prototype.ngOnDestroy=function(){this.componentIsDestroyed$.next(""),this.componentIsDestroyed$.complete()},e}();mn.decorators=[{type:t.Component,args:[{selector:"pb-block",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<ng-content select=".move"></ng-content>\n<button\n *ngIf="isHighlighted"\n type="button"\n mat-icon-button\n class="highlight-clear"\n (click)="clearHighlight($event)"\n i18n-aria-label="block|Clear highlighted block"\n aria-label="Clear block highlight"\n i18n-matTooltip="block|Clear highlighted block"\n matTooltip="Clear highlight">\n <mat-icon aria-hidden="true" inline>close</mat-icon>\n</button>\n<div class="tools" fxLayout fxLayoutGap="0.25rem">\n <button mat-icon-button (click)="duplicateBlock()" i18n-matTooltip="block|Duplicate Block"\n matTooltip="Duplicate Block">\n <mat-icon i18n-aria-label="block|Duplicate Block" aria-label="Duplicate block" inline>file_copy</mat-icon>\n </button>\n <button mat-icon-button (click)="removeBlock()" i18n-matTooltip="block|Remove Block" class="delete"\n matTooltip="Remove Block">\n <mat-icon i18n-aria-label="block|Remove Block" aria-label="Delete block" inline>delete_forever</mat-icon>\n </button>\n</div>\n<ng-content *pbDynamicComponent="block"></ng-content>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */:host{display:block;position:relative;transition:box-shadow .2s ease-in-out,opacity .2s ease-in-out}:host.active:not(.cdk-drag-preview)>.tools{opacity:1;display:flex!important}:host.active,:host.cdk-drag-placeholder,:host.cdk-drag-preview{z-index:3;box-shadow:0 0 0 2px #3f51b5}:host:hover:not(.active){box-shadow:0 0 0 2px rgba(63,81,181,.5)}:host.pb-block-dimmed:not(.cdk-drag-preview){opacity:.3}:host.pb-block-highlighted:not(.cdk-drag-preview){opacity:1;z-index:4;box-shadow:0 0 0 3px #ff9800}:host>.highlight-clear{position:absolute;z-index:5;top:4px;right:4px;width:30px;height:30px;line-height:30px;color:#8a4f00;background:#fff;border:2px solid #ff9800;box-shadow:0 1px 4px rgba(0,0,0,.3)}:host>.highlight-clear mat-icon{font-size:18px;line-height:18px}:host>.tools{direction:ltr;opacity:0;z-index:4;position:absolute;max-width:100%;bottom:-25px;right:0;display:none!important;transition:all .5s ease-in-out}:host>.tools>button{background:#3f51b5;border-radius:3px;color:#fff;line-height:0;width:25px;height:25px}:host>.tools>button mat-icon{font-size:14px;margin-top:-3px}:host>.tools ::ng-deep+*>*{transition:all .5s cubic-bezier(.445,.05,.55,.95)}"]}]}],mn.ctorParameters=function(){return[{type:He},{type:Ze},{type:Ye},{type:t.ChangeDetectorRef},{type:t.ElementRef}]},mn.propDecorators={block:[{type:t.Input}],column:[{type:t.Input}],index:[{type:t.Input}],onHostClick:[{type:t.HostListener,args:["click",["$event"]]}],isBlockActive:[{type:t.HostBinding,args:["class.active"]}],isBlockHighlighted:[{type:t.HostBinding,args:["class.pb-block-highlighted"]}],isBlockDimmed:[{type:t.HostBinding,args:["class.pb-block-dimmed"]}],blockId:[{type:t.HostBinding,args:["attr.data-pb-block-id"]}]};var gn=function(){function e(e,t){this.imageUpload=e,this.emailObject=t,this.key="src",this.browsing=new n.Subject}return Object.defineProperty(e.prototype,"source",{get:function(){return this.block[this.key]},set:function(e){this.block[this.key]=e},enumerable:!1,configurable:!0}),e.prototype.markForCheck=function(){this.emailObject.markForCheck()},e.prototype.browse=function(){return U(this,void 0,void 0,(function(){var e;return H(this,(function(t){switch(t.label){case 0:this.browsing.next(!0),t.label=1;case 1:return t.trys.push([1,,3,4]),[4,this.imageUpload.browse$().toPromise()];case 2:return(e=t.sent())&&(this.source=e,this.emailObject.markForCheck()),[3,4];case 3:return this.browsing.next(!1),[7];case 4:return[2]}}))}))},e.prototype.ngOnInit=function(){this.source=this.block.src||this.block.url},e}();gn.decorators=[{type:t.Component,args:[{selector:"pb-image-upload",template:'\n <div fxLayout fxLayoutAlign="space-between center">\n <div class="image-info" [fxFlex]="source ? \'30%\' : \'60%\'" fxLayout fxLayoutGap="0.5em" fxLayoutAlign="center center">\n <div *ngIf="source" class="chose-image">\n <img [src]="source" alt="image source" />\n </div>\n <span *ngIf="!source" style="width: 100%;" i18n="Upload Image Settings|Upload an image"> Upload an image </span>\n </div>\n <button\n type="button"\n (click)="browse()"\n [disabled]="browsing | async"\n color="primary"\n mat-stroked-button\n i18n="Upload Image Settings|Browse"\n >\n Browse\n </button>\n </div>\n <mat-form-field appearance="outline" style="width: 100%">\n <mat-label i18n="Upload Image Settings|Image Source">Image Source</mat-label>\n <input matInput [(ngModel)]="source" type="url" (input)="markForCheck()" />\n </mat-form-field>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n }\n\n .chose-image {\n width: 100%;\n max-height: 60px;\n overflow: hidden;\n border-radius: 3px;\n line-height: 0;\n }\n\n .chose-image img {\n width: 100%;\n height: 60px;\n object-fit: cover;\n object-position: center;\n }\n\n .size {\n font-size: 80%;\n color: #ccc;\n }\n\n mat-form-field {\n margin-top: 0.5rem;\n }\n "]}]}],gn.ctorParameters=function(){return[{type:tt},{type:Ye}]},gn.propDecorators={block:[{type:t.Input}],key:[{type:t.Input}]};var bn=function(){function e(e,t,n){this.internalService=e,this.emailObject=t,this.networks=n,this.block$=this.internalService.currentEditingBlock$}return e.prototype.hasProperty=function(e,t){return e.hasOwnProperty(t)},e.prototype.markForCheck=function(){this.emailObject.markForCheck()},e.prototype.socialNetworks=function(e){return this.networks.filter((function(t){return!e.networks.find((function(e){return e.name===t}))})).sort()},e.prototype.addSocialNetwork=function(e,t){var n=e.value,i=e.source;t.networks.push({name:n,href:"",label:""}),i.value="",this.markForCheck()},e.prototype.removeSocialNetwork=function(e,t){t.networks=t.networks.filter((function(t){return t!==e})),this.markForCheck()},e.prototype.getSocialIcon=function(e){return oe(e+".png")},e}();bn.decorators=[{type:t.Component,args:[{selector:"pb-block-settings",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<ng-container *ngIf="block$ | async as currentBlock">\n <mat-accordion>\n <mat-expansion-panel expanded *ngIf="hasProperty(currentBlock.options, \'font\')">\n <mat-expansion-panel-header i18n="settings|Font">\n Font\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-color [options]="currentBlock.options" key="color"></pb-color>\n <pb-font-styles [font]="currentBlock.options.font"></pb-font-styles>\n <pb-line-height *ngIf="currentBlock.type !== \'social\'" [lineHeight]="currentBlock.options.lineHeight">\n </pb-line-height>\n </ng-template>\n </mat-expansion-panel>\n\n <ng-container *ngIf="currentBlock.type === \'image\'">\n <mat-expansion-panel expanded>\n <mat-expansion-panel-header i18n="settings|Image">\n Image\n </mat-expansion-panel-header>\n <pb-image-upload [block]="currentBlock"></pb-image-upload>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="settings|Image Attributes">\n Attributes\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <div class="group f-large">\n <mat-form-field appearance="outline">\n <mat-label i18n="settings|Image Alt">Alt</mat-label>\n <input matInput [(ngModel)]="currentBlock.options.title" type="text" i18n-placeholder\n placeholder="settings|Image Alt" (input)="markForCheck()" />\n </mat-form-field>\n <pb-align [model]="currentBlock.options"></pb-align>\n </div>\n <pb-link [link]="currentBlock.options.link"></pb-link>\n </ng-template>\n </mat-expansion-panel>\n </ng-container>\n\n <ng-container *ngIf="currentBlock.type === \'video\'">\n <mat-expansion-panel expanded>\n <mat-expansion-panel-header i18n="settings|Video">\n Video URL\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <div class="group" style="grid-template-columns: 1fr;">\n <mat-form-field appearance="outline" style="width: 100%">\n <mat-label i18n="settings|Video URL">Video URL (YouTube or Vimeo)</mat-label>\n <input matInput [(ngModel)]="currentBlock.src" type="url" i18n-placeholder\n placeholder="settings|Video URL" (input)="markForCheck()" />\n <mat-hint i18n="settings|Video URL Hint">Thumbnail with play button will be auto-generated</mat-hint>\n </mat-form-field>\n </div>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="settings|Video Attributes">\n Attributes\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <div class="group f-large">\n <mat-form-field appearance="outline">\n <mat-label i18n="settings|Video Alt">Alt Text</mat-label>\n <input matInput [(ngModel)]="currentBlock.options.title" type="text" i18n-placeholder\n placeholder="settings|Video Alt" (input)="markForCheck()" />\n </mat-form-field>\n <pb-align [model]="currentBlock.options"></pb-align>\n </div>\n </ng-template>\n </mat-expansion-panel>\n </ng-container>\n\n <ng-container *ngIf="currentBlock.type === \'button\'">\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="settings|Button Text">\n Button Text\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <mat-form-field appearance="outline" style="width: 100%">\n <mat-label i18n="settings|Button Text">Button Text</mat-label>\n <input matInput [(ngModel)]="currentBlock.innerText" type="text" i18n-placeholder\n placeholder="settings|Button Text" (input)="markForCheck()" />\n </mat-form-field>\n </ng-template>\n </mat-expansion-panel>\n\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="settings|Background">\n Background\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-color [options]="currentBlock.options"></pb-color>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="settings|Button Attributes">\n Attributes\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <div class="group two" style="padding-bottom: 0">\n <pb-align [model]="currentBlock.options" [disabled]="currentBlock.options.fullWidth"></pb-align>\n <mat-slide-toggle style="margin-top: -24px" [(ngModel)]="currentBlock.options.fullWidth"\n (change)="markForCheck()">\n <ng-container i18n="settings|Button Full Width">Full Width</ng-container>\n </mat-slide-toggle>\n </div>\n <pb-link [link]="currentBlock.options.link"></pb-link>\n <pb-padding [padding]="currentBlock.options.innerPadding"></pb-padding>\n </ng-template>\n </mat-expansion-panel>\n </ng-container>\n\n <mat-expansion-panel [expanded]="currentBlock.type === \'spacer\'"\n *ngIf="hasProperty(currentBlock.options, \'width\') || hasProperty(currentBlock.options, \'height\')">\n <mat-expansion-panel-header i18n="settings|Sizes">\n Sizes\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-width-height *ngIf="hasProperty(currentBlock.options, \'width\')" [model]="currentBlock.options.width"\n label="width"></pb-width-height>\n <pb-width-height *ngIf="hasProperty(currentBlock.options, \'height\')" [model]="currentBlock.options.height"\n label="height"></pb-width-height>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel *ngIf="hasProperty(currentBlock.options, \'background\')">\n <mat-expansion-panel-header i18n="settings|Background">\n Background\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-color [options]="currentBlock.options.background"></pb-color>\n </ng-template>\n backgroundColor\n </mat-expansion-panel>\n\n <mat-expansion-panel [expanded]="currentBlock.type === \'divider\'"\n *ngIf="hasProperty(currentBlock.options, \'border\')">\n <mat-expansion-panel-header>\n <ng-container i18n="settings|Divider Styles" *ngIf="currentBlock.type === \'divider\'">Styles</ng-container>\n <ng-container i18n="settings|Border" *ngIf="currentBlock.type !== \'divider\'">Border</ng-container>\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-border [border]="currentBlock.options.border"></pb-border>\n </ng-template>\n </mat-expansion-panel>\n\n <ng-container *ngIf="currentBlock.type === \'social\'">\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="settings|Icons">\n Icons\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <mat-form-field appearance="outline" style="width: 100%">\n <mat-label i18n="settings|Add new Network">Add new Network</mat-label>\n <mat-select (selectionChange)="addSocialNetwork($event, currentBlock)" [disabled]="!socialNetworks.length">\n <mat-option style="text-transform: capitalize" *ngFor="let link of socialNetworks(currentBlock)"\n [value]="link">\n {{ link }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel class="networks-list" *ngFor="let network of currentBlock.networks">\n <mat-expansion-panel-header style="text-transform: capitalize">\n <img [class]="network.name" [src]="getSocialIcon(network.name)" [alt]="network.name" />\n {{ network.name }}\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <div class="networks-list-item">\n <div class="item-info">\n <mat-form-field matLine appearance="outline">\n <mat-label i18n="settings|Social Network Label">Label</mat-label>\n <input matInput autocomplete="off" [(ngModel)]="network.label"\n i18n-placeholder="settings|Social Network Label" placeholder="Label" type="text"\n (input)="markForCheck()" />\n </mat-form-field>\n <button mat-stroked-button color="warn" (click)="removeSocialNetwork(network, currentBlock)">\n <mat-icon>delete_forever</mat-icon>\n </button>\n </div>\n <mat-form-field matLine appearance="outline">\n <mat-label style="text-transform: capitalize">\n {{ network.name }} <ng-container i18n="settings|Social Network Link">Link</ng-container>\n </mat-label>\n <input autocomplete="off" matInput [(ngModel)]="network.href" type="url" (input)="markForCheck()" />\n </mat-form-field>\n </div>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="settings|Social Styles">\n Styles\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <div class="group two" style="padding-bottom: 0">\n <mat-form-field appearance="outline">\n <mat-label i18n="settings|Social Model">Mode</mat-label>\n <mat-select (selectionChange)="markForCheck()" i18n-placeholder="settings|Social Model" placeholder="Mode"\n [(value)]="currentBlock.options.mode" disableRipple>\n <mat-option *ngFor="let mode of [\'horizontal\', \'vertical\']" [value]="mode">\n {{ mode }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <pb-align [model]="currentBlock.options"></pb-align>\n </div>\n <pb-line-height [units]="[\'px\']" [lineHeight]="currentBlock.options.iconSize" label="Icon Size">\n </pb-line-height>\n <pb-padding [padding]="currentBlock.options.innerPadding"></pb-padding>\n </ng-template>\n </mat-expansion-panel>\n </ng-container>\n\n <mat-expansion-panel *ngIf="hasProperty(currentBlock.options, \'padding\')">\n <mat-expansion-panel-header i18n="settings|Padding">\n Padding\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-padding [padding]="currentBlock.options.padding"></pb-padding>\n </ng-template>\n </mat-expansion-panel>\n </mat-accordion>\n</ng-container>',changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,styles:["/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */.networks-list mat-expansion-panel-header .mat-content{place-items:center}.networks-list mat-expansion-panel-header img{width:20px;margin:0 .5rem 0 0;border-radius:3px;background-color:#000}.networks-list-item{width:100%;display:grid;row-gap:.5rem}.networks-list-item .item-info{display:grid;grid-template-columns:2fr 1fr;-moz-column-gap:.5rem;column-gap:.5rem}.networks-list-item .item-info button{align-self:baseline;margin:.25rem 0;height:50px}.networks-list-item .item-info ::ng-deep .mat-form-field-wrapper{padding-bottom:0;margin-bottom:0}"]}]}],bn.ctorParameters=function(){return[{type:Ze},{type:Ye},{type:Array,decorators:[{type:t.Inject,args:[Pe]}]}]};var hn=function(){function e(e,t){this.pbInternalService=e,this.emailObject=t,this.currentStructure$=this.pbInternalService.currentEditingStructure$}return e.prototype.markForCheck=function(){this.emailObject.markForCheck()},e}();hn.decorators=[{type:t.Component,args:[{selector:"pb-structure-settings",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<mat-accordion *ngIf="currentStructure$ | async as structure">\n <mat-expansion-panel expanded>\n <mat-expansion-panel-header i18n="Structure settings|Change structure Background">\n Background\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-color [options]="structure.options.background" key="color"></pb-color>\n <pb-image-upload [block]="structure.options.background" key="url" style="margin-bottom: 1em"></pb-image-upload>\n <pb-back-repeat [disabled]="!structure.options.background.url"\n [model]="structure.options.background"></pb-back-repeat>\n <pb-width-height [disabled]="!structure.options.background.url" [model]="structure.options.background.size"\n label="size">\n </pb-width-height>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="Structure settings|Change structure border">\n Border\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-border [border]="structure.options.border"></pb-border>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="Structure settings|Change structure padding">\n Padding\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-padding [padding]="structure.options.padding"></pb-padding>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="Structure settings|Change structure margin">\n Margin\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-margin [margin]="structure.options.margin"></pb-margin>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="Structure settings|Change structure layout">\n Layout\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-gaps [gaps]="structure.options.gaps"></pb-gaps>\n <mat-slide-toggle [disabled]="structure.type === \'cols_1\'" style="margin-top: -24px;"\n [(ngModel)]="structure.options.disableResponsive" i18n="Structure settings|Disable Responsive"\n (change)="markForCheck()">\n Disable Responsive\n </mat-slide-toggle>\n <mat-slide-toggle\n [(ngModel)]="structure.options.fullWidth" i18n="Structure settings|Full Width"\n (change)="markForCheck()">\n Make section full width\n </mat-slide-toggle>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel *ngFor="let column of structure.options.columns; let key = index">\n <mat-expansion-panel-header>\n <ng-container i18n="Structure settings|Structure Column">Column</ng-container>\n {{ key + 1 }}\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <h3 class="divider">\n <span i18n="Structure settings|Column Background">Column Background</span>\n </h3>\n <pb-color [options]="column.background" [showTransparent]="true" key="color"></pb-color>\n <h3 class="divider">\n <span i18n="Structure settings|Column Border">Column Border</span>\n </h3>\n <pb-border [border]="column.border"></pb-border>\n <h3 class="divider">\n <span i18n="Structure settings|Column Vertical Align">Vertical Align</span>\n </h3>\n <pb-align [model]="column" mode="vertical"></pb-align>\n </ng-template>\n </mat-expansion-panel>\n</mat-accordion>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,styles:[":host{display:block}"]}]}],hn.ctorParameters=function(){return[{type:Ze},{type:Ye}]};var fn=function(e){this.pbEmailObject=e,this.generalOptions$=this.pbEmailObject.generalEmailOptionsAsObservable$};fn.decorators=[{type:t.Component,args:[{selector:"pb-general-settings",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<ng-container *ngIf="generalOptions$ | async as general">\n <div class="mat-expansion-panel-body" style="margin: 24px 0">\n <mat-form-field appearance="outline" style="width: 100%">\n <mat-label i18n="General Settings|Email Name">Email Name</mat-label>\n <input matInput [(ngModel)]="general.name">\n </mat-form-field>\n <mat-form-field appearance="outline" style="width: 100%">\n <mat-label i18n="General Settings|Email Preview Text">Preview Text</mat-label>\n <textarea matInput [(ngModel)]="general.previewText"></textarea>\n <mat-hint i18n="General Settings|Email Preview Text Hint">\n This text is displayed in the inbox of the recipient.\n </mat-hint>\n </mat-form-field>\n </div>\n\n <mat-accordion>\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="General Settings|Email Background">\n Background\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-color [options]="general.background" key="color"></pb-color>\n \x3c!-- <pb-image-upload [block]="structure.options.background" key="url" style="margin-bottom: 1em"></pb-image-upload>\n <pb-back-repeat [disabled]="!structure.options.background.url" [model]="structure.options.background">\n </pb-back-repeat>\n <pb-width-height [model]="structure.options.background.size" label="Background Size"></pb-width-height> --\x3e\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="General Settings|Email Attributes">\n Attributes\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-width-height [model]="general.width" label="width"></pb-width-height>\n <pb-direction [model]="general"></pb-direction>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="General Settings|Email Padding">\n Padding\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-padding [padding]="general.padding"></pb-padding>\n </ng-template>\n </mat-expansion-panel>\n </mat-accordion>\n</ng-container>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,styles:[""]}]}],fn.ctorParameters=function(){return[{type:Ye}]};var yn=function(){function e(e){this.emailObject=e}return e.prototype.markForCheck=function(){this.emailObject.markForCheck()},e}();yn.decorators=[{type:t.Component,args:[{selector:"pb-margin",template:'\n <div class="group">\n <mat-form-field appearance="outline">\n <mat-label i18n="Margin settings|Margin Top">Margin Top</mat-label>\n <input matInput type="number" min="0" step="1" [(ngModel)]="margin.top" (input)="markForCheck()" />\n </mat-form-field>\n <mat-form-field appearance="outline">\n <mat-label i18n="Margin settings|Margin Bottom">Margin Bottom</mat-label>\n <input matInput type="number" min="0" step="1" [(ngModel)]="margin.bottom" (input)="markForCheck()" />\n </mat-form-field>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n width: 100%;\n }\n "]}]}],yn.ctorParameters=function(){return[{type:Ye}]},yn.propDecorators={margin:[{type:t.Input}]};var kn=function(){function e(e){this.emailObject=e}return e.prototype.markForCheck=function(){this.emailObject.markForCheck()},e}();kn.decorators=[{type:t.Component,args:[{selector:"pb-gaps",template:'\n <div class="group">\n <mat-form-field appearance="outline">\n <mat-label i18n="Gaps settings|Vertical Gaps">Vertical Gaps</mat-label>\n <input matInput type="number" min="0" step="1" [(ngModel)]="gaps[0]" (input)="markForCheck()" />\n </mat-form-field>\n <mat-form-field appearance="outline">\n <mat-label i18n="Gaps settings|Horizontal Gaps">Horizontal Gaps</mat-label>\n <input matInput type="number" min="0" step="1" [(ngModel)]="gaps[1]" (input)="markForCheck()" />\n </mat-form-field>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n width: 100%;\n }\n "]}]}],kn.ctorParameters=function(){return[{type:Ye}]},kn.propDecorators={gaps:[{type:t.Input}]};var vn="This feature is disabled in free version.",qn=function(e){function t(){var t=e.call(this)||this;return console.warn("You use the Regular License of Angular Email Builder, some limitations are applied. More info on https://wlocalhost.org"),t}return R(t,e),t.prototype.chooseTemplate=function(){throw new Error(vn)},t.prototype.exportFile=function(e){return n.iif((function(){return"json"===e}),re(e),n.throwError(new Error(vn)))},t.prototype.importFile=function(e){return n.iif((function(){return"application/json"===e.type}),re(e),n.throwError(new Error(vn)))},t}(He),xn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return R(t,e),t}(He),wn=function(){function e(e,t){this.userConfig=e,this.userInterface=t}return e.prototype.intercept=function(e,t){if(e.url.startsWith("https://ngb-api.wlocalhost.org")){var n=this.userInterface.notify("Loading, please wait ...",null,null),o=Object.assign(Object.assign({},Ee),this.userConfig).xApiKey;return t.handle(e.clone({setHeaders:{"Content-Type":"application/json","X-Api-Key":o},responseType:"json"})).pipe(i.tap((function(e){e.type===r.HttpEventType.Response&&n.dismiss()})))}return t.handle(e)},e}();wn.ɵprov=F.ɵɵdefineInjectable({factory:function(){return new wn(F.ɵɵinject(Le),F.ɵɵinject(Ze))},token:wn,providedIn:"root"}),wn.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],wn.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[Le]}]},{type:Ze}]};var Sn=new t.InjectionToken("Library environment",{providedIn:"any",factory:function(){var e=t.inject(Le).xApiKey;return!(!e||e.length<40||e===Ee.xApiKey)}}),In=function(e){function t(t){return e.call(this,t)||this}return R(t,e),t}(Ge),Cn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return R(t,e),t}(Ve);function Pn(e){return new In(e)}function Bn(e){return e?new xn:new qn}function Tn(e){return new Cn(e)}function $n(e,t,n,i,o){return e?new ot(n,i,o):new nt(t,i)}var On={bounds:"pb-builder-container",theme:"bubble",format:"html",trackChanges:"all",suppressGlobalRegisterWarning:!0},jn=function(){function e(e,t,n){if(!(n||e instanceof qn))throw new Error("Upgrade to an Extended or Commercial License to use Custom Middlewares.");if(!(n||t instanceof nt))throw new Error("Upgrade to an Extended or Commercial License to use Custom Image Uploader.")}return e.forRoot=function(t){return void 0===t&&(t={}),e.withConfig(t)},e.withConfig=function(t){return void 0===t&&(t={}),{ngModule:e,providers:[Xe,Ye,Ze,{provide:Le,useValue:t},{provide:He,useFactory:Bn,deps:[Sn]},{provide:Ve,useFactory:Tn,deps:[Ae]},{provide:tt,useFactory:$n,deps:[Sn,s.MatBottomSheet,l.MatDialog,He,Ge]},{provide:Ge,useFactory:Pn,deps:[r.HttpClient]}]}},e}();jn.decorators=[{type:t.NgModule,args:[{imports:[$.CommonModule,r.HttpClientModule,D.QuillModule,p.FlexLayoutModule,o.DragDropModule,T.FormsModule,_.ColorChromeModule,u.MatButtonModule,h.MatIconModule,b.MatFormFieldModule,f.MatInputModule,I.MatTabsModule,S.MatSliderModule,q.MatSelectModule,w.MatSlideToggleModule,d.MatButtonToggleModule,m.MatDividerModule,P.MatTooltipModule,l.MatDialogModule,a.MatSnackBarModule,v.MatProgressBarModule,k.MatMenuModule,x.MatSidenavModule,C.MatToolbarModule,y.MatListModule,s.MatBottomSheetModule,m.MatDividerModule,g.MatExpansionModule,B.ResizableModule,O.ScrollingModule,M.PortalModule],declarations:[lt,rt,mn,yt,dn,ct,pt,dt,mt,gt,bt,ht,kt,wt,St,yn,kn,Tt,_t,zt,Rt,Vt,Xt,nn,pn,Je,gn,bn,hn,fn,et,it,Ke,at,Qe],exports:[lt,dn,at],entryComponents:[ct,pt,dt,mt,gt,bt,ht,Je,et,it,Ke,Qe],providers:[{provide:D.QUILL_CONFIG_TOKEN,useValue:On},{provide:r.HTTP_INTERCEPTORS,useClass:wn,multi:!0},Xe,Ye,Ze,ut]}]}],jn.ctorParameters=function(){return[{type:He},{type:tt},{type:Boolean,decorators:[{type:t.Inject,args:[Sn]}]}]},e.AIPBlock=fe,e.ButtonBlock=qe,e.Defaults=ze,e.DividerBlock=xe,e.FreeUsersImageUploader=nt,e.ImageBlock=ke,e.PBEmail=Re,e.PB_BLOCKS=Me,e.PB_CONFIG=Le,e.PB_DEFAULT_BLOCKS=_e,e.PB_DEFAULT_CONFIG=Ee,e.PB_DEFAULT_FALLBACK_FONTS=$e,e.PB_DEFAULT_GOOGLE_FONTS=Be,e.PB_DEFAULT_SOCIAL_NETWORKS=Ce,e.PB_DEFAULT_STRUCTURES=je,e.PB_EMAIL_TEMPLATE_SCHEMA=Ue,e.PB_FALLBACK_FONTS=Oe,e.PB_GOOGLE_FONTS=Te,e.PB_SOCIAL_NETWORKS=Pe,e.PB_STORAGE_FACTORY=Fe,e.PB_STRUCTURES=De,e.PB_TEMPLATES_TEMPORARY_STORAGE=Ae,e.PbEmailBuilderComponent=lt,e.PbEmailBuilderModule=jn,e.PbEmailBuilderService=Xe,e.PbStorageService=Ve,e.PbUserImageUploaderService=tt,e.PbUserMiddlewaresService=He,e.PbUserRestApiService=Ge,e.PreviewTemplateComponent=dn,e.SlugifyPipe=at,e.SocialBlock=Se,e.SpacerBlock=we,e.Structure=le,e.TextBlock=ye,e.VideoBlock=ve,e.assignBlockId=Ie,e.bytesToSize=ie,e.cloneDeep=Y,e.createBackground=function(e){var t=e.url,n=void 0===t?"":t,i=e.color,o=void 0===i?"white":i,r=e.repeat;return o+" "+(n&&"url("+n+")")+" "+(void 0===r?"no-repeat":r)+" top center"},e.createBlockId=ce,e.createBorder=Q,e.createCustomRestApiService=Pn,e.createFont=ee,e.createLineHeight=te,e.createMargin=X,e.createPadding=Z,e.createUserMiddlewareService=Bn,e.createUserUploaderService=$n,e.createUsersIpStorage=Tn,e.createWidthHeight=ne,e.defaultColumnsOptions=ae,e.defaultsDeep=J,e.deferOf=re,e.getAssetByPath=oe,e.isEqual=K,e["ɵ0"]=On,e["ɵa"]=Ye,e["ɵb"]=We,e["ɵba"]=Vt,e["ɵbb"]=Xt,e["ɵbc"]=nn,e["ɵbd"]=pn,e["ɵbe"]=Je,e["ɵbf"]=gn,e["ɵbg"]=bn,e["ɵbh"]=hn,e["ɵbi"]=fn,e["ɵbj"]=et,e["ɵbk"]=it,e["ɵbl"]=Ke,e["ɵbm"]=Qe,e["ɵbn"]=wn,e["ɵbo"]=Sn,e["ɵc"]=Ze,e["ɵd"]=In,e["ɵe"]=Cn,e["ɵf"]=rt,e["ɵg"]=mn,e["ɵh"]=yt,e["ɵi"]=ct,e["ɵj"]=st,e["ɵk"]=pt,e["ɵl"]=dt,e["ɵm"]=ut,e["ɵn"]=mt,e["ɵo"]=gt,e["ɵp"]=bt,e["ɵq"]=ht,e["ɵr"]=kt,e["ɵs"]=wt,e["ɵt"]=St,e["ɵu"]=yn,e["ɵv"]=kn,e["ɵw"]=Tt,e["ɵx"]=_t,e["ɵy"]=zt,e["ɵz"]=Rt,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs"),require("rxjs/operators"),require("@angular/cdk/drag-drop"),require("@angular/common/http"),require("@angular/material/snack-bar"),require("@angular/material/dialog"),require("@angular/material/bottom-sheet"),require("@angular/platform-browser"),require("@angular/flex-layout"),require("@angular/material/button"),require("@angular/material/button-toggle"),require("@angular/material/divider"),require("@angular/material/expansion"),require("@angular/material/form-field"),require("@angular/material/icon"),require("@angular/material/input"),require("@angular/material/list"),require("@angular/material/menu"),require("@angular/material/progress-bar"),require("@angular/material/select"),require("@angular/material/sidenav"),require("@angular/material/slide-toggle"),require("@angular/material/slider"),require("@angular/material/tabs"),require("@angular/material/toolbar"),require("@angular/material/tooltip"),require("angular-resizable-element"),require("@angular/forms"),require("@angular/common"),require("@angular/cdk/scrolling"),require("quill"),require("ngx-quill"),require("ngx-color/chrome"),require("@angular/cdk/portal"),require("@angular/cdk/clipboard"),require("@angular/localize/init")):"function"==typeof define&&define.amd?define("@pobuca/email-builder",["exports","@angular/core","rxjs","rxjs/operators","@angular/cdk/drag-drop","@angular/common/http","@angular/material/snack-bar","@angular/material/dialog","@angular/material/bottom-sheet","@angular/platform-browser","@angular/flex-layout","@angular/material/button","@angular/material/button-toggle","@angular/material/divider","@angular/material/expansion","@angular/material/form-field","@angular/material/icon","@angular/material/input","@angular/material/list","@angular/material/menu","@angular/material/progress-bar","@angular/material/select","@angular/material/sidenav","@angular/material/slide-toggle","@angular/material/slider","@angular/material/tabs","@angular/material/toolbar","@angular/material/tooltip","angular-resizable-element","@angular/forms","@angular/common","@angular/cdk/scrolling","quill","ngx-quill","ngx-color/chrome","@angular/cdk/portal","@angular/cdk/clipboard","@angular/localize/init"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).pobuca=e.pobuca||{},e.pobuca["email-builder"]={}),e.ng.core,e.rxjs,e.rxjs.operators,e.ng.cdk.dragDrop,e.ng.common.http,e.ng.material.snackBar,e.ng.material.dialog,e.ng.material.bottomSheet,e.ng.platformBrowser,e.ng.flexLayout,e.ng.material.button,e.ng.material.buttonToggle,e.ng.material.divider,e.ng.material.expansion,e.ng.material.formField,e.ng.material.icon,e.ng.material.input,e.ng.material.list,e.ng.material.menu,e.ng.material.progressBar,e.ng.material.select,e.ng.material.sidenav,e.ng.material.slideToggle,e.ng.material.slider,e.ng.material.tabs,e.ng.material.toolbar,e.ng.material.tooltip,e.angularResizableElement,e.ng.forms,e.ng.common,e.ng.cdk.scrolling,null,e.ng.quill,e.ng.color.chrome,e.ng.cdk.portal,e.ng.cdk.clipboard)}(this,(function(e,t,n,i,o,r,a,l,s,c,p,d,u,m,g,b,h,f,y,v,k,q,x,w,S,I,C,P,T,B,O,$,j,D,L,E,_){"use strict";function M(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var F,z=M(t),A=M(r);e.ETemplatesStorage=void 0,(F=e.ETemplatesStorage||(e.ETemplatesStorage={})).LATEST_USED="NGB_LATEST_USED_TEMPLATES",F.STORAGE="NGB_TEMP_TEMPLATES_STORAGE";var R=function(e,t){return(R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function U(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}R(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function H(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{s(i.next(e))}catch(e){r(e)}}function l(e){try{s(i.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((i=i.apply(e,t||[])).next())}))}function N(e,t){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(l){return function(s){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,l[0]&&(a=0)),a;)try{if(n=1,i&&(o=2&l[0]?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,i=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],i=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}Object.create;function G(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function V(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function W(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(V(arguments[t]));return e}function Y(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}Object.create;"function"==typeof SuppressedError&&SuppressedError;function K(e){return void 0===e&&(e={}),JSON.parse(JSON.stringify(e))}function J(e,t){return JSON.stringify(e)===JSON.stringify(t)}function Q(e){var t,n;void 0===e&&(e={});for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];try{for(var r=G(i),a=r.next();!a.done;a=r.next()){var l=a.value;for(var s in l)e.hasOwnProperty(s)||(Array.isArray(l[s])||"object"!=typeof l[s]?e[s]=l[s]:e[s]=Q(e[s],l[s]))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return e}function Z(e,t){var n;void 0===t&&(t="border");var i=e.color,o=void 0===i?"#000000":i,r=e.style,a=void 0===r?"solid":r,l=e.width,s=void 0===l?4:l,c=e.radius,p=void 0===c?0:c;return(n={})[t]=s+"px "+a+" "+o,n.borderRadius=p+"px",n}function X(e,t){var n;void 0===t&&(t="padding");var i=e.top,o=void 0===i?10:i,r=e.right,a=void 0===r?25:r,l=e.bottom,s=void 0===l?10:l,c=e.left;return(n={})[t]=o+"px "+a+"px "+s+"px "+(void 0===c?25:c)+"px",n}function ee(e){var t=e.top,n=void 0===t?0:t,i=e.bottom;return{margin:n+"px 0 "+(void 0===i?0:i)+"px"}}function te(e){var t=e.family,n=void 0===t?"":t,i=e.size,o=void 0===i?13:i,r=e.style,a=void 0===r?"normal":r,l=e.weight;return{fontFamily:n,fontSize:o+"px",fontStyle:a,fontWeight:void 0===l?"normal":l}}function ne(e){var t=e.value,n=void 0===t?22:t,i=e.unit,o=void 0===i?"px":i;return{lineHeight:"none"!==o?""+n+o:"normal"}}function ie(e){var t=e.value,n=void 0===t?100:t,i=e.unit,o=void 0===i?"%":i,r=e.auto;return(void 0!==r&&r?"auto":["%","px"].indexOf(o)>-1&&""+n+o)||o}function oe(e,t){if(void 0===t&&(t=2),0===e)return"0 Bytes";var n=t<0?0:t,i=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,i)).toFixed(n))+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}function re(e){return"https://www.mailjet.com/images/theme/v1/icons/ico-social/"+e}function ae(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.defer((function(){return n.of.apply(void 0,W(e))}))}var le={background:{color:"transparent"},border:{width:0,color:"#cccccc",radius:0,style:"solid"},verticalAlign:"top"},se=function(e,t,n){void 0===e&&(e="cols_1"),void 0===t&&(t=[]),this.type=e,this.elements=t,this.columns=1,this.id=Date.now(),this.options={fullWidth:!1,border:{color:"#cccccc",style:"solid",width:0,radius:0},background:{color:"#ffffff",url:"",repeat:"repeat",size:{value:100,unit:"px",auto:!0,units:["px","%","cover","contain"]}},padding:{top:4,right:4,bottom:4,left:4},margin:{top:0,bottom:0},gaps:[4,4]},t.length||(["cols_2","cols_12","cols_21"].includes(e)?this.columns=2:"cols_3"===e?this.columns=3:"cols_4"===e&&(this.columns=4));var i=Array.from({length:this.columns},(function(){return le})),o=[1];"cols_21"===e?o=[4,6]:"cols_12"===e?o=[6,4]:"cols_2"===e?o=[5,5]:"cols_3"===e?o=[3.33,3.33,3.33]:"cols_4"===e&&(o=[2.5,2.5,2.5,2.5]),this.options=Q(n,this.options,{columns:i,columnsWidth:o})},ce=0;function pe(){return ce+=1,"pb-block-"+Date.now().toString(36)+"-"+ce.toString(36)}var de,ue,me,ge,be,he,fe,ye=function(){},ve=function(e,t,n){void 0===n&&(n={disabled:!1,message:""}),this.innerText=e,this.state=n,this.id=pe(),this.type="text",this.icon="text_format",this.options={color:"#000000",font:{fallback:"Arial, Helvetica, sans-serif",family:"Roboto",style:"normal",size:16,weight:400},lineHeight:{value:40,unit:"none"},padding:{top:10,right:25,bottom:10,left:25}},this.title=$localize(de||(de=Y([":@@text_block:Text"],[":@@text_block:Text"]))),this.options=Q(t,this.options)},ke=function(e,t,n){void 0===e&&(e=""),void 0===n&&(n={disabled:!1,message:""}),this.src=e,this.state=n,this.id=pe(),this.type="image",this.icon="image",this.options={border:{color:"#cccccc",style:"solid",width:0,radius:0},width:{value:100,unit:"px",auto:!0,units:["px"]},height:{value:100,unit:"px",auto:!0,units:["px"]},link:{href:"",target:"_blank"},align:"center",title:"",padding:{top:0,right:0,bottom:0,left:0}},this.title=$localize(ue||(ue=Y([":@@image_block:Image"],[":@@image_block:Image"]))),this.options=Q(t,this.options)},qe=function(e,t,n,i){void 0===e&&(e=""),void 0===t&&(t=""),void 0===n&&(n={border:{color:"#000000",style:"solid",width:0,radius:0}}),void 0===i&&(i={disabled:!1,message:""}),this.src=e,this.posterSrc=t,this.state=i,this.id=pe(),this.type="video",this.icon="videocam",this.options={border:{color:"#000000",style:"solid",width:0,radius:0},width:{value:100,unit:"px",auto:!0,units:["px"]},height:{value:100,unit:"px",auto:!0,units:["px"]},align:"center",title:"",padding:{top:10,right:25,bottom:10,left:25}},this.title=$localize(me||(me=Y([":@@video_block:Video"],[":@@video_block:Video"]))),this.options=Q(n,this.options)},xe=function(e,t,n){void 0===e&&(e="Click on me"),void 0===n&&(n={disabled:!1,message:""}),this.innerText=e,this.state=n,this.id=pe(),this.type="button",this.icon="radio_button_checked",this.options={backgroundColor:"#414141",border:{color:"#414141",style:"solid",width:0,radius:3},color:"#ffffff",font:{fallback:"Arial, Helvetica, sans-serif",family:"Roboto",size:13,style:"normal",weight:400},align:"center",fullWidth:!1,lineHeight:{value:120,unit:"%"},link:{href:"",target:"_blank"},innerPadding:{top:10,right:25,bottom:10,left:25},padding:{top:10,right:25,bottom:10,left:25}},this.title=$localize(ge||(ge=Y([":@@button_block:Button"],[":@@button_block:Button"]))),this.options=Q(t,this.options)},we=function(e,t){void 0===t&&(t={disabled:!1,message:""}),this.state=t,this.id=pe(),this.type="divider",this.icon="remove",this.options={border:{color:"#000000",style:"solid",width:4},padding:{top:10,right:25,bottom:10,left:25}},this.title=$localize(be||(be=Y([":@@divider_block:Divider"],[":@@divider_block:Divider"]))),this.options=Q(e,this.options)},Se=function(e,t){void 0===t&&(t={disabled:!1,message:""}),this.state=t,this.id=pe(),this.type="spacer",this.icon="vertical_align_center",this.title=$localize(he||(he=Y([":@@spacer_block:Spacer"],[":@@spacer_block:Spacer"]))),this.options={height:{value:20,unit:"px",units:["px"]}},this.options=Q(e,this.options)},Ie=function(e,t,n){void 0===e&&(e=[]),void 0===n&&(n={disabled:!1,message:""}),this.networks=e,this.state=n,this.id=pe(),this.type="social",this.icon="share",this.title=$localize(fe||(fe=Y([":@@share_block:Social"],[":@@share_block:Social"]))),this.options={align:"center",mode:"horizontal",font:{fallback:"Arial, Helvetica, sans-serif",family:"Roboto",style:"normal",size:16,weight:400},iconSize:{value:30,unit:"px"},lineHeight:{value:16,unit:"px"},color:"#333333",innerPadding:{top:4,right:4,bottom:4,left:4},padding:{top:10,right:25,bottom:10,left:25}},this.options=Q(t,this.options)};function Ce(e,t){return void 0===t&&(t=!1),e.id&&!t||Object.defineProperty(e,"id",{configurable:!0,enumerable:!0,value:pe(),writable:!0}),e.id}var Pe=["github","instagram","web","snapchat","youtube","vimeo","medium","soundcloud","dribbble","facebook","twitter","pinterest","linkedin","tumblr","xing","tiktok"],Te=new t.InjectionToken("PB Social Networks",{providedIn:"any",factory:function(){return Pe}}),Be=["Open+Sans:300,400,500,700","Droid+Sans:300,400,500,700","Lato:300,400,500,700","Roboto:300,400,700,900","Ubuntu:300,400,500,700","Fira+Sans:300,400,500,700","Mansalva:400"],Oe=new t.InjectionToken("PB Google Fonts",{providedIn:"any",factory:function(){return Be}}),$e=["Palatino Linotype, Book Antiqua, Palatino, serif","Times New Roman, Times, serif","Arial, Helvetica, sans-serif","Arial Black, Gadget, sans-serif","Comic Sans MS, cursive, sans-serif","Impact, Charcoal, sans-serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Trebuchet MS, Helvetica, sans-serif","Verdana, Geneva, sans-serif","Courier New, Courier, monospace","Lucida Console, Monaco, monospace"],je=new t.InjectionToken("PB Fallback Fonts",{providedIn:"any",factory:function(){return $e}}),De=[new se("cols_1"),new se("cols_2"),new se("cols_3"),new se("cols_4"),new se("cols_12"),new se("cols_21")],Le=new t.InjectionToken("PB Structures",{providedIn:"any",factory:function(){return De}}),Ee=[new ve,new ke,new qe,new xe,new we,new Se,new Ie],_e=new t.InjectionToken("PB Blocks",{providedIn:"any",factory:function(){return Ee}}),Me=Object.freeze({xApiKey:"t7HdQfZjGp6R96fOV4P8v18ggf6LLTQZ1puUI2tz",useSaveButton:!0,usePreviewButton:!0,useDownloadButton:!0,templateListIfEmpty:!0,uploadImageName:"image"}),Fe=new t.InjectionToken("PB Builder Configuration",{providedIn:"root",factory:function(){return Me}}),ze=Object.freeze({labels:Object.freeze({trigger:"Tags",title:"Personalization tags",subtitle:"Choose a field and customize the token before inserting it.",search:"Search tags",defaultSection:"Tags",preview:"Token preview",copy:"Copy",copied:"Copied",length:"Maximum length",optional:"Optional",noLengthLimit:"No limit",insert:"Insert tag",cancel:"Cancel",close:"Close",clearSearch:"Clear search",empty:"No tags match your search."}),display:Object.freeze({sections:!0,descriptions:!0,rawValues:!0,preview:!0,copy:!0,length:!0})});function Ae(e){return void 0===e&&(e={}),{labels:Object.assign(Object.assign({},ze.labels),e.labels||{}),display:Object.assign(Object.assign({},ze.display),e.display||{})}}var Re=new t.InjectionToken("PB Merge Field Picker Configuration",{providedIn:"root",factory:function(){return ze}}),Ue=new t.InjectionToken("PB Storage factory token",{providedIn:"any",factory:function(){return sessionStorage}}),He=new t.InjectionToken("PB Token that stores temporary templates cache",{providedIn:"any",factory:function(){return sessionStorage}}),Ne=function(e,t,n){void 0===e&&(e=[]),void 0===t&&(t={name:"",previewText:"",width:{value:600,unit:"px",units:["px"]},background:{color:"#f1f1f1",size:{value:100,unit:"%",auto:!0,units:["px","%","cover","contain"]}},padding:{top:16,right:10,bottom:10,left:10},direction:"ltr",global:{padding:{top:0,right:0,bottom:0,left:0}}}),void 0===n&&(n=[]),this.structures=e,this.general=t,this.customFonts=n},Ge=function(e){function t(t){var n=void 0===t?{}:t,i=n.structures,o=n.general,r=n.customFonts;return e.call(this,i,o,r)||this}return U(t,e),t}(Ne),Ve={description:"The complete AI-generation contract consumed by the Pobuca Email Builder.",type:"object",properties:{general:{$ref:"#/definitions/IGeneralOptions"},structures:{type:"array",items:{$ref:"#/definitions/IStructure"}},customFonts:{type:"array",items:{$ref:"#/definitions/ICustomFont"}}},additionalProperties:!1,definitions:{IGeneralOptions:{description:"Builder{@linkIPBEmail}general options interface.",type:"object",properties:{width:{$ref:"#/definitions/IWidthHeight"},background:{$ref:"#/definitions/IBackground"},padding:{$ref:"#/definitions/IPadding"},direction:{$ref:"#/definitions/TDirection"},name:{type:"string"},previewText:{type:"string"},global:{type:"object",properties:{fonts:{type:"array",items:{type:"string"}},padding:{$ref:"#/definitions/IPadding"}},additionalProperties:!1,required:["fonts","padding"]}},additionalProperties:!1,required:["width","background","padding","direction","name","previewText","global"]},IWidthHeight:{description:"Builder Width and Height styles interface.",type:"object",properties:{value:{type:"number"},unit:{$ref:"#/definitions/TUnits",description:"Width and Height unit type."},auto:{type:"boolean"},units:{type:"array",items:{$ref:"#/definitions/TUnits",description:"Builder units types."},uniqueItems:!0}},additionalProperties:!1,required:["value","unit","auto","units"]},TUnits:{description:"Builder units types.",enum:["%","contain","cover","px"],type:"string"},IBackground:{description:"Builder background styles interface.",type:"object",properties:{color:{type:"string"},url:{type:"string"},repeat:{$ref:"#/definitions/TBackgroundRepeat"},size:{$ref:"#/definitions/IWidthHeight"}},additionalProperties:!1,required:["color","url","repeat","size"]},TBackgroundRepeat:{description:"Builder background-repeat types.",enum:["no-repeat","repeat","repeat-x","repeat-y"],type:"string"},IPadding:{description:"Builder padding styles interface.",type:"object",properties:{top:{type:"number"},right:{type:"number"},bottom:{type:"number"},left:{type:"number"}},additionalProperties:!1,required:["top","right","bottom","left"]},TDirection:{description:"Builder direction types.",enum:["ltr","rtl"],type:"string"},IStructure:{description:"Builder structure interface.",type:"object",properties:{type:{$ref:"#/definitions/TStructureTypes"},id:{type:"number"},isModule:{description:"If it's module, it can't be edited within email body.",type:"boolean"},options:{$ref:"#/definitions/IStructureOptions"},elements:{type:"array",items:{type:"array",items:{oneOf:[{$ref:"#/definitions/TextBlock"},{$ref:"#/definitions/ImageBlock"},{$ref:"#/definitions/VideoBlock"},{$ref:"#/definitions/ButtonBlock"},{$ref:"#/definitions/DividerBlock"},{$ref:"#/definitions/SpacerBlock"},{$ref:"#/definitions/SocialBlock"}]}}},columns:{type:"number"}},additionalProperties:!1,required:["type","id","isModule","options","elements","columns"],allOf:[{oneOf:[{properties:{type:{const:"cols_1"},columns:{const:1},elements:{minItems:1,maxItems:1},options:{properties:{columns:{minItems:1,maxItems:1},columnsWidth:{minItems:1,maxItems:1}}}}},{properties:{type:{const:"cols_2"},columns:{const:2},elements:{minItems:2,maxItems:2},options:{properties:{columns:{minItems:2,maxItems:2},columnsWidth:{minItems:2,maxItems:2}}}}},{properties:{type:{const:"cols_3"},columns:{const:3},elements:{minItems:3,maxItems:3},options:{properties:{columns:{minItems:3,maxItems:3},columnsWidth:{minItems:3,maxItems:3}}}}},{properties:{type:{const:"cols_4"},columns:{const:4},elements:{minItems:4,maxItems:4},options:{properties:{columns:{minItems:4,maxItems:4},columnsWidth:{minItems:4,maxItems:4}}}}},{properties:{type:{const:"cols_12"},columns:{const:2},elements:{minItems:2,maxItems:2},options:{properties:{columns:{minItems:2,maxItems:2},columnsWidth:{minItems:2,maxItems:2}}}}},{properties:{type:{const:"cols_21"},columns:{const:2},elements:{minItems:2,maxItems:2},options:{properties:{columns:{minItems:2,maxItems:2},columnsWidth:{minItems:2,maxItems:2}}}}}]}]},TStructureTypes:{description:"Builder structure types.",enum:["cols_1","cols_12","cols_2","cols_21","cols_3","cols_4"],type:"string"},IStructureOptions:{description:"Builder structure styles interface.",type:"object",properties:{border:{$ref:"#/definitions/IBorder"},background:{$ref:"#/definitions/IBackground"},padding:{$ref:"#/definitions/IPadding"},margin:{$ref:"#/definitions/IMargin"},disableResponsive:{description:"Disable responsive for entire structure",type:"boolean"},fullWidth:{description:"Mame section full width",type:"boolean"},gaps:{description:"Mind the GAPS! Gaps between structure's columns.",type:"array",items:[{type:"number"},{type:"number"}],minItems:2,maxItems:2},columnsWidth:{type:"array",items:{type:"number",exclusiveMinimum:0}},columns:{type:"array",items:{$ref:"#/definitions/IStructureColumnOptions"}}},additionalProperties:!1,required:["border","background","padding","margin","disableResponsive","fullWidth","gaps","columnsWidth","columns"]},IBorder:{description:"Builder border styles interface.",type:"object",properties:{color:{type:"string"},style:{description:"Border style.",enum:["dashed","dotted","double","groove","solid"],type:"string"},width:{description:"Border width",type:"number"},radius:{description:"Border radius",type:"number"}},additionalProperties:!1,required:["color","style","width","radius"]},IMargin:{description:"Builder margin styles interface.",type:"object",properties:{top:{type:"number"},bottom:{type:"number"}},additionalProperties:!1,required:["top","bottom"]},IStructureColumnOptions:{description:"Builder structure columns' styles interface.",type:"object",properties:{background:{$ref:"#/definitions/IBackground"},border:{$ref:"#/definitions/IBorder"},verticalAlign:{$ref:"#/definitions/TVerticalAlign"}},additionalProperties:!1,required:["background","border","verticalAlign"]},TVerticalAlign:{description:"Builder vertical align types.",enum:["bottom","middle","top"],type:"string"},TextBlock:{type:"object",properties:{id:{type:"string"},type:{type:"string",enum:["text"]},icon:{type:"string",enum:["text_format"]},options:{$ref:"#/definitions/ITextBlockOptions"},title:{type:"string"},innerText:{type:"string"},state:{$ref:"#/definitions/IBlockState"}},additionalProperties:!1,required:["id","type","icon","options","title","innerText","state"]},ITextBlockOptions:{description:"Builder{@linkTextElementComponent}options interface.",type:"object",properties:{color:{type:"string"},font:{$ref:"#/definitions/IFont"},lineHeight:{$ref:"#/definitions/ILineHeight"},padding:{$ref:"#/definitions/IPadding"}},additionalProperties:!1,required:["color","font","lineHeight","padding"]},IFont:{description:"Builder font styles interface.",type:"object",properties:{family:{type:"string"},fallback:{type:"string"},size:{type:"number"},style:{$ref:"#/definitions/TFontStyle"},weight:{description:"Builder font weight types.",anyOf:[{enum:["bold","bolder","inherit","initial","light","normal"],type:"string"},{type:"number"}]}},additionalProperties:!1,required:["family","fallback","size","style","weight"]},TFontStyle:{description:"Builder font style types.",enum:["italic","normal","oblique"],type:"string"},ILineHeight:{description:"Builder line-height styles interface.",type:"object",properties:{value:{type:"number"},unit:{$ref:"#/definitions/TLineHeight"}},additionalProperties:!1,required:["value","unit"]},TLineHeight:{description:"Builder Line-height types.",enum:["%","none","px"],type:"string"},IBlockState:{description:"Builder block state interface. If `disabled: true` it can't be dragged from left sidebar.",type:"object",properties:{disabled:{type:"boolean"},message:{description:"Show a message in case it's disabled.",type:"string"}},additionalProperties:!1,required:["disabled","message"]},ImageBlock:{type:"object",properties:{id:{type:"string"},type:{type:"string",enum:["image"]},icon:{type:"string",enum:["image"]},options:{$ref:"#/definitions/IImageBLockOptions"},title:{type:"string"},src:{type:"string"},state:{$ref:"#/definitions/IBlockState"}},additionalProperties:!1,required:["id","type","icon","options","title","src","state"]},IImageBLockOptions:{description:"Builder{@linkImageComponent}options interface.",type:"object",properties:{border:{$ref:"#/definitions/IBorder"},width:{$ref:"#/definitions/IWidthHeight"},height:{$ref:"#/definitions/IWidthHeight"},link:{$ref:"#/definitions/ILink"},align:{$ref:"#/definitions/TAlign"},title:{type:"string"},padding:{$ref:"#/definitions/IPadding"}},additionalProperties:!1,required:["border","width","height","link","align","title","padding"]},ILink:{description:"Builder link styles interface.",type:"object",properties:{href:{type:"string"},target:{$ref:"#/definitions/TLinkTarget"}},additionalProperties:!1,required:["href","target"]},TLinkTarget:{description:"Builder Link target.",enum:["_blank","_parent","_self","_top"],type:"string"},TAlign:{description:"Builder align types.",enum:["center","left","right"],type:"string"},VideoBlock:{type:"object",properties:{id:{type:"string"},type:{type:"string",enum:["video"]},icon:{type:"string",enum:["videocam"]},options:{$ref:"#/definitions/IVideoBlockOptions"},title:{type:"string"},src:{type:"string"},posterSrc:{type:"string"},state:{$ref:"#/definitions/IBlockState"}},additionalProperties:!1,required:["id","type","icon","options","title","src","posterSrc","state"]},IVideoBlockOptions:{description:"Builder{@linkVideoComponent}options interface.",type:"object",properties:{border:{$ref:"#/definitions/IBorder"},width:{$ref:"#/definitions/IWidthHeight"},height:{$ref:"#/definitions/IWidthHeight"},link:{$ref:"#/definitions/ILink"},align:{$ref:"#/definitions/TAlign"},title:{type:"string"},padding:{$ref:"#/definitions/IPadding"}},additionalProperties:!1,required:["border","width","height","link","align","title","padding"]},ButtonBlock:{type:"object",properties:{id:{type:"string"},type:{type:"string",enum:["button"]},icon:{type:"string",enum:["radio_button_checked"]},options:{$ref:"#/definitions/IButtonBlockOptions"},title:{type:"string"},innerText:{type:"string"},state:{$ref:"#/definitions/IBlockState"}},additionalProperties:!1,required:["id","type","icon","options","title","innerText","state"]},IButtonBlockOptions:{description:"Builder{@linkButtonComponent}options interface.",type:"object",properties:{backgroundColor:{type:"string"},border:{$ref:"#/definitions/IBorder"},color:{type:"string"},font:{$ref:"#/definitions/IFont"},align:{$ref:"#/definitions/TAlign"},fullWidth:{type:"boolean"},lineHeight:{$ref:"#/definitions/ILineHeight"},link:{$ref:"#/definitions/ILink"},innerPadding:{$ref:"#/definitions/IPadding"},padding:{$ref:"#/definitions/IPadding"}},additionalProperties:!1,required:["backgroundColor","border","color","font","align","fullWidth","lineHeight","link","innerPadding","padding"]},DividerBlock:{type:"object",properties:{id:{type:"string"},type:{type:"string",enum:["divider"]},icon:{type:"string",enum:["remove"]},options:{$ref:"#/definitions/IDividerBlockOptions"},title:{type:"string"},state:{$ref:"#/definitions/IBlockState"}},additionalProperties:!1,required:["id","type","icon","options","title","state"]},IDividerBlockOptions:{description:"Builder{@linkDividerComponent}options interface.",type:"object",properties:{border:{$ref:"#/definitions/IBorder"},padding:{$ref:"#/definitions/IPadding"}},additionalProperties:!1,required:["border","padding"]},SpacerBlock:{type:"object",properties:{id:{type:"string"},type:{type:"string",enum:["spacer"]},icon:{type:"string",enum:["vertical_align_center"]},title:{type:"string"},options:{$ref:"#/definitions/ISpacerBlockOptions"},state:{$ref:"#/definitions/IBlockState"}},additionalProperties:!1,required:["id","type","icon","title","options","state"]},ISpacerBlockOptions:{description:"Builder{@linkSpacerComponent}options interface.",type:"object",properties:{height:{$ref:"#/definitions/IWidthHeight"},width:{$ref:"#/definitions/IWidthHeight"}},additionalProperties:!1,required:["height","width"]},SocialBlock:{type:"object",properties:{id:{type:"string"},type:{type:"string",enum:["social"]},icon:{type:"string",enum:["share"]},title:{type:"string"},options:{$ref:"#/definitions/ISocialBlockOptions"},networks:{type:"array",items:{$ref:"#/definitions/ISocialNetwork"}},state:{$ref:"#/definitions/IBlockState"}},additionalProperties:!1,required:["id","type","icon","title","options","networks","state"]},ISocialBlockOptions:{description:"Builder{@linkSocialComponent}options interface.",type:"object",properties:{align:{$ref:"#/definitions/TAlign"},mode:{enum:["horizontal","vertical"],type:"string"},font:{$ref:"#/definitions/IFont"},iconSize:{$ref:"#/definitions/ILineHeight"},lineHeight:{$ref:"#/definitions/ILineHeight"},color:{type:"string"},innerPadding:{$ref:"#/definitions/IPadding"},padding:{$ref:"#/definitions/IPadding"}},additionalProperties:!1,required:["align","mode","font","iconSize","lineHeight","color","innerPadding","padding"]},ISocialNetwork:{description:"Builder{@linkSocialComponent}network options interface.",type:"object",properties:{href:{type:"string"},label:{type:"string"},name:{enum:["dribbble","facebook","github","instagram","linkedin","medium","pinterest","snapchat","soundcloud","tiktok","tumblr","twitter","vimeo","web","xing","youtube"],type:"string"},padding:{$ref:"#/definitions/IPadding"}},additionalProperties:!1,required:["href","label","name","padding"]},ICustomFont:{description:"Custom font interface",type:"object",properties:{family:{type:"string"},url:{type:"string"}},additionalProperties:!1,required:["family","url"]}},$schema:"http://json-schema.org/draft-07/schema#",title:"Pobuca Email Template",required:["general","structures","customFonts"]},We=function(){function e(){}return e.prototype.createHTMLTemplate=function(e){return ae(e)},e.prototype.togglePreview=function(e){return ae(e)},e.prototype.togglePreviewDevice=function(e){return ae(e.value)},e.prototype.chooseTemplate=function(e,t){return ae({category:e,template:t})},e.prototype.uploadImage=function(e){return ae(e)},e.prototype.addBlock=function(e,t){return ae({event:e,column:t})},e.prototype.editBlock=function(e){return ae(e)},e.prototype.removeBlock=function(e,t,n){return ae({index:e,column:t})},e.prototype.duplicateBlock=function(e,t,n){return ae({index:e,column:t,block:n})},e.prototype.disableBlockDragFromList=function(e){return ae(!1)},e.prototype.disableBlockDragWithinEmailBody=function(e){return ae(!1)},e.prototype.addStructure=function(e){return ae(e)},e.prototype.editStructure=function(e){return ae(e)},e.prototype.removeStructure=function(e,t){return ae(e)},e.prototype.duplicateStructure=function(e,t){return ae(e)},e.prototype.disableStructureDragFromList=function(e){return ae(!1)},e.prototype.disableStructureDragWithinEmailBody=function(e){return ae(!1)},e.prototype.preventWindowExit=function(e){return ae(e)},e.prototype.exportFile=function(e){return ae(e)},e.prototype.importFile=function(e){return ae(e)},e.prototype.catchError=function(e){return ae(e)},e}();We.decorators=[{type:t.Injectable}];var Ye="https://ngb-api.wlocalhost.org/v1",Ke=function(){function e(e){this.http=e,this.getAllUserMergeFields$=ae([]),this.getAllUserModules$=ae([]),this.getAllUserTemplates$=this.http.get(Ye.concat("/templates")).pipe(i.map((function(e){return e.map((function(e){var t=e.category,n=e.templates;return{category:t,templates:n.map((function(e){return{thumbPath:"https://ngb-templates.s3.amazonaws.com/"+t+"-"+e+".jpg",title:e,templateData:null}}))}}))})),i.shareReplay())}return e.prototype.getUserTemplateData$=function(e,t){return t.templateData?ae(t):this.http.get(Ye.concat("/templates"),{params:{category:e,template:t.title}}).pipe(i.map((function(e){return Object.assign(Object.assign({},t),{templateData:e})})))},e.prototype.userImageUpload$=function(e,t){return this.http.request("POST",t,{body:e,reportProgress:!0,responseType:"json",observe:"events"})},e.prototype.getUserImages$=function(){return ae([])},e.prototype.userImageUploadBase64$=function(e,t){return this.http.post("",{folderPath:t,imageBase64:e})},e.prototype.createHTMLTemplate$=function(e,t){return void 0===t&&(t=Ye),this.http.post(t,e)},e}();Ke.decorators=[{type:t.Injectable}],Ke.ctorParameters=function(){return[{type:r.HttpClient}]};var Je=function(){function t(e){this.templateStorage=e}return t.prototype.getLatestUsedTemplates=function(){return JSON.parse(this.templateStorage.getItem(e.ETemplatesStorage.LATEST_USED))||[]},t.prototype.addTemplateToLatestUsed=function(t){var n=this.getLatestUsedTemplates().filter((function(e){return e.title!==t.title}));n.unshift(t),this.templateStorage.setItem(e.ETemplatesStorage.LATEST_USED,JSON.stringify(n))},t.prototype.clearLatestUsed=function(){this.templateStorage.removeItem(e.ETemplatesStorage.LATEST_USED)},t.prototype.cacheTemplateList=function(t){this.templateStorage.setItem(e.ETemplatesStorage.STORAGE,JSON.stringify(t))},t.prototype.getCachedTemplateList=function(){return JSON.parse(this.templateStorage.getItem(e.ETemplatesStorage.STORAGE))||[]},t.prototype.clearCachedTemplateList=function(){this.templateStorage.removeItem(e.ETemplatesStorage.STORAGE)},t}();Je.decorators=[{type:t.Injectable}],Je.ctorParameters=function(){return[{type:Storage,decorators:[{type:t.Inject,args:[He]}]}]};var Qe=function(){function e(){this.historyStack=[],this.currentIndex=-1,this.maxHistorySize=50,this._canUndo$=new n.BehaviorSubject(!1),this._canRedo$=new n.BehaviorSubject(!1),this.canUndo$=this._canUndo$.asObservable(),this.canRedo$=this._canRedo$.asObservable()}return e.prototype.addState=function(e){if(e){var t=K(e);this.currentIndex<this.historyStack.length-1&&(this.historyStack=this.historyStack.slice(0,this.currentIndex+1)),this.historyStack.push(t),this.currentIndex++,this.historyStack.length>this.maxHistorySize&&(this.historyStack.shift(),this.currentIndex--),this.updateUndoRedoStatus()}},e.prototype.undo=function(){return this.canUndoNow()?(this.currentIndex--,this.updateUndoRedoStatus(),K(this.historyStack[this.currentIndex])):null},e.prototype.redo=function(){return this.canRedoNow()?(this.currentIndex++,this.updateUndoRedoStatus(),K(this.historyStack[this.currentIndex])):null},e.prototype.canUndoNow=function(){return this.currentIndex>0},e.prototype.canRedoNow=function(){return this.currentIndex<this.historyStack.length-1},e.prototype.clear=function(){this.historyStack=[],this.currentIndex=-1,this.updateUndoRedoStatus()},e.prototype.getHistorySize=function(){return this.historyStack.length},e.prototype.getCurrentIndex=function(){return this.currentIndex},e.prototype.updateUndoRedoStatus=function(){this._canUndo$.next(this.canUndoNow()),this._canRedo$.next(this.canRedoNow())},e}();Qe.ɵprov=z.ɵɵdefineInjectable({factory:function(){return new Qe},token:Qe,providedIn:"any"}),Qe.decorators=[{type:t.Injectable,args:[{providedIn:"any"}]}],Qe.ctorParameters=function(){return[]};var Ze=function(){function e(e,t,o,r,a,l){var s=this;this.userRestApi=e,this.pbStorage=t,this.userMiddleware=o,this.history=r,this.googleFonts=a,this.config=l,this.Email=new Ge,this.clonedEmail=K(this.Email),this._Email$=new n.BehaviorSubject(this.Email),this.emailAsObservable$=this._Email$.asObservable(),this.emailStructuresAsObservable$=this.emailAsObservable$.pipe(i.pluck("structures")),this.generalEmailOptionsAsObservable$=this.emailAsObservable$.pipe(i.pluck("general")),this.currentEmailHasChanges$=this.emailAsObservable$.pipe(i.map((function(e){return!J(e,s.clonedEmail)}))),this.builderContainerStyles$=this.generalEmailOptionsAsObservable$.pipe(i.map((function(e){var t=e.background,n=e.padding,i=e.direction;return Object.assign({direction:i,backgroundRepeat:t.repeat,backgroundColor:t.color,backgroundSize:ie(t.size),backgroundPosition:"top center"},X(n))}))),this._Mjml$=new n.BehaviorSubject(""),this.mjmlAsObservable$=this._Mjml$.asObservable(),this._Template$=new n.BehaviorSubject(""),this.templateAsObservable$=this._Template$.asObservable(),this._onTemplateCreated$=new n.Subject,this.onTemplateCreated$=this._onTemplateCreated$.pipe(i.withLatestFrom(this._Email$,this._Template$,this._Mjml$),i.map((function(e){var t=V(e);t[0];return t.slice(1)}))),this.canUndo$=this.history.canUndo$,this.canRedo$=this.history.canRedo$}return Object.defineProperty(e.prototype,"defaultTemplateThumbPath",{get:function(){var e,t;return(null===(t=null===(e=this.config)||void 0===e?void 0:e.apiPath)||void 0===t?void 0:t.replace(/\/+$/,""))+"/images/placeholders/image-placeholder.png"},enumerable:!1,configurable:!0}),e.prototype.assignBlockIds=function(e,t){void 0===t&&(t=!1),e.forEach((function(e){return e.elements.forEach((function(e){return e.forEach((function(e){return Ce(e,t)}))}))}))},e.prototype.createHTMLTemplate$=function(){var e=this;return this.emailAsObservable$.pipe(i.switchMap((function(e){if(!e.structures.length)throw new Error("Please add some structures and blocks to perform this action.");return ae(e)})),i.withLatestFrom(n.combineLatest([this.currentEmailHasChanges$,this.templateAsObservable$])),i.exhaustMap((function(t){var o=V(t,2),r=o[0],a=V(o[1],2),l=a[0],s=a[1];return l||!s?e.userMiddleware.createHTMLTemplate(r).pipe(i.exhaustMap((function(t){return e.userRestApi.createHTMLTemplate$(Object.assign(Object.assign({},t),{googleFonts:e.googleFonts}),e.config.apiPath)})),i.map((function(t){if(t.errors.length){var n=t.errors.map((function(e){var t=e.message;return e.tagName+" > "+t})).join("\n");throw new Error(n)}if(r.customFonts&&r.customFonts.length){var i=r.customFonts.filter((function(e){return e.url})).map((function(e){return'<link href="'+e.url+'" rel="stylesheet" type="text/css">'})).join("\n");i&&t.html.includes("</head>")&&(t.html=t.html.replace("</head>",i+"\n</head>"))}return e._Mjml$.next(t.mjml),e._Template$.next(t.html),e.clonedEmail=K(e.Email),e._onTemplateCreated$.next(),t}))):n.combineLatest([e._Mjml$,e._Template$]).pipe(i.map((function(e){var t=V(e,2),n=t[0];return{html:t[1],mjml:n,errors:[]}})))})))},e.prototype.markForCheck=function(){this._Email$.next(this.Email),this.history.addState(this.Email),this.Email.structures.length&&this.pbStorage.addTemplateToLatestUsed(K({templateData:this.Email,title:"last-edited",thumbPath:this.defaultTemplateThumbPath}))},e.prototype.setEmail=function(e){if(!e.structures||!e.general)throw new Error("Injected object is not a valid PBEmail");this.assignBlockIds(e.structures),this.Email=e,this.reset()},e.prototype.addStructure=function(e){var t=e.currentIndex,n=void 0===t?0:t,i=e.item,o=this.Email.structures,r=void 0===o?[]:o,a=!0;i.data.elements.length||(a=!1,i.data.elements=Array.from({length:i.data.columns},(function(){return[]})));var l=Object.assign(Object.assign({id:Date.now()},K(i.data)),{isModule:a});return this.assignBlockIds([l],!0),r.splice(n,0,l),this.markForCheck(),l},e.prototype.changeStructureOrder=function(e){var t=e.previousIndex,n=void 0===t?0:t,i=e.currentIndex,r=void 0===i?0:i;o.moveItemInArray(this.Email.structures,n,r),this.markForCheck()},e.prototype.duplicateStructure=function(e){var t=this.Email.structures,n=void 0===t?[]:t,i=K(Object.assign(Object.assign({},n[e]),{id:Date.now()}));return this.assignBlockIds([i],!0),n.splice(e,0,i),this.markForCheck(),i},e.prototype.removeStructure=function(e){var t=this.Email.structures;(void 0===t?[]:t).splice(e,1),this.markForCheck()},e.prototype.addBlock=function(e,t){var n=e.previousIndex,i=void 0===n?0:n,r=e.currentIndex,a=void 0===r?0:r,l=e.item,s=e.previousContainer,c=s.id,p=s.data;if("block-elements"===c){var d=K(l.data);Ce(d,!0),t.splice(a,0,d)}else o.transferArrayItem(p,t,i,a);this.markForCheck()},e.prototype.changeBlockOrder=function(e,t){var n=e.previousIndex,i=void 0===n?0:n,r=e.currentIndex,a=void 0===r?0:r;o.moveItemInArray(t,i,a),this.markForCheck()},e.prototype.duplicateBlock=function(e,t,n){var i=K(n);return Ce(i,!0),t.splice(e,0,i),this.markForCheck(),i},e.prototype.removeBlock=function(e,t){t.splice(e,1),this.markForCheck()},e.prototype.reset=function(){this._Mjml$.next(null),this._Template$.next(null),this.clonedEmail=K(this.Email),this.markForCheck()},e.prototype.undo=function(){var e=this.history.undo();return!!e&&(this.Email=e,this._Email$.next(this.Email),this._Template$.next(null),this._Mjml$.next(null),!0)},e.prototype.redo=function(){var e=this.history.redo();return!!e&&(this.Email=e,this._Email$.next(this.Email),this._Template$.next(null),this._Mjml$.next(null),!0)},e}();Ze.ɵprov=z.ɵɵdefineInjectable({factory:function(){return new Ze(z.ɵɵinject(Ke),z.ɵɵinject(Je),z.ɵɵinject(We),z.ɵɵinject(Qe),z.ɵɵinject(Oe),z.ɵɵinject(Fe))},token:Ze,providedIn:"root"}),Ze.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Ze.ctorParameters=function(){return[{type:Ke},{type:Je},{type:We},{type:Qe},{type:Array,decorators:[{type:t.Inject,args:[Oe]}]},{type:void 0,decorators:[{type:t.Inject,args:[Fe]}]}]};var Xe=function(){function e(e,t){var o=this;this.matDialogRef=e,this.templateList=t,this.chooseCategory$=new n.BehaviorSubject("latest"),this.currentCategoryTemplates$=this.chooseCategory$.pipe(i.map((function(e){return o.templateList.find((function(t){return t.category===e}))||{templates:[]}})),i.pluck("templates"),i.map((function(e){return e.length>0?e:null})))}return e.prototype.chooseTemplate=function(e){this.csdTemplate=e},e.prototype.chageCategory=function(e){this.chooseCategory$.next(e)},e.prototype.getTemplatesList=function(){return this.templateList.filter((function(e){return"latest"!==e.category}))},e.prototype.startBuilding=function(){var e=this;this.chooseCategory$.pipe(i.take(1)).subscribe((function(t){e.matDialogRef.close({category:t,template:e.csdTemplate})}))},e}();Xe.decorators=[{type:t.Component,args:[{selector:"pb-template-list-dialog",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<div fxLayout="column" style="height: 100%;">\n <h2 mat-dialog-title i18n="templates|Modal template header">Custom Templates</h2>\n <div class="mat-typography template-list-wrapper" fxLayout fxLayoutGap="1rem" fxFlex>\n <mat-list fxFlex="200px" dense>\n <mat-list-item (click)="chageCategory(\'latest\')" [ngClass]="{active: (chooseCategory$ | async) === \'latest\'}"\n i18n="templates|category name">\n Latest\n </mat-list-item>\n <mat-divider></mat-divider>\n <mat-list-item *ngFor="let list of getTemplatesList()" (click)="chageCategory(list.category)"\n [ngClass]="{active: (chooseCategory$ | async) === list.category}" i18n="templates|category name">\n {{list.category}}\n </mat-list-item>\n </mat-list>\n\n <ng-container *ngIf="currentCategoryTemplates$ | async as templates;else emptyCategory">\n <cdk-virtual-scroll-viewport itemSize="150" [maxBufferPx]="150" fxFlex>\n <div class="template-list">\n <div *cdkVirtualFor="let template of templates" class="template-list-item" (click)="chooseTemplate(template)"\n i18n-matTooltip="templates|Click to choose message" matTooltip="Click to choose">\n <img [src]="template.thumbPath" [alt]="template.title" />\n <div class="description">\n <h3>{{template.title}}</h3>\n </div>\n </div>\n </div>\n </cdk-virtual-scroll-viewport>\n </ng-container>\n </div>\n <mat-dialog-actions align="end">\n <button mat-button mat-dialog-close i18n="actions|Undo">Undo</button>\n <button mat-button (click)="startBuilding()" [disabled]="!csdTemplate" i18n="actions|Start">\n Start\n </button>\n </mat-dialog-actions>\n</div>\n\n\n<ng-template #emptyCategory>\n <div fxFlex fxLayout="column" fxLayoutAlign="center center" class="empty-category-notification">\n <mat-icon>notifications</mat-icon>\n <h2 i18n="templates|No templates in current category message">This category is empty!</h2>\n </div>\n</ng-template>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */:host{display:block;height:inherit}.template-list-wrapper mat-list{position:sticky;top:0}.template-list-wrapper mat-list mat-list-item{text-transform:capitalize;cursor:pointer;border-radius:3px;transition:all .3s linear}.template-list-wrapper mat-list mat-list-item.active,.template-list-wrapper mat-list mat-list-item:hover{background-color:#f3f3f3}.template-list-wrapper .template-list{display:grid;gap:1rem;grid-template:150px/repeat(3,1fr)}@media screen and (max-width:699px){.template-list-wrapper .template-list{grid-template:150px/repeat(2,1fr)}}.template-list-wrapper .template-list-item{border-radius:3px;overflow:hidden;border:1px solid #ccc;padding:.5rem;position:relative;background-color:#f3f3f3}.template-list-wrapper .template-list-item img{-o-object-fit:cover;object-fit:cover;-o-object-position:top;object-position:top;height:calc(200px - 1rem);width:100%;cursor:pointer;animation:objectPosition 3s linear infinite alternate;animation-play-state:paused}.template-list-wrapper .template-list-item .description{position:absolute;bottom:0;right:0;left:0;background-color:#fff;padding:.5rem;opacity:1;transition:all .3s linear;text-transform:capitalize}.template-list-wrapper .template-list-item .description h3{margin:0}.template-list-wrapper .template-list-item:hover img{animation-play-state:running}.template-list-wrapper .template-list-item:hover .description{bottom:-44px;opacity:.6}.empty-category-notification mat-icon{height:50px;width:50px;font-size:50px}.empty-category-notification h2{text-transform:uppercase}@keyframes objectPosition{to{-o-object-position:bottom;object-position:bottom}}"]}]}],Xe.ctorParameters=function(){return[{type:l.MatDialogRef},{type:Array,decorators:[{type:t.Inject,args:[l.MAT_DIALOG_DATA]}]}]};var et=function(e,t){this.dialogRef=e,this.data=t};et.decorators=[{type:t.Component,args:[{selector:"pb-confirm-dialog",template:'\n <h2 mat-dialog-title>Are you sure?</h2>\n <mat-dialog-actions fxLayout fxLayoutAlign="space-between center" fxLayoutGap="1rem">\n <button mat-stroked-button mat-dialog-close="0">No</button>\n <button mat-stroked-button color="warn" mat-dialog-close="1">Yes</button>\n </mat-dialog-actions>\n '}]}],et.ctorParameters=function(){return[{type:l.MatDialogRef},{type:void 0,decorators:[{type:t.Inject,args:[l.MAT_DIALOG_DATA]}]}]};var tt=function(){function e(e,t){this.pbMiddlewares=e,this.bottomSheetRef=t,this.importing=!1,this.fileReader=new FileReader}return e.prototype.openBrowserModal=function(e){e.preventDefault(),this.uploadInput.nativeElement.click()},e.prototype.startImporting=function(){var e=this;this.importing=!0,this.pbMiddlewares.importFile(this.uploadInput.nativeElement.files.item(0)).pipe(i.take(1),i.catchError((function(t){return e.pbMiddlewares.catchError(t).pipe(i.switchMap((function(){return e.bottomSheetRef.dismiss(t),n.EMPTY})))}))).subscribe((function(t){e.fileReader.readAsText(t,"utf-8")}))},e.prototype.ngOnInit=function(){var e=this;this.fileReader.addEventListener("loadend",(function(){e.importing=!1;try{var t=JSON.parse(e.fileReader.result);e.bottomSheetRef.dismiss(t)}catch(t){throw e.bottomSheetRef.dismiss(null),new Error(t)}}))},e.prototype.ngOnDestroy=function(){},e}();tt.decorators=[{type:t.Component,args:[{selector:"pb-import-dialog",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<mat-nav-list>\n <mat-list-item (click)="openBrowserModal($event)">\n <div *ngIf="!importing">\n <span mat-line i18n="import|Import JSON file">Import JSON file</span>\n </div>\n <ng-container *ngIf="importing">\n <span mat-line i18n="import|Importing in progress">Importing in progress ...</span>\n \x3c!-- <span mat-line>{{ imageInfo }}</span> --\x3e\n </ng-container>\n </mat-list-item>\n <mat-progress-bar *ngIf="importing" mode="buffer" value="100"></mat-progress-bar>\n</mat-nav-list>\n<input type="file" accept="application/json" fxHide #uploadInput (change)="startImporting()" />\n',styles:["/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */"]}]}],tt.ctorParameters=function(){return[{type:We},{type:s.MatBottomSheetRef}]},tt.propDecorators={uploadInput:[{type:t.ViewChild,args:["uploadInput",{read:t.ElementRef,static:!0}]}]};var nt=function(){function e(e,t,o,r){var a=this;this.emailObjectStore=e,this.matDialog=t,this.bottomSheet=o,this.snackBar=r,this.activeMatProgress$=new n.ReplaySubject,this.cdkDropListConnectedTo$=this.emailObjectStore.emailStructuresAsObservable$.pipe(i.map((function(e){return e.reduce((function(e,t,n){var i=t.elements;return e.push.apply(e,W(i.map((function(e,t){return"column-droplist-"+t+"-"+n})))),e}),[])})),i.distinct(),i.distinctUntilKeyChanged("length"),i.shareReplay()),this._currentEditingStructure$=new n.BehaviorSubject(null),this.currentEditingStructure$=this._currentEditingStructure$.pipe(i.subscribeOn(n.animationFrameScheduler),i.distinctUntilChanged(),i.catchError((function(){return n.of(null)})),i.shareReplay()),this._currentEditingBlock$=new n.BehaviorSubject(null),this.currentEditingBlock$=this._currentEditingBlock$.pipe(i.subscribeOn(n.animationFrameScheduler),i.distinctUntilChanged(),i.catchError((function(){return n.of(null)})),i.shareReplay()),this._blockHighlight$=new n.BehaviorSubject(null),this.blockHighlight$=this._blockHighlight$.asObservable(),this._editGeneralSettings$=new n.Subject,this.editGeneralSettings$=this._editGeneralSettings$.pipe(i.subscribeOn(n.animationFrameScheduler),i.tap((function(){return a.changeTabIndex(2)})),i.distinctUntilChanged(),i.shareReplay()),this._currentTabIndex$=new n.BehaviorSubject(0),this.currentTabIndex$=this._currentTabIndex$.pipe(i.subscribeOn(n.animationFrameScheduler),i.distinctUntilChanged())}return e.prototype.editBlock=function(e){this._currentEditingStructure$.next(null),this._currentEditingBlock$.next(e),this._editGeneralSettings$.next("block")},e.prototype.editStructure=function(e){this._currentEditingBlock$.next(null),this._editGeneralSettings$.next("structure"),this._currentEditingStructure$.next(e)},e.prototype.editGeneralSettings=function(){this.resetElements(),this._editGeneralSettings$.next("general")},e.prototype.changeTabIndex=function(e){this._currentTabIndex$.next(e)},e.prototype.highlightBlock=function(e,t){void 0===t&&(t={}),this._blockHighlight$.next({blockId:e,options:t})},e.prototype.clearBlockHighlight=function(){this._blockHighlight$.next(null)},e.prototype.confirmDialog$=function(){return this.matDialog.open(et).afterClosed().pipe(i.map((function(e){return"1"===e})))},e.prototype.templatesListDialog$=function(e){return this.matDialog.open(Xe,{data:e,width:"60vw",maxWidth:"800px",height:"70vh",maxHeight:"900px"}).afterClosed().pipe(i.filter((function(e){return Boolean(e)})))},e.prototype.importDialog$=function(){return this.bottomSheet.open(tt,{ariaLabel:"Browse media"}).afterDismissed()},e.prototype.notify=function(e,t,n){return void 0===t&&(t="dismiss"),void 0===n&&(n=3e3),this.snackBar.open(e,t,{duration:n})},e.prototype.currentEditingBlock=function(){return this._currentEditingBlock$.getValue()},e.prototype.currentEditingStructure=function(){return this._currentEditingStructure$.getValue()},e.prototype.currentStructureEqualWith=function(e){return this.currentEditingStructure()===e},e.prototype.currentBlockEqualWith=function(e){return this.currentEditingBlock()===e},e.prototype.currentStructureContainsActiveBlock=function(e){var t=this;return e.elements.some((function(e){return e.some((function(e){return e===t.currentEditingBlock()}))}))},e.prototype.resetElements=function(){this._currentEditingStructure$.next(null),this._currentEditingBlock$.next(null)},e.prototype.reset=function(){this.resetElements(),this.clearBlockHighlight(),this.changeTabIndex(0)},e}();nt.decorators=[{type:t.Injectable}],nt.ctorParameters=function(){return[{type:Ze},{type:l.MatDialog},{type:s.MatBottomSheet},{type:a.MatSnackBar}]};var it=function(){function e(e,t,n,o){this.config=e,this.emailObjectStore=t,this.pbMiddleWares=n,this.pbUserInterface=o,this.modules=new Set,this.customTemplates=new Set,this._mergeTags=new Set,this.onTemplateCreated$=this.emailObjectStore.onTemplateCreated$.pipe(i.shareReplay()),this.onSave$=this.onTemplateCreated$,this.isLoading=this.pbUserInterface.activeMatProgress$.asObservable(),this.isLoading$=this.pbUserInterface.activeMatProgress$.asObservable(),this.config=Object.assign(Object.assign({},Me),this.config)}return e.prototype.openCustomSidebarTab=function(){this.pbUserInterface.changeTabIndex(3)},e.prototype.highlightBlock=function(e,t){return void 0===t&&(t={}),!!this.Email.structures.some((function(t){return t.elements.some((function(t){return t.some((function(t){return t.id===e}))}))}))&&(this.pbUserInterface.highlightBlock(e,t),!0)},e.prototype.clearBlockHighlight=function(){this.pbUserInterface.clearBlockHighlight()},e.prototype.createHTMLTemplate$=function(){var e=this;return this.pbUserInterface.activeMatProgress$.next(!0),this.emailObjectStore.createHTMLTemplate$().pipe(i.tap((function(){return e.pbUserInterface.activeMatProgress$.next(!1)})),i.catchError((function(t){return e.pbMiddleWares.catchError(t).pipe(i.switchMap((function(){return e.pbUserInterface.notify(t.message),e.pbUserInterface.activeMatProgress$.next(!1),n.EMPTY})))})),i.finalize((function(){return e.pbUserInterface.activeMatProgress$.next(!1)})))},e.prototype.saveEmail=function(){return this.createHTMLTemplate$()},Object.defineProperty(e.prototype,"Email",{get:function(){return this.emailObjectStore.Email},set:function(e){this.emailObjectStore.setEmail(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Template",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Mjml",{get:function(){return null},enumerable:!1,configurable:!0}),e.prototype.getEmailAsObservable$=function(){return this.emailObjectStore.emailAsObservable$},e.prototype.getTemplateAsObservable$=function(){return this.emailObjectStore.templateAsObservable$},e.prototype.getMjmlAsObservable$=function(){return this.emailObjectStore.mjmlAsObservable$},e.prototype.onChanges$=function(){return this.onTemplateCreated$},e}();it.decorators=[{type:t.Injectable}],it.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[Fe]}]},{type:Ze},{type:We},{type:nt}]};var ot=function(){function e(e,t,i,o,r,a){this.sanitizer=e,this.ngb=t,this.userRestApi=i,this.userInterface=o,this.middlewares=r,this.bottomSheetRef=a,this.uploading=!1,this.progress=new n.Subject}return Object.defineProperty(e.prototype,"imageInfo",{get:function(){if(this.choosedImage){var e=this.choosedImage,t=e.lastModified,n=e.size;return new Date(t).toLocaleString()+", "+oe(n)+"."}return""},enumerable:!1,configurable:!0}),e.prototype.previewLink=function(){return this.sanitizer.bypassSecurityTrustResourceUrl(this.objectUrl)},e.prototype.openBrowserModal=function(e){e.preventDefault();var t=this.ngb.config.uploadImagePath;!this.uploading&&t?this.uploadInput.nativeElement.click():t||this.userInterface.notify("Hm ... this isn't a bug, it seems 'uploadImagePath' is empty!")},e.prototype.uploadInputChanged=function(){var e=this.uploadInput.nativeElement;e.files.length&&this._startUploading(e.files.item(0))},e.prototype._startUploading=function(e){var t=this;this.objectUrl&&URL.revokeObjectURL(this.objectUrl),this.objectUrl=URL.createObjectURL(e),this.uploading=!0;var o=this.ngb.config,a=o.uploadImagePath,l=o.csrf,s=new FormData;return l&&s.append(l.name,l.token),s.append("image",e),this.userRestApi.userImageUpload$(s,a).pipe(i.catchError((function(e){return t.middlewares.catchError(e).pipe(i.switchMap((function(){return t.userInterface.notify(e.message),n.EMPTY})))})),i.finalize((function(){return t.progress.complete()}))).subscribe((function(e){if(e.type===r.HttpEventType.UploadProgress){var n=Math.round(100*e.loaded/e.total);t.progress.next(n)}else e instanceof r.HttpResponse&&(e.body.success?(t.bottomSheetRef.dismiss(e.body.path),t.userInterface.notify("Successfully uploaded.",null,1e3)):t.userInterface.notify(e.body.message,"Dismiss",null))}))},e.prototype.ngOnDestroy=function(){this.objectUrl&&URL.revokeObjectURL(this.objectUrl)},e}();ot.decorators=[{type:t.Component,args:[{selector:"pb-upload-bottom-sheet-dialog",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<mat-nav-list>\n <mat-list-item (click)="openBrowserModal($event)">\n <div *ngIf="!uploading">\n <span mat-line i18n="upload|Browse images from computer">Browse images from computer</span>\n </div>\n <ng-container *ngIf="uploading">\n <img matListAvatar [src]="previewLink()" />\n <span mat-line i18n="upload|Uploading Message">Uploading ...</span>\n <span mat-line>{{ imageInfo }}</span>\n </ng-container>\n </mat-list-item>\n <mat-progress-bar *ngIf="uploading" mode="buffer" [value]="progress | async"></mat-progress-bar>\n</mat-nav-list>\n<input type="file" accept="image/*" fxHide #uploadInput (change)="uploadInputChanged()" />\n',styles:[""]}]}],ot.ctorParameters=function(){return[{type:c.DomSanitizer},{type:it},{type:Ke},{type:nt},{type:We},{type:s.MatBottomSheetRef}]},ot.propDecorators={uploadInput:[{type:t.ViewChild,args:["uploadInput",{static:!0}]}]};var rt=function(){};rt.decorators=[{type:t.Injectable}];var at=function(e){function t(t,n){var i=e.call(this)||this;return i.matBottomSheet=t,i.userMiddlewaresService=n,i}return U(t,e),t.prototype.browse$=function(){var e=this;return this.matBottomSheet.open(ot,{ariaLabel:"Browse media"}).afterDismissed().pipe(i.switchMap((function(t){return e.userMiddlewaresService.uploadImage(t)})))},t}(rt),lt=function(){function e(e,t,n,i,o,r,a){this.imageCategoryList=e,this.userConfig=t,this.matDialogRef=n,this.sanitizer=i,this.userRestApi=o,this.middlewares=r,this.userInterface=a,this.currentMenuItem="gallery"}return e.prototype.changeCurrentMenuItem=function(e){this.currentMenuItem=e},e.prototype.addImageToTemplate=function(e){void 0===e&&(e=this.choseImage),this.matDialogRef.close(e)},e.prototype.previewImage=function(e){var t=e.target;this.uploadImageFile=t.files.item(0),this.imagePreviewObjectUrl&&URL.revokeObjectURL(this.imagePreviewObjectUrl),this.imagePreviewObjectUrl=URL.createObjectURL(this.uploadImageFile),this.uploadImagePreview=this.sanitizer.bypassSecurityTrustResourceUrl(this.imagePreviewObjectUrl)},e.prototype.startUploading=function(){var e=this,t=this.userConfig,o=t.csrf,a=t.uploadImagePath,l=new FormData;return o&&l.append(o.name,o.token),l.append("image",this.uploadImageFile),this.userRestApi.userImageUpload$(l,a).pipe(i.catchError((function(t){return e.middlewares.catchError(t).pipe(i.switchMap((function(){return e.userInterface.notify(t.message),n.EMPTY})))}))).subscribe((function(t){t.type===r.HttpEventType.UploadProgress||t instanceof r.HttpResponse&&(t.body.success?(e.addImageToTemplate(t.body.path),e.userInterface.notify("Successfully uploaded.",null,1e3)):e.userInterface.notify(t.body.message,"Dismiss",null))}))},e.prototype.ngOnDestroy=function(){this.imagePreviewObjectUrl&&URL.revokeObjectURL(this.imagePreviewObjectUrl)},e}();lt.decorators=[{type:t.Component,args:[{selector:"pb-upload-image-gallery",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<div fxLayout="column" style="height: 100%;">\n <h2 mat-dialog-title i18n="image-gallery|Modal Image gallery header">Image Gallery</h2>\n <div class="mat-typography gallery-list-wrapper" fxLayout fxLayoutGap="1rem" fxFlex>\n <mat-list fxFlex="200px">\n <mat-list-item (click)="changeCurrentMenuItem(\'gallery\')" [class.active]="currentMenuItem === \'gallery\'"\n i18n="image-gallery|Image list">\n Gallery Image list\n </mat-list-item>\n <mat-list-item (click)="changeCurrentMenuItem(\'upload\')" [class.active]="currentMenuItem === \'upload\'"\n i18n="image-gallery|Upload an image">\n Upload an image\n </mat-list-item>\n </mat-list>\n\n <ng-container *ngIf="currentMenuItem === \'gallery\'">\n <ng-container *ngIf="imageCategoryList.length;else emptyImageList">\n <cdk-virtual-scroll-viewport itemSize="150" [minBufferPx]="150 * 10" fxFlex\n class="gallery-list">\n <div *cdkVirtualFor="let imagePath of imageCategoryList" class="gallery-list-item"\n (click)="choseImage = imagePath" i18n-matTooltip="image-gallery|Click to choose message"\n matTooltip="Click to choose">\n <img [src]="imagePath" />\n </div>\n </cdk-virtual-scroll-viewport>\n </ng-container>\n </ng-container>\n <ng-container *ngIf="currentMenuItem === \'upload\'">\n <div class="upload-image" fxLayout="column" fxLayoutAlign="center center" fxFlex fxLayoutGap="1rem">\n <label class="upload-image-item" [class.empty]="!uploadImagePreview">\n <div class="upload-image-item-overview" fxLayout="column" fxLayoutAlign="center center">\n <mat-icon>backup</mat-icon>\n </div>\n <img class="upload-image-item-preview" *ngIf="uploadImagePreview" [src]="uploadImagePreview" />\n <input type="file" fxHide pattern="image/*" (change)="previewImage($event)">\n </label>\n <button mat-flat-button color="primary" (click)="startUploading()" i18n="image-gallery|Upload and insert into template">\n Upload and insert into template\n </button>\n </div>\n </ng-container>\n </div>\n <mat-dialog-actions align="end">\n <button mat-button mat-dialog-close i18n="actions|Undo">Cancel</button>\n <button mat-stroked-button color="primary" [disabled]="!choseImage" (click)="addImageToTemplate()"\n i18n="actions|Start">\n Add to template\n </button>\n </mat-dialog-actions>\n</div>\n\n\n<ng-template #emptyImageList>\n <div fxFlex fxLayout="column" fxLayoutAlign="center center" class="empty-category-notification">\n <mat-icon>notifications</mat-icon>\n <h2 i18n="image-gallery|Image list is empty message">Image list is empty!</h2>\n </div>\n</ng-template>\n',styles:["/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */mat-list{background-color:#fff}mat-list mat-list-item{cursor:pointer}mat-list mat-list-item.active{background-color:#ccc}.gallery-list ::ng-deep .cdk-virtual-scroll-content-wrapper{display:grid;gap:.3rem;grid-template:auto/repeat(4,1fr)}.gallery-list-item{height:120px;background-color:#ccc;cursor:pointer}.gallery-list-item img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center}.upload-image-item{width:80%;height:200px;background-color:#ccc;position:relative;border-radius:3px;padding:1em;text-align:center}.upload-image-item.empty .upload-image-item-overview,.upload-image-item:hover .upload-image-item-overview{opacity:1}.upload-image-item-overview{opacity:0;position:absolute;top:0;bottom:0;left:0;right:0;cursor:pointer;transition:opacity .5s linear}.upload-image-item-overview mat-icon{height:50px;width:50px;font-size:50px}.upload-image-item-preview{max-height:100%}"]}]}],lt.ctorParameters=function(){return[{type:Array,decorators:[{type:t.Inject,args:[l.MAT_DIALOG_DATA]}]},{type:void 0,decorators:[{type:t.Inject,args:[Fe]}]},{type:l.MatDialogRef},{type:c.DomSanitizer},{type:Ke},{type:We},{type:nt}]};var st=function(e){function t(t,n,i){var o=e.call(this)||this;return o.matDialog=t,o.userMiddleware=n,o.userRestApi=i,o}return U(t,e),t.prototype.browse$=function(){var e=this;return this.userRestApi.getUserImages$().pipe(i.exhaustMap((function(t){return e.matDialog.open(lt,{data:t,width:"60vw",maxWidth:"800px",height:"60vh",maxHeight:"800px"}).afterClosed()})),i.filter((function(e){return!!e.length})),i.switchMap((function(t){return e.userMiddleware.uploadImage(t)})))},t}(rt),ct=function(){function e(e,t,i,o){this.userInterfaceService=e,this.emailObjectStore=t,this.chRef=i,this.pbMiddlewaresService=o,this.structure=new se,this.cdkDropListConnectedTo$=this.userInterfaceService.cdkDropListConnectedTo$,this.validate=function(e){var t=+(e.rectangle.width/this.fr).toFixed(2);return t>1&&t<=10-this.structure.columns}.bind(this),this.componentIsDestroyed$=new n.Subject}return Object.defineProperty(e.prototype,"isStructureActive",{get:function(){return this.isActive},enumerable:!1,configurable:!0}),e.prototype.onHostClick=function(e){e.stopImmediatePropagation(),this.editStructure()},e.prototype.removeStructure=function(e){var t=this;e.stopPropagation(),this.pbMiddlewaresService.removeStructure(this.index,this.structure).pipe(i.exhaustMap((function(){return t.userInterfaceService.confirmDialog$()})),i.filter((function(e){return e})),i.take(1)).subscribe((function(){t.emailObjectStore.removeStructure(t.index),t.userInterfaceService.resetElements()}))},e.prototype.duplicateStructure=function(e){var t=this;e.stopPropagation(),this.pbMiddlewaresService.duplicateStructure(this.index,this.structure).pipe(i.map((function(){return t.emailObjectStore.duplicateStructure(t.index)})),i.take(1)).subscribe((function(e){t.editStructure(e)}))},e.prototype.dropNewBlock=function(e,t){var n=this;e.previousContainer===e.container?this.emailObjectStore.addBlock(e,t):this.pbMiddlewaresService.addBlock(e,t).pipe(i.map((function(e){return n.emailObjectStore.addBlock(e.event,e.column)}))).subscribe((function(){n.chRef.markForCheck()}))},e.prototype.disableBlockDrag$=function(e){return this.pbMiddlewaresService.disableBlockDragWithinEmailBody(e).pipe(i.take(1))},e.prototype.editStructure=function(e){var t=this;void 0===e&&(e=this.structure),this.pbMiddlewaresService.editStructure(e).pipe(i.take(1)).subscribe((function(e){t.userInterfaceService.editStructure(e)}))},e.prototype.getResizeEdges=function(e){return{right:e+1!==this.structure.columns,left:0!==e}},e.prototype.createColumnId=function(e){return"column-droplist-"+e+"-"+this.index},e.prototype.getColumnStyles=function(e){var t=this.structure.options,n=t.gaps,i=void 0===n?[4,4]:n,o=t.columns,r=(void 0===o?[]:o)[e]||le,a="center";return"bottom"===r.verticalAlign?a="flex-end":"top"===r.verticalAlign&&(a="flex-start"),Object.assign({padding:i.map((function(e){return e+"px"})).join(" "),backgroundColor:r.background.color,placeSelf:a+" stretch"},Z(r.border))},e.prototype.onResizeEnd=function(e,t){var n=e.rectangle;this.structure.options.columnsWidth[t]=+(n.width/this.fr).toFixed(2)},e.prototype.ngDoCheck=function(){(this.isActive||this.userInterfaceService.currentStructureContainsActiveBlock(this.structure))&&this.chRef.markForCheck()},e.prototype.ngOnInit=function(){var e=this,t=this.structure.options,n=t.columns,o=t.columnsWidth;if(!n||!o){var r=this.structure,a=r.type,l=r.elements,s=r.options;this.editStructure(new se(a,l,s))}var c=this.emailObjectStore.Email.general.width.value,p=V(this.structure.options.gaps,2)[1];this.fr=(c-p*this.structure.columns)/10,this.userInterfaceService.currentEditingStructure$.pipe(i.map((function(t){return t===e.structure})),i.takeUntil(this.componentIsDestroyed$)).subscribe((function(t){e.isActive=t}))},e.prototype.ngOnDestroy=function(){this.componentIsDestroyed$.next(""),this.componentIsDestroyed$.complete()},e}();ct.decorators=[{type:t.Component,args:[{selector:"pb-structure",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<div class="column" *ngFor="let column of structure.elements; let index = index" cdkDropList mwlResizable\n [enableGhostResize]="false" [resizeSnapGrid]="{ left: fr, right: fr }" [resizeEdges]="getResizeEdges(index)"\n [validateResize]="validate" (resizing)="onResizeEnd($event, index)"\n (cdkDropListDropped)="dropNewBlock($event, column)" [class.empty]="!column.length" [ngStyle]="getColumnStyles(index)"\n [cdkDropListConnectedTo]="cdkDropListConnectedTo$ | async" [cdkDropListData]="column" [id]="createColumnId(index)">\n\n <div *ngIf="!column.length" class="empty-block" i18n="structure|Inside empty block">DnD blocks</div>\n\n <pb-block *ngFor="let block of column; let index = index" cdkDrag [cdkDragData]="block" [block]="block"\n [index]="index" [column]="column" [cdkDragDisabled]="disableBlockDrag$(block) | async">\n <button mat-icon-button class="move" cdkDragHandle i18n-matTooltip="block|Change Block order"\n matTooltip="Change Block order" *ngIf="!(disableBlockDrag$(block) | async)">\n <mat-icon i18n-aria-label="block|Move block" aria-label="Move block" inline>pan_tool</mat-icon>\n </button>\n </pb-block>\n</div>\n\n<ng-content select=".move"></ng-content>\n<div class="tools" fxLayoutGap="0.25rem">\n <button mat-icon-button class="edit" color="primary" i18n-matTooltip="structure|Change structure settings"\n matTooltip="Change structure settings">\n <mat-icon i18n-aria-label="structure|Edit structure" aria-label="Edit structure" inline>edit</mat-icon>\n </button>\n <button mat-icon-button (click)="duplicateStructure($event)" i18n-matTooltip="structure|Duplicate structure"\n matTooltip="Duplicate structure">\n <mat-icon i18n-aria-label="structure|Duplicate structure" aria-label="Duplicate structure" inline>file_copy\n </mat-icon>\n </button>\n <button mat-icon-button color="warn" (click)="removeStructure($event)" i18n-matTooltip="structure|Delete structure"\n matTooltip="Delete structure">\n <mat-icon i18n-aria-label="structure|Remove Structure" aria-label="Remove Structure" inline>delete_forever\n </mat-icon>\n </button>\n</div>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.Emulated,exportAs:"structure",styles:["/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */pb-block>.cdk-drag-handle{position:absolute;top:-30px;right:0;cursor:move;background-color:rgba(63,81,181,.5);color:#fff;border-radius:50% 50% 0 0;opacity:0;height:30px;width:30px;font-size:smaller}pb-block>.cdk-drag-handle mat-icon{margin-top:-8px}pb-block>.cdk-drag-handle:hover{background-color:#3f51b5}pb-block.cdk-drag-preview .cdk-drag-handle,pb-block:hover .cdk-drag-handle{opacity:1}:host{display:grid;border:1px solid #ccc;position:relative;grid-template-columns:1fr}:host>.tools{direction:ltr;position:absolute;opacity:0;left:0;bottom:-25px;color:#ff4081}:host>.tools button{background-color:#fff;border-radius:0 0 3px 3px;height:25px;width:25px;line-height:0}:host.active,:host.cdk-drag-placeholder,:host.cdk-drag-preview,:host:hover{box-shadow:0 0 1px 2px #ff4081;z-index:1}:host:hover>.tools{opacity:1}:host:hover>.tools button{background-color:#ff4081;color:#fff}:host.active>.tools>.edit{display:none}:host.cols_2{grid-template-columns:repeat(2,6fr)}:host.cols_3{grid-template-columns:repeat(3,4fr)}:host.cols_4{grid-template-columns:repeat(4,3fr)}:host.cols_12{grid-template-columns:7fr 5fr}:host.cols_21{grid-template-columns:5fr 7fr}:host .cdk-drop-list-dragging,:host .cdk-drop-list-receiving{height:100%}:host>.column{box-sizing:border-box}:host>.column.empty{height:60px}:host>.column.empty .empty-block{background-color:rgba(101,99,99,.21);height:100%;display:flex;justify-content:center;place-items:center;flex-direction:column;color:rgba(101,99,99,.3);font-size:small}:host>.column.empty.cdk-drop-list-dragging .empty-block{display:none}:host>.column.empty>.cdk-drag-placeholder{min-height:60px!important}"]}]}],ct.ctorParameters=function(){return[{type:nt},{type:Ze},{type:t.ChangeDetectorRef},{type:We}]},ct.propDecorators={structure:[{type:t.Input}],index:[{type:t.Input}],isStructureActive:[{type:t.HostBinding,args:["class.active"]}],onHostClick:[{type:t.HostListener,args:["click",["$event"]]}]};var pt=function(){function e(){}return e.prototype.transform=function(e){var t,n,i={"áÁ":"a","éÉ":"e","íÍ":"i","óÓ":"o","úÚ":"u","ñÑ":"n"};try{for(var o=G(Object.keys(i)),r=o.next();!r.done;r=o.next()){var a=r.value;e=e.replace(new RegExp("["+a+"]","g"),i[a])}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return e.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},e}();pt.decorators=[{type:t.Pipe,args:[{name:"slugify"}]}];var dt=function(){function e(e,i,o,r,a,l,s,c,p,d,u,m){var g,b;if(this.ngb=e,this.userRestApiService=i,this.userInterfaceService=o,this.emailObjectStore=r,this.renderer2=a,this.slugifyPipe=l,this.middlewares=s,this.changeDetectorRef=c,this.structures=p,this.blocks=d,this.doc=m,this.customSidebarTabLabel="",this.emailChange=new t.EventEmitter,this.previewTemplate=!1,this.showGeneralSettings$=this.userInterfaceService.editGeneralSettings$,this.currentTabIndex$=this.userInterfaceService.currentTabIndex$,this.cdkDropListConnectedTo$=this.userInterfaceService.cdkDropListConnectedTo$,this.getBuilderContainerStyles$=this.emailObjectStore.builderContainerStyles$,this.currentHTMLTemplate$=this.emailObjectStore.templateAsObservable$,this.activeMatProgress$=this.userInterfaceService.activeMatProgress$.asObservable(),this.customModuleList$=this.userRestApiService.getAllUserModules$,this.canUndo$=this.emailObjectStore.canUndo$,this.canRedo$=this.emailObjectStore.canRedo$,this._onDestroy$=new n.Subject,this.includedFonts=new Set,this.doc)try{for(var h=G(u),f=h.next();!f.done;f=h.next()){var y=f.value,v=this.doc.createElement("link");v.href="https://fonts.googleapis.com/css?family="+y,v.rel="stylesheet",this.includedFonts.add(v),this.doc.head.appendChild(v)}}catch(e){g={error:e}}finally{try{f&&!f.done&&(b=h.return)&&b.call(h)}finally{if(g)throw g.error}}}return e.prototype.writeValue=function(e){try{this.userInterfaceService.clearBlockHighlight(),this.emailObjectStore.setEmail(e),this.previewTemplate=!1,this.changeDetectorRef.markForCheck()}catch(e){this.userInterfaceService.notify(e.message)}},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){console.info("[IpEmailBuilderComponent] Method [setDisabledState] is not implemented.")},e.prototype.saveEmail=function(){var e=this;return this.emailObjectStore.currentEmailHasChanges$.pipe(i.withLatestFrom(this.emailObjectStore.templateAsObservable$),i.exhaustMap((function(t){var n=V(t,2),i=n[0],o=n[1];return i||!o?e.ngb.createHTMLTemplate$():e.userInterfaceService.notify("No changes were detected to be saved!").afterDismissed()})),i.take(1)).subscribe()},e.prototype.disableBlocksList$=function(e){var t=this;return n.iif((function(){var t;return!(null===(t=e.state)||void 0===t?void 0:t.disabled)}),this.emailObjectStore.emailStructuresAsObservable$.pipe(i.map((function(e){return e.length>0})),i.exhaustMap((function(n){return n?t.middlewares.disableBlockDragFromList(e):ae(!0)})))).pipe(i.take(1))},e.prototype.disableStructureList$=function(e){return this.middlewares.disableStructureDragFromList(e).pipe(i.take(1))},e.prototype.undo=function(){this.emailObjectStore.undo()&&this.userInterfaceService.notify("Undo applied","short")},e.prototype.redo=function(){this.emailObjectStore.redo()&&this.userInterfaceService.notify("Redo applied","short")},e.prototype.trackByFn=function(e){return e.type},e.prototype.changeTabIndex=function(e){this.userInterfaceService.changeTabIndex(e)},e.prototype.download=function(e){var t=this;return this.middlewares.exportFile(e).pipe(i.exhaustMap((function(){return t.ngb.createHTMLTemplate$().pipe(i.map((function(t){return Object.assign(Object.assign({},t),{type:e})})))})),i.catchError((function(e){return t.middlewares.catchError(e).pipe(i.switchMap((function(){return t.userInterfaceService.notify(e.message),n.EMPTY})))})),i.take(1)).subscribe((function(e){var n=e.type,i=e.html,o=e.mjml,r=t.renderer2.createElement("a"),a=i;"mjml"===n?a=o:"json"===n&&(a=JSON.stringify(t.ngb.Email,null,1));var l=URL.createObjectURL(new Blob([a],{type:"json"===n?"text/json":"text/html"})),s=t.slugifyPipe.transform(t.ngb.Email.general.name||"ngb-template");r.href=l,r.target="_blank",r.download=s+"."+n,r.click(),URL.revokeObjectURL(l)}))},e.prototype.importFile=function(){var e=this;this.userInterfaceService.importDialog$().pipe(i.switchMap((function(e){if(e instanceof Error)throw e;return ae(e)})),i.catchError((function(t){return e.middlewares.catchError(t).pipe(i.switchMap((function(){return e.userInterfaceService.notify(t.message),n.EMPTY})))})),i.take(1),i.filter((function(e){return!!e}))).subscribe((function(t){e.writeValue(t),e.userInterfaceService.notify("Email has been imported successfully.")}))},e.prototype.createArrayFromStructureColumns=function(e){var t=e.columns;return new Array(t).fill("")},e.prototype.togglePreview=function(){var e=this;return this.emailObjectStore.createHTMLTemplate$().pipe(i.exhaustMap((function(){return e.middlewares.togglePreview(!e.previewTemplate)})),i.catchError((function(t){return e.middlewares.catchError(t).pipe(i.switchMap((function(){return e.userInterfaceService.notify(t.message),n.EMPTY})))})),i.take(1)).subscribe((function(t){e.previewTemplate=t,e.changeDetectorRef.markForCheck()}))},e.prototype.ngOnInit=function(){var e=this;n.fromEvent(window,"beforeunload").pipe(i.withLatestFrom(this.emailObjectStore.currentEmailHasChanges$),i.filter((function(e){var t=V(e,2);t[0];return t[1]})),i.switchMap((function(t){var n=V(t,1)[0];return e.middlewares.preventWindowExit(n)})),i.takeUntil(this._onDestroy$)).subscribe((function(e){e.preventDefault(),e.returnValue=""})),this.emailObjectStore.emailAsObservable$.pipe(i.takeUntil(this._onDestroy$)).subscribe((function(t){var n,i;null===(n=e.onTouched)||void 0===n||n.call(e),null===(i=e.onChange)||void 0===i||i.call(e,t),e.emailChange.next(t),e.doc&&(null==t?void 0:t.customFonts)&&t.customFonts.forEach((function(t){if(!Array.from(e.includedFonts).find((function(e){return e.href===t.url}))){var n=e.doc.createElement("link");n.href=t.url,n.rel="stylesheet",e.includedFonts.add(n),e.doc.head.appendChild(n)}}))})),n.fromEvent(this.doc,"keydown").pipe(i.filter((function(e){var t=e.ctrlKey||e.metaKey,n=e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement;return t&&!n})),i.takeUntil(this._onDestroy$)).subscribe((function(t){"z"!==t.key&&"Z"!==t.key||(t.shiftKey?t.shiftKey&&(t.preventDefault(),e.redo()):(t.preventDefault(),e.undo()))}))},e.prototype.ngOnChanges=function(e){e.email&&this.writeValue(e.email.currentValue)},e.prototype.ngOnDestroy=function(){this._onDestroy$.next(),this._onDestroy$.complete(),this.userInterfaceService.reset(),this.doc&&this.includedFonts.forEach((function(e){return e.remove()})),this.includedFonts.clear()},e}();dt.decorators=[{type:t.Component,args:[{selector:"pb-email-builder",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<mat-sidenav-container>\n <div class="pb-builder-container" fxLayout="column" fxFlex>\n <mat-progress-bar *ngIf="activeMatProgress$ | async" mode="buffer"></mat-progress-bar>\n <mat-toolbar fxLayoutGap="1rem" fxLayoutAlign="space-between center">\n <ng-content fxLayout fxLayoutGap="0.5rem" select=".top-actions"></ng-content>\n\n <div fxFlexlayout fxLayoutGap="0.5rem">\n <button *ngIf="ngb.config.useSaveButton" type="button" (click)="saveEmail()" mat-stroked-button color="primary"\n i18n="actions|Save Email">\n Save Email\n </button>\n <button *ngIf="ngb.config.usePreviewButton" type="button" (click)="togglePreview()" mat-stroked-button>\n <ng-container [ngSwitch]="previewTemplate">\n <span *ngSwitchDefault i18n="actions|Preview">Preview</span>\n <span *ngSwitchCase="true" i18n="actions|Close Preview">Close Preview</span>\n </ng-container>\n </button>\n\n <button mat-button mat-stroked-button i18n="actions|Import" (click)="importFile()">\n Import\n </button>\n\n <ng-container *ngIf="ngb.config.useDownloadButton">\n <button mat-button [matMenuTriggerFor]="downloadMenu" mat-stroked-button i18n="actions|Export">\n Export\n </button>\n <mat-menu #downloadMenu="matMenu">\n <button mat-menu-item (click)="download(\'html\')" i18n="actions|Export HTML">\n Export HTML\n </button>\n <button mat-menu-item (click)="download(\'mjml\')" i18n="actions|Export MJML">\n Export MJML\n </button>\n <button mat-menu-item (click)="download(\'json\')" i18n="actions|Export JSON">\n Export JSON\n </button>\n </mat-menu>\n </ng-container>\n\n </div>\n <div class="history-actions">\n <button type="button" mat-icon-button (click)="undo()" [disabled]="!(canUndo$ | async) || previewTemplate"\n matTooltip="Undo (Ctrl+Z)" i18n-matTooltip="actions|undo shortcut tooltip"\n class="history-btn">\n <mat-icon>undo</mat-icon>\n </button>\n <button type="button" mat-icon-button (click)="redo()" [disabled]="!(canRedo$ | async) || previewTemplate"\n matTooltip="Redo (Ctrl+Shift+Z)" i18n-matTooltip="actions|redo shortcut tooltip"\n class="history-btn">\n <mat-icon>redo</mat-icon>\n </button>\n </div>\n </mat-toolbar>\n <ng-container [ngSwitch]="previewTemplate">\n <pb-builder-container *ngSwitchDefault [ngStyle]="getBuilderContainerStyles$ | async">\n <ng-content select=".rewrited-empty-email"></ng-content>\n </pb-builder-container>\n\n <pb-preview-template fxLayout fxFlex="auto" fxLayoutAlign="center" [template]="currentHTMLTemplate$ | async"\n *ngSwitchCase="true">\n </pb-preview-template>\n </ng-container>\n </div>\n <mat-sidenav mode="side" fxFlex="0 0 400px" [opened]="!previewTemplate" position="end" class="pb-builder-content">\n <mat-tab-group [selectedIndex]="currentTabIndex$ | async" (selectedIndexChange)="changeTabIndex($event)">\n <mat-tab i18n-label="Content" label="Content">\n <div class="main-padding">\n <cdk-drop-list class="elements" [cdkDropListConnectedTo]="cdkDropListConnectedTo$ | async"\n [cdkDropListData]="blocks" [cdkDropListSortingDisabled]="true" id="block-elements">\n <div cdkDrag *ngFor="let block of blocks; trackBy: trackByFn" [cdkDragData]="block"\n [cdkDragDisabled]="disableBlocksList$(block) | async" class="drag-element"\n [matTooltip]="block.state.message">\n <mat-icon>{{ block.icon }}</mat-icon>\n <div class="drag-element-title">{{ block.title }}</div>\n </div>\n </cdk-drop-list>\n\n <mat-divider style="margin: 1em 0;"></mat-divider>\n \x3c!-- <h3 class="divider"><span>Structures</span></h3> --\x3e\n <cdk-drop-list class="elements structure-elements" cdkDropListConnectedTo="structures-drop-list"\n [cdkDropListSortingDisabled]="true" [cdkDropListData]="structures">\n <div cdkDrag *ngFor="let structure of structures; trackBy: trackByFn" [cdkDragData]="structure"\n [cdkDragDisabled]="disableStructureList$(structure) | async" class="drag-element structure-element"\n [ngClass]="structure.type">\n <div *ngFor="let column of createArrayFromStructureColumns(structure)"></div>\n </div>\n </cdk-drop-list>\n <ng-content fxLayout fxLayoutGap="0.5rem" select=".after-structure-blocks"></ng-content>\n </div>\n </mat-tab>\n <mat-tab i18n-label="Modules" label="Modules" class="modules-tab">\n <cdk-virtual-scroll-viewport itemSize="54" [minBufferPx]="54 * 10" [maxBufferPx]="54 * 20"\n style="height: inherit;"\n *ngIf="customModuleList$ | async as modules; else emptyModuleList">\n <div class="main-padding">\n <div class="custom-modules" cdkDropList cdkDropListConnectedTo="structures-drop-list"\n [cdkDropListData]="modules" [cdkDropListSortingDisabled]="true">\n <div fxLayout="column" fxLayoutGap="1rem">\n <ng-container *cdkVirtualFor="let module of modules">\n <div cdkDrag [cdkDragData]="module.module"\n [cdkDragDisabled]="disableStructureList$(module.module) | async" class="drag-element"\n style="padding: 1em;text-transform: uppercase;height: 54px;">\n <span *ngIf="module.name">{{module.name}}</span>\n \x3c!-- <img *ngIf="module.thumb" [src]="module.thumb" /> --\x3e\n </div>\n </ng-container>\n </div>\n </div>\n <ng-content fxLayout fxLayoutGap="0.5rem" select=".after-content-blocks"></ng-content>\n </div>\n </cdk-virtual-scroll-viewport>\n <ng-template #emptyModuleList>\n <h4 class="main-padding" style="text-align: center;" i18n="modules|empty list message">\n Module list is empty\n </h4>\n </ng-template>\n </mat-tab>\n <mat-tab i18n-label="Settings" label="Settings">\n <div class="pb-builder-options" [ngSwitch]="showGeneralSettings$ | async">\n <pb-general-settings *ngSwitchDefault></pb-general-settings>\n <pb-block-settings *ngSwitchCase="\'block\'"></pb-block-settings>\n <pb-structure-settings *ngSwitchCase="\'structure\'" fxLayout="column"></pb-structure-settings>\n </div>\n </mat-tab>\n <mat-tab *ngIf="customSidebarTabLabel" [label]="customSidebarTabLabel">\n <ng-content select=".custom-sidebar-tab"></ng-content>\n </mat-tab>\n </mat-tab-group>\n </mat-sidenav>\n</mat-sidenav-container>\n',exportAs:"pbEmailBuilder",changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[{provide:B.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return dt})),multi:!0},pt],styles:['/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */:host{display:block;height:100vh}.hide{display:none}::ng-deep mat-sidenav-container{height:100%}::ng-deep mat-sidenav-container mat-sidenav-content{width:100%;z-index:unset!important;overflow:unset!important}::ng-deep h3.divider{text-align:center;display:block;overflow:hidden;margin:0 0 1rem}::ng-deep h3.divider span{font-weight:100;position:relative;display:inline-block}::ng-deep h3.divider span:after,::ng-deep h3.divider span:before{content:"";position:absolute;top:50%;height:1px;background:#ccc;width:99999px}::ng-deep h3.divider span:before{left:100%;margin-left:10px}::ng-deep h3.divider span:after{right:100%;margin-right:10px}::ng-deep .pb-builder-content{border-right:1px solid rgba(0,0,0,.12)}::ng-deep .pb-builder-content .overflow{position:absolute;top:0;bottom:0;left:0;right:0;background-color:#fff;opacity:.5;display:none;z-index:3}::ng-deep .pb-builder-content.disabled .overflow{display:block}::ng-deep .pb-builder-content .mat-tab-label{flex:1 1 0;min-width:0;height:64px;font-size:medium;text-transform:uppercase;padding:0 12px}::ng-deep .pb-builder-content .mat-tab-body-wrapper,::ng-deep .pb-builder-content .mat-tab-group{height:100%}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body{padding:0}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body .elements{display:grid;grid-gap:.5rem;margin-bottom:1rem;grid-template:repeat(2,1fr)/repeat(3,1fr)}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body .elements.structure-elements{grid-template:repeat(4,1fr)/1fr}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body .elements.cdk-drop-list-dragging .cdk-drag{transform:none!important}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body input{height:auto;border:none}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body .custom-modules .drag-element img{max-width:100%}::ng-deep .pb-builder-container{position:relative;height:100%}::ng-deep .pb-builder-container mat-progress-bar{position:absolute}::ng-deep .pb-builder-container mat-toolbar{background-color:#fff}::ng-deep .pb-builder-options .mat-expansion-panel{box-shadow:none!important}::ng-deep .pb-builder-options .mat-expansion-panel.mat-expanded{overflow:visible}::ng-deep .pb-builder-options mat-expansion-panel-header:not(.mat-expanded){background:rgba(0,0,0,.04)}::ng-deep .pb-builder-options ::ng-deep .group{display:grid;grid-template:auto/repeat(2,1fr);grid-gap:1rem}::ng-deep .pb-builder-options ::ng-deep .group>*{align-self:center}::ng-deep .pb-builder-options ::ng-deep .group+.group{margin-top:1em}::ng-deep .pb-builder-options ::ng-deep .group.four{grid-template-columns:repeat(4,1fr)}::ng-deep .pb-builder-options ::ng-deep .group.f-large{grid-template-columns:2fr 1fr}::ng-deep .pb-builder-options ::ng-deep .group.l-large{grid-template-columns:1fr 2fr}::ng-deep .pb-builder-options ::ng-deep .group.three{grid-template-columns:repeat(3,1fr)}::ng-deep .pb-builder-options ::ng-deep .group.three.f-small{grid-template-columns:1fr repeat(2,2fr)}::ng-deep .pb-builder-options ::ng-deep .group.three.f-large{grid-template-columns:2fr repeat(2,1fr)}::ng-deep .pb-builder-options ::ng-deep .group.three.l-large{grid-template-columns:repeat(2,1fr) 2fr}::ng-deep .pb-builder-options ::ng-deep .group .mat-form-field-infix{width:auto!important}::ng-deep .drag-element{text-align:center;border:1px solid #ccc;box-sizing:border-box;background:#fff;color:#7b7b7b;cursor:move;transition:box-shadow .3s ease-in-out;will-change:box-shadow;border-radius:3px}::ng-deep .drag-element.cdk-drag-disabled,::ng-deep .drag-element.cdk-drag-placeholder{cursor:not-allowed;opacity:.6}::ng-deep .drag-element:hover{box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}::ng-deep .drag-element .mat-icon{font-size:40px!important;padding:.5rem;width:auto;height:auto}::ng-deep .drag-element img{max-width:100%}::ng-deep .drag-element-title{font-size:.9em;text-transform:uppercase;margin-bottom:.5rem}::ng-deep .drag-element.structure-element{height:60px;position:relative;padding:4px;display:grid;grid-template:1fr/1fr}::ng-deep .drag-element.structure-element>div{background:#ccc;border:4px solid #bbb}::ng-deep .drag-element.structure-element.cols_2{grid-template-columns:repeat(2,5fr)}::ng-deep .drag-element.structure-element.cols_3{grid-template-columns:repeat(3,3.33fr)}::ng-deep .drag-element.structure-element.cols_4{grid-template-columns:repeat(4,2.5fr)}::ng-deep .drag-element.structure-element.cols_12{grid-template-columns:6fr 4fr}::ng-deep .drag-element.structure-element.cols_21{grid-template-columns:4fr 6fr}::ng-deep .main-padding{padding:1rem}::ng-deep .history-actions{margin-inline-start:auto;display:flex;gap:.5rem;align-items:center}::ng-deep .history-actions .history-btn{transition:all .2s ease-in-out;color:rgba(0,0,0,.54)}::ng-deep .history-actions .history-btn:hover:not([disabled]){background-color:rgba(0,0,0,.08);border-radius:4px;color:rgba(0,0,0,.87)}::ng-deep .history-actions .history-btn[disabled]{opacity:.38}::ng-deep .cdk-drop-list-receiving>:not(.cdk-drag){opacity:.6}::ng-deep .cdk-drop-list-dragging>*{pointer-events:none}@keyframes drag-animation{0%{opacity:0;height:0}to{opacity:1}}::ng-deep .cdk-drag-animating{animation:drag-animation 1s cubic-bezier(0,0,.2,1) infinite}::ng-deep .cdk-drag-preview{border-radius:4px;box-shadow:0 0 0 2px rgba(63,81,181,.5);min-height:60px;min-width:100px;background-color:#fff}::ng-deep .cdk-drag.structure-element.cdk-drag-placeholder{box-shadow:0 0 1px 2px #ff4081;width:100%;pointer-events:none}']}]}],dt.ctorParameters=function(){return[{type:it},{type:Ke},{type:nt},{type:Ze},{type:t.Renderer2},{type:pt},{type:We},{type:t.ChangeDetectorRef},{type:Array,decorators:[{type:t.Inject,args:[Le]}]},{type:Array,decorators:[{type:t.Inject,args:[_e]}]},{type:Array,decorators:[{type:t.Inject,args:[Oe]}]},{type:Document,decorators:[{type:t.Inject,args:[O.DOCUMENT]}]}]},dt.propDecorators={email:[{type:t.Input}],customSidebarTabLabel:[{type:t.Input}],emailChange:[{type:t.Output}]};var ut=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();ut.decorators=[{type:t.Directive}],ut.propDecorators={portal:[{type:t.ViewChild,args:[E.CdkPortal,{static:!0}]}]};var mt=function(){function e(e,t,n,i,o,r,a){var l=this;this.matDialogRef=e,this.changeDetectorRef=t,this.elementRef=n,this.document=i,this.clipboard=o,this.query="",this.sections=[],this.length="",this.previewToken="",this.supportsLength=!1,this.copied=!1,this.selectedTokenBase="",this.closing=!1,this.outsidePointerDown=function(e){return l.closeOnOutsidePointerDown(e)},this.config=Ae(a),this.fields=r.map((function(e){return l.normalizeField(e)})),this.updateSections()}return e.prototype.updateQuery=function(e){this.query=e,this.updateSections()},e.prototype.onSearchInput=function(e){this.updateQuery(e.target.value),this.changeDetectorRef.detectChanges()},e.prototype.selectField=function(e){var t=e.value.match(/^(\{![^{}:]+:[^{}:]+)(?::([1-9]\d*))?\}$/);this.selectedField=e,this.supportsLength=this.config.display.length&&Boolean(t),this.selectedTokenBase=this.supportsLength&&t?t[1]:e.value,this.length=this.supportsLength&&t&&t[2]||"",this.copied=!1,this.updatePreviewToken()},e.prototype.onLengthInput=function(e){var t=e.target,n=t.value.replace(/\D/g,"").replace(/^0+/,"");t.value!==n&&(t.value=n),this.length=n,this.copied=!1,this.updatePreviewToken(),this.changeDetectorRef.detectChanges()},e.prototype.copyPreviewToken=function(){this.previewToken&&(this.copied=this.clipboard.copy(this.previewToken),this.changeDetectorRef.detectChanges())},e.prototype.insertSelectedField=function(){!this.closing&&this.previewToken&&(this.closing=!0,this.matDialogRef.close(this.previewToken))},e.prototype.closeOnOutsidePointerDown=function(e){this.closing||this.elementRef.nativeElement.contains(e.target)||(this.closing=!0,this.matDialogRef.close())},e.prototype.ngOnInit=function(){this.document.addEventListener("pointerdown",this.outsidePointerDown,!0)},e.prototype.ngOnDestroy=function(){this.document.removeEventListener("pointerdown",this.outsidePointerDown,!0)},e.prototype.trackSection=function(e,t){return t.label},e.prototype.trackField=function(e,t){return t.value},e.prototype.normalizeField=function(e){var t="string"==typeof e?e:e.value,n=this.parseToken(t);return"string"==typeof e?n:Object.assign(Object.assign({},e),{label:e.label||n.label,section:e.section||n.section})},e.prototype.parseToken=function(e){var t=e.match(/^\{!([^{}:]+):([^{}:]+)/);return{value:e,label:t?t[2]:e,section:t?t[1]:this.config.labels.defaultSection}},e.prototype.updateSections=function(){var e=this,t=this.query.trim().toLocaleLowerCase(),n=(t?this.fields.filter((function(n){return e.matchesQuery(n,t)})):this.fields).reduce((function(t,n){var i=e.config.display.sections&&n.section||e.config.labels.defaultSection;return t.has(i)||t.set(i,[]),t.get(i).push(n),t}),new Map);this.sections=Array.from(n.entries()).map((function(e){var t=V(e,2);return{label:t[0],fields:t[1]}}))},e.prototype.matchesQuery=function(e,t){return[e.label,e.value,e.section,e.description].filter((function(e){return Boolean(e)})).some((function(e){return e.toLocaleLowerCase().includes(t)}))},e.prototype.updatePreviewToken=function(){this.supportsLength?this.previewToken=this.selectedTokenBase+(this.length?":"+this.length:"")+"}":this.previewToken=this.selectedTokenBase},e}();mt.decorators=[{type:t.Component,args:[{selector:"pb-merge-field-picker-dialog",template:'<div mat-dialog-title class="merge-field-dialog-header">\n <div>\n <h2>{{ config.labels.title }}</h2>\n <p *ngIf="config.labels.subtitle">{{ config.labels.subtitle }}</p>\n </div>\n <button\n type="button"\n mat-icon-button\n mat-dialog-close\n [attr.aria-label]="config.labels.close"\n [matTooltip]="config.labels.close">\n <mat-icon>close</mat-icon>\n <span class="merge-field-visually-hidden">{{ config.labels.close }}</span>\n </button>\n</div>\n\n<mat-dialog-content>\n <mat-form-field appearance="outline" class="merge-field-search">\n <mat-label>{{ config.labels.search }}</mat-label>\n <mat-icon matPrefix>search</mat-icon>\n <input\n matInput\n cdkFocusInitial\n type="search"\n autocomplete="off"\n [value]="query"\n (input)="onSearchInput($event)" />\n <button\n *ngIf="query"\n type="button"\n mat-icon-button\n matSuffix\n [attr.aria-label]="config.labels.clearSearch"\n [matTooltip]="config.labels.clearSearch"\n (click)="updateQuery(\'\')">\n <mat-icon>close</mat-icon>\n <span class="merge-field-visually-hidden">{{ config.labels.clearSearch }}</span>\n </button>\n </mat-form-field>\n\n <div class="merge-field-sections" *ngIf="sections.length; else noResults">\n <section *ngFor="let section of sections; trackBy: trackSection" class="merge-field-section">\n <h3 *ngIf="config.display.sections">{{ section.label }}</h3>\n <button\n *ngFor="let field of section.fields; trackBy: trackField"\n type="button"\n mat-button\n class="merge-field-option"\n [class.merge-field-option-selected]="selectedField && selectedField.value === field.value"\n [class.merge-field-option-without-value]="!config.display.rawValues"\n [attr.aria-pressed]="selectedField && selectedField.value === field.value"\n (click)="selectField(field)">\n <span class="merge-field-summary">\n <span class="merge-field-label">{{ field.label }}</span>\n <span *ngIf="config.display.descriptions && field.description" class="merge-field-description">\n — {{ field.description }}\n </span>\n </span>\n <code *ngIf="config.display.rawValues">{{ field.value }}</code>\n <span class="merge-field-selection" aria-hidden="true">\n <mat-icon>check</mat-icon>\n </span>\n </button>\n </section>\n </div>\n</mat-dialog-content>\n\n<div *ngIf="selectedField && config.display.preview" class="merge-field-preview">\n <div class="merge-field-preview-heading">\n <span class="merge-field-preview-icon" aria-hidden="true"><mat-icon>code</mat-icon></span>\n <div>\n <span>{{ config.labels.preview }}</span>\n <strong>{{ selectedField.label }}</strong>\n </div>\n </div>\n\n <div class="merge-field-preview-value">\n <div>\n <code>{{ previewToken }}</code>\n </div>\n <button\n *ngIf="config.display.copy"\n type="button"\n mat-button\n [attr.aria-label]="copied ? config.labels.copied : config.labels.copy"\n [matTooltip]="copied ? config.labels.copied : config.labels.copy"\n (click)="copyPreviewToken()">\n <mat-icon>{{ copied ? \'done\' : \'content_copy\' }}</mat-icon>\n <span>{{ copied ? config.labels.copied : config.labels.copy }}</span>\n </button>\n </div>\n\n <label *ngIf="supportsLength" class="merge-field-length">\n <span>\n <strong>{{ config.labels.length }}</strong>\n <small *ngIf="config.labels.optional">{{ config.labels.optional }}</small>\n </span>\n <input\n type="number"\n min="1"\n step="1"\n inputmode="numeric"\n [placeholder]="config.labels.noLengthLimit"\n [value]="length"\n (input)="onLengthInput($event)" />\n </label>\n</div>\n\n<mat-dialog-actions align="end" class="merge-field-actions">\n <button type="button" mat-button mat-dialog-close>{{ config.labels.cancel }}</button>\n <button\n type="button"\n mat-flat-button\n color="primary"\n [disabled]="!selectedField"\n (pointerdown)="insertSelectedField()"\n (click)="insertSelectedField()">\n {{ config.labels.insert }}\n </button>\n</mat-dialog-actions>\n\n<ng-template #noResults>\n <p class="merge-field-empty">{{ config.labels.empty }}</p>\n</ng-template>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block;color:#172033}.merge-field-visually-hidden{position:absolute;overflow:hidden;width:1px;height:1px;padding:0;border:0;margin:-1px;clip:rect(0,0,0,0);white-space:nowrap}.merge-field-dialog-header{display:flex;align-items:flex-start;justify-content:space-between;margin:0;padding:1.5rem 1.5rem 1rem}.merge-field-dialog-header h2{margin:0;font-size:1.25rem;font-weight:650;letter-spacing:-.025em}.merge-field-dialog-header p{margin:.25rem 0 0;color:#667085;font-size:.8125rem;line-height:1.4}.merge-field-dialog-header button{margin:-.5rem -.5rem 0 1rem;color:#667085}mat-dialog-content{margin:0;padding:0 1.5rem}.merge-field-search{width:100%;margin-bottom:.25rem}.merge-field-search mat-icon{color:#98a2b3}.merge-field-search ::ng-deep .mat-form-field-outline-start{border-radius:12px 0 0 12px}.merge-field-search ::ng-deep .mat-form-field-outline-end{border-radius:0 12px 12px 0}.merge-field-sections{display:grid;gap:1rem;padding-bottom:.25rem}.merge-field-section{display:grid;gap:.25rem}.merge-field-section h3{margin:0 .75rem .125rem;color:#667085;font-size:.6875rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase}.merge-field-option{height:auto;min-height:42px;padding:.3125rem .75rem;border:1px solid transparent;border-radius:9px;line-height:1.25;text-align:left;white-space:nowrap;transition:border-color .12s ease,background-color .12s ease,transform .12s ease}.merge-field-option ::ng-deep .mat-button-wrapper{display:grid;align-items:center;width:100%;gap:.625rem;grid-template-columns:minmax(0,1fr) minmax(150px,40%) 20px}.merge-field-option code{overflow:hidden;padding:.1875rem .4375rem;border-radius:5px;background:#f2f4f7;color:#475467;font-size:.71875rem;text-overflow:ellipsis;white-space:nowrap}.merge-field-option:hover{border-color:#e4e7ec;background:#f9fafb}.merge-field-option-selected{border-color:#c7d2fe;background:#eef2ff}.merge-field-option-selected code{background:hsla(0,0%,100%,.7);color:#3730a3}.merge-field-option-selected .merge-field-selection{border-color:#4f46e5;background:#4f46e5;color:#fff;opacity:1;transform:scale(1)}.merge-field-option-selected:hover{border-color:#a5b4fc;background:#e0e7ff}.merge-field-option-without-value ::ng-deep .mat-button-wrapper{grid-template-columns:minmax(0,1fr) 20px}.merge-field-selection{display:grid;width:18px;height:18px;border:1px solid transparent;border-radius:50%;opacity:0;place-items:center;transform:scale(.75);transition:opacity .12s ease,transform .12s ease}.merge-field-selection mat-icon{width:13px;height:13px;font-size:13px;line-height:13px}.merge-field-summary{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.merge-field-label{color:#1d2939;font-weight:600}.merge-field-description,.merge-field-empty{color:#667085}.merge-field-description{font-size:.75rem;font-weight:400}.merge-field-empty{padding:1.5rem 0;text-align:center}.merge-field-preview{display:grid;gap:.75rem;margin:1rem 1.5rem 0;padding:1rem;border:1px solid #dfe3f8;border-radius:12px;background:linear-gradient(135deg,#f8faff,#f4f3ff)}.merge-field-preview-heading{display:flex;align-items:center;gap:.625rem}.merge-field-preview-heading>div{display:flex;min-width:0;flex-direction:column}.merge-field-preview-heading span:not(.merge-field-preview-icon){color:#667085;font-size:.6875rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase}.merge-field-preview-heading strong{overflow:hidden;color:#1d2939;font-size:.8125rem;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.merge-field-preview-icon{display:grid;width:32px;height:32px;border-radius:9px;background:#e0e7ff;color:#4338ca;place-items:center}.merge-field-preview-icon mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.merge-field-preview-value{display:grid;overflow:hidden;min-height:44px;border:1px solid #d0d5dd;border-radius:9px;background:#fff;grid-template-columns:minmax(0,1fr) auto}.merge-field-preview-value>div{display:flex;align-items:center;min-width:0;padding:0 .75rem}.merge-field-preview-value code{overflow:hidden;color:#27324a;font-size:.8125rem;text-overflow:ellipsis;white-space:nowrap}.merge-field-preview-value button{height:100%;min-width:76px;border-left:1px solid #e4e7ec;border-radius:0;color:#4338ca}.merge-field-preview-value button mat-icon{margin-right:.25rem;font-size:18px}.merge-field-length{display:flex;align-items:center;justify-content:space-between;gap:1rem}.merge-field-length>span{display:flex;align-items:baseline;gap:.5rem}.merge-field-length strong{color:#344054;font-size:.75rem;font-weight:600}.merge-field-length small{color:#98a2b3;font-size:.6875rem}.merge-field-length input{width:104px;height:36px;box-sizing:border-box;padding:0 .625rem;border:1px solid #d0d5dd;border-radius:8px;outline:none;background:#fff;color:#1d2939;font:inherit;transition:border-color .12s ease,box-shadow .12s ease}.merge-field-length input:focus{border-color:#6366f1;box-shadow:0 0 0 3px rgba(99,102,241,.14)}.merge-field-length input::-moz-placeholder{color:#98a2b3}.merge-field-length input::placeholder{color:#98a2b3}.merge-field-actions{min-height:auto;margin:0;padding:1rem 1.5rem 1.5rem;gap:.5rem}.merge-field-actions button{min-height:40px;border-radius:8px;font-weight:600}.merge-field-actions .mat-flat-button{padding:0 1.125rem}@media (max-width:520px){.merge-field-option ::ng-deep .mat-button-wrapper{grid-template-columns:minmax(0,1fr) 20px}.merge-field-option code{display:none}}"]}]}],mt.ctorParameters=function(){return[{type:l.MatDialogRef},{type:t.ChangeDetectorRef},{type:t.ElementRef},{type:Document,decorators:[{type:t.Inject,args:[O.DOCUMENT]}]},{type:_.Clipboard},{type:Array,decorators:[{type:t.Inject,args:[l.MAT_DIALOG_DATA]}]},{type:void 0,decorators:[{type:t.Inject,args:[Re]}]}]};var gt=function(e){function t(t,o,r,a,l){var s=e.call(this)||this;return s.userRestApi=t,s.emailObject=o,s.internalService=r,s.matDialog=a,s.setAsReadOnly$=s.internalService.currentEditingBlock$.pipe(i.map((function(e){return e!==s.block}))),s.staticQuillConfig={toolbar:{container:[["bold","italic","underline","strike"],[{header:[1,2,3,4,5,6,!1]},{size:["small",!1,"large","huge"]}],[{align:[]},"link"],[{list:"ordered"},{list:"bullet"}],[{color:[]},{background:[]}],["clean"]],handlers:{mergefield:function(){return s.openMergeFieldPicker()}}}},s.quillInit$=s.userRestApi.getAllUserMergeFields$.pipe(i.map((function(e){s.mergeFields=e,e.length&&s.staticQuillConfig.toolbar.container.splice(-1,0,["mergefield"])})),i.mapTo(!0),i.take(1)),s.textChanged$=new n.Subject,s.componentDestroyed$=new n.Subject,s.mergeFields=[],s.mergeFieldPickerConfig=Ae(l),s}return U(t,e),t.prototype.getTextStyles=function(){var e=this.block.options,t=e.color,n=e.font,i=e.lineHeight,o=e.padding;return Object.assign(Object.assign(Object.assign({color:t,"word-break":"break-all"},ne(i)),te(n)),X(o))},t.prototype.contentChanged=function(){this.textChanged$.next()},t.prototype.editorCreated=function(e){var t=e.getModule("toolbar"),n=t&&t.container.querySelector(".ql-mergefield");n&&(n.setAttribute("data-label",this.mergeFieldPickerConfig.labels.trigger),n.setAttribute("aria-label",this.mergeFieldPickerConfig.labels.trigger),n.setAttribute("title",this.mergeFieldPickerConfig.labels.trigger))},t.prototype.openMergeFieldPicker=function(){var e=this,t=this.quillEditorComponent&&this.quillEditorComponent.quillEditor;if(t){var n=t.getSelection()||{index:Math.max(t.getLength()-1,0),length:0},o=t.getFormat(n.index,n.length);this.matDialog.open(mt,{data:this.mergeFields,disableClose:!1,hasBackdrop:!0,maxWidth:"720px",panelClass:"pb-merge-field-dialog",width:"560px"}).afterClosed().pipe(i.take(1),i.takeUntil(this.componentDestroyed$)).subscribe((function(i){i&&(t.deleteText(n.index,n.length),t.insertText(n.index,i,o),t.setSelection(n.index+i.length,0),e.contentChanged())}))}},t.prototype.ngOnInit=function(){var e=this;this.textChanged$.pipe(i.debounceTime(600),i.takeUntil(this.componentDestroyed$)).subscribe((function(){e.emailObject.markForCheck()}))},t.prototype.ngOnDestroy=function(){this.componentDestroyed$.next(),this.componentDestroyed$.complete()},t}(ut);gt.decorators=[{type:t.Component,args:[{selector:"pb-text-element",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<div [ngStyle]="getTextStyles()">\n <quill-editor *ngIf="quillInit$ | async; else loadingModules" i18n-placeholder="text-element|placeholder"\n placeholder="Insert text here ..." [modules]="staticQuillConfig" [readOnly]="setAsReadOnly$ |async"\n [(ngModel)]="block.innerText" (onContentChanged)="contentChanged()"\n (onEditorCreated)="editorCreated($event)">\n </quill-editor>\n</div>\n\n<ng-template #loadingModules>\n <span i18n="text-element|loading message">Please wait ...</span>\n</ng-template>\n',encapsulation:t.ViewEncapsulation.None,styles:['@charset "UTF-8";\n/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */\n/*!\n * Quill Editor v1.3.7\n * https://quilljs.com/\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n */.ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container.ql-disabled .ql-editor ul[data-checked]>li:before{pointer-events:none}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;-o-tab-size:4;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6,.ql-editor ol,.ql-editor p,.ql-editor pre,.ql-editor ul{margin:0;padding:0;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol,.ql-editor ul{padding-left:1.5em}.ql-editor ol>li,.ql-editor ul>li{list-style-type:none}.ql-editor ul>li:before{content:"•"}.ql-editor ul[data-checked=false],.ql-editor ul[data-checked=true]{pointer-events:none}.ql-editor ul[data-checked=false]>li *,.ql-editor ul[data-checked=true]>li *{pointer-events:all}.ql-editor ul[data-checked=false]>li:before,.ql-editor ul[data-checked=true]>li:before{color:#777;cursor:pointer;pointer-events:all}.ql-editor ul[data-checked=true]>li:before{content:"☑"}.ql-editor ul[data-checked=false]>li:before{content:"☐"}.ql-editor li:before{display:inline-block;white-space:nowrap;width:1.2em}.ql-editor li:not(.ql-direction-rtl):before{margin-left:-1.5em;margin-right:.3em;text-align:right}.ql-editor li.ql-direction-rtl:before{margin-left:.3em;margin-right:-1.5em}.ql-editor ol li:not(.ql-direction-rtl),.ql-editor ul li:not(.ql-direction-rtl){padding-left:1.5em}.ql-editor ol li.ql-direction-rtl,.ql-editor ul li.ql-direction-rtl{padding-right:1.5em}.ql-editor ol li{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.ql-editor ol li:before{content:counter(list-0,decimal) ". "}.ql-editor ol li.ql-indent-1{counter-increment:list-1}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) ". "}.ql-editor ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2{counter-increment:list-2}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) ". "}.ql-editor ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3{counter-increment:list-3}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) ". "}.ql-editor ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4{counter-increment:list-4}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) ". "}.ql-editor ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5{counter-increment:list-5}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) ". "}.ql-editor ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-6{counter-increment:list-6}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) ". "}.ql-editor ol li.ql-indent-6{counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-7{counter-increment:list-7}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) ". "}.ql-editor ol li.ql-indent-7{counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-8{counter-increment:list-8}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) ". "}.ql-editor ol li.ql-indent-8{counter-reset:list-9}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) ". "}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor.ql-blank:before{color:rgba(0,0,0,.6);content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}.ql-bubble.ql-toolbar:after,.ql-bubble .ql-toolbar:after{clear:both;content:"";display:table}.ql-bubble.ql-toolbar button,.ql-bubble .ql-toolbar button{background:none;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px}.ql-bubble.ql-toolbar button svg,.ql-bubble .ql-toolbar button svg{float:left;height:100%}.ql-bubble.ql-toolbar button:active:hover,.ql-bubble .ql-toolbar button:active:hover{outline:none}.ql-bubble.ql-toolbar input.ql-image[type=file],.ql-bubble .ql-toolbar input.ql-image[type=file]{display:none}.ql-bubble.ql-toolbar .ql-picker-item.ql-selected,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected,.ql-bubble.ql-toolbar .ql-picker-item:hover,.ql-bubble .ql-toolbar .ql-picker-item:hover,.ql-bubble.ql-toolbar .ql-picker-label.ql-active,.ql-bubble .ql-toolbar .ql-picker-label.ql-active,.ql-bubble.ql-toolbar .ql-picker-label:hover,.ql-bubble .ql-toolbar .ql-picker-label:hover,.ql-bubble.ql-toolbar button.ql-active,.ql-bubble .ql-toolbar button.ql-active,.ql-bubble.ql-toolbar button:focus,.ql-bubble .ql-toolbar button:focus,.ql-bubble.ql-toolbar button:hover,.ql-bubble .ql-toolbar button:hover{color:#fff}.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-fill,.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-fill,.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-fill,.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-fill,.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-bubble.ql-toolbar button.ql-active .ql-fill,.ql-bubble .ql-toolbar button.ql-active .ql-fill,.ql-bubble.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-bubble .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-bubble.ql-toolbar button:focus .ql-fill,.ql-bubble .ql-toolbar button:focus .ql-fill,.ql-bubble.ql-toolbar button:focus .ql-stroke.ql-fill,.ql-bubble .ql-toolbar button:focus .ql-stroke.ql-fill,.ql-bubble.ql-toolbar button:hover .ql-fill,.ql-bubble .ql-toolbar button:hover .ql-fill,.ql-bubble.ql-toolbar button:hover .ql-stroke.ql-fill,.ql-bubble .ql-toolbar button:hover .ql-stroke.ql-fill{fill:#fff}.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-bubble.ql-toolbar button.ql-active .ql-stroke,.ql-bubble .ql-toolbar button.ql-active .ql-stroke,.ql-bubble.ql-toolbar button.ql-active .ql-stroke-miter,.ql-bubble .ql-toolbar button.ql-active .ql-stroke-miter,.ql-bubble.ql-toolbar button:focus .ql-stroke,.ql-bubble .ql-toolbar button:focus .ql-stroke,.ql-bubble.ql-toolbar button:focus .ql-stroke-miter,.ql-bubble .ql-toolbar button:focus .ql-stroke-miter,.ql-bubble.ql-toolbar button:hover .ql-stroke,.ql-bubble .ql-toolbar button:hover .ql-stroke,.ql-bubble.ql-toolbar button:hover .ql-stroke-miter,.ql-bubble .ql-toolbar button:hover .ql-stroke-miter{stroke:#fff}@media (pointer:coarse){.ql-bubble.ql-toolbar button:hover:not(.ql-active),.ql-bubble .ql-toolbar button:hover:not(.ql-active){color:#ccc}.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#ccc}.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#ccc}}.ql-bubble,.ql-bubble *{box-sizing:border-box}.ql-bubble .ql-hidden{display:none}.ql-bubble .ql-out-bottom,.ql-bubble .ql-out-top{visibility:hidden}.ql-bubble .ql-tooltip{position:absolute;transform:translateY(10px)}.ql-bubble .ql-tooltip a{cursor:pointer;text-decoration:none}.ql-bubble .ql-tooltip.ql-flip{transform:translateY(-10px)}.ql-bubble .ql-formats{display:inline-block;vertical-align:middle}.ql-bubble .ql-formats:after{clear:both;content:"";display:table}.ql-bubble .ql-stroke{fill:none;stroke:#ccc;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-bubble .ql-stroke-miter{fill:none;stroke:#ccc;stroke-miterlimit:10;stroke-width:2}.ql-bubble .ql-fill,.ql-bubble .ql-stroke.ql-fill{fill:#ccc}.ql-bubble .ql-empty{fill:none}.ql-bubble .ql-even{fill-rule:evenodd}.ql-bubble .ql-stroke.ql-thin,.ql-bubble .ql-thin{stroke-width:1}.ql-bubble .ql-transparent{opacity:.4}.ql-bubble .ql-direction svg:last-child{display:none}.ql-bubble .ql-direction.ql-active svg:last-child{display:inline}.ql-bubble .ql-direction.ql-active svg:first-child{display:none}.ql-bubble .ql-editor h1{font-size:2em}.ql-bubble .ql-editor h2{font-size:1.5em}.ql-bubble .ql-editor h3{font-size:1.17em}.ql-bubble .ql-editor h4{font-size:1em}.ql-bubble .ql-editor h5{font-size:.83em}.ql-bubble .ql-editor h6{font-size:.67em}.ql-bubble .ql-editor a{text-decoration:underline}.ql-bubble .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-bubble .ql-editor code,.ql-bubble .ql-editor pre{background-color:#f0f0f0;border-radius:3px}.ql-bubble .ql-editor pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-bubble .ql-editor code{font-size:85%;padding:2px 4px}.ql-bubble .ql-editor pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-bubble .ql-editor img{max-width:100%}.ql-bubble .ql-picker{color:#ccc;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle}.ql-bubble .ql-picker-label{cursor:pointer;display:inline-block;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-bubble .ql-picker-label:before{display:inline-block;line-height:22px}.ql-bubble .ql-picker-options{background-color:#444;display:none;min-width:100%;padding:4px 8px;position:absolute;white-space:nowrap}.ql-bubble .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding-bottom:5px;padding-top:5px}.ql-bubble .ql-picker.ql-expanded .ql-picker-label{color:#777;z-index:2}.ql-bubble .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#777}.ql-bubble .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#777}.ql-bubble .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-bubble .ql-color-picker,.ql-bubble .ql-icon-picker{width:28px}.ql-bubble .ql-color-picker .ql-picker-label,.ql-bubble .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-bubble .ql-color-picker .ql-picker-label svg,.ql-bubble .ql-icon-picker .ql-picker-label svg{right:4px}.ql-bubble .ql-icon-picker .ql-picker-options{padding:4px 0}.ql-bubble .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px}.ql-bubble .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-bubble .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-bubble .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=""]):before,.ql-bubble .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=""]):before,.ql-bubble .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=""]):before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=""]):before,.ql-bubble .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=""]):before,.ql-bubble .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=""]):before{content:attr(data-label)}.ql-bubble .ql-picker.ql-header{width:98px}.ql-bubble .ql-picker.ql-header .ql-picker-item:before,.ql-bubble .ql-picker.ql-header .ql-picker-label:before{content:"Normal"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="1"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="1"]:before{content:"Heading 1"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="2"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="2"]:before{content:"Heading 2"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="3"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="3"]:before{content:"Heading 3"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="4"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="4"]:before{content:"Heading 4"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="5"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="5"]:before{content:"Heading 5"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="6"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="6"]:before{content:"Heading 6"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{font-size:2em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{font-size:1.5em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{font-size:1.17em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{font-size:1em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{font-size:.83em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{font-size:.67em}.ql-bubble .ql-picker.ql-font{width:108px}.ql-bubble .ql-picker.ql-font .ql-picker-item:before,.ql-bubble .ql-picker.ql-font .ql-picker-label:before{content:"Sans Serif"}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=serif]:before,.ql-bubble .ql-picker.ql-font .ql-picker-label[data-value=serif]:before{content:"Serif"}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before,.ql-bubble .ql-picker.ql-font .ql-picker-label[data-value=monospace]:before{content:"Monospace"}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{font-family:Georgia,Times New Roman,serif}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{font-family:Monaco,Courier New,monospace}.ql-bubble .ql-picker.ql-size{width:98px}.ql-bubble .ql-picker.ql-size .ql-picker-item:before,.ql-bubble .ql-picker.ql-size .ql-picker-label:before{content:"Normal"}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=small]:before,.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=small]:before{content:"Small"}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=large]:before,.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=large]:before{content:"Large"}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=huge]:before,.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=huge]:before{content:"Huge"}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=small]:before{font-size:10px}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=large]:before{font-size:18px}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{font-size:32px}.ql-bubble .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-bubble .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-bubble .ql-toolbar .ql-formats{margin:8px 12px 8px 0}.ql-bubble .ql-toolbar .ql-formats:first-child{margin-left:12px}.ql-bubble .ql-color-picker svg{margin:1px}.ql-bubble .ql-color-picker .ql-picker-item.ql-selected,.ql-bubble .ql-color-picker .ql-picker-item:hover{border-color:#fff}.ql-bubble .ql-tooltip{background-color:#444;border-radius:25px;color:#fff}.ql-bubble .ql-tooltip-arrow{border-left:6px solid transparent;border-right:6px solid transparent;content:" ";display:block;left:50%;margin-left:-6px;position:absolute}.ql-bubble .ql-tooltip:not(.ql-flip) .ql-tooltip-arrow{border-bottom:6px solid #444;top:-6px}.ql-bubble .ql-tooltip.ql-flip .ql-tooltip-arrow{border-top:6px solid #444;bottom:-6px}.ql-bubble .ql-tooltip.ql-editing .ql-tooltip-editor{display:block}.ql-bubble .ql-tooltip.ql-editing .ql-formats{visibility:hidden}.ql-bubble .ql-tooltip-editor{display:none}.ql-bubble .ql-tooltip-editor input[type=text]{background:transparent;border:none;color:#fff;font-size:13px;height:100%;outline:none;padding:10px 20px;position:absolute;width:100%}.ql-bubble .ql-tooltip-editor a{top:10px;position:absolute;right:20px}.ql-bubble .ql-tooltip-editor a:before{color:#ccc;content:"×";font-size:16px;font-weight:700}.ql-container.ql-bubble:not(.ql-disabled) a{position:relative;white-space:nowrap}.ql-container.ql-bubble:not(.ql-disabled) a:before{background-color:#444;border-radius:15px;top:-5px;font-size:12px;color:#fff;content:attr(href);font-weight:400;overflow:hidden;padding:5px 15px;text-decoration:none;z-index:1}.ql-container.ql-bubble:not(.ql-disabled) a:after{border-top:6px solid #444;border-left:6px solid transparent;border-right:6px solid transparent;top:0;content:" ";height:0;width:0}.ql-container.ql-bubble:not(.ql-disabled) a:after,.ql-container.ql-bubble:not(.ql-disabled) a:before{left:0;margin-left:50%;position:absolute;transform:translate(-50%,-100%);transition:visibility 0s ease .2s;visibility:hidden}.ql-container.ql-bubble:not(.ql-disabled) a:hover:after,.ql-container.ql-bubble:not(.ql-disabled) a:hover:before{visibility:visible}quill-editor{display:block;word-break:break-word}quill-editor .ql-container{font-family:inherit;font-size:inherit}quill-editor .ql-container .ql-editor{padding:0!important;line-height:inherit;font:inherit;overflow:visible}quill-editor .ql-mergefield{display:inline-flex;align-items:center;justify-content:center;color:#fff;width:auto!important;min-width:50px;max-width:120px;padding:0 8px!important;white-space:nowrap}quill-editor .ql-mergefield:after{display:block;overflow:hidden;max-width:104px;content:attr(data-label);font-size:12px;line-height:1;text-overflow:ellipsis;white-space:nowrap}quill-editor .ql-tooltip{z-index:10;line-height:normal}quill-editor .ql-toolbar{width:600px;width:-moz-max-content;width:max-content}quill-editor h1,quill-editor h2,quill-editor h3,quill-editor h4,quill-editor h5,quill-editor h6{font-weight:inherit;line-height:inherit}::ng-deep .pb-merge-field-dialog .mat-dialog-container{overflow:hidden;padding:0;border-radius:16px;box-shadow:0 24px 64px rgba(16,24,40,.24)}']}]}],gt.ctorParameters=function(){return[{type:Ke},{type:Ze},{type:nt},{type:l.MatDialog},{type:void 0,decorators:[{type:t.Inject,args:[Re]}]}]},gt.propDecorators={quillEditorComponent:[{type:t.ViewChild,args:[D.QuillEditorComponent]}]};var bt=function(e){function t(t,n,i){var o=e.call(this)||this;return o.imageUploader=t,o.chRef=n,o.ngb=i,o.defaultImageWidth={value:110,unit:"px",auto:!1},o}return U(t,e),Object.defineProperty(t.prototype,"align",{get:function(){return this.block.options.align},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"src",{get:function(){return this.block.src||this.defaultImageSrc},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultImageSrc",{get:function(){return this.ngb.config.apiPath+"/images/placeholders/image-placeholder.png"},enumerable:!1,configurable:!0}),t.prototype.uploadImage=function(){return H(this,void 0,void 0,(function(){var e;return N(this,(function(t){switch(t.label){case 0:return[4,this.imageUploader.browse$().toPromise()];case 1:return(e=t.sent())&&(this.block.src=e,this.chRef.markForCheck()),[2]}}))}))},t.prototype.getImageStyles=function(){var e=this.block.options,t=e.border,n=e.width,i=e.height,o=e.padding,r=!(this.block.src||"").trim()?this.defaultImageWidth:n;return Object.assign(Object.assign({width:ie(r),height:ie(i)},X(o)),Z(t))},t}(ut);bt.decorators=[{type:t.Component,args:[{selector:"pb-image",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n\x3c!-- <div\n class="overflow"\n *ngIf="(ngb.currentEditingBlock$ | async) !== block"\n (click)="uploadImage()"\n>\n <mat-icon inline>cloud_upload</mat-icon>\n</div> --\x3e\n<img [src]="src" [title]="block.options.title" [ngStyle]="getImageStyles()" />\n',styles:[":host{display:block;line-height:0}:host:hover .overflow{opacity:1}.overflow{position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgba(0,0,0,.3);opacity:0;will-change:opacity;transition:opacity .3s cubic-bezier(.075,.82,.165,1);cursor:pointer;color:#fff;display:flex;align-items:center;justify-content:center;font-size:3em}.overflow mat-icon{opacity:.8}img{max-width:100%;box-sizing:border-box}"]}]}],bt.ctorParameters=function(){return[{type:rt},{type:t.ChangeDetectorRef},{type:it}]},bt.propDecorators={align:[{type:t.HostBinding,args:["style.textAlign"]}]};var ht=function(){function e(e,t){this.http=e,this.pbUserRestApiService=t,this.YOUTUBE_OVERLAY="data:image/svg+xml;base64,"+btoa('\n <svg width="200" height="140" xmlns="http://www.w3.org/2000/svg">\n <rect x="0" y="0" width="200" height="140" rx="20" fill="red" fill-opacity="0.9"/>\n <polygon points="75,45 75,95 130,70" fill="white"/>\n </svg>'),this.VIMEO_OVERLAY="data:image/svg+xml;base64,"+btoa('\n <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg">\n <circle cx="100" cy="100" r="90" fill="#00ADEF" fill-opacity="0.9"/>\n <polygon points="80,65 80,135 140,100" fill="white"/>\n </svg>')}return e.prototype.parseVideoUrl=function(e){if(!e)return null;var t=e.match(/(?:youtu\.be\/|youtube\.com\/(?:watch\?v=|embed\/|v\/|shorts\/))([^\?&"'>]+)/);if(t)return{type:"youtube",id:t[1]};var n=e.match(/(?:vimeo\.com\/|player\.vimeo\.com\/video\/)([0-9]+)/);return n?{type:"vimeo",id:n[1]}:null},e.prototype.getYouTubeThumbnail=function(e){return"https://img.youtube.com/vi/"+e+"/mqdefault.jpg"},e.prototype.getVimeoThumbnail=function(e){return H(this,void 0,void 0,(function(){var t,n;return N(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.http.get("https://vimeo.com/api/oembed.json?url="+encodeURIComponent(e)+"&width=1280").toPromise()];case 1:return[2,(null==(t=i.sent())?void 0:t.thumbnail_url)||null];case 2:return n=i.sent(),console.error("Error fetching Vimeo thumbnail:",n),[2,null];case 3:return[2]}}))}))},e.prototype.loadImage=function(e){return new Promise((function(t,n){var i=new Image;i.crossOrigin="anonymous",i.onload=function(){return t(i)},i.onerror=n,i.src=e}))},e.prototype.compositeImages=function(e,t){return H(this,void 0,void 0,(function(){var n,i,o,r,a,l,s,c,p,d,u;return N(this,(function(m){switch(m.label){case 0:return m.trys.push([0,3,,4]),[4,this.loadImage(e)];case 1:return n=m.sent(),i="youtube"===t?this.YOUTUBE_OVERLAY:this.VIMEO_OVERLAY,[4,this.loadImage(i)];case 2:if(o=m.sent(),r=document.createElement("canvas"),!(a=r.getContext("2d")))throw new Error("Could not get canvas context");return r.width=n.width,r.height=n.height,a.drawImage(n,0,0),l=.25*Math.min(r.width/o.width,r.height/o.height),s=o.width*l,c=o.height*l,p=(r.width-s)/2,d=(r.height-c)/2,a.drawImage(o,p,d,s,c),[2,r.toDataURL("image/png")];case 3:return u=m.sent(),console.error("Error compositing images:",u),[2,e];case 4:return[2]}}))}))},e.prototype.generateThumbnail=function(e){var t;return H(this,void 0,void 0,(function(){var n,i,o,r,a;return N(this,(function(l){switch(l.label){case 0:return(n=this.parseVideoUrl(e))?(i=null,"youtube"!==n.type?[3,1]:(i=this.getYouTubeThumbnail(n.id),[3,3])):[2,null];case 1:return"vimeo"!==n.type?[3,3]:[4,this.getVimeoThumbnail(e)];case 2:i=l.sent(),l.label=3;case 3:return i?[4,this.compositeImages(i,n.type)]:[2,null];case 4:o=l.sent(),l.label=5;case 5:return l.trys.push([5,7,,8]),[4,this.pbUserRestApiService.userImageUploadBase64$(o,"thumbnails").toPromise()];case 6:return(null==(r=l.sent())?void 0:r.succeeded)&&(null===(t=r.result)||void 0===t?void 0:t.url)?[2,r.result.url]:[2,null];case 7:return a=l.sent(),console.error("Error uploading video thumbnail:",a),[2,null];case 8:return[2]}}))}))},e}();ht.ɵprov=z.ɵɵdefineInjectable({factory:function(){return new ht(z.ɵɵinject(A.HttpClient),z.ɵɵinject(Ke))},token:ht,providedIn:"root"}),ht.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],ht.ctorParameters=function(){return[{type:r.HttpClient},{type:Ke}]};var ft=function(e){function t(t,i,o,r){var a=e.call(this)||this;return a.imageUploader=t,a.chRef=i,a.ngb=o,a.videoThumbnailService=r,a.defaultPosterWidth={value:160,unit:"px",auto:!1},a.destroy$=new n.Subject,a.srcChange$=new n.Subject,a.previousSrc="",a.isGeneratingThumbnail=!1,a}return U(t,e),Object.defineProperty(t.prototype,"align",{get:function(){return this.block.options.align},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"src",{get:function(){return this.block.src||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"posterSrc",{get:function(){return(this.block.posterSrc||"").trim()||this.defaultPosterSrc},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultPosterSrc",{get:function(){return this.ngb.config.apiPath+"/images/placeholders/video-placeholder.png"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"errorPosterSrc",{get:function(){return this.ngb.config.apiPath+"/images/placeholders/error-placeholder.png"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"videoUrl",{get:function(){return this.block.src||""},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){var e=this;this.srcChange$.pipe(i.debounceTime(500),i.takeUntil(this.destroy$)).subscribe((function(t){return H(e,void 0,void 0,(function(){return N(this,(function(e){switch(e.label){case 0:return[4,this.generateThumbnail(t)];case 1:return e.sent(),[2]}}))}))})),this.block.src&&(this.previousSrc=this.block.src,this.srcChange$.next(this.block.src))},t.prototype.ngDoCheck=function(){this.block&&this.block.src!==this.previousSrc&&(this.previousSrc=this.block.src||"",this.srcChange$.next(this.previousSrc))},t.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},t.prototype.onVideoUrlChange=function(e){return H(this,void 0,void 0,(function(){return N(this,(function(t){return this.block.src=e,this.previousSrc=e,this.srcChange$.next(e),[2]}))}))},t.prototype.generateThumbnail=function(e){return H(this,void 0,void 0,(function(){var t,n;return N(this,(function(i){switch(i.label){case 0:if(!e)return this.block.posterSrc=this.defaultPosterSrc,this.chRef.markForCheck(),[2];this.isGeneratingThumbnail=!0,this.chRef.markForCheck(),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.videoThumbnailService.generateThumbnail(e)];case 2:if(!(t=i.sent()))throw new Error("Failed to generate thumbnail");return this.block.posterSrc=t,[3,5];case 3:return n=i.sent(),console.error("Error generating thumbnail:",n),this.block.posterSrc=this.errorPosterSrc,[3,5];case 4:return this.isGeneratingThumbnail=!1,this.chRef.markForCheck(),[7];case 5:return[2]}}))}))},t.prototype.uploadVideo=function(){return H(this,void 0,void 0,(function(){var e;return N(this,(function(t){switch(t.label){case 0:return[4,this.imageUploader.browse$().toPromise()];case 1:return(e=t.sent())&&(this.block.src=e,this.chRef.markForCheck()),[2]}}))}))},t.prototype.uploadPoster=function(){return H(this,void 0,void 0,(function(){var e;return N(this,(function(t){switch(t.label){case 0:return[4,this.imageUploader.browse$().toPromise()];case 1:return(e=t.sent())&&(this.block.posterSrc=e,this.chRef.markForCheck()),[2]}}))}))},t.prototype.getVideoStyles=function(){var e=this.block.options,t=e.border,n=e.width,i=e.height,o=e.padding,r=!!(this.block.posterSrc||"").trim()?n:this.defaultPosterWidth;return Object.assign(Object.assign({width:ie(r),height:ie(i)},X(o)),Z(t))},t}(ut);ft.decorators=[{type:t.Component,args:[{selector:"pb-video",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<a [href]="videoUrl || \'#\'" [attr.target]="block.options.link?.target || \'_blank\'"\n style="display: inline-block; text-decoration: none;" [style.pointer-events]="ngb.Email ? \'none\' : \'auto\'">\n <img [src]="posterSrc" [title]="block.options.title" [ngStyle]="getVideoStyles()" alt="Video thumbnail" />\n</a>',styles:[":host{display:block;line-height:0}:host:hover .overflow{opacity:1}.overflow{position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgba(0,0,0,.3);opacity:0;will-change:opacity;transition:opacity .3s cubic-bezier(.075,.82,.165,1);cursor:pointer;color:#fff;display:flex;align-items:center;justify-content:center;font-size:3em}.overflow mat-icon{opacity:.8}img,video{max-width:100%;box-sizing:border-box}"]}]}],ft.ctorParameters=function(){return[{type:rt},{type:t.ChangeDetectorRef},{type:it},{type:ht}]},ft.propDecorators={align:[{type:t.HostBinding,args:["style.textAlign"]}]};var yt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getButtonStyles=function(){var e=this.block.options,t=e.backgroundColor,n=e.border,i=e.color,o=e.font,r=e.lineHeight,a=e.innerPadding,l=e.fullWidth;return Object.assign(Object.assign(Object.assign(Object.assign({color:i,width:l?"100%":"auto",backgroundColor:t},te(o)),X(a)),Z(n)),ne(r))},t.prototype.getParentStyles=function(){var e=this.block.options,t=e.align,n=e.padding;return Object.assign({justifyContent:("center"===t?"center":"right"===t&&"flex-end")||"flex-start"},X(n))},t}(ut);yt.decorators=[{type:t.Component,args:[{selector:"pb-button",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<div fxLayout [ngStyle]="getParentStyles()">\n <button type="button" [class.full-width]="block.options.fullWidth" [ngStyle]="getButtonStyles()">\n {{ block.innerText }}\n </button>\n</div>\n',encapsulation:t.ViewEncapsulation.Emulated,styles:["button{transition:all .5s cubic-bezier(.445,.05,.55,.95)}"]}]}];var vt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getDividerStyles=function(){var e=this.block.options,t=e.border,n=e.padding;return Object.assign(Object.assign({},Z(t,"borderTop")),X(n,"margin"))},t.prototype.ngOnInit=function(){},t}(ut);vt.decorators=[{type:t.Component,args:[{selector:"pb-divider",template:'<div [ngStyle]="getDividerStyles()"></div>',styles:["\n :host {\n display: table;\n width: 100%;\n }\n "]}]}];var kt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"height",{get:function(){return ie(this.block.options.height)},enumerable:!1,configurable:!0}),t}(ut);kt.decorators=[{type:t.Component,args:[{selector:"pb-spacer",template:"",styles:["\n :host {\n display: table;\n width: 100%;\n transition: all 500ms cubic-bezier(0.445, 0.05, 0.55, 0.95);\n }\n "]}]}],kt.propDecorators={height:[{type:t.HostBinding,args:["style.height"]}]};var qt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getParentStyles=function(){var e=this.block.options,t=e.color,n=e.font,i=e.lineHeight,o=e.padding;return Object.assign(Object.assign(Object.assign({color:t},ne(i)),te(n)),X(o))},t.prototype.getLabelStyles=function(){var e=this.block.options.innerPadding;return Object.assign(Object.assign({},X(e)),{lineHeight:0})},t.prototype.getSocialListStyles=function(){var e=this.block.options.align;return{display:"flex",placeContent:("left"===e?"flex-start":"right"===e&&"flex-end")||e}},t.prototype.getSocialListClasses=function(){return"social-list "+this.block.options.mode},t.prototype.getSocialNetworkIcon=function(e){return re(e+".png")},t}(ut);qt.decorators=[{type:t.Component,args:[{selector:"pb-social",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<div fxLayout [ngStyle]="getParentStyles()">\n <div [class]="getSocialListClasses()" [ngStyle]="getSocialListStyles()">\n <ng-container *ngIf="block.networks.length; else noSocialNetworks">\n <div class="social-list-item" *ngFor="let network of block.networks">\n <div [ngStyle]="getLabelStyles()">\n <img [src]="getSocialNetworkIcon(network.name)" [style.backgroundColor]="block.options.color" [width]="block.options.iconSize.value"\n [height]="block.options.iconSize.value" [classList]="network.name" [alt]="network.name" />\n </div>\n <span *ngIf="network.label">{{ network.label }}</span>\n </div>\n </ng-container>\n </div>\n</div>\n\n<ng-template #noSocialNetworks>\n <p i18n="social block|Empty social list message">Please add some social networks.</p>\n</ng-template>\n',styles:["/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */:host{display:block}p{margin:0}.social-list{display:flex;width:100%;flex-wrap:wrap}.social-list.horizontal{flex-direction:row}.social-list.vertical{flex-direction:column}.social-list-item{display:flex;flex-direction:row;align-items:center}.social-list-item img{border-radius:3px;background-color:#000}"]}]}];var xt=new Map,wt=function(){function e(e,t){this.cResolver=e,this.viewContainerRef=t,xt.set("text",gt),xt.set("image",bt),xt.set("video",ft),xt.set("button",yt),xt.set("divider",vt),xt.set("spacer",kt),xt.set("social",qt)}return Object.defineProperty(e.prototype,"pbDynamicComponent",{set:function(e){var t=this.cResolver.resolveComponentFactory(xt.get(e.type));this.viewContainerRef.createComponent(t).instance.block=e},enumerable:!1,configurable:!0}),e}();wt.decorators=[{type:t.Directive,args:[{selector:"[pbDynamicComponent]"}]}],wt.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.ViewContainerRef}]},wt.propDecorators={pbDynamicComponent:[{type:t.Input}]};var St=function(){function e(e,t,n,i,o,r,a){var l;this.userInterfaceService=e,this.emailObjectStore=t,this.userRestApi=n,this.pbStorage=i,this.pbMiddlewaresService=o,this.sanitizer=r,this.userConfig=a,this.showTemplateList=null===(l=this.userConfig.templateListIfEmpty)||void 0===l||l,this.getStructures$=this.emailObjectStore.emailStructuresAsObservable$,this.activeMatProgress$=this.userInterfaceService.activeMatProgress$}return e.prototype.onHostClick=function(){this.userInterfaceService.editGeneralSettings()},e.prototype.trackBy=function(e){return e.id},e.prototype.disableStructureDrag$=function(e){return this.pbMiddlewaresService.disableStructureDragWithinEmailBody(e).pipe(i.take(1))},e.prototype.openTemplateDialog=function(e){var t=this;e.stopImmediatePropagation(),this.userInterfaceService.activeMatProgress$.next(!0);var o=this.pbStorage.getCachedTemplateList();return n.iif((function(){return o.length>0}),ae(o),this.userRestApi.getAllUserTemplates$.pipe(i.tap((function(e){return t.pbStorage.cacheTemplateList(e)})))).pipe(i.map((function(e){return W(e,[{category:"latest",templates:t.pbStorage.getLatestUsedTemplates()}])})),i.finalize((function(){return t.userInterfaceService.activeMatProgress$.next(!1)})),i.exhaustMap((function(e){return(null==e?void 0:e.length)>0?t.userInterfaceService.templatesListDialog$(e):n.throwError(new Error("The template list is empty"))})),i.switchMap((function(e){var n=e.category,i=e.template;return t.pbMiddlewaresService.chooseTemplate(n,i)})),i.exhaustMap((function(e){var n=e.category,o=e.template;return t.userRestApi.getUserTemplateData$(n,o).pipe(i.tap((function(e){"latest"!==n&&t.pbStorage.addTemplateToLatestUsed(e)})))})),i.catchError((function(e){return t.pbMiddlewaresService.catchError(e).pipe(i.switchMap((function(){return t.userInterfaceService.notify(e.message),n.EMPTY})))})),i.take(1)).subscribe((function(e){e?t.emailObjectStore.setEmail(new Ge(e.templateData)):t.userInterfaceService.notify("No template was chosen")}))},e.prototype.dropNewStructure=function(e){var t=this;e.previousContainer===e.container?this.emailObjectStore.changeStructureOrder(e):this.pbMiddlewaresService.addStructure(e).pipe(i.tap((function(e){return t.emailObjectStore.addStructure(e)})),i.take(1)).subscribe()},e.prototype.getStructureStyles=function(e){var t=e.options,n=t.border,i=t.background,o=t.padding,r=t.margin,a=t.columnsWidth,l=t.fullWidth;return Object.assign(Object.assign(Object.assign({width:l?"100%":this.emailObjectStore.Email.general.width.value+"px",backgroundRepeat:i.repeat,backgroundColor:i.color,backgroundSize:ie(i.size),backgroundPosition:"top center",gridTemplateColumns:a.map((function(e){return e+"fr"})).join(" ")},Z(n)),X(o)),ee(r))},e.prototype.getBackgroundImage=function(e){var t=e.options.background.url;return this.sanitizer.bypassSecurityTrustStyle(t&&"url("+t+")")},e}();St.decorators=[{type:t.Component,args:[{selector:"pb-builder-container",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<ng-container *ngIf="getStructures$ | async as structures">\n <div cdkDropList [cdkDropListData]="structures"\n cdkDropListConnectedTo="structures-drop-list" id="structures-drop-list"\n (cdkDropListDropped)="dropNewStructure($event)" fxFlex fxLayout="column" fxLayoutAlign="start center">\n <pb-structure cdkDrag\n *ngFor="let structure of structures; trackBy: trackBy; let index = index" [id]="structure.id"\n [index]="index" [ngClass]="structure.type" [structure]="structure"\n [ngStyle]="getStructureStyles(structure)"\n [style.backgroundImage]="getBackgroundImage(structure)"\n [cdkDragDisabled]="disableStructureDrag$(structure) | async">\n <button cdkDragHandle mat-icon-button class="move" *ngIf="!(disableStructureDrag$(structure) | async)"\n i18n-matTooltip="structure|Move Structure" matTooltip="Move Structure">\n <mat-icon i18n-aria-label="structure|Move Structure" aria-label="Move structure" inline>pan_tool</mat-icon>\n </button>\n </pb-structure>\n\n <div class="empty-email mat-typography" *ngIf="!structures.length">\n <ng-content></ng-content>\n <div class="default-empty-email" *ngIf="showTemplateList">\n <h1 i18n="templates|First header">Choose template from list</h1>\n <p i18n="templates|Description">Or create one from scratch by dragging structures and blocks here!</p>\n <button type="button" color="primary" [disabled]="activeMatProgress$ | async"\n (click)="openTemplateDialog($event)" mat-flat-button i18n="templates|Choose a template button">\n Choose template\n </button>\n </div>\n </div>\n </div>\n</ng-container>\n',providers:[],changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */pb-structure>.cdk-drag-handle{position:absolute;cursor:move;border-radius:50% 50% 0 0;height:30px;width:30px;font-size:smaller;line-height:0;top:-30px;right:0;background-color:#ff4081;color:#fff;opacity:0}pb-structure.cdk-drag-preview>.cdk-drag-handle,pb-structure:hover>.cdk-drag-handle{opacity:.8}pb-structure.cdk-drag-preview>.cdk-drag-handle:hover,pb-structure:hover>.cdk-drag-handle:hover{opacity:1}pb-structure ::ng-deep .cdk-drag-placeholder{background-color:#3f51b5;opacity:.6;cursor:move;border-radius:0}pb-structure ::ng-deep .cdk-drag-placeholder ::ng-deep :not(mat-icon){display:none}pb-structure ::ng-deep .cdk-drag-placeholder ::ng-deep mat-icon{padding:5px;color:#fff}:host{background-color:#f2f2f2;overflow-x:hidden;overflow-y:auto;position:relative;height:100%}:host #structures-drop-list{height:-moz-fit-content;height:fit-content;max-width:100%;padding-bottom:3rem;will-change:box-shadow}:host #structures-drop-list .empty-email{display:flex;justify-content:center;align-items:center;flex-direction:column;flex:1 1 100%;margin-top:10%}:host #structures-drop-list .empty-email .default-empty-email{text-align:center}:host #structures-drop-list.cdk-drop-list-dragging .empty-email{display:none}"]}]}],St.ctorParameters=function(){return[{type:nt},{type:Ze},{type:Ke},{type:Je},{type:We},{type:c.DomSanitizer},{type:void 0,decorators:[{type:t.Inject,args:[Fe]}]}]},St.propDecorators={onHostClick:[{type:t.HostListener,args:["click"]}]};var It,Ct,Pt,Tt=function(){function e(e,t,n){var i=this;this.pbEmailObject=e,this.fallbackFonts=n,this.fontsMap=new Map,this.stylesMap=new Map([["normal",$localize(It||(It=Y([":@@font_style_normal:Normal"],[":@@font_style_normal:Normal"])))],["italic",$localize(Ct||(Ct=Y([":@@font_style_italic:Italic"],[":@@font_style_italic:Italic"])))],["oblique",$localize(Pt||(Pt=Y([":@@font_style_oblique:Oblique"],[":@@font_style_oblique:Oblique"])))]]),t.forEach((function(e){var t=V(e.match(/[^\d:,]{2,}|\d{3}/g)),n=t[0],o=t.slice(1);i.fontsMap.set(n.replace("+"," "),W(new Set(o.map(Number))))}))}return Object.defineProperty(e.prototype,"fontWeightList",{get:function(){return this.isGoogleFont()?this.fontsMap.get(this.font.family):[100,400,500,700,900]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"customFonts",{get:function(){return(this.pbEmailObject.Email.customFonts||[]).map((function(e){return e.family}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"customStack",{get:function(){return this.customFonts.join(", ")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontFamilyList",{get:function(){var e=this.customStack;return W(e?[e]:[],this.fontsMap.keys(),this.fallbackFonts)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fallbackFontChoices",{get:function(){var e=this.customStack;return W(e?[e]:[],this.fallbackFonts)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"styles",{get:function(){return W(this.stylesMap.keys())},enumerable:!1,configurable:!0}),e.prototype.markForCheck=function(){this.pbEmailObject.markForCheck()},e.prototype.isCustomFont=function(){return this.customFonts.includes(this.font.family)},e.prototype.isGoogleFont=function(){return this.fontsMap.has(this.font.family)},e.prototype.getStyleLabel=function(e){return this.stylesMap.get(e)},e.prototype.hasProperty=function(e){return this.font.hasOwnProperty(e)},e}();Tt.decorators=[{type:t.Component,args:[{selector:"pb-font-styles",template:'\n <div class="group two">\n <mat-form-field appearance="outline" *ngIf="hasProperty(\'family\')">\n <mat-label i18n="settings|Font Family">Family</mat-label>\n <mat-select [(value)]="font.family" disableRipple (selectionChange)="markForCheck()">\n <mat-option *ngFor="let name of fontFamilyList" [ngStyle]="{ fontFamily: name }" [value]="name">\n {{ name }}\n </mat-option>\n </mat-select>\n <mat-hint *ngIf="isGoogleFont()" i18n="settings|Partial support">Partial support.</mat-hint>\n <mat-hint *ngIf="isCustomFont()" i18n="settings|Custom font">Custom font.</mat-hint>\n <mat-hint *ngIf="!isGoogleFont() && !isCustomFont()" i18n="settings|Full support">Full support.</mat-hint>\n </mat-form-field>\n <mat-form-field appearance="outline" *ngIf="hasProperty(\'fallback\')">\n <mat-label i18n="settings|Font Fallback">Fallback</mat-label>\n <mat-select [(value)]="font.fallback" [disabled]="!isGoogleFont() && !isCustomFont()" disableRipple (selectionChange)="markForCheck()">\n <mat-option *ngFor="let name of fallbackFontChoices" [ngStyle]="{ fontFamily: name }" [value]="name">\n {{ name }}\n </mat-option>\n </mat-select>\n <mat-hint i18n="settings|Full support">Full support.</mat-hint>\n </mat-form-field>\n </div>\n\n <div class="group three">\n <mat-form-field appearance="outline" *ngIf="hasProperty(\'size\')">\n <mat-label i18n="settings|Font Size">Size</mat-label>\n <input matInput type="number" max="30" min="10" step="1" (input)="markForCheck()" [(ngModel)]="font.size" />\n </mat-form-field>\n <mat-form-field appearance="outline" *ngIf="hasProperty(\'weight\')">\n <mat-label i18n="settings|Font Weight">Weight</mat-label>\n <mat-select placeholder="Weight" [(value)]="font.weight" disableRipple (selectionChange)="markForCheck()">\n <mat-option *ngFor="let weight of fontWeightList" [value]="weight">\n {{ weight }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field appearance="outline" style="min-width: 90px;">\n <mat-label i18n="settings|Font Style">Style</mat-label>\n <mat-select placeholder="Style" [(value)]="font.style" disableRipple (selectionChange)="markForCheck()">\n <mat-option *ngFor="let style of styles" [value]="style" i18n>\n {{ getStyleLabel(style) }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n width: 100%;\n }\n "]}]}],Tt.ctorParameters=function(){return[{type:Ze},{type:Array,decorators:[{type:t.Inject,args:[Oe]}]},{type:Array,decorators:[{type:t.Inject,args:[je]}]}]},Tt.propDecorators={font:[{type:t.Input}]};var Bt=function(){function e(e){this.emailObject=e}return e.prototype.markForCheck=function(){this.emailObject.markForCheck()},e}();Bt.decorators=[{type:t.Component,args:[{selector:"pb-padding",template:'\n <div class="group four">\n <mat-form-field appearance="outline">\n <mat-label i18n="Padding Settings|Padding Top">Top</mat-label>\n <input matInput type="number" min="0" step="1" (input)="markForCheck()" [(ngModel)]="padding.top" />\n </mat-form-field>\n <mat-form-field appearance="outline">\n <mat-label i18n="Padding Settings|Padding Right">Right</mat-label>\n <input matInput type="number" min="0" step="1" (input)="markForCheck()" [(ngModel)]="padding.right" />\n </mat-form-field>\n <mat-form-field appearance="outline">\n <mat-label i18n="Padding Settings|Padding Bottom">Bottom</mat-label>\n <input matInput type="number" min="0" step="1" (input)="markForCheck()" [(ngModel)]="padding.bottom" />\n </mat-form-field>\n <mat-form-field appearance="outline">\n <mat-label i18n="Padding Settings|Padding Left">Left</mat-label>\n <input matInput type="number" min="0" step="1" (input)="markForCheck()" [(ngModel)]="padding.left" />\n </mat-form-field>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n width: 100%;\n }\n "]}]}],Bt.ctorParameters=function(){return[{type:Ze}]},Bt.propDecorators={padding:[{type:t.Input}]};var Ot,$t,jt,Dt,Lt=function(){function e(e){this.emailObject=e,this.label=$localize(Ot||(Ot=Y([":@@line_height_label:Line Height"],[":@@line_height_label:Line Height"]))),this.units=["%","px","none"],this.unitsLabels=new Map([["%",$localize($t||($t=Y([":@@unit_percent:Percent"],[":@@unit_percent:Percent"])))],["px",$localize(jt||(jt=Y([":@@unit_pixels:Pixels"],[":@@unit_pixels:Pixels"])))],["none",$localize(Dt||(Dt=Y([":@@unit_none:None"],[":@@unit_none:None"])))]])}return e.prototype.markForCheck=function(){this.emailObject.markForCheck()},e.prototype.getUnitLabel=function(e){return this.unitsLabels.get(e)},e}();Lt.decorators=[{type:t.Component,args:[{selector:"pb-line-height",template:'\n <div class="group">\n <mat-form-field appearance="outline">\n <mat-label>{{ label }}</mat-label>\n <input\n matInput\n [(ngModel)]="lineHeight.value"\n type="number"\n step="1"\n (input)="markForCheck()"\n [disabled]="lineHeight.unit === \'none\'"\n />\n </mat-form-field>\n <mat-form-field appearance="outline">\n <mat-label i18n="Line Height Settings|Change Line Height Unit">Unit</mat-label>\n <mat-select placeholder="Unit" [(value)]="lineHeight.unit" (selectionChange)="markForCheck()" disableRipple>\n <mat-option *ngFor="let unit of units" [value]="unit" i18n>\n {{ getUnitLabel(unit) }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n width: 100%;\n }\n "]}]}],Lt.ctorParameters=function(){return[{type:Ze}]},Lt.propDecorators={lineHeight:[{type:t.Input}],label:[{type:t.Input}],units:[{type:t.Input}]};var Et,_t,Mt,Ft,zt=function(){function e(e){this.emailObject=e,this.disabled=!1,this.units=new Map([["%",$localize(Et||(Et=Y([":@@unit_percent:Percent"],[":@@unit_percent:Percent"])))],["px",$localize(_t||(_t=Y([":@@unit_pixels:Pixels"],[":@@unit_pixels:Pixels"])))],["contain",$localize(Mt||(Mt=Y([":@@unit_contain:Contain"],[":@@unit_contain:Contain"])))],["cover",$localize(Ft||(Ft=Y([":@@unit_cover:Cover"],[":@@unit_cover:Cover"])))]])}return e.prototype.markForCheck=function(){this.emailObject.markForCheck()},e.prototype.getLabel=function(){return this.label},e.prototype.toggleChange=function(e){var t=e.checked;this.model.auto=t,this.markForCheck()},e.prototype.getUnits=function(){return this.model.units||["%","px"]},e.prototype.disableValueField=function(){return this.model.auto||-1===["%","px"].indexOf(this.model.unit)},e.prototype.showAutoSlider=function(){return this.model.hasOwnProperty("auto")},e.prototype.getUnitLabel=function(e){return this.units.get(e)},e}();zt.decorators=[{type:t.Component,args:[{selector:"pb-width-height",template:'\n <div class="group" [ngClass]="{ three: showAutoSlider() }">\n <mat-form-field appearance="outline">\n <mat-label>{{ getLabel() }}</mat-label>\n <input\n matInput\n [(ngModel)]="model.value"\n [disabled]="disableValueField() || disabled"\n type="number"\n [placeholder]="getLabel()"\n (input)="markForCheck()"\n />\n </mat-form-field>\n <mat-form-field appearance="outline">\n <mat-label i18n="Size Settings|Size Unit">Unit</mat-label>\n <mat-select [disabled]="model.auto || disabled" [(value)]="model.unit" (selectionChange)="markForCheck()" disableRipple>\n <mat-option *ngFor="let unit of getUnits()" [value]="unit" i18n>\n {{ getUnitLabel(unit) }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-slide-toggle\n style="margin-top: -20px;"\n *ngIf="showAutoSlider()"\n [checked]="model.auto"\n (change)="toggleChange($event)"\n [disabled]="disabled"\n i18n="Size Settings|Size Auto"\n >\n Auto\n </mat-slide-toggle>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n width: 100%;\n }\n "]}]}],zt.ctorParameters=function(){return[{type:Ze}]},zt.propDecorators={model:[{type:t.Input}],label:[{type:t.Input}],disabled:[{type:t.Input}]};var At,Rt,Ut,Ht,Nt,Gt=function(){function e(e){this.emailObject=e,this._styleLabels=new Map([["solid",$localize(At||(At=Y([":@@border_style_solid:Solid"],[":@@border_style_solid:Solid"])))],["dotted",$localize(Rt||(Rt=Y([":@@border_style_dotted:Dotted"],[":@@border_style_dotted:Dotted"])))],["dashed",$localize(Ut||(Ut=Y([":@@border_style_dashed:Dashed"],[":@@border_style_dashed:Dashed"])))],["double",$localize(Ht||(Ht=Y([":@@border_style_double:Double"],[":@@border_style_double:Double"])))],["groove",$localize(Nt||(Nt=Y([":@@border_style_groove:Groove"],[":@@border_style_groove:Groove"])))]])}return Object.defineProperty(e.prototype,"styleLabels",{get:function(){return W(this._styleLabels.keys())},enumerable:!1,configurable:!0}),e.prototype.getStyleLabel=function(e){return this._styleLabels.get(e)},e.prototype.markForCheck=function(){this.emailObject.markForCheck()},e.prototype.isEven=function(){return Object.keys(this.border).length%2==0},e.prototype.hasOwnProperty=function(e){return this.border.hasOwnProperty(e)},e}();Gt.decorators=[{type:t.Component,args:[{selector:"pb-border",template:'\n <div class="group" [class.three]="isEven()">\n <mat-form-field appearance="outline" *ngIf="hasOwnProperty(\'width\')">\n <mat-label i18n="Border Settings|Change Border Width">Width</mat-label>\n <input\n matInput\n [(ngModel)]="border.width"\n type="number"\n min="0"\n step="1"\n (input)="markForCheck()"\n i18n-placeholder\n placeholder="Border Settings|Change Border Width"\n />\n </mat-form-field>\n <mat-form-field appearance="outline" *ngIf="hasOwnProperty(\'radius\')">\n <mat-label i18n="Border Settings|Change Border Radius">Radius</mat-label>\n <input\n matInput\n [(ngModel)]="border.radius"\n type="number"\n min="0"\n step="1"\n (input)="markForCheck()"\n i18n-placeholder\n placeholder="Border Settings|Change Border Radius"\n />\n </mat-form-field>\n <mat-form-field appearance="outline" *ngIf="hasOwnProperty(\'style\')" style="min-width: 90px">\n <mat-label i18n="Border Settings|Change Border Style">Style</mat-label>\n <mat-select\n placeholder="Style"\n [disabled]="!border.width"\n [(value)]="border.style"\n (selectionChange)="markForCheck()"\n disableRipple\n >\n <mat-option *ngFor="let style of styleLabels" [value]="style">\n {{ getStyleLabel(style) }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <pb-color [options]="border" [disabled]="!border.width" *ngIf="hasOwnProperty(\'color\')" key="color"></pb-color>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n width: 100%;\n }\n\n mat-form-field {\n width: 100%;\n }\n "]}]}],Gt.ctorParameters=function(){return[{type:Ze}]},Gt.propDecorators={border:[{type:t.Input}]};var Vt=function(){function e(e){this.emailObject=e,this.disabled=!1,this.key="backgroundColor",this.transparent=!1,this.showColorPicker=!1}return Object.defineProperty(e.prototype,"currentColorModel",{get:function(){return this.options[this.key]},set:function(e){this.options[this.key]=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentColor",{get:function(){return this.transparent?this.oldValue:this.currentColorModel},set:function(e){this.currentColorModel=e},enumerable:!1,configurable:!0}),e.prototype.onHostMouseLeave=function(){this.showColorPicker=!1},e.prototype.changeColor=function(e){this.currentColor=e.color.hex,this.emailObject.markForCheck()},e.prototype.makeTransparentColor=function(){this.showColorPicker=!1,this.transparent?(this.oldValue=this.currentColorModel,this.currentColor="transparent"):this.currentColor=this.oldValue,this.emailObject.markForCheck()},e.prototype.ngOnInit=function(){"transparent"===this.currentColor&&(this.transparent=!0,this.oldValue="#ffffff")},e}();Vt.decorators=[{type:t.Component,args:[{selector:"pb-color",template:'\n <div class="group" *ngIf="showTransparent">\n <mat-slide-toggle\n [disabled]="disabled"\n [(ngModel)]="transparent"\n (change)="makeTransparentColor()"\n i18n="Color settings|Make color transparent"\n >\n Transparent\n </mat-slide-toggle>\n </div>\n <div class="group two">\n <mat-form-field appearance="outline">\n <mat-label i18n="Color settings|Change color">Color</mat-label>\n <input matInput [disabled]="transparent || disabled" (focus)="showColorPicker = false" [(ngModel)]="currentColor" type="text" />\n </mat-form-field>\n <div class="choose-color" [class.transparent]="transparent || disabled">\n <div class="current-color" (mouseover)="showColorPicker = !transparent" [style.backgroundColor]="currentColor"></div>\n <color-chrome\n [disableAlpha]="true"\n *ngIf="showColorPicker"\n (onChangeComplete)="changeColor($event)"\n [color]="currentColor"\n ></color-chrome>\n </div>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n position: relative;\n }\n\n mat-form-field {\n width: 100%;\n }\n\n .choose-color {\n display: block;\n height: 100%;\n width: 100%;\n }\n\n .current-color {\n width: 100%;\n height: 48px;\n border-radius: 5px;\n margin: 0.25em 0;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid rgba(0, 0, 0, 0.12);\n transition: background-color 500ms cubic-bezier(0.445, 0.05, 0.55, 0.95);\n }\n\n .choose-color.transparent .current-color {\n opacity: 0.5;\n pointer-events: none;\n }\n\n color-chrome {\n position: absolute;\n top: calc(100% - 1em);\n right: 0;\n z-index: 9;\n }\n "]}]}],Vt.ctorParameters=function(){return[{type:Ze}]},Vt.propDecorators={options:[{type:t.Input}],showTransparent:[{type:t.Input}],disabled:[{type:t.Input}],key:[{type:t.Input}],onHostMouseLeave:[{type:t.HostListener,args:["mouseleave"]}]};var Wt,Yt,Kt,Jt,Qt=function(){function e(e){this.emailObject=e,this.targetLabels=new Map([["_blank",$localize(Wt||(Wt=Y([":@@link_target_blank:Blank"],[":@@link_target_blank:Blank"])))],["_self",$localize(Yt||(Yt=Y([":@@link_target_self:Self"],[":@@link_target_self:Self"])))],["_parent",$localize(Kt||(Kt=Y([":@@link_target_parent:Parent"],[":@@link_target_parent:Parent"])))],["_top",$localize(Jt||(Jt=Y([":@@link_target_top:Top"],[":@@link_target_top:Top"])))]])}return e.prototype.markForCheck=function(){this.emailObject.markForCheck()},e.prototype.getTargets=function(){return["_blank","_self","_parent","_top"]},e.prototype.getTargetLabel=function(e){return this.targetLabels.get(e)},e}();Qt.decorators=[{type:t.Component,args:[{selector:"pb-link",template:'\n <div class="group f-large">\n <mat-form-field appearance="outline">\n <mat-label i18n="Link Settings|Link">Link</mat-label>\n <input matInput [(ngModel)]="link.href" type="url" placeholder="Link" (blur)="markForCheck()" />\n </mat-form-field>\n <mat-form-field appearance="outline">\n <mat-label i18n="Link Settings|Target">Target</mat-label>\n <mat-select\n placeholder="Target"\n i18n-placeholder="Link Settings|Target"\n [(value)]="link.target"\n disableRipple\n (selectionChange)="markForCheck()"\n >\n <mat-option *ngFor="let target of getTargets()" [value]="target">\n {{ getTargetLabel(target) }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n width: 100%;\n }\n "]}]}],Qt.ctorParameters=function(){return[{type:Ze}]},Qt.propDecorators={link:[{type:t.Input}]};var Zt,Xt,en,tn,nn,on,rn=function(){function e(e){this.emailObject=e,this.mode="horizontal",this.labels=new Map([["left",$localize(Zt||(Zt=Y([":@@horizontal_align_left:Left"],[":@@horizontal_align_left:Left"])))],["center",$localize(Xt||(Xt=Y([":@@horizontal_align_center:Center"],[":@@horizontal_align_center:Center"])))],["right",$localize(en||(en=Y([":@@horizontal_align_right:Right"],[":@@horizontal_align_right:Right"])))],["top",$localize(tn||(tn=Y([":@@vertical_align_top:Top"],[":@@vertical_align_top:Top"])))],["middle",$localize(nn||(nn=Y([":@@vertical_align_middle:Middle"],[":@@vertical_align_middle:Middle"])))],["bottom",$localize(on||(on=Y([":@@vertical_align_bottom:Bottom"],[":@@vertical_align_bottom:Bottom"])))]])}return Object.defineProperty(e.prototype,"currentModel",{get:function(){return this.model.align||this.model.verticalAlign},set:function(e){this.model.align?this.model.align=e:this.model.verticalAlign=e,this.emailObject.markForCheck()},enumerable:!1,configurable:!0}),e.prototype.getLabel=function(e){return this.labels.get(e)},e.prototype.getPositions=function(){return"vertical"===this.mode?["top","middle","bottom"]:["left","center","right"]},e}();rn.decorators=[{type:t.Component,args:[{selector:"pb-align",template:'\n <mat-form-field appearance="outline">\n <mat-label [ngSwitch]="mode">\n <ng-container *ngSwitchCase="\'vertical\'" i18n="Align Settings|Vertical Align">Vertical Align</ng-container>\n <ng-container *ngSwitchDefault i18n="Align Settings|Align">Align</ng-container>\n </mat-label>\n <mat-select [(ngModel)]="currentModel" disableRipple [disabled]="disabled">\n <mat-option *ngFor="let position of getPositions()" [value]="position">\n {{ getLabel(position) }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n width: 100%;\n }\n\n mat-form-field {\n width: 100%;\n }\n "]}]}],rn.ctorParameters=function(){return[{type:Ze}]},rn.propDecorators={model:[{type:t.Input}],mode:[{type:t.Input}],disabled:[{type:t.Input}]};var an,ln,sn=function(){function e(e){this.emailObject=e,this.dirLabels=new Map([["ltr",$localize(an||(an=Y([":@@direction_ltr:Left to right"],[":@@direction_ltr:Left to right"])))],["rtl",$localize(ln||(ln=Y([":@@direction_rtl:Right to left"],[":@@direction_rtl:Right to left"])))]])}return e.prototype.markForCheck=function(){this.emailObject.markForCheck()},e.prototype.getDirections=function(){return["ltr","rtl"]},e.prototype.getDirectionLabel=function(e){return this.dirLabels.get(e)},e}();sn.decorators=[{type:t.Component,args:[{selector:"pb-direction",template:'\n <mat-form-field appearance="outline">\n <mat-label i18n="settings|Direction">Direction</mat-label>\n <mat-select\n i18n-placeholder="settings|Direction"\n placeholder="Direction"\n [(value)]="model.direction"\n (selectionChange)="markForCheck()"\n disableRipple\n >\n <mat-option *ngFor="let dir of getDirections()" [value]="dir">\n {{ getDirectionLabel(dir) }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n width: 100%;\n }\n\n mat-form-field {\n width: 100%;\n }\n "]}]}],sn.ctorParameters=function(){return[{type:Ze}]},sn.propDecorators={model:[{type:t.Input}]};var cn,pn,dn,un,mn,gn,bn=function(){function e(){this.disabled=!1,this.repeatLabels=new Map([["no-repeat",$localize(cn||(cn=Y([":@@no_repeat:No"],[":@@no_repeat:No"])))],["repeat",$localize(pn||(pn=Y([":@@repeat:Repeat"],[":@@repeat:Repeat"])))],["repeat-x",$localize(dn||(dn=Y([":@@repeat_x:X"],[":@@repeat_x:X"])))],["repeat-y",$localize(un||(un=Y([":@@repeat_y:Y"],[":@@repeat_y:Y"])))],["round",$localize(mn||(mn=Y([":@@repeat_round:Round"],[":@@repeat_round:Round"])))],["space",$localize(gn||(gn=Y([":@@repeat_space:Space"],[":@@repeat_space:Space"])))]])}return e.prototype.getRepeats=function(){return["no-repeat","repeat","repeat-x","repeat-y"]},e.prototype.getRepeatLabel=function(e){return this.repeatLabels.get(e)},e}();bn.decorators=[{type:t.Component,args:[{selector:"pb-back-repeat",template:'\n <mat-form-field appearance="outline">\n <mat-label i18n="settings|Background Repeat">Repeat</mat-label>\n <mat-select [(value)]="model.repeat" [disabled]="disabled" disableRipple>\n <mat-option *ngFor="let repeat of getRepeats()" [value]="repeat">\n {{ getRepeatLabel(repeat) }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n width: 100%;\n }\n\n mat-form-field {\n width: 100%;\n }\n "]}]}],bn.propDecorators={model:[{type:t.Input}],disabled:[{type:t.Input}]};var hn=new Map([["desktop","1 1 100%"],["smartphone","1 1 360px"],["tablet","1 1 768px"]]),fn=function(){function e(e,t){this.middlewares=e,this.sanitizer=t,this.device="desktop"}return e.prototype.changeDevice=function(e){var t=this;return this.middlewares.togglePreviewDevice(e).pipe(i.take(1)).subscribe((function(e){t.device=e}))},e.prototype.getFlexWidth=function(){return hn.get(this.device)},e.prototype.ngOnInit=function(){this.src=URL.createObjectURL(new Blob([this.template],{type:"text/html"})),this.templateSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src)},e.prototype.ngOnDestroy=function(){this.src&&URL.revokeObjectURL(this.src)},e}();fn.decorators=[{type:t.Component,args:[{selector:"pb-preview-template",template:'\n <iframe [src]="templateSrc" [fxFlex]="getFlexWidth()"></iframe>\n <mat-button-toggle-group value="desktop" (change)="changeDevice($event)" vertical>\n <mat-button-toggle value="desktop" matTooltip="Desktop / 100%" matTooltipPosition="left">\n <mat-icon>desktop_windows</mat-icon>\n </mat-button-toggle>\n <mat-button-toggle value="tablet" matTooltip="Tablet / 768px" matTooltipPosition="left">\n <mat-icon>tablet</mat-icon>\n </mat-button-toggle>\n <mat-button-toggle value="smartphone" matTooltip="Smartphone / 360px" matTooltipPosition="left">\n <mat-icon>smartphone</mat-icon>\n </mat-button-toggle>\n </mat-button-toggle-group>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n iframe {\n border: 0;\n will-change: width;\n transition: all 500ms ease-in-out;\n }\n\n /* iframe a[href] {\n pointer-events: none;\n } */\n\n /* iframe.active {\n opacity: 1;\n } */\n\n mat-button-toggle-group {\n position: absolute;\n right: 0;\n background: white;\n }\n "]}]}],fn.ctorParameters=function(){return[{type:We},{type:c.DomSanitizer}]},fn.propDecorators={template:[{type:t.Input}]};var yn=function(){function e(e,t,i,o,r){this.pbMiddlewaresService=e,this.userInterfaceService=t,this.emailObjectStore=i,this.chRef=o,this.elementRef=r,this.isActive=!1,this.isHighlighted=!1,this.isDimmed=!1,this.componentIsDestroyed$=new n.Subject}return e.prototype.onHostClick=function(e){e.stopImmediatePropagation(),this.editBlock()},Object.defineProperty(e.prototype,"isBlockActive",{get:function(){return this.isActive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isBlockHighlighted",{get:function(){return this.isHighlighted},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isBlockDimmed",{get:function(){return this.isDimmed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockId",{get:function(){var e;return null===(e=this.block)||void 0===e?void 0:e.id},enumerable:!1,configurable:!0}),e.prototype.removeBlock=function(){var e=this;this.pbMiddlewaresService.removeBlock(this.index,this.column,this.block).pipe(i.exhaustMap((function(){return e.userInterfaceService.confirmDialog$()})),i.filter((function(e){return e})),i.take(1)).subscribe((function(){e.emailObjectStore.removeBlock(e.index,e.column)}))},e.prototype.duplicateBlock=function(){var e=this;this.pbMiddlewaresService.duplicateBlock(this.index,this.column,this.block).pipe(i.map((function(t){return e.emailObjectStore.duplicateBlock(t.index,t.column,t.block)})),i.take(1)).subscribe((function(){}))},e.prototype.clearHighlight=function(e){e.stopPropagation(),this.userInterfaceService.clearBlockHighlight()},e.prototype.editBlock=function(){var e=this;this.pbMiddlewaresService.editBlock(this.block).pipe(i.take(1)).subscribe((function(t){e.userInterfaceService.editBlock(t)}))},e.prototype.ngOnInit=function(){var e=this;this.userInterfaceService.currentEditingBlock$.pipe(i.map((function(t){return t===e.block})),i.takeUntil(this.componentIsDestroyed$)).subscribe((function(t){e.isActive=t})),this.userInterfaceService.blockHighlight$.pipe(i.takeUntil(this.componentIsDestroyed$)).subscribe((function(t){if(e.isHighlighted=(null==t?void 0:t.blockId)===e.block.id,e.isDimmed=Boolean(t)&&!e.isHighlighted,t&&e.isHighlighted&&!1!==t.options.scrollIntoView){var n=e.elementRef.nativeElement.scrollIntoView;"function"==typeof n&&n.call(e.elementRef.nativeElement,{behavior:t.options.behavior||"smooth",block:t.options.block||"center",inline:"nearest"})}e.chRef.markForCheck()}))},e.prototype.ngDoCheck=function(){this.isActive&&this.chRef.markForCheck()},e.prototype.ngOnDestroy=function(){this.componentIsDestroyed$.next(""),this.componentIsDestroyed$.complete()},e}();yn.decorators=[{type:t.Component,args:[{selector:"pb-block",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<ng-content select=".move"></ng-content>\n<button\n *ngIf="isHighlighted"\n type="button"\n mat-icon-button\n class="highlight-clear"\n (click)="clearHighlight($event)"\n i18n-aria-label="block|Clear highlighted block"\n aria-label="Clear block highlight"\n i18n-matTooltip="block|Clear highlighted block"\n matTooltip="Clear highlight">\n <mat-icon aria-hidden="true" inline>close</mat-icon>\n</button>\n<div class="tools" fxLayout fxLayoutGap="0.25rem">\n <button mat-icon-button (click)="duplicateBlock()" i18n-matTooltip="block|Duplicate Block"\n matTooltip="Duplicate Block">\n <mat-icon i18n-aria-label="block|Duplicate Block" aria-label="Duplicate block" inline>file_copy</mat-icon>\n </button>\n <button mat-icon-button (click)="removeBlock()" i18n-matTooltip="block|Remove Block" class="delete"\n matTooltip="Remove Block">\n <mat-icon i18n-aria-label="block|Remove Block" aria-label="Delete block" inline>delete_forever</mat-icon>\n </button>\n</div>\n<ng-content *pbDynamicComponent="block"></ng-content>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */:host{display:block;position:relative;transition:box-shadow .2s ease-in-out,opacity .2s ease-in-out}:host.active:not(.cdk-drag-preview)>.tools{opacity:1;display:flex!important}:host.active,:host.cdk-drag-placeholder,:host.cdk-drag-preview{z-index:3;box-shadow:0 0 0 2px #3f51b5}:host:hover:not(.active){box-shadow:0 0 0 2px rgba(63,81,181,.5)}:host.pb-block-dimmed:not(.cdk-drag-preview){opacity:.3}:host.pb-block-highlighted:not(.cdk-drag-preview){opacity:1;z-index:4;box-shadow:0 0 0 3px #ff9800}:host>.highlight-clear{position:absolute;z-index:5;top:4px;right:4px;width:30px;height:30px;line-height:30px;color:#8a4f00;background:#fff;border:2px solid #ff9800;box-shadow:0 1px 4px rgba(0,0,0,.3)}:host>.highlight-clear mat-icon{font-size:18px;line-height:18px}:host>.tools{direction:ltr;opacity:0;z-index:4;position:absolute;max-width:100%;bottom:-25px;right:0;display:none!important;transition:all .5s ease-in-out}:host>.tools>button{background:#3f51b5;border-radius:3px;color:#fff;line-height:0;width:25px;height:25px}:host>.tools>button mat-icon{font-size:14px;margin-top:-3px}:host>.tools ::ng-deep+*>*{transition:all .5s cubic-bezier(.445,.05,.55,.95)}"]}]}],yn.ctorParameters=function(){return[{type:We},{type:nt},{type:Ze},{type:t.ChangeDetectorRef},{type:t.ElementRef}]},yn.propDecorators={block:[{type:t.Input}],column:[{type:t.Input}],index:[{type:t.Input}],onHostClick:[{type:t.HostListener,args:["click",["$event"]]}],isBlockActive:[{type:t.HostBinding,args:["class.active"]}],isBlockHighlighted:[{type:t.HostBinding,args:["class.pb-block-highlighted"]}],isBlockDimmed:[{type:t.HostBinding,args:["class.pb-block-dimmed"]}],blockId:[{type:t.HostBinding,args:["attr.data-pb-block-id"]}]};var vn=function(){function e(e,t){this.imageUpload=e,this.emailObject=t,this.key="src",this.browsing=new n.Subject}return Object.defineProperty(e.prototype,"source",{get:function(){return this.block[this.key]},set:function(e){this.block[this.key]=e},enumerable:!1,configurable:!0}),e.prototype.markForCheck=function(){this.emailObject.markForCheck()},e.prototype.browse=function(){return H(this,void 0,void 0,(function(){var e;return N(this,(function(t){switch(t.label){case 0:this.browsing.next(!0),t.label=1;case 1:return t.trys.push([1,,3,4]),[4,this.imageUpload.browse$().toPromise()];case 2:return(e=t.sent())&&(this.source=e,this.emailObject.markForCheck()),[3,4];case 3:return this.browsing.next(!1),[7];case 4:return[2]}}))}))},e.prototype.ngOnInit=function(){this.source=this.block.src||this.block.url},e}();vn.decorators=[{type:t.Component,args:[{selector:"pb-image-upload",template:'\n <div fxLayout fxLayoutAlign="space-between center">\n <div class="image-info" [fxFlex]="source ? \'30%\' : \'60%\'" fxLayout fxLayoutGap="0.5em" fxLayoutAlign="center center">\n <div *ngIf="source" class="chose-image">\n <img [src]="source" alt="image source" />\n </div>\n <span *ngIf="!source" style="width: 100%;" i18n="Upload Image Settings|Upload an image"> Upload an image </span>\n </div>\n <button\n type="button"\n (click)="browse()"\n [disabled]="browsing | async"\n color="primary"\n mat-stroked-button\n i18n="Upload Image Settings|Browse"\n >\n Browse\n </button>\n </div>\n <mat-form-field appearance="outline" style="width: 100%">\n <mat-label i18n="Upload Image Settings|Image Source">Image Source</mat-label>\n <input matInput [(ngModel)]="source" type="url" (input)="markForCheck()" />\n </mat-form-field>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n }\n\n .chose-image {\n width: 100%;\n max-height: 60px;\n overflow: hidden;\n border-radius: 3px;\n line-height: 0;\n }\n\n .chose-image img {\n width: 100%;\n height: 60px;\n object-fit: cover;\n object-position: center;\n }\n\n .size {\n font-size: 80%;\n color: #ccc;\n }\n\n mat-form-field {\n margin-top: 0.5rem;\n }\n "]}]}],vn.ctorParameters=function(){return[{type:rt},{type:Ze}]},vn.propDecorators={block:[{type:t.Input}],key:[{type:t.Input}]};var kn=function(){function e(e,t,n){this.internalService=e,this.emailObject=t,this.networks=n,this.block$=this.internalService.currentEditingBlock$}return e.prototype.hasProperty=function(e,t){return e.hasOwnProperty(t)},e.prototype.markForCheck=function(){this.emailObject.markForCheck()},e.prototype.socialNetworks=function(e){return this.networks.filter((function(t){return!e.networks.find((function(e){return e.name===t}))})).sort()},e.prototype.addSocialNetwork=function(e,t){var n=e.value,i=e.source;t.networks.push({name:n,href:"",label:""}),i.value="",this.markForCheck()},e.prototype.removeSocialNetwork=function(e,t){t.networks=t.networks.filter((function(t){return t!==e})),this.markForCheck()},e.prototype.getSocialIcon=function(e){return re(e+".png")},e}();kn.decorators=[{type:t.Component,args:[{selector:"pb-block-settings",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<ng-container *ngIf="block$ | async as currentBlock">\n <mat-accordion>\n <mat-expansion-panel expanded *ngIf="hasProperty(currentBlock.options, \'font\')">\n <mat-expansion-panel-header i18n="settings|Font">\n Font\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-color [options]="currentBlock.options" key="color"></pb-color>\n <pb-font-styles [font]="currentBlock.options.font"></pb-font-styles>\n <pb-line-height *ngIf="currentBlock.type !== \'social\'" [lineHeight]="currentBlock.options.lineHeight">\n </pb-line-height>\n </ng-template>\n </mat-expansion-panel>\n\n <ng-container *ngIf="currentBlock.type === \'image\'">\n <mat-expansion-panel expanded>\n <mat-expansion-panel-header i18n="settings|Image">\n Image\n </mat-expansion-panel-header>\n <pb-image-upload [block]="currentBlock"></pb-image-upload>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="settings|Image Attributes">\n Attributes\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <div class="group f-large">\n <mat-form-field appearance="outline">\n <mat-label i18n="settings|Image Alt">Alt</mat-label>\n <input matInput [(ngModel)]="currentBlock.options.title" type="text" i18n-placeholder\n placeholder="settings|Image Alt" (input)="markForCheck()" />\n </mat-form-field>\n <pb-align [model]="currentBlock.options"></pb-align>\n </div>\n <pb-link [link]="currentBlock.options.link"></pb-link>\n </ng-template>\n </mat-expansion-panel>\n </ng-container>\n\n <ng-container *ngIf="currentBlock.type === \'video\'">\n <mat-expansion-panel expanded>\n <mat-expansion-panel-header i18n="settings|Video">\n Video URL\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <div class="group" style="grid-template-columns: 1fr;">\n <mat-form-field appearance="outline" style="width: 100%">\n <mat-label i18n="settings|Video URL">Video URL (YouTube or Vimeo)</mat-label>\n <input matInput [(ngModel)]="currentBlock.src" type="url" i18n-placeholder\n placeholder="settings|Video URL" (input)="markForCheck()" />\n <mat-hint i18n="settings|Video URL Hint">Thumbnail with play button will be auto-generated</mat-hint>\n </mat-form-field>\n </div>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="settings|Video Attributes">\n Attributes\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <div class="group f-large">\n <mat-form-field appearance="outline">\n <mat-label i18n="settings|Video Alt">Alt Text</mat-label>\n <input matInput [(ngModel)]="currentBlock.options.title" type="text" i18n-placeholder\n placeholder="settings|Video Alt" (input)="markForCheck()" />\n </mat-form-field>\n <pb-align [model]="currentBlock.options"></pb-align>\n </div>\n </ng-template>\n </mat-expansion-panel>\n </ng-container>\n\n <ng-container *ngIf="currentBlock.type === \'button\'">\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="settings|Button Text">\n Button Text\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <mat-form-field appearance="outline" style="width: 100%">\n <mat-label i18n="settings|Button Text">Button Text</mat-label>\n <input matInput [(ngModel)]="currentBlock.innerText" type="text" i18n-placeholder\n placeholder="settings|Button Text" (input)="markForCheck()" />\n </mat-form-field>\n </ng-template>\n </mat-expansion-panel>\n\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="settings|Background">\n Background\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-color [options]="currentBlock.options"></pb-color>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="settings|Button Attributes">\n Attributes\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <div class="group two" style="padding-bottom: 0">\n <pb-align [model]="currentBlock.options" [disabled]="currentBlock.options.fullWidth"></pb-align>\n <mat-slide-toggle style="margin-top: -24px" [(ngModel)]="currentBlock.options.fullWidth"\n (change)="markForCheck()">\n <ng-container i18n="settings|Button Full Width">Full Width</ng-container>\n </mat-slide-toggle>\n </div>\n <pb-link [link]="currentBlock.options.link"></pb-link>\n <pb-padding [padding]="currentBlock.options.innerPadding"></pb-padding>\n </ng-template>\n </mat-expansion-panel>\n </ng-container>\n\n <mat-expansion-panel [expanded]="currentBlock.type === \'spacer\'"\n *ngIf="hasProperty(currentBlock.options, \'width\') || hasProperty(currentBlock.options, \'height\')">\n <mat-expansion-panel-header i18n="settings|Sizes">\n Sizes\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-width-height *ngIf="hasProperty(currentBlock.options, \'width\')" [model]="currentBlock.options.width"\n label="width"></pb-width-height>\n <pb-width-height *ngIf="hasProperty(currentBlock.options, \'height\')" [model]="currentBlock.options.height"\n label="height"></pb-width-height>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel *ngIf="hasProperty(currentBlock.options, \'background\')">\n <mat-expansion-panel-header i18n="settings|Background">\n Background\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-color [options]="currentBlock.options.background"></pb-color>\n </ng-template>\n backgroundColor\n </mat-expansion-panel>\n\n <mat-expansion-panel [expanded]="currentBlock.type === \'divider\'"\n *ngIf="hasProperty(currentBlock.options, \'border\')">\n <mat-expansion-panel-header>\n <ng-container i18n="settings|Divider Styles" *ngIf="currentBlock.type === \'divider\'">Styles</ng-container>\n <ng-container i18n="settings|Border" *ngIf="currentBlock.type !== \'divider\'">Border</ng-container>\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-border [border]="currentBlock.options.border"></pb-border>\n </ng-template>\n </mat-expansion-panel>\n\n <ng-container *ngIf="currentBlock.type === \'social\'">\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="settings|Icons">\n Icons\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <mat-form-field appearance="outline" style="width: 100%">\n <mat-label i18n="settings|Add new Network">Add new Network</mat-label>\n <mat-select (selectionChange)="addSocialNetwork($event, currentBlock)" [disabled]="!socialNetworks.length">\n <mat-option style="text-transform: capitalize" *ngFor="let link of socialNetworks(currentBlock)"\n [value]="link">\n {{ link }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel class="networks-list" *ngFor="let network of currentBlock.networks">\n <mat-expansion-panel-header style="text-transform: capitalize">\n <img [class]="network.name" [src]="getSocialIcon(network.name)" [alt]="network.name" />\n {{ network.name }}\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <div class="networks-list-item">\n <div class="item-info">\n <mat-form-field matLine appearance="outline">\n <mat-label i18n="settings|Social Network Label">Label</mat-label>\n <input matInput autocomplete="off" [(ngModel)]="network.label"\n i18n-placeholder="settings|Social Network Label" placeholder="Label" type="text"\n (input)="markForCheck()" />\n </mat-form-field>\n <button mat-stroked-button color="warn" (click)="removeSocialNetwork(network, currentBlock)">\n <mat-icon>delete_forever</mat-icon>\n </button>\n </div>\n <mat-form-field matLine appearance="outline">\n <mat-label style="text-transform: capitalize">\n {{ network.name }} <ng-container i18n="settings|Social Network Link">Link</ng-container>\n </mat-label>\n <input autocomplete="off" matInput [(ngModel)]="network.href" type="url" (input)="markForCheck()" />\n </mat-form-field>\n </div>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="settings|Social Styles">\n Styles\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <div class="group two" style="padding-bottom: 0">\n <mat-form-field appearance="outline">\n <mat-label i18n="settings|Social Model">Mode</mat-label>\n <mat-select (selectionChange)="markForCheck()" i18n-placeholder="settings|Social Model" placeholder="Mode"\n [(value)]="currentBlock.options.mode" disableRipple>\n <mat-option *ngFor="let mode of [\'horizontal\', \'vertical\']" [value]="mode">\n {{ mode }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <pb-align [model]="currentBlock.options"></pb-align>\n </div>\n <pb-line-height [units]="[\'px\']" [lineHeight]="currentBlock.options.iconSize" label="Icon Size">\n </pb-line-height>\n <pb-padding [padding]="currentBlock.options.innerPadding"></pb-padding>\n </ng-template>\n </mat-expansion-panel>\n </ng-container>\n\n <mat-expansion-panel *ngIf="hasProperty(currentBlock.options, \'padding\')">\n <mat-expansion-panel-header i18n="settings|Padding">\n Padding\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-padding [padding]="currentBlock.options.padding"></pb-padding>\n </ng-template>\n </mat-expansion-panel>\n </mat-accordion>\n</ng-container>',changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,styles:["/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */.networks-list mat-expansion-panel-header .mat-content{place-items:center}.networks-list mat-expansion-panel-header img{width:20px;margin:0 .5rem 0 0;border-radius:3px;background-color:#000}.networks-list-item{width:100%;display:grid;row-gap:.5rem}.networks-list-item .item-info{display:grid;grid-template-columns:2fr 1fr;-moz-column-gap:.5rem;column-gap:.5rem}.networks-list-item .item-info button{align-self:baseline;margin:.25rem 0;height:50px}.networks-list-item .item-info ::ng-deep .mat-form-field-wrapper{padding-bottom:0;margin-bottom:0}"]}]}],kn.ctorParameters=function(){return[{type:nt},{type:Ze},{type:Array,decorators:[{type:t.Inject,args:[Te]}]}]};var qn=function(){function e(e,t){this.pbInternalService=e,this.emailObject=t,this.currentStructure$=this.pbInternalService.currentEditingStructure$}return e.prototype.markForCheck=function(){this.emailObject.markForCheck()},e}();qn.decorators=[{type:t.Component,args:[{selector:"pb-structure-settings",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<mat-accordion *ngIf="currentStructure$ | async as structure">\n <mat-expansion-panel expanded>\n <mat-expansion-panel-header i18n="Structure settings|Change structure Background">\n Background\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-color [options]="structure.options.background" key="color"></pb-color>\n <pb-image-upload [block]="structure.options.background" key="url" style="margin-bottom: 1em"></pb-image-upload>\n <pb-back-repeat [disabled]="!structure.options.background.url"\n [model]="structure.options.background"></pb-back-repeat>\n <pb-width-height [disabled]="!structure.options.background.url" [model]="structure.options.background.size"\n label="size">\n </pb-width-height>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="Structure settings|Change structure border">\n Border\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-border [border]="structure.options.border"></pb-border>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="Structure settings|Change structure padding">\n Padding\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-padding [padding]="structure.options.padding"></pb-padding>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="Structure settings|Change structure margin">\n Margin\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-margin [margin]="structure.options.margin"></pb-margin>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="Structure settings|Change structure layout">\n Layout\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-gaps [gaps]="structure.options.gaps"></pb-gaps>\n <mat-slide-toggle [disabled]="structure.type === \'cols_1\'" style="margin-top: -24px;"\n [(ngModel)]="structure.options.disableResponsive" i18n="Structure settings|Disable Responsive"\n (change)="markForCheck()">\n Disable Responsive\n </mat-slide-toggle>\n <mat-slide-toggle\n [(ngModel)]="structure.options.fullWidth" i18n="Structure settings|Full Width"\n (change)="markForCheck()">\n Make section full width\n </mat-slide-toggle>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel *ngFor="let column of structure.options.columns; let key = index">\n <mat-expansion-panel-header>\n <ng-container i18n="Structure settings|Structure Column">Column</ng-container>\n {{ key + 1 }}\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <h3 class="divider">\n <span i18n="Structure settings|Column Background">Column Background</span>\n </h3>\n <pb-color [options]="column.background" [showTransparent]="true" key="color"></pb-color>\n <h3 class="divider">\n <span i18n="Structure settings|Column Border">Column Border</span>\n </h3>\n <pb-border [border]="column.border"></pb-border>\n <h3 class="divider">\n <span i18n="Structure settings|Column Vertical Align">Vertical Align</span>\n </h3>\n <pb-align [model]="column" mode="vertical"></pb-align>\n </ng-template>\n </mat-expansion-panel>\n</mat-accordion>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,styles:[":host{display:block}"]}]}],qn.ctorParameters=function(){return[{type:nt},{type:Ze}]};var xn=function(e){this.pbEmailObject=e,this.generalOptions$=this.pbEmailObject.generalEmailOptionsAsObservable$};xn.decorators=[{type:t.Component,args:[{selector:"pb-general-settings",template:'\x3c!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n --\x3e\n\n<ng-container *ngIf="generalOptions$ | async as general">\n <div class="mat-expansion-panel-body" style="margin: 24px 0">\n <mat-form-field appearance="outline" style="width: 100%">\n <mat-label i18n="General Settings|Email Name">Email Name</mat-label>\n <input matInput [(ngModel)]="general.name">\n </mat-form-field>\n <mat-form-field appearance="outline" style="width: 100%">\n <mat-label i18n="General Settings|Email Preview Text">Preview Text</mat-label>\n <textarea matInput [(ngModel)]="general.previewText"></textarea>\n <mat-hint i18n="General Settings|Email Preview Text Hint">\n This text is displayed in the inbox of the recipient.\n </mat-hint>\n </mat-form-field>\n </div>\n\n <mat-accordion>\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="General Settings|Email Background">\n Background\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-color [options]="general.background" key="color"></pb-color>\n \x3c!-- <pb-image-upload [block]="structure.options.background" key="url" style="margin-bottom: 1em"></pb-image-upload>\n <pb-back-repeat [disabled]="!structure.options.background.url" [model]="structure.options.background">\n </pb-back-repeat>\n <pb-width-height [model]="structure.options.background.size" label="Background Size"></pb-width-height> --\x3e\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="General Settings|Email Attributes">\n Attributes\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-width-height [model]="general.width" label="width"></pb-width-height>\n <pb-direction [model]="general"></pb-direction>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n="General Settings|Email Padding">\n Padding\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-padding [padding]="general.padding"></pb-padding>\n </ng-template>\n </mat-expansion-panel>\n </mat-accordion>\n</ng-container>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,styles:[""]}]}],xn.ctorParameters=function(){return[{type:Ze}]};var wn=function(){function e(e){this.emailObject=e}return e.prototype.markForCheck=function(){this.emailObject.markForCheck()},e}();wn.decorators=[{type:t.Component,args:[{selector:"pb-margin",template:'\n <div class="group">\n <mat-form-field appearance="outline">\n <mat-label i18n="Margin settings|Margin Top">Margin Top</mat-label>\n <input matInput type="number" min="0" step="1" [(ngModel)]="margin.top" (input)="markForCheck()" />\n </mat-form-field>\n <mat-form-field appearance="outline">\n <mat-label i18n="Margin settings|Margin Bottom">Margin Bottom</mat-label>\n <input matInput type="number" min="0" step="1" [(ngModel)]="margin.bottom" (input)="markForCheck()" />\n </mat-form-field>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n width: 100%;\n }\n "]}]}],wn.ctorParameters=function(){return[{type:Ze}]},wn.propDecorators={margin:[{type:t.Input}]};var Sn=function(){function e(e){this.emailObject=e}return e.prototype.markForCheck=function(){this.emailObject.markForCheck()},e}();Sn.decorators=[{type:t.Component,args:[{selector:"pb-gaps",template:'\n <div class="group">\n <mat-form-field appearance="outline">\n <mat-label i18n="Gaps settings|Vertical Gaps">Vertical Gaps</mat-label>\n <input matInput type="number" min="0" step="1" [(ngModel)]="gaps[0]" (input)="markForCheck()" />\n </mat-form-field>\n <mat-form-field appearance="outline">\n <mat-label i18n="Gaps settings|Horizontal Gaps">Horizontal Gaps</mat-label>\n <input matInput type="number" min="0" step="1" [(ngModel)]="gaps[1]" (input)="markForCheck()" />\n </mat-form-field>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n width: 100%;\n }\n "]}]}],Sn.ctorParameters=function(){return[{type:Ze}]},Sn.propDecorators={gaps:[{type:t.Input}]};var In="This feature is disabled in free version.",Cn=function(e){function t(){var t=e.call(this)||this;return console.warn("You use the Regular License of Angular Email Builder, some limitations are applied. More info on https://wlocalhost.org"),t}return U(t,e),t.prototype.chooseTemplate=function(){throw new Error(In)},t.prototype.exportFile=function(e){return n.iif((function(){return"json"===e}),ae(e),n.throwError(new Error(In)))},t.prototype.importFile=function(e){return n.iif((function(){return"application/json"===e.type}),ae(e),n.throwError(new Error(In)))},t}(We),Pn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t}(We),Tn=function(){function e(e,t){this.userConfig=e,this.userInterface=t}return e.prototype.intercept=function(e,t){if(e.url.startsWith("https://ngb-api.wlocalhost.org")){var n=this.userInterface.notify("Loading, please wait ...",null,null),o=Object.assign(Object.assign({},Me),this.userConfig).xApiKey;return t.handle(e.clone({setHeaders:{"Content-Type":"application/json","X-Api-Key":o},responseType:"json"})).pipe(i.tap((function(e){e.type===r.HttpEventType.Response&&n.dismiss()})))}return t.handle(e)},e}();Tn.ɵprov=z.ɵɵdefineInjectable({factory:function(){return new Tn(z.ɵɵinject(Fe),z.ɵɵinject(nt))},token:Tn,providedIn:"root"}),Tn.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Tn.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[Fe]}]},{type:nt}]};var Bn=new t.InjectionToken("Library environment",{providedIn:"any",factory:function(){var e=t.inject(Fe).xApiKey;return!(!e||e.length<40||e===Me.xApiKey)}}),On=function(e){function t(t){return e.call(this,t)||this}return U(t,e),t}(Ke),$n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t}(Je);function jn(e){return new On(e)}function Dn(e){return e?new Pn:new Cn}function Ln(e){return new $n(e)}function En(e,t,n,i,o){return e?new st(n,i,o):new at(t,i)}var _n={bounds:"pb-builder-container",theme:"bubble",format:"html",trackChanges:"all",suppressGlobalRegisterWarning:!0},Mn=function(){function e(e,t,n){if(!(n||e instanceof Cn))throw new Error("Upgrade to an Extended or Commercial License to use Custom Middlewares.");if(!(n||t instanceof at))throw new Error("Upgrade to an Extended or Commercial License to use Custom Image Uploader.")}return e.forRoot=function(t){return void 0===t&&(t={}),e.withConfig(t)},e.withConfig=function(t){return void 0===t&&(t={}),{ngModule:e,providers:W([it,Ze,nt,{provide:Fe,useValue:t},{provide:We,useFactory:Dn,deps:[Bn]},{provide:Je,useFactory:Ln,deps:[He]},{provide:rt,useFactory:En,deps:[Bn,s.MatBottomSheet,l.MatDialog,We,Ke]},{provide:Ke,useFactory:jn,deps:[r.HttpClient]}],t.mergeFieldPicker?[{provide:Re,useValue:t.mergeFieldPicker}]:[])}},e}();Mn.decorators=[{type:t.NgModule,args:[{imports:[O.CommonModule,r.HttpClientModule,D.QuillModule,p.FlexLayoutModule,o.DragDropModule,B.FormsModule,L.ColorChromeModule,d.MatButtonModule,h.MatIconModule,b.MatFormFieldModule,f.MatInputModule,I.MatTabsModule,S.MatSliderModule,q.MatSelectModule,w.MatSlideToggleModule,u.MatButtonToggleModule,m.MatDividerModule,P.MatTooltipModule,l.MatDialogModule,a.MatSnackBarModule,k.MatProgressBarModule,v.MatMenuModule,x.MatSidenavModule,C.MatToolbarModule,y.MatListModule,s.MatBottomSheetModule,m.MatDividerModule,g.MatExpansionModule,T.ResizableModule,$.ScrollingModule,E.PortalModule],declarations:[dt,ct,yn,wt,fn,gt,mt,bt,ft,yt,vt,kt,qt,St,Tt,Bt,wn,Sn,Lt,zt,Gt,Vt,Qt,rn,sn,bn,et,vn,kn,qn,xn,ot,lt,Xe,pt,tt],exports:[dt,fn,pt],entryComponents:[gt,mt,bt,ft,yt,vt,kt,qt,et,ot,lt,Xe,tt],providers:[{provide:D.QUILL_CONFIG_TOKEN,useValue:_n},{provide:r.HTTP_INTERCEPTORS,useClass:Tn,multi:!0},it,Ze,nt,ht]}]}],Mn.ctorParameters=function(){return[{type:We},{type:rt},{type:Boolean,decorators:[{type:t.Inject,args:[Bn]}]}]},e.AIPBlock=ye,e.ButtonBlock=xe,e.Defaults=Ne,e.DividerBlock=we,e.FreeUsersImageUploader=at,e.ImageBlock=ke,e.PBEmail=Ge,e.PB_BLOCKS=_e,e.PB_CONFIG=Fe,e.PB_DEFAULT_BLOCKS=Ee,e.PB_DEFAULT_CONFIG=Me,e.PB_DEFAULT_FALLBACK_FONTS=$e,e.PB_DEFAULT_GOOGLE_FONTS=Be,e.PB_DEFAULT_MERGE_FIELD_PICKER_CONFIG=ze,e.PB_DEFAULT_SOCIAL_NETWORKS=Pe,e.PB_DEFAULT_STRUCTURES=De,e.PB_EMAIL_TEMPLATE_SCHEMA=Ve,e.PB_FALLBACK_FONTS=je,e.PB_GOOGLE_FONTS=Oe,e.PB_MERGE_FIELD_PICKER_CONFIG=Re,e.PB_SOCIAL_NETWORKS=Te,e.PB_STORAGE_FACTORY=Ue,e.PB_STRUCTURES=Le,e.PB_TEMPLATES_TEMPORARY_STORAGE=He,e.PbEmailBuilderComponent=dt,e.PbEmailBuilderModule=Mn,e.PbEmailBuilderService=it,e.PbStorageService=Je,e.PbUserImageUploaderService=rt,e.PbUserMiddlewaresService=We,e.PbUserRestApiService=Ke,e.PreviewTemplateComponent=fn,e.SlugifyPipe=pt,e.SocialBlock=Ie,e.SpacerBlock=Se,e.Structure=se,e.TextBlock=ve,e.VideoBlock=qe,e.assignBlockId=Ce,e.bytesToSize=oe,e.cloneDeep=K,e.createBackground=function(e){var t=e.url,n=void 0===t?"":t,i=e.color,o=void 0===i?"white":i,r=e.repeat;return o+" "+(n&&"url("+n+")")+" "+(void 0===r?"no-repeat":r)+" top center"},e.createBlockId=pe,e.createBorder=Z,e.createCustomRestApiService=jn,e.createFont=te,e.createLineHeight=ne,e.createMargin=ee,e.createPadding=X,e.createUserMiddlewareService=Dn,e.createUserUploaderService=En,e.createUsersIpStorage=Ln,e.createWidthHeight=ie,e.defaultColumnsOptions=le,e.defaultsDeep=Q,e.deferOf=ae,e.getAssetByPath=re,e.isEqual=J,e.resolveMergeFieldPickerConfig=Ae,e["ɵ0"]=_n,e["ɵa"]=Ze,e["ɵb"]=Qe,e["ɵba"]=Vt,e["ɵbb"]=Qt,e["ɵbc"]=rn,e["ɵbd"]=sn,e["ɵbe"]=bn,e["ɵbf"]=et,e["ɵbg"]=vn,e["ɵbh"]=kn,e["ɵbi"]=qn,e["ɵbj"]=xn,e["ɵbk"]=ot,e["ɵbl"]=lt,e["ɵbm"]=Xe,e["ɵbn"]=tt,e["ɵbo"]=Tn,e["ɵbp"]=Bn,e["ɵc"]=nt,e["ɵd"]=On,e["ɵe"]=$n,e["ɵf"]=ct,e["ɵg"]=yn,e["ɵh"]=wt,e["ɵi"]=gt,e["ɵj"]=ut,e["ɵk"]=mt,e["ɵl"]=bt,e["ɵm"]=ft,e["ɵn"]=ht,e["ɵo"]=yt,e["ɵp"]=vt,e["ɵq"]=kt,e["ɵr"]=qt,e["ɵs"]=St,e["ɵt"]=Tt,e["ɵu"]=Bt,e["ɵv"]=wn,e["ɵw"]=Sn,e["ɵx"]=Lt,e["ɵy"]=zt,e["ɵz"]=Gt,Object.defineProperty(e,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=pobuca-email-builder.umd.min.js.map