1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[8422],{16041:(Le,E,d)=>{d.r(E),d.d(E,{EventAdminCommsEmailBuilderPageModule:()=>ze});var f=d(56610),v=d(88832),s=d(77897),y=d(54743),b=d(61759),h=d(60564),m=d(73308),r=d(30017),k=d(5060),x=d(3871),j=d(2423),F=d(65432),e=d(23279),w=d(23700),M=d(62022),P=d(26409),B=d(25386),R=d(76098);const A=["emailBuilderFrame"];let I=(()=>{class o{sanitizer;email_builder_frame;onReady=new e.bkB;email_template={};email_builder_hosturl="https://events.taptickets.co.za";email_builder_safeurl;pendingRequest={};pendingRequestIdCounter=0;constructor(n){this.sanitizer=n;let t="";"localhost"==window.location.hostname&&(this.email_builder_hosturl=window.location.protocol+"//"+window.location.host),t=this.email_builder_hosturl+"/email-builder",this.email_builder_safeurl=this.sanitizer.bypassSecurityTrustResourceUrl(t)}ngOnInit(){var n=this;return(0,m.A)(function*(){window.addEventListener("message",n.handleIframeMessage.bind(n))})()}handleIframeMessage(n){if(n.origin===this.email_builder_hosturl&&"taptickets"==n.data.source)if("iframe-loaded"==n.data.type&&"ready"==n.data.status)this.onReady.emit(n.data.type),this.initBuilderContent();else if("data-exported"==n.data.type){let t=n.data.request_id;if(this.pendingRequest[t]){let i=n.data.dataset,a=n.data.error;const{resolve:_,reject:l}=this.pendingRequest[t];a?l(a):_(i),delete this.pendingRequest[t]}}else console.log(n.data)}getEmailTemplate(){var n=this;return(0,m.A)(function*(){return new Promise((t,i)=>{const a="request-"+n.pendingRequestIdCounter++;n.pendingRequest[a]={resolve:t,reject:i},n.email_builder_frame&&n.email_builder_frame.nativeElement.contentWindow?n.email_builder_frame.nativeElement.contentWindow.postMessage({source:"taptickets",type:"export",request_id:a},n.email_builder_hosturl):i("undefined")})})()}loadTemplate(n,t){var i=this;return(0,m.A)(function*(){i.email_template=n,i.email_builder_frame&&i.email_builder_frame.nativeElement.contentWindow&&i.email_builder_frame.nativeElement.contentWindow.postMessage({source:"taptickets",type:"load-data",template:i.email_template,format:t},i.email_builder_hosturl)})()}initBuilderContent(){var n=this;return(0,m.A)(function*(){n.email_builder_frame&&n.email_builder_frame.nativeElement.contentWindow&&n.email_builder_frame.nativeElement.contentWindow.postMessage({source:"taptickets",type:"initial-data",template:n.email_template},n.email_builder_hosturl)})()}static \u0275fac=function(t){return new(t||o)(e.rXU(R.up))};static \u0275cmp=e.VBU({type:o,selectors:[["app-email-builder"]],viewQuery:function(t,i){if(1&t&&e.GBs(A,7),2&t){let a;e.mGM(a=e.lsd())&&(i.email_builder_frame=a.first)}},outputs:{onReady:"onReady"},decls:3,vars:1,consts:[["emailBuilderFrame",""],[1,"email-builder-container"],["allowtransparency","true","width","100%","height","100%","frameborder","0",3,"src"]],template:function(t,i){1&t&&(e.j41(0,"div",1),e.nrm(1,"iframe",2,0),e.k0s()),2&t&&(e.R7$(),e.Y8G("src",i.email_builder_safeurl,e.f$h))},styles:[".email-builder-container[_ngcontent-%COMP%]{width:100%;height:100%;min-height:500px;overflow:hidden;position:relative}.email-builder-container[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{border:none;height:100%;width:100%;overflow:hidden;position:absolute;inset:0}"]})}return o})();const G=["EmailTemplateBuilder"],T=["hiddenfileinput"],N=["ticket_type_selector"],D=o=>({"--ck-color-base-background":o});function X(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",13),e.bIt("click",function(){const i=e.eBV(n).$implicit,a=e.XpG(2);return e.Njj(a.getEmailTemplate(i._id))}),e.nrm(1,"img",14),e.j41(2,"ion-label"),e.EFF(3),e.k0s(),e.j41(4,"div",15),e.nrm(5,"ion-icon",16),e.k0s()()}if(2&o){const n=c.$implicit;e.R7$(),e.FS9("src",n.thumbnail,e.B4B),e.R7$(2),e.JRh(n.name)}}function V(o,c){if(1&o&&(e.j41(0,"div",9)(1,"div",10)(2,"div",11),e.DNE(3,X,6,2,"div",12),e.k0s()()()),2&o){const n=e.XpG();e.R7$(3),e.Y8G("ngForOf",n.advance_email_editor_templates)}}function Y(o,c){1&o&&(e.j41(0,"ion-segment-button",22)(1,"ion-label"),e.EFF(2,"Advance Settings"),e.k0s()())}function O(o,c){if(1&o){const n=e.RV6();e.j41(0,"ion-segment",19),e.mxI("ngModelChange",function(i){e.eBV(n);const a=e.XpG(2);return e.DH7(a.section,i)||(a.section=i),e.Njj(i)}),e.j41(1,"ion-segment-button",20)(2,"ion-label"),e.EFF(3,"General Information"),e.k0s()(),e.DNE(4,Y,3,0,"ion-segment-button",21),e.k0s()}if(2&o){const n=e.XpG(2);e.R50("ngModel",n.section),e.R7$(4),e.Y8G("ngIf",n.event_id)}}function S(o,c){1&o&&(e.j41(0,"strong"),e.EFF(1,"Invitation Email"),e.k0s())}function $(o,c){1&o&&(e.j41(0,"strong"),e.EFF(1,"Confirmation Email"),e.k0s())}function z(o,c){1&o&&(e.j41(0,"strong"),e.EFF(1,"Decline Email"),e.k0s())}
1function H(o,c){1&o&&(e.j41(0,"strong"),e.EFF(1,"Registration Reminder"),e.k0s())}function U(o,c){1&o&&(e.j41(0,"strong"),e.EFF(1,"Event Start Reminder"),e.k0s())}function q(o,c){1&o&&(e.j41(0,"strong"),e.EFF(1,"One hour to Go Reminder"),e.k0s())}function L(o,c){1&o&&(e.j41(0,"strong"),e.EFF(1,"Email for Attendees not yet RSVP'ed"),e.k0s())}function W(o,c){1&o&&(e.j41(0,"strong"),e.EFF(1,"Email for Attending Attendees"),e.k0s())}function J(o,c){1&o&&(e.j41(0,"strong"),e.EFF(1,"Email for Attending Attendees Not Yet Checked In"),e.k0s())}function Q(o,c){1&o&&(e.j41(0,"strong"),e.EFF(1,"Email for Checked In Attendees"),e.k0s())}function K(o,c){1&o&&(e.j41(0,"small"),e.EFF(1," (Active)"),e.k0s())}function Z(o,c){1&o&&(e.j41(0,"small"),e.EFF(1," (Draft)"),e.k0s())}function ee(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",36)(1,"ion-toggle",37),e.mxI("ngModelChange",function(i){e.eBV(n);const a=e.XpG(4);return e.DH7(a.comms.active,i)||(a.comms.active=i),e.Njj(i)}),e.k0s()()}if(2&o){const n=e.XpG(4);e.R7$(),e.R50("ngModel",n.comms.active)}}function ne(o,c){if(1&o&&(e.j41(0,"ion-row")(1,"ion-col",38)(2,"small"),e.EFF(3),e.k0s()()()),2&o){const n=e.XpG(4);e.R7$(3),e.SpI("Date and times relative to configured timezone - ",n.timezone,"")}}function te(o,c){if(1&o){const n=e.RV6();e.j41(0,"ion-row")(1,"ion-col",34)(2,"div",27)(3,"ion-label"),e.EFF(4,"Name"),e.j41(5,"span",28),e.EFF(6,"\xa0*"),e.k0s()(),e.j41(7,"ion-input",39),e.mxI("ngModelChange",function(i){e.eBV(n);const a=e.XpG(4);return e.DH7(a.comms.title,i)||(a.comms.title=i),e.Njj(i)}),e.k0s()()()()}if(2&o){const n=e.XpG(4);e.R7$(7),e.R50("ngModel",n.comms.title),e.Y8G("readonly",n.readonly)}}function ie(o,c){1&o&&(e.j41(0,"ion-select-option",47),e.EFF(1,"In Person"),e.k0s())}function oe(o,c){1&o&&(e.j41(0,"ion-select-option",48),e.EFF(1,"Virtual"),e.k0s())}function ae(o,c){1&o&&(e.j41(0,"ion-select-option",49),e.EFF(1,"Virtual & In Person"),e.k0s())}function _e(o,c){if(1&o&&(e.j41(0,"ion-select-option",54),e.EFF(1),e.k0s()),2&o){const n=e.XpG().$implicit;e.FS9("value",n.id),e.R7$(),e.Lme("",n.name," (",n.visibility,")")}}function ce(o,c){if(1&o&&(e.qex(0),e.DNE(1,_e,2,3,"ion-select-option",53),e.bVm()),2&o){const n=c.$implicit,t=e.XpG(6);e.R7$(),e.Y8G("ngIf",n.access_method==t.comms.access_method||"Combined"==t.comms.access_method)}}function le(o,c){if(1&o){const n=e.RV6();e.j41(0,"ion-select",50,0),e.mxI("ngModelChange",function(i){e.eBV(n);const a=e.XpG(5);return e.DH7(a.comms.ticket_type_id,i)||(a.comms.ticket_type_id=i),e.Njj(i)}),e.j41(2,"ion-select-option",51),e.EFF(3,"All Public Access Types"),e.k0s(),e.DNE(4,ce,2,1,"ng-container",52),e.k0s()}if(2&o){const n=e.XpG(5);e.R50("ngModel",n.comms.ticket_type_id),e.R7$(4),e.Y8G("ngForOf",n.ticket_types)}}function re(o,c){if(1&o){const n=e.RV6();e.j41(0,"ion-col",40)(1,"div",27)(2,"ion-label"),e.EFF(3,"Access Type Selection Mode"),e.j41(4,"span",28),e.EFF(5,"\xa0*"),e.k0s()(),e.j41(6,"ion-select",55),e.mxI("ngModelChange",function(i){e.eBV(n);const a=e.XpG(5);return e.DH7(a.comms.ticket_type_selection_mode,i)||(a.comms.ticket_type_selection_mode=i),e.Njj(i)}),e.j41(7,"ion-select-option",56),e.EFF(8,"Allow selection of multiple access types"),e.k0s(),e.j41(9,"ion-select-option",57),e.EFF(10,"Limit selection to only 1 access type"),e.k0s()()()()}if(2&o){const n=e.XpG(5);e.R7$(6),e.R50("ngModel",n.comms.ticket_type_selection_mode)}}function se(o,c){if(1&o){const n=e.RV6();e.j41(0,"ion-row")(1,"ion-col",40)(2,"div",27)(3,"ion-label"),e.EFF(4,"Applicable Access Method"),e.k0s(),e.j41(5,"ion-select",41),e.mxI("ngModelChange",function(i){e.eBV(n);const a=e.XpG(4);return e.DH7(a.comms.access_method,i)||(a.comms.access_method=i),e.Njj(i)}),e.bIt("ionChange",function(){e.eBV(n);const i=e.XpG(4);return e.Njj(i.accessMethodChanged())}),e.DNE(6,ie,2,0,"ion-select-option",42)(7,oe,2,0,"ion-select-option",43)(8,ae,2,0,"ion-select-option",44),e.k0s()()(),e.j41(9,"ion-col",40)(10,"div",27)(11,"ion-label"),e.EFF(12,"Access Types Allowed"),e.j41(13,"span",28),e.EFF(14,"\xa0*"),e.k0s()(),e.DNE(15,le,5,2,"ion-select",45),e.k0s()(),e.DNE(16,re,11,1,"ion-col",46),e.k0s()}if(2&o){const n=e.XpG(4);e.R7$(5),e.R50("ngModel",n.comms.access_method),e.R7$(),e.Y8G("ngIf","Physical"==n.event_format||"Hybrid"==n.event_format),e.R7$(),e.Y8G("ngIf","Online"==n.event_format||"Hybrid"==n.event_format),e.R7$(),e.Y8G("ngIf","Hybrid"==n.event_format),e.R7$(7),e.Y8G("ngIf",n.ticket_types),e.R7$(),e.Y8G("ngIf","ticket_invite_email"==n.correspondance_type)}}function de(o,c){if(1&o&&(e.j41(0,"ion-row")(1,"ion-col",34)(2,"div",27)(3,"ion-label"),e.EFF(4,"Direct Invite Link"),e.k0s(),e.j41(5,"p"),e.EFF(6),e.k0s()()()()),2&o){const n=e.XpG(4);e.R7$(6),e.JRh(n.invite_direct_link)}}function me(o,c){if(1&o){const n=e.RV6();e.j41(0,"ion-col",58)(1,"div",27)(2,"ion-label"),e.EFF(3,"Filter by Invitation"),e.k0s(),e.j41(4,"ion-select",59),e.mxI("ngModelChange",function(i){e.eBV(n);const a=e.XpG(4);return e.DH7(a.comms.filter_by_invitation,i)||(a.comms.filter_by_invitation=i),e.Njj(i)}),e.j41(5,"ion-select-option",60),e.EFF(6,"No"),e.k0s(),e.j41(7,"ion-select-option",61),e.EFF(8,"Yes"),e.k0s()()()()}if(2&o){const n=e.XpG(4);e.R7$(4),e.R50("ngModel",n.comms.filter_by_invitation)}}function ge(o,c){1&o&&(e.j41(0,"span"),e.EFF(1,"Virtual & In Person"),e.k0s())}function pe(o,c){1&o&&(e.j41(0,"span"),e.EFF(1,"In Person"),e.k0s())}function ue(o,c){1&o&&(e.j41(0,"span"),e.EFF(1,"Virtual"),e.k0s())}
1function fe(o,c){if(1&o&&(e.j41(0,"ion-select-option",54),e.EFF(1),e.DNE(2,ge,2,0,"span",18)(3,pe,2,0,"span",18)(4,ue,2,0,"span",18),e.EFF(5,") "),e.k0s()),2&o){const n=c.$implicit;e.FS9("value",n.uid),e.R7$(),e.SpI(" ",n.title," ("),e.R7$(),e.Y8G("ngIf",n.access_method&&"Combined"==n.access_method),e.R7$(),e.Y8G("ngIf",n.access_method&&"Physical"==n.access_method),e.R7$(),e.Y8G("ngIf",n.access_method&&"Virtual"==n.access_method)}}function ve(o,c){if(1&o&&(e.j41(0,"small"),e.EFF(1),e.k0s()),2&o){const n=e.XpG(5);e.R7$(),e.SpI("Applicable Access Types : ",n.ticket_types_available.join(", "),"")}}function he(o,c){if(1&o){const n=e.RV6();e.j41(0,"ion-col")(1,"div",27)(2,"ion-label"),e.EFF(3,"Linked Invitation"),e.j41(4,"span",28),e.EFF(5,"\xa0*"),e.k0s()(),e.j41(6,"ion-select",62),e.mxI("ngModelChange",function(i){e.eBV(n);const a=e.XpG(4);return e.DH7(a.comms.invitation_id,i)||(a.comms.invitation_id=i),e.Njj(i)}),e.bIt("ionChange",function(){e.eBV(n);const i=e.XpG(4);return e.Njj(i.changeInvitation())}),e.DNE(7,fe,6,5,"ion-select-option",63),e.k0s(),e.DNE(8,ve,2,1,"small",18),e.k0s()()}if(2&o){const n=e.XpG(4);e.R7$(6),e.R50("ngModel",n.comms.invitation_id),e.R7$(),e.Y8G("ngForOf",n.comms_invites),e.R7$(),e.Y8G("ngIf",n.ticket_types_available.length>0)}}function Ee(o,c){if(1&o){const n=e.RV6();e.j41(0,"ion-row")(1,"ion-col",26)(2,"div",27)(3,"ion-label"),e.EFF(4,"Identifiable Name"),e.j41(5,"span",28),e.EFF(6,"\xa0*"),e.k0s()(),e.j41(7,"ion-input",64),e.mxI("ngModelChange",function(i){e.eBV(n);const a=e.XpG(4);return e.DH7(a.comms.title,i)||(a.comms.title=i),e.Njj(i)}),e.k0s()()(),e.j41(8,"ion-col",26)(9,"div",27)(10,"ion-label"),e.EFF(11,"Sending Date and Time"),e.j41(12,"span",28),e.EFF(13,"\xa0*"),e.k0s()(),e.j41(14,"app-datetimepicker",65),e.mxI("valueChange",function(i){e.eBV(n);const a=e.XpG(4);return e.DH7(a.comms.send_date,i)||(a.comms.send_date=i),e.Njj(i)}),e.k0s()()()()}if(2&o){const n=e.XpG(4);e.R7$(7),e.R50("ngModel",n.comms.title),e.Y8G("readonly",n.readonly),e.R7$(7),e.R50("value",n.comms.send_date),e.Y8G("min",n.min_date)("readonly",n.readonly)("timezone",n.timezone)}}function ye(o,c){if(1&o){const n=e.RV6();e.j41(0,"ion-input",66),e.mxI("ngModelChange",function(i){e.eBV(n);const a=e.XpG(4);return e.DH7(a.comms.from.email,i)||(a.comms.from.email=i),e.Njj(i)}),e.bIt("ngModelChange",function(i){e.eBV(n);const a=e.XpG(4);return e.Njj(a.changeDetection(i))}),e.k0s()}if(2&o){const n=e.XpG(4);e.R50("ngModel",n.comms.from.email),e.Y8G("readonly",n.readonly)}}function be(o,c){if(1&o){const n=e.RV6();e.j41(0,"ion-select",67),e.mxI("ngModelChange",function(i){e.eBV(n);const a=e.XpG(4);return e.DH7(a.comms.from.email,i)||(a.comms.from.email=i),e.Njj(i)}),e.j41(1,"ion-select-option",54),e.EFF(2),e.k0s()()}if(2&o){const n=e.XpG(4);e.R50("ngModel",n.comms.from.email),e.R7$(),e.FS9("value",n.comms.from.email),e.R7$(),e.JRh(n.comms.from.email)}}function Ce(o,c){if(1&o){const n=e.RV6();e.j41(0,"div")(1,"app-email-builder",68,1),e.bIt("onReady",function(i){e.eBV(n);const a=e.XpG(4);return e.Njj(a.editorReady(i))}),e.k0s(),e.nrm(3,"div",69),e.k0s()}}function ke(o,c){if(1&o){const n=e.RV6();e.j41(0,"ckeditor",81),e.mxI("ngModelChange",function(i){e.eBV(n);const a=e.XpG(5);return e.DH7(a.comms.content,i)||(a.comms.content=i),e.Njj(i)}),e.bIt("ngModelChange",function(i){e.eBV(n);const a=e.XpG(5);return e.Njj(a.changeDetection(i))})("ready",function(i){e.eBV(n);const a=e.XpG(5);return e.Njj(a.onEditorReady(i))}),e.k0s()}if(2&o){const n=e.XpG(5);e.Y8G("editor",n.editor)("config",n.editor_config),e.R50("ngModel",n.comms.content),e.Y8G("ngStyle",e.eq3(4,D,n.comms.config["background-color"]))}}function xe(o,c){1&o&&(e.j41(0,"small"),e.EFF(1,"Insert tags into email by surrounding Tag ID below with {$ } for example {$email_address}"),e.k0s())}function je(o,c){if(1&o){const n=e.RV6();e.j41(0,"tr")(1,"td")(2,"code"),e.EFF(3),e.k0s()(),e.j41(4,"td",83)(5,"ion-button",84),e.bIt("click",function(){const i=e.eBV(n).$implicit,a=e.XpG(6);return e.Njj(a.copyTag("{$"+i.tag+"}"))}),e.EFF(6),e.k0s()(),e.j41(7,"td",85),e.EFF(8),e.k0s()()}if(2&o){const n=c.$implicit;e.R7$(3),e.JRh(n.tag),e.R7$(3),e.SpI("{$",n.tag,"}"),e.R7$(2),e.SpI(" ",n.desc," ")}}function Fe(o,c){if(1&o&&(e.j41(0,"table",82)(1,"tr")(2,"td")(3,"strong"),e.EFF(4,"Tag"),e.k0s()(),e.j41(5,"td")(6,"strong"),e.EFF(7,"Copy to Clipboard"),e.k0s()(),e.j41(8,"td")(9,"strong"),e.EFF(10,"Tag Description"),e.k0s()()(),e.DNE(11,je,9,3,"tr",52),e.k0s()),2&o){const n=e.XpG(5);e.R7$(11),e.Y8G("ngForOf",n.tags)}}function we(o,c){if(1&o){const n=e.RV6();e.j41(0,"div")(1,"div",27),e.DNE(2,ke,1,6,"ckeditor",70),e.j41(3,"div",71)(4,"div",72),e.nrm(5,"i",73),e.j41(6,"span",74),e.EFF(7,"Email Backgroun
1d Color"),e.k0s()(),e.j41(8,"div",75)(9,"div",76)(10,"input",77),e.mxI("colorPickerChange",function(i){e.eBV(n);const a=e.XpG(4);return e.DH7(a.comms.config["background-color"],i)||(a.comms.config["background-color"]=i),e.Njj(i)}),e.k0s()(),e.nrm(11,"input",78),e.j41(12,"ion-button",79),e.bIt("click",function(){e.eBV(n);const i=e.XpG(4);return e.Njj(i.resetColor())}),e.EFF(13,"Reset"),e.k0s()()(),e.DNE(14,xe,2,0,"small",18),e.k0s(),e.DNE(15,Fe,12,1,"table",80),e.k0s()}if(2&o){const n=e.XpG(4);e.R7$(2),e.Y8G("ngIf",n.isLayoutReady),e.R7$(3),e.xc7("background",n.comms.config["background-color"]),e.R7$(4),e.xc7("background",n.comms.config["background-color"]),e.R7$(),e.R50("colorPicker",n.comms.config["background-color"]),e.R7$(),e.Y8G("value",n.comms.config["background-color"]),e.R7$(3),e.Y8G("ngIf",n.tags&&n.tags.length>0),e.R7$(),e.Y8G("ngIf",n.tags&&n.tags.length>0)}}function Me(o,c){if(1&o){const n=e.RV6();e.j41(0,"ion-button",91),e.bIt("click",function(){e.eBV(n),e.XpG();const i=e.sdS(10);return e.Njj(i.click())}),e.EFF(1,"Change"),e.k0s()}}function Pe(o,c){if(1&o){const n=e.RV6();e.j41(0,"ion-button",92),e.bIt("click",function(){e.eBV(n);const i=e.XpG(5);return e.Njj(i.dropBanner())}),e.nrm(1,"ion-icon",93),e.k0s()}}function Be(o,c){if(1&o){const n=e.RV6();e.j41(0,"ion-row")(1,"ion-col")(2,"div",27)(3,"ion-label"),e.EFF(4,"Email Banner"),e.k0s(),e.j41(5,"div",86),e.nrm(6,"img",87),e.DNE(7,Me,2,0,"ion-button",88)(8,Pe,2,0,"ion-button",89),e.k0s(),e.j41(9,"input",90,2),e.bIt("change",function(i){e.eBV(n);const a=e.XpG(4);return e.Njj(a.onFileSelect(i))}),e.k0s(),e.j41(11,"small"),e.EFF(12,"Optimal email banner size : 1320px x 660px (2:1 Ratio) < 2MB in file size"),e.k0s()()()()}if(2&o){const n=e.XpG(4);e.R7$(6),e.FS9("src",n.comms.banner,e.B4B),e.R7$(),e.Y8G("ngIf",!n.readonly),e.R7$(),e.Y8G("ngIf","assets/img/placeholder_email_banner.png"!=n.comms.banner&&!n.readonly)}}function Re(o,c){if(1&o){const n=e.RV6();e.j41(0,"ion-grid")(1,"ion-row")(2,"ion-col",23)(3,"h2"),e.DNE(4,S,2,0,"strong",18)(5,$,2,0,"strong",18)(6,z,2,0,"strong",18)(7,H,2,0,"strong",18)(8,U,2,0,"strong",18)(9,q,2,0,"strong",18)(10,L,2,0,"strong",18)(11,W,2,0,"strong",18)(12,J,2,0,"strong",18)(13,Q,2,0,"strong",18)(14,K,2,0,"small",18)(15,Z,2,0,"small",18),e.k0s(),e.DNE(16,ee,2,1,"div",24),e.k0s()(),e.DNE(17,ne,4,1,"ion-row",18)(18,te,8,2,"ion-row",18)(19,se,17,6,"ion-row",18)(20,de,7,1,"ion-row",18),e.j41(21,"ion-row"),e.DNE(22,me,9,1,"ion-col",25)(23,he,9,3,"ion-col",18),e.k0s(),e.DNE(24,Ee,15,6,"ion-row",18),e.j41(25,"ion-row")(26,"ion-col",26)(27,"div",27)(28,"ion-label"),e.EFF(29,"Sender Email Address"),e.j41(30,"span",28),e.EFF(31,"\xa0*"),e.k0s()(),e.DNE(32,ye,1,2,"ion-input",29)(33,be,3,3,"ion-select",30),e.k0s()(),e.j41(34,"ion-col",26)(35,"div",27)(36,"ion-label"),e.EFF(37,"Sender Name"),e.j41(38,"span",28),e.EFF(39,"\xa0*"),e.k0s()(),e.j41(40,"ion-input",31),e.mxI("ngModelChange",function(i){e.eBV(n);const a=e.XpG(3);return e.DH7(a.comms.from.name,i)||(a.comms.from.name=i),e.Njj(i)}),e.bIt("ngModelChange",function(i){e.eBV(n);const a=e.XpG(3);return e.Njj(a.changeDetection(i))}),e.k0s()()()(),e.j41(41,"ion-row")(42,"ion-col",26)(43,"div",27)(44,"ion-label"),e.EFF(45,"Reply To Email Address"),e.k0s(),e.j41(46,"ion-input",32),e.mxI("ngModelChange",function(i){e.eBV(n);const a=e.XpG(3);return e.DH7(a.comms.replyto.email,i)||(a.comms.replyto.email=i),e.Njj(i)}),e.bIt("ngModelChange",function(i){e.eBV(n);const a=e.XpG(3);return e.Njj(a.changeDetection(i))}),e.k0s()()(),e.j41(47,"ion-col",26)(48,"div",27)(49,"ion-label"),e.EFF(50,"Reply To Name"),e.k0s(),e.j41(51,"ion-input",33),e.mxI("ngModelChange",function(i){e.eBV(n);const a=e.XpG(3);return e.DH7(a.comms.replyto.name,i)||(a.comms.replyto.name=i),e.Njj(i)}),e.bIt("ngModelChange",function(i){e.eBV(n);const a=e.XpG(3);return e.Njj(a.changeDetection(i))}),e.k0s()()()(),e.j41(52,"ion-row")(53,"ion-col",34)(54,"div",27)(55,"ion-label"),e.EFF(56,"Email Subject"),e.j41(57,"span",28),e.EFF(58,"\xa0*"),e.k0s()(),e.j41(59,"ion-input",35),e.mxI("ngModelChange",function(i){e.eBV(n);const a=e.XpG(3);return e.DH7(a.comms.subject,i)||(a.comms.subject=i),e.Njj(i)}),e.bIt("ngModelChange",function(i){e.eBV(n);const a=e.XpG(3);return e.Njj(a.changeDetection(i))}),e.k0s()()()(),e.j41(60,"ion-row")(61,"ion-col",34)(62,"div",27)(63,"ion-label"),e.EFF(64,"Email Contents"),e.j41(65,"span",28),e.EFF(66,"\xa0*"),e.k0s()(),e.DNE(67,Ce,4,0,"div",18)(68,we,16,9,"div",18),e.k0s()()(),e.DNE(69,Be,13,3,"ion-row",18),e.k0s()}if(2&o){const n=e.XpG(3);e.R7$(4),e.Y8G("ngIf","ticket_invite_email"==n.correspondance_type),e.R7$(),e.Y8G("ngIf","ticket_invite_acceptance_email"==n.correspondance_type),e.R7$(),e.Y8G("ngIf","ticket_invite_decline_email"==n.correspondance_type),e.R7$(),e.Y8G("ngIf","ticket_invite_reminder"==n.
1correspondance_subtype),e.R7$(),e.Y8G("ngIf","ticket_invite_accepted_reminder"==n.correspondance_subtype),e.R7$(),e.Y8G("ngIf","ticket_invite_accepted_start_reminder"==n.correspondance_subtype),e.R7$(),e.Y8G("ngIf","invited"==n.correspondance_status&&"custom"==n.correspondance_type),e.R7$(),e.Y8G("ngIf","active"==n.correspondance_status&&"custom"==n.correspondance_type),e.R7$(),e.Y8G("ngIf","not-checkedin"==n.correspondance_status&&"custom"==n.correspondance_type),e.R7$(),e.Y8G("ngIf","checkedin"==n.correspondance_status&&"custom"==n.correspondance_type),e.R7$(),e.Y8G("ngIf",n.comms.active),e.R7$(),e.Y8G("ngIf",!n.comms.active),e.R7$(),e.Y8G("ngIf",!n.readonly),e.R7$(),e.Y8G("ngIf",("reminder"==n.correspondance_type||"custom"==n.correspondance_type)&&n.timezone),e.R7$(),e.Y8G("ngIf","reminder"!=n.correspondance_type&&"custom"!=n.correspondance_type),e.R7$(),e.Y8G("ngIf","ticket_invite_reminder"!=n.correspondance_subtype&&"invited"!=n.correspondance_status),e.R7$(),e.Y8G("ngIf","ticket_invite_email"==n.correspondance_type&&""!=n.invite_direct_link),e.R7$(2),e.Y8G("ngIf","ticket_invite_accepted_reminder"==n.correspondance_subtype||"ticket_invite_accepted_start_reminder"==n.correspondance_subtype||"active"==n.correspondance_status||"not-checkedin"==n.correspondance_status||"checkedin"==n.correspondance_status),e.R7$(),e.Y8G("ngIf","ticket_invite_reminder"==n.correspondance_subtype||"Yes"==n.comms.filter_by_invitation||"invited"==n.correspondance_status),e.R7$(),e.Y8G("ngIf","reminder"==n.correspondance_type||"custom"==n.correspondance_type),e.R7$(8),e.Y8G("ngIf",n.comms.email_allow_custom_sender),e.R7$(),e.Y8G("ngIf",!n.comms.email_allow_custom_sender),e.R7$(7),e.R50("ngModel",n.comms.from.name),e.Y8G("readonly",n.readonly),e.R7$(6),e.R50("ngModel",n.comms.replyto.email),e.Y8G("readonly",n.readonly),e.R7$(5),e.R50("ngModel",n.comms.replyto.name),e.Y8G("readonly",n.readonly),e.R7$(8),e.R50("ngModel",n.comms.subject),e.Y8G("readonly",n.readonly),e.R7$(8),e.Y8G("ngIf",n.loaded&&n.advance_email_editor_active),e.R7$(),e.Y8G("ngIf",n.loaded&&!n.advance_email_editor_active),e.R7$(),e.Y8G("ngIf",n.loaded&&!n.advance_email_editor_active)}}function Ae(o,c){1&o&&(e.j41(0,"ion-grid")(1,"ion-row")(2,"ion-col",94),e.EFF(3," Invalid Email!! "),e.k0s()()())}function Ie(o,c){if(1&o&&(e.qex(0),e.j41(1,"ion-grid")(2,"ion-row")(3,"ion-col"),e.DNE(4,Re,70,33,"ion-grid",18)(5,Ae,4,0,"ion-grid",18),e.k0s()()(),e.bVm()),2&o){const n=e.XpG(2);e.R7$(4),e.Y8G("ngIf","reminder"!=n.correspondance_type||""!=n.correspondance_subtype),e.R7$(),e.Y8G("ngIf","reminder"==n.correspondance_type&&""==n.correspondance_subtype)}}function Ge(o,c){if(1&o){const n=e.RV6();e.j41(0,"ion-row")(1,"ion-col",95)(2,"div",27)(3,"ion-label"),e.EFF(4,"Call to Action - Accept"),e.k0s(),e.j41(5,"ion-input",96),e.mxI("ngModelChange",function(i){e.eBV(n);const a=e.XpG(3);return e.DH7(a.comms.config.call_to_action_accept,i)||(a.comms.config.call_to_action_accept=i),e.Njj(i)}),e.k0s(),e.j41(6,"small"),e.EFF(7),e.k0s()()(),e.j41(8,"ion-col",95)(9,"div",27)(10,"ion-label"),e.EFF(11,"Call to Action - Decline"),e.k0s(),e.j41(12,"ion-input",97),e.mxI("ngModelChange",function(i){e.eBV(n);const a=e.XpG(3);return e.DH7(a.comms.config.call_to_action_decline,i)||(a.comms.config.call_to_action_decline=i),e.Njj(i)}),e.k0s(),e.j41(13,"small"),e.EFF(14),e.k0s()()()()}if(2&o){const n=e.XpG(3);e.R7$(5),e.R50("ngModel",n.comms.config.call_to_action_accept),e.R7$(2),e.SpI("Used with replacement tag ","{","$accept_decline_buttons}"),e.R7$(5),e.R50("ngModel",n.comms.config.call_to_action_decline),e.R7$(2),e.SpI("Used with replacement tag ","{","$accept_decline_buttons}")}}function Te(o,c){if(1&o){const n=e.RV6();e.j41(0,"ion-row")(1,"ion-col",95)(2,"div",27)(3,"ion-label"),e.EFF(4,"Calendar Settings"),e.k0s(),e.j41(5,"div",98)(6,"ion-toggle",99),e.mxI("ngModelChange",function(i){e.eBV(n);const a=e.XpG(3);return e.DH7(a.comms.config.calendar_include,i)||(a.comms.config.calendar_include=i),e.Njj(i)}),e.k0s(),e.j41(7,"ion-label"),e.EFF(8,"Attach Calendar File (.ics)"),e.k0s()(),e.j41(9,"div",98)(10,"ion-toggle",99),e.mxI("ngModelChange",function(i){e.eBV(n);const a=e.XpG(3);return e.DH7(a.comms.config.calendar_include_ref,i)||(a.comms.config.calendar_include_ref=i),e.Njj(i)}),e.k0s(),e.j41(11,"ion-label"),e.EFF(12,"Show Booking Reference"),e.k0s()()()()()}if(2&o){const n=e.XpG(3);e.R7$(6),e.R50("ngModel",n.comms.config.calendar_include),e.R7$(4),e.R50("ngModel",n.comms.config.calendar_include_ref)}}function Ne(o,c){if(1&o&&(e.qex(0),e.j41(1,"ion-grid"),e.DNE(2,Ge,15,4,"ion-row",18)(3,Te,13,2,"ion-row",18),e.k0s(),e.bVm()),2&o){const n=e.XpG(2);e.R7$(2),e.Y8G("ngIf","ticket_invite_acceptance_email"!=n.correspondance_type&&"ticket_invite_accepted_reminder"!=n.correspondance_subtype&&"ticket_invite_accepted_start_reminder"!=n.correspondance_subtype&&("custom"!=n.correspondance_type||"active"!=n.correspondance_status&&"not-checkedin"!=n.correspondance_status&&"checkedin"!=n.correspondance_status)),e.R7$(),e.Y8G("ngIf","ticket_invite_acceptance_email"==n.correspondance_type||"ticket_invite_accepted_reminder"==n.
1correspondance_subtype||"ticket_invite_accepted_start_reminder"==n.correspondance_subtype||"custom"==n.correspondance_type&&("active"==n.correspondance_status||"not-checkedin"==n.correspondance_status||"checkedin"==n.correspondance_status))}}function De(o,c){if(1&o&&(e.j41(0,"div",9),e.DNE(1,O,5,2,"ion-segment",17)(2,Ie,6,2,"ng-container",18)(3,Ne,4,2,"ng-container",18),e.k0s()),2&o){const n=e.XpG();e.R7$(),e.Y8G("ngIf","ticket_invite_email"==n.correspondance_type||"ticket_invite_acceptance_email"==n.correspondance_type||"ticket_invite_reminder"==n.correspondance_subtype||"ticket_invite_accepted_reminder"==n.correspondance_subtype||"ticket_invite_accepted_start_reminder"==n.correspondance_subtype||"invited"==n.correspondance_status||"custom"==n.correspondance_type&&("active"==n.correspondance_status||"not-checkedin"==n.correspondance_status||"checkedin"==n.correspondance_status)),e.R7$(),e.Y8G("ngIf","info"==n.section),e.R7$(),e.Y8G("ngIf","advance"==n.section)}}function Xe(o,c){if(1&o){const n=e.RV6();e.j41(0,"ion-button",102),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.deleteComms())}),e.EFF(1,"Delete"),e.k0s()}}function Ve(o,c){if(1&o){const n=e.RV6();e.j41(0,"ion-button",104),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.saveComms())}),e.EFF(1,"Save Details"),e.k0s()}}function Ye(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",100),e.DNE(1,Xe,2,0,"ion-button",101),e.j41(2,"ion-button",102),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.sendPreview())}),e.EFF(3,"Send Preview"),e.k0s(),e.DNE(4,Ve,2,0,"ion-button",103),e.k0s()}if(2&o){const n=e.XpG();e.R7$(),e.Y8G("ngIf",n.allow_delete&&!n.readonly),e.R7$(3),e.Y8G("ngIf",!n.readonly)}}const Oe=[{path:"",component:(()=>{class o{router;route;modalCtrl;alertController;loadingController;api;common;session;events;navCtrl;httpClient;changeDetector;email_template_builder;file_selector;ionSelect;section="info";comms={};min_date=0;allow_delete=!1;allow_preview=!1;allow_custom_from=!1;readonly=!0;tags=[];event_id;event_format="Online";correspondance_status="invited";correspondance_type="ticket_invite_email";correspondance_subtype="";comms_uid=null;ticket_types;timezone="";comms_invites=[];ticket_types_available=[];saving=!1;loaded=!1;segment="editor";invite_direct_link="";isLayoutReady=!1;editor=r.aRV;editor_config={};advance_email_editor_allowed=!1;advance_email_editor_templates=[];advance_email_editor_template={};advance_email_editor_active=!1;advance_email_editor_options={id:"advance-editor",projectId:111496,displayMode:"email",tools:{image:{enabled:!0}},mergeTags:{}};constructor(n,t,i,a,_,l,g,p,u,He,Ue,qe){this.router=n,this.route=t,this.modalCtrl=i,this.alertController=a,this.loadingController=_,this.api=l,this.common=g,this.session=p,this.events=u,this.navCtrl=He,this.httpClient=Ue,this.changeDetector=qe,this.advance_email_editor_allowed=this.session.isModuleActive("advance_email");const C=this.router.parseUrl(this.router.url);"event-add"!=C.root.children.primary.segments[1].path&&(this.event_id=C.root.children.primary.segments[1].path),this.comms_uid=this.route.snapshot.params.comms_uid,"new"!=this.comms_uid&&(this.invite_direct_link=window.location.protocol+"//"+window.location.host+"/webinar/"+this.event_id+"/invite_"+this.comms_uid),this.correspondance_status=this.route.snapshot.params.status,this.correspondance_type=this.route.snapshot.params.type,"advance"==this.correspondance_type&&(this.correspondance_type="custom",this.advance_email_editor_allowed&&(this.advance_email_editor_active=!0)),"ticket_invite_reminder"==this.correspondance_type||"ticket_invite_accepted_reminder"==this.correspondance_type||"ticket_invite_accepted_start_reminder"==this.correspondance_type?(this.correspondance_subtype=this.correspondance_type,this.correspondance_type="reminder",this.loadCommsDetails(this.correspondance_subtype)):typeof this.correspondance_status<"u"?(this.correspondance_subtype=this.correspondance_type,this.correspondance_type="custom",this.loadCommsDetails(this.correspondance_status+"|"+this.correspondance_subtype)):this.loadCommsDetails(this.correspondance_type),this.loadTicketTypes(),this.loadCommsOptions()}ngOnInit(){var n=this;return(0,m.A)(function*(){let t=yield n.session.getCurrentEvent();typeof t.timezone<"u"&&null!=t.timezone&&""!=t.timezone&&"Africa/Johannesburg"!=t.timezone&&(n.timezone=t.timezone),n.event_format=t.format,n.resetComms()})()}ngAfterViewInit(){this.editor_config={toolbar:["undo","redo","selectAll","|","bold","italic","underline","strikethrough","fontcolor","removeFormat","|","heading","|","link","insertTable","insertImage","|","numberedList","bulletedList","|"],placeholder:"Email content to be used for c
1orrespondance",image:{toolbar:["toggleImageCaption","imageTextAlternative","|","imageStyle:inline","imageStyle:wrapText","imageStyle:breakText","|","resizeImage"]},plugins:[r.yN4,r.J20,r.DZT,r.N_E,r.XIK,r.Dqk,r.qIF,r.H_q,r.H09,r.YkW,r.uXn,r.bsd,r.DQW,r.ywH,r.FUH,r.BRX,r.eHb,r.r6L,r.Cdo,r.TLK,r.e1w,r.e1U,r.B8B,r.GkN,r.z2z,r.kNn,r.rwA,r.ybQ,r.y4,r.VnB],removePlugins:[r.uXn],table:{contentToolbar:["tableColumn","tableRow","mergeTableCells","tableProperties","tableCellProperties"]}},this.isLayoutReady=!0,this.changeDetector.detectChanges()}onEditorReady(n){var t=this;return(0,m.A)(function*(){n.config.resize_enabled=!1,n.plugins.get("FileRepository").createUploadAdapter=i=>new j.v(i,t.event_id,t.api)})()}loadTicketTypes(){var n=this;return(0,m.A)(function*(){try{let t=yield n.api.getEventTicketTypes(n.event_id,void 0,void 0,void 0,!0);null!=t.ticketTypes&&t.ticketTypes.length>0?n.ticket_types=t.ticketTypes.filter(i=>"Draft"!=i.status):n.common.showNotice("No access types could be found for the event! Please create atleast one Access Type to be able to add communication!","danger","middle")}catch(t){console.log(t),n.common.showNotice(t.message,"danger","top")}})()}resetColor(){this.comms.config["background-color"]="#FFFFFF"}loadEmailTemplates(){var n=this;return(0,m.A)(function*(){try{let t=yield n.api.getEmailTemplates("advanced");"success"==t.status&&(n.advance_email_editor_templates=t.templates)}catch(t){n.common.showNotice(t.message,"danger","top")}})()}getEmailTemplate(n){var t=this;return(0,m.A)(function*(){try{let i=yield t.api.getEmailTemplate(n);console.log(i),"success"==i.status&&(t.segment="editor",t.advance_email_editor_template={},t.advance_email_editor_template=i.template.template)}catch(i){console.log(i),t.common.showNotice(i.message,"danger","top")}})()}loadCommsOptions(){var n=this;
1return(0,m.A)(function*(){try{let t=yield n.api.getEventCommsListing(n.event_id,"ticket_invite_email");n.comms_invites=t.comms}catch(t){console.log(t),n.common.showNotice(t.message,"danger","top")}})()}loadCommsDetails(n){var t=this;return(0,m.A)(function*(){t.resetComms();let i=!1;if("new"!=t.comms_uid&&""!=t.comms_uid&&null!=t.comms_uid&&typeof t.comms_uid<"u"?(n+="|"+t.comms_uid,t.allow_delete=!0,i=!0):t.advance_email_editor_active?t.segment="template_selector":n+="|new","template_selector"!=t.segment){const a=yield t.loadingController.create({message:"Loading your data..."});yield a.present();try{let _=yield t.api.getEventComms(t.event_id,n,"email");_.filter_by_status&&(t.correspondance_status=_.filter_by_status),t.comms.active=_.active,t.comms.title=_.title,typeof _.send_date<"u"&&_.send_date>0&&(t.comms.send_date=1e3*_.send_date),t.comms.subject=_.subject,t.comms.content=_.content,t.comms.from=_.from,typeof _.access_method<"u"&&null!=_.access_method&&""!=_.access_method&&(t.comms.access_method=_.access_method),typeof _.ticket_type_id<"u"&&null!=_.ticket_type_id&&""!=_.ticket_type_id&&(t.comms.ticket_type_id=_.ticket_type_id),t.comms.ticket_type_selection_mode=typeof _.ticket_type_selection_mode>"u"||null==_.ticket_type_selection_mode||""==_.ticket_type_selection_mode||"Multiple"==_.ticket_type_selection_mode?"Multiple":"Single",typeof _.invitation_id<"u"&&null!=_.invitation_id&&""!=_.invitation_id&&(t.comms.invitation_id=_.invitation_id),typeof _.filter_by_invitation<"u"&&null!=_.filter_by_invitation&&""!=_.filter_by_invitation&&(t.comms.filter_by_invitation=_.filter_by_invitation),typeof _.banner<"u"&&""!=_.banner&&null!=_.banner&&(t.comms.banner=_.banner+"?"+Math.random()),i&&(!0===_.advance_mode?(t.advance_email_editor_active=!0,t.comms.advance_mode=!0,typeof _.template<"u"&&null!=_.template&&typeof _.template.raw<"u"&&"{}"!=_.template.raw&&(t.advance_email_editor_template={},t.advance_email_editor_template.raw=JSON.parse(_.template.raw))):(t.comms.advance_mode=!1,t.advance_email_editor_active=!1)),null!=t.comms.active&&(t.allow_preview=!0),t.comms.email_allow_custom_sender=!!_.email_allow_custom_sender,typeof _.config<"u"&&(t.comms.config=_.config),typeof t.comms.config>"u"&&(t.comms.config={}),(typeof t.comms.config["background-color"]>"u"||null==t.comms.config["background-color"]||""==t.comms.config["background-color"].trim())&&(t.comms.config["background-color"]="#FFFFFF"),"ticket_invite_acceptance_email"==t.correspondance_type&&(console.log(t.comms.config),t.comms.config.calendar_include=null==t.comms.config.calendar_include||"1"==t.comms.config.calendar_include,t.comms.config.calendar_include_ref=null==t.comms.config.calendar_include_ref||"1"==t.comms.config.calendar_include_ref),t.comms.replyto=_.replyto,null==t.comms.replyto&&(t.comms.replyto={}),t.tags=_.tags,t.tags.forEach(l=>{let g={};g.name=l.desc,g.sample="",g.value="{{"+l.tag+"}}",t.advance_email_editor_options.mergeTags[l.tag]=g}),t.loaded=!0,a.dismiss()}catch(_){a.dismiss(),t.common.showNotice(_.message,"danger","top")}}else t.advance_email_editor_active&&(t.loaded=!0,t.loadEmailTemplates())})()}accessMethodChanged(){var n=this;return(0,m.A)(function*(){let t=n.comms.ticket_type_id;for(let i=0;i<t.length;i++){let a=!1;a||("public"==t[i]?a=!0:n.ticket_types.forEach(_=>{_.id==t[i]&&_.access_method==n.comms.access_method&&(a=!0)})),a||(t.splice(i,1),i-=1)}n.comms.ticket_type_id=t,n.ionSelect.value=t,n.ionSelect.disabled=!0,n.ionSelect.disabled=!1})()}resetComms(){var n=this;return(0,m.A)(function*(){n.min_date=Date.now(),n.allow_delete=!1,n.allow_preview=!1,n.readonly=!1,n.tags=[],n.comms={},n.comms.active=!1,n.comms.advance_mode=!1,n.comms.from={},n.comms.replyto={},n.comms.content="",n.comms.send_date=Date.now(),n.comms.banner="assets/img/placeholder_email_banner.png",n.comms.access_method="Combined",n.comms.ticket_type_id=["public"],n.comms.filter_by_invitation="No",n.comms.email_allow_custom_sender=!1,n.c
1omms.config={},n.comms.config["background-color"]="#FFFFFF","Online"==n.event_format&&(n.comms.access_method="Virtual"),"Physical"==n.event_format&&(n.comms.access_method="Physical"),"ticket_invite_acceptance_email"==n.correspondance_type&&(n.comms.config.calendar_include=!0,n.comms.config.calendar_include_ref=!0)})()}deleteComms(){var n=this;return(0,m.A)(function*(){const t=yield n.alertController.create({header:"Delete Email",message:"Are you sure you want to remove the email?",buttons:[{text:"Cancel",role:"cancel"},{text:"Yes, Continue",role:"continue"}]});yield t.present();const{role:i}=yield t.onDidDismiss();if("continue"==i){let a=n.correspondance_type+"|"+n.comms_uid;"reminder"==n.correspondance_type&&(a=n.correspondance_subtype+"|"+n.comms_uid);let _=yield n.api.deleteEventComms(n.event_id,a);"success"==_.status?(n.resetComms(),n.correspondance_subtype="",n.events.publish("comms:changed",{correspondance_type:n.correspondance_type,comms_uid:n.comms_uid}),n.navCtrl.back()):n.common.showNotice(_.reason,"warning","top")}})()}saveComms(){var n=this;return(0,m.A)(function*(t=!1){if(!n.saving){n.saving=!0;try{let a=n.correspondance_type,_=Object.assign({},n.comms);if(n.advance_email_editor_active){_.template={};let l=yield n.email_template_builder.getEmailTemplate();_.template.json=l.raw,_.template.html=l.html,_.template.mjml=l.mjml,_.template=l,_.advance_mode=!0}var i=[];if("reminder"==n.correspondance_type&&((typeof _.send_date>"u"||null==_.send_date||_.send_date<=0)&&i.push("Sending Date and Time"),a=n.correspondance_subtype),(typeof _.title>"u"||null==_.title||""==_.title.trim())&&i.push("Identifiable Name"),(typeof _.from>"u"||typeof _.from.email>"u"||null==_.from.email||""==_.from.email.trim())&&i.push("Sender Email Address"),(typeof _.from>"u"||typeof _.from.name>"u"||null==_.from.name||""==_.from.name.trim())&&i.push("Sender Name"),(typeof _.subject>"u"||null==_.subject||""==_.subject.trim())&&i.push("Email Subject"),(typeof _.content>"u"||null==_.content||""==_.content.trim())&&i.push("Email Contents"),("ticket_invite_reminder"==n.correspondance_subtype||"Yes"==_.filter_by_invitation||"invited"==n.correspondance_status)&&(typeof _.invitation_id>"u"||null==_.invitation_id||""==_.invitation_id.trim())&&i.push("Linked Invitation"),0==i.length){if(-1!=_.banner.indexOf("assets/img/placeholder_email_banner.png")&&(_.banner=""),!n.comms.active){const g=yield n.alertController.create({header:"Email Status",message:"Save email in draft mode or activate for sending!",buttons:[{text:"Draft",role:"cancel"},{text:"Activate",role:"continue"}]});yield g.present();const{role:p}=yield g.onDidDismiss();n.comms.active="continue"==p,_.active=n.comms.active}"new"!=n.comms_uid&&""!=n.comms_uid&&null!=n.comms_uid&&typeof n.comms_uid<"u"&&(_.uid=n.comms_uid),_.send_date=n.comms.send_date/1e3,_.filter_by_status=n.correspondance_status,_.content=n.common.htmlConvertHslToHex(_.content);let l={};l=yield n.api.updateEventComms(n.event_id,a,_),l.status&&("success"==l.status?(n.comms.uid=l.uid,n.comms_uid=n.comms.uid,n.invite_direct_link=window.location.protocol+"//"+window.location.host+"/webinar/"+n.event_id+"/invite_"+n.comms_uid,n.events.publish("comms:changed",{correspondance_type:a,comms_uid:n.comms_uid}),n.allow_preview=!0,t&&n.sendPreview(),n.common.showNotice("Communication details updated!","success","top"),n.allow_delete=!0):n.common.showNotice(l.reason,"danger","top")),n.saving=!1}else n.common.showNotice(1==i.length?"Please enter the following field first : "+i[0]:"Please enter the following fields first : "+i.join(", "),"warning","top"),n.saving=!1}catch(a){n.common.showNotice(a.message,"danger","top"),n.saving=!1}}}).apply(this,arguments)}onFileSelect(n){const t=n.target.files[0];if(t.size<3145728){const a=new FileReader;a.readAsDataURL(t),a.onload=()=>{this.file_selector.nativeElement.value="","image/gif"==t.type?this.comms.banner=a.result:this.cropThumbnail(a.result,2,660)}}else this.common.showNotice("Image uploads should be smaller than 2MB in file size!","warning","top")}dropBanner(){this.comms.banner="assets/img/placeholder_email_banner.png"}cropThumbnail(n){var t=this;return(0,m.A)(function*(i,a=1,_=void 0){const l={};l.aspect_ratio=a,typeof _<"u"&&(l.resize_to_height=_),l.image64=i;const g=yield t.modalCtrl.create({component:F.S,componentProps:{params:l},cssClass:"photo-cropper"});yield g.present(),g.onDidDismiss().then(function(){var p=(0,m.A)(function*(u){typeof u.data.thumbnail<"u"&&(t.comms.banner=yield t.common.resizeImage(u.data.thumbnail),t.allow_preview=!1)});return function(u){return p.apply(this,arguments)}}())}).apply(this,arguments)}changeDetection(n){this.allow_preview=!1}sendPreview(){var n=this;return(0,m.A)(function*(){if(n.allow_preview)yield(yield n.alertController.create({cssClass:"alertbox-400w",header:"Email Preview",inputs:[{name:"value",type:"text",placeholder:"Recipients email address",value:n.session.currentUser.username}],buttons:[{text:"Cancel",role:"cancel",cssClass:"secondary",handler:()=>{console.log("Confirm Cancel")}},{text:"Send Preview",handler:(i=(0,m.A)(function*(a){const _=yield n.loadingController.create({message:"Sending Preview..."});yield _.present();try{let l=n.correspondance_type;"reminder"==l&&(l=n.correspondance_subtype);let g=l+"|"+n.comms_uid;yield n.api.sendEventCommsPreview(n.event_id,g,"email",a.value),n.common.showNotice("Preview Email Sent","success","top"),_.dismiss()}catch(l){_.dismiss(),n.common.showNotice(l.message,"danger","top")}}),function(_){return i.apply(this,arguments)})}]})).present();else{const t=yield n.alertController.create({header:"Unsaved Changes",message:"You have unsaved changes that needs to be saved before a preview can be send!",buttons:[{text:"Cancel",role:"cancel"},{text:"Save & Continue",role:"continue"}]});yield t.present();const{role:i}=yield t.onDidDismiss();"continue"==i&&n.saveComms(!0)}var i})()}copyTag(n){const t=document.createElement("textarea");t.style.position="fixed",t.style.left="0",t.style.top="0",t.style.opacity="0",t.value=n,document.body.appendChild(t),t.focu
1s(),t.select(),document.execCommand("copy"),document.body.removeChild(t),this.common.showNotice("Copied","light","middle",250)}changeInvitation(){this.ticket_types_available=[],this.comms_invites.forEach(n=>{n.uid==this.comms.invitation_id&&typeof n.ticket_types<"u"&&(this.ticket_types_available=n.ticket_types)})}editorLoaded(n){console.log("editorLoaded"),setTimeout(()=>{},1e3)}editorReady(n){console.log("editor is ready!"),typeof this.advance_email_editor_template<"u"&&typeof this.advance_email_editor_template.raw<"u"&&this.email_template_builder.loadTemplate(this.advance_email_editor_template.raw),typeof this.advance_email_editor_template<"u"&&typeof this.advance_email_editor_template.mjml<"u"&&this.email_template_builder.loadTemplate(this.advance_email_editor_template.mjml,"mjml")}exportAdvanceDesign(){}static \u0275fac=function(t){return new(t||o)(e.rXU(h.Ix),e.rXU(h.nX),e.rXU(s.W3),e.rXU(s.hG),e.rXU(s.Xi),e.rXU(k.G),e.rXU(x.h),e.rXU(w.Q),e.rXU(M.s),e.rXU(s.q9),e.rXU(P.Qq),e.rXU(e.gRc))};static \u0275cmp=e.VBU({type:o,selectors:[["app-event-admin-comms-email-builder"]],viewQuery:function(t,i){if(1&t&&(e.GBs(G,5),e.GBs(T,5),e.GBs(N,5)),2&t){let a;e.mGM(a=e.lsd())&&(i.email_template_builder=a.first),e.mGM(a=e.lsd())&&(i.file_selector=a.first),e.mGM(a=e.lsd())&&(i.ionSelect=a.first)}},decls:11,vars:3,consts:[["ticket_type_selector",""],["EmailTemplateBuilder",""],["hiddenfileinput",""],[1,"ion-no-border","subheader"],["slot","start"],[1,"content-page"],[1,"panel"],["class","panel-content",4,"ngIf"],["style","float:right",4,"ngIf"],[1,"panel-content"],[1,"template-grid"],[1,"options-bar"],["class","option-box template custom",3,"click",4,"ngFor","ngForOf"],[1,"option-box","template","custom",3,"click"],[3,"src"],[1,"checkbox"],["name","checkmark-circle","color","secondary"],["scrollable","true",3,"ngModel","ngModelChange",4,"ngIf"],[4,"ngIf"],["scrollable","true",3,"ngModelChange","ngModel"],["value","info"],["value","advance",4,"ngIf"],["value","advance"],[1,"email-title-box"],["class","status-toggle",4,"ngIf"],["size","2",4,"ngIf"],["size","12","size-md","6"],[1,"form_group"],[1,"danger"],["type","text","placeholder","Sender email address","autocapitalize","words","min-length","3","required","",3,"ngModel","readonly","ngModelChange",4,"ngIf"],["id","comms_from_email","name","comms_from_email",3,"ngModel","ngModelChange",4,"ngIf"],["type","text","placeholder","Sender name","autocapitalize","words","min-length","3","required","",3,"ngModelChange","ngModel","readonly"],["type","text","placeholder","Email address for replies, default sender address","autocapitalize","words","min-length","3","required","",3,"ngModelChange","ngModel","readonly"],["type","text","placeholder","Contact name for replies","autocapitalize","words","min-length","3","required","",3,"ngModelChange","ngModel","readonly"],["size","12"],["type","text","placeholder","Subject for Email","autocapitalize","words","min-length","3","required","",3,"ngModelChange","ngModel","readonly"],[1,"status-toggle"],[3,"ngModelChange","ngModel"],[1,"ion-text-center","danger"],["type","text","placeholder","Identifying name for email for future use","autocapitalize","words","min-length","3","required","",3,"ngModelChange","ngModel","readonly"],["size","12","size-md","6","size-lg","4"],["id","access_method","name","access_method","placeholder","Select One","required","",3,"ngModelChange","ionChange","ngModel"],["value","Physical",4,"ngIf"],["value","Virtual",4,"ngIf"],["value","Comb
1ined",4,"ngIf"],["name","ticket_type_id","multiple","true","placeholder","Select One","required","",3,"ngModel","ngModelChange",4,"ngIf"],["size","12","size-md","6","size-lg","4",4,"ngIf"],["value","Physical"],["value","Virtual"],["value","Combined"],["name","ticket_type_id","multiple","true","placeholder","Select One","required","",3,"ngModelChange","ngModel"],["value","public"],[4,"ngFor","ngForOf"],[3,"value",4,"ngIf"],[3,"value"],["name","ticket_type_id","placeholder","Select One","required","",3,"ngModelChange","ngModel"],["value","Multiple"],["value","Single"],["size","2"],["id","filter_by_invitation","name","filter_by_invitation","required","",3,"ngModelChange","ngModel"],["value","No"],["value","Yes"],["placeholder","Select invitation",3,"ngModelChange","ionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],["type","text","placeholder","Identifying name for communication template","autocapitalize","words","min-length","3","required","",3,"ngModelChange","ngModel","readonly"],["placeholder","Select sending date of reminder",3,"valueChange","value","min","readonly","timezone"],["type","text","placeholder","Sender email address","autocapitalize","words","min-length","3","required","",3,"ngModelChange","ngModel","readonly"],["id","comms_from_email","name","comms_from_email",3,"ngModelChange","ngModel"],[3,"onReady"],["id","advance",1,"advance-editor-container"],[3,"editor","config","ngModel","ngStyle","ngModelChange","ready",4,"ngIf"],[1,"color-picker-box"],[1,"color-name"],[1,"avatar"],[2,"font-size","0.9rem","font-weight","600"],[1,"selector"],[1,"color-box"],["cpAlphaChannel","disabled","cpOutputFormat","hex",3,"colorPickerChange","colorPicker"],["readonly","",3,"value"],["size","xsmall","fill","clear",3,"click"],["class","taglist",4,"ngIf"],[3,"ngModelChange","ready","editor","config","ngModel","ngStyle"],[1,"taglist"],[1,"tag-id"],["size","xsmall",3,"click"],[1,"tag-desc"],[1,"image-uploader"],[1,"image",3,"src"],["size","xxsmall","color","light",3,"click",4,"ngIf"],["class","btn-trash","size","xxsmall","color","light",3,"click",4,"ngIf"],["type","file","accept","image/png,image/x-png,image/gif,image/jpeg",2,"display","none",3,"change"],["size","xxsmall","color","light",3,"click"],["size","xxsmall","color","light",1,"btn-trash",3,"click"],["slot","icon-only","name","trash"],[1,"ion-text-center","ion-padding"],["size","3"],["type","text","placeholder","Button value for accept action","autocapitalize","words",3,"ngModelChange","ngModel"],["type","text","placeholder","Button value for decline action","autocapitalize","words",3,"ngModelChange","ngModel"],[1,"combobox"],["color","primary",3,"ngModelChange","ngModel"],[2,"float","right"],["fill","outline",3,"click",4,"ngIf"],["fill","outline",3,"click"],[3,"click",4,"ngIf"],[3,"click"]],template:function(t,i){1&t&&(e.j41(0,"ion-header",3)(1,"ion-toolbar")(2,"ion-buttons",4),e.nrm(3,"ion-menu-button"),e.k0s(),e.j41(4,"ion-title"),e.EFF(5,"Email Builder"),e.k0s()()(),e.j41(6,"ion-content",5)(7,"div",6),e.DNE(8,V,4,1,"div",7)(9,De,4,3,"div",7),e.k0s(),e.DNE(10,Ye,5,2,"div",8),e.k0s()),2&t&&(e.R7$(8),e.Y8G("ngIf","template_selector"==i.segment),e.R7$(),e.Y8G("ngIf","template_selector"!=i.segment),e.R7$(),e.Y8G("ngIf","template_selector"!=i.segment))},dependencies:[f.Sq,f.bT,f.B3,v.BC,v.YS,v.vS,b.h,y.bk,B.P,I,s.Jm,s.QW,s.hU,s.W9,s.lO,s.eU,s.iq,s.$w,s.he,s.MC,s.ln,s.Gp,s.eP,s.Nm,s.Ip,s.BC,s.BY,s.ai,s.hB,s.Je,s.Gw],styles:[".taglist[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:4px 10px}.taglist[_ngcontent-%COMP%] .tag-id[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{color:#c7254e;background-color:#f9f2f4;border-radius:4px;padding:2px 4px;font-size:90%}.image-uploader[_ngcontent-%COMP%]{width:660px;padding-top:0}.email-title-box[_ngcontent-%COMP%]{position:relative}.email-title-box[_ngcontent-%COMP%] .status-toggle[_ngcontent-%COMP%]{position:absolute;right:0;top:0}.oblique[_ngcontent-%COMP%]{font-style:oblique}.advance-editor-container[_ngcontent-%COMP%]{height:700px;min-width:1024px;position:relative}.advance-editor-container[_ngcontent-%COMP%] email-editor[_ngcontent-%COMP%]{height:100%;z-index:1000;position:absolute;inset:0}.template-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,1fr);grid-template-rows:masonry;gap:15px;margin-bottom:16px}.template-grid[_ngcontent-%COMP%] ion-img[_ngcontent-%COMP%]::part(image){border-radius:8px;object-fit:cover;box-shadow:#0000001a 0 1px 2px}.template-grid[_ngcontent-%COMP%] ion-img[_ngcontent-%COMP%]::part(image):hover{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px;cursor:pointer}
1.options-bar[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;gap:10px}.options-bar[_ngcontent-%COMP%] .option-box[_ngcontent-%COMP%]{position:relative;width:calc(25% - 10px);flex-grow:1;display:flex;flex-direction:column;justify-content:center;align-items:center;border-color:#2f30331f;border-radius:4px;border-style:solid;border-width:1px;text-align:center;padding:5px;cursor:pointer;-webkit-user-select:none;user-select:none}.options-bar[_ngcontent-%COMP%] .option-box[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{padding-bottom:8px}.options-bar[_ngcontent-%COMP%] .option-box[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{display:none}.options-bar[_ngcontent-%COMP%] .option-box.template[_ngcontent-%COMP%]{width:calc(33% - 10px)}.options-bar[_ngcontent-%COMP%] .option-box.custom[_ngcontent-%COMP%]{border-style:dashed}.options-bar[_ngcontent-%COMP%] .option-box.active[_ngcontent-%COMP%]{border-color:var(--ion-color-secondary);background:#2f30330d}.options-bar[_ngcontent-%COMP%] .option-box.active[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{display:inline;position:absolute;top:-12px;right:-4px;font-size:24px}.options-bar[_ngcontent-%COMP%] .option-box.active[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{background-color:#f4f5f8;border-radius:50%;font-size:20px}.combobox[_ngcontent-%COMP%]{display:flex;flex-direction:row}.combobox[_ngcontent-%COMP%] ion-toggle[_ngcontent-%COMP%]{margin-top:2px;padding-top:9px;padding-bottom:9px}.combobox[_ngcontent-%COMP%] ion-label[_ngcontent-%COMP%]{font-weight:300;line-height:37px;margin-right:10px;cursor:pointer}"]})}return o})()}];let Se=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=e.$C({type:o});static \u0275inj=e.G2t({imports:[h.iI.forChild(Oe),h.iI]})}return o})();var $e=d(55553);let ze=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=e.$C({type:o});static \u0275inj=e.G2t({imports:[f.MD,v.YN,b.w,y.YG,$e.h,s.bv,Se]})}return o})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.