PageSourceSearch

https://chatmamba.com/default-src_app_main_wa-redirect_edit-link_e…n_wa-redirect_wa-d4a86b.b61a446fa549f228.js

js chatmamba.com collected 2026-09-28 12:00:43 UTC 13,231 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkchatmamba=self.webpackChunkchatmamba||[]).push([["default-src_app_main_wa-redirect_edit-link_edit-link_component_ts-src_app_main_wa-redirect_wa-d4a86b"],{99613:(z,J,e)=>{e.d(J,{C:()=>P});var T=e(36895),o=e(24006),g=e(4859),f=e(73546),y=e(65412),h=e(59549),E=e(97392),N=e(44144),k=e(51572),U=e(10266),v=e(48016),Z=e(59378),c=e(91772),p=e(92340),L=e(71412),x=e(22957),d=e(8736);const I=r=>{const u=(0,x.Z)((0,L.Z)(r.controls),a=>a.value);return 0===(0,d.Z)(u,a=>""===a).length||0===(0,d.Z)(u,a=>""!==a).length?null:{allOrNone:"Either all of the field should be filled in or left blank"}};var t=e(94650),D=e(8225),_=e(57409);function G(r,u){1&r&&(t.TgZ(0,"mat-error"),t._uU(1," Link is "),t.TgZ(2,"strong"),t._uU(3,"required"),t.qZA()())}function b(r,u){1&r&&(t.TgZ(0,"mat-error"),t._uU(1," Link must not contain white space and symbol, except dash (-) "),t.qZA())}function O(r,u){if(1&r&&(t.TgZ(0,"mat-error",20),t._uU(1),t.qZA()),2&r){const a=t.oxw();t.xp6(1),t.Oqu(a.err)}}function n(r,u){1&r&&(t.TgZ(0,"mat-error"),t._uU(1," Display name must not contain white space and symbol, except dash (-) "),t.qZA())}function s(r,u){1&r&&(t.TgZ(0,"mat-error"),t._uU(1," Phone number is "),t.TgZ(2,"strong"),t._uU(3,"required"),t.qZA()())}function m(r,u){1&r&&(t.TgZ(0,"mat-error"),t._uU(1," Phone number can only contain number "),t.qZA())}function A(r,u){1&r&&(t.TgZ(0,"div",31),t._UZ(1,"mat-spinner",32),t.qZA()),2&r&&(t.xp6(1),t.Q6J("diameter",30))}function C(r,u){if(1&r){const a=t.EpF();t.TgZ(0,"div",33)(1,"img",34),t.NdJ("load",function(){t.CHM(a);const l=t.oxw(2);return t.KtG(l.onImgLoad())}),t.qZA(),t.TgZ(2,"button",35),t.NdJ("click",function(){t.CHM(a);const l=t.oxw(2);return t.KtG(l.removeLogo())}),t.TgZ(3,"mat-icon"),t._uU(4,"remove"),t.qZA()()()}if(2&r){const a=t.oxw(2);t.xp6(1),t.Q6J("src",a.imgSrc,t.LSH)}}function w(r,u){1&r&&(t.TgZ(0,"mat-error"),t._uU(1,"Image must be less than 150kb"),t.qZA())}function M(r,u){if(1&r){const a=t.EpF();t.TgZ(0,"div",21)(1,"div",22)(2,"h3"),t._uU(3,"Link preview setup"),t.qZA(),t.TgZ(4,"mat-icon",23),t.NdJ("mouseenter",function(){t.CHM(a),t.oxw();const l=t.MAs(43);return t.KtG(l.open())})("mouseleave",function(){t.CHM(a),t.oxw();const l=t.MAs(43);return t.KtG(l.close())}),t._uU(5,"info_outline"),t.qZA()(),t.TgZ(6,"small"),t._uU(7," All of the fields below should either be filled in or left blank "),t.qZA(),t._UZ(8,"br"),t.TgZ(9,"button",24),t.NdJ("click",function(){t.CHM(a);const l=t.MAs(12);return t.KtG(l.click())}),t._uU(10),t.qZA(),t.TgZ(11,"input",25,26),t.NdJ("change",function(l){t.CHM(a);const F=t.oxw();return t.KtG(F.readFile(l))}),t.qZA(),t.YNc(13,A,2,1,"div",27),t.YNc(14,C,5,1,"div",28),t.YNc(15,w,2,0,"mat-error",5),t.TgZ(16,"mat-form-field",2)(17,"mat-label"),t._uU(18,"Title"),t.qZA(),t._UZ(19,"textarea",29),t.TgZ(20,"mat-hint",8),t._uU(21,"Title of your product"),t.qZA()(),t.TgZ(22,"mat-form-field",2)(23,"mat-label"),t._uU(24,"Description"),t.qZA(),t._UZ(25,"textarea",30),t.TgZ(26,"mat-hint",8),t._uU(27,"Short explanation to what your product is doing"),t.qZA()()()}if(2&r){const a=t.oxw(),i=t.MAs(43);t.xp6(4),t.Q6J("satPopoverAnchor",i),t.xp6(6),t.hij("",a.imgSrc?"Change":"Add"," logo"),t.xp6(3),t.Q6J("ngIf",!a.loaded&&a.imgSrc),t.xp6(1),t.Q6J("ngIf",a.imgSrc),t.xp6(1),t.Q6J("ngIf",a.oversize)}}let P=(()=>{class r{constructor(a,i,l,F){this._fb=a,this.dialogRef=i,this._prompt=l,this.data=F,this.loaded=!1,this.advance=!1,this.oversize=!1,this.baseLink=p.N.baseLink,this.editLink=this._fb.group({name:new o.p4("",[o.kI.required,o.kI.pattern(/^[a-zA-Z0-9-]+$/)]),displayName:new o.p4("",[o.kI.required]),phNo:new o.p4("",[o.kI.required,o.kI.pattern(/^\d+$/)]),file:new o.p4(""),text:new o.p4(""),advanceOption:new o.nJ({title:new o.p4(""),description:new o.p4(""),logo:new o.p4("")},{validators:I})}),this.err=null}ngOnInit(){this.data&&(this.editLink.reset(this.data),this.data.err&&(this.err=this.data.err),(0,Z.Z)(this.data.logo)||(this.advance=!0,this.imgSrc=this.data.logo))}close(){this.editLink.dirty?this._prompt.ask("Changes will not be saved. Are you sure you want to close?",()=>this.dialogRef.close()):this.dialogRef.close()}submit(){if(!this.editLink.valid)return void this.editLink.markAllAsTouched();const{name:a,displayName:i,phNo:l,text:F,file:Q,advanceOption:S}=this.editLink.value,{title:Y,description:K,logo:R}=S;this.dialogRef.close({name:a,displayName:i,phNo:l,text:F,title:Y,description:K,logo:R,imgType:this.imgType,file:Q})}readFile(a){const i=a.target.files[0],l=new FileReader;
1l.readAsDataURL(i),this.imgType=i.type,l.onload=()=>{if((new Image).src=l.result.toString(),i.size>153600)return this.oversize=!0,void(this.imgSrc="");this.oversize=!1;const Q=l.result;this.imgSrc=Q,this.editLink.patchValue({file:i,advanceOption:{logo:Q}}),this.editLink.markAsDirty()}}onImgLoad(){this.loaded=!0,document.getElementById("logo").style.display="block"}removeLogo(){this.imgSrc=null,this.imgType=null,this.editLink.patchValue({advanceOption:{logo:""}})}}return r.\u0275fac=function(a){return new(a||r)(t.Y36(o.QS),t.Y36(y.so),t.Y36(D.Q),t.Y36(y.WI))},r.\u0275cmp=t.Xpm({type:r,selectors:[["app-edit-link"]],standalone:!0,features:[t.jDz],decls:48,vars:14,consts:[["cm-dialog-header",""],[1,"flex","flex-col","p-4",3,"formGroup"],["appearance","standard"],["matPrefix",""],["matInput","","formControlName","name","placeholder","awesome-link",3,"readonly"],[4,"ngIf"],["class","pt-4",4,"ngIf"],["matInput","","formControlName","displayName","placeholder","Meaningful name"],["align","start"],["matInput","","formControlName","phNo","placeholder","e.g. 60123456789"],["matInput","","formControlName","text","matTextareaAutosize","","matAutosizeMinRows","1","placeholder","Optional text"],["mat-raised-button","","type","button","color","basic",1,"self-start",3,"click"],["class","flex flex-col","formGroupName","advanceOption",4,"ngIf"],["cm-dialog-action","",1,"flex","items-center","justify-end","p-4","gap-2"],["mat-raised-button","",3,"click"],["mat-raised-button","","color","primary",3,"disabled","click"],["horizontalAlign","center","verticalAlign","above"],["info",""],[1,"w-80","h-72"],["src","https://firebasestorage.googleapis.com/v0/b/wasap360-testsite.appspot.com/o/ChatMamba%20link%20pewview.JPG?alt=media&token=80eb9762-1adb-4098-8e0b-afb72e89a7a1",1,"max-w-full","max-h-full","mt-4","border","border-neutral-300","dark:border-neutral-400"],[1,"pt-4"],["formGroupName","advanceOption",1,"flex","flex-col"],[1,"flex","items-center","gap-2"],[3,"satPopoverAnchor","mouseenter","mouseleave"],["mat-raised-button","","type","button","color","accent",1,"self-start",3,"click"],["type","file","accept",".jpg, .png, .jpeg",1,"hidden",3,"change"],["file",""],["class","flex items-center justify-center",4,"ngIf"],["id","logo","class","relative hidden w-1/2 mt-4 border border-neutral-300 dark:border-neutral-400",4,"ngIf"],["matInput","","formControlName","title","placeholder","Example: Chat Mamba","matTextareaAutosize","","matAutosizeMinRows","1"],["matInput","","formControlName","description","placeholder","Example: Create link to redirect user to your whatsapp conversation with ease","matTextareaAutosize","","matAutosizeMinRows","2"],[1,"flex","items-center","justify-center"],[3,"diameter"],["id","logo",1,"relative","hidden","w-1/2","mt-4","border","border-neutral-300","dark:border-neutral-400"],[1,"w-full",3,"src","load"],["mat-icon-button","","type","button","matTooltip","Remove logo",1,"absolute","top-0","right-0",3,"click"]],template:function(a,i){1&a&&(t.TgZ(0,"cm-dialog")(1,"div",0),t._uU(2),t.qZA(),t.TgZ(3,"form",1)(4,"mat-form-field",2)(5,"span",3),t._uU(6),t.qZA(),t._UZ(7,"input",4),t.YNc(8,G,4,0,"mat-error",5),t.YNc(9,b,2,0,"mat-error",5),t.qZA(),t.YNc(10,O,2,1,"mat-error",6),t.TgZ(11,"mat-form-field",2)(12,"mat-label"),t._uU(13,"Name"),t.qZA(),t._UZ(14,"input",7),t.TgZ(15,"mat-hint",8),t._uU(16,"This name is for your own reference. Your customers won't see it."),t.qZA(),t.YNc(17,n,2,0,"mat-error",5),t.qZA(),t.TgZ(18,"mat-form-field",2)(19,"mat-label"),t._uU(20,"Phone Number"),t.qZA(),t._UZ(21,"input",9),t.TgZ(22,"mat-hint",8),t._uU(23,"Phone number in international format, excluding zeroes, brackets, or dashes"),t.qZA(),t.YNc(24,s,4,0,"mat-error",5),t.YNc(25,m,2,0,"mat-error",5),t.qZA(),t._UZ(26,"br"),t.TgZ(27,"mat-form-field",2)(28,"mat-label"),t._uU(29,"Pre-filled text"),t.qZA(),t._UZ(30,"textarea",10),t.TgZ(31,"mat-hint",8),t._uU(32,"Message that you will be expecting your targeted user to send to you"),t.qZA()(),t._UZ(33,"br"),t.TgZ(34,"button",11),t.NdJ("click",function(){return i.advance=!i.advance}),t._uU(35),t.qZA(),t.YNc(36,M,28,5,"div",12),t.qZA(),t.TgZ(37,"div",13)(38,"button",14),t.NdJ("click",function(){return i.close()}),t._uU(39,"Cancel"),t.qZA(),t.TgZ(40,"button",15),t.NdJ("click",function(){return i.submit()}),t._uU(41),t.qZA()()(),t.TgZ(42,"sat-popover",16,17)(44,"mat-card",18)(45,"span"),t._uU(46,"Example of how a Facebook link preview looks like:"),t.qZA(),t._UZ(47,"img",19),t.qZA()()),2&a&&(t.xp6(2),t.hij("",i.data&&!i.err?"Edit":"Create"," Link"),t.xp6(1),t.Q6J("formGroup",i.editLink),t.xp6(3),t.hij("",i.baseLink,"/"),t.xp6(1),t.Q6J("readonly",i.data&&!i.err),t.xp6(1),t.Q6J("ngIf",i.editLink.get("name").hasError("required")),t.xp6(1),t.Q6J("ngIf",i.editLink.get("name").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",i.err),t.xp6(7),t.Q6J("ngIf",i.editLink.get("displayName").hasError("pattern")),t.xp6(7),t.Q6J("ngIf",i.editLink.get("phNo").hasError("required")),t.xp6(1),t.Q6J("ngIf",i.editLink.get("phNo").hasError("pattern")),t.xp6(10),t.hij("",i.advance?"Hide":"Show"," advance option"),t.xp6(1),t.Q6J("ngIf",i.advance),t.xp6(4),t.Q6J("disabled",i.editLink.pristine||i.editLink.invalid||i.imgSrc&&i.oversize),t.xp6(1),t.Oqu(i.data&&!i.err?"Update":"Create"))},dependencies:[T.ez,T.O5,o.u5,o._Y,o.Fj,o.JJ,o.JL,o.UX,o.sg,o.u,o.x0,v.mR,v.Vf,v.vF,c.c,_.g,h.lN,h.TO,h.KE,h.bx,h.hX,h.qo,g.ot,g.lW,N.c,N.Nt,k.Cq,k.Ou,E.Ps,E.Hw,f.QW,f.a8,U.AV,U.gM],encapsulation:2}),r})()},96147:(z,J,e)=>{e.d(J,{t:()=>G});var T=e(15861),o=e(57038),g=e(24102),f=e(83742),y=e(47910),h=e(91998),E=e(85866),N=e(40833),U=e(59378),v=e(84808),Z=e(4128),c=e(39646),p=e(88996),L=e(54004),x=e(70262),d=e(95698),I=e(19733),t=e(94650),D=e(87921),_=e(16664);let G=(()=>{class b{constructor(n,s,m,A,C){this._db=n,this._fs=s,this._storage=m,this._user=A,this._http=C,this.linkData=[]}createLink(n){var s=this;return(0,T.Z)(function*(){return n.file&&(n.logo=yield s.uploadImg(n.file,n.name,n.imgType)),s._http.post("v1/wa/links",{},n).toPromise()})()}getLinks(){return(0,o.pb)((0,o.IO)((0,o.iH)(this._db,"wa-redirect/links"),(0,o.g2)("owner"),(0,o.EW)(this._user.uid))).pipe((0,L.U)(n=>n.map(s=>Object.assign({uid:s.snapshot.key},s.snapshot.val()))),(0,x.K)(n=>(0,I._k)(n)))}getClickPerDay(n,s){return(0,g.KO)((0,g.JU)(this._fs,`wa-links/${n}/clickByMonth/${s}`)).pipe((0,d.q)(1),(0,x.K)(m=>(0,I.JB)(m)))}getFsLink(n){return(0,g.KO)((0,g.JU)(this._fs,`wa-links/${n}`)).pipe((0,d.q)(1),(0,x.K)(s=>(0,I.JB)(s)))}getDbLink(n){return(0,o.FE)((0,o.iH)(this._db,`wa-redirect/links/${n}`)).pipe((0,d.q)(1),(0,x.K)(s=>(0,I._k)(s)))}getLink(n){const s=new Date,m=(0,y.Z)(s,"MMM yy"),A=(0,v.Z)(this.linkData,["name",n]);if(Number((0,y.Z)(s,"d"))<20){const C=(0,y.Z)(function k(b,O){(0,N.Z)(2,arguments);var n=(0,h.Z)(O);return(0,E.Z)(b,-n)}(s,1),"MMM yy");return A?(0,Z.D)([(0,c.of)(A),this.getFsLink(n),this.getClickPerDay(n,m),this.getClickPerDay(n,C)]):(0,Z.D)([this.getDbLink(n),this.getFsLink(n),this.getClickPerDay(n,m),this.getClickPerDay(n,C)]).pipe((0,L.U)(([w,M,P,r])=>[w,M,P,r]))}return A?(0,Z.D)([(0,c.of)(A),this.getFsLink(n),this.getClickPerDay(n,m),(0,c.of)(null)]):(0,Z.D)([this.getDbLink(n),this.getFsLink(n),this.getClickPerDay(n,m),(0,c.of)(null)]).pipe((0,L.U)(([C,w,M,P])=>[C,w,M,P]))}updateLink(n){var s=this;return(0,T.Z)(function*(){return n.logo&&!n.logo.includes("https")&&(n.logo=yield s.uploadImg(n.file,n.name,n.imgType)),s._http.patch(`v1/wa/links/${n.name}`,{},n).toPromise()})()}deleteLogo(n){return(0,p.D)((0,f.oq)((0,f.iH)(this._storage,`logo/${this._user.uid}/${n}`)))}deleteLink(n,s){const m=[this._http.delete(`v1/wa/links/${n}`)];return(0,U.Z)(s)||m.push(this.deleteLogo(n)),(0,Z.D)(m)}uploadImg(n,s,m){var A=this;return(0,T.Z)(function*(){const C={contentType:m};return(0,f.KV)((0,f.iH)(A._storage,`logo/${A._user.uid}/${s}`),n,C).then(M=>(0,f.Jt)(M.ref))})()}}return b.\u0275fac=function(n){return new(n||b)(t.LFG(o.vo),t.LFG(g.gg),t.LFG(f.Ke),t.LFG(D.K),t.LFG(_.l))},b.\u0275prov=t.Yz7({token:b,factory:b.\u0275fac,providedIn:"root"}),b})()},8736:(z,J,e)=>{e.d(J,{Z:()=>N});var T=e(20197),o=e(61082);const f=function g(k,U){var v=[];return(0,o.Z)(k,function(Z,c,p){U(Z,c,p)&&v.push(Z)}),v};var y=e(5229),h=e(14177);const N=function E(k,U){return((0,h.Z)(k)?T.Z:f)(k,(0,y.Z)(U,3))}},84808:(z,J,e)=>{e.d(J,{Z:()=>Z});var T=e(5229),o=e(78706),g=e(31952);var h=e(59009),E=e(8161),N=Math.max;const Z=function f(c){return function(p,L,x){var d=Object(p);if(!(0,o.Z)(p)){var I=(0,T.Z)(L,3);p=(0,g.Z)(p),L=function(D){return I(d[D],D,d)}}var t=c(p,L,x);return t>-1?d[I?p[t]:t]:void 0}}(function k(c,p,L){var x=null==c?0:c.length;if(!x)return-1;var d=null==L?0:(0,E.Z)(L);return d<0&&(d=N(x+d,0)),(0,h.Z)(c,(0,T.Z)(p,3),d)})}}]);

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.