1import {p as pi$1}from'./chunk-B-gWABRN.js';import {p as pt,a as ae,n as ne}from'./chunk-CXwkcFVQ.js';import {D as De,A as An}from'./chunk-CMY6ORGi.js';import'./chunk-Bxl27lcM.js';import'./chunk-C-lyK5Qx.js';import'./chunk-BzNPcjRa.js';import'./chunk-CACymUhk.js';import'./chunk-Ez8SfW3_.js';import'./chunk-Bt8GECJV.js';import'./chunk-dfa3XG8n.js';import'./chunk-C4oFsH3m.js';import'./chunk-DNMLJcNH.js';import'./chunk-CwfahFTW.js';import {m as mi$1}from'./chunk-exGq3Fsx.js';import'./chunk-swNbBqwZ.js';import {t}from'./chunk-Bxzd0hMT.js';import {s}from'./chunk-C-PyjSCj.js';import {W}from'./chunk-CF84gehD.js';import {$ as $t}from'./chunk-DB9hkTvo.js';import {I}from'./chunk-CZeAMs3r.js';import'./chunk-CmdXsb3H.js';import'./chunk-DvLFd6NQ.js';import {c as ce}from'./chunk-BRsHFk4j.js';import'./chunk-C0DmzTpz.js';import {g,v as vr,D,E,dY as _,cN as Ft,eN as Kt,V,bI as Gt,eF as w,bK as P,aE as ut,O,a as G,bJ as V$1,e as f,dL as Y,b,X as Xb,T as Tt,z as zg,bt as Lg,bu as Ts,df as Wc,bv as Og,bw as Pg,bQ as Zs,bR as Mc,bM as Ic,bU as Tc,dg as xc,dh as vc,a4 as XE,N as Ng,bN as Gc,eU as jt,h as ea,i as ai,eV as M,j as Xv,w as w0,b1 as ei,aL as co,H as H0,bO as jh,Z as Zx,k as dn$1,b2 as da,cp as xr,da as wr,bP as Dh,bL as Sh,l as zw,bA as Nw,s as sk,d6 as Hp,d7 as ed,n as nd,b3 as id,r as rC,m as wC,o as mv,aF as ta,aG as _r,aH as cv,p as GC,t as tD,q as vD,aO as cD,aP as hD,b0 as _D,aX as mD,u as al,x as tM,cf as eM,cg as Hu,ch as ju,ci as JD,y as dM,L as Lb,A as r1,P as P1,B as xS,C as Vs,F as zs,I as Fi$1,J as GS,K as iI,M as RI,es as mn$1,et as EI,eu as Ud,Q as us,S as ms,Y as UI,_ as tE,$ as Dn,a0 as ME,a1 as ny,a2 as go,a3 as Kd,av as on$1,a5 as LT,a6 as mA,a7 as mt,aR as i_,a8 as fy,a9 as ZT,aa as Js,ac as H_,ad as gd,ae as pS,bV as zy,aS as Vp,bW as W_,aU as Hp$1,bD as db,ab as Ey,af as XT,aV as KT,bi as D_,ai as dy,bn as nS,ag as SC,ah as YT,aj as jy,al as gS,ak as Ed,bX as $y,bE as pb,aD as By,am as JT,aZ as by,a_ as m_,a$ as y_,aT as d_,eI as uy,bS as Y_,bf as Ny,bd as K_,b5 as ly,bl as zg$1}from'./main-4WA6AAHG.js';import'./chunk-CkU8oUfw.js';var pi=["bodyTextArea"],ci=()=>["Pick the category honestly \u2014 Marketing, Utility or Authentication. Meta rejects templates filed under the wrong one.","Write the body. Use a numbered variable for anything that changes per customer, and give each one a default value.","Add a header, footer and buttons if you need them.","Submit, then watch for the approval result on the templates list."],mi=()=>["/apps/template-restrictions"],ui=()=>[],hi=(r,m)=>m.seconds;function _i(r,m){if(r&1&&fy(0,"app-alert-message",13),r&2){let e=d_();dy("messages",e.featureAccessMessage)("dismissible",false);}}function xi(r,m){r&1&&(Js(0,"mat-error"),H_(1),pS(2,"translate"),gd()),r&2&&(SC(),Ed(" ",gS(2,1,"This field allowed characters count:")," 3-50 "));}function gi(r,m){r&1&&(Js(0,"mat-option",72),H_(1),pS(2,"translate"),gd()),r&2&&(SC(),jy(gS(2,1,"UTILITY_D")));}function Ci(r,m){r&1&&(Js(0,"mat-option",73),H_(1),pS(2,"translate"),gd()),r&2&&(SC(),jy(gS(2,1,"AUTHENTICATION_D")));}function fi(r,m){if(r&1){let e=i_();Js(0,"div",34)(1,"mat-label",68)(2,"mat-icon",26),H_(3,"category"),gd(),H_(4),pS(5,"translate"),gd(),Js(6,"mat-form-field",69)(7,"mat-select",70,4),pS(9,"translate"),zy("ngModelChange",function(n){Vp(e);let d=d_();return W_(d.input.category,n)||(d.input.category=n),Hp$1(n)}),Ey("ngModelChange",function(){Vp(e);let n=d_();return Hp$1(n.onCategoryChange())}),Js(10,"mat-option",71),H_(11),pS(12,"translate"),gd(),ZT(13,gi,3,3,"mat-option",72),ZT(14,Ci,3,3,"mat-option",73),gd(),db(),Js(15,"mat-hint"),H_(16),pS(17,"translate"),gd()()();}if(r&2){let e=d_();SC(4),Ed(" ",gS(5,9,"Category"),"*"),SC(3),uy("aria-label",Y_(gS(9,11,"Select an option"))),$y("ngModel",e.input.category),dy("disabled",e.isMediaCard()),pb(),SC(4),jy(gS(12,13,"MARKETING_D")),SC(2),YT(e.isMediaCard()?-1:13),SC(),YT(e.isMediaCard()?-1:14),SC(2),jy(gS(17,15,"Used for WhatsApp classification."));}}function vi(r,m){r&1&&(Js(0,"div",84)(1,"mat-icon"),H_(2,"error"),gd(),H_(3),pS(4,"translate"),gd()),r&2&&(SC(3),Ed(" ",gS(4,1,"Between 1 and 90 minutes.")," "));}function bi(r,m){if(r&1){let e=i_();Js(0,"mat-form-field",81)(1,"mat-label"),H_(2),pS(3,"translate"),gd(),Js(4,"input",82),zy("ngModelChange",function(n){Vp(e);let d=d_(2);return W_(d.authSettings.codeExpirationMinutes,n)||(d.authSettings.codeExpirationMinutes=n),Hp$1(n)}),gd(),db(),Js(5,"span",83),H_(6),pS(7,"translate"),gd(),Js(8,"mat-hint"),H_(9),pS(10,"translate"),gd()(),ZT(11,vi,5,3,"div",84);}if(r&2){let e=d_(2);SC(2),jy(gS(3,7,"Expires in")),SC(2),$y("ngModel",e.authSettings.codeExpirationMinutes),dy("min",e.authCodeExpirationMin)("max",e.authCodeExpirationMax),pb(),SC(2),jy(gS(7,9,"minutes")),SC(3),jy(gS(10,11,"Between 1 and 90 minutes.")),SC(2),YT(e.authCodeExpirationInvalid?11:-1);}}function yi(r,m){if(r&1&&(Js(0,"mat-option",86),H_(1),pS(2,"translate"),gd()),r&2){let e=m.$implicit;dy("value",e.seconds),SC(),jy(gS(2,2,e.labelKey));}}function Ti(r,m){if(r&1){let e=i_();Js(0,"mat-form-field",81)(1,"mat-label"),H_(2),pS(3,"translate"),gd(),Js(4,"mat-select",85),pS(5,"translate"),zy("ngModelChange",function(n){Vp(e);let d=d_(2);return W_(d.authSettings.messageSendTtlSeconds,n)||(d.authSettings.messageSendTtlSeconds=n),Hp$1(n)}),XT(6,yi,3,4,"mat-option",86,hi),gd(),db(),gd();}if(r&2){let e=d_(2);SC(2),jy(gS(3,4,"Validity period")),SC(2),uy("aria-label",Y_(gS(5,6,"Validity period"))),$y("ngModel",e.authSettings.messageSendTtlSeconds),pb(),SC(2),JT(e.authSendTtlOptions);}}function wi(r,m){if(r&1){let e=i_();Js(0,"div",35)(1,"mat-label",74)(2,"mat-icon",26),H_(3,"lock_clock"),gd(),H_(4),pS(5,"translate"),gd(),Js(6,"div",75),H_(7),pS(8,"translate"),gd(),Js(9,"div",76)(10,"mat-checkbox",77),zy("ngModelChange",function(n){Vp(e);let d=d_();
1return W_(d.authSettings.addSecurityRecommendation,n)||(d.authSettings.addSecurityRecommendation=n),Hp$1(n)}),H_(11),pS(12,"translate"),gd(),db(),Js(13,"div",78),H_(14),pS(15,"translate"),gd()(),Js(16,"div",76)(17,"mat-checkbox",79),zy("ngModelChange",function(n){Vp(e);let d=d_();return W_(d.authCodeExpirationEnabled,n)||(d.authCodeExpirationEnabled=n),Hp$1(n)}),Ey("ngModelChange",function(n){Vp(e);let d=d_();return Hp$1(d.onAuthCodeExpirationToggle(n))}),H_(18),pS(19,"translate"),gd(),db(),Js(20,"div",78),H_(21),pS(22,"translate"),gd(),ZT(23,bi,12,13),gd(),Js(24,"div",76)(25,"mat-checkbox",80),zy("ngModelChange",function(n){Vp(e);let d=d_();return W_(d.authSendTtlEnabled,n)||(d.authSendTtlEnabled=n),Hp$1(n)}),Ey("ngModelChange",function(n){Vp(e);let d=d_();return Hp$1(d.onAuthSendTtlToggle(n))}),H_(26),pS(27,"translate"),gd(),db(),Js(28,"div",78),H_(29),pS(30,"translate"),gd(),ZT(31,Ti,8,8,"mat-form-field",81),gd()();}if(r&2){let e=d_();SC(4),Ed(" ",gS(5,13,"Verification code settings")," "),SC(3),Ed(" ",gS(8,15,"These settings apply to the verification code only and take effect once Meta approves the template.")," "),SC(3),$y("ngModel",e.authSettings.addSecurityRecommendation),pb(),SC(),Ed(" ",gS(12,17,"Add security recommendation")," "),SC(3),Ed(" ",gS(15,19,"WhatsApp adds a line advising the customer not to share the code with anyone.")," "),SC(3),$y("ngModel",e.authCodeExpirationEnabled),pb(),SC(),Ed(" ",gS(19,21,"Add expiration time for the code")," "),SC(3),Ed(" ",gS(22,23,"WhatsApp shows the remaining time inside the message and stops the copy button once it passes.")," "),SC(2),YT(e.authCodeExpirationEnabled?23:-1),SC(2),$y("ngModel",e.authSendTtlEnabled),pb(),SC(),Ed(" ",gS(27,25,"Set a custom validity period for the message")," "),SC(3),Ed(" ",gS(30,27,"A message not delivered within this period is dropped and you are not charged for it. Without it WhatsApp applies 10 minutes.")," "),SC(2),YT(e.authSendTtlEnabled?31:-1);}}function Mi(r,m){r&1&&(Js(0,"mat-expansion-panel-header")(1,"mat-panel-title")(2,"mat-icon",89),H_(3,"view_headline"),gd(),H_(4),pS(5,"translate"),gd()()),r&2&&(SC(4),Ed(" ",gS(5,1,"Header")," "));}function Ei(r,m){r&1&&(Js(0,"span"),H_(1),pS(2,"translate"),gd()),r&2&&(SC(),Ed(" ",gS(2,1,"This field is required")," "));}function Si(r,m){r&1&&(Js(0,"span"),H_(1),pS(2,"translate"),gd()),r&2&&(SC(),Ed(" ",gS(2,1,"This field allowed characters count:")," 5-100 "));}function Ii(r,m){if(r&1&&(Js(0,"mat-error"),ZT(1,Ei,3,3,"span"),ZT(2,Si,3,3,"span"),gd()),r&2){d_();let e=D_(8);SC(),YT(e.errors?.required?1:-1),SC(),YT(e.errors?.minlength||e.errors?.maxlength?2:-1);}}function Ai(r,m){if(r&1&&(Js(0,"div",91)(1,"mat-icon"),H_(2,"error_outline"),gd(),Js(3,"span"),H_(4),pS(5,"translate"),gd()()),r&2){let e=d_(3);SC(4),jy(gS(5,1,e.headerTextIssue));}}function Fi(r,m){if(r&1){let e=i_();Js(0,"div")(1,"mat-label",25)(2,"mat-icon",26),H_(3,"short_text"),gd(),H_(4),pS(5,"translate"),gd(),Js(6,"mat-form-field",27)(7,"input",90,6),zy("ngModelChange",function(n){Vp(e);let d=d_(2);return W_(d.input.headerText,n)||(d.input.headerText=n),Hp$1(n)}),gd(),db(),Js(9,"mat-hint"),H_(10),pS(11,"translate"),gd(),ZT(12,Ii,3,2,"mat-error"),gd(),ZT(13,Ai,6,3,"div",91),gd();}if(r&2){let e=D_(8),t=d_(2);SC(4),Ed(" ",gS(5,5,"Header text"),"*"),SC(3),$y("ngModel",t.input.headerText),pb(),SC(3),jy(gS(11,7,"Appears at the top of the message if header type is text.")),SC(2),YT(e.invalid&&(e.dirty||e.touched)?12:-1),SC(),YT(t.headerTextIssue?13:-1);}}function Pi(r,m){if(r&1){let e=i_();Js(0,"mat-label",92)(1,"mat-icon",30),H_(2,"attach_file"),gd(),H_(3),pS(4,"translate"),Js(5,"button",94),H_(6),pS(7,"translate"),gd(),Js(8,"mat-menu",null,7)(10,"button",95),Ey("click",function(){Vp(e);let n=d_(3);return Hp$1(n.openFileDialog(true))}),Js(11,"mat-icon",96),H_(12,"cloud"),gd(),H_(13),pS(14,"translate"),gd(),Js(15,"app-local-file-upload",97,8),Ey("uploaded",function(n){Vp(e);let d=d_(3);return Hp$1(d.onFileUploaded(n))}),Js(17,"button",98),Ey("click",function(){Vp(e);let n=D_(16);return Hp$1(n.open())}),Js(18,"mat-icon",99),H_(19,"computer"),gd(),H_(20),pS(21,"translate"),gd()()()();}if(r&2){let e=D_(9),t=d_(3);SC(3),Ed(" ",gS(4,6,"Attach a file for the header.")," "),SC(2),dy("matMenuTriggerFor",e),SC(),Ed(" ",gS(7,8,"Choose file")," "),SC(7),Ed(" ",gS(14,10,"Server File")," "),SC(2),dy("config",t.normalUploadConfig),SC(5),Ed(" ",gS(21,12,"Local File")," ");}}function Bi(r,m){if(r&1){let e=i_();Js(0,"div",93)(1,"div",100)(2,"div",101)(3,"div",102),H_(4),pS(5,"translate"),gd(),Js(6,"span",103)(7,"p"),H_(8),gd()(),Js(9,"div",104)(10,"button",105),Ey("click",function(){Vp(e);let n=d_(3);return Hp$1(n.removeSelectedFile())}),Js(11,"mat-icon",106),H_(12,"delete"),gd()()()()()();}if(r&2){let e=d_(3);SC(4),jy(gS(5,2,"Selected file")),SC(4),jy(e.selectedFile.name);}}function ki(r,m){if(r&1&&(Js(0,"div"),ZT(1,Pi,22,14,"mat-label",92),ZT(2,Bi,13,4,"div",93),gd()),r&2){let e=d_(2);SC(),YT(e.selectedFile?-1:1),SC(),YT(e.selectedFile?2:-1);}}function Oi(r,m){if(r&1){let e=i_();Js(0,"mat-expansion-panel",36),ZT(1,Mi,6,3,"mat-expansion-panel-header"),Js(2,"div",34)(3,"mat-label",87)(4,"mat-icon",30),H_(5,"view_headline"),gd(),H_(6),pS(7,"translate"),gd(),Js(8,"mat-form-field",69)(9,"mat-select",88,5),pS(11,"translate"),zy("ngModelChange",function(n){Vp(e);let d=d_();return W_(d.input.headerType,n)||(d.input.headerType=n),Hp$1(n)}),Ey("selectionChange",function(n){Vp(e);let d=d_();return Hp$1(d.onHeaderTypeChange(n.value))}),Js(12,"mat-option",86),H_(13),pS(14,"translate"),gd(),Js(15,"mat-option",86),H_(16),pS(17,"translate"),gd(),Js(18,"mat-option",86),H_(19),pS(20,"translate"),gd(),Js(21,"mat-option",86),H_(22),pS(23,"translate"),gd(),Js(24,"mat-option",86),H_(25),pS(26,"translate"),gd()(),db(),Js(27,"mat-hint"),H_(28),pS(29,"translate"),gd()()(),ZT(30,Fi,14,9,"div"),ZT(31,ki,3,2,"div"),gd();}if(r&2){let e=D_(10),t=d_();dy("expanded",false),SC(),YT(t.isMediaCard()?-1:1),SC(5),Ed(" ",gS(7,20,"Header type"),"* "),SC(3),uy("aria-label",Y_(gS(11,22,"Select an option"))),$y("ngModel",t.input.headerType),dy("disabled",t.isMediaCard()),pb(),SC(3),dy("value",t.EnumHeaderType.None),SC(),jy(gS(14,24,"No header")),SC(2),dy("value",t.EnumHeaderType.Text),SC(),jy(gS(17,26,"Text")),SC(2),dy("value",t.EnumHeaderType.Document),SC(),jy(gS(20,28,"Document")),SC(2),dy("value",t.EnumHeaderType.Image),SC(),jy(gS(23,30,"Image")),SC(2),dy("value",t.EnumHeaderType.Video),SC(),jy(gS(26,32,"Video")),SC(3),jy(gS(29,34,"Choose the format of the message header.")),SC(2),YT(e.value==t.EnumHeaderType.Text&&!t.isMediaCard()?30:-1),SC(),YT((e.value==t.EnumHeaderType.Document||e.value==t.EnumHeaderType.Image||e.value==t.EnumHeaderType.Video)&&!t.isMediaCard()?31:-1);}}
1function Vi(r,m){r&1&&(Js(0,"mat-error"),H_(1),pS(2,"translate"),gd()),r&2&&(SC(),Ed(" ",gS(2,1,"This field allowed characters count:")," 3-1024 "));}function Ni(r,m){r&1&&(Js(0,"span"),H_(1),pS(2,"translate"),gd()),r&2&&(SC(),Ed("",gS(2,1,"Value is required")," "));}function Ui(r,m){if(r&1&&(Js(0,"mat-error"),ZT(1,Ni,3,3,"span"),gd()),r&2){d_();let e=D_(6);SC(),YT(e.errors?.required?1:-1);}}function Ri(r,m){if(r&1){let e=i_();Js(0,"div",113)(1,"mat-form-field",69)(2,"mat-label"),H_(3),pS(4,"translate"),gd(),Js(5,"input",114,10),pS(7,"translate"),zy("ngModelChange",function(n){let d=Vp(e).$implicit,b=d_(3);return W_(b.defaultValuesForFields[d],n)||(b.defaultValuesForFields[d]=n),Hp$1(n)}),gd(),db(),Js(8,"mat-hint"),H_(9),pS(10,"translate"),gd(),ZT(11,Ui,2,1,"mat-error"),gd()();}if(r&2){let e=m.$implicit,t=D_(6),n=d_(3);SC(3),By("",e," (",gS(4,9,"Default Value"),")"),SC(2),dy("placeholder",K_("",gS(7,11,"Enter default for")," ",e)),$y("ngModel",n.defaultValuesForFields[e]),dy("name","default_"+e),pb(),SC(4),jy(gS(10,13,"The value cannot be empty.")),SC(2),YT(t.invalid&&(t.dirty||t.touched)?11:-1);}}function Li(r,m){if(r&1&&(Js(0,"div",111)(1,"h4",112),H_(2),pS(3,"translate"),gd(),XT(4,Ri,12,15,"div",113,KT),gd()),r&2){let e=d_(2);SC(2),Ed("",gS(3,1,"Default Values"),"*"),SC(2),JT(e.detectedFields);}}function Wi(r,m){if(r&1){let e=i_();Js(0,"mat-expansion-panel",36)(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"mat-icon",24),H_(4,"article"),gd(),H_(5),pS(6,"translate"),gd()(),Js(7,"mat-label",25)(8,"mat-icon",26),H_(9,"article"),gd(),H_(10),pS(11,"translate"),gd(),Js(12,"mat-form-field",27)(13,"textarea",107,9),zy("ngModelChange",function(n){Vp(e);let d=d_();return W_(d.input.bodyText,n)||(d.input.bodyText=n),Hp$1(n)}),Ey("ngModelChange",function(n){Vp(e);let d=d_();return Hp$1(d.onBodyTextChange(n))}),gd(),db(),Js(16,"mat-hint"),H_(17),pS(18,"translate"),gd(),ZT(19,Vi,3,3,"mat-error"),gd(),Js(20,"div",108)(21,"mat-label",109),H_(22),pS(23,"translate"),gd(),Js(24,"app-tags",110),Ey("tagClicked",function(n){Vp(e);let d=d_();return Hp$1(d.addTagToMessage(n))}),gd()(),ZT(25,Li,6,3,"div",111),gd();}if(r&2){let e=D_(15),t=d_();dy("expanded",false),SC(5),Ed(" ",gS(6,12,"Body")," "),SC(5),Ed(" ",gS(11,14,"Body"),"*"),SC(3),$y("ngModel",t.input.bodyText),dy("readonly",t.isAuthenticationCategory())("placeholder",t.isAuthenticationCategory()?t.authenticationBodyPlaceholder:""),pb(),SC(4),jy(gS(18,16,"Main content of the template.")),SC(2),YT(e.invalid&&(e.dirty||e.touched)?19:-1),SC(3),jy(gS(23,18,"Fields")),SC(2),dy("tags",t.getDatasourceList())("clickable",true),SC(),YT(t.detectedFields.length>0?25:-1);}}function Di(r,m){r&1&&(Js(0,"mat-error"),H_(1),pS(2,"translate"),gd()),r&2&&(SC(),Ed(" ",gS(2,1,"This field allowed characters count:")," 3-30 "));}function zi(r,m){if(r&1){let e=i_();Js(0,"mat-expansion-panel",36)(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"mat-icon",37),H_(4,"horizontal_rule"),gd(),H_(5),pS(6,"translate"),gd()(),Js(7,"mat-label",25)(8,"mat-icon",37),H_(9,"short_text"),gd(),H_(10),pS(11,"translate"),gd(),Js(12,"mat-form-field",27)(13,"input",115,11),zy("ngModelChange",function(n){Vp(e);let d=d_();return W_(d.input.footerText,n)||(d.input.footerText=n),Hp$1(n)}),gd(),db(),Js(15,"mat-hint"),H_(16),pS(17,"translate"),gd(),ZT(18,Di,3,3,"mat-error"),gd()();}if(r&2){let e=D_(14),t=d_();dy("expanded",false),SC(5),Ed(" ",gS(6,6,"Footer")," "),SC(5),Ed(" ",gS(11,8,"Footer text")),SC(3),$y("ngModel",t.input.footerText),pb(),SC(3),jy(gS(17,10,"Appears at the bottom. Optional.")),SC(2),YT(e.invalid&&(e.dirty||e.touched)?18:-1);}}function ji(r,m){if(r&1&&(Js(0,"mat-chip",131),H_(1),gd()),r&2){let e=m.$implicit;SC(),By(" ",e.text," (",e.type,") ");}}function Ki(r,m){if(r&1&&(Js(0,"div")(1,"strong",128),H_(2),pS(3,"translate"),gd(),Js(4,"div",130),XT(5,ji,2,2,"mat-chip",131,KT),gd()()),r&2){let e=d_().$implicit;SC(2),Ed("",gS(3,1,"Buttons"),":"),SC(3),JT(e.buttons);}}function Hi(r,m){if(r&1){let e=i_();Js(0,"mat-card",120)(1,"div",121)(2,"h4",122),H_(3),pS(4,"translate"),gd(),Js(5,"div",123)(6,"button",124),Ey("click",function(){let n=Vp(e).$index,d=d_(3);return Hp$1(d.moveCard(n,-1))}),Js(7,"mat-icon",118),H_(8,"expand_less"),gd()(),Js(9,"button",125),Ey("click",function(){let n=Vp(e).$index,d=d_(3);return Hp$1(d.moveCard(n,1))}),Js(10,"mat-icon",118),H_(11,"expand_more"),gd()()(),Js(12,"button",126),Ey("click",function(){let n=Vp(e).$index,d=d_(3);return Hp$1(d.editCard(n))}),Js(13,"mat-icon",118),H_(14,"edit"),gd()()(),Js(15,"div",127)(16,"strong",128),H_(17),pS(18,"translate"),gd(),Js(19,"div"),H_(20),gd()(),ZT(21,Ki,7,3,"div"),Js(22,"button",129),Ey("click",function(){let n=Vp(e).$index,d=d_(3);return Hp$1(d.removeCard(n))}),Js(23,"mat-icon",118),H_(24,"delete"),gd()()();}if(r&2){let e=m.$implicit,t=m.$index,n=d_(3);SC(3),By("",gS(4,7,"Card")," #",t+1),SC(3),dy("disabled",t===0),SC(3),dy("disabled",t===(n.input.cards?.length||0)-1),SC(8),Ed("",gS(18,9,"Body"),":"),SC(3),jy(e.bodyText),SC(),YT(e.buttons.length?21:-1);}}function qi(r,m){if(r&1&&(Js(0,"div",116),XT(1,Hi,25,11,"mat-card",120,KT),gd()),r&2){let e=d_(2);SC(),JT(e.input.cards);}}
1function Yi(r,m){r&1&&(Js(0,"mat-hint",139),H_(1),pS(2,"translate"),gd()),r&2&&(SC(),Ed(" ",gS(2,1,"You have reached the maximum number of characters")," "));}function Gi(r,m){if(r&1&&(Js(0,"div",144),H_(1),gd()),r&2){let e=d_(3);SC(),Ed(" ",e.newCardFile.name," ");}}function Qi(r,m){if(r&1){let e=i_();Js(0,"mat-chip",149),H_(1),pS(2,"translate"),Js(3,"button",150),Ey("click",function(){let n=Vp(e).$index,d=d_(4);return Hp$1(d.removeNewCardButton(n))}),Js(4,"mat-icon"),H_(5,"cancel"),gd()()();}if(r&2){let e=m.$implicit;SC(),By(" ",e.text," (",gS(2,2,e.type),") ");}}function $i(r,m){if(r&1&&(Js(0,"div",108)(1,"h5",148),H_(2),pS(3,"translate"),gd(),Js(4,"mat-chip-set"),XT(5,Qi,6,4,"mat-chip",149,KT),gd()()),r&2){let e=d_(3);SC(2),jy(gS(3,1,"Buttons")),SC(3),JT(e.newCardButtons);}}function Ji(r,m){if(r&1){let e=i_();Js(0,"div",119)(1,"h4",132),H_(2),pS(3,"translate"),gd(),Js(4,"div",133)(5,"div",134)(6,"mat-icon",135),H_(7,"warning"),gd(),Js(8,"p")(9,"strong"),H_(10),pS(11,"translate"),gd()()(),Js(12,"div",134)(13,"mat-icon",135),H_(14,"warning"),gd(),Js(15,"p")(16,"strong"),H_(17),pS(18,"translate"),gd()()(),Js(19,"div",134)(20,"mat-icon",135),H_(21,"warning"),gd(),Js(22,"p")(23,"strong"),H_(24),pS(25,"translate"),gd()()(),Js(26,"div",134)(27,"mat-icon",135),H_(28,"warning"),gd(),Js(29,"p")(30,"strong"),H_(31),pS(32,"translate"),gd()()()(),Js(33,"mat-form-field",136)(34,"mat-label"),H_(35),pS(36,"translate"),gd(),Js(37,"textarea",137),zy("ngModelChange",function(n){Vp(e);let d=d_(2);return W_(d.newCardBodyText,n)||(d.newCardBodyText=n),Hp$1(n)}),gd(),db(),Js(38,"mat-hint",138),H_(39),gd(),ZT(40,Yi,3,3,"mat-hint",139),gd(),Js(41,"div",140)(42,"button",141),H_(43),pS(44,"translate"),gd(),Js(45,"mat-menu",null,7)(47,"button",95),Ey("click",function(){Vp(e);let n=d_(2);return Hp$1(n.openFileDialog(false))}),Js(48,"mat-icon",96),H_(49,"cloud"),gd(),H_(50),pS(51,"translate"),gd(),Js(52,"app-local-file-upload",97,8),Ey("uploaded",function(n){Vp(e);let d=d_(2);return Hp$1(d.onFileUploaded(n))}),Js(54,"button",98),Ey("click",function(){Vp(e);let n=D_(53);return Hp$1(n.open())}),Js(55,"mat-icon",99),H_(56,"computer"),gd(),H_(57),pS(58,"translate"),gd()()(),Js(59,"button",142),Ey("click",function(){Vp(e);let n=d_(2);return Hp$1(n.openAddButtonDialog(true))}),Js(60,"mat-icon",143),H_(61,"add "),gd(),H_(62),pS(63,"translate"),gd()(),ZT(64,Gi,2,1,"div",144),ZT(65,$i,7,3,"div",108),Js(66,"div",145)(67,"button",146),Ey("click",function(){Vp(e);let n=d_(2);return Hp$1(n.saveCard())}),Js(68,"mat-icon"),H_(69,"credit_card"),gd(),H_(70),pS(71,"translate"),gd(),Js(72,"button",147),Ey("click",function(){Vp(e);let n=d_(2);return Hp$1(n.toggleAddCardForm())}),Js(73,"mat-icon"),H_(74,"close"),gd(),H_(75),pS(76,"translate"),gd()()();}if(r&2){let e=D_(46),t=d_(2);SC(2),jy(gS(3,20,"Add New Card")),SC(8),jy(gS(11,22,"At least one card is required")),SC(7),jy(gS(18,24,"Each card must contain one or two button(s)")),SC(7),jy(gS(25,26,"It is required that all cards have the same number and type of buttons.")),SC(7),jy(gS(32,28,"Each card must contain a unique file that is not repeated in other cards.")),SC(4),jy(gS(36,30,"Card Body Text")),SC(2),$y("ngModel",t.newCardBodyText),pb(),SC(2),Ed("",t.newCardBodyText.length||0,"/160"),SC(),YT(t.newCardBodyText.length===160?40:-1),SC(2),dy("matMenuTriggerFor",e),SC(),Ed(" ",gS(44,32,"Select Card File")," "),SC(7),Ed(" ",gS(51,34,"Server File")," "),SC(2),dy("config",t.caroselUploadConfig),SC(5),Ed(" ",gS(58,36,"Local File")," "),SC(5),Ed(" ",gS(63,38,"Add Card Button")," "),SC(2),YT(t.newCardFile?64:-1),SC(),YT(t.newCardButtons.length?65:-1),SC(2),dy("disabled",t.newCardButtons.length==0||t.newCardBodyText.length<3),SC(3),jy(gS(71,40,"Save Card")),SC(5),jy(gS(76,42,"Cancel Card"));}}function Xi(r,m){if(r&1){let e=i_();Js(0,"mat-expansion-panel")(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"mat-icon",89),H_(4,"view_carousel"),gd(),H_(5),pS(6,"translate"),gd()(),Js(7,"mat-label",92),H_(8),pS(9,"translate"),gd(),ZT(10,qi,3,0,"div",116),Js(11,"button",117),Ey("click",function(){Vp(e);let n=d_();return Hp$1(n.toggleAddCardForm())}),Js(12,"mat-icon",118),H_(13,"add"),gd(),H_(14),pS(15,"translate"),gd(),ZT(16,Ji,77,44,"div",119),gd();}if(r&2){let e=d_();SC(5),Ed(" ",gS(6,7,"Cards")," "),SC(3),jy(gS(9,9,"Cards")),SC(2),YT(e.isMediaCard()&&e.input.cards?.length?10:-1),SC(),Ny("margin-inline-start",12,"px"),SC(3),Ed(" ",gS(15,11,"Add Card")," "),SC(2),YT(e.showAddCardForm&&e.isMediaCard()?16:-1);}}
1function Zi(r,m){r&1&&(Js(0,"li"),H_(1),pS(2,"translate"),gd()),r&2&&(SC(),jy(gS(2,1,"This template has no buttons!")));}function en(r,m){if(r&1&&(Js(0,"span",167)(1,"mat-icon",171),H_(2,"account_tree"),gd(),H_(3),pS(4,"translate"),gd()),r&2){let e=d_().$implicit;SC(3),By(" ",gS(4,2,"Flow"),": ",e.flowName," ");}}function tn(r,m){r&1&&(Js(0,"span",168),H_(1),pS(2,"translate"),gd()),r&2&&(SC(),Ed(" ",gS(2,1,"Interactive")," "));}function nn(r,m){r&1&&(Js(0,"span",169)(1,"mat-icon",171),H_(2,"attach_file"),gd(),H_(3),pS(4,"translate"),gd()),r&2&&(SC(3),Ed(" ",gS(4,1,"File")," "));}function an(r,m){if(r&1&&(Js(0,"div",170)(1,"mat-icon",171),H_(2,"phone"),gd(),Js(3,"span"),H_(4),gd()()),r&2){let e=d_().$implicit;SC(4),jy(e.phoneNumber);}}function on(r,m){if(r&1&&(Js(0,"div",170)(1,"mat-icon",171),H_(2,"link"),gd(),Js(3,"a",172),H_(4),gd()()),r&2){let e=d_().$implicit;SC(3),dy("href",e.url,zg$1),SC(),jy(e.url);}}function rn(r,m){if(r&1){let e=i_();Js(0,"div",158)(1,"div",159)(2,"mat-form-field",160)(3,"mat-label"),H_(4),pS(5,"translate"),gd(),Js(6,"input",161),pS(7,"translate"),zy("ngModelChange",function(n){let d=Vp(e).$implicit;return W_(d.text,n)||(d.text=n),Hp$1(n)}),gd(),db(),Js(8,"mat-hint",138),H_(9),gd()(),Js(10,"button",162),pS(11,"translate"),pS(12,"translate"),Ey("click",function(){let n=Vp(e),d=n.$implicit,b=n.$index,h=d_(3);return Hp$1(h.openEditButtonDialog(d,b))}),Js(13,"mat-icon",118),H_(14,"edit"),gd()(),Js(15,"button",163),pS(16,"translate"),pS(17,"translate"),Ey("click",function(){let n=Vp(e).$implicit,d=d_(3);return Hp$1(d.deleteButton(n))}),Js(18,"mat-icon",118),H_(19,"delete"),gd()()(),Js(20,"div",164)(21,"div",165)(22,"span",166),H_(23),pS(24,"translate"),gd(),ZT(25,en,5,4,"span",167),ZT(26,tn,3,3,"span",168),ZT(27,nn,5,3,"span",169),gd(),ZT(28,an,5,1,"div",170),ZT(29,on,5,2,"div",170),gd()();}if(r&2){let e=m.$implicit,t=m.$index;SC(4),jy(gS(5,16,"Button text")),SC(2),dy("placeholder",Y_(gS(7,18,"Button text"))),$y("ngModel",e.text),dy("name","btn_text_"+e.type+t),pb(),SC(3),Ed("",(e.text||"").length,"/25"),SC(),dy("matTooltip",gS(11,20,"Edit")),ly("aria-label",gS(12,22,"Edit")),SC(5),dy("matTooltip",gS(16,24,"Delete")),ly("aria-label",gS(17,26,"Delete")),SC(8),jy(gS(24,28,e.type)),SC(2),YT(e.flowId!=null&&e.flowName?25:-1),SC(),YT(e.interactiveId&&!e.flowId?26:-1),SC(),YT(e.fileId!=null?27:-1),SC(),YT(e.phoneNumber?28:-1),SC(),YT(e.url?29:-1);}}function ln(r,m){if(r&1&&(Js(0,"div",157),XT(1,rn,30,30,"div",158,KT),gd()),r&2){let e=d_(2);SC(),JT(e.buttons);}}function dn(r,m){if(r&1){let e=i_();Js(0,"mat-expansion-panel",36)(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"mat-icon",24),H_(4,"smart_button"),gd(),H_(5),pS(6,"translate"),gd()(),Js(7,"div",151)(8,"button",152),Ey("click",function(){Vp(e);let n=d_();return Hp$1(n.openAddButtonDialog())}),Js(9,"mat-icon",118),H_(10,"add"),gd(),H_(11),pS(12,"translate"),gd(),Js(13,"button",153),Ey("click",function(){Vp(e);let n=d_();return Hp$1(n.addUnsubscribeButton())}),Js(14,"mat-icon",118),H_(15,"block"),gd(),H_(16),pS(17,"translate"),gd()(),Js(18,"div",154)(19,"span",155),H_(20),pS(21,"translate"),gd(),Js(22,"ul",46),ZT(23,Zi,3,3,"li"),Js(24,"li"),H_(25),pS(26,"translate"),gd(),Js(27,"li"),H_(28),pS(29,"translate"),gd(),Js(30,"li")(31,"a",156),Ey("click",function(){Vp(e);let n=d_();return Hp$1(n.openButtonRulesDialog())}),H_(32),pS(33,"translate"),gd()()(),ZT(34,ln,3,0,"div",157),gd()();}if(r&2){let e=d_();dy("expanded",false),SC(5),Ed(" ",gS(6,10,"Buttons")," "),SC(6),Ed(" ",gS(12,12,"Add Button")," "),SC(5),Ed(" ",gS(17,14,"Add Unsubscribe Button")," "),SC(4),jy(gS(21,16,"Advices")),SC(3),YT(e.buttons.length==0?23:-1),SC(2),Ed(" ",gS(26,18,"Add a button to the template to allow the user to interact with the template.")," "),SC(3),Ed(" ",gS(29,20,"You can add a button Unsubscribe text to prevent customer from blocking you, which enhance your number quality score.")," "),SC(4),jy(gS(33,22,"BUTTON_RULES_TITLE")),SC(2),YT(e.buttons.length>0?34:-1);}}function sn(r,m){if(r&1){let e=i_();Js(0,"button",173),Ey("click",function(){Vp(e);let n=d_(),d=D_(20);return Hp$1(n.submit(d))}),Js(1,"mat-icon"),H_(2,"add"),gd(),H_(3),pS(4,"translate"),gd();}if(r&2){let e=d_(),t=D_(20);dy("disabled",t.invalid||e.isMediaCard()&&e.input.cards&&e.input.cards.length==0),SC(3),Ed(" ",gS(4,2,"Add"));}}function pn(r,m){if(r&1){let e=i_();Js(0,"button",152),Ey("click",function(){Vp(e);let n=d_();
1return Hp$1(n.showFeatureAccessDialog())}),Js(1,"mat-icon"),H_(2,"add"),gd(),H_(3),pS(4,"translate"),gd();}r&2&&(SC(3),Ed(" ",gS(4,1,"Add")));}function cn(r,m){if(r&1&&(Js(0,"p",62),H_(1),gd()),r&2){let e=d_();SC(),Ed(" ",e.input.headerText," ");}}function mn(r,m){if(r&1&&(Js(0,"div"),fy(1,"img",174),gd()),r&2){let e=d_(2);SC(),dy("src",e.previewFileUrl,zg$1);}}function un(r,m){if(r&1&&(Js(0,"div"),fy(1,"video",175),gd()),r&2){let e=d_(2);SC(),dy("src",e.previewFileUrl,zg$1);}}function hn(r,m){if(r&1&&(Js(0,"div")(1,"a",176),H_(2),gd()()),r&2){let e=d_(2);SC(),dy("href",e.previewFileUrl,zg$1),SC(),Ed(" ",e.selectedFile?.name," ");}}function _n(r,m){if(r&1&&(Js(0,"div",63),ZT(1,mn,2,1,"div"),ZT(2,un,2,1,"div"),ZT(3,hn,3,2,"div"),gd()),r&2){let e=d_();SC(),YT(e.previewFileType==="image"&&!e.isMediaCard()?1:-1),SC(),YT(e.previewFileType==="video"&&!e.isMediaCard()?2:-1),SC(),YT(e.previewFileType!=="image"&&e.previewFileType!=="video"?3:-1);}}function xn(r,m){if(r&1&&(Js(0,"button",66),H_(1),gd()),r&2){let e=m.$implicit;SC(),Ed(" ",e.text," ");}}function gn(r,m){if(r&1&&(Js(0,"div"),fy(1,"img",179),gd()),r&2){let e=d_().$index,t=d_(2);SC(),dy("src",t.cardPreviewPaths[e],zg$1);}}function Cn(r,m){if(r&1&&(Js(0,"div"),fy(1,"video",175),gd()),r&2){let e=d_().$index,t=d_(2);SC(),dy("src",t.cardPreviewPaths[e],zg$1);}}function fn(r,m){if(r&1&&(Js(0,"button",66),H_(1),gd()),r&2){let e=m.$implicit;SC(),Ed(" ",e.text," ");}}function vn(r,m){if(r&1&&(Js(0,"div")(1,"div",65),XT(2,fn,2,1,"button",66,KT),gd()()),r&2){let e=d_().$implicit;SC(2),JT(e.buttons);}}function bn(r,m){if(r&1&&(Js(0,"div",177)(1,"div",178),ZT(2,gn,2,1,"div"),ZT(3,Cn,2,1,"div"),gd(),Js(4,"p",64),H_(5),gd(),ZT(6,vn,4,0,"div"),gd()),r&2){let e=m.$implicit,t=m.$index,n=d_(2);SC(2),YT(n.cardPreviewPaths[t]&&n.cardPreviewTypes[t]==="image"?2:-1),SC(),YT(n.cardPreviewPaths[t]&&n.cardPreviewTypes[t]==="video"?3:-1),SC(2),jy(e.bodyText),SC(),YT(e.buttons.length?6:-1);}}function yn(r,m){if(r&1&&(Js(0,"div",67),XT(1,bn,7,4,"div",177,KT),gd()),r&2){let e=d_();SC(),JT(e.input.cards);}}var qa=(()=>{class r{constructor(e,t$1,n,d,b,h,k,W,q,T,Q){this.errorService=e,this.filesService=t$1,this.templateService=n,this.loadingService=d,this.toastr=b,this.translate=h,this.router=k,this.activatedRoute=W,this.dialogConfigService=q,this.document=T,this.clientsService=Q,this.dialog=g(vr),this.pageTitle="Add Template",this.TemplateFormType=De,this.EnumHeaderType=t,this.buttons=[],this.newCardButtons=[],this.input=new pt,this.separatorKeysCodes=[13],this.localFile=[],this.nexParamNumber=1,this.replyType="none",this.newCardBodyText="",this.newCardFile=null,this.showAddCardForm=false,this.previewFileUrl=null,this.previewFileType=null,this.cardPreviewPaths=[],this.cardPreviewTypes=[],this.currentPreviewIndex=0,this.editingCardIndex=null,this.detectedFields=[],this.defaultValuesForFields={},this.canUseRichTemplates=false,this.featureAccessMessage=["You either don't have a subscription or your subscription does not support this feature or you have reached the maximum limit."],this.caroselUploadConfig={categories:["image","video"],multiple:false},this.authenticationBodyPlaceholder="\u0644\u0627 \u064A\u0648\u062C\u062F \u0646\u0635 \u0641\u064A \u0627\u0644\u0642\u0648\u0627\u0644\u0628 \u0627\u0644\u0623\u0645\u0646\u064A\u0629",this.authSettings={codeExpirationMinutes:null,messageSendTtlSeconds:null,addSecurityRecommendation:true},this.authCodeExpirationEnabled=false,this.authSendTtlEnabled=false,this.authCodeExpirationMin=1,this.authCodeExpirationMax=90,this.authSendTtlOptions=[{seconds:30,labelKey:"30 seconds"},{seconds:60,labelKey:"1 minute"},{seconds:120,labelKey:"2 minutes"},{seconds:180,labelKey:"3 minutes"},{seconds:300,labelKey:"5 minutes"},{seconds:600,labelKey:"10 minutes"},{seconds:900,labelKey:"15 minutes"}],this.currentIndexCard=0;}ngOnInit(){this.checkFeatureAccess(),this.input.cards=[],this.input.language="ar",this.input.headerType=t.None,this.input.sendItToMeAfterApproval=false,this.input.category="MARKETING",this.input.templateFormType=De.Normal,this.input.friendlyName="\u0642\u0627\u0644\u0628",this.activatedRoute.queryParams.subscribe(e=>{let t=e.duplicateId;t?this.fetchTemplateForDuplication(Number(t)):e.fromLibrary&&this.hydrateFromLibrary();});}hydrateFromLibrary(){let e=sessionStorage.getItem("contentLibraryPayload");if(sessionStorage.removeItem("contentLibraryPayload"),!!e)try{let t=JSON.parse(e);t.name!=null&&(this.input.name=t.name),t.friendlyName!=null&&(this.input.friendlyName=t.friendlyName),t.language!=null&&(this.input.language=t.language),t.category!=null&&(this.input.category=t.category),t.templateFormType!=null&&(this.input.templateFormType=t.templateFormType),t.headerType!=null&&(this.input.headerType=t.headerType),t.headerText!=null&&(this.input.headerText=t.headerText),t.headerFileId!=null&&(this.input.headerFileId=t.headerFileId),t.bodyText!=null&&(this.input.bodyText=t.bodyText),t.footerText!=null&&(this.input.footerText=t.footerText),Array.isArray(t.tags)&&(this.input.tags=t.tags),Array.isArray(t.buttons)&&(this.buttons=t.buttons),Array.isArray(t.cards)&&(this.input.cards=t.cards),t.sendItToMeAfterApproval!=null&&(this.input.sendItToMeAfterApproval=t.sendItToMeAfterApproval);}
1catch(t){this.toastr.error("The library item content is invalid.");}}fetchTemplateForDuplication(e){this.loadingService.loadingOn(),this.sub=this.templateService.getTemplateById(e).subscribe({next:t=>{this.loadingService.loadingOff(),t.succeeded&&t.data?this.loadDuplicatedTemplate(t.data):this.errorService.setError(t,"Error while getting the data");},error:t=>{this.loadingService.loadingOff(),this.errorService.setError(t,"Error while getting the data");}});}loadDuplicatedTemplate(e){if(this.input.friendlyName=e.friendlyName?e.friendlyName+" - "+this.translate.instant("Copy"):"\u0642\u0627\u0644\u0628 - \u0646\u0633\u062E\u0629",this.input.name="",this.input.templateFormType=e.templateFormType??De.Normal,this.input.category=e.category??"MARKETING",this.input.language=e.language??"ar",this.input.headerType=e.headerType??t.None,this.input.headerText=e.headerText||"",this.input.bodyText=e.bodyText||"",this.input.footerText=e.footerText||"",this.input.sendItToMeAfterApproval=false,e.tags&&(typeof e.tags=="string"?this.input.tags=e.tags.split(/[,\s]+/).filter(t=>t.trim()!==""):Array.isArray(e.tags)&&(this.input.tags=[...e.tags])),e.headerFileId&&e.headerFile){this.selectedFile=D({},e.headerFile);let t=e.headerFile.fullPath||"",n=e.headerFile.name||"",d=e.headerFile.mimeType?.toLowerCase()||"";this.previewFileUrl=this.getFileUrl(t),d.startsWith("image/")||s.isImage(n)?this.previewFileType="image":d.startsWith("video/")||s.isVideo(n)?this.previewFileType="video":this.previewFileType=null;}if(e.buttons&&Array.isArray(e.buttons)&&(this.buttons=e.buttons.map(t=>{let n=D({},t);return delete n.id,delete n.templateId,n})),e.templateCards&&Array.isArray(e.templateCards)&&(this.cardPreviewPaths=[],this.cardPreviewTypes=[],this.input.cards=e.templateCards.map((t,n)=>{if(t.file&&t.file.fullPath){this.cardPreviewPaths[n]=this.getFileUrl(t.file.fullPath);let d=t.file.mimeType?.toLowerCase()||"",b=t.file.name||"";d.startsWith("image/")||s.isImage(b)?this.cardPreviewTypes[n]="image":d.startsWith("video/")||s.isVideo(b)?this.cardPreviewTypes[n]="video":this.cardPreviewTypes[n]=null;}return E(D({},t),{id:void 0,templateDBId:void 0,buttons:t.buttons?t.buttons.map(d=>E(D({},d),{id:void 0,templateCardId:void 0})):[]})}),this.currentPreviewIndex=0,this.currentIndexCard=0),this.input.bodyText&&(this.onBodyTextChange(this.input.bodyText),e.parameters&&Array.isArray(e.parameters))){let t=e.parameters.filter(n=>!n.templatePart||n.templatePart.toUpperCase()==="BODY");this.detectedFields.forEach(n=>{let d=t.find(b=>b.name===n);d&&(this.defaultValuesForFields[n]=d.example||d.text||"\u0639\u0645\u064A\u0644\u0646\u0627 \u0627\u0644\u0639\u0632\u064A\u0632");});}this.input.category==="AUTHENTICATION"&&this.onCategoryChange(),this.updateUploadConfig();}checkFeatureAccess(){this.clientsService.canUseFeature(_.RICH_TEMPLATES).subscribe({next:e=>{this.canUseRichTemplates=e,e||this.showFeatureAccessDialog();},error:()=>{this.canUseRichTemplates=false,this.showFeatureAccessDialog();}});}showFeatureAccessDialog(){this.dialog.open(mi$1,{data:{message:this.translate.instant("You either don't have a subscription or your subscription does not support this feature or you have reached the maximum limit.")},width:"400px"});}isMediaCard(){return this.input.templateFormType===De.MediaCardCarousel}isAuthenticationCategory(){return this.input.category==="AUTHENTICATION"}onAuthCodeExpirationToggle(e){this.authSettings.codeExpirationMinutes=e?this.authSettings.codeExpirationMinutes??10:null;}onAuthSendTtlToggle(e){this.authSettings.messageSendTtlSeconds=e?this.authSettings.messageSendTtlSeconds??600:null;}get authCodeExpirationInvalid(){if(!this.isAuthenticationCategory()||!this.authCodeExpirationEnabled)return false;let e=this.authSettings.codeExpirationMinutes;return e==null||e<this.authCodeExpirationMin||e>this.authCodeExpirationMax}onCategoryChange(){this.input.category==="AUTHENTICATION"?this.input.bodyText=this.authenticationBodyPlaceholder:(this.input.bodyText||"").trim()===this.authenticationBodyPlaceholder&&(this.input.bodyText="");}get headerTextIssue(){if(this.input.headerType!==t.Text)return null;let e=this.input.headerText||"";return e?/[\r\n]/.test(e)?"Template header cannot contain newlines.":e.includes("*")?"Template header cannot contain asterisks (*).":e.includes("_")||e.includes("~")?"Template header cannot contain formatting characters (_ or ~).":/[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e)?"Template header cannot contain emojis.":null:null}onTemplateFormTypeChange(){this.isMediaCard()&&(this.input.category="MARKETING",this.input.headerType=t.None,this.input.headerText="",this.input.footerText=null,this.input.bodyText="",this.selectedFile=null,this.previewFileUrl=null,this.previewFileType=null,this.buttons=[]);}deleteButton(e){let t=this.buttons.indexOf(e);t!=-1&&this.buttons.splice(t,1);}
1submit(e){if(!this.canUseRichTemplates){this.showFeatureAccessDialog();return}if(e.invalid){this.toastr.error("Please fill all required fields (*)"),Object.values(e.controls).forEach(U=>{U.markAsTouched();});return}if(this.authCodeExpirationInvalid){this.toastr.error(this.translate.instant("Between 1 and 90 minutes."));return}if((this.input.headerType===this.EnumHeaderType.Document||this.input.headerType===this.EnumHeaderType.Image||this.input.headerType===this.EnumHeaderType.Video)&&!this.isMediaCard()&&!this.selectedFile){this.toastr.error("Please attach a file for the header");return}let n=this.headerTextIssue;if(n){this.toastr.error(this.translate.instant(n));return}let d=this.input.bodyText?.trim()??"";if(d.startsWith("{")||d.startsWith("}")||d.endsWith("{")||d.endsWith("}")){this.toastr.error("Body text must not start or end with { or }");return}let b=this.input.cards?.map(U=>U.bodyText)??[],h=ae.checkContent(this.input.bodyText,this.input.headerText,this.input.footerText,...b);if(h.isViolation){let U=this.translate.instant("The content '{0}' is not allowed in template content.").replace("{0}",h.blockedItem??"");this.toastr.error(U);return}if(!this.input.friendlyName||this.input.friendlyName.trim().length<3){this.toastr.error("Name is required");return}let k=this.input.name?.trim();if(!k)k=this.generateRandomMetaName();else if(!/^[a-z0-9_]+$/.test(k)){this.toastr.error("Name is lowercase letters, numbers, and underscores");return}if(this.isMediaCard()){if(!this.input.cards||this.input.cards.length===0){this.toastr.error("At least one card is required");return}for(let j=0;j<this.input.cards.length;j++){let $=this.input.cards[j].buttons??[];if($.length<1||$.length>2){this.toastr.error(this.translate.instant("Each card must contain one or two button(s)"));return}}let U=j=>j.map($=>$.type).sort().join(","),si=U(this.input.cards[0].buttons);if(this.input.cards.some(j=>U(j.buttons)!==si)){this.toastr.error("All cards must have identical button count and types");return}}var W=Object.values(this.defaultValuesForFields)??[];let q=E(D({},e.value),{headerType:this.input.headerType,headerText:this.input.headerText,headerFileId:this.isMediaCard()?null:this.selectedFile?.id,name:k,friendlyName:this.input.friendlyName.trim(),category:this.input.category,tags:this.input.tags?.length?this.input.tags.join(","):"",templateFormType:this.input.templateFormType,buttons:this.isMediaCard()?null:this.buttons,cards:this.isMediaCard()?this.input.cards:null,footerText:this.isMediaCard()?null:this.input.footerText,bodyText:this.input.bodyText,defaultValuesForFields:W,sendItToMeAfterApproval:this.input.sendItToMeAfterApproval,authSettings:this.isAuthenticationCategory()?D({},this.authSettings):null}),T=this.dialogConfigService.getDefaultDialogConfig();this.dialog.open(pi$1,E(D({},T),{width:"600px",disableClose:true})).afterClosed().subscribe(U=>{U&&this.showFinalConfirmationDialog(q);});}showFinalConfirmationDialog(e){this.dialog.open(Ft,E(D({},this.dialogConfigService.getDefaultDialogConfig()),{width:"500px",data:{title:this.translate.instant("Confirm Create Template"),message:this.translate.instant("Create Template Meta Approval Message"),confirmText:this.translate.instant("Confirm"),cancelText:this.translate.instant("Cancel"),confirmColor:"primary",cancelColor:"primary"}})).afterClosed().subscribe(n=>{n===true&&this.executeTemplateCreation(e);});}executeTemplateCreation(e){this.loadingService.loadingOn(),this.sub=this.templateService.addTemplate(e).subscribe({next:t=>{this.loadingService.loadingOff(),t.succeeded&&t.data>0?this.router.navigate(["/apps/whatsapp-api/templates/template-details/"+t.data]):this.errorService.setError(t,"Failed to Add");},error:t=>{this.loadingService.loadingOff(),this.errorService.setError(t,"Failed to Add");}});}generateRandomMetaName(){return "template_"+Math.random().toString(36).substring(2,8)}addSelectedFile(e,t){this.selectedFile=e;}removeSelectedFile(){this.selectedFile=null,this.previewFileUrl=null,this.previewFileType=null;}downloadFile(e){this.filesService.downloadFile(e.id,e.name);}handleSelectedFile(e,t,n){let d=e.name;if(t&&(n===void 0||!this.validateFileExtension(d,n))){this.toastr.error(n===void 0?"Header type must be specified":"The selected file type does not match the chosen header type");return}let b=s.isImage(d),h=s.isVideo(d),k=this.getFileUrl(e.fullPath);t?this.selectedFile=e:this.newCardFile=e,this.previewFileUrl=k,this.previewFileType=b?"image":h?"video":null;}openFileDialog(e){let t=this.dialogConfigService.getDefaultDialogConfig();this.dialog.open(Kt,D({},t)).afterClosed().subscribe(d=>{d&&this.handleSelectedFile(d,e,this.input.headerType);});}openEditButtonDialog(e,t){this.dialog.open(An,{width:"700px",data:{isCardButton:false,cardIndex:null,isMediaCardTemplate:this.isMediaCard(),existingButton:D({},e),editIndex:t}}).afterClosed().subscribe(d=>{d&&(this.buttons[t]=d,this.applyButtonConstraints(d,false));});}applyButtonConstraints(e,t$1=true){if(e.type==="CATALOG"&&this.input.headerType!==t.None&&(this.input.headerType=t.None,this.input.headerText="",this.selectedFile=null,this.previewFileUrl=null,this.previewFileType=null,t$1&&this.toastr.error("Catalog button requires header type to be None")),e.type==="MPM"&&(this.input.headerType!==t.Text&&(this.input.headerType=t.Text,this.selectedFile=null,this.previewFileUrl=null,this.previewFileType=null,t$1&&this.toastr.error("MPM button requires header type to be Text")),this.input.category!=="MARKETING"&&(this.input.category="MARKETING",t$1&&this.toastr.error("MPM templates must use MARKETING category"))),e.type==="FLOW"&&(this.input.category==="MARKETING"&&(this.input.category="UTILITY",t$1&&this.toastr.error("FLOW templates must use UTILITY category")),this.input.headerType!==t.Text&&(this.input.headerType=t.Text,this.selectedFile=null,this.previewFileUrl=null,this.previewFileType=null,t$1&&this.toastr.error("FLOW button requires header type to be Text"))),e&&e.fullPath){let n=e.mimeType?.toLowerCase()||"";this.previewFileUrl=this.getFileUrl(e.fullPath),this.previewFileType=n.startsWith("image/")?"image":n.startsWith("video/")?"video":null;}}openAddButtonDialog(e=false,t=null){let n={isCardButton:e,cardIndex:t,isMediaCardTemplate:this.isMediaCard()};e&&(n.cardButtonsCount=t===null?this.newCardButtons.length:this.input.cards?.[t]?.buttons?.length??0);let d=this.dialogConfigService.getDefaultDialogConfig();this.dialog.open(An,E(D({},d),{width:"700px",data:n})).afterClosed().subscribe(h=>
1{if(!h)return;if(e&&t===null){if(this.newCardButtons.length>=2){this.toastr.error("Maximum two buttons per media-card");return}if(h.flowId!=null&&this.newCardButtons.length>0){this.toastr.error("Only one button is allowed for flow template");return}if(h.flowId==null&&this.newCardButtons.some(T=>T.flowId!=null)){this.toastr.error("Only one button is allowed for flow template");return}this.newCardButtons.push(h);return}if(e&&t!==null){let T=this.input.cards[t].buttons;if(T.length>=2){this.toastr.error("Maximum two buttons per media-card");return}if(h.flowId!=null&&T.length>0){this.toastr.error("Only one button is allowed for flow template");return}if(h.flowId==null&&T.some(Q=>Q.flowId!=null)){this.toastr.error("Only one button is allowed for flow template");return}T.push(h);return}let k=["FLOW","CATALOG","MPM"],W=k.includes(h.type);if(this.buttons.some(T=>k.includes(T.type))&&!W){this.toastr.error("Only one button (Flow / Catalog / MPM) is allowed in a template");return}if(W&&this.buttons.length>0){this.toastr.error("(Flow / Catalog / MPM) buttons cannot be combined with other buttons in a template");return}if(h.type==="PHONE_NUMBER"&&this.buttons.some(T=>T.type==="PHONE_NUMBER")){this.toastr.error("Only one phone number button is allowed in a template");return}if(h.type==="URL"&&this.buttons.filter(T=>T.type==="URL").length>=2){this.toastr.error("Maximum two URL buttons are allowed");return}if(h.type==="QUICK_REPLY"&&this.buttons.filter(T=>T.type==="QUICK_REPLY").length>=10){this.toastr.error("Maximum ten QUICK REPLY buttons are allowed");return}if(h.type==="QUICK_REPLY"){if(this.buttons.length>0&&this.buttons.some(T=>T.type!=="QUICK_REPLY")){this.toastr.error("Cannot mix QUICK REPLY with other button types");return}}else if(this.buttons.some(T=>T.type==="QUICK_REPLY")){this.toastr.error("Cannot mix QUICK REPLY with other button types");return}this.applyButtonConstraints(h,true),this.buttons.push(h);});}onTagsChange(e){this.input.tags=[...e];}toggleAddCardForm(){this.showAddCardForm=!this.showAddCardForm,this.newCardBodyText="",this.newCardFile=null;}saveCard(){if(!this.newCardFile){this.toastr.error("Only image or video files are allowed");return}if(this.input.cards||(this.input.cards=[]),this.input.cards.length>=10){this.toastr.error("Maximum 10 cards allowed");return}if(this.isMediaCard()&&this.newCardFile.name&&!(s.isImage(this.newCardFile.name)||s.isVideo(this.newCardFile.name))){this.toastr.error("Only image or video files are allowed");return}if(this.newCardButtons.length<1||this.newCardButtons.length>2){this.toastr.error("Each card must contain one or two button(s)");return}let e=s.isImage(this.newCardFile.name),t=s.isVideo(this.newCardFile.name),n={bodyText:this.newCardBodyText,fileId:this.newCardFile.id,buttons:[...this.newCardButtons],file:this.newCardFile};this.editingCardIndex!==null&&this.input.cards[this.editingCardIndex]?(this.input.cards[this.editingCardIndex]=n,this.cardPreviewPaths[this.editingCardIndex]=this.getFileUrl(this.newCardFile.fullPath),this.cardPreviewTypes[this.editingCardIndex]=e?"image":t?"video":null,this.editingCardIndex=null):(this.input.cards.push(n),this.cardPreviewPaths.push(this.getFileUrl(this.newCardFile.fullPath)),this.cardPreviewTypes.push(e?"image":t?"video":null)),this.newCardBodyText="",this.newCardFile=null,this.toggleAddCardForm(),this.newCardButtons=[],this.currentPreviewIndex=this.input.cards.length-1;}removeCard(e){this.input.cards&&(this.input.cards.splice(e,1),this.currentIndexCard>=this.input.cards.length&&(this.currentIndexCard=Math.max(this.input.cards.length-1,0)),this.editingCardIndex===e&&(this.newCardBodyText="",this.newCardButtons=[],this.newCardFile=null,this.editingCardIndex=-1,this.showAddCardForm=false),this.cardPreviewPaths.splice(e,1),this.cardPreviewTypes.splice(e,1));}editCard(e){if(!this.input.cards)return;let t=this.input.cards[e];t&&(this.editingCardIndex=e,this.newCardBodyText=t.bodyText,this.newCardButtons=[...t.buttons||[]],this.newCardFile=t.file||null,this.showAddCardForm=true);}getFileUrl(e){return encodeURI(e)}removeNewCardButton(e){this.newCardButtons.splice(e,1);}onHeaderTypeChange(e){this.input.headerType=e,this.selectedFile=null,this.previewFileUrl=null,this.previewFileType=null,this.updateUploadConfig();}updateUploadConfig(){switch(this.input.headerType){case t.Image:this.normalUploadConfig={categories:["image"],multiple:false};break;case t.Video:this.normalUploadConfig={categories:["video"],multiple:false};break;case t.Document:this.normalUploadConfig={categories:["document"],multiple:false};break}}onFileUploaded(e){this.selectedFile=e,this.newCardFile=e;let t=this.getFileUrl(e.fullPath);this.previewFileUrl=t,s.isImage(e.name)?this.previewFileType="image":s.isVideo(e.name)?this.previewFileType="video":this.previewFileType=null;}moveCard(e,t){let n=this.input.cards;if(!n||n.length===0)return;let d=e+t;if(d>=0&&d<n.length){let b=n.splice(e,1)[0];n.splice(d,0,b);}if(this.cardPreviewPaths?.length){let[b]=this.cardPreviewPaths.splice(e,1);this.cardPreviewPaths.splice(d,0,b);}if(this.cardPreviewTypes?.length){let[b]=this.cardPreviewTypes.splice(e,1);this.cardPreviewTypes.splice(d,0,b);}}scroll(e){this.input.cards?.length&&(this.currentIndexCard+=e,this.currentIndexCard<0&&(this.currentIndexCard=0),this.currentIndexCard>=this.input.cards.length&&(this.currentIndexCard=this.input.cards.length-1));}getDatasourceList(){let e=this.detectedFields.includes("\u0627\u0633\u0645_\u0627\u0644\u0639\u0645\u064A\u0644"),t=this.detectedFields.some(n=>/^[0-9]+$/.test(n));return e?["\u0627\u0633\u0645_\u0627\u0644\u0639\u0645\u064A\u0644"]:t?["+"]:["\u0627\u0633\u0645_\u0627\u0644\u0639\u0645\u064A\u0644","+"]}getNextParameterNumber(){let e=(this.input.bodyText||"").trim(),t=/{{([^}]+)}}/g,n,d=0;for(;(n=t.exec(e))!==null;){let b=(n[1]||"").trim();if(/^[0-9]+$/.test(b)){let h=parseInt(b,10);h>d&&(d=h);}}return d+1}addTagToMessage(e){let n=this.bodyTextArea.nativeElement.selectionStart,d=this.input.bodyText||"";if(e==="+"){let h=this.getNextParameterNumber();e=`${h}`,this.nexParamNumber=h+1;}let b=d.slice(0,n)+`{{${e}}}`+d.slice(n);this.input.bodyText=b,this.onBodyTextChange(this.input.bodyText);}onBodyTextChange(e){let t=(e||"").trim(),n=/{{([^}]+)}}/g,d=[],b;for(;(b=n.exec(t))!==null;)d.push(b[1].trim());let h=Array.from(new Set(d)),k=this.getDatasourceList(),W=h.filter(T=>k.includes(T)||/^[0-9]+$/.test(T)),q=D({},this.defaultValuesForFields);this.detectedFields=W,this.defaultValuesForFields={};for(let T of W)this.defaultValuesForFields[T]=q[T]??"\u0639\u0645\u064A\u0644\u0646\u0627 \u0627\u0644\u0639\u0632\u064A\u0632";}validateFileExtension(e,t$1){let n=e.split(".").pop()?.toLowerCase();switch(t$1){case t.Image:return ["jpg","jpeg","png","webp"].includes(n);case t.Video:return ["mp4"].includes(n);case t.Document:return ["pdf","doc","docx","xls","xlsx","txt"].includes(n);default:return true}}openButtonRulesDialog(){let e=this.dialogConfigService.getDefaultDialogConfig();this.dialog.open(ne,E(D({},e),{width:"600px"}));}addUnsubscribeButton(){if(this.buttons.length>0&&this.buttons.some(t=>t.type!=="QUICK_REPLY")){this.toastr.error("Cannot mix QUICK REPLY with other button types");return}if(this.buttons.filter(t=>t.type==="QUICK_REPLY").length>=10){this.toastr.error("Maximum ten QUICK REPLY buttons are allowed");return}if(this.buttons.some(t=>t.text==="\u0625\u0644\u063A\u0627\u0621 \u0627\u0644\u0627\u0634\u062A\u0631\u0627\u0643"||t.text==="Unsubscribe")){this.toastr.warning("Unsubscribe button already exists");return}let e={type:"QUICK_REPLY",text:"\u0625\u0644\u063A\u0627\u0621 \u0627\u0644\u0627\u0634\u062A\u0631\u0627\u0643",phoneNumber:null,url:null,flowId:null,flowName:null,interactiveId:null,fileId:null,autoReply:null,example:null};this.buttons.push(e);}static{this.\u0275fac=function(t){return new(t||r)(V(Gt),V(w),V(I),V(P),V(ut),V(O),V(G),V(V$1
vendor: 9,511 bytes, line 1
1),V(f),V(Y),V(b))};}static{this.\u0275cmp=Xb({type:r,selectors:[["add-template"]],viewQuery:function(t,n){if(t&1&&by(pi,5),t&2){let d;m_(d=y_())&&(n.bodyTextArea=d.first);}},decls:145,vars:98,consts:[["addForm","ngForm"],["friendlyName","ngModel"],["templateFormType","ngModel"],["name","ngModel"],["category","ngModel"],["headerType","ngModel"],["headerText","ngModel"],["fileMenu","matMenu"],["normalUploader",""],["bodyTextArea","","bodyText","ngModel"],["ctrl","ngModel"],["footerText","ngModel"],["helpKey","wa-add-template","intro","Build a new WhatsApp template and submit it to Meta for approval.","warning","A variable with no default value, or text ending on a variable, is the most common reason Meta rejects a template.",3,"steps"],["type","warning",3,"messages","dismissible"],[1,"responsive-container"],[1,"cardWithShadow","theme-card","form-section"],[1,"d-flex","justify-content-between","align-items-center","w-100"],[1,"m-b-0","d-flex","align-items-center","gap-2"],["color","primary",1,"header-icon"],["mat-button","","color","warn","target","_blank",1,"d-flex","align-items-center","gap-1",3,"routerLink"],[1,"title-underline","line-in"],[1,"b-t-1"],["method","post","novalidate",""],["multi","false"],["color","primary",1,"icon-18"],[1,"mat-subtitle-2","f-w-600","m-b-8","d-block","m-t-12","label-style"],["color","primary",1,"field-icon"],["color","primary",1,"w-100"],["matInput","","name","friendlyName","required","","minlength","3","maxlength","50",3,"ngModelChange","ngModel"],["required","",1,"mat-subtitle-2","f-w-600","m-b-8","d-block","m-t-12","label-style"],["color","accent",1,"field-icon"],[1,"w-100"],["name","templateFormType",3,"ngModelChange","selectionChange","ngModel"],[3,"value"],[1,"d-block"],[1,"auth-settings","m-t-16"],[3,"expanded"],["color","warn",1,"icon-18"],["name","language",1,"flex","gap-4",3,"ngModelChange","ngModel"],["value","ar",1,"flag-radio"],["src","/assets/images/flag/icon-flag-es.svg","alt","Arabic",1,"flag-img"],["value","en",1,"flag-radio"],["src","/assets/images/flag/icon-flag-en.svg","alt","English",1,"flag-img"],["color","primary",1,"w-100","m-b-24"],["matInput","","type","text","name","name","pattern","^[a-z0-9_]*$",3,"ngModelChange","ngModel"],["mode","edit",3,"tagsChange","tags","maxTags","maxLength","placeholder","separatorKeys"],[1,"m-t-4"],[1,"m-t-20","m-b-12","approval-setting-box"],["name","sendItToMeAfterApproval","color","primary",3,"ngModelChange","ngModel"],[1,"d-block","m-t-4","hint-text"],[1,"text-right","d-flex","justify-content-end","p-24","p-t-0","m-t-24","btn-action"],["mat-flat-button","","color","primary","type","button",3,"disabled"],["mat-flat-button","","color","primary","type","button"],["mat-flat-button","","type","button","color","warn","routerLink","/apps/whatsapp-api/templates",1,"m-l-8"],[1,"preview-card"],["color","primary",1,"preview-icon"],[1,"d-flex","align-items-center","gap-8","chat-review"],["src","assets/images/CustomersAvatars/avatarwhats.png","alt","Customer Avatar",1,"customer-avatar",2,"width","40px","height","40px"],[1,"f-w-700","f-s-16","m-b-0"],[2,"display","block","color","#ffffff","font-size","10px","margin-top","0"],[1,"chat-content"],[1,"bg-chat"],[1,"f-w-700","m-b-8"],[1,"file-preview","m-t-16"],[2,"white-space","pre-line","margin","10px"],[1,"button-preview-area"],[1,"whatsapp-btn"],[1,"card-scroll-container"],["required","",1,"mat-subtitle-2","f-w-600","m-b-8","m-t-12","label-style"],["required","",1,"w-100"],["name","category",3,"ngModelChange","aria-label","ngModel","disabled"],["value","MARKETING","color","primary"],["value","UTILITY","color","primary"],["value","AUTHENTICATION","color","primary"],[1,"mat-subtitle-2","f-w-600","m-b-8","d-block","label-style"],[1,"auth-settings__hint","auth-settings__hint--lead"],[1,"auth-settings__row"],["name","addSecurityRecommendation","color","primary",3,"ngModelChange","ngModel"],[1,"auth-settings__hint"],["name","authCodeExpirationEnabled","color","primary",3,"ngModelChange","ngModel"],["name","authSendTtlEnabled","color","primary",3,"ngModelChange","ngModel"],["appearance","outline","color","primary",1,"auth-settings__field","m-t-8"],["matInput","","type","number","name","codeExpirationMinutes","step","1","required","",3,"ngModelChange","ngModel","min","max"],["matTextSuffix","",1,"auth-settings__suffix"],[1,"auth-settings__error"],["name","messageSendTtlSeconds",3,"ngModelChange","ngModel","aria-label"],["color","primary",3,"value"],["required","",1,"mat-subtitle-2","f-w-600","m-b-8","m-t-12","d-block","label-style"],["name","headerType","required","",3,"ngModelChange","selectionChange","aria-label","ngModel","disabled"],["color","accent",1,"icon-18"],["matInput","","type","text","name","headerText","minlength","5","maxlength","100","required","",3,"ngModelChange","ngModel"],["dir","auto",1,"header-rule-error"],[1,"mat-subtitle-2","f-w-600","m-b-8","d-block","m-t-12"],[1,"taskboard","m-t-24"],["mat-flat-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],["color","primary",1,"menu-icon"],[3,"uploaded","config"],["type","button","mat-menu-item","",3,"click"],[1,"menu-icon"],[1,"taskboard-cards","todos"],[1,"taskboard-task"],[1,"f-s-16","m-b-4","f-w-600"],[1,"task-decription","f-s-14"],[1,"d-flex","justify-content-end"],["type","button","mat-icon-button","","aria-label","delete",1,"d-flex","justify-content-center",3,"click"],[1,"d-flex","icon-18","justify-content-center"],["matInput","","type","text","name","bodyText","required","","minlength","3","maxlength","1024","rows","6",2,"resize","none",3,"ngModelChange","ngModel","readonly","placeholder"],[1,"m-b-16"],[1,"mat-subtitle-2","f-w-600","m-b-8","d-block"],["mode","display",3,"tagClicked","tags","clickable"],[1,"m-t-12"],[1,"f-w-600","m-b-8"],[1,"m-b-8"],["matInput","","type","text","required","",3,"ngModelChange","ngModel","name","placeholder"],["matInput","","type","text","name","footerText","minlength","3","maxlength","30",3,"ngModelChange","ngModel"],[1,"d-flex","flex-wrap","gap-12","m-t-16"],["mat-flat-button","","type","button","color","primary",3,"click"],[1,"icon-18"],[1,"cardWithShadow","m-t-16","p-16",2,"background-color","#f8f8f8"],[1,"cardWithShadow","p-16",2,"width","260px"],[1,"d-flex","justify-content-between","align-items-center","m-b-8"],[1,"mat-subtitle-2","f-w-600"],[1,"d-flex"],["type","button","mat-icon-button","","color","primary","aria-label","expand less",3,"click","disabled"],["type","button","mat-icon-button","","color","primary","aria-label","expand more",3,"click","disabled"],["type","button","mat-icon-button","","color","primary","aria-label","edit",3,"click"],[1,"m-b-6"],[1,"text-muted"],["type","button","mat-icon-button","","color","warn","aria-label","delete",3,"click"],[1,"d-flex","flex-wrap","gap-6","m-t-4"],["color","accent","selected",""],[1,"mat-subtitle-2","f-w-600","text-center","m-b-16"],[1,"pulsing-alert-multi"],[1,"d-flex","align-items-center","gap-4"],[1,"alert-icon"],[1,"w-100","m-b-16"],["matInput","","rows","4","name","newCardBodyText","required","","maxlength","160",3,"ngModelChange","ngModel"],["align","end"],["align","start"],[1,"d-flex","gap-8","flex-wrap","justify-content-end","m-b-16"],["mat-stroked-button","","color","primary",3,"matMenuTriggerFor"],["mat-stroked-button","","color","primary","type","button",3,"click"],[1,"icon-16","m-r-4"],[1,"text-muted","m-b-16"],[1,"d-flex","gap-12","justify-content-end"],["type","button","mat-flat-button","","color","primary",3,"click","disabled"],["type","button","mat-flat-button","","color","warn",3,"click"],[1,"f-w-600","m-b-6"],["color","primary","selected",""],["type","button","matChipRemove","",3,"click"],[1,"d-flex","gap-12","m-t-8"],["mat-flat-button","","color","primary","type","button",3,"click"],["mat-stroked-button","","color","warn","type","button",3,"click"],[1,"m-t-16"],[1,"f-w-600"],["href","javascript:void(0)",3,"click"],[1,"d-flex","flex-wrap","flex-sm-row","flex-column","justify-content-center","gap-8"],[1,"template-button-card"],[1,"template-button-card__header"],["appearance","outline","subscriptSizing","dynamic",1,"template-button-card__label"],["matInput","","maxlength","25",3,"ngModelChange","ngModel","name","placeholder"],["mat-icon-button","","type","button","color","primary",1,"template-button-card__edit",3,"click","matTooltip"],["mat-icon-button","","type","button","color","warn",1,"template-button-card__delete",3,"click","matTooltip"],[1,"template-button-card__details"],[1,"template-button-card__meta"],[1,"template-button-card__type"],[1,"template-button-card__badge","template-button-card__badge--flow"],[1,"template-button-card__badge","template-button-card__badge--interactive"],[1,"template-button-card__badge","template-button-card__badge--file"],[1,"template-button-card__value"],[1,"icon-14"],["target","_blank","rel","noopener",3,"href"],["mat-flat-button","","color","primary","type","button",3,"click","disabled"],["alt","Image Preview",1,"preview-media",3,"src"],["controls","",1,"preview-media",3,"src"],["target","_blank",1,"doc-preview",3,"href"],[1,"card-item"],[1,"file-card-preview"],["alt","Card Image",1,"preview-media",3,"src"]],template:function(t,n){if(t&1){let d=i_();fy(0,"app-page-help",12),ZT(1,_i,1,2,"app-alert-message",13),Js(2,"div",14)(3,"mat-card",15)(4,"mat-card-header")(5,"div",16)(6,"mat-card-title",17)(7,"mat-icon",18),H_(8,"playlist_add"),gd(),Js(9,"span"),H_(10),pS(11,"translate"),gd()(),Js(12,"a",19)(13,"mat-icon"),H_(14,"open_in_new"),gd(),H_(15),pS(16,"translate"),gd()()(),f
1y(17,"div",20),Js(18,"mat-card-content",21)(19,"form",22,0)(21,"mat-accordion",23)(22,"mat-expansion-panel")(23,"mat-expansion-panel-header")(24,"mat-panel-title")(25,"mat-icon",24),H_(26,"info"),gd(),H_(27),pS(28,"translate"),gd()(),Js(29,"mat-label",25)(30,"mat-icon",26),H_(31,"text_fields"),gd(),H_(32),pS(33,"translate"),gd(),Js(34,"mat-form-field",27)(35,"input",28,1),zy("ngModelChange",function(h){return Vp(d),W_(n.input.friendlyName,h)||(n.input.friendlyName=h),Hp$1(h)}),gd(),db(),Js(37,"mat-hint"),H_(38),pS(39,"translate"),gd(),ZT(40,xi,3,3,"mat-error"),gd(),Js(41,"mat-label",29)(42,"mat-icon",30),H_(43,"dashboard"),gd(),H_(44),pS(45,"translate"),gd(),Js(46,"mat-form-field",31)(47,"mat-select",32,2),zy("ngModelChange",function(h){return Vp(d),W_(n.input.templateFormType,h)||(n.input.templateFormType=h),Hp$1(h)}),Ey("selectionChange",function(){return n.onTemplateFormTypeChange()}),Js(49,"mat-option",33),H_(50),pS(51,"translate"),gd(),Js(52,"mat-option",33),H_(53),pS(54,"translate"),gd()(),db(),gd(),ZT(55,fi,18,17,"div",34),gd(),ZT(56,wi,32,29,"div",35),ZT(57,Oi,32,36,"mat-expansion-panel",36),ZT(58,Wi,26,20,"mat-expansion-panel",36),ZT(59,zi,19,12,"mat-expansion-panel",36),ZT(60,Xi,17,13,"mat-expansion-panel"),ZT(61,dn,35,24,"mat-expansion-panel",36),Js(62,"mat-expansion-panel")(63,"mat-expansion-panel-header")(64,"mat-panel-title")(65,"mat-icon",37),H_(66,"settings"),gd(),H_(67),pS(68,"translate"),gd()(),Js(69,"mat-label",29)(70,"mat-icon",26),H_(71,"language"),gd(),H_(72),pS(73,"translate"),gd(),Js(74,"mat-radio-group",38),zy("ngModelChange",function(h){return Vp(d),W_(n.input.language,h)||(n.input.language=h),Hp$1(h)}),Js(75,"mat-radio-button",39),fy(76,"img",40),gd(),Js(77,"mat-radio-button",41),fy(78,"img",42),gd()(),db(),Js(79,"mat-label",25)(80,"mat-icon",26),H_(81,"edit"),gd(),H_(82),pS(83,"translate"),gd(),Js(84,"mat-form-field",43)(85,"input",44,3),zy("ngModelChange",function(h){return Vp(d),W_(n.input.name,h)||(n.input.name=h),Hp$1(h)}),gd(),db(),Js(87,"mat-hint"),H_(88),pS(89,"translate"),pS(90,"translate"),gd()(),Js(91,"mat-label",25)(92,"mat-icon",30),H_(93,"label"),gd(),H_(94),pS(95,"translate"),gd(),Js(96,"app-tags",45),pS(97,"translate"),Ey("tagsChange",function(h){return n.onTagsChange(h)}),gd(),Js(98,"mat-hint",46),H_(99),pS(100,"translate"),gd(),Js(101,"div",47)(102,"mat-checkbox",48),zy("ngModelChange",function(h){return Vp(d),W_(n.input.sendItToMeAfterApproval,h)||(n.input.sendItToMeAfterApproval=h),Hp$1(h)}),H_(103),pS(104,"translate"),gd(),db(),Js(105,"mat-hint",49),H_(106),pS(107,"translate"),gd()()(),Js(108,"div",50),ZT(109,sn,5,4,"button",51),ZT(110,pn,5,3,"button",52),Js(111,"button",53)(112,"mat-icon"),H_(113,"cancel"),gd(),H_(114),pS(115,"translate"),gd()()()()()(),Js(116,"mat-card",54)(117,"mat-card-header")(118,"mat-card-title")(119,"mat-icon",55),H_(120,"visibility"),gd(),H_(121),pS(122,"translate"),gd()(),Js(123,"mat-card-content")(124,"div",56),fy(125,"img",57),Js(126,"div")(127,"p",58),H_(128),pS(129,"translate"),gd(),Js(130,"small",59),H_(131),pS(132,"translate"),gd()()(),Js(133,"div",60)(134,"div",61),ZT(135,cn,2,1,"p",62),ZT(136,_n,4,3,"div",63),Js(137,"p",64),H_(138),gd(),Js(139,"p"),H_(140),gd(),Js(141,"div",65),XT(142,xn,2,1,"button",66,KT),gd()(),ZT(144,yn,3,0,"div",67),gd()()()();}if(t&2){let d=D_(36);dy("steps",nS(95,ci)),SC(),YT(n.canUseRichTemplates?-1:1),SC(9),jy(gS(11,51,"Add new template. Fill all the required information.")),SC(2),dy("routerLink",nS(96,mi)),SC(3),Ed(" ",gS(16,53,"Template Creation Restrictions")," "),SC(12),Ed(" ",gS(28,55,"Basic Information")," "),SC(5),Ed(" ",gS(33,57,"Name"),"* "),SC(3),$y("ngModel",n.input.friendlyName),pb(),SC(3),jy(gS(39,59,"This name helps you identify the template easily. Not shown to customers.")),SC(2),YT(d.invalid&&(d.dirty||d.touched)?40:-1),SC(4),Ed(" ",gS(45,61,"Template Type"),"* "),SC(3),$y("ngModel",n.input.templateFormType),pb(),SC(2),dy("value",n.TemplateFormType.Normal),SC(),jy(gS(51,63,"Normal")),SC(2),dy("value",n.TemplateFormType.MediaCardCarousel),SC(),jy(gS(54,65,"Media Card Carousel")),SC(2),YT(n.isMediaCard()?-1:55),SC(),YT(n.isAuthenticationCategory()&&!n.isMediaCard()?56:-1),SC(),YT(n.isAuthenticationCategory()?-1:57),SC(),YT(n.isAuthenticationCategory()?-1:58),SC(),YT(!n.isMediaCard()&&!n.isAuthenticationCategory()?59:-1),SC(),YT(n.isMediaCard()?60:-1),SC(),YT(!n.isMediaCard()&&!n.isAuthenticationCategory()?61:-1),SC(6),Ed(" ",gS(68,67,"More options")," "),SC(5),Ed(" ",gS(73,69,"Language"),"* "),SC(2),$y("ngModel",n.input.language),pb(),SC(8),jy(gS(83,71,"Meta Name")),SC(3),$y("ngModel",n.input.name),pb(),SC(3),By("",gS(89,73,"Name is lowercase letters, numbers, and underscores"),". ",gS(90,75,"Leave blank for auto-generated name")),SC(6),Ed(" ",gS(95,77,"Tags")," "),SC(2),dy("tags",n.input.tags||nS(97,ui))("maxTags",100)("maxLength",100)("placeholder",gS(97,79,"Add new tag"))("separatorKeys",n.separatorKeysCodes),SC(3),jy(gS(100,81,"Type a tag and press Enter to add.")),SC(3),$y("ngModel",n.input.sendItToMeAfterApproval),pb(),SC(),Ed(" ",gS(104,83,"Send it to me after Meta approval")," "),SC(3),Ed(" ",gS(107,85,"The template will be sent to your number automatically once approved.")," "),SC(3),YT(n.canUseRichTemplates?109:-1),SC(),YT(n.canUseRichTemplates?-1:110),SC(4),jy(gS(115,87,"Cancel")),SC(7),Ed(" ",gS(122,89,"Live Preview")," "),SC(7),jy(gS(129,91,"customer-name")),SC(3),Ed(" ",gS(132,93,"Connected")," "),SC(4),YT(n.input.headerType===n.EnumHeaderType.Text&&n.input.headerText?135:-1),SC(),YT(n.previewFileUrl&&n.previewFileType?136:-1),SC(2),jy(n.input.bodyText),SC(2),jy(n.input.footerText),SC(2),JT(n.buttons),SC(2),YT(n.isMediaCard()&&n.input.cards?.length?144:-1);}},dependencies:[ce,Tt,zg,Lg,Ts,Wc,Og,Pg,Zs,Mc,Ic,Tc,xc,vc,XE,Ng,Gc,jt,ea,ai,M,$t,W,Xv,w0,ei,co,H0,jh,Zx,dn$1,da,xr,wr,Dh,Sh,zw,Nw,sk,Hp,ed,nd,id,rC,wC,mv,ta,_r,cv,GC,tD,vD,cD,hD,_D,mD,al,tM,eM,Hu,ju,JD,dM,Lb,r1,P1,xS,Vs,zs,Fi$1,GS,iI,RI,mn$1,EI,Ud,us,ms,UI,tE,Dn,ME,ny,go,Kd,on$1,LT,mA,mt],styles:['.course-header[_ngcontent-%COMP%]{padding:3px!important;color:#fff}.course-header[_ngcontent-%COMP%] .mat-card-header-text[_ngcontent-%COMP%]{width:100%!important}
1.course-header.Angular[_ngcontent-%COMP%]{background-color:var(--color-error)}.course-header.Web[_ngcontent-%COMP%]{background-color:#1e88e5}.course-header.Design[_ngcontent-%COMP%]{background-color:#26c6da}.course-header.Android[_ngcontent-%COMP%]{background-color:#ffb22b}.course-header[_ngcontent-%COMP%] .mat-card-title[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:var(--font-size-base)}.mat-card-actions[_ngcontent-%COMP%]{border-top:1px solid rgba(120,130,140,.13);padding:8px 0!important}.taskboard[_ngcontent-%COMP%] .taskboard-list[_ngcontent-%COMP%]{box-sizing:border-box;display:flex;flex-direction:column;max-height:100%;white-space:normal;border-radius:0}.taskboard[_ngcontent-%COMP%] .taskboard-header[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:row;align-items:center}.taskboard[_ngcontent-%COMP%] .taskboard-cards[_ngcontent-%COMP%]{overflow-x:hidden;overflow-y:auto}.taskboard[_ngcontent-%COMP%] .taskboard-task[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;padding:15px;margin-bottom:15px;border-radius:var(--radius-card)}.taskboard[_ngcontent-%COMP%] .taskboard-task[_ngcontent-%COMP%]:last-child{margin-bottom:0}.taskboard[_ngcontent-%COMP%] .taskboard-task[_ngcontent-%COMP%]:hover{cursor:grab}.taskboard[_ngcontent-%COMP%] .todos[_ngcontent-%COMP%] .taskboard-task[_ngcontent-%COMP%]{background:#ecf2ff}.taskboard[_ngcontent-%COMP%] .inprogress[_ngcontent-%COMP%] .taskboard-task[_ngcontent-%COMP%]{background:#fef5e5}.taskboard[_ngcontent-%COMP%] .completed[_ngcontent-%COMP%] .taskboard-task[_ngcontent-%COMP%]{background:#e6fffa}.taskboard[_ngcontent-%COMP%] .onhold[_ngcontent-%COMP%] .taskboard-task[_ngcontent-%COMP%]{background:#fdede8}.taskboard[_ngcontent-%COMP%] .taskboard-cards[_ngcontent-%COMP%]{box-sizing:border-box;overflow-x:hidden;overflow-y:auto}.taskboard[_ngcontent-%COMP%] .cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:var(--radius-sm);box-shadow:var(--shadow-raised)}.taskboard[_ngcontent-%COMP%] .cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.taskboard[_ngcontent-%COMP%] .cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.responsive-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px;margin-top:16px}@media(min-width:992px){.responsive-container[_ngcontent-%COMP%]{flex-direction:row;align-items:flex-start}}.title-underline[_ngcontent-%COMP%]{width:0;height:3px;background-color:var(--color-primary-dark);border-radius:var(--radius-sm);margin-top:4px;opacity:0}.line-in[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_lineGrow 1.5s ease forwards}@keyframes _ngcontent-%COMP%_lineGrow{0%{width:0;opacity:0}to{width:100%;opacity:1}}.field-icon[_ngcontent-%COMP%]{vertical-align:middle;margin-right:6px;color:var(--color-primary-dark);font-size:var(--font-size-xl)}.form-section[_ngcontent-%COMP%]{flex:1 1 60%}mat-card[_ngcontent-%COMP%]{border-radius:var(--radius-lg);transition:box-shadow .3s ease,transform .3s ease}mat-card[_ngcontent-%COMP%]:hover{box-shadow:var(--shadow-raised);transform:translateY(-2px)}.preview-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{white-space:normal;word-wrap:break-word;margin:0;padding:8px 0}.header-icon[_ngcontent-%COMP%]{vertical-align:middle;margin-right:6px;font-size:26px;color:var(--color-primary-dark);animation:_ngcontent-%COMP%_popIn .6s ease}@keyframes _ngcontent-%COMP%_popIn{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}.preview-card[_ngcontent-%COMP%]{flex:1 1 40%;max-width:100%;overflow:hidden;border:1px solid var(--color-border-form);box-shadow:var(--shadow-raised);background-color:var(--color-surface-2);transition:transform .3s ease;position:sticky;top:66px;z-index:10}.preview-card[_ngcontent-%COMP%]:hover{transform:translateY(-3px)}.chat-review[_ngcontent-%COMP%]{background-color:var(--color-primary);border-radius:var(--radius-sm) var(--radius-sm) 0 0}.chat-content[_ngcontent-%COMP%]{background-image:url("./media/whatsapp-background-BL7KX7EV.png");background-repeat:repeat;background-blend-mode:overlay;min-height:300px;height:auto;padding:20px;width:100%}
1.customer-avatar[_ngcontent-%COMP%]{margin:0 5px}.button-preview-area[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;margin-top:10px;background-color:none!important}button.whatsapp-btn[_ngcontent-%COMP%]{width:100%;margin:0!important;border-radius:0!important;color:#007bff!important;height:45px;font-weight:700;font-size:17px;background-color:#fff!important;border:none;outline:none;box-shadow:none;border-top:1px solid var(--color-border)}button.whatsapp-btn[_ngcontent-%COMP%]:hover{background-color:var(--color-surface-2)!important}.bg-chat[_ngcontent-%COMP%]{border-radius:var(--radius-sm) var(--radius-sm) 0 0;background-color:#fff}.preview-icon[_ngcontent-%COMP%]{vertical-align:middle;margin-right:6px;color:var(--color-success-dark);font-size:var(--font-size-2xl)}.label-style[_ngcontent-%COMP%]{font-size:var(--font-size-lg);font-weight:500}.card-scroll-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:15px;padding-bottom:8px;margin-top:8px;width:100%;box-sizing:border-box;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch}.card-scroll-container[_ngcontent-%COMP%]::-webkit-scrollbar{height:10px}.card-scroll-container[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:var(--color-border);border-radius:var(--radius-lg);margin:0 10px}.card-scroll-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background-color:#555;border-radius:var(--radius-card)}.card-scroll-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background-color:#333}.card-item[_ngcontent-%COMP%]{flex:0 0 auto;width:90%;background-color:#fff}.media-card[_ngcontent-%COMP%]{width:100%}.preview-media[_ngcontent-%COMP%]{width:100%;border-radius:var(--radius-sm) var(--radius-sm) 0 0}.file-preview[_ngcontent-%COMP%]{margin:0;width:100%}.card-counter[_ngcontent-%COMP%]{font-weight:500;color:var(--color-text);font-size:var(--font-size-sm);text-align:center}@keyframes _ngcontent-%COMP%_pulse{0%{box-shadow:0 0 #dc354566}70%{box-shadow:0 0 0 10px #dc354500}to{box-shadow:0 0 #dc354500}}.pulsing-alert[_ngcontent-%COMP%]{display:flex;align-items:center}.pulsing-alert[_ngcontent-%COMP%], .pulsing-alert-multi[_ngcontent-%COMP%]{background-color:var(--color-light-error);border-left:6px solid var(--color-error);padding:10px;border-radius:var(--radius-sm);color:var(--color-error-text);font-size:var(--font-size-base);font-weight:700;animation:_ngcontent-%COMP%_pulse 1.5s infinite;margin:5px}.alert-icon[_ngcontent-%COMP%]{margin-right:10px;color:var(--color-error-text)}@media(max-width:768px){.btn-action[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;justify-content:flex-start;gap:8px;width:100%}.btn-action[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%!important;margin:0!important;height:48px;display:flex;align-items:center;justify-content:center}mat-hint[_ngcontent-%COMP%]{font-size:var(--font-size-2xs)}} mat-icon{display:inline-flex!important;align-items:center!important;justify-content:center!important;overflow:visible!important} mat-icon[color=primary]{color:var(--mdc-theme-primary, var(--color-primary))!important} mat-icon[color=accent]{color:var(--mdc-theme-secondary, var(--color-accent))!important} mat-icon[color=warn]{color:var(--mdc-theme-error, var(--color-error-text))!important} mat-icon.icon-18{font-size:var(--font-size-lg)!important;line-height:18px!important;width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;padding:2px!important;box-sizing:content-box!important} mat-icon.header-icon{font-size:26px!important;line-height:26px!important;width:26px!important;height:26px!important;min-width:26px!important;min-height:26px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important} mat-icon.field-icon{font-size:var(--font-size-xl)!important;line-height:20px!important;width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important} mat-icon.menu-icon{font-size:var(--font-size-lg)!important;line-height:18px!important;width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important} mat-icon.icon-14{font-size:var(--font-size-sm)!important;line-height:14px!important;width:14px!important;height:14px!important;min-width:14px!important;min-height:14px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important}.template-button-card[_ngcontent-%COMP%]{padding:16px;border:1px solid rgba(0,0,0,.12);border-radius:var(--radius-card);background:#00000005;min-width:280px;max-width:360px}.template-button-card__header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:8px;margin-bottom:12px}.template-button-card__label[_ngcontent-%COMP%]{flex:1;min-width:0}.template-button-card__label[_ngcontent-%COMP%] .mat-mdc-form-field-subscript-wrapper[_ngcontent-%COMP%]{display:none}.template-button-card__edit[_ngcontent-%COMP%], .template-button-card__delete[_ng
1content-%COMP%]{flex-shrink:0;margin-top:-8px;margin-inline-end:-8px}.template-button-card__details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding-top:8px;border-top:1px solid rgba(0,0,0,.08)}.template-button-card__meta[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.template-button-card__type[_ngcontent-%COMP%]{font-size:var(--font-size-xs);font-weight:600;padding:4px 8px;border-radius:var(--radius-sm);background:#00000014;color:#000000b3}.template-button-card__badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;font-size:var(--font-size-xs);padding:2px 8px;border-radius:var(--radius-sm)}.template-button-card__badge[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{opacity:.9}.template-button-card__badge--flow[_ngcontent-%COMP%]{background:#1976d21f;color:#1565c0}.template-button-card__badge--interactive[_ngcontent-%COMP%]{background:#4caf501f;color:var(--color-primary-dark)}.template-button-card__badge--file[_ngcontent-%COMP%]{background:#f57c001f;color:#e65100}.template-button-card__value[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:var(--font-size-sm);color:#000000b3}.template-button-card__value[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#00000080;flex-shrink:0}.template-button-card__value[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:inherit;text-decoration:none;word-break:break-all}.template-button-card__value[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.approval-setting-box[_ngcontent-%COMP%]{background-color:#f8f9fa;border:1px solid #e0e6ed;border-radius:var(--radius-card);padding:16px}.approval-setting-box[_ngcontent-%COMP%] .hint-text[_ngcontent-%COMP%]{padding-inline-start:28px;font-size:var(--font-size-sm)}.header-rule-error[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;margin:4px 0 8px;font-size:12px;line-height:1.5;color:var(--color-error-text)}.header-rule-error[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.auth-settings[_ngcontent-%COMP%]{border:1px solid var(--color-border-form);border-radius:var(--radius-lg);background-color:var(--color-surface-2);padding:16px}.auth-settings__row[_ngcontent-%COMP%] + .auth-settings__row[_ngcontent-%COMP%]{margin-top:16px;padding-top:16px;border-top:1px solid var(--color-border)}.auth-settings__hint[_ngcontent-%COMP%]{font-size:var(--font-size-sm);line-height:1.6;color:var(--color-text-muted);margin-inline-start:32px}.auth-settings__field[_ngcontent-%COMP%]{width:100%;max-width:260px;margin-inline-start:32px}.auth-settings__suffix[_ngcontent-%COMP%]{font-size:var(--font-size-sm);color:var(--color-text-muted);margin-inline-start:8px}.auth-settings__hint--lead[_ngcontent-%COMP%]{margin-inline-start:0;margin-block-end:12px}.auth-settings__error[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;margin-inline-start:32px;margin-block-start:4px;font-size:var(--font-size-sm);line-height:1.5;color:var(--color-error-text)}.auth-settings__error[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:var(--font-size-lg);width:18px;height:18px}'],changeDetection:1});}}return r})();export{qa as AddTemplateComponent};
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.