1"use strict";(self.webpackChunkpf_dash=self.webpackChunkpf_dash||[]).push([[8102],{18102:(gn,X,a)=>{a.r(X),a.d(X,{MarketingSmsModule:()=>mn});var g=a(60177),B=a(93836),mt=a(73837),pt=a(42913),U=a(70612),gt=a(25336),dt=a(19001),ut=a(41813),h=a(7901),ht=a(67376),l=a.n(ht),Y=a(18359),P=a(13443),_=a(17288),b=a(58549),C=a(11585),L=a(24148),A=a(94571),_t=a(21478),z=a(10608),I=a(52973),ft=a(35826),T=a(43879),J=a(68048),H=a(16466),vt=a(38948),t=a(54438),F=a(75351),bt=a(70787),St=a(9310),E=a(15100),Q=a(9959),p=a(9159),y=a(14823),w=a(59115),W=a(88834),R=a(14599),O=a(85029),kt=a(74433),S=a(22895),Mt=a(77352),Ct=a(82526);function xt(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",3)(1,"div",4),t.EFF(2," Toll-Free Number "),t.nrm(3,"span",5),t.k0s(),t.j41(4,"div",6),t.EFF(5),t.j41(6,"pf-copy-button",7),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.copyPhone(i.tollFreeNumber))}),t.k0s()()()}if(2&n){const e=t.XpG();t.R7$(5),t.SpI(" ",e.tollFreeNumber," "),t.R7$(),t.Y8G("xs",!0)}}function Tt(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",8)(1,"div",9),t.qSk(),t.j41(2,"svg",10),t.nrm(3,"circle",11)(4,"path",12),t.k0s(),t.joV(),t.j41(5,"span",13),t.EFF(6),t.k0s(),t.j41(7,"span"),t.EFF(8," SMS Credits"),t.k0s()(),t.j41(9,"div",14)(10,"button",15),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.onAddCreditsClick())}),t.EFF(11," Add Credits "),t.k0s()()()}if(2&n){const e=t.XpG();t.R7$(6),t.JRh(e.smsCredits.toLocaleString())}}let Z=(()=>{class n{constructor(e,o,i,r){this.userService=e,this.phoneNumberService=o,this.router=i,this.dialog=r,this.hideCredits=!1,this.smsCreditsLow=!1,this.isShopifyBudding="ShopifyShop"===l().get(this.userService.userInfo,"shop.type")&&"budding"===l().get(this.userService.userInfo,"subscription.plan.payment_gateway_plan_identifier")}ngOnInit(){const e=this.userService.userInfo;e&&(this.tollFreeNumber=l().get(e,"sms_marketing_account.toll_free_number"),this.tollFreeNumber&&(this.tollFreeNumber=this.phoneNumberService.format(this.tollFreeNumber)),this.longCodeNumber=l().get(e,"sms_marketing_account.long_code_number"),this.longCodeNumber&&(this.longCodeNumber=this.phoneNumberService.format(this.longCodeNumber)),this.smsCredits=this.userService.smsCredits,this.smsCreditsLow=this.userService.smsCreditsIsLow)}copyPhone(e){(0,kt.l)(e)}onAddCreditsClick(){!1!==this.smsOnboardingCompleted?this.router.navigate([S.I.sms_credits_page]):this.showOnboardingFlow()}showOnboardingFlow(){this.router.navigate(["onboarding/sms"],{state:{returnURL:`/${S.I.messaging}/${S.I.sms}`,showSmsOnboarding:!0,showCardSteps:!0}})}static{this.\u0275fac=function(o){return new(o||n)(t.rXU(P.D),t.rXU(Ct.V),t.rXU(h.Ix),t.rXU(F.bZ))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["pf-sms-phone-and-credits"]],inputs:{smsOnboardingCompleted:"smsOnboardingCompleted",hideCredits:"hideCredits"},decls:3,vars:2,consts:[[1,"text-center"],["class","SMS-Phone",4,"ngIf"],["class","SMS-Credits",4,"ngIf"],[1,"SMS-Phone"],[1,"SMS-Phone-Title"],["matTooltip","Your assigned number where U.S. and Canada based customers will text keywords to subscribe and communicate with your brand","matTooltipClass","Tooltip-Box","matTooltipPosition","above",1,"Tooltip","mt-1","ml-1","mr-auto"],[1,"SMS-Phone-Number","conveythis-no-translate"],[1,"ml-2",3,"click","xs"],[1,"SMS-Credits"],[1,"SMS-Credits-Label"],["width","9","height","9","viewBox","0 0 9 9","fill","none","xmlns","http://www.w3.org/2000/svg"],["cx","4.5","cy","4.5","r","4.5","fill","#FFC700"],["d","M4.5 1L5.2858 3.41844H7.8287L5.77145 4.91312L6.55725 7.33156L4.5 5.83688L2.44275 7.33156L3.22855 4.91312L1.1713 3.41844H3.7142L4.5 1Z","fill","white"],[1,"conveythis-no-translate"],[1,"SMS-Credits-Button"],[1,"pf-button","outline","blue","sm",3,"click"]],template:function(o,i){1&o&&(t.j41(0,"div",0),t.DNE(1,xt,7,2,"div",1)(2,Tt,12,1,"div",2),t.k0s()),2&o&&(t.R
17$(),t.Y8G("ngIf",i.tollFreeNumber),t.R7$(),t.Y8G("ngIf",i.isShopifyBudding&&i.smsOnboardingCompleted&&i.smsCreditsLow||!i.isShopifyBudding))},dependencies:[g.MD,g.bT,Mt.z,y.uc,y.oV],styles:[".SMS-Credits[_ngcontent-%COMP%]{display:inline-block}.SMS-Credits-Label[_ngcontent-%COMP%]{text-align:center}.SMS-Credits-Label[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#a5abb3}.SMS-Credits-Label[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:16px;height:16px;margin-top:-4px}.SMS-Credits-Button[_ngcontent-%COMP%]{text-align:center;padding:5px 0}.SMS-Credits-Button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.SMS-Phone[_ngcontent-%COMP%]{display:inline-block;margin:0 30px 10px;min-width:180px}.SMS-Phone-Title[_ngcontent-%COMP%]{text-align:center;color:#a5abb3}.SMS-Phone-Number[_ngcontent-%COMP%]{position:relative;width:100%;padding:6px;margin:4px 0;border-radius:6px;border:1px solid #e6e6e6;text-align:left}.SMS-Phone-Number[_ngcontent-%COMP%] pf-copy-button[_ngcontent-%COMP%]{position:absolute;top:2px;right:2px;opacity:0;background:#fff}.SMS-Phone-Number[_ngcontent-%COMP%]:hover pf-copy-button[_ngcontent-%COMP%]{opacity:1}"]})}}return n})();var K=a(60022);function yt(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",7),t.EFF(1),t.nI1(2,"transloco"),t.j41(3,"a",43),t.bIt("click",function(i){t.eBV(e);const r=t.XpG();return t.Njj(r.renewPhoneRequest(i))}),t.EFF(4),t.nI1(5,"transloco"),t.k0s()()}2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,2,"campaign_plugins.marketing_sms.phone_released_before")," "),t.R7$(3),t.JRh(t.bMT(5,4,"campaign_plugins.marketing_sms.link_support_team")))}function wt(n,s){1&n&&(t.j41(0,"p",44),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"campaign_plugins.marketing_sms.intro_newsletter")," "))}function Pt(n,s){1&n&&(t.j41(0,"p",44),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"campaign_plugins.marketing_sms.intro_reward")," "))}function It(n,s){if(1&n&&(t.j41(0,"p",45),t.EFF(1),t.nI1(2,"transloco"),t.j41(3,"a",46),t.EFF(4),t.nI1(5,"transloco"),t.k0s(),t.EFF(6),t.nI1(7,"transloco"),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.SpI(" ",t.bMT(2,4,"campaign_plugins.marketing_sms.err_phone_field"),""),t.R7$(2),t.Y8G("routerLink",e.pluginUrl+"/fields"),t.R7$(),t.JRh(t.bMT(5,6,"campaign_plugins.marketing_sms.link_here")),t.R7$(2),t.SpI("",t.bMT(7,8,"campaign_plugins.marketing_sms.err_phone_field_after")," ")}}function Ft(n,s){if(1&n&&(t.j41(0,"p",45),t.EFF(1),t.nI1(2,"transloco"),t.j41(3,"a",46),t.EFF(4),t.nI1(5,"transloco"),t.k0s(),t.EFF(6),t.nI1(7,"transloco"),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.SpI(" ",t.bMT(2,4,"campaign_plugins.marketing_sms.err_tcpa"),""),t.R7$(2),t.Y8G("routerLink",e.pluginUrl+"/fields"),t.R7$(),t.JRh(t.bMT(5,6,"campaign_plugins.marketing_sms.link_here")),t.R7$(2),t.SpI("",t.bMT(7,8,"campaign_plugins.marketing_sms.err_tcpa_after")," ")}}function Et(n,s){1&n&&(t.j41(0,"th",47),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"campaign_plugins.marketing_sms.col_schedule"),""))}function Rt(n,s){if(1&n&&(t.j41(0,"td",48),t.nI1(1,"transloco"),t.nrm(2,"one-icon",49),t.j41(3,"b",50),t.EFF(4),t.k0s(),t.j41(5,"small",51),t.EFF(6),t.k0s()()),2&n){const e=s.$implicit;t.BMQ("data-title",t.bMT(1,4,"campaign_plugins.marketing_sms.col_schedule")),t.R7$(2),t.Y8G("name",e.can_destroy?"send":"time-outline"),t.R7$(2),t.JRh(e.type),t.R7$(2),t.JRh(e.schedule_text)}}function Ot(n,s){1&n&&(t.j41(0,"th",47),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"campaign_plugins.marketing_sms.col_text"),""))}function jt(n,s){if(1&n&&(t.j41(0,"td",52),t.nI1(1,"transloco"),t.j41(2,"div",53),t.EFF(3),t.k0s()()),2&n){const e=s.$implicit;t.BMQ("data-title",t.bMT(1,2,"campaign_plugins.marketing_sms.col_text")),t.R7$(3),t.JRh(e.text)}}function $t(n,s){1&n&&(t.j41(0,"th",54),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"campaign_plugins.marketing_sms.col_media"),""))}function Dt(n,s){if(1&n&&t.nrm(0,"img",59),2&n){const e=t.XpG().$implicit;t.BMQ("src",e.media_path,t.B4B)}}function Nt(n,s){if(1&n&&(t.j41(0,"td",55),t.nI1(1,"transloco"),t.j41(2,"div",56),t.nrm(3,"one-icon",57),t.DNE(4,Dt,1,1,"img",58),t.k0s()()),2&n){const e=s.$implicit;t.BMQ("data-title",t.bMT(1,4,"campaign_plugins.marketing_sms.col_media")),t.R7$(2),t.AVh("_has-image",e.attach_media),t.R7$(2),t.Y8G("ngIf",e.attach_media)}}function Gt(n,s){1&n&&(t.j41(0,"th",54),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"campaign_plugins.marketing_sms.col_sent"),""))}
1function Vt(n,s){if(1&n&&(t.j41(0,"td",55),t.nI1(1,"transloco"),t.EFF(2),t.nI1(3,"number"),t.k0s()),2&n){const e=s.$implicit;t.BMQ("data-title",t.bMT(1,2,"campaign_plugins.marketing_sms.col_sent")),t.R7$(2),t.SpI(" ",t.i5U(3,4,e.stats.sent||0,"1.0-0")," ")}}function Xt(n,s){1&n&&(t.j41(0,"th",54),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"campaign_plugins.marketing_sms.col_clicked"),""))}function Bt(n,s){if(1&n&&(t.j41(0,"td",55),t.nI1(1,"transloco"),t.EFF(2),t.nI1(3,"number"),t.k0s()),2&n){const e=s.$implicit;t.BMQ("data-title",t.bMT(1,2,"campaign_plugins.marketing_sms.col_clicked")),t.R7$(2),t.SpI(" ",t.i5U(3,4,e.stats.clicked||0,"1.0-0")," ")}}function Ut(n,s){1&n&&(t.j41(0,"th",54),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"campaign_plugins.marketing_sms.col_revenue"),""))}function Yt(n,s){if(1&n&&(t.j41(0,"td",55),t.nI1(1,"transloco"),t.EFF(2),t.nI1(3,"currency"),t.k0s()),2&n){const e=s.$implicit,o=t.XpG();t.BMQ("data-title",t.bMT(1,2,"campaign_plugins.marketing_sms.col_revenue")),t.R7$(2),t.SpI(" ",t.ii3(3,4,e.stats.revenue||0,o.userCurrency,"symbol","1.2-2")," ")}}function Lt(n,s){1&n&&(t.j41(0,"th",54),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"campaign_plugins.marketing_sms.col_cost"),""))}function At(n,s){if(1&n&&(t.j41(0,"td",55),t.nI1(1,"transloco"),t.EFF(2),t.nI1(3,"currency"),t.k0s()),2&n){const e=s.$implicit,o=t.XpG();t.BMQ("data-title",t.bMT(1,2,"campaign_plugins.marketing_sms.col_cost")),t.R7$(2),t.SpI(" ",t.ii3(3,4,e.stats.cost||0,o.userCurrency,"symbol","1.2-2")," ")}}function zt(n,s){1&n&&(t.j41(0,"th",54),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"campaign_plugins.marketing_sms.col_roi"),""))}function Jt(n,s){if(1&n&&(t.j41(0,"td",55),t.nI1(1,"transloco"),t.EFF(2),t.nI1(3,"percent"),t.k0s()),2&n){const e=s.$implicit;t.BMQ("data-title",t.bMT(1,2,"campaign_plugins.marketing_sms.col_roi")),t.R7$(2),t.SpI(" ",t.i5U(3,4,e.stats.roi||0,"1.2-2")," ")}}function Ht(n,s){1&n&&(t.j41(0,"th",60),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"campaign_plugins.marketing_sms.col_status"),""))}function Qt(n,s){if(1&n&&(t.j41(0,"span",64),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit;t.Y8G("matTooltip",e.status_tooltip),t.R7$(),t.JRh(e.status_label||e.status)}}function Wt(n,s){if(1&n&&t.EFF(0),2&n){const e=t.XpG().$implicit;t.SpI(" ",e.status_label||e.status," ")}}function Zt(n,s){if(1&n&&(t.j41(0,"td",61),t.nI1(1,"transloco"),t.j41(2,"span",62),t.DNE(3,Qt,2,2,"span",63)(4,Wt,1,1,"ng-template",null,1,t.C5r),t.k0s()()),2&n){const e=s.$implicit,o=t.sdS(5),i=t.XpG();t.BMQ("data-title",t.bMT(1,7,"campaign_plugins.marketing_sms.col_status")),t.R7$(2),t.AVh("_sending",e.status===i.smsSendingStatus.Sending)("_paused",e.status===i.smsSendingStatus.Paused),t.R7$(),t.Y8G("ngIf",e.status_tooltip)("ngIfElse",o)}}function Kt(n,s){1&n&&t.nrm(0,"th",47)}function qt(n,s){if(1&n){const e=t.RV6();t.j41(0,"button",75),t.bIt("click",function(){t.eBV(e);
1const i=t.XpG().$implicit,r=t.XpG();return t.Njj(r.toggleActive(!1,i.id))}),t.nrm(1,"one-icon",76),t.EFF(2),t.nI1(3,"transloco"),t.k0s()}2&n&&(t.R7$(2),t.SpI(" ",t.bMT(3,1,"campaign_plugins.marketing_sms.menu_deactivate")," "))}function te(n,s){if(1&n){const e=t.RV6();t.j41(0,"button",75),t.bIt("click",function(){t.eBV(e);const i=t.XpG().$implicit,r=t.XpG();return t.Njj(r.toggleActive(!0,i.id,i))}),t.nrm(1,"one-icon",77),t.EFF(2),t.nI1(3,"transloco"),t.k0s()}2&n&&(t.R7$(2),t.SpI(" ",t.bMT(3,1,"campaign_plugins.marketing_sms.menu_activate")," "))}function ee(n,s){if(1&n){const e=t.RV6();t.j41(0,"button",78),t.bIt("click",function(){t.eBV(e);const i=t.XpG().$implicit,r=t.XpG();return t.Njj(r.deleteMail(i.id))}),t.nrm(1,"one-icon",79),t.EFF(2),t.nI1(3,"transloco"),t.k0s()}2&n&&(t.R7$(2),t.SpI(" ",t.bMT(3,1,"campaign_plugins.marketing_sms.menu_delete")," "))}function ne(n,s){1&n&&(t.j41(0,"span",80),t.nI1(1,"transloco"),t.nrm(2,"one-icon",81),t.k0s()),2&n&&t.Y8G("matTooltip",t.bMT(1,1,"campaign_plugins.marketing_sms.tooltip_customize_sms"))}function ie(n,s){if(1&n){const e=t.RV6();t.j41(0,"button",82),t.nI1(1,"transloco"),t.bIt("click",function(){t.eBV(e);
1const i=t.XpG().$implicit,r=t.XpG();return t.Njj(r.deleteMail(i.id))}),t.nrm(2,"one-icon",79),t.k0s()}2&n&&t.Y8G("matTooltip",t.bMT(1,1,"campaign_plugins.marketing_sms.tooltip_delete"))}function oe(n,s){if(1&n){const e=t.RV6();t.j41(0,"td",65)(1,"button",66),t.nrm(2,"one-icon",67),t.k0s(),t.j41(3,"mat-menu",null,2),t.DNE(5,qt,4,3,"button",68)(6,te,4,3,"button",68)(7,ee,4,3,"button",69),t.j41(8,"button",70),t.bIt("click",function(){const i=t.eBV(e).$implicit,r=t.XpG();return t.Njj(r.openEditor(i.id))}),t.nrm(9,"one-icon",71),t.EFF(10),t.nI1(11,"transloco"),t.k0s()(),t.DNE(12,ne,3,3,"span",72)(13,ie,3,3,"button",73),t.j41(14,"button",74),t.nI1(15,"transloco"),t.bIt("click",function(){const i=t.eBV(e).$implicit,r=t.XpG();return t.Njj(r.openEditor(i.id))}),t.nrm(16,"one-icon",71),t.k0s()()}if(2&n){const e=s.$implicit,o=t.sdS(4);t.R7$(),t.Y8G("matMenuTriggerFor",o)("disableRipple",!0),t.R7$(4),t.Y8G("ngIf",e.active),t.R7$(),t.Y8G("ngIf",!e.active),t.R7$(),t.Y8G("ngIf",e.can_destroy),t.R7$(3),t.SpI(" ",t.bMT(11,9,"campaign_plugins.marketing_sms.menu_edit")," "),t.R7$(2),t.Y8G("ngIf",e.show_publish_warning),t.R7$(),t.Y8G("ngIf",e.can_destroy),t.R7$(),t.Y8G("matTooltip",t.bMT(15,11,"campaign_plugins.marketing_sms.tooltip_edit"))}}function se(n,s){1&n&&t.nrm(0,"th",47)}function ae(n,s){if(1&n){const e=t.RV6();t.j41(0,"button",86),t.nI1(1,"transloco"),t.bIt("click",function(){t.eBV(e);
1const i=t.XpG().$implicit,r=t.XpG();return t.Njj(r.toggleActive(!1,i.id))}),t.nrm(2,"one-icon",76),t.k0s()}2&n&&t.Y8G("matTooltip",t.bMT(1,1,"campaign_plugins.marketing_sms.tooltip_deactivate"))}function re(n,s){if(1&n){const e=t.RV6();t.j41(0,"button",87),t.nI1(1,"transloco"),t.bIt("click",function(){t.eBV(e);const i=t.XpG().$implicit,r=t.XpG();return t.Njj(r.toggleActive(!0,i.id,i))}),t.nrm(2,"one-icon",77),t.k0s()}2&n&&t.Y8G("matTooltip",t.bMT(1,1,"campaign_plugins.marketing_sms.tooltip_activate"))}function le(n,s){if(1&n&&(t.j41(0,"td",83),t.DNE(1,ae,3,3,"button",84)(2,re,3,3,"button",85),t.k0s()),2&n){const e=s.$implicit;t.R7$(),t.Y8G("ngIf",e.active),t.R7$(),t.Y8G("ngIf",!e.active)}}function ce(n,s){1&n&&t.nrm(0,"tr",88)}function me(n,s){1&n&&t.nrm(0,"tr",89)}function pe(n,s){if(1&n&&(t.j41(0,"tr",90)(1,"td",91),t.nrm(2,"img",92),t.k0s()()),2&n){const e=t.XpG();t.R7$(),t.BMQ("colspan",e.displayedColumns.length)}}let ge=(()=>{class n{constructor(e,o,i,r,c,d,v,k,x,u,M,D,N,G,V){this.userService=e,this.route=o,this.router=i,this.dialog=r,this.crispService=c,this.store=d,this.marketingSmsService=v,this.shopifyService=k,this.campaignDataService=x,this.sideMenuValidityService=u,this.smsService=M,this.crispTimeoutService=D,this.snackbarService=N,this.smsPhoneNumberVerificationService=G,this.transloco=V,this.subscription=new Y.yU,this.userCurrency="USD",this.displayedColumns=["type","text","media_path","sent","clicked","cost","revenue","roi","status","actions","statusChange"],this.overLimit=!1,this.smsSendingStatus=b.Gr,this.smsOnboardingPassed=!1,this.marketingSmsValid=!0,this.smsTcpaValid=!0,this.campaignPluginName=_.Np,this.pluginUrl="",this.isShopifyBudding=!1,this.phoneReleased=!1}ngOnInit(){const e=this.userService.userInfo,o=this.userService.userUsageInfo;this.isShopifyBudding="ShopifyShop"===l().get(e,"shop.type")&&"budding"===l().get(e,"subscription.plan.payment_gateway_plan_identifier"),this.subscription.add(this.campaignDataService.asObservable().subscribe(i=>{this.campaign=i,this.pluginType=this.route.snapshot.data.pluginType,this.hideDisplayedColumns(this.pluginType),this.marketingSmsService.pluginType=this.pluginType,this.overLimit=l().get(o,"over_account_usage_limit",!1),this.fetch()})),this.subscription.add(this.sideMenuValidityService.asObservable().subscribe(i=>{for(const r of i)r.label===z.Xu.MarketingSMS&&(this.marketingSmsValid="marketing_sms_without_phone_field"!==r.errorType),r.label===z.Xu.MarketingSMS&&(this.smsTcpaValid="marketing_sms_without_tcpa_enabled"!==r.errorType)})),this.pluginUrl=this.parsePluginUrl(),this.crispTimeoutService.crispTimeout||this.crispTimeoutService.setCrispTimeoutIfNeeded(T.n.PopupFlow),this.phoneReleased=this.userService?.phoneReleased}hideDisplayedColumns(e){e===_.Np.NewsLetterNotification&&(this.displayedColumns=this.displayedColumns.filter(o=>"revenue"!==o&&"roi"!==o))}parsePluginUrl(){const e=this.router.url.split("/");return e.pop(),e.join("/")}fetch(){this.subscription.add(this.smsService.onboardingPassed().subscribe(e=>{this.smsOnboardingPassed=e,this.loadTable()}))}loadTable(){this.subscription.add(this.marketingSmsService.getTableData(this.overLimit).subscribe(e=>{this.tableData=e,"sms-onboarding"===l().get(this.route.snapshot,"queryParams.src")&&(this.smsOnboardingPassed=!0,l().get(this.route.snapshot,"queryParams.activate")&&e.find(o=>o.id===l().get(this.route.snapshot,"queryParams.activate"))&&this.toggleActive(!0,l().get(this.route.snapshot,"queryParams.activate")),l().get(this.route.snapshot,"queryParams.new")&&this.openEditor(),this.router.navigate([],{queryParams:{src:null,new:null,activate:null},queryParamsHandling:"merge"}))}))}redirectToSmsOnboarding(e=""){const o=l().get(history,"state.returnURL",null)||this.router.url;this.router.navigate(["/onboarding/sms"],{state:{showSmsOnboarding:!0,pluginId:null,returnURL:o+e}})}toggleActive(e,o,i){if(!this.smsOnboardingPassed)return this.redirectToSmsOnboarding(`?activate=${o}`),!1;this.smsPhoneNumberVerificationService.numberUnverified?this.smsPhoneNumberVerificationService.showUnverifiedMessage():i&&i?._created_at===i?._updated_at?this.showWarningBasedOnDevice(o):o?this.subscription.add(this.marketingSmsService.updateMarketingSms(o,{id:o,active:e}).subscribe(r=>{this.loadTable(),this.store.dispatch(new L.gv(this.campaign.id))})):alert(this.transloco.translate("campaign_plugins.marketing_sms.alert_contact_support"))}showWarningBasedOnDevice(e){/iPhone|iPod|Android/i.test(navigator.userAgent)||(this.tableData=this.tableData.map(i=>(i.id===e&&(i.show_publish_warning=!0),i))),this.snackbarService.showError({text:this.transloco.translate("campaign_plugins.marketing_sms.snackbar_customize_text"),title:this.transloco.translate("campaign_plugins.marketing_sms.snackbar_customize_title"),duration:5e3})}deleteMail(e){if(!this.smsOnboardingPassed)return this.redirectToSmsOnboarding(),!1;const o=this.marketingSmsService.confirmDeleteModal();this.subscription.add(o.afterClosed().subscribe(i=>{i&&(e?this.subscription.add(this.marketingSmsService.deleteMarketingSms(e).subscribe(r=>{this.loadTable(),this.store.dispatch(new L.gv(this.campaign.id))})):alert(this.transloco.translate("campaign_plugins.marketing_sms.alert_contact_support")))}))}openEditor(e){if(!this.smsOnboardingPassed)return this.redirectToSmsOnboarding(e?`/${e}`:"?new=true"),!1;this.router.navigate([e?`./${e}`:"./new"],{relativeTo:this.route})}
1renewPhoneRequest(e){e.preventDefault();const o=this.crispService.getCrisp();o&&(o.push(["do","chat:open"]),o.push(["do","message:send",["text",this.transloco.translate("campaign_plugins.marketing_sms.crisp_renew_toll_free")]]))}showPhoneReleasedWarningModal(){if(this.dialog?.openDialogs?.length&&"phone-released-warning"===this.dialog.openDialogs[0].id)return;const e=this.dialog.open(vt.B,{width:"400px",id:"phone-released-warning",data:{title:this.transloco.translate("campaign_plugins.marketing_sms.phone_expired_modal_title"),text:this.transloco.translate("campaign_plugins.marketing_sms.phone_expired_modal_text"),acceptButton:{text:this.transloco.translate("campaign_plugins.marketing_sms.contact_support"),classes:"pf-button filled black w-100"},footerClass:"mb-0 p-0"}});this.subscription.add(e.afterClosed().subscribe(o=>{o&&this.renewPhoneRequest({preventDefault:()=>{}})}))}ngOnDestroy(){this.subscription.unsubscribe()}static{this.\u0275fac=function(o){return new(o||n)(t.rXU(P.D),t.rXU(h.nX),t.rXU(h.Ix),t.rXU(F.bZ),t.rXU(bt.h),t.rXU(St.il),t.rXU(C.d),t.rXU(ft.Gy),t.rXU(I.c),t.rXU(_t.c),t.rXU(A.X),t.rXU(T.R),t.rXU(J.G),t.rXU(H.t),t.rXU(E.JO))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["pf-marketing-sms"]],inputs:{coupons:"coupons"},standalone:!1,features:[t.Jv_([C.d])],decls:62,vars:17,consts:[["rewardText",""],["statusWithoutTooltip",""],["menu","matMenu"],[1,"_local-controls"],[3,"campaign","pluginName"],[1,"Card","_local-card","pt-0","pb-0"],[1,"Card-Body","pt-0"],[1,"_phone-released"],[1,"PluginConfig-Title"],[1,"row","py-3"],[1,"col-6"],["class","pl-4",4,"ngIf","ngIfElse"],[1,"col-6","_local-border-line"],[1,"_local-sms-info"],[3,"smsOnboardingCompleted"],["class","_local-error-msg",4,"ngIf"],["mat-table","",1,"pt-3","w-100","pf-table",3,"dataSource"],["matColumnDef","type"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","class","Schedule-Cell",4,"matCellDef"],["matColumnDef","text"],["mat-cell","",4,"matCellDef"],["matColumnDef","media_path"],["mat-header-cell","","class","text-center",4,"matHeaderCellDef"],["mat-cell","","class","text-center conveythis-no-translate",4,"matCellDef"],["matColumnDef","sent"],["matColumnDef","clicked"],["matColumnDef","revenue"],["matColumnDef","cost"],["matColumnDef","roi"],["matColumnDef","status"],["mat-header-cell","","class","text-left",4,"matHeaderCellDef"],["mat-cell","","class","text-left",4,"matCellDef"],["matColumnDef","actions"],["mat-cell","","data-title","","class","text-right",4,"matCellDef"],["matColumnDef","statusChange"],["mat-cell","","data-title","","class","text-left",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","mat-row _no-data-row",4,"matNoDataRow"],[1,"text-center","pt-3","pb-3"],[1,"pf-button","filled","blue",3,"click"],["name","add"],["href","#",3,"click"],[1,"pl-4"],[1,"_local-error-msg"],[3,"routerLink"],["mat-header-cell",""],["mat-cell","",1,"Schedule-Cell"],[1,"Schedule-Cell-Icon",3,"name"],[1,"text-primary"],[1,"Schedule-Cell-Description"],["mat-cell",""],[1,"_line-clamp","conveythis-no-translate"],["mat-header-cell","",1,"text-center"],["mat-cell","",1,"text-center","conveythis-no-translate"],[1,"_image-preview-wrap"],["name","image-outline"],["class","_image-preview","alt","",4,"ngIf"],["alt","",1,"_image-preview"],["mat-header-cell","",1,"text-left"],["mat-cell","",1,"text-left"],[1,"Dot"],["class","Tooltip-Dots","matTooltipPosition","above",3,"matTooltip",4,"ngIf","ngIfElse"],["matTooltipPosition","above",1,"Tooltip-Dots",3,"matTooltip"],["mat-cell","","data-title","",1,"text-right"],["mat-icon-button","",1,"pf-options-button","ml-2","my-1","_mobile-visible",3,"matMenuTriggerFor","disableRipple"],["name","ellipsis-horizontal"],["mat-menu-item","","class","_mobile-visible",3,"click",4,"ngIf"],["mat-menu-item","",3,"click",4,"ngIf"],["mat-menu-item","","cdkOverlayOrigin","",3,"click"],["name","pencil"],["class","mt-1 mb-1 ml-2 mr-2","matTooltipPosition","above","matTooltipClass","Tooltip-Box",3,"matTooltip",4,"ngIf"],["class","pf-button outline red xs mt-1 mb-1 mr-2","matTooltipClass","Tooltip-Box","matTooltipPosition","above",3,"matTooltip","click",4,"ngIf"],["cdkOverlayOrigin","","matTooltipClass","Tooltip-Box","matTooltipPosition","above",1,"pf-button","outline","blue","xs","mr-2","mt-1","mb-1","text-nowrap",3,"click","matTooltip"],["mat-menu-item","",1,"_mobile-visible",3,"click"],["name","pause"],["name","play"],["mat-menu-item","",3,"click"],["name","trash-outline"],["matTooltipPosition","above","matTooltipClass","Tooltip-Box",1,"mt-1","mb-1","ml-2","mr-2",3,"matTooltip"],["name","alert-circle-outline",1,"_warning-icon"],["matTooltipClass","Tooltip-Box","matTooltipPosition","above",1,"pf-button","outline","red","xs","mt-1","mb-1","mr-2",3,"click","matTooltip"],["mat-cell","","data-title","",1,"text-left"],["class","pf-button outline red xs mt-1 mb-1","matTooltipClass","Tooltip-Box","matTooltipPosition","above",3,"matTooltip","click",4,"ngIf"],["class","pf-button outline green xs mt-1 mb-1","matTooltipClass","Tooltip-Box","matTooltipPosition","above",3,"matTooltip","click",4,"ngIf"],["matTooltipClass","Tooltip-Box","matTooltipPosition","above",1,"pf-button","outline","red","xs","mt-1","mb-1",3,"click","matTooltip"],["matTooltipClass","Tooltip-Box","matTooltipPosition","above",1,"pf-button","outline","green","xs","mt-1","mb-1",3,"click","matTooltip"],["mat-header-row",""],["mat-row",""],[1,"mat-row","_no-data-row"],[1,"mat-cell","text-center"],["src","/app_assets/campaigns-list/no-campaigns-image.svg","alt","",1,"_no-data-img"]],template:function(o,i){if(1&o){const r=t.RV6();t.j41(0,"div",3),t.nrm(1,"pf-breadcrumbs")(2,"one-plugin-header-buttons",4),t.k0s(),t.j41(3,"div",5)(4,"div",6),t.DNE(5,yt,6,6,"div",7),t.j41(6,"h5",8),t.EFF(7),t.nI1(8,"transloco"),t.k0s(),t.j41(9,"div",9)(10,"div",10),t.DNE(11,wt,3,3,"p",11)(12,Pt,3,3,"ng-template",null,0,t.C5r),t.k0s(),t.j41(14,"div",12)(15,"div",13),t.nrm(16,"pf-sms-phone-and-credits",14),t.k0s()()(),t.DNE(17,It,8,10,"p",15)(18,Ft,8,10,"p",15),t.j41(19,"table",16),t.qex(20,17),t.DNE(21,Et,3,3,"th",18)(22,Rt,7,6,"td",19),t.bVm(),t.qex(23,20),t.DNE(24,Ot,3,3,"th",18)(25,jt,4,4,"td",21),t.bVm(),t.qex(26,22),t.DNE(27,$t,3,3,"th",23)(28,Nt,5,6,"td",24),t.bVm(),t.qex(29,25),t.DNE(30,Gt,3,3,"th",23)(31,Vt,4,7,"td",24),t.bVm(),t.qex(32,26),t.DNE(33,Xt,3,3,"th",23)(34,Bt,4,7,"td",24),t.bVm(),t.qex(35,27),t.DNE(36,Ut,3,3,"th",23)(37,Yt,4,9,"td",24),t.bVm(),t.qex(38,28),t.DNE(39,Lt,3,3,"th",23)(40,At,4,9,"td",24),t.bVm(),t.qex(41,29),t.DNE(42,zt,3,3,"th",23)(43,Jt,4,7,"td",24),t.bVm(),t.qex(44,30),t.DNE(45,Ht,3,3,"th",31)(46,Zt,6,9,"td",32),t.bVm(),t.qex(47,33),t.DNE(48,Kt,1,0,"th",18)(49,oe,17,13,"td",34),t.bVm(),t.qex(50,35),t.DNE(51,se,1,0,"th",18)(52,le,3,2,"td",36),t.bVm(),t.DNE(53,ce,1,0,"tr",37)(54,me,1,0,"tr",38)(55,pe,3,1,"tr",39),t.k0s(),t.j41(56,"div",40)(57,"button",41),t.bIt("click",function(){return t.eBV(r),t.Njj(i.openEditor())}),t.nrm(58,"one-icon",42),t.EFF(59),t.nI1(60,"transloco"),t.k0s()(),t.nrm(61,"pf-loading-overlay"),t.k0s()()}if(2&o){const r=t.sdS(13);t.R7$(2),t.Y8G("campaign",i.campaign)("pluginName",i.pluginType),t.R7$(3),t.vxM(i.phoneReleased?5:-1),t.R7$(2),t.JRh(t.bMT(8,13,"campaign_plugins.marketing_sms.title")),t.R7$(4),t.Y8G("ngIf",i.pluginType===i.campaignPluginName.NewsLetterNotification)("ngIfElse",r),t.R7$(5),t.Y8G("smsOnboardingCompleted",i.smsOnboardingPassed),t.R7$(),t.Y8G("ngIf",!i.marketingSmsValid),t.R7$(),t.Y8G("ngIf",!i.smsTcpaValid),t.R7$(),t.Y8G("dataSource",i.tableData),t.R7$(34),t.Y8G("matHeaderRowDef",i.displayedColumns),t.R7$(),t.Y8G("matRowDefColumns",i.displayedColumns),t.R7$(5),t.SpI(" ",t.bMT(60,15,"campaign_plugins.marketing_sms.add_new_schedule"),"")}},dependencies:[g.bT,h.Wk,Q.m,p.Zl,p.tL,p.ji,p.cC,p.YV,p.iL,p.KS,p.$R,p.YZ,p.NB,p.ky,y.oV,w.kk,w.fb,w.Cp,W.iY,R.$,O.q,Z,K.d,g.QX,g.m1,g.oe,E.Kj],styles:['[_ngcontent-%COMP%]:root{--color-primary: #14a5ff;--color-green: #20b57a;--color-success: #50d73f;--color-success-alt: #29cd8c;--color-danger: #ff4c6a;--color-warning: #ffa100;--color-info: #17a2b8;--color-secondary: #a5abb3;--color-primary-new: #14a5ff;--color-secondary-alt: #798c99;--color-secondary-alt-2: #dfe3ea;--color-shopify-indigo: #5c6ac4;--color-shopify-purple: #8463fd;--color-one-purple: #7f5cff;--color-shopify-blue: #006fbb;--color-shopify-green: #298160;--color-shopify-darkgreen: #020303;--color-shopify-red: #bf0711;--page-padding: 12px;--banner-height: 52px;--header-height: 42px;--sidenav-width: 60px;--bdrs: 8px;--sidenav-full-width: 200px;--separator: #ebeef2;
1--box-shadow-grey: #dfe3eb;--box-shadow-lightgrey: #0f263414;--dark-separator: #dbe0e7;--link-color: #005c97;--preview-container-background: #dadee3;--campaign-navigation-color: #7c8c98;--control-subtitle-invert-text: #0095f7;--eye-icon-hover-background: #a5abb3;--eye-icon-hover-text: #fff;--eye-icon-active-background: #6c757d;--eye-icon-active-text: #fff;--common-text-primary: #2a2a2a;--common-text-secondary: #555;--white: #fff;--black: #000;--grey: #c4c4c4;--breakpoint-sm: 576px;--breakpoint-md: 768px;--breakpoint-lg: 992px;--breakpoint-xl: 1200px;--font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}[_nghost-%COMP%]{display:block;height:100%}._local-controls[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 300px}@media screen and (max-width: 600px){._local-controls[_ngcontent-%COMP%]{grid-template-columns:1fr;margin-bottom:10px}}.mat-table[_ngcontent-%COMP%]{width:100%;border-top:1px solid #e6e6e6}.mat-table[_ngcontent-%COMP%] .mat-cell[_ngcontent-%COMP%]{padding:5px}.mat-table[_ngcontent-%COMP%] .pf-button[_ngcontent-%COMP%]{white-space:nowrap}.mat-table[_ngcontent-%COMP%] .mat-column-text[_ngcontent-%COMP%]{line-height:1.4em;word-break:break-word;
1min-width:200px;max-width:590px}.mat-table[_ngcontent-%COMP%] .mat-column-text[_ngcontent-%COMP%] ._line-clamp[_ngcontent-%COMP%]{position:relative;overflow:hidden;max-height:2.8em}.mat-table[_ngcontent-%COMP%] .mat-column-text[_ngcontent-%COMP%] ._line-clamp[_ngcontent-%COMP%]:after{content:"";text-align:right;position:absolute;top:1.4em;right:0;width:70%;height:1.4em;background:linear-gradient(to right,#fff0,#fff 50%)}.mat-table[_ngcontent-%COMP%] .mat-column-type[_ngcontent-%COMP%]{width:205px}.mat-table[_ngcontent-%COMP%] .mat-column-actions[_ngcontent-%COMP%]{white-space:nowrap}.mat-table[_ngcontent-%COMP%] .mat-column-revenue[_ngcontent-%COMP%], .mat-table[_ngcontent-%COMP%] .mat-column-cost[_ngcontent-%COMP%], .mat-table[_ngcontent-%COMP%] .mat-column-roi[_ngcontent-%COMP%]{width:100px;white-space:nowrap}.mat-table[_ngcontent-%COMP%] .mat-column-sent[_ngcontent-%COMP%], .mat-table[_ngcontent-%COMP%] .mat-column-clicked[_ngcontent-%COMP%], .mat-table[_ngcontent-%COMP%] .mat-column-status[_ngcontent-%COMP%]{width:80px}.mat-table[_ngcontent-%COMP%] .actions-buttons[_ngcontent-%COMP%]{width:170px}._image-preview-wrap[_ngcontent-%COMP%]{width:35px;height:35px;position:relative;font-size:20px;line-height:36px;color:#ccc}._image-preview-wrap[_ngcontent-%COMP%] ._image-preview[_ngcontent-%COMP%]{display:none;max-width:200px;pointer-events:none}._image-preview-wrap._has-image[_ngcontent-%COMP%]{cursor:pointer;color:#0095f7}._image-preview-wrap._has-image[_ngcontent-%COMP%]:hover ._image-preview[_ngcontent-%COMP%]{position:absolute;display:block;border-radius:3px;box-shadow:0 0 1px 1px #00000026,0 17px 30px #00000080;z-index:11}.Schedule-Cell[_ngcontent-%COMP%]{position:relative;padding-left:30px!important}.Schedule-Cell-Icon[_ngcontent-%COMP%]{position:absolute;left:5px;top:14px;font-size:21px;color:#4cc783}.Schedule-Cell-Description[_ngcontent-%COMP%]{color:#666;display:block}._local-error-msg[_ngcontent-%COMP%]{padding:8px 12px;font-size:14px;border-radius:4px;color:#000;background-color:#fff2f2;border:1px solid #e24446}._local-error-msg[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#0082d3}._local-sms-info[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:center;align-items:center;padding-left:30px}._local-border-line[_ngcontent-%COMP%]{position:relative}._local-border-line[_ngcontent-%COMP%]:before{content:"";width:1px;height:100%;position:absolute;left:15px;top:0;background:#e6e6e6}._local-card[_ngcontent-%COMP%]{max-height:calc(100% - 76px);overflow-x:hidden;padding:0 20px}._local-card[_ngcontent-%COMP%]{scrollbar-width:thin;scrollbar-color:#babec8 #f7f9fc}._local-card[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px;height:6px}._local-card[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#f7f9fc}._local-card[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background-color:#babec8;border-radius:6px}@media screen and (max-width: 600px){._local-card[_ngcontent-%COMP%]{max-height:none}}._warning-icon[_ngcontent-%COMP%]{color:#ff4c6a;font-size:24px}@media screen and (max-width: 600px){._local-dot[_ngcontent-%COMP%]{width:100%}.Schedule-Cell-Description[_ngcontent-%COMP%]{grid-column:2}.Schedule-Cell-Icon[_ngcontent-%COMP%]{display:none}}._disabled[_ngcontent-%COMP%]{opacity:.5;cursor:default;pointer-events:none}._phone-released[_ngcontent-%COMP%]{color:#fff;background:red;padding:10px 24px;margin:0 -20px}._phone-released[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#000!important;text-decoration:underline!important}']})}}return n})();var de=a(12369),f=a(49969),ue=a(97586),q=a.n(ue),he=a(45312),_e=a(990),fe=a(21799),tt=a(99848),et=a(50321),j=a(28607),ve=a(77801),be=a(46672),Se=a.n(be),nt=a(26557),ke=a(90386),Me=a(61335),it=a(24754),m=a(89417),Ce=a(85636),xe=a(96789),Te=a(92529),$=a(92314),ye=a(3902),we=a(95593);const Pe=["quillSMSTextEditor"],Ie=()=>["uploadFile","marketing-sms-send-test"],Fe=n=>({ignore:n}),Ee=()=>["uploadFile"],Re=n=>({only:n});function Oe(n,s){if(1&n&&(t.j41(0,"option",36),t.EFF(1),t.k0s()),2&n){const e=s.$implicit;t.Y8G("value",e.value),t.R7$(),t.JRh(e.label)}}
1function je(n,s){if(1&n&&(t.j41(0,"div",39),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2).$implicit;t.R7$(),t.Lme(" Please select a value between ",e.errors.minValue," and ",e.errors.maxValue," ")}}function $e(n,s){1&n&&(t.j41(0,"div",39),t.EFF(1," Can't be blank "),t.k0s())}function De(n,s){1&n&&(t.j41(0,"div",39),t.EFF(1," Invalid value "),t.k0s())}function Ne(n,s){if(1&n&&(t.qex(0),t.DNE(1,je,2,2,"div",38)(2,$e,2,0,"div",38)(3,De,2,0,"div",38),t.bVm()),2&n){const e=t.XpG().$implicit;t.R7$(),t.Y8G("ngIf",!e.errors.required&&(e.errors.min||e.errors.max)),t.R7$(),t.Y8G("ngIf",e.errors.required),t.R7$(),t.Y8G("ngIf",e.errors.invalid)}}function Ge(n,s){if(1&n&&(t.qex(0),t.j41(1,"label"),t.EFF(2,"Day(s)"),t.k0s(),t.nrm(3,"input",37),t.DNE(4,Ne,4,3,"ng-container",13),t.bVm()),2&n){const e=s.$implicit;t.R7$(3),t.Y8G("positiveIntegers",!0),t.R7$(),t.Y8G("ngIf",e.invalid&&e.dirty)}}function Ve(n,s){if(1&n&&(t.j41(0,"div",31),t.DNE(1,Ge,5,2,"ng-container",13),t.k0s()),2&n){const e=t.XpG(3);t.R7$(),t.Y8G("ngIf",e.form.get("scheduling_value"))}}function Xe(n,s){if(1&n&&(t.qex(0),t.j41(1,"option",48),t.EFF(2),t.k0s(),t.bVm()),2&n){const e=s.$implicit,o=t.XpG(5);t.R7$(),t.Y8G("value",e.value)("disabled",o.timeDisabled(e.value)),t.R7$(),t.JRh(e.label)}}function Be(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",42)(1,"div",43)(2,"label"),t.EFF(3,"Date"),t.k0s(),t.j41(4,"input",44,1),t.bIt("focus",function(){t.eBV(e);const i=t.sdS(7);return t.Njj(i.open())}),t.k0s(),t.j41(6,"mat-datepicker",45,2),t.bIt("closed",function(){t.eBV(e);const i=t.sdS(5);return t.Njj(i.blur())}),t.k0s()(),t.j41(8,"div",43)(9,"label"),t.EFF(10,"Time"),t.k0s(),t.j41(11,"select",46),t.bIt("change",function(){t.eBV(e);const i=t.XpG(4);return t.Njj(i.formsHelperService.updateValueAndValidityAll(i.form))}),t.DNE(12,Xe,3,3,"ng-container",47),t.k0s()()()}if(2&n){const e=s.$implicit,o=t.sdS(7),i=t.XpG(4);t.R7$(4),t.AVh("is-invalid",e.dirty&&e.invalid),t.Y8G("min",i.minDate)("matDatepicker",o),t.R7$(7),t.AVh("is-invalid",e.dirty&&e.invalid),t.R7$(),t.Y8G("ngForOf",i.timeOptions)}}function Ue(n,s){1&n&&(t.j41(0,"div",39),t.EFF(1," Please make sure an SMS is scheduled for a future date before saving! "),t.k0s())}function Ye(n,s){if(1&n&&(t.qex(0),t.DNE(1,Ue,2,0,"div",38),t.bVm()),2&n){const e=t.XpG().$implicit;t.R7$(),t.Y8G("ngIf",e.errors.pastDate)}}function Le(n,s){if(1&n&&(t.j41(0,"div"),t.DNE(1,Ye,2,1,"ng-container",13),t.k0s()),2&n){const e=s.$implicit;t.R7$(),t.Y8G("ngIf",e.invalid&&e.dirty)}}function Ae(n,s){if(1&n&&(t.j41(0,"div",40),t.DNE(1,Be,13,7,"div",41)(2,Le,2,1,"div",13),t.k0s()),2&n){const e=t.XpG(3);t.R7$(),t.Y8G("ngIf",e.form.get("scheduling_date")),t.R7$(),t.Y8G("ngIf",e.form.get("scheduling_date"))}}function ze(n,s){if(1&n&&(t.qex(0),t.j41(1,"div",31)(2,"label"),t.EFF(3,"Sends on"),t.k0s(),t.j41(4,"select",32),t.DNE(5,Oe,2,2,"option",33),t.k0s()(),t.DNE(6,Ve,2,1,"div",34)(7,Ae,3,2,"div",35),t.bVm()),2&n){const e=t.XpG(2);t.R7$(5),t.Y8G("ngForOf",e.schedulingMethodOptions),t.R7$(),t.Y8G("ngIf",e.form.value.scheduling_method===e.schedulingMethods.AfterSignup),t.R7$(),t.Y8G("ngIf",e.form.value.scheduling_method===e.schedulingMethods.Fixed)}}function Je(n,s){1&n&&(t.qex(0),t.j41(1,"div",31),t.EFF(2," Sends immediately after signup "),t.k0s(),t.bVm())}function He(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",49)(1,"div",50),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.removeMediaClick())}),t.EFF(2,"\xd7"),t.k0s(),t.nrm(3,"img",51),t.k0s()}if(2&n){const e=t.XpG(2);t.R7$(3),t.BMQ("src",e.form.value.media_path,t.B4B)}}function Qe(n,s){1&n&&(t.j41(0,"div",62),t.EFF(1," SMS Text can't be blank "),t.k0s())}function We(n,s){if(1&n&&(t.qex(0),t.DNE(1,Qe,2,0,"div",61),t.bVm()),2&n){const e=t.XpG().$implicit;t.R7$(),t.Y8G("ngIf",e.errors.required)}}function Ze(n,s){if(1&n&&(t.j41(0,"span",63)(1,"code"),t.EFF(2),t.k0s(),t.EFF(3),t.k0s()),2&n){const e=s.$implicit,o=s.last;t.R7$(2),t.SpI("#",e.value,""),t.R7$(),t.SpI("",o?"":", "," ")}}function Ke(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",52)(1,"pf-sms-text-editor",53,3),t.bIt("changed",function(i){t.eBV(e);const r=t.XpG(2);return t.Njj(r.textEditorChanged(i))}),t.k0s(),t.j41(3,"input",54),t.bIt("aiText",function(i){t.eBV(e);const r=t.XpG(2);return t.Njj(r.aiTextChange(i))}),t.k0s(),t.DNE(4,We,2,1,"ng-container",13),t.j41(5,"p",55),t.EFF(6," Type "),t.j41(7,"strong"),t.EFF(8,"#"),t.k0s(),t.EFF(9," symbol to select from available variables:\xa0 "),t.nrm(10,"br"),t.DNE(11,Ze,4,2,"span",56),t.k0s(),t.j41(12,"div",57)(13,"div",58),t.EFF(14,"NOTE"),t.k0s(),t.j41(15,"div",59)(16,"small"),t.EFF(17),t.j41(18,"a",60),t.EFF(19,"Configure Link Shortening"),t.k0s()()()()()}if(2&n){const e=s.$implicit,o=t.XpG(2);t.R7$(),t.AVh("is-invalid",e.dirty&&e.errors),t.Y8G("tags",o.tags),t.R7$(2),t.Y8G("isQuill",!0)("topLabelPadding",20),t.R7$(),t.Y8G("ngIf",e.dirty&&e.errors),t.R7$(7),t.Y8G("ngForOf",o.tags),t.R7$(6),t.SpI("Links will be shortened to https://",o.shortUrlDomain,"/XXXXXX to change go to "),t.R7$(),t.Y8G("routerLink",o.settingsUrl)}}
1function qe(n,s){if(1&n){const e=t.RV6();t.j41(0,"form",19)(1,"h5",20),t.EFF(2,"Schedule"),t.k0s(),t.qex(3,21),t.DNE(4,ze,8,3,"ng-container",22)(5,Je,3,0,"ng-container",22),t.bVm(),t.j41(6,"h5",20),t.EFF(7,"Image (U.S. recipients only) "),t.k0s(),t.j41(8,"div",23)(9,"p"),t.EFF(10,"Attach GIF to your message"),t.k0s(),t.DNE(11,He,4,1,"div",24),t.j41(12,"button",25),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.addMediaClick())}),t.EFF(13),t.k0s(),t.j41(14,"div",26)(15,"label",27),t.EFF(16," Choose file "),t.j41(17,"input",28),t.bIt("change",function(i){t.eBV(e);const r=t.XpG();return t.Njj(r.uploadMediaClick(i))}),t.k0s()()(),t.nrm(18,"pf-loading-overlay",29),t.k0s(),t.j41(19,"h5",20),t.EFF(20,"Message"),t.k0s(),t.DNE(21,Ke,20,9,"div",30),t.k0s()}if(2&n){const e=t.XpG();t.Y8G("formGroup",e.form),t.R7$(3),t.Y8G("ngSwitch",e.form.get("type").value),t.R7$(),t.Y8G("ngSwitchCase",e.marketingSmsType.ScheduledMarketingSMS),t.R7$(),t.Y8G("ngSwitchCase",e.marketingSmsType.AutoResponderMarketingSMS),t.R7$(6),t.Y8G("ngIf",e.form.value.attach_media),t.R7$(2),t.SpI(" ",e.form.value.attach_media?"CHANGE GIF":"SELECT GIF"," "),t.R7$(5),t.Y8G("isFixed",!1)("filter",t.eq3(10,Re,t.lJ4(9,Ee))),t.R7$(3),t.Y8G("ngIf",e.form.get("text"))}}function tn(n,s){if(1&n&&(t.qex(0),t.nrm(1,"img",51),t.bVm()),2&n){const e=t.XpG(2);t.R7$(),t.BMQ("src",e.form.value.media_path,t.B4B)}}function en(n,s){if(1&n&&(t.j41(0,"pf-phone-preview-message"),t.nrm(1,"quill-view-html",65),t.k0s()),2&n){const e=s.$implicit;t.R7$(),t.Y8G("content",e)}}function nn(n,s){if(1&n&&(t.qex(0),t.DNE(1,en,2,1,"pf-phone-preview-message",47),t.bVm()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("ngForOf",e.messagePreview)}}function on(n,s){if(1&n&&(t.qex(0),t.DNE(1,tn,2,1,"ng-container",13)(2,nn,2,1,"ng-container",64),t.bVm()),2&n){const e=t.XpG(),o=t.sdS(38);t.R7$(),t.Y8G("ngIf",e.form.value.attach_media),t.R7$(),t.Y8G("ngIf",e.marketingSmsService.rewardCode.code||e.pluginType===e.campaignPluginName.NewsLetterNotification)("ngIfElse",o)}}function sn(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",66)(1,"span",39),t.EFF(2,"You need to select a reward before you can schedule an SMS! "),t.k0s(),t.nrm(3,"br"),t.j41(4,"button",67),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.goToRewards())}),t.EFF(5,"Select a Reward"),t.k0s()()}}let an=(()=>{class n extends ve.k{constructor(e,o,i,r,c,d,v,k,x,u,M,D,N,G,V,pn){super(),this.dialog=e,this.formsHelperService=o,this.marketingSmsService=i,this.router=r,this.smsService=c,this.fb=d,this.hostRef=v,this.userService=k,this.newCouponCodesService=x,this.snackbarService=u,this.route=M,this.footerNavService=D,this.emailValidationService=N,this.campaignDataService=G,this.crispTimeoutService=V,this.smsPhoneNumberVerificationService=pn,this.onSmsSaved=new t.bkB,this.animationState="enter",this.subscription=new Y.yU,this.messagePreview=[],this.canDestroy=!0,this.schedulingMethodOptions=[{value:b.PO.Fixed,label:"Specific Date"},{value:b.PO.AfterSignup,label:"Days After Signup"}],this.timeOptions=[],this.schedulingMethods=b.PO,this.smsData=this.route.snapshot.data.smsData,this.marketingSmsId=this.smsData.id,this.marketingSmsType=b.sv,this.campaignPluginName=_.Np,this.previewCouponParams={code:it.E.randomString(8),title:""},this.tags=[],this.shortUrlDomain="",this.minDate=new Date,this.settingsUrl=`/${S.I.messaging}/${S.I.sms}/${S.I.settings}`,this.messageDetails={},this.messageMockDetails={},this.footerNavService.navigationVisible$.next(!1),this.marketingSmsService.pluginType=this.smsData.pluginType,this.smsData.pluginType!==_.Np.NewsLetterNotification&&this.marketingSmsService.setReward(this.smsData.coupons,this.smsData.giftCards),this.crispTimeoutService.clearCrispTimeout()}get campaign(){return this.smsData.campaign}get pluginType(){return this.smsData.pluginType}get plugin(){return this.campaign[this.pluginType]}ngOnInit(){this.crispTimeoutService.setCrispTimeoutIfNeeded(T.n.SMSFlow),this.shortUrlDomain=this.marketingSmsService.getShortUrlDomain(),this.defaultText=this.marketingSmsService.getDefaultText();const e=this.smsData.smsData;e?this.initForm(e):this.initForm(),this.initializeTags()}sendTest(){const e=this.form.getRawValue(),o=this.emailValidationService.smsLinkCheck(this.form.getRawValue().text);if(o.result)if(this.marketingSmsService.checkBalance()){let i=null;this.smsData.pluginType!==_.Np.NewsLetterNotification&&(i=this.marketingSmsService.reward),this.marketingSmsService.sendTestModal(e,this.marketingSmsId,i)}else{const i=this.marketingSmsService.creditsWarningModal();this.subscription.add(i.afterClosed().subscribe(r=>{r&&this.router.navigate([S.I.sms_credits_page])}))}else this.emailValidationService.showLinkWarningModal(o,!1,"sms")}initializeTags(){this.tags=this.marketingSmsService.getTags();let e=null;switch(this.pluginType){case _.Np.FortuneWheel:case _.Np.NewsLetterNotification:case _.Np.CouponBoxNotification:e=this.plugin.config.form_config.name}if(e)switch(e.format){case"full":e.first_name.is_required&&this.tags.push({id:4,value:"subscriber.first_name"}),e.last_name.is_required&&this.tags.push({id:5,value:"subscriber.last_name"});break;case"first":e.first_name.is_required&&this.tags.push({id:4,value:"subscriber.first_name"});break;case"last":e.last_name.is_required&&this.tags.push({id:4,value:"subscriber.last_name"})}}initForm(e){const o=q()().add(1,"days").toDate();let i=0;e&&e.scheduling_date&&(i=new Date(e.scheduling_date).getHours()+new Date(e.scheduling_date).getMinutes()/60),this.canDestroy=l().get(e,"can_destroy",!0),this.form=this.fb.group({scheduling_method:[l().get(e,"scheduling_method",b.PO.AfterSignup)],scheduling_value:[e?l().get(e,"scheduling_value",1):1,[tt.O.requiredFor("scheduling_method",[b.PO.AfterSignup]),tt.O.depen
1dantMinMax("scheduling_method",{[b.PO.AfterSignup]:{min:1,max:365}})]],scheduling_date:[e?new Date(l().defaultTo(e.scheduling_date,o)):o,[j.R.date()]],time:[i,[j.R.date()]],is_auto_responder:[l().get(e,"can_destroy",!1)],text:[l().get(e,"text",this.defaultText),[j.R.messageText()]],ai_text:[l().cloneDeep(l().get(e,"text",this.defaultText))],attach_media:[l().get(e,"attach_media",!1)],media_path:[l().get(e,"media_path",null)],type:[l().get(e,"type",this.marketingSmsType.ScheduledMarketingSMS)],active:[l().get(e,"active",!0)]}),this._initialFormValue=this.form.getRawValue(),this.updateTimeOptions(),this.updateMessagePreview(),this.setSavableData(),this.subscription.add(this.form.valueChanges.subscribe(r=>{this.checkIfChanged()})),this.subscription.add(this.form.get("attach_media").valueChanges.subscribe(()=>{this.updateMessagePreview()}))}updateMessagePreview(){if(this.form){const e=this.form.getRawValue().text,o=this.marketingSmsService.renderMessagePreview(e,!0);this.previewCouponParams={...this.previewCouponParams,title:this.marketingSmsService.reward?.title||""};const i=l().get(this.userService.userInfo,"shop.short_store_url");let r=l().get(this.userService.userInfo,"shop.store_url","");const c={company:{name:l().get(this.userService.userInfo,"profile.company","Apple Inc")},reward:this.previewCouponParams,coupon:this.previewCouponParams,shop:{url:i||r}},d=ke.render(e.replace(this.emailValidationService.smsLinkRegex,u=>this.smsService.mockShortLink(u)),c);this.messageDetails=(0,nt.Go)(o,this.form.value.attach_media),this.messageMockDetails=(0,nt.Go)(`${d}\n\nText STOP to opt out`,this.form.value.attach_media);const k={validate:(u,M)=>"email"!==M,format:(u,M)=>"url"===M?this.smsService.mockShortLink(u):u},x=this.messageDetails.messagePreview.map(u=>Se()(u,k));this.messagePreview=x}}navigateBack(){this.animationState="leave",this.router.navigate([".."],{relativeTo:this.route})}removeMediaClick(){this.form.patchValue({attach_media:!1,media_path:""})}addMediaClick(){const e=this.dialog.open(_e.S,{width:"70vw",maxWidth:"1440px"});this.subscription.add(e.afterClosed().subscribe(o=>{o&&this.subscription.add(this.marketingSmsService.processGiphySelected(o).subscribe(i=>{this.onSaveMedia(i)}))}))}uploadMediaClick(e){this.subscription.add(this.marketingSmsService.processImageUpload(e).subscribe(o=>{o.message?this.snackbarService.showWarning({text:o.message}):this.onSaveMedia(o.file)}))}onSaveMedia(e){this.subscription.add(this.marketingSmsService.saveMedia(e,o=>{this.form.patchValue({attach_media:!0,media_path:`https://${he.c.firebase.cdnUrl}/${o.fullPath}`})}).subscribe())}save(e=!0){const o=this.emailValidationService.smsLinkCheck(this.form.getRawValue().text);if(!o.result)return void this.emailValidationService.showLinkWarningModal(o,!1,"sms");if(this.formsHelperService.touchAll(this.form),this.formsHelperService.updateValueAndValidityAll(this.form),this.form.invalid)return this.logger.error("Marketing-Sms-Editor","invalid controls:",this.formsHelperService.getInvalidControls(this.form)),this.hostRef.nativeElement.scroll(0,0),!1;const i=this.form.getRawValue(),r=q()(i.scheduling_date,"M/D/YYYY").startOf("day");if(r.add(i.time,"hour"),i.scheduling_date=r.format(),delete i.time,i?.ai_text&&delete i.ai_text,this.marketingSmsId)this.subscription.add(this.marketingSmsService.updateMarketingSms(this.marketingSmsId,i).subscribe(c=>{this.campaignDataService.refreshCampaign(),this.setSavableData(),this.checkIfChanged(),this.snackbarService.showSuccess({title:"Saved",text:"SMS Automation"}),e&&this.navigateBack()},c=>{this.handleError(c.error)}));else{if(this.smsPhoneNumberVerificationService.numberUnverified)return void this.smsPhoneNumberVerificationService.showUnverifiedMessage();this.subscription.add(this.marketingSmsService.createMarketingSms(i).subscribe(c=>{this.campaignDataService.refreshCampaign(),this.setSavableData(),this.checkIfChanged(),this.snackbarService.showSuccess({title:"Created",text:"SMS Automation"}),e&&this.navigateBack()},c=>{this.handleError(c.error)}))}}handleError(e){this.logger.error("Marketing-Sms-Editor",e);let o=l().get(e,"message","Something went wrong");if("Found restricted message content"===o)return void this.snackbarService.showError({title:"Alert",text:"Unable to save, please message our Live Chat to help resolve"},{crisp:!0,send:"Hello team, I need help saving my SMS template, I received an error message.",show:"Can you please send us a screenshot of your SMS template so I can investigate this for you?"});const i=l().get(e,"errors",[]);i&&i.length>0&&i[0].field&&-1!==i[0].field.indexOf("media_file_size")&&(o="The GIF you selected is too large, must be less than 525kb"),this.snackbarService.showError({text:o})}goToRewards(){let e="";this.pluginType===_.Np.CouponBoxNotification&&(e=this.marketingSmsService.getPluginStepLink("reward")),this.pluginType===_.Np.FortuneWheel&&(e=this.marketingSmsService.getPluginStepLink("rewards")),this.router.navigate([e])}textEditorChanged(e){this.form.get("text").patchValue(e.formValue.trimEnd()),this.form.get("ai_text").patchValue(e.formValue.trimEnd()),this.updateMessagePreview()}aiTextChange(e){this.form.get("text").patchValue(e),this.quillSMSTextEditor&&this.quillSMSTextEditor.setText(e)}updateTimeOptions(){const e=this.form.get("scheduling_date").value,o=this.form.get("time").value;this.timeOptions=this.marketingSmsService.timeOptions(e);const i=this.timeOptions.find(r=>r.value===o);i&&i.disabled&&this.form.get("time").patchValue(null)}timeDisabled(e){const o=this.form.value.scheduling_date,i=new Date;return!(o>i)&&e<i.getHours()+i.getMinutes()/60}ngOnDestroy(){this.subscription.unsubscribe(),this.snackbarService.dismiss(),this.footerNavService.navigationVisible$.next(!0),this.crispTimeoutService.clearCrispTimeout()}setSavableData(){this.storeSavableData(this.form.getRawValue())}checkIfChanged(){this.compareSavableData(this.form.getRawValue())}static{this.\u0275fac=function(o){return new(o||n)(t.rXU(F.bZ),t.rXU(et.z),t.rXU(C.d),t.rXU(h.Ix),t.rXU(A.X),t.rXU(m.ze),t.rXU(t.aKT),t.rXU(P.D),t.rXU(it.E),t.rXU(J.G),t.rXU(h.nX),t.rXU(Ce.F),t.rXU(Me.j),t.rXU(I.c),t.rXU(T.R),t.rXU(H.t))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["ng-component"]],viewQuery:function(o,i){if(1&o&&t.GBs(Pe,5),2&o){let r;t.mGM(r=t.lsd())&&(i.quillSMSTextEditor=r.first)}},outputs:{onSmsSaved:"onSmsSaved"},standalone:!1,features:[t.Jv_([et.z,C.d]),t.Vt3],decls:39,vars:10,consts:[["couponError",""],["dateInput",""],["datePicker",""],["quillSMSTextEditor",""],[1,"L-MarketingSMS"],[1,"L-MarketingSMS-Content","Card","pt-0"],["class","MarketingSMS-Form",3,"formGroup",4,"ngIf"],[1,"d-flex","justify-content-between","mt-4"],[1,"pf-button","outline","gray",3,"click"],[1,"pf-button","filled","blue",3,"click"],[1,"L-MarketingSMS-Aside"],[1,"_sticky-wrap"],["head",""],[4,"ngIf"],[1,"text-center","mt-3","_test-button"],[1,"pf-button","sm","outline","blue",3,"click"],["name","send-outline"],[1,"L-MarketingSMS-Message-Details","Card"],[3,"filter"],[1,"MarketingSMS-Form",3,"formGroup"],[1,"PluginConfig-Subtitle"],[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"PluginConfig-Line",2,"position","relative"],["class","MarketingSMS-Media",4,"ngIf"],[1,"pf-button","filled","sm","blue",3,"click"],[1,"file-input-wrap"],[1,"pf-button","filled","sm","blue"],["type","file","accept","image/gif, image/jpeg, image/png",1,"file-input","my-2",3,"change"],[3,"isFixed","filter"],["class","PluginConfig-Line _local-sms-container",4,"ngIf"],[1,"PluginConfig-Line"],["formControlName","scheduling_method",1,"form-control"],[3,"value",4,"ngFor","ngForOf"],["class","PluginConfig-Line",4,"ngIf"],["class","PluginConfig-Line _double",4,"ngIf"],[3,"value"],["type","number","formControlName","scheduling_value","min","1","max","365","step","1",1,"form-control",3,"positiveIntegers"],["class","text-danger",4,"ngIf"],[1,"text-danger"],[1,"PluginConfig-Line","_double"],["class","PluginConfig-Control _double",4,"ngIf"],[1,"PluginConfig-Control","_double"],[1,"PluginConfig-Control-Input"],["type","text","placeholder","Date","formControlName","scheduling_date",1,"form-control",3,"focus","min","matDatepicker"],[3,"closed"],["formControlName","time",1,"form-control",3,"change"],[4,"ngFor","ngForOf"],[3,"value","disabled"],[1,"MarketingSMS-Media"],[1,"MarketingSMS-Media-Remove",3,"click"],["alt",""],[1,"PluginConfig-Line","_local-sms-container"],["formControlName","text",3,"changed","tags"],["oneAI","","type","hidden","formControlName","ai_text",3,"aiText","isQuill","topLabelPadding"],[1,"mt-2"],["class","MarketingSMS-Mention-Sample",4,"ngFor","ngForOf"],[1,"Tip"],[1,"Tip__Title"],[1,"Tip__Body"],["fragment","sms_app_messaging",3,"routerLink"],["class","text-danger mt-2 mb-4",4,"ngIf"],[1,"text-danger","mt-2","mb-4"],[1,"MarketingSMS-Mention-Sample"],[4,"ngIf","ngIfElse"],[3,"content"],[1,"Card"],[1,"pf-button","outline","xs","blue","mt-2",3,"click"]],template:function(o,i){if(1&o){const r=t.RV6();t.j41(0,"div",4)(1,"div",5),t.DNE(2,qe,22,12,"form",6),t.nrm(3,"hr"),t.j41(4,"div",7)(5,"button",8),t.bIt("click",function(){return t.eBV(r),t.Njj(i.navigateBack())}),t.EFF(6,"CANCEL"),t.k0s(),t.j41(7,"button",9),t.bIt("click",function(){return t.eBV(r),t.Njj(i.save())}),t.EFF(8,"SAVE"),t.k0s()()(),t.j41(9,"div",10)(10,"div",11)(11,"pf-phone-preview")(12,"div",12),t.EFF(13,"Message Preview"),t.k0s(),t.DNE(14,on,3,3,"ng-container",13),t.k0s(),t.j41(15,"div",14)(16,"button",15),t.bIt("click",function(){return t.eBV(r),t.Njj(i.sendTest())}),t.nrm(17,"one-icon",16),t.EFF(18," SEND TEST "),t.k0s()(),t.j41(19,"div",17)(20,"div"),t.EFF(21,"Total Characters: "),t.j41(22,"b"),t.EFF(23),t.k0s()(),t.j41(24,"div"),t.EFF(25,"Number of Segments: "),t.j41(26,"b"),t.EFF(27),t.k0s()(),t.j41(28,"div"),t.EFF(29,"Characters till next Part: "),t.j41(30,"b"),t.EFF(31),t.k0s()(),t.j41(32,"div"),t.EFF(33,"Encoding: "),t.j41(34,"b"),t.EFF(35),t.k0s()()()()()(),t.nrm(36,"pf-loading-overlay",18),t.DNE(37,sn,6,0,"ng-template",null,0,t.C5r)}
12&o&&(t.R7$(2),t.Y8G("ngIf",i.form),t.R7$(12),t.Y8G("ngIf",i.form),t.R7$(9),t.JRh(i.messageMockDetails.totalChars),t.R7$(4),t.JRh(i.messageMockDetails.numberOfParts),t.R7$(4),t.JRh(i.messageMockDetails.charsTillNextPart),t.R7$(4),t.JRh(i.messageMockDetails.encoding),t.R7$(),t.Y8G("filter",t.eq3(8,Fe,t.lJ4(7,Ie))))},dependencies:[g.Sq,g.bT,g.ux,g.e1,h.Wk,m.qT,m.xH,m.y7,m.me,m.Q0,m.wz,m.BC,m.cb,m.VZ,m.zX,m.j4,m.JD,fe.k,U.pQ,xe.Y,Te.N,$.Vh,$.bZ,ye.p,R.$,O.q,we.s],styles:['[_ngcontent-%COMP%]:root{--color-primary: #14a5ff;--color-green: #20b57a;--color-success: #50d73f;--color-success-alt: #29cd8c;--color-danger: #ff4c6a;--color-warning: #ffa100;--color-info: #17a2b8;--color-secondary: #a5abb3;--color-primary-new: #14a5ff;--color-secondary-alt: #798c99;--color-secondary-alt-2: #dfe3ea;--color-shopify-indigo: #5c6ac4;--color-shopify-purple: #8463fd;--color-one-purple: #7f5cff;--color-shopify-blue: #006fbb;--color-shopify-green: #298160;--color-shopify-darkgreen: #020303;--color-shopify-red: #bf0711;--page-padding: 12px;--banner-height: 52px;--header-height: 42px;--sidenav-width: 60px;--bdrs: 8px;--sidenav-full-width: 200px;--separator: #ebeef2;--box-shadow-grey: #dfe3eb;--box-shadow-lightgrey: #0f263414;--dark-separator: #dbe0e7;--link-color: #005c97;--preview-container-background: #dadee3;--campaign-navigation-color: #7c8c98;--control-subtitle-invert-text: #0095f7;--eye-icon-hover-background: #a5abb3;--eye-icon-hover-text: #fff;--eye-icon-active-background: #6c757d;--eye-icon-active-text: #fff;--common-text-primary: #2a2a2a;--common-text-secondary: #555;--white: #fff;--black: #000;--grey: #c4c4c4;--breakpoint-sm: 576px;--breakpoint-md: 768px;--breakpoint-lg: 992px;--breakpoint-xl: 1200px;--font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}[_nghost-%COMP%]{width:100%;height:100vh;overflow-y:auto;background:#f6f6f7}[_nghost-%COMP%]{scrollbar-width:thin;scrollbar-color:#babec8 #f7f9fc}[_nghost-%COMP%]::-webkit-scrollbar{width:6px;height:6px}[_nghost-%COMP%]::-webkit-scrollbar-track{background:#f7f9fc}[_nghost-%COMP%]::-webkit-scrollbar-thumb{background-color:#babec8;border-radius:6px} .linkified{cursor:pointer}.file-input-wrap[_ngcontent-%COMP%]{display:inline-block;margin-left:5px;height:38px}.file-input-wrap[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{position:relative;cursor:pointer;text-transform:uppercase}.file-input-wrap[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .file-input[_ngcontent-%COMP%]{position:absolute;z-index:-1;opacity:0;top:6px;width:1px;left:0;font-size:15px;color:#999}input[type=text].is-invalid[_ngcontent-%COMP%], input[type=number].is-invalid[_ngcontent-%COMP%]{background-image:none!important;padding-right:.75rem}.L-MarketingSMS[_ngcontent-%COMP%]{width:100%;max-width:900px;margin:0 auto;padding-top:20px;display:grid;grid-template-columns:1fr 264px;grid-gap:30px;padding-bottom:200px}.L-MarketingSMS-Message-Details[_ngcontent-%COMP%]{display:grid;gap:8px;width:265px;margin-top:16px}@media screen and (max-width: 600px){.L-MarketingSMS-Message-Details[_ngcontent-%COMP%]{margin:16px auto}}.L-MarketingSMS-Content[_ngcontent-%COMP%]{align-self:start}.L-MarketingSMS-Aside[_ngcontent-%COMP%] ._sticky-wrap[_ngcontent-%COMP%]{position:sticky;top:20px}.L-MarketingSMS-Aside[_ngcontent-%COMP%] pf-phone-preview[_ngcontent-%COMP%]{display:block;width:265px}.MarketingSMS-Textarea[_ngcontent-%COMP%]{width:100%;padding:10px;font-size:14px;border-color:#ddd;border-radius:3px}.MarketingSMS-Mention-Preview[_ngcontent-%COMP%]{display:inline-block;width:auto;height:auto;padding:3px;border-radius:3px;margin:1px 3px 3px 0;-webkit-user-select:none;user-select:none;-webkit-user-drag:element;cursor:move}.MarketingSMS-Mention-Sample[_ngcontent-%COMP%]{display:inline-block;width:auto;height:auto;background:transparent;white-space:pre-wrap}.MarketingSMS-Mention-Sample[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{color:#af4c4c}.MarketingSMS-Media[_ngcontent-%COMP%]{position:relative;padding:10px;max-width:300px;margin-bottom:15px;border-radius:6px;box-shadow:0 1px 4px #0003}.MarketingSMS-Media-Preview[_ngcontent-%COMP%]{border-radius:6px;height:auto;width:100%}.MarketingSMS-Media[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-radius:inherit;height:auto;width:100%}.MarketingSMS-Media-Remove[_ngcontent-%COMP%]{position:absolute;width:24px;height:24px;top:-10px;right:-10px;line-height:18px;font-size:22px;text-align:center;cursor:pointer;color:#ddd;border-radius:50%;border:1px solid #ddd;background:#fff;transition:color .18s}.MarketingSMS-Media-Remove[_ngcontent-%COMP%]:hover{color:#333}'],data:{animation:[(0,f.hZ)("animateContent",[(0,f.wk)("void",(0,f.iF)({transform:"translate3d(0, 15%, 0) scale(0.9)",opacity:0}
1)),(0,f.wk)("enter",(0,f.iF)({transform:"none",opacity:1})),(0,f.wk)("leave",(0,f.iF)({transform:"translate3d(0, 15%, 0)",opacity:0})),(0,f.kY)("* => *",(0,f.i0)("180ms cubic-bezier(0.25, 0.8, 0.25, 1)"))])]}})}}return n})();var ot=a(57609),st=a(27468),at=a(983),rt=a(96354),lt=a(99437);let ct=(()=>{class n{constructor(e,o,i){this.campaignDataService=e,this.marketingSmsApiService=o,this.marketingSmsService=i}resolve(e,o){const i=this.campaignDataService.get(),r=e.data.pluginType,c=e.params.id;return"new"===c?(0,st.p)([this.marketingSmsService.getCouponCodes(),this.marketingSmsService.getGiftCardCodes()]).pipe((0,rt.T)(([d,v])=>({campaign:i,pluginType:r,coupons:d,giftCards:v})),(0,lt.W)(d=>(alert("Oops! Something went wrong, please contact support"),at.w))):(0,st.p)([this.marketingSmsApiService.get(i.id,r,c),this.marketingSmsService.getCouponCodes(),this.marketingSmsService.getGiftCardCodes()]).pipe((0,rt.T)(([d,v,k])=>({smsData:d,campaign:i,pluginType:r,id:c,coupons:v,giftCards:k})),(0,lt.W)(d=>(alert("Oops! Something went wrong, please contact support"),at.w)))}static{this.\u0275fac=function(o){return new(o||n)(t.KVO(I.c),t.KVO(B.$),t.KVO(C.d))}}static{this.\u0275prov=t.jDH({token:n,factory:n.\u0275fac})}}return n})();const rn=[{path:"",component:ge,canDeactivate:[de.D]},{path:":id",component:an,canDeactivate:[ot.n],resolve:{smsData:ct},data:{hide_sidebar:!0}}];let ln=(()=>{class n{static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275mod=t.$C({type:n})}static{this.\u0275inj=t.G2t({imports:[h.iI.forChild(rn),h.iI]})}}return n})();var cn=a(61864);let mn=(()=>{class n{static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275mod=t.$C({type:n})}static{this.\u0275inj=t.G2t({providers:[B.$,gt.J,ot.n,C.d,ct],imports:[g.MD,pt.A,h.iI,m.X1,ln,dt.E,U.Qs.forRoot(),ut.j,mt.V,Q.m,cn.Y$,$.X6,p.tP,y.uc,w.Cn,W.Hl,R.$,O.q,Z,K.d,E.Q8]})}}return n})()}}]);
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.