PageSourceSearch

https://decizone.com/6426.2b00c336fae23b9e.js

js decizone.com collected 2026-10-05 09:48:11 UTC 49,590 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdzweb=self.webpackChunkdzweb||[]).push([[6426],{96426:(Jt,A,c)=>{c.r(A),c.d(A,{CategorySubcategoryListModule:()=>Mt});var C=c(36895),L=c(19132),H=c(69814),z=c(10920),_=c(17489),F=c(44269),p=c(65938),x=c(41206),t=c(94650),R=c(81736),M=c(6855),w=c(64838),D=c(21952),T=c(59549),I=c(4859),N=c(97392),Z=c(51572);function Y(a,s){if(1&a&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&a){const e=t.oxw();t.xp6(1),t.hij(" ",e.saveError," ")}}function j(a,s){if(1&a&&(t.TgZ(0,"div",11),t._uU(1),t.qZA()),2&a){const e=s.$implicit;t.xp6(1),t.Oqu(e.subCategoryName)}}function Q(a,s){1&a&&t._UZ(0,"mat-spinner",12)}let q=(()=>{class a{constructor(e,o,r,i,n,l,m){this.ngZone=e,this.dialogRef=o,this.subCategoryService=r,this._homeService=i,this._flowchartListService=n,this.data=l,this.genericErrMsg="",this.genericErr=!1,this.loading=!1,this.deletingCategory=!1,this.deletingImage=!1,this.loggedInUser="",this.saving=!1,this.saveError="",this.sessionStorage=m,this.orgName=this.data.orgName,this.categoryId=this.data.categoryId,this.subcategoryList=this.data.subcategoryList,this.userAccess=this.data.userAccess}ngOnInit(){}drop(e){let o=this.subcategoryList;o.findIndex(i=>i===e.item.data),(0,x.bA)(o,e.previousIndex,e.currentIndex),console.log("reordered subcategorylist",this.subcategoryList)}saveSubcategorySortOrder(){this.saveError="",this.saving=!0;let e=[];_.forEach(this.subcategoryList,function(r,i){r.subCategorySortOrder=i;let n={};n.subCategoryId=r.subCategoryId,n.subCategorySortOrder=r.subCategorySortOrder,e.push(n)}),console.log("Save this reordered subcategorylist",this.subcategoryList),this.subCategoryService.reorderSubCategory({subcategoryRequestList:e,orgName:this.orgName,userAccess:this.userAccess}).subscribe(r=>{"PUBLIC"===this.orgName?this._homeService.getAuthorizedUserPublicCategoryList().subscribe(i=>{console.log(i),this.sessionStorage.setObject("pubcattree",i.responseBody.categoryTreeResponse);let n=this._flowchartListService.getSubcategoryListInCategoryTreeByCategory(this.orgName,this.categoryId);this._flowchartListService.setSubcategoryListByCategory(n),this._flowchartListService.setOrgName(this.orgName),this._flowchartListService.setSelectedCategoryId(this.categoryId),this.saving=!1,this.dialogRef.close(!0)},i=>{this.dialogRef.close(!0)}):this._homeService.getAuthorizedUserCategoryList().subscribe(i=>{console.log(i),this.sessionStorage.setObject("cattree",i.responseBody.categoryTreeResponse);let n=this._flowchartListService.getSubcategoryListInCategoryTreeByCategory(this.orgName,this.categoryId);this._flowchartListService.setSubcategoryListByCategory(n),this._flowchartListService.setOrgName(this.orgName),this._flowchartListService.setSelectedCategoryId(this.categoryId),this.saving=!1,this.dialogRef.close(!0)},i=>{this.dialogRef.close(!0)})},r=>{this.saving=!1,this.saveError="Error occurred in saving category reorder.  Please try again."})}close(){this.ngZone.run(()=>{this.dialogRef.close(!1)})}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(t.R0b),t.Y36(p.so),t.Y36(R.K),t.Y36(M.Y),t.Y36(w.A),t.Y36(p.WI),t.Y36(D.qo))},a.\u0275cmp=t.Xpm({type:a,selectors:[["ng-component"]],decls:17,vars:4,consts:[[1,"dz-dialog-subcontainer","rearrange-items-subcontr"],["id","subcat-rearrange-close","mat-button","","aria-label","Close this rearrange subcategory panel.",1,"close-cross","dz-dialog-close",3,"click"],[1,"dz-dialog-top"],["tabindex","0",1,"dialog-header"],[1,"dz-dialog-scrolling-body"],[4,"ngIf"],["cdkDropList","",1,"item-list",3,"cdkDropListDropped"],["class","item-box","cdkDrag","",4,"ngFor","ngForOf"],["mat-dialog-actions","",1,"dz-dialog-bottom","dialogue-buttons"],["id","subcat-rearrange-save","mat-raised-button","","aria-label","Click to Save changes or press Escape key to close","color","accent",1,"rearrange-save-button",3,"disabled","click"],["class","app-spinner",4,"ngIf"],["cdkDrag","",1,"item-box"],[1,"app-spinner"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"button",1),t.NdJ("click",function(){return o.close()}),t.TgZ(2,"mat-icon"),t._uU(3,"close"),t.qZA()(),t.TgZ(4,"div",2)(5,"h1",3),t._uU(6," Drag Items to Rearrange/Reorder "),t.qZA()(),t.TgZ(7,"div",4),t.YNc(8,Y,2,1,"mat-error",5),t.TgZ(9,"div",6),t.NdJ("cdkDropListDropped",function(i){return o.drop(i)}),t.YNc(10,j,2,1,"div",7),t.qZA()(),t.TgZ(11,"div",8)(12,"button",9),t.NdJ("click",function(){return o.saveSubcategorySortOrder()}),t.YNc(13,Q,1,0,"mat-spinner",10),t.TgZ(14,"mat-icon"),t._uU(15,"save"),t.qZA(),t._uU(16,"Save"),t.qZA()()()),2&e&&(t.xp6(8),t.Q6J("ngIf",o.saveError),t.xp6(2),t.Q6J("ngForOf",o.subcategoryList),t.xp6(2),t.Q6J("disabled",o.saving),t.xp6(1),t.Q6J("ngIf",o.saving))},dependencies:[C.sg,C.O5,T.TO,I.lW,p.H8,N.Hw,Z.Ou,x.Wj,x.Zt],styles:[".dz-dialog-subcontainer[_ngcontent-%COMP%]   .rearrange-items-subcontr[_ngcontent-%COMP%]{height:94%}.item-list[_ngcontent-%COMP%]{min-width:300px;height:400px;max-width:80%;border:solid 1px #696969;min-height:50px;display:block;margin:20px auto;background:white;border-radius:4px;overflow:auto}.item-box[_ngcontent-%COMP%]{padding:10px;border-bottom:solid 1px #ccc;color:#000000de;box-sizing:border-box;
1cursor:move;background:white;font-size:14px}.rearrange-save-button[_ngcontent-%COMP%]{display:block;margin:0 auto}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.item-box[_ngcontent-%COMP%]:last-child{border:none}.item-list.cdk-drop-list-dragging[_ngcontent-%COMP%]   .item-box[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}"]}),a})();var K=c(15861),g=c(24006),E=c(31934),G=c(69327),W=c(65244),B=c(93531),V=c(284),$=c(87314),k=c(10266);const X=["fileInput"];function tt(a,s){if(1&a&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&a){const e=t.oxw();t.xp6(1),t.hij(" ",e.genericErrMsg," ")}}function et(a,s){1&a&&(t.TgZ(0,"mat-error"),t._uU(1," Use only these [a-z, A-Z, 0-9, -, whitespace] and Max 50 characters. "),t.qZA())}function ot(a,s){if(1&a&&(t.TgZ(0,"div"),t.YNc(1,et,2,0,"mat-error",6),t.qZA()),2&a){const e=t.oxw();
1t.xp6(1),t.Q6J("ngIf",e.subcatEditForm.controls.currentSubcatName.errors.pattern)}}function at(a,s){1&a&&(t.TgZ(0,"p",37),t._uU(1," Note: If you upload the image again, it will replace the current image with new uploaded image for this Subcategory. "),t.qZA())}function rt(a,s){if(1&a&&t._UZ(0,"div",38),2&a){const e=t.oxw();t.Jzz("background-image: url(",e.currentImageUrl,");")}}function it(a,s){1&a&&t._UZ(0,"div",39)}function st(a,s){1&a&&t._UZ(0,"mat-spinner",41)}function nt(a,s){if(1&a){const e=t.EpF();t.TgZ(0,"button",40),t.NdJ("click",function(r){t.CHM(e);const i=t.oxw();return r.stopPropagation(),t.KtG(i.deleteSubcategoryImage())}),t.YNc(1,st,1,0,"mat-spinner",36),t.TgZ(2,"mat-icon"),t._uU(3,"delete_forever"),t.qZA(),t._uU(4," Delete Image "),t.qZA()}if(2&a){const e=t.oxw();t.Q6J("matTooltipShowDelay",700)("matTooltipHideDelay",300),t.xp6(1),t.Q6J("ngIf",e.deletingImage)}}function ct(a,s){if(1&a){const e=t.EpF();t.TgZ(0,"button",52),t.NdJ("click",function(){t.CHM(e);const r=t.oxw(2);return t.KtG(r.toggleContainWithinAspectRatio())}),t.TgZ(1,"mat-icon"),t._uU(2,"filter_center_focus"),t.qZA()()}2&a&&t.Q6J("matTooltipShowDelay",700)("matTooltipHideDelay",300)}function gt(a,s){if(1&a){const e=t.EpF();t.TgZ(0,"button",53),t.NdJ("click",function(){t.CHM(e);const r=t.oxw(2);return t.KtG(r.toggleContainWithinAspectRatio())}),t.TgZ(1,"mat-icon"),t._uU(2,"settings_overscan"),t.qZA()()}2&a&&t.Q6J("matTooltipShowDelay",700)("matTooltipHideDelay",300)}function lt(a,s){if(1&a){const e=t.EpF();t.TgZ(0,"div",42)(1,"button",43),t.NdJ("click",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.rotateRight())}),t.TgZ(2,"mat-icon"),t._uU(3,"rotate_90_degrees_cw"),t.qZA()(),t.TgZ(4,"button",44),t.NdJ("click",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.rotateLeft())}),t.TgZ(5,"mat-icon"),t._uU(6,"rotate_90_degrees_ccw"),t.qZA()(),t.TgZ(7,"button",45),t.NdJ("click",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.flipHorizontal())}),t.TgZ(8,"mat-icon"),t._uU(9,"switch_right"),t.qZA()(),t.TgZ(10,"button",46),t.NdJ("click",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.flipVertical())}),t.TgZ(11,"mat-icon"),t._uU(12,"unfold_more"),t.qZA()(),t.YNc(13,ct,3,2,"button",47),t.YNc(14,gt,3,2,"button",48),t.TgZ(15,"button",49),t.NdJ("click",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.resetImage())}),t.TgZ(16,"mat-icon"),t._uU(17,"refresh"),t.qZA()(),t.TgZ(18,"button",50),t.NdJ("click",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.zoomOut())}),t.TgZ(19,"mat-icon"),t._uU(20,"zoom_out"),t.qZA()(),t.TgZ(21,"button",51),t.NdJ("click",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.zoomIn())}),t.TgZ(22,"mat-icon"),t._uU(23,"zoom_in"),t.qZA()()()}if(2&a){const e=t.oxw();
1t.xp6(1),t.Q6J("matTooltipShowDelay",700)("matTooltipHideDelay",300),t.xp6(3),t.Q6J("matTooltipShowDelay",700)("matTooltipHideDelay",300),t.xp6(3),t.Q6J("matTooltipShowDelay",700)("matTooltipHideDelay",300),t.xp6(3),t.Q6J("matTooltipShowDelay",700)("matTooltipHideDelay",300),t.xp6(3),t.Q6J("ngIf",!e.containWithinAspectRatio),t.xp6(1),t.Q6J("ngIf",e.containWithinAspectRatio),t.xp6(1),t.Q6J("matTooltipShowDelay",700)("matTooltipHideDelay",300),t.xp6(3),t.Q6J("matTooltipShowDelay",700)("matTooltipHideDelay",300),t.xp6(3),t.Q6J("matTooltipShowDelay",700)("matTooltipHideDelay",300)}}function ut(a,s){1&a&&(t.TgZ(0,"p"),t._uU(1,"Rotate Image"),t.qZA())}const dt=function(){return{standalone:!0}};function pt(a,s){if(1&a){const e=t.EpF();t.TgZ(0,"mat-slider",54),t.NdJ("ngModelChange",function(r){t.CHM(e);const i=t.oxw();return t.KtG(i.rotation=r)})("change",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.updateRotation())}),t._uU(1,"Rotate Image"),t.qZA()}if(2&a){const e=t.oxw();t.Q6J("matTooltipShowDelay",700)("matTooltipHideDelay",300)("thumbLabel",e.thumbLabel)("ngModel",e.rotation)("ngModelOptions",t.DdM(5,dt))}}function mt(a,s){if(1&a&&(t.TgZ(0,"div")(1,"p"),t._uU(2,"Preview:"),t.qZA(),t._UZ(3,"img",55),t.qZA()),2&a){const e=t.oxw();
1t.xp6(3),t.Udp("border",e.croppedImage?"1px solid black":"none"),t.Q6J("src",e.croppedImage,t.LSH)}}function yt(a,s){if(1&a&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&a){const e=t.oxw();t.xp6(1),t.hij(" ",e.uploadErrMsg," ")}}function bt(a,s){1&a&&t._UZ(0,"mat-spinner",41)}function ht(a,s){if(1&a){const e=t.EpF();t.TgZ(0,"button",56),t.NdJ("click",function(r){t.CHM(e);const i=t.oxw();return r.stopPropagation(),t.KtG(i.deleteSubcategory())}),t.YNc(1,bt,1,0,"mat-spinner",36),t._uU(2,"Delete "),t.qZA()}if(2&a){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.deletingSubcategory)}}function _t(a,s){1&a&&t._UZ(0,"mat-spinner",41)}let ft=(()=>{class a{constructor(e,o,r,i,n,l,m,S,y,u){var h;this.ngZone=e,this.dialogRef=o,this.router=r,this._userMilestoneService=i,this._homeService=n,this._utilService=l,this.subcategoryService=m,this._flowchartListService=S,this.data=y,this.genericErrMsg="",this.genericErr=!1,this.loading=!1,this.deletingImage=!1,this.deletingSubcategory=!1,this.loggedInUser="",this.canDeleteSubcategory=!1,this.uploadErr=!1,this.uploadErrMsg="",this.imageChangedEvent="",this.croppedImage="",this.showCropper=!1,this.canvasRotation=0,this.rotation=0,this.scale=1,this.containWithinAspectRatio=!1,this.transform={},this.thumbLabel=!0,this.value=0,this.sessionStorage=u,this.orgName=this.data.orgName,this.orgId=this.data.orgId,this.categoryId=this.data.categoryId,this.categoryName=this.data.categoryName,this.currentSubCategoryObj=this.data.subCategoryObj,this.currentSubcatName=this.currentSubCategoryObj.subCategoryName,this.currentSubcatDescription=this.currentSubCategoryObj.subCategoryDescription,this.currentImageUrl=this.currentSubCategoryObj.subCategoryImageUrl,this.currentSubcatCustomKeyName=this.currentSubCategoryObj.subcategoryCustomKeyName,this.currentSubcatCustomKeyValue=this.currentSubCategoryObj.subcategoryCustomKeyValue,this.userAccess=this.currentSubCategoryObj.userAccess,this.canDeleteSubcategory=_.includes(this.currentSubCategoryObj.privileges,"DELETE"),h=this.sessionStorage.getObject("userProfile"),this.loggedInUser=h.displayName}ngOnInit(){this.subcatEditForm=new g.nJ({currentSubcatName:new g.p4("",[g.kI.required,g.kI.pattern("^[a-zA-Z0-9\\- ]+([a-zA-Z0-9\\- ])*$")]),currentSubcatDescription:new g.p4("",[g.kI.maxLength(200)]),currentSubcatCustomKeyName:new g.p4("",[g.kI.maxLength(30)]),currentSubcatCustomKeyValue:new g.p4("",[g.kI.maxLength(50)])}),this.subcatEditForm.controls.currentSubcatName.setValue(this.currentSubcatName),this.subcatEditForm.controls.currentSubcatDescription.setValue(this.currentSubcatDescription),this.subcatEditForm.controls.currentSubcatCustomKeyName.setValue(this.currentSubcatCustomKeyName),this.subcatEditForm.controls.currentSubcatCustomKeyValue.setValue(this.currentSubcatCustomKeyValue)}fileChangeEvent(e){this.imageChangedEvent=e}imageCropped(e){this.croppedImage=e.base64,console.log(e,(0,E.Ll)(e.base64))}imageLoaded(){this.showCropper=!0,console.log("Image loaded")}cropperReady(e){console.log("Cropper ready",e)}loadImageFailed(){console.log("Load failed"),this.genericErr=!0,this.genericErrMsg="Loading Image Failed"}rotateLeft(){this.canvasRotation--,this._flipAfterRotate(),this.updateRotation()}rotateRight(){this.canvasRotation++,this._flipAfterRotate(),this.updateRotation()}_flipAfterRotate(){this.transform={...this.transform,flipH:this.transform.flipV,flipV:this.transform.flipH}}flipHorizontal(){this.transform={...this.transform,flipH:!this.transform.flipH}}flipVertical(){this.transform={...this.transform,flipV:!this.transform.flipV}}resetImage(){this.scale=1,this.rotation=0,this.canvasRotation=0,this.transform={}}zoomOut(){this.scale-=.1,this.transform={...this.transform,scale:this.scale}}zoomIn(){this.scale+=.1,this.transform={...this.transform,scale:this.scale}}toggleContainWithinAspectRatio(){this.containWithinAspectRatio=!this.containWithinAspectRatio}updateRotation(){this.transform={...this.transform,rotate:this.rotation}}validateSelectedFile(e){this.uploadErr=!1,this.uploadErrMsg=this._utilService.validateSelectedImage(e),this.uploadErrMsg&&(this.uploadErr=!0)}dataURItoBlob(e){const o=atob(e.split(",")[1]),r=[];for(let i=0;i<o.length;
1i++)r.push(o.charCodeAt(i));return new Blob([new Uint8Array(r)],{type:"image/png"})}editSubCategory(){var e=this;return(0,K.Z)(function*(){e.loading=!0;var o=e.subcatEditForm.get("currentSubcatName").value,r=e.subcatEditForm.get("currentSubcatDescription").value,i=e.subcatEditForm.get("currentSubcatCustomKeyName").value,n=e.subcatEditForm.get("currentSubcatCustomKeyValue").value;let l=e.fileInput.nativeElement;if(e.currentSubcatName!==o||e.currentSubcatDescription!==r||l.files.length>0||e.currentSubcatCustomKeyName!==i||e.currentSubcatCustomKeyValue!==n){let S=!1;e.currentSubcatDescription!==r&&(S=!0);let y={requestor:e.loggedInUser,orgName:e.orgName,orgId:e.orgId,currentSubCategoryName:e.currentSubCategoryObj.subCategoryName,subCategoryName:o,currentSubCategoryDescription:e.currentSubCategoryObj.subCategoryDescription,isSubcatDescriptionUpdated:S,subCategoryDescription:r,currentSubcatCustomKeyName:e.currentSubCategoryObj.currentSubcatCustomKeyName,currentSubcatCustomKeyValue:e.currentSubCategoryObj.currentSubcatCustomKeyValue,subcategoryCustomKeyName:i,subcategoryCustomKeyValue:n,subCategoryId:e.currentSubCategoryObj.subCategoryId,categoryId:e.categoryId,categoryName:e.categoryName,userAccess:e.currentSubCategoryObj.userAccess,subCategoryImageData:"",subCategoryImageName:""};if(e.croppedImage){let u=l.files.item(0).name.replace(/\s/g,"");u=u.replace(/[\])}[{(]/g,"");let h=u.substring(0,u.indexOf("."))+".png";console.log("png file name",h);const b=e.dataURItoBlob(e.croppedImage);let v=new File([b],h,{type:"image/png"});const Bt={maxSizeMB:.5,useWebWorker:!1};let J=v;try{const d=yield(0,G.Z)(v,Bt);console.log("compressedFile instanceof Blob",d instanceof Blob),console.log(`compressedFile size ${d.size/1024/1024} MB`),J=d}catch(d){console.log(d)}let P="",U=new FileReader;U.readAsDataURL(J),U.onload=()=>{P=U.result.toString().split(",")[1],y.subCategoryImageName=h,y.subCategoryImageData=P,e.subcategoryService.editSubcategory(y).subscribe(d=>{e._userMilestoneService.saveOrUpdateUserMilestone("EDITED_CATEGORY_SUBCATEGORY_GOAL",null),"PUBLIC"===e.orgName?e._homeService.getAuthorizedUserPublicCategoryList().subscribe(f=>{console.log(f),e.sessionStorage.setObject("pubcattree",f.responseBody.categoryTreeResponse);let O=e._flowchartListService.getSubcategoryListInCategoryTreeByCategory(e.orgName,e.categoryId);e._flowchartListService.setSubcategoryListByCategory(O),e._flowchartListService.setOrgName(e.orgName),e._flowchartListService.setSelectedCategoryId(e.categoryId),e.genericErr=!1,e.loading=!1,e.dialogRef.close(!0)},f=>{e.dialogRef.close(!0)}):e._homeService.getAuthorizedUserCategoryList().subscribe(f=>{console.log(f),e.sessionStorage.setObject("cattree",f.responseBody.categoryTreeResponse);let O=e._flowchartListService.getSubcategoryListInCategoryTreeByCategory(e.orgName,e.categoryId);e._flowchartListService.setSubcategoryListByCategory(O),e._flowchartListService.setOrgName(e.orgName),e._flowchartListService.setSelectedCategoryId(e.categoryId),e.genericErr=!1,e.loading=!1,e.dialogRef.close(!0)},f=>{e.dialogRef.close(!0)});let kt={event:"edit_subcat","dlv-user_state_id":"loggedin","dlv-user_id":e._utilService.getLoggedInUserId(),"dlv-org_member":e._utilService.isLoggedInUserOrgUser(),"dlv-user_role_id":e._utilService.getLoggedInUserRole(),"dlv-org_id":e.orgId,"dlv-cat_id":e.categoryId,"dlv-subcat_id":e.currentSubCategoryObj.subCategoryId};window.dataLayer.push(kt)},d=>{e.genericErr=!0,e.loading=!1,e.genericErrMsg=d&&d.error&&"500"===d.error.statusCode?"Unexpected error occurred while updating Subcategory information.  Please contact DeciZone support team.":d&&d.error&&d.error.statusMessage?d.error.statusMessage:"Unexpected error occurred.  Please try after sometime."})}}else e.subcategoryService.editSubcategory(y).subscribe(u=>{e._userMilestoneService.saveOrUpdateUserMilestone("EDITED_CATEGORY_SUBCATEGORY_GOAL",null),"PUBLIC"===e.orgName?e._homeService.getAuthorizedUserPublicCategoryList().subscribe(b=>{console.log(b),e.sessionStorage.setObject("pubcattree",b.responseBody.categoryTreeResponse);let v=e._flowchartListService.getSubcategoryListInCategoryTreeByCategory(e.orgName,e.categoryId);e._flowchartListService.setSubcategoryListByCategory(v),e._flowchartListService.setOrgName(e.orgName),e._flowchartListService.setSelectedCategoryId(e.categoryId),e.genericErr=!1,e.loading=!1,e.dialogRef.close(!0)},b=>{}):e._homeService.getAuthorizedUserCategoryList().subscribe(b=>{console.log(b),e.sessionStorage.setObject("cattree",b.responseBody.categoryTreeResponse);let v=e._flowchartListService.getSubcategoryListInCategoryTreeByCategory(e.orgName,e.categoryId);e._flowchartListService.setSubcategoryListByCategory(v),e._flowchartListService.setOrgName(e.orgName),e._flowchartListService.setSelectedCategoryId(e.categoryId),e.genericErr=!1,e.loading=!1,e.dialogRef.close(!0)},b=>{});let h={event:"edit_subcat","dlv-user_state_id":"loggedin","dlv-user_id":e._utilService.getLoggedInUserId(),"dlv-org_member":e._utilService.isLoggedInUserOrgUser(),"dlv-user_role_id":e._utilService.getLoggedInUserRole(),"dlv-org_id":e.orgId,"dlv-cat_id":e.categoryId,"dlv-subcat_id":e.currentSubCategoryObj.subCategoryId};window.dataLayer.push(h)},u=>{e.genericErr=!0,e.loading=!1,e.genericErrMsg=u&&u.error&&"500"===u.error.statusCode?"Unexpected error occurred while updating Subcategory information.  Please contact DeciZone support team.":u&&u.error&&u.error.statusMessage?u.error.statusMessage:""})}else e.loading=!1,e.dialogRef.close(!1);return e.dialogRef.afterClosed()})()}deleteSubcategoryImage(){this.genericErr=!1,this.deletingImage=!0,this.subcategoryService.deleteSubcategoryImage({requestor:this.loggedInUser,orgName:this.orgName,orgId:this.orgId,subCategoryId:this.currentSubCategoryObj.subCategoryId,userAccess:this.currentSubCategoryObj.userAccess,deleteSubcategoryImage:!0}).subscribe(o=>{"PUBLIC"===this.orgName?this._homeService.getAuthorizedUserPublicCategoryList().subscribe(r=>{console.log(r),this.sessionStorage.setObject("pubcattree",r.responseBody.categoryTreeResponse);let i=this._flowchartListService.getSubcategoryListInCategoryTreeByCategory(this.orgName,this.categoryId);this._flowchartListService.setSubcategoryListByCategory(i),this._flowchartListService.setOrgName(this.orgName),this._flowchartListService.setSelectedCategoryId(this.categoryId),this.genericErr=!1,this.loading=!1,this.dialogRef.close(!0)},r=>{}):this._homeService.getAuthorizedUserCategoryList().subscribe(r=>{console.log(r),this.sessionStorage.setObject("cattree",r.responseBody.categoryTreeResponse);let i=this._flowchartListService.getSubcategoryListInCategoryTreeByCategory(this.orgName,this.categoryId);this._flowchartListService.setSubcategoryListByCategory(i),this._flowchartListService.setOrgName(this.orgName),this._flowchartListService.setSelectedCategoryId(this.categoryId),this.genericErr=!1,this.loading=!1,this.dialogRef.close(!0)},r=>{})},o=>{this.genericErr=!0,this.deletingImage=!1,this.genericErrMsg=o&&o.error&&"500"===o.error.statusCode?"Unexpected error occurred while deleting Subcategory image.  Please contact DeciZone support team.":o&&o.error&&o.error.statusMessage?o.error.statusMessage:""})}deleteSubcategory(){this.genericErr=!1,this.deletingSubcategory=!0,this.subcategoryService.deleteSubcategory({requestor:this.loggedInUser,orgName:this.orgName,orgId:this.orgId,subCategoryId:this.currentSubCategoryObj.subCategoryId,userAccess:this.currentSubCategoryObj.userAccess,deleteSubcategory:!0}).subscribe(o=>{"PUBLIC"===this.orgName?this._homeService.getAuthorizedUserPublicCategoryList().subscribe(r=>{console.log(r),this.sessionStorage.setObject("pubcattree",r.responseBody.categoryTreeResponse);let i=this._flowchartListService.getSubcategoryListInCategoryTreeByCategory(this.orgName,this.categoryId);this._flowchartListService.setSubcategoryListByCategory(i),this._flowchartListService.setOrgName(this.orgName),this._flowchartListService.setSelectedCategoryId(this.categoryId),this.genericErr=!1,this.loading=!1,this.dialogRef.close(!0)},r=>{}):this._homeService.getAuthorizedUserCategoryList().subscribe(r=>{console.log(r),this.sessionStorage.setObject("cattree",r.responseBody.categoryTreeResponse);let i=this._flowchartListService.getSubcategoryListInCategoryTreeByCategory(this.orgName,this.categoryId);this._flowchartListService.setSubcategoryListByCategory(i),this._flowchartListService.setOrgName(this.orgName),this._flowchartListService.setSelectedCategoryId(this.categoryId),this.genericErr=!1,this.loading=!1,this.dialogRef.close(!0)},r=>{})},o=>{this.genericErr=!0,this.deletingSubcategory=!1,this.genericErrMsg=o&&o.error&&"500"===o.error.statusCode?"Unexpected error occurred while deleting Subcategory.  Please contact DeciZone support team.":o&&o.error&&o.error.statusMessage?o.error.statusMessage:""})}close(){this.ngZone.run(()=>{this.dialogRef.close(!1)})}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(t.R0b),t.Y36(p.so),t.Y36(L.F0),t.Y36(W.d),t.Y36(M.Y),t.Y36(B.f),t.Y36(R.K),t.Y36(w.A),t.Y36(p.WI),t.Y36(D.qo))}
1,a.\u0275cmp=t.Xpm({type:a,selectors:[["ng-component"]],viewQuery:function(e,o){if(1&e&&t.Gf(X,5),2&e){let r;t.iGM(r=t.CRH())&&(o.fileInput=r.first)}},decls:75,vars:38,consts:[[1,"dz-dialog-subcontainer","edit-subcategory-subcontr"],["id","editsubcat-close","mat-button","","aria-label","Close this edit subcategory panel.",1,"close-cross","dz-dialog-close",3,"click"],[1,"dz-dialog-top"],["mat-dialog-title","",1,"editformtitle"],[1,"dz-dialog-scrolling-body"],[1,"the-form",3,"formGroup"],[4,"ngIf"],["tabindex","0"],[1,"creatorname","small-grey-text"],[1,"form-full-width"],["type","text","aria-label","Subcategory Name","matInput","","placeholder","Subcategory Name","maxlength","50","name","currentSubcatName","formControlName","currentSubcatName","required","",3,"value"],["currentSubcatName",""],["align","start"],["align","end"],["aria-label","Subcategory Description","matInput","","placeholder","Enter Description (optional)","maxlength","200","name","currentSubcatDescription","formControlName","currentSubcatDescription",3,"value"],["currentSubcatDescription",""],["type","text","matInput","","placeholder","Enter Subcategory Custom Key Name","maxlength","30","name","currentSubcatCustomKeyName","formControlName","currentSubcatCustomKeyName",3,"value"],["currentSubcatCustomKeyName",""],["type","text","matInput","","placeholder","Enter Subcategory Custom Key Value","maxlength","50","name","currentSubcatCustomKeyValue","formControlName","currentSubcatCustomKeyValue",3,"value"],["currentSubcatCustomKeyValue",""],[1,"imageuploaddiv"],["class","editformsmalltext",4,"ngIf"],["class","uploadedimagediv",3,"style",4,"ngIf"],["class","uploadedimagediv","style","\n            background-image: url('assets/images/Sub-Category-style-white-18dp.svg');\n          ",4,"ngIf"],["id","editsubcat-delimg","matTooltip","Delete Subcategory Image","mat-icon-button","",3,"matTooltipShowDelay","matTooltipHideDelay","click",4,"ngIf"],[1,"uploadoption"],["for","file"],["type","file","accept","image/png, image/jpeg, image/jpg","id","image",1,"file-selector",3,"change"],["fileInput",""],["class","cropper-tools-container",4,"ngIf"],["class","cropper-rotation-slider","matTooltip","Rotate image.","name","rotation","tickInterval","30","min","0","max","359","aria-label","degrees",3,"matTooltipShowDelay","matTooltipHideDelay","thumbLabel","ngModel","ngModelOptions","ngModelChange","change",4,"ngIf"],["format","png",1,"image-cropper-container",3,"imageChangedEvent","maintainAspectRatio","containWithinAspectRatio","aspectRatio","resizeToWidth","cropperMinWidth","onlyScaleDown","roundCropper","canvasRotation","transform","alignImage","imageCropped","imageLoaded","cropperReady","loadImageFailed"],["mat-dialog-actions","",1,"dz-dialog-bottom","dialogue-buttons"],["id","editsubcat-cancel","type","button","mat-button","",3,"click"],["id","editsubcat-deletesubcat","type","button","mat-button","",3,"click",4,"ngIf"],["id","editsubcat-update","type","button","mat-raised-button","","cdkFocusInitial","",3,"disabled","click"],["class","app-spinner",4,"ngIf"],[1,"editformsmalltext"],[1,"uploadedimagediv"],[1,"uploadedimagediv",2,"background-image","url('assets/images/Sub-Category-style-white-18dp.svg')"],["id","editsubcat-delimg","matTooltip","Delete Subcategory Image","mat-icon-button","",3,"matTooltipShowDelay","matTooltipHideDelay","click"],[1,"app-spinner"],[1,"cropper-tools-container"],["matTooltip","Rotate 90 deg. Right","mat-mini-fab","","color","accent",1,"croppertool-button",3,"matTooltipShowDelay","matTooltipHideDelay","click"],["matTooltip","Rotate 90 deg. Left","mat-mini-fab","","color","accent",1,"croppertool-button",3,"matTooltipShowDelay","matTooltipHideDelay","click"],["matTooltip","Flip Horizontal","mat-mini-fab","","color","accent",1,"croppertool-button",3,"matTooltipShowDelay","matTooltipHideDelay","click"],["matTooltip","Flip Vertical","mat-mini-fab","","color","accent",1,"croppertool-button",3,"matTooltipShowDelay","matTooltipHideDelay","click"],["matTooltip","Contain Within Aspect Ratio","class","croppertool-button","mat-mini-fab","","color","accent",3,"matTooltipShowDelay","matTooltipHideDelay","click",4,"ngIf"],["matTooltip","Fill Aspect Ratio","class","croppertool-button","mat-mini-fab","","color","accent",3,"matTooltipShowDelay","matTooltipHideDelay","click",4,"ngIf"],["matTooltip","Re
1set Image","mat-mini-fab","","color","accent",1,"croppertool-button",3,"matTooltipShowDelay","matTooltipHideDelay","click"],["matTooltip","Zoom Out","mat-mini-fab","","color","accent",1,"croppertool-button",3,"matTooltipShowDelay","matTooltipHideDelay","click"],["matTooltip","Zoom In","mat-mini-fab","","color","accent",1,"croppertool-button",3,"matTooltipShowDelay","matTooltipHideDelay","click"],["matTooltip","Contain Within Aspect Ratio","mat-mini-fab","","color","accent",1,"croppertool-button",3,"matTooltipShowDelay","matTooltipHideDelay","click"],["matTooltip","Fill Aspect Ratio","mat-mini-fab","","color","accent",1,"croppertool-button",3,"matTooltipShowDelay","matTooltipHideDelay","click"],["matTooltip","Rotate image.","name","rotation","tickInterval","30","min","0","max","359","aria-label","degrees",1,"cropper-rotation-slider",3,"matTooltipShowDelay","matTooltipHideDelay","thumbLabel","ngModel","ngModelOptions","ngModelChange","change"],[1,"custom-cropped-image",3,"src"],["id","editsubcat-deletesubcat","type","button","mat-button","",3,"click"]],template:function(e,o){if(1&e&&(t.TgZ(0,"div",0)(1,"button",1),t.NdJ("click",function(){return o.close()}),t.TgZ(2,"mat-icon"),t._uU(3,"close"),t.qZA()(),t.TgZ(4,"div",2)(5,"p",3),t._uU(6,"Edit Subcategory"),t.qZA()(),t.TgZ(7,"div",4)(8,"form",5),t.YNc(9,tt,2,1,"mat-error",6),t.TgZ(10,"mat-dialog-content",7),t._uU(11," Current Subcategory: "),t.TgZ(12,"strong"),t._uU(13),t.qZA()(),t.TgZ(14,"p",8),t._uU(15),t.qZA(),t.TgZ(16,"mat-form-field",9),t._UZ(17,"input",10,11),t.TgZ(19,"mat-hint",12)(20,"strong"),t._uU(21,"Use only these [a-z, A-Z, 0-9, -, whitespace] and Max 50 characters!"),t.qZA()(),t.TgZ(22,"mat-hint",13),t._uU(23),t.qZA()(),t.YNc(24,ot,2,1,"div",6),t.TgZ(25,"mat-form-field",9),t._UZ(26,"textarea",14,15),t.TgZ(28,"mat-hint",12)(29,"strong"),t._uU(30,"Max 200 characters!"),t.qZA()(),t.TgZ(31,"mat-hint",13),t._uU(32),t.qZA()(),t.TgZ(33,"mat-form-field",9),t._UZ(34,"input",16,17),t.TgZ(36,"mat-hint",12)(37,"strong"),t._uU(38,"Max 30 characters."),t.qZA()(),t.TgZ(39,"mat-hint",13),t._uU(40),t.qZA()(),t.TgZ(41,"mat-form-field",9),t._UZ(42,"input",18,19),t.TgZ(44,"mat-hint",12)(45,"strong"),t._uU(46,"Default will be Subcategory name. You can override by using only these [a-z, A-Z, 0-9, -, whitespace] and Max 50 characters."),t.qZA()(),t.TgZ(47,"mat-hint",13),t._uU(48),t.qZA()(),t.TgZ(49,"div",20),t.YNc(50,at,2,0,"p",21),t.YNc(51,rt,1,3,"div",22),t.YNc(52,it,1,0,"div",23),t.YNc(53,nt,5,3,"button",24),t.qZA(),t.TgZ(54,"div",25)(55,"label",26),t._uU(56,"Upload New Image"),t.qZA(),t._UZ(57,"br"),t.TgZ(58,"input",27,28),t.NdJ("change",function(i){return o.validateSelectedFile(i),o.fileChangeEvent(i)}),t.qZA(),t.YNc(60,lt,24,16,"div",29),t.YNc(61,ut,2,0,"p",6),t.YNc(62,pt,2,6,"mat-slider",30),t._UZ(63,"br")(64,"br"),t.TgZ(65,"image-cropper",31),t.NdJ("imageCropped",function(i){return o.imageCropped(i)})("imageLoaded",function(){return o.imageLoaded()})("cropperReady",function(i){return o.cropperReady(i)})("loadImageFailed",function(){return o.loadImageFailed()}),t.qZA(),t.YNc(66,mt,4,3,"div",6),t.qZA(),t.YNc(67,yt,2,1,"mat-error",6),t.qZA()(),t.TgZ(68,"div",32)(69,"button",33),t.NdJ("click",function(){return o.close()}),t._uU(70," Cancel "),t.qZA(),t.YNc(71,ht,3,1,"button",34),t.TgZ(72,"button",35),t.NdJ("click",function(){return o.editSubCategory()}),t.YNc(73,_t,1,0,"mat-spinner",36),t._uU(74,"Update "),t.qZA()()()),2&e){const r=t.MAs(18),i=t.MAs(27),n=t.MAs(35),l=t.MAs(43);t.xp6(8),t.Q6J("formGroup",o.subcatEditForm),t.xp6(1),t.Q6J("ngIf",o.genericErr),t.xp6(4),t.hij(" ",o.currentSubCategoryObj.subCategoryName,""),t.xp6(2),t.hij(" Created by: ",o.currentSubCategoryObj.subCategoryCreator," "),t.xp6(2),t.Q6J("value",r),t.xp6(6),t.hij("",(null==r.value?null:r.value.length)||0," / 50"),t.xp6(1),t.Q6J("ngIf",o.subcatEditForm.controls.currentSubcatName.errors&&(o.subcatEditForm.controls.currentSubcatName.dirty||o.subcatEditForm.controls.currentSubcatName.touched)),t.xp6(2),t.Q6J("value",i),t.xp6(6),t.hij("",(null==i.value?null:i.value.length)||0," / 200"),t.xp6(2),t.Q6J("value",n),t.xp6(6),t.hij("",(null==n.value?null:n.value.length)||0," / 30"),t.xp6(2),t.Q6J("value",l),t.xp6(6),t.hij("",(null==l.value?null:l.value.length)||0," / 50"),t.xp6(2),t.Q6J("ngIf",o.currentImageUrl),t.xp6(1),t.Q6J("ngIf",o.currentImageUrl),t.xp6(1),t.Q6J("ngIf",!o.currentImageUrl),t.xp6(1),t.Q6J("ngIf",o.currentImageUrl),t.xp6(7),t.Q6J("ngIf",o.showCropper),t.xp6(1),t.Q6J("ngIf",o.showCropper),t.xp6(1),t.Q6J("ngIf",o.showCropper),t.xp6(3),t.Udp("display",o.showCropper?null:"none"),t.Q6J("imageChangedEvent",o.imageChangedEvent)("maintainAspectRatio",!0)("containWithinAspectRatio",o.containWithinAspectRatio)("aspectRatio",1.5)("resizeToWidth",150)("cropperMinWidth",150)("onlyScaleDown",!0)("roundCropper",!1)("canvasRotation",o.canvasRotation)("transform",o.transform)("alignImage","left"),t.xp6(1),t.Q6J("ngIf",o.showCropper),t.xp6(1),t.Q6J("ngIf",o.uploadErr),t.xp6(4),t.Q6J("ngIf",o.canDeleteSubcategory),t.xp6(1),t.Q6J("disabled",o.subcatEditForm.invali
1d),t.xp6(1),t.Q6J("ngIf",o.loading)}},dependencies:[C.O5,T.TO,T.KE,T.bx,V.Nt,I.lW,p.uh,p.xY,p.H8,N.Hw,Z.Ou,$.pH,k.gM,g._Y,g.Fj,g.JJ,g.JL,g.Q7,g.nD,g.On,g.sg,g.u,E.ap],styles:[".imageuploaddiv[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-wrap:wrap}.uploadedimagediv[_ngcontent-%COMP%]{width:120px;height:80px;background-repeat:no-repeat;background-size:contain;background-position:center;margin-right:10px;background-color:#eee}.uploadoption[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-around;align-items:center;flex-grow:1;margin:20px 0}.editformtitle[_ngcontent-%COMP%]{font-size:16px;font-weight:700;margin-bottom:10px}.editformsmalltext[_ngcontent-%COMP%]{margin:0 auto 5px;font-size:small}.image-cropper-container[_ngcontent-%COMP%]{width:200px!important;overflow:hidden!important}.custom-cropped-image[_ngcontent-%COMP%]{height:130px}.buttons-container[_ngcontent-%COMP%], .cropper-tools-container[_ngcontent-%COMP%]{display:flex!important;flex-direction:row!important;justify-content:space-around!important;align-items:center!important;padding:6px!important;margin:20px 0!important}.croppertool-button[_ngcontent-%COMP%]{background:transparent;margin:3px}.cropper-rotation-slider[_ngcontent-%COMP%]{margin:8px;width:200px}"]}),a})();
1var Ct=c(82345);function St(a,s){1&a&&t._UZ(0,"mat-spinner",4)}function vt(a,s){if(1&a&&(t.TgZ(0,"div",15)(1,"h4"),t._uU(2),t.qZA()()),2&a){const e=t.oxw(2);t.xp6(2),t.Oqu(e.genericErrMessage)}}function xt(a,s){if(1&a&&(t.TgZ(0,"div",16)(1,"p",17),t._uU(2," SubCategories under Category: "),t.TgZ(3,"span",18),t._uU(4),t.qZA()()()),2&a){const e=t.oxw(2);t.xp6(4),t.hij("",e.categoryName," ")}}function Tt(a,s){if(1&a){const e=t.EpF();t.TgZ(0,"a",19),t.NdJ("click",function(){t.CHM(e);const r=t.oxw(2);return t.KtG(r.openRearrangeSubcategoriesModal())}),t.TgZ(1,"mat-icon"),t._uU(2,"menu_open"),t.qZA()()}2&a&&t.Q6J("matTooltipShowDelay",700)("matTooltipHideDelay",300)}function It(a,s){1&a&&t._UZ(0,"img",30)}function Lt(a,s){if(1&a&&t._UZ(0,"img",31),2&a){const e=t.oxw().$implicit;t.s9C("src",e.subCategoryImageUrl,t.LSH)}}function wt(a,s){if(1&a){const e=t.EpF();t.TgZ(0,"button",32),t.NdJ("click",function(r){t.CHM(e);const i=t.oxw().$implicit,n=t.oxw(3);return r.stopPropagation(),t.KtG(n.openEditSubCategoryDialog(i))}),t.TgZ(1,"mat-icon"),t._uU(2,"mode_edit"),t.qZA()()}2&a&&t.Q6J("matTooltipShowDelay",700)("matTooltipHideDelay",300)}function Dt(a,s){if(1&a){const e=t.EpF();t.TgZ(0,"a",22),t.NdJ("click",function(){const i=t.CHM(e).$implicit,n=t.oxw(3);return t.KtG(n.openGoalListBySubcategory(i))}),t.TgZ(1,"div",23),t.YNc(2,It,1,0,"img",24),t.YNc(3,Lt,1,1,"img",25),t.qZA(),t.TgZ(4,"div",26)(5,"div",27),t._uU(6),t.qZA(),t.TgZ(7,"div",28),t._uU(8),t.qZA()(),t.YNc(9,wt,3,2,"button",29),t.qZA()}if(2&a){const e=s.$implicit,o=s.index;t.uIk("aria-label",e.subCategoryName),t.xp6(2),t.Q6J("ngIf",!e.subCategoryImageUrl),t.xp6(1),t.Q6J("ngIf",e.subCategoryImageUrl),t.xp6(2),t.MGl("id","Edit_Subcategory_",o,""),t.xp6(1),t.hij(" ",e.subCategoryName," "),t.xp6(2),t.hij(" ",e.subCategoryDescription," "),t.xp6(1),t.Q6J("ngIf",e.privileges.includes("EDIT"))}}function Nt(a,s){if(1&a&&(t.TgZ(0,"div",20),t.YNc(1,Dt,10,7,"a",21),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",e.subcategoryListByCategory.subcatList)}}function Zt(a,s){1&a&&(t.TgZ(0,"p"),t._uU(1,' No Subcategory under this Category. Click on "Add New Subcategory" button to create one. '),t.qZA())}function Et(a,s){1&a&&(t.TgZ(0,"p"),t._uU(1," No Subcategory under this Category. Please consult organization's admin. "),t.qZA())}function Ut(a,s){if(1&a&&(t.TgZ(0,"div",33),t.YNc(1,Zt,2,0,"p",34),t.YNc(2,Et,2,0,"p",34),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.subcategoryListByCategory.canAddSubcategory),t.xp6(1),t.Q6J("ngIf",!e.subcategoryListByCategory.canAddSubcategory)}}function Ot(a,s){if(1&a){const e=t.EpF();t.TgZ(0,"div",35)(1,"button",36),t.NdJ("click",function(){t.CHM(e);const r=t.oxw(2);return t.KtG(r.openAddSubcategoryDialog())}),t.TgZ(2,"mat-icon"),t._uU(3,"add"),t.qZA(),t._uU(4,"Add New Subcategory "),t.qZA()()}}function At(a,s){if(1&a){const e=t.EpF();t.TgZ(0,"div",5),t.YNc(1,vt,3,1,"div",6),t.TgZ(2,"p",7)(3,"a",8),t.NdJ("click",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.openCategoryListByOrgName())}),t.TgZ(4,"span"),t._uU(5),t.qZA()(),t._uU(6," > "),t.TgZ(7,"span",9),t._uU(8),t.qZA(),t._uU(9," > "),t.qZA(),t.YNc(10,xt,5,1,"div",10),t.YNc(11,Tt,3,2,"a",11),t.YNc(12,Nt,2,1,"div",12),t._UZ(13,"br")(14,"br"),t.YNc(15,Ut,3,2,"div",13),t.YNc(16,Ot,5,0,"div",14),t._UZ(17,"br")(18,"br"),t.qZA()}if(2&a){const e=t.oxw();
1t.xp6(1),t.Q6J("ngIf",e.genericErr),t.xp6(4),t.Oqu(e.orgDisplayName?e.orgDisplayName:e.orgName),t.xp6(3),t.Oqu(e.categoryName),t.xp6(2),t.Q6J("ngIf",!e.genericErr),t.xp6(1),t.Q6J("ngIf","PUBLIC"!==e.orgName&&e.hasOrgEditPriv),t.xp6(1),t.Q6J("ngIf",e.subcategoryListByCategory.subcatList&&e.subcategoryListByCategory.subcatList.length>0),t.xp6(3),t.Q6J("ngIf",e.subcategoryListByCategory.subcatList&&0===e.subcategoryListByCategory.subcatList.length),t.xp6(1),t.Q6J("ngIf",e.subcategoryListByCategory.canAddSubcategory)}}let Rt=(()=>{class a{constructor(e,o,r,i,n,l){this.router=e,this.seoService=o,this._flowchartListService=r,this._utilService=i,this.dialog=l,this.genericErr=!1,this.genericErrMessage="",this.isDataLoaded=!1,this.subcategoryListByCategory=[],this.hasOrgEditPriv=!1,this.sessionStorage=n;var m=document.getElementById("footer");m&&m.style&&(m.style.display="block"),this.seoService.createLinkForCanonicalURL(),this.seoService.generateTags({title:"Subcategory for category - DeciZone",metaTitle:"Subcategory for category - DeciZone",metaDescription:"Subcategories for selected category.",metaImageUrl:"https://decizone.com/assets/images/DZ-LOGO-1200x628px-Fb-Li-Opt.png",robots:"noindex,nofollow",slug:window.location.href}),this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.routeEventSubscription=this.router.events.subscribe(S=>{if(_.isEqual(S.url,this.router.url.toString())&&(this.subcategoryListByCategory=this._flowchartListService.getSubcategoryListByCategory(),_.isEmpty(this.subcategoryListByCategory))){this.isDataLoaded=!1,this.orgName="",this.orgDisplayName="";let y=this.router.url.split("/");this.categoryUrl="/"+y[1],-1!==_.indexOf(y,"subcategory")&&this.getCategoryDetails(this.categoryUrl)}})}ngOnInit(){var e=document.getElementById("footer");if(e&&e.style&&(e.style.display="none"),this._utilService.setShowSearchButton(!0),this.subcategoryListByCategory=this._flowchartListService.getSubcategoryListByCategory(),this.categoryId=this._flowchartListService.getSelectedCategoryId(),this.subcategoryListByCategory.categoryId&&this.categoryId&&this.subcategoryListByCategory.categoryId.toString()!==this.categoryId.toString()?this.subcategoryListByCategory=[]:this.categoryName=this.subcategoryListByCategory.categoryName,console.log(this.subcategoryListByCategory),_.isEmpty(this.subcategoryListByCategory)){this.isDataLoaded=!1;let r=this.router.url.split("/");this.categoryUrl="/"+r[1],-1!==_.indexOf(r,"subcategory")&&this.getCategoryDetails(this.categoryUrl)}else{if(this.orgName=this.subcategoryListByCategory.orgName,this.orgDisplayName=this.subcategoryListByCategory.orgDisplayName,this.orgId=this.subcategoryListByCategory.orgId,this.categoryName=this.subcategoryListByCategory.categoryName,"PUBLIC"!==this.orgName){var o=this.sessionStorage.getObject("cattree");this.hasOrgEditPriv=o[this.orgName].privileges.includes("EDIT")}this.isDataLoaded=!0}}ngOnDestroy(){this.routeEventSubscription&&this.routeEventSubscription.unsubscribe(),this.catDetailsSub&&this.catDetailsSub.unsubscribe()}togglefooter(){var e=document.getElementById("footer");e&&e.style&&(e.style.display="none"===e.style.display?"block":"none")}getCategoryDetails(e){this.catDetailsSub=this._flowchartListService.getCategoryDetailsByCategoryUrl(e).subscribe(o=>{if(console.log(o.responseBody),this.catDetailResponse=o.responseBody,this.orgName=this.catDetailResponse.orgName,this.orgId=this.catDetailResponse.orgId,this.categoryId=this.catDetailResponse.categoryId,this.categoryName=this.catDetailResponse.categoryName,this.subcategoryListByCategory=this._flowchartListService.getSubcategoryListInCategoryTreeByCategory(this.orgName,this.categoryId),this.orgDisplayName=this.subcategoryListByCategory.orgDisplayName,"PUBLIC"!==this.orgName){var r=this.sessionStorage.getObject("cattree");this.hasOrgEditPriv=r[this.orgName].privileges.includes("EDIT")}this.isDataLoaded=!0},o=>{console.log(o),this.genericErr=!0,this.genericErrMessage=o&&o.error&&o.error.statusMessage?o.error.statusMessage:"Unexpected error occurred.  Please try after sometime."})}openRearrangeSubcategoriesModal(){let e=this.subcategoryListByCategory.subcatList,r=this.sessionStorage.getObject("cattree")[this.orgName].orgUserAccess;const i=new p.vA;i.disableClose=!0,i.autoFocus=!0,i.height="90%",i.width="90%",i.maxWidth="600px",i.maxHeight="700px",i.data={orgName:this.orgName,categoryId:this.categoryId,subcategoryList:e,userAccess:r},i.panelClass=["dz-dialog-container","rearrange-items-contr"];
1let n=this.dialog.open(q,i);n.afterClosed().subscribe(l=>{n=null,l||this._utilService.reloadCurrentRoute(this.router.url)})}openGoalListBySubcategory(e){let o=this._flowchartListService.getGoalListInCategoryTreeBySubcategory(this.orgName,this.categoryId,e.subCategoryId);this._flowchartListService.setGoalListBySubcategory(o),this._flowchartListService.setOrgName(this.orgName),this._flowchartListService.setSelectedCategoryId(this.categoryId),this._flowchartListService.setSelectedSubcategoryId(e.subCategoryId);let r=e.subCategoryName;r=r.replace(/[^A-Z0-9]+/gi,"-"),this.router.navigate([`./${e.subCategoryId}/${r}/goals`])}openCategoryListByOrgName(){let e=this._flowchartListService.getCategoryListInCategoryTreeByOrg(this.orgName);this._flowchartListService.setCategoryListByOrg(e),this._flowchartListService.setOrgName(this.orgName),this.router.navigate([`./${this.orgId}/${this.orgName}/category`])}openEditSubCategoryDialog(e){let r=this.categoryName;const i=new p.vA;i.disableClose=!0,i.autoFocus=!0,i.height="90%",i.width="90%",i.maxWidth="600px",i.maxHeight="700px",i.data={orgName:this.orgName,orgId:this.orgId,categoryId:this.categoryId,categoryName:r,subCategoryObj:e},i.panelClass=["dz-dialog-container","edit-subcategory-contr"];let n=this.dialog.open(ft,i);n.afterClosed().subscribe(l=>{n=null,l&&this._utilService.reloadCurrentRoute(this.router.url)})}openAddSubcategoryDialog(){let e=this.categoryId,o=this.categoryName;o=o.replace(/[^A-Z0-9]+/gi,"-");const r=new p.vA;r.disableClose=!0,r.autoFocus=!0,r.height="90%",r.width="90%",r.maxWidth="600px",r.maxHeight="700px",r.data={orgId:this.orgId,orgName:this.orgName,categoryId:e,userAccess:this.subcategoryListByCategory.subCatUserAccess},r.panelClass=["dz-dialog-container","addnew-subcategory-contr"];let i=this.dialog.open(F.B,r);i.afterClosed().subscribe(n=>{i=null,n&&this._utilService.reloadCurrentRoute(this.router.url)})}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(L.F0),t.Y36(Ct.v),t.Y36(w.A),t.Y36(B.f),t.Y36(D.qo),t.Y36(p.uw))},a.\u0275cmp=t.Xpm({type:a,selectors:[["app-category-subcategory-list"]],decls:6,vars:4,consts:[["class","app-spinner spin-center",4,"ngIf"],["class","category-page",4,"ngIf"],["mat-icon-button","","id","footer-toggle-button","aria-label","Toggle button to Show or Hide Footer panel.","matTooltip","Click here to Show / Hide the Footer section below.","matTooltipPosition","right",1,"footer-toggle-button",3,"matTooltipShowDelay","matTooltipHideDelay","click"],["aria-label","Show or hide page footer section"],[1,"app-spinner","spin-center"],[1,"category-page"],["aria-label","error message","class","category-context",4,"ngIf"],["tabindex","0",1,"category-context"],["rel","nofollow","href","javascript:void(0);",1,"yellow-text-decoration","catsubcat-orgname",3,"click"],[1,"catsubcat-catname"],["class","category-context",4,"ngIf"],["id","catsubcat-rearrange","class","all-buttons rearrange-list-bottom","aria-label","Rearrange List of items for presentation.","matTooltip","Rearrange List of items for presentation.","mat-icon-button","",3,"matTooltipShowDelay","matTooltipHideDelay","click",4,"ngIf"],["class","subcat-container","tabindex","0","aria-label","Here are the Subcategories under this Category",4,"ngIf"],["class","category-container",4,"ngIf"],["class","author-page-buttons",4,"ngIf"],["aria-label","error message",1,"category-context"],[1,"category-context"],["tabindex","0",1,"category-caption"],[1,"the-category"],["id","catsubcat-rearrange","aria-label","Rearrange List of items for presentation.","matTooltip","Rearrange List of items for presentation.","mat-icon-button","",1,"all-buttons","rearrange-list-bottom",3,"matTooltipShowDelay","matTooltipHideDelay","click"],["tabindex","0","aria-label","Here are the Subcategories under this Category",1,"subcat-container"],["class","subcat-cards list-cards",3,"click",4,"ngFor","ngForOf"],[1,"subcat-cards","list-cards",3,"click"],[1,"subcat-image"],["width","195px","height","130px","loading","lazy","class","tree-item-image default-image","src","assets/images/Sub-Category-style-white-18dp.svg","alt","This is an image of a Sub-Category.",4,"ngIf"],["width","195px","height","130px","loading","lazy","class","tree-item-image","alt","This is an image of a Sub-Category.",3,"src",4,"ngIf"],[1,"subcat-caption"],["tabindex","0",1,"subcat-title",3,"id"],[1,"subcat-subtitle"],["id","catsubcat-editsubcatbtn","class","edit-button","aria-label","Edit this Subcategory","matTooltip","Edit Subcategory","mat-icon-button","",3,"matTooltipShowDelay","matTooltipHideDelay","click",4,"ngIf"],["width","195px","height","130px","loading","lazy","src","assets/images/Sub-Category-style-white-18dp.svg","alt","This is an image of a Sub-Category.",1,"tree-item-image","default-image"],["width","195px","height","130px","loading","lazy","alt","This is an image of a Sub-Category.",1,"tree-item-image",3,"src"],["id","catsubcat-editsubcatbtn","aria-label","Edit this Subcategory","matTooltip","Edit Subcategory","mat-icon-button","",1,"edit-button",3,"matTooltipShowDelay","matTooltipHideDelay","click"],[1,"category-container"],[4,"ngIf"],[1,"author-page-buttons"],["
1id","catsubcat-addsubcatbtn","mat-raised-button","","color","accent",1,"author-buttons",3,"click"]],template:function(e,o){1&e&&(t.YNc(0,St,1,0,"mat-spinner",0),t.YNc(1,At,19,8,"div",1),t.TgZ(2,"button",2),t.NdJ("click",function(){return o.togglefooter()}),t.TgZ(3,"mat-icon",3),t._uU(4,"call_to_action"),t.qZA()(),t._UZ(5,"br")),2&e&&(t.Q6J("ngIf",!o.isDataLoaded),t.xp6(1),t.Q6J("ngIf",o.isDataLoaded),t.xp6(1),t.Q6J("matTooltipShowDelay",700)("matTooltipHideDelay",300))},dependencies:[C.sg,C.O5,I.lW,I.zs,N.Hw,Z.Ou,k.gM],styles:[".category-page[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;width:90%;max-width:920px;margin:0 auto;height:calc(100% - 24px);border:1px solid whitesmoke}.category-page[_ngcontent-%COMP%]   *[_ngcontent-%COMP%]{box-sizing:border-box}.rearrange-list-bottom[_ngcontent-%COMP%]{position:absolute;top:85px;right:60px}.category-context[_ngcontent-%COMP%]{width:90%;margin:5px auto}.category-caption[_ngcontent-%COMP%]{font-weight:700}.the-category[_ngcontent-%COMP%]{color:var(--primarytextcolor)}.align-right[_ngcontent-%COMP%]{float:right}.subcat-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;overflow-y:auto;width:96%;margin:5px auto}.subcat-cards[_ngcontent-%COMP%]{background-color:#fff3c7;height:140px}.list-cards[_ngcontent-%COMP%]{width:45%;max-width:600px;min-width:400px;display:flex;flex-direction:row;align-items:center;margin:5px auto;padding:5px;cursor:pointer;border-radius:10px;position:relative}.subcat-image[_ngcontent-%COMP%]{height:130px;width:195px;display:flex;align-items:center}.tree-item-image[_ngcontent-%COMP%]{object-fit:contain;width:100%}.subcat-caption[_ngcontent-%COMP%]{height:100px;width:calc(100% - 140px);flex-grow:1;display:flex;flex-direction:column;justify-content:space-around;padding:0 10px}.subcat-title[_ngcontent-%COMP%]{font-size:20px;font-weight:700;color:var(--secondarytextcolor)}.subcat-subtitle[_ngcontent-%COMP%]{overflow:auto;font-size:14px}.edit-button[_ngcontent-%COMP%]{position:absolute;right:0;bottom:0;color:#b0b0b0}@media screen and (max-width: 600px){.list-cards[_ngcontent-%COMP%]{width:100%;min-width:initial}.category-page[_ngcontent-%COMP%]{width:100%}.subcat-title[_ngcontent-%COMP%]{font-size:16px}.subcat-subtitle[_ngcontent-%COMP%]{font-size:11px}}"]}),a})(),Mt=(()=>{class a{}return a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=t.oAB({type:a}),a.\u0275inj=t.cJS({imports:[C.ez,H.o9,z.K,g.u5,g.UX,E.QG,x._t,L.Bz.forChild([{path:"",component:Rt}])]}),a})()}}]);

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.