PageSourceSearch

https://portal.12-clans.com/3490.240620fcb98c8207.js

js 12-clans.com collected 2026-10-05 07:11:37 UTC 17,853 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkcolor_admin=self.webpackChunkcolor_admin||[]).push([[3490],{3490:(j,k,i)=>{i.r(k),i.d(k,{EmailTemplateModule:()=>Q});var a=i(177),f=i(7650),g=i(3997),d=i(4341),b=i(2510),v=i(7060),x=i(8860),e=i(4438);let m=(()=>{class o{constructor(){this.refreshData=()=>{}}static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275prov=e.jDH({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();var _=i(1152),s=i(5794),l=i(3442);const p=o=>({"parsley-error":o});let T=(()=>{class o{constructor(t,n,r,c,h){this.emailTemplateService=t,this.fb=n,this.commonService=r,this.toastr=c,this.changeDetector=h,this.template=null,this.template_form_submitted=!1,this.isLoading=!1,this.editorData=""}ngOnInit(){this.createForm()}createForm(){this.templateForm=this.fb.group({name:["",[d.k0.required]],subject:["",[d.k0.required]],body:["",d.k0.required]})}get f(){return this.templateForm.controls}openModal(t={}){this.createForm(),t.id?(this.template=t,this.editorData=t.body,this.templateForm.patchValue(t)):(this.templateForm.reset(),this.template=null);const n=document.getElementById("acc_Modal");n&&(n.setAttribute("aria-hidden","false"),new bootstrap.Modal(n,{backdrop:"static",keyboard:!0,focus:!1}).show())}closeModal(){const t=document.getElementById("acc_Modal");t&&(t.setAttribute("aria-hidden","true"),bootstrap.Modal.getInstance(t).hide()),this.template_form_submitted=!1,this.templateForm.reset(),this.template=null}getCkEditorData(t){this.templateForm.patchValue({body:t})}formSubmit(){this.template_form_submitted=!0,this.templateForm.invalid?console.log(this.templateForm):(this.template?.id&&(this.templateForm.value.template_id=this.template.id),this.isLoading=!0,this.commonService.PostAPI(this.template?.id?g.r.updateTemplate:g.r.create_email_template,this.templateForm.value).then(t=>{1==t.status?(this.toastr.success(t.message),this.isLoading=!1,this.closeModal(),this.emailTemplateService.refreshData()):(this.isLoading=!1,this.toastr.success(t.message))}).catch(t=>{this.isLoading=!1,this.toastr.error(t.error.message)}))}static{this.\u0275fac=function(n){return new(n||o)(e.rXU(m),e.rXU(d.ok),e.rXU(_.h),e.rXU(s.tw),e.rXU(e.gRc))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["app-template-form"]],inputs:{title:"title"},standalone:!0,features:[e.aNF],decls:28,vars:13,consts:[["id","acc_Modal",1,"modal","fade"],[1,"modal-dialog","modal
1-lg"],[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal","aria-hidden","true",1,"btn-close"],[3,"ngSubmit","formGroup"],[1,"modal-body"],[1,"row","mb-3"],[1,"form-label","col-form-label","col-md-2"],[1,"col-md-10"],["type","text","formControlName","name","id","exampleInputname","placeholder","Title",1,"form-control",3,"ngClass"],["type","text","formControlName","subject","id","exampleInputSubject","placeholder","Subject",1,"form-control",3,"ngClass"],["formControlName","body",3,"editorDataChange","content_form_submitted","formControl","editorData"],[1,"modal-footer","d-flex","justify-content-center"],["type","submit",1,"btn","btn-theme",3,"ladda"]],template:function(n,r){1&n&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h4",4),e.EFF(5),e.k0s(),e.nrm(6,"button",5),e.k0s(),e.j41(7,"form",6),e.bIt("ngSubmit",function(){return r.formSubmit()}),e.j41(8,"div",7)(9,"fieldset")(10,"div",8)(11,"label",9),e.EFF(12,"Title"),e.k0s(),e.j41(13,"div",10),e.nrm(14,"input",11),e.k0s()(),e.j41(15,"div",8)(16,"label",9),e.EFF(17,"Subject"),e.k0s(),e.j41(18,"div",10),e.nrm(19,"input",12),e.k0s()(),e.j41(20,"div",8)(21,"label",9),e.EFF(22,"Body"),e.k0s(),e.j41(23,"div",10)(24,"app-ckeditor-wrapper",13),e.bIt("editorDataChange",function(h){return r.getCkEditorData(h)}),e.mxI("editorDataChange",function(h){return e.DH7(r.editorData,h)||(r.editorData=h),h}),e.k0s()()()()(),e.j41(25,"div",14)(26,"button",15),e.EFF(27),e.k0s()()()()()()),2&n&&(e.R7$(5),e.JRh(r.title),e.R7$(2),e.Y8G("formGroup",r.templateForm),e.R7$(7),e.Y8G("ngClass",e.eq3(9,p,r.template_form_submitted&&(null==r.f.name?null:r.f.name.invalid))),e.R7$(5),e.Y8G("ngClass",e.eq3(11,p,r.template_form_submitted&&(null==r.f.subject?null:r.f.subject.invalid))),e.R7$(5),e.Y8G("content_form_submitted",r.template_form_submitted)("formControl",r.templateForm.get("body")),e.R50("editorData",r.editorData),e.R7$(2),e.Y8G("ladda",r.isLoading),e.R7$(),e.JRh(r.template?"Save":"Add template"))},dependencies:[d.YN,d.qT,d.me,d.BC,d.cb,a.MD,a.YU,f.iI,d.X1,d.l_,d.j4,d.JD,v.b9,v.aP,b.MQ,x.V,l.w]})}}return o})();var P=i(8032),C=i.n(P),y=i(4449),O=i(248),R=i(345),L=i(709),F=i(8652),M=i(9853);function S(o,u){if(1&o){const t=e.RV6();e.j41(0,"div",2)(1,"button",3),e.bIt("click",function(r){e.eBV(t);const c=e.XpG();return e.Njj(c.openModal(r))}),e.nrm(2,"i",4),e.k0s()()}}let G=(()=>{class o{constructor(t){this.fb=t,this.openmodalEmitter=new e.bkB}ngOnInit(){this.auth=y.k.getAuthData()}openModal(t){t.preventDefault(),this.openmodalEmitter.emit()}static{this.\u0275fac=function(n){return new(n||o)(e.rXU(d.ok))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["app-template-filter"]],outputs:{openmodalEmitter:"openmodalEmitter"},decls:2,vars:1,consts:[[1,"row","mb-3"],["class","col-xl-12 text-end",4,"ngIf"],[1,"col-xl-12","text-end"],["ngbTooltip","Add Template","triggers","hover","placement","top","title","Add Template",1,"btn","btn-theme","btn-md",3,"click"],[1,"fa","fa-plus"]],template:function(n,r){1&n&&(e.j41(0,"div",0),e.DNE(1,S,3,0,"div",1),e.k0s()),2&n&&(e.R7$(),e.Y8G("ngIf",null==r.auth?null:r.auth.role.includes(1)))},dependencies:[a.bT,F.md]})}}return o})();const I=(o,u)=>u.id,$=()=>[],E=()=>({height:"20px"}),N=()=>({height:"320px"});function w(o,u){if(1&o){const t=e.RV6();e.j41(0,"button",20),e.bIt("click",function(){e.eBV(t);const r=e.XpG(2).$implicit,c=e.XpG(2);return e.Njj(c.deleteInit(r.id))}),e.nrm(1,"i",21),e.k0s()}}function B(o,u){if(1&o){const t=e.RV6();e.j41(0,"div",16)(1,"button",17),e.bIt("click",function(){e.eBV(t);const r=e.XpG().$implicit,c=e.XpG(2);return e.Njj(c.editinit(r))}),e.nrm(2,"i",18),e.k0s(),e.DNE(3,w,2,0,"button",19),e.k0s()}if(2&o){const t=e.XpG().$implicit;e.R7$(3),e.vxM(t.id>3?3:-1)}}function X(o,u){if(1&o&&(e.j41(0,"panel",8)(1,"h4",9),e.EFF(2),e.k0s(),e.j41(3,"div",10)(4,"div",11)(5,"h5",12),e.EFF(6),e.k0s()(),e.j41(7,"div",13),e.nrm(8,"div",14),e.k0s()(),e.DNE(9,B,4,1,"div",15),e.k0s()),2&o){const t=u.$implicit,n=e.XpG(2);e.Y8G("title",t.name),e.R7$(2),e.JRh(t.name),e.R7$(4),e.SpI(" Subject : ",t.subject," "),e.R7$(2),e.Y8G("innerHTML",n.get_sanitize_template(t.body),e.npT),e.R7$(),e.Y8G("ngIf",null==n.auth?null:n.auth.role.includes(1))}}function U(o,u){if(1&o){const t=e.RV6();e.j41(0,"app-template-filter",7),e.bIt("openmodalEmitter",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.openmodal())}),e.k0s(),e.Z7z(1,X,10,5,"panel",8,I)}if(2&o){const t=e.XpG();e.R7$(),e.Dyx(t.templateList)}}function z(o,u){1&o&&(e.j41(0,"div",24)(1,"panel",25),e.nrm(2,"ngx-skeleton-loader",26),e.j41(3,"div",10)(4,"div",11)(5,"h5",12),e.nrm(6,"ngx-skeleton-loader",26),e.k0s()(),e.j41(7,"div",13),e.nrm(8,"ngx-skeleton-loader",26),e.k0s()()()()),2&o&&(e.R7$(2),e.Y8G("theme",e.lJ4(3,E)),e.R7$(4),e.Y8G("theme",e.lJ4(4,E)),e.R7$(2),e.Y8G("theme",e.lJ4(5,N)))}function V(o,u){1&o&&(e.j41(0,"div",22),e.DNE(1,z,9,6,"div",23),e.k0s()),2&o&&(e.R7$(),e.Y8G("ngForOf",e.lJ4(1,$).constructor(3)))}let Y=(()=>{class o{constructor(t,n,r,c,h,Z){this.socket=t,this.emailTemplateService=n,this.changeDetector=r,this.commonService=c,this.toastr=h,this.sanitizer=Z,this.templateList=[],this.modaltitle="",this.companyDetails=this.socket.companyDetails}
1ngOnInit(){this.auth=y.k.getAuthData(),this.getTemplateList(),this.emailTemplateService.refreshData=this.getTemplateList.bind(this)}getTemplateList(){this.commonService.GetAPI(g.r.list_email_template).then(t=>{if(1==t.status){this.templateList=t.response;for(let n=0;n<this.templateList.length;n++)this.templateList[n].body=this.templateList[n].body.replace("{{logo}}",this.companyDetails.logo)}else this.templateList=[]}).catch(t=>{this.toastr.error(t.error.message)})}editinit(t){this.modaltitle="Edit Template",this.modalComponent.openModal(t)}openmodal(){this.modaltitle="Add Template",this.modalComponent.openModal({})}get_sanitize_template(t){return this.sanitizer.bypassSecurityTrustHtml(t)}deleteInit(t){C().fire({title:"Are you sure you want to delete this Template?",text:"Delete Template",input:"text",inputPlaceholder:"Type delete here...",icon:"warning",showConfirmButton:!0,confirmButtonText:"Yes",cancelButtonText:"No",showCancelButton:!0,preConfirm:n=>"delete"!==n?(C().showValidationMessage('You must type "delete" to confirm.'),!1):(C().showLoading(),this.commonService.PostAPI(g.r.deleteTemplate,{template_id:t}).then(r=>r.status?(C().fire("Deleted!","Template Deleted Successfully.","success"),this.getTemplateList(),!0):(this.toastr.error(r.message),!1)).catch(r=>(this.toastr.error(r.error.message),!1)))}).then(n=>{n.isDismissed&&console.log("Popup dismissed!")})}static{this.\u0275fac=function(n){return new(n||o)(e.rXU(O.L),e.rXU(m),e.rXU(e.gRc),e.rXU(_.h),e.rXU(s.tw),e.rXU(R.up))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["app-email-template"]],viewQuery:function(n,r){if(1&n&&e.GBs(T,5),2&n){let c;e.mGM(c=e.lsd())&&(r.modalComponent=c.first)}},decls:11,vars:3,consts:[[1,"breadcrumb","float-xl-end"],[1,"breadcrumb-item"],["href","javascript:;"],[1,"breadcrumb-item","active"],[1,"page-header"],["class","row gx-0",4,"ngIf"],[3,"title"],[3,"openmodalEmitter"],["headerClass","d-none","footerClass","pb-0 pt-20px",3,"title"],[1,"panel-title"],[1,"panel-body","card"],[1,"card-header","fw-bold"],[1,"m-1"],[1,"card-body"],[3,"innerHTML"],["class","text-end m-1",4,"ngIf"],[1,"text-end","m-1"],["ngbTooltip","Edit","triggers","hover","placement","top",1,"btn","btn-xs","btn-theme","edit-btn","me-1","mb-1",3,"click"],[1,"fa","fa-pencil"],["ngbTooltip","Delete","triggers","hover","placement","top","title","Delete",1,"btn","btn-xs","btn-danger","delete-btn","me-1","mb-1"],["ngbTooltip","Delete","triggers","hover","placement","top","title","Delete",1,"btn","btn-xs","btn-danger","delete-btn","me-1","mb-1",3,"click"],[1,"fa","fa-trash"],[1,"row","gx-0"],["class","col-xl-12",4,"ngFor","ngForOf"],[1,"col-xl-12"],["headerClass","d-none","footerClass","pb-0 pt-20px"],[3,"theme"]],template:function(n,r){1&n&&(e.j41(0,"ol",0)(1,"li",1)(2,"a",2),e.EFF(3,"Home"),e.k0s()(),e.j41(4,"li",3),e.EFF(5,"Templates"),e.k0s()(),e.j41(6,"h1",4),e.EFF(7,"Templates"),e.k0s(),e.DNE(8,U,3,0)(9,V,2,2,"div",5),e.nrm(10,"app-template-form",6)),2&n&&(e.R7$(8),e.vxM(r.templateList.length>0?8:-1),e.R7$(),e.Y8G("ngIf",0==r.templateList.length),e.R7$(),e.Y8G("title",r.modaltitle))},dependencies:[a.Sq,a.bT,T,L.g,F.md,M.Zm,G]})}}return o})();var D=i(828);const H=[{path:"",component:Y,canActivate:[i(1336).W],data:{title:"Email Template",roles:[D.X.Admin,D.X.AdminReadOnly]}}];let J=(()=>{class o{static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275mod=e.$C({type:o})}static{this.\u0275inj=e.G2t({imports:[f.iI.forChild(H),f.iI]})}}return o})();var W=i(3768);let Q=(()=>{class o{static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275mod=e.$C({type:o})}static{this.\u0275inj=e.G2t({imports:[a.MD,T,J,W.b,F.n8,M.Yq]})}}return o})()},9853:(j,k,i)=>{i.d(k,{Yq:()=>x,Zm:()=>v});var a=i(4438);const f=["*"];function g(m,_){1&m&&a.SdG(0)}function d(m,_){if(1&m&&(a.j41(0,"div",1),a.DNE(1,g,1,0),a.k0s()),2&m){const s=a.XpG(),l=a.r8f(0),p=a.r8f(1);a.Aen(s.styles()),a.AVh("custom-content","custom-content"===l)("circle","circle"===l)("square","square"===l)("progress","progress"===p)("progress-dark","progress-dark"===p)("pulse","pulse"===p)("pulse-dark","pulse-dark"===p),a.BMQ("aria-label",s.ariaLabel())("aria-valuetext",s.loadingText()),a.R7$(),a.vxM("custom-content"===l?1:-1)}}const b=new a.nKC("ngx-skeleton-loader.config");let v=(()=>{class m{constructor(){this.#e=(0,a.WQX)(b,{optional:!0}),this.count=(0,a.hFB)(this.#e?.count||1,{transform:a.Udg}),this.loadingText=(0,a.hFB)(this.#e?.loadingText||"Loading..."),this.appearance=(0,a.hFB)(this.#e?.appearance||"line"),this.animation=(0,a.hFB)(this.#e?.animation||"progress"),this.ariaLabel=(0,a.hFB)(this.#e?.ariaLabel||"loading"),this.theme=(0,a.hFB)(this.#e?.theme||null),this.size=(0,a.hFB)(this.#e?.size||null),this.measureUnit=(0,a.hFB)(this.#e?.measureUnit||"px"),this.items=(0,a.EWP)(()=>{let s=this.count()||1;return"custom-content"===this.appearance()&&(0,a.naY)()&&1!==s&&(console.error('`NgxSkeletonLoaderComponent` enforces elements with "custom-content" appearance as DOM nodes. Forcing "count" to "1".'),s=1),[...Array(s)].map((l,p)=>p)}),this.squareSize=(0,a.EWP)(()=>{const s=this.size();if("square"!==this.appearance()||"number"!=typeof s&&"string"!=typeof s)return null;const l=Number(s.toString().trim().replace(/\D/g,""));return Number.isInteger(l)?`${l}${this.measureUnit()}`:null}),this.styles=(0,a.EWP)(()=>{const s=this.theme(),l=this.squareSize();return this.#e?.theme?.extendsFromRoot?{...this.#e?.theme,...s,...l&&{width:l,height:l}}:{...s,...l&&{width:l,height:l}}})}#e;static{this.\u0275fac=function(l){return new(l||m)}}static{this.\u0275cmp=a.VBU({type:m,selectors:[["ngx-skeleton-loader"]],inputs:{count:[1,"count"],loadingText:[1,"loadingText"],appearance:[1,"appearance"],animation:[1,"animation"],ariaLabel:[1,"ariaLabel"],theme:[1,"theme"],size:[1,"size"],measureUnit:[1,"measureUnit"]},standalone:!0,features:[a.aNF],ngContentSelectors:f,decls:4,vars:2,consts:[["aria-busy","true","aria-valuemin","0","aria-valuemax","100","role","progressbar","tabindex","-1",1,"skeleton-loader",3,"custom-content","circle","square","progress","progress-dark","pulse","pulse-dark","style"],["aria-busy","true","aria-valuemin","0","aria-valuemax","100","role","progressbar","tabindex","-1",1,"skeleton-loader"]],template:function(l,p){1&l&&(a.NAR(),a.SS7(0)(1),a.Z7z(2,d,2,19,"div",0,a.fX1)),2&l&&(a.bH3(p.appearance()),a.R7$(),a.bH3(p.animation()),a.R7$(),a.Dyx(p.items()))},styles:['.skeleton-loader[_ngcontent-%COMP%]{--ngx-skeleton-loader-base-color: rgb(239, 241, 246);--ngx-skeleton-loader-light-mode-color: rgba(255, 255, 255, .6);--ngx-skeleton-loader-light-mode-color-to: rgba(255, 255, 255, 0);--ngx-skeleton-loader-dark-mode-color: rgba(0, 0, 0, .2);--ngx-skeleton-loader-dark-mode-color-to: transparent;--ngx-skeleton-loader-animation-duration: 2s;--ngx-skeleton-loader-background-image-light-mode: linear-gradient( 90deg, var(--ngx-skeleton-loader-light-mode-color-to), var(--ngx-skeleton-loader-light-mode-color), var(--ngx-skeleton-loader-light-mode-color-to) );--ngx-skeleton-loader-background-image-dark-mode: linear-gradient( 90deg, var(--ngx-skeleton-loader-dark-mode-color-to), var(--ngx-skeleton-loader-dark-mode-color), var(--ngx-skeleton-loader-dark-mode-color-to) );box-sizing:border-box;overflow:hidden;position:relative;background:var(--ngx-skeleton-loader-base-color) no-repeat;border-radius:4px;width:100%;height:20px;
1display:inline-block;margin-bottom:10px;will-change:transform}.skeleton-loader[_ngcontent-%COMP%]:after, .skeleton-loader[_ngcontent-%COMP%]:before{box-sizing:border-box}.skeleton-loader.circle[_ngcontent-%COMP%]{width:40px;height:40px;margin:5px;border-radius:50%}.skeleton-loader.square[_ngcontent-%COMP%]{width:40px;height:40px;margin:5px}.skeleton-loader.progress[_ngcontent-%COMP%], .skeleton-loader.progress-dark[_ngcontent-%COMP%]{transform:translateZ(0)}.skeleton-loader.progress[_ngcontent-%COMP%]:after, .skeleton-loader.progress[_ngcontent-%COMP%]:before, .skeleton-loader.progress-dark[_ngcontent-%COMP%]:after, .skeleton-loader.progress-dark[_ngcontent-%COMP%]:before{box-sizing:border-box}.skeleton-loader.progress[_ngcontent-%COMP%]:before, .skeleton-loader.progress-dark[_ngcontent-%COMP%]:before{animation:_ngcontent-%COMP%_progress var(--ngx-skeleton-loader-animation-duration) ease-in-out infinite;background-size:200px 100%;position:absolute;z-index:1;top:0;left:0;width:200px;height:100%;content:""}.skeleton-loader.progress[_ngcontent-%COMP%]:before{background-image:var(--ngx-skeleton-loader-background-image-light-mode)}.skeleton-loader.progress-dark[_ngcontent-%COMP%]:before{background-image:var(--ngx-skeleton-loader-background-image-dark-mode)}.skeleton-loader.pulse[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_pulse var(--ngx-skeleton-loader-animation-duration) cubic-bezier(.4,0,.2,1) infinite;animation-delay:.5s}.skeleton-loader.pulse-dark[_ngcontent-%COMP%]{background:var(--ngx-skeleton-loader-dark-mode-color);animation:_ngcontent-%COMP%_pulse var(--ngx-skeleton-loader-animation-duration) cubic-bezier(.4,0,.2,1) infinite;animation-delay:.5s}.skeleton-loader.custom-content[_ngcontent-%COMP%]{height:100%;background:none}@media (prefers-reduced-motion: reduce){.skeleton-loader.pulse[_ngcontent-%COMP%], .skeleton-loader.progress-dark[_ngcontent-%COMP%], .skeleton-loader.pulse-dark[_ngcontent-%COMP%], .skeleton-loader.custom-content[_ngcontent-%COMP%], .skeleton-loader.progress[_ngcontent-%COMP%]:before{animation:none}.skeleton-loader.progress[_ngcontent-%COMP%]:before, .skeleton-loader.progress-dark[_ngcontent-%COMP%], .skeleton-loader.pulse-dark[_ngcontent-%COMP%], .skeleton-loader.custom-content[_ngcontent-%COMP%]{background-image:none}}@media screen and (min-device-width: 1200px){.skeleton-loader[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none;cursor:wait}}@keyframes _ngcontent-%COMP%_progress{0%{transform:translate3d(-200px,0,0)}to{transform:translate3d(calc(200px + 100vw),0,0)}}@keyframes _ngcontent-%COMP%_pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}'],changeDetection:0})}}return m})(),x=(()=>{class m{static forRoot(s){return{ngModule:m,providers:[{provide:b,useValue:s}]}}static{this.\u0275fac=function(l){return new(l||m)}}static{this.\u0275mod=a.$C({type:m})}static{this.\u0275inj=a.G2t({})}}return m})()}}]);

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.