1"use strict";(self.webpackChunkdashboard=self.webpackChunkdashboard||[]).push([[5761],{82542:(Q,S,n)=>{n.d(S,{V:()=>s});var e=n(94650),a=n(10547);let s=(()=>{class O{get model(){return this.crudService.currentModel}set model(A){this.crudService.currentModel=A}constructor(A){this.crudService=A}static#e=this.\u0275fac=function(D){return new(D||O)(e.Y36(a.O))};static#t=this.\u0275dir=e.lG2({type:O})}return O})()},61755:(Q,S,n)=>{n.d(S,{f:()=>O});var e=n(94650),a=n(96193),s=n(89383);let O=(()=>{class B{constructor(D){this.activeModal=D}closeModal(){this.activeModal.close()}static#e=this.\u0275fac=function(o){return new(o||B)(e.Y36(a.Kz))};static#t=this.\u0275cmp=e.Xpm({type:B,selectors:[["app-apply-menu-modal"]],decls:12,vars:0,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["translate",""],["aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"alert","alert-warning","text-center"]],template:function(o,h){1&o&&(e.TgZ(0,"div",0)(1,"div",1)(2,"h5",2)(3,"span",3),e._uU(4,"menubuilder.conversations"),e.qZA()(),e.TgZ(5,"button",4),e.NdJ("click",function(){return h.closeModal()}),e.TgZ(6,"span",5),e._uU(7,"\xd7"),e.qZA()()(),e.TgZ(8,"div",6)(9,"div",7)(10,"span",3),e._uU(11,"premium_features.conversation_feature_secured_access"),e.qZA()()()())},dependencies:[s.Pi]})}return B})()},16722:(Q,S,n)=>{n.d(S,{P:()=>c});var e=n(94650);class a{constructor(){this.$className="GetMenuTemplateIndex"}}class s{constructor(){this.$className="DeleteMenuTemplate"}}var O=n(8717),B=n(96193),A=n(51855),D=n(36895),o=n(89383),h=n(91869);function R(g,E){if(1&g){const T=e.EpF();e.TgZ(0,"tr",14),e.NdJ("templateSelected",function(y){e.CHM(T);const d=e.oxw();return e.KtG(d.selectTemplate(y))})("templateDeleted",function(y){e.CHM(T);const d=e.oxw();return e.KtG(d.deleteTemplate(y))}),e.qZA()}2&g&&e.Q6J("item",E.$implicit)}let c=(()=>{class g{constructor(T,p){this.apiChannel=T,this.activeModal=p,this.tableSettings={columns:[{name:"general.name",sortBy:"name"},{name:"general.created_at",sortBy:"createdAt"},{name:"general.created_by",sortBy:"createdBy"},{name:""}],pageSizes:[10,50],initialPageSize:10,filter:{filter:this.filterItems}},this.templateSelected=new e.vpe}ngOnInit(){this.apiChannel.executeQuery(new a).subscribe(T=>this.templateItems=T,T=>this.templateItems=[])}filterItems(T,p){if(!p)return T;const y=p.toLowerCase();return T.filter(d=>d.name.toLowerCase().indexOf(y)>-1)}deleteTemplate(T){const p=new s;p.templateId=T,this.apiChannel.executeCommand(p).subscribe(()=>{this.templateItems=this.templateItems.filter(y=>y.id!==T)})}selectTemplate(T){this.templateSelected.emit(T),this.close()}close(){this.activeModal.close()}static#e=this.\u0275fac=function(p){return new(p||g)(e.Y36(O.J),e.Y36(B.Kz))};static#t=this.\u0275cmp=e.Xpm({type:g,selectors:[["apply-from-template"]],decls:16,vars:3,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],[1,"ion-share"],["translate","",1,"ml-1"],["aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"row"],[1,"col-12"],[3,"data","settings"],["table",""],["tbody",""],["menu-template-item","",3,"item","templateSelected","templateDeleted",4,"ngFor","ngForOf"],["menu-template-item","",3,"item","templateSelected","templateDeleted"]],template:function(p,y){if(1&p&&(e.TgZ(0,"div",0)(1,"div",1)(2,"h5",2),e._UZ(3,"i",3),e.TgZ(4,"span",4),e._uU(5,"menubuilder.apply_menu_from_template"),e.qZA()(),e.TgZ(6,"button",5),e.NdJ("click",function(){return y.close()}),e.TgZ(7,"span",6),e._uU(8,"\xd7"),e.qZA()()(),e.TgZ(9,"div",7)(10,"div",8)(11,"div",9)(12,"sia-table",10,11)(14,"tbody",12),e.YNc(15,R,1,1,"tr",13),e.qZA()()()()()()),2&p){const d=e.MAs(13);e.xp6(12),e.Q6J("data",y.templateItems)("settings",y.tableSettings),e.xp6(3),e.Q6J("ngForOf",d.page)}},dependencies:[A.C,D.sg,o.Pi,h.m],encapsulation:2})}return g})()},91869:(Q,S,n)=>{n.d(S,{m:()=>T});var e=n(15861),a=n(94650);class s{constructor(){this.$className="RenameMenuTemplate"}}var O=n(8717),B=n(88221),A=n(36895),D=n(24006),o=n(89383);const h=["menu-template-item",""];function R(p,y){if(1&p&&(a.TgZ(0,"span"),a._uU(1),a.qZA()),2&p){const d=a.oxw();a.xp6(1),a.Oqu(null==d.item?null:d.item.name)}}
1function c(p,y){if(1&p){const d=a.EpF();a.TgZ(0,"sia-textbox",8),a.NdJ("actionEmitter",function(){a.CHM(d);const v=a.oxw();return a.KtG(v.updateName())})("ngModelChange",function(v){a.CHM(d);const I=a.oxw();return a.KtG(I.item.name=v)}),a.qZA()}if(2&p){const d=a.oxw();a.Q6J("disabled",d.apiChannel.isBusy)("actionTitle","general.rename")("actionIcon","ion-checkmark")("ngModel",d.item.name)}}function g(p,y){if(1&p){const d=a.EpF();a.TgZ(0,"button",9),a.NdJ("click",function(){a.CHM(d);const v=a.oxw();return a.KtG(v.editMode=!0)}),a._UZ(1,"i",10),a.TgZ(2,"span",5),a._uU(3,"general.rename"),a.qZA()()}if(2&p){const d=a.oxw();a.Q6J("disabled",d.editMode)}}function E(p,y){if(1&p){const d=a.EpF();a.TgZ(0,"button",11),a.NdJ("click",function(){a.CHM(d);const v=a.oxw();return a.KtG(v.templateDeleted.emit(null==v.item?null:v.item.id))}),a._UZ(1,"i",12),a.TgZ(2,"span",5),a._uU(3,"general.delete"),a.qZA()()}}let T=(()=>{class p{constructor(d){this.apiChannel=d,this.templateSelected=new a.vpe,this.templateDeleted=new a.vpe}updateName(){var d=this;return(0,e.Z)(function*(){const x=new s;x.item=d.item,yield d.apiChannel.executeCommand(x).toPromise(),d.editMode=!1})()}static#e=this.\u0275fac=function(x){return new(x||p)(a.Y36(O.J))};static#t=this.\u0275cmp=a.Xpm({type:p,selectors:[["","menu-template-item",""]],inputs:{item:"item"},outputs:{templateSelected:"templateSelected",templateDeleted:"templateDeleted"},attrs:h,decls:16,vars:9,consts:[[4,"ngIf"],[3,"disabled","actionTitle","actionIcon","ngModel","actionEmitter","ngModelChange",4,"ngIf"],[1,"action-buttons"],[1,"btn","btn-sm","mr-1","btn-primary",3,"click"],[1,"ion-code-download","mr-1"],["translate",""],["class","btn btn-sm mr-1 btn-primary",3,"disabled","click",4,"ngIf"],["class","btn btn-sm mr-1 btn-danger",3,"click",4,"ngIf"],[3,"disabled","actionTitle","actionIcon","ngModel","actionEmitter","ngModelChange"],[1,"btn","btn-sm","mr-1","btn-primary",3,"disabled","click"],[1,"ion-edit","mr-1"],[1,"btn","btn-sm","mr-1","btn-danger",3,"click"],[1,"ion-android-delete","mr-1"]],template:function(x,v){1&x&&(a.TgZ(0,"td"),a.YNc(1,R,2,1,"span",0),a.YNc(2,c,1,4,"sia-textbox",1),a.qZA(),a.TgZ(3,"td"),a._uU(4),a.ALo(5,"date"),a.qZA(),a.TgZ(6,"td"),a._uU(7),a.qZA(),a.TgZ(8,"td")(9,"div",2)(10,"button",3),a.NdJ("click",function(){return v.templateSelected.emit(null==v.item?null:v.item.id)}),a._UZ(11,"i",4),a.TgZ(12,"span",5),a._uU(13,"general.apply"),a.qZA()(),a.YNc(14,g,4,1,"button",6),a.YNc(15,E,4,0,"button",7),a.qZA()()),2&x&&(a.xp6(1),a.Q6J("ngIf",!v.editMode),a.xp6(1),a.Q6J("ngIf",v.editMode),a.xp6(2),a.Oqu(a.xi3(5,6,null==v.item?null:v.item.createdAt,"medium")),a.xp6(3),a.Oqu(null==v.item?null:v.item.createdBy),a.xp6(7),a.Q6J("ngIf",null==v.item?null:v.item.createdByMe),a.xp6(1),a.Q6J("ngIf",null==v.item?null:v.item.createdByMe))},dependencies:[B.c,A.O5,D.JJ,D.On,o.Pi,A.uU],styles:[".action-buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}"]})}return p})()},17248:(Q,S,n)=>{n.d(S,{y:()=>T});var e=n(15861);class a{constructor(){this.$className="ApplyMenuForOtherOrgs"}}var s=n(94650),O=n(8717),B=n(93445),A=n(96193),D=n(4661),o=n(23595),h=n(36895),R=n(89383);function c(p,y){1&p&&(s.TgZ(0,"div",9)(1,"div",16),s._uU(2),s.ALo(3,"translate"),s.qZA()()),2&p&&(s.xp6(2),s.Oqu(s.lcZ(3,1,"menubuilder.apply_success")))}function g(p,y){1&p&&(s.TgZ(0,"div",9)(1,"div",17),s._uU(2),s.ALo(3,"translate"),s.qZA()()),2&p&&(s.xp6(2),s.Oqu(s.lcZ(3,1,"menubuilder.apply_error")))}function E(p,y){if(1&p){const d=s.EpF();s.TgZ(0,"button",18),s.NdJ("click",function(){s.CHM(d);const v=s.oxw();return s.KtG(v.applyMenu())}),s._uU(1," menubuilder.apply "),s.qZA()}if(2&p){const d=s.oxw();s.Q6J("disabled",!d.canApply())}}let T=(()=>{class p{constructor(d,x,v,I){this.apiChannel=d,this.httpClient=x,this.activeModal=v,this.confirmService=I}closeModal(){this.activeModal.close()}applyMenu(){var d=this;return(0,e.Z)(function*(){if(!(yield d.confirmService.confirm("general.are_you_sure","appbuilder.apply_menu_confirm")))return;const v=new a;v.orgIds=d.selectableOrganizations.filter(I=>I.selected).map(I=>I.id),v.menu=d.model,d.apiChannel.executeCommand(v).subscribe(()=>{d.applySuccess=!0,d.closeSelf()},()=>{d.applyError=!0})})()}canApply(){return this.selectableOrganizations.some(x=>x.selected)&&!this.httpClient.isBusy}closeSelf(d=2e3){setTimeout(()=>this.closeModal(),d)}static#e=this.\u0275fac=function(x){return new(x||p)(s.Y36(O.J),s.Y36(B.t),s.Y36(A.Kz),s.Y36(D.z))};static#t=this.\u0275cmp=s.Xpm({type:p,selectors:[["app-apply-menu-modal"]],decls:21,vars:8,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],[1,"ion-share"],["translate","",1,"ml-1"],["aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"row"],[1,"col-12"],[1,"alert","alert-warning","text-center"],["translate",""],[3,"boxTitle","boxIcon","addItemPlaceholder","noItemsTitle","collection"],["class","col-12",4,"ngIf"],[1,"modal-footer"],["type","button","class","btn btn-primary","translate","",3,"disabled","click",4,"ngIf"],[1,"alert","alert-success","text-center"],[1,"alert","alert-danger","text-center"],["type","button","translate","",1,"btn","btn-primary",3,"disabled","click"]],template:function(x,v){1&x&&(s.TgZ(0,"div",0)(1,"div",1)(2,"h5",2),s._UZ(3,"i",3),s.TgZ(4,"span",4),s._uU(5,"menubuilder.apply_menu_for_another"),s.qZA()(),s.TgZ(6,"button",5),s.NdJ("
1click",function(){return v.closeModal()}),s.TgZ(7,"span",6),s._uU(8,"\xd7"),s.qZA()()(),s.TgZ(9,"div",7)(10,"div",8)(11,"div",9)(12,"div",10)(13,"span",11),s._uU(14,"menubuilder.copy_warning"),s.qZA()()(),s.TgZ(15,"div",9),s._UZ(16,"sia-typeahead-simplelist-chooser",12),s.qZA(),s.YNc(17,c,4,3,"div",13),s.YNc(18,g,4,3,"div",13),s.qZA(),s.TgZ(19,"div",14),s.YNc(20,E,2,1,"button",15),s.qZA()()()),2&x&&(s.xp6(16),s.Q6J("boxTitle","menubuilder.organizations")("boxIcon","ion-android-add")("addItemPlaceholder","menubuilder.select_organizations")("noItemsTitle","menubuilder.no_organization_selected")("collection",v.selectableOrganizations),s.xp6(1),s.Q6J("ngIf",v.applySuccess),s.xp6(1),s.Q6J("ngIf",v.applyError),s.xp6(2),s.Q6J("ngIf",!v.applySuccess))},dependencies:[o.H,h.O5,R.Pi,R.X$]})}return p})()},50112:(Q,S,n)=>{n.d(S,{c:()=>o});var e=n(94650),a=n(96193),s=n(36895),O=n(89383);function B(h,R){if(1&h&&(e.TgZ(0,"ul")(1,"li"),e._uU(2),e.qZA()()),2&h){const c=R.$implicit;e.xp6(2),e.Oqu(c)}}const A=function(h){return{limit:h}};function D(h,R){if(1&h&&(e.TgZ(0,"div",9)(1,"div",10)(2,"div",11)(3,"span"),e._uU(4),e.ALo(5,"translate"),e.qZA()()(),e.TgZ(6,"div",10),e.YNc(7,B,3,1,"ul",12),e.qZA()()),2&h){const c=e.oxw();e.xp6(4),e.hij(" ",e.xi3(5,2,"menubuilder.too_long_names",e.VKq(5,A,c.itemLengthLimit)),""),e.xp6(3),e.Q6J("ngForOf",c.itemsWithTooLongNames)}}let o=(()=>{class h{constructor(c){this.activeModal=c}closeModal(){this.activeModal.close()}static#e=this.\u0275fac=function(g){return new(g||h)(e.Y36(a.Kz))};static#t=this.\u0275cmp=e.Xpm({type:h,selectors:[["app-menu-error-modal"]],decls:11,vars:1,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],[1,"ion-share"],["translate","",1,"ml-1"],["aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],["class","row",4,"ngIf"],[1,"row"],[1,"col-12"],[1,"alert","alert-warning","text-center"],[4,"ngFor","ngForOf"]],template:function(g,E){1&g&&(e.TgZ(0,"div",0)(1,"div",1)(2,"h5",2),e._UZ(3,"i",3),e.TgZ(4,"span",4),e._uU(5,"menubuilder.error"),e.qZA()(),e.TgZ(6,"button",5),e.NdJ("click",function(){return E.closeModal()}),e.TgZ(7,"span",6),e._uU(8,"\xd7"),e.qZA()()(),e.TgZ(9,"div",7),e.YNc(10,D,8,7,"div",8),e.qZA()()),2&g&&(e.xp6(10),e.Q6J("ngIf",E.itemsWithTooLongNames))},dependencies:[s.sg,s.O5,O.Pi,O.X$]})}return h})()},28102:(Q,S,n)=>{n.d(S,{G:()=>V});var e=n(94650),a=n(17489),O=n(21381),B=n(13675),A=n(82065),D=n(61755),o=n(18138),h=n(69912),R=n(30170),c=n(17663),g=n(8717),E=n(8046),T=n(96193),p=n(89383),y=n(10348),d=n(58446),x=n(7545),v=n(88221),I=n(23595),G=n(36895),L=n(24006);function F(U,Y){if(1&U&&e._UZ(0,"sia-typeahead-simplelist-chooser",5),2&U){e.oxw();const u=e.MAs(4),w=e.oxw();e.Q6J("addItemPlaceholder","menubuilder.select_news_categories")("boxIcon","ion-ios-toggle")("boxTitle","menubuilder.news_filtered_categories")("collection",w.item.newsCategories)("noItemsTitle","menubuilder.no_category_selected")("showSelectAll",!0)("tableMode",!0)("inlineTemplate",!0)("itemTemplate",u)}}function K(U,Y){if(1&U&&(e.TgZ(0,"div",7)(1,"span",8),e._uU(2,"-"),e.qZA(),e._UZ(3,"i",9),e.TgZ(4,"span"),e._uU(5),e.qZA()()),2&U){const u=e.oxw().item;e.xp6(5),e.Oqu(u.ownerName?u.ownerName:"N/A")}}function _(U,Y){1&U&&e.YNc(0,K,6,1,"div",6),2&U&&e.Q6J("ngIf",Y.item.personal)}function t(U,Y){if(1&U){const u=e.EpF();e.TgZ(0,"div")(1,"sia-dropdown",2),e.NdJ("ngModelChange",function(M){e.CHM(u);const J=e.oxw();return e.KtG(J.item.feature=M)})("ngModelChange",function(M){e.CHM(u);const J=e.oxw();return e.KtG(J.featureChanged(M))}),e.qZA(),e.YNc(2,F,1,9,"sia-typeahead-simplelist-chooser",3),e.YNc(3,_,1,1,"ng-template",null,4,e.W1O),e.qZA()}if(2&U){const u=e.oxw();e.xp6(1),e.Q6J("ngModel",u.item.feature)("items",u.builderModel.features)("label","menubuilder.item_feature")("canDelete",!1)("showImages",!1),e.xp6(1),e.Q6J("ngIf",u.item.feature==u.AppSystemFunction.FilteredNews)}}function f(U,Y){if(1&U){const u=e.EpF();e.TgZ(0,"div")(1,"sia-dropdown",2),e.NdJ("ngModelChange",function(M){e.CHM(u);const J=e.oxw();return e.KtG(J.item.resourceType=M)})("ngModelChange",function(){e.CHM(u);const M=e.oxw();return e.KtG(M.setupResources())}),e.qZA(),e.TgZ(2,"sia-dropdown",10,11),e.NdJ("ngModelChange",function(M){e.CHM(u);const J=e.oxw();return e.KtG(J.item.resourceId=M)})("ngModelChange",function(M){e.CHM(u);const J=e.oxw();return e.KtG(J.onResourceChanged(M))})("selectedItemChange",function(M){e.CHM(u);const J=e.oxw();return e.KtG(M&&"New item"==J.item.title&&(J.item.title=M.name))}),e.qZA()()}if(2&U){const u=e.oxw();e.xp6(1),e.Q6J("ngModel",u.item.resourceType)("items",u.builderModel.resourceTypes)("label","menubuilder.item_content")("canDelete",!1)("showImages",!1),e.xp6(1),e.ekj("d-none",!u.item.resourceType),e.Q6J("ngModel",u.item.resourceId)("itemsChangeMode",u.ItemsChangeMode.SelectNewItem)("items",u.item.availableResources)("label",u.currentResourceLabel)("canDelete",!1)("showImages",!1)}}function Z(U,Y){if(1&U){const u=e.EpF();e.TgZ(0,"div")(1,"sia-dropdown",0),e.NdJ("ngModelChange",function(M){e.CHM(u);const J=e.oxw();return e.KtG(J.item.resourceGroupType=M)})("ngModelChange",function(){e.CHM(u);const M=e.oxw();return e.KtG(M.setupResources())}),e.qZA(),e.TgZ(2,"sia-dropdown",12,13),e.NdJ("ngModelChange",function(M){e.CHM(u);const J=e.oxw();return e.KtG(J.item.resourceId=M)})("ngModelChange",function(M){e.CHM(u);const J=e.oxw();return e.KtG(J.onResourceChanged(M))})("selectedItemChange",function(M){e.CHM(u);const J=e.oxw();return e.KtG(M&&"New item"==J.item.title&&(J.item.title=M.name))}),e.qZA()()}if(2&U){const u=e.oxw();e.xp6(1),e.Q6J("items",u.builderModel.resourceGroupTypes)("label","menubuilder.item_content_group")("canDelete",!1)("showImages",!1)("ngModel",u.item.resourceGroupType),e.xp6(1),e.ekj("d-none",!u.item.resourceGroupType),e.Q6J("itemsChangeMode",u.ItemsChangeMode.SelectNewItem)("items",u.item.availableResources)("label",u.currentResourceLabel)("canDelete",!1)("showImages",!1)("ngModel",u.item.resourceId)}}function b(U,Y){1&U&&(e.TgZ(0,"label",17),e._UZ(1,"i",18),e.TgZ(2,"span",19),e._uU(3,"menubuilder.url_warning"),e.qZA()())}function P(U,Y){if(1&U){const u=e.EpF();e.TgZ(0,"div")(1,"sia-textbox",14),e.NdJ("ngModelChange",function(M){e.CHM(u);const J=e.oxw();return e.KtG(J.item.url=M)})("keyup",function(){e.CHM(u);const M=e.oxw();return e.KtG(M.updateUrlWarning())}),e.qZA(),e.YNc(2,b,4,0,"label",15),e.TgZ(3,"sia-checkbox",16),e.NdJ("ngModelChange",function(M){e.CHM(u);const J=e.oxw();return e.KtG(J.item.externalBrowser=M)}),e.qZA()()}if(2&U){const u=e.oxw();
1e.xp6(1),e.Q6J("ngModel",u.item.url)("commonPattern","url")("label","menubuilder.item_url"),e.xp6(1),e.Q6J("ngIf",u.showUrlWarning),e.xp6(1),e.Q6J("ngModel",u.item.externalBrowser)("label","menubuilder.item_external_browser")}}function N(U,Y){if(1&U){const u=e.EpF();e.TgZ(0,"div")(1,"sia-dropdown",2),e.NdJ("ngModelChange",function(M){e.CHM(u);const J=e.oxw();return e.KtG(J.item.microSiteType=M)}),e.qZA()()}if(2&U){const u=e.oxw();e.xp6(1),e.Q6J("ngModel",u.item.microSiteType)("items",u.builderModel.microSites)("label","menubuilder.item_site")("canDelete",!1)("showImages",!1)}}function H(U,Y){if(1&U){const u=e.EpF();e.TgZ(0,"div")(1,"sia-textbox",20),e.NdJ("ngModelChange",function(M){e.CHM(u);const J=e.oxw();return e.KtG(J.item.phone=M)}),e.qZA()()}if(2&U){const u=e.oxw();e.xp6(1),e.Q6J("ngModel",u.item.phone)("required",!0)("label","toolbarbuilder.item_phone")}}function q(U,Y){if(1&U){const u=e.EpF();e.TgZ(0,"div")(1,"sia-textbox",21),e.NdJ("ngModelChange",function(M){e.CHM(u);const J=e.oxw();return e.KtG(J.item.email=M)}),e.qZA()()}if(2&U){const u=e.oxw();e.xp6(1),e.Q6J("ngModel",u.item.email)("commonPattern","email")("required",!0)("label","toolbarbuilder.item_email")}}let V=(()=>{class U{set item(u){this._item=u,this.setupResources(),this.itemChange.emit(this._item)}get item(){return this._item}constructor(u,w,M,J,z){this.apiChannel=u,this.membershipService=w,this.ngbModal=M,this.translateService=J,this.modalService=z,this.itemChange=new e.vpe,this.currentResourceLabel="",this.MenuFunction=o.z,this.ItemsChangeMode=O.k,this.AppSystemFunction=h.O,this.toolbarFunction=c.J}ngOnInit(){this.setupResources()}functionChanged(u){switch(this.item.url="",this.item.infoPageId=null,this.item.resourceType=null,this.item.resourceGroupType=null,this.item.resourceId=null,this.item.isVirtual=!1,u){case o.z.Feature:break;case o.z.Content:case o.z.ContentGroup:this.item.feature=h.O.OpenResource;break;case o.z.Link:this.item.feature=h.O.Web;break;case o.z.MicroSite:this.item.feature=h.O.MicroSites}this.updateUrlWarning(),this.updateRestrictions()}featureChanged(u){if(u==h.O.Conversations&&!this.item.enableRestrictions&&(this.showConversationsWarning(),setTimeout(()=>this.item.feature=null,100)),u==h.O.FilteredNews){this.item.newsCategories=this.builderModel.availableNewsCategories;for(const w of this.item.newsCategories)w.selected=this.item.itemIds.includes(w.id)}this.updateRestrictions()}setupResources(){if(!this.item)return;const u=this.item.resourceType??this.item.resourceGroupType;u?(this.item.availableResources=this.availableResources.filter(w=>w.resourceType==u).map(w=>{const M=new R.J;return M.id=w.id,M.name=w.name,M}),this.setResourceLabel(u)):this.item.availableResources=[]}onResourceChanged(u){if(!u)return;const w=this.availableResources.find(M=>M.id==u&&M.resourceType==this.item.resourceType);this.item.isVirtual=w.isVirtualResource,this.updateRestrictions(w.roleIds,w.targetListIds)}setResourceLabel(u){this.currentResourceLabel=this.translateService.instant(B.iQ.getDisplayNameKey(u))}updateRestrictions(u=[],w=[]){const M=[];for(const z of this.availableRoles){const $=a.clone(z);$.selected=u.some(ee=>ee===$.id),M.push($)}const J=[];for(const z of this.availableTargetLists){const $=a.clone(z);$.selected=w.some(ee=>ee===$.id),J.push($)}this.item.restrictionRoleModels=M,this.item.restrictionTargetModels=J,this.item.enableRestrictions=this.membershipService.orgContext.premiumFeatures.securedAccessEnabled,this.itemChange.emit(this.item)}showConversationsWarning(){this.modalService.openWithService(this.ngbModal,D.f,{size:"sm",windowClass:"animated fadeInDown duration-300"})}updateUrlWarning(){this.showUrlWarning=!(!this.item.url||!this.item.url.length)&&this.item.function==o.z.Link&&A.m.needsWarning(this.builderModel.restrictedUrls,this.item.url)}static#e=this.\u0275fac=function(w){return new(w||U)(e.Y36(g.J),e.Y36(E.v),e.Y36(T.FF),e.Y36(p.sK),e.Y36(y.D))};static#t=this.\u0275cmp=e.Xpm({type:U,selectors:[["sia-menu-item-function-selector"]],inputs:{availableResources:"availableResources",availableRoles:"availableRoles",availableTargetLists:"availableTargetLists",builderModel:"builderModel",item:"item"},outputs:{itemChange:"itemChange"},decls:8,vars:12,consts:[[3,"items","label","canDelete","showImages","ngModel","ngModelChange"],[4,"ngIf"],[3,"ngModel","items","label","canDelete","showImages","ngModelChange"],[3,"addItemPlaceholder","boxIcon","boxTitle","collection","noItemsTitle","showSelectAll","tableMode","inlineTemplate","itemTemplate",4,"ngIf"],["categoryTemplate",""],[3,"addItemPlaceholder","boxIcon","boxTitle","collection","noItemsTitle","showSelectAll","tableMode","inlineTemplate","itemTemplate"],["class","d-flex",4,"ngIf"],[1,"d-flex"],[1,"ml-2","mr-2"],[1,"ion-person","mr-1"],[3,"ngModel","itemsChangeMode","items","label","canDelete","showImages","ngModelChange","selectedItemChange"],["resourceSelect",""],[3,"itemsChangeMode","items","label","canDelete","showImages","ngModel","ngModelChange","selectedItemChange"],["resourceGroupSelect",""],[3,"ngModel","commonPattern","label","ngModelChange","keyup"],["class","text-warning small",4,"ngIf"],[3,"ngModel","label","ngModelChange"],[1,"text-warning","small"],[1,"ion-android-warning","mr-1"],["translate",""],[3,"ngModel","required","label","ngModelChange"],[3,"ngModel","commonPattern","required","label","ngModelChange"]],template:function(w,M){1&w&&(e.TgZ(0,"sia-dropdown",0),e.NdJ("ngModelChange",function(z){return M.item.function=z})("ngModelChange",function(z){return M.functionChanged(z)}),e.qZA(),e.YNc(1,t,5,6,"div",1),e.YNc(2,f,4,13,"div",1),e.YNc(3,Z,4,13,"div",1),e.YNc(4,P,4,6,"div",1),e.YNc(5,N,2,5,"div",1),e.YNc(6,H,2,3,"div",1),e.YNc(7,q,2,4,"div",1)),2&w&&(e.Q6J("items",M.builderModel.menuFunctions)("label","menubuilder.item_function")("canDelete",!1)("showImages",!1)("ngModel",M.item.function),e.xp6(1),e.Q6J("ngIf",M.item.function==M.MenuFunction.Feature),e.xp6(1),e.Q6J("ngIf",M.item.function==M.MenuFunction.Content),e.xp6(1),e.Q6J("ngIf",M.item.function==M.MenuFunction.ContentGroup),e.xp6(1),e.Q6J("ngIf",M.item.function==M.MenuFunction.Link),e.xp6(1),e.Q6J("ngIf",M.item.function==M.MenuFunction.MicroSite),e.xp6(1),e.Q6J("ngIf",M.item.function==M.MenuFunction.Call),e.xp6(1),e.Q6J("ngIf",M.item.function==M.MenuFunction.Mail))},dependencies:[d.I,x.p,v.c,I.H,G.O5,L.JJ,L.Q7,L.On,p.Pi]})}return U})()},18091:(Q,S,n)=>{n.d(S,{U:()=>T});
1var e=n(94650),a=n(24006),s=n(47554),O=n(28102),B=n(8717),A=n(8046),D=n(5990),o=n(58446),h=n(839),R=n(88221),c=n(36895);function g(p,y){if(1&p&&(e.TgZ(0,"div",7)(1,"i",8)(2,"span"),e._uU(3),e.qZA()()()),2&p){const d=e.oxw(2);e.xp6(3),e.Oqu(d.model.error)}}function E(p,y){if(1&p){const d=e.EpF();e.TgZ(0,"div",1),e.YNc(1,g,4,1,"div",2),e.TgZ(2,"sia-image-or-icon-chooser",3),e.NdJ("ngModelChange",function(v){e.CHM(d);const I=e.oxw();return e.KtG(I.model.icon=v)}),e.qZA(),e.TgZ(3,"sia-textbox",4),e.NdJ("ngModelChange",function(v){e.CHM(d);const I=e.oxw();return e.KtG(I.model.title=v)}),e.qZA(),e.TgZ(4,"sia-checkbox",5),e.NdJ("ngModelChange",function(v){e.CHM(d);const I=e.oxw();return e.KtG(I.model.disabled=v)}),e.qZA(),e.TgZ(5,"sia-menu-item-function-selector",6),e.NdJ("itemChange",function(v){e.CHM(d);const I=e.oxw();return e.KtG(I.model=v)}),e.qZA()()}if(2&p){const d=e.oxw();e.Q6J("title","menubuilder.item_editor_title"),e.xp6(1),e.Q6J("ngIf",d.model.error),e.xp6(1),e.Q6J("ngModel",d.model.icon)("icons8Color",d.menuIconColor)("icons8HideColorPicker",d.hideColorPicker)("label","general.image"),e.xp6(1),e.Q6J("ngModel",d.model.title)("maxlength",d.menuItemLengthLimit)("maxlengthMsg","menubuilder.menu_item_title_too_long")("label","menubuilder.item_label"),e.xp6(1),e.Q6J("ngModel",d.model.disabled)("label","menubuilder.item_disabled"),e.xp6(1),e.Q6J("item",d.model)("availableResources",d.availableResources)("availableRoles",d.availableRoles)("availableTargetLists",d.availableTargetLists)("builderModel",d.menuBuilder)}}let T=(()=>{class p extends s.V{get model(){return this._model}set model(d){this._model=d,d&&this.selector&&(d.resourceType?this.selector.setResourceLabel(d.resourceType):d.resourceGroupType&&this.selector.setResourceLabel(d.resourceGroupType)),this.onChange(this._model)}constructor(d,x){super(),this.apiChannel=d,this.membershipService=x,this.menuItemLengthLimit=30}ngOnInit(){this.model||(this.model={})}writeValue(d){void 0!==d&&(this.model=d)}static#e=this.\u0275fac=function(x){return new(x||p)(e.Y36(B.J),e.Y36(A.v))};static#t=this.\u0275cmp=e.Xpm({type:p,selectors:[["menu-item-editor"]],viewQuery:function(x,v){if(1&x&&e.Gf(O.G,5),2&x){let I;e.iGM(I=e.CRH())&&(v.selector=I.first)}},inputs:{_model:"_model",menuBuilder:"menuBuilder",menuIconColor:"menuIconColor",hideColorPicker:"hideColorPicker",menuItemLengthLimit:"menuItemLengthLimit",availableResources:"availableResources",availableRoles:"availableRoles",availableTargetLists:"availableTargetLists"},features:[e._Bn([{provide:a.JU,useExisting:(0,e.Gpc)(()=>p),multi:!0}]),e.qOj],decls:1,vars:1,consts:[["sia-card","",3,"title",4,"ngIf"],["sia-card","",3,"title"],["class","item-error",4,"ngIf"],[3,"ngModel","icons8Color","icons8HideColorPicker","label","ngModelChange"],[3,"ngModel","maxlength","maxlengthMsg","label","ngModelChange"],[3,"ngModel","label","ngModelChange"],[3,"item","availableResources","availableRoles","availableTargetLists","builderModel","itemChange"],[1,"item-error"],[1,"ion-alert-circled"]],template:function(x,v){1&x&&e.YNc(0,E,6,17,"div",0),2&x&&e.Q6J("ngIf",v.model)},dependencies:[D.x,o.I,h.F,R.c,c.O5,a.JJ,a.nD,a.On,O.G],styles:[".item-error[_ngcontent-%COMP%]{padding:2px 8px;font-size:15px}.item-error[_ngcontent-%COMP%] i[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-left:5px}"]})}return p})()},22689:(Q,S,n)=>{n.d(S,{X:()=>o});var e=n(94650),a=n(24006),s=n(5990),O=n(88221),B=n(36895),A=n(89383);function D(h,R){if(1&h){const c=e.EpF();e.TgZ(0,"div",1)(1,"sia-textbox",2),e.NdJ("ngModelChange",function(E){e.CHM(c);const T=e.oxw();return e.KtG(T.model.header=E)}),e.qZA(),e.TgZ(2,"div",3)(3,"span",4),e._uU(4),e.qZA(),e.TgZ(5,"span"),e._uU(6),e.qZA()()()}if(2&h){const c=e.oxw();e.Q6J("title","menubuilder.section_editor_title"),e.xp6(1),e.Q6J("ngModel",c.model.header)("label","menubuilder.section_header"),e.xp6(3),e.Oqu("menubuilder.active-item-info"),e.xp6(2),e.Oqu(c.activeItemCount)}}let o=(()=>{class h{constructor(){this.propagateChange=c=>{}}get model(){return this._model}set model(c){this._model=c,this.propagateChange(this.model)}
1get activeItemCount(){let c=this._model.menuItems.filter(g=>!g.disabled).length;return this._model.isFirst&&++c,c}ngOnInit(){this.model||(this.model={})}writeValue(c){void 0!==c&&(this.model=c)}registerOnChange(c){this.propagateChange=c}registerOnTouched(c){}static#e=this.\u0275fac=function(g){return new(g||h)};static#t=this.\u0275cmp=e.Xpm({type:h,selectors:[["menu-section-editor"]],inputs:{_model:"_model"},features:[e._Bn([{provide:a.JU,useExisting:(0,e.Gpc)(()=>h),multi:!0}])],decls:1,vars:1,consts:[["sia-card","",3,"title",4,"ngIf"],["sia-card","",3,"title"],[3,"ngModel","label","ngModelChange"],[1,"active-item-info"],["translate",""]],template:function(g,E){1&g&&e.YNc(0,D,7,5,"div",0),2&g&&e.Q6J("ngIf",E.model)},dependencies:[s.x,O.c,B.O5,a.JJ,a.On,A.Pi]})}return h})()},23383:(Q,S,n)=>{n.d(S,{v:()=>o});class e{constructor(){this.$className="SaveMenuTemplate"}}var a=n(94650),s=n(8717),O=n(96193),B=n(88221),A=n(24006),D=n(89383);let o=(()=>{class h{constructor(c,g){this.apiChannel=c,this.activeModal=g}saveTemplate(){if(!this.name||!this.menuBuilderModel)return;const c=new e;c.name=this.name,c.model=this.menuBuilderModel,this.apiChannel.executeCommand(c).subscribe(()=>this.close())}close(){this.activeModal.close()}static#e=this.\u0275fac=function(g){return new(g||h)(a.Y36(s.J),a.Y36(O.Kz))};static#t=this.\u0275cmp=a.Xpm({type:h,selectors:[["ng-component"]],inputs:{menuBuilderModel:"menuBuilderModel"},decls:16,vars:2,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],[1,"ion-share"],["translate","",1,"ml-1"],["aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"row"],[1,"col-12"],["label","general.name",3,"required","ngModel","ngModelChange"],["type","submit","translate","",1,"btn","btn-primary",3,"click"]],template:function(g,E){1&g&&(a.TgZ(0,"div",0)(1,"div",1)(2,"h5",2),a._UZ(3,"i",3),a.TgZ(4,"span",4),a._uU(5,"menubuilder.save_template"),a.qZA()(),a.TgZ(6,"button",5),a.NdJ("click",function(){return E.close()}),a.TgZ(7,"span",6),a._uU(8,"\xd7"),a.qZA()()(),a.TgZ(9,"div",7)(10,"div",8)(11,"div",9)(12,"form")(13,"sia-textbox",10),a.NdJ("ngModelChange",function(p){return E.name=p}),a.qZA(),a.TgZ(14,"button",11),a.NdJ("click",function(){return E.saveTemplate()}),a._uU(15,"general.save"),a.qZA()()()()()()),2&g&&(a.xp6(13),a.Q6J("required",!0)("ngModel",E.name))},dependencies:[B.c,A._Y,A.JJ,A.JL,A.Q7,A.On,A.F,D.Pi],encapsulation:2})}return h})()},40628:(Q,S,n)=>{n.d(S,{i:()=>he});var e=n(15861),a=n(17489),s=n(13675),O=n(17248),B=n(50112),A=n(3481);class D{constructor(){this.$className="MenuSection"}}var o=n(77143),h=n(41786),R=n(44324);class c{constructor(){this.$className="UpdateMenu"}}var g=n(81882),E=n(86328),T=n(16722),p=n(23383);class y{constructor(){this.$className="LoadMenuTemplateData"}}var d=n(62350),x=n(18138);class v{constructor(){this.$className="CopyMenuItem"}}class I{constructor(){this.$className="CopyMenuSection"}}var G=n(86878);class L{constructor(){this.$className="CopyFolderMenuItemJob"}}class F{constructor(){this.$className="CopyMenuSectionJob"}}class K{constructor(){this.$className="GetThemeOfOrganization"}}var _=n(69912),t=n(94650),f=n(8717),Z=n(96193),b=n(8046),P=n(74713),N=n(84918),H=n(5990),q=n(37218),V=n(36895),U=n(24006),Y=n(89383),u=n(35898),w=n(18091),M=n(22689),J=n(24271);const z=["menuBottom"],$=["restrictions"];function ee(m,k){1&m&&(t.TgZ(0,"div",17)(1,"div",18)(2,"span",4),t._uU(3,"general.loading"),t.qZA()()())}function se(m,k){if(1&m){const i=t.EpF();t.TgZ(0,"div",19)(1,"div",20)(2,"button",21),t.NdJ("click",function(){t.CHM(i);const r=t.oxw();return t.KtG(r.openApplyMenuFromTemplateModal())}),t._uU(3," menubuilder.apply_menu_from_template "),t.qZA()(),t.TgZ(4,"div",22)(5,"button",21),t.NdJ("click",function(){t.CHM(i);const r=t.oxw();return t.KtG(r.openSaveMenuTemplateModal())}),t._uU(6," menubuilder.save_template "),t.qZA()()()}}function le(m,k){if(1&m){const i=t.EpF();t.TgZ(0,"div",23)(1,"button",24),t.NdJ("click",function(){t.CHM(i);const r=t.oxw();return t.KtG(r.openApplyMenuModal())}),t._uU(2," menubuilder.apply_menu_for_another "),t.qZA()()}}function re(m,k){if(1&m){const i=t.EpF();t.TgZ(0,"button",46),t.NdJ("click",function(){t.CHM(i);const r=t.oxw().$implicit,C=t.oxw(2);return t.KtG(C.removeMenuSection(r))}),t._UZ(1,"i",47),t.qZA()}}function oe(m,k){if(1&m){const i=t.EpF();t.TgZ(0,"button",48),t.NdJ("click",function(){t.CHM(i);const r=t.oxw().$implicit,C=t.oxw(2),W=t.MAs(19);return t.KtG(C.copyMenuSection(r,W))}),t._UZ(1,"i",49),t.qZA()}}function ce(m,k){1&m&&(t.TgZ(0,"div",50)(1,"span",4),t._uU(2,"menubuilder.empty_section"),t.qZA()())}function ie(m,k){if(1&m){const i=t.EpF();t.TgZ(0,"button",48),t.NdJ("click",function(){t.CHM(i);const r=t.oxw().$implicit,C=t.oxw(3),W=t.MAs(19);return t.KtG(C.copyMenuItem(r,W))}),t._UZ(1,"i",49),t.qZA()}}function me(m,k){if(1&m){const i=t.EpF();t.TgZ(0,"div",51),t.NdJ("click",function(){const C=t.CHM(i).$implicit,W=t.oxw(3);return t.KtG(W.menuItemSelected(C))}),t.TgZ(1,"div",52)(2,"div",53),t._UZ(3,"img",54),t.ALo(4,"imageAbsUrl"),t.qZA(),t.TgZ(5,"div",55),t._uU(6),t.qZA()(),t.TgZ(7,"div",34)(8,"button",46),t.NdJ("click",function(){const C=t.CHM(i).$implicit,W=t.oxw().$implicit,j=t.oxw(2);return t.KtG(j.removeMenuItem(W,C))}
1),t._UZ(9,"i",47),t.qZA(),t.YNc(10,ie,2,0,"button",36),t.TgZ(11,"button",56),t._UZ(12,"i",57),t.qZA()()()}if(2&m){const i=k.$implicit,l=k.index,r=t.oxw(3);t.ekj("selected",i.selected)("error",i.error)("disabled",i.disabled),t.MGl("id","menu-item-",l,""),t.xp6(3),t.s9C("applyTint",r.multiColorIcons?null:r.iconTintColor),t.s9C("src",t.lcZ(4,13,null==i.icon?null:i.icon.linkOrFileGuid),t.LSH),t.xp6(2),t.Udp("color",r.textColor),t.xp6(1),t.hij(" ",i.title," "),t.xp6(4),t.Q6J("ngIf",r.membershipService.isSuperAdmin()&&r.canCopyItem(i))}}function de(m,k){if(1&m){const i=t.EpF();t.TgZ(0,"div",31)(1,"div",32),t.NdJ("click",function(){const C=t.CHM(i).$implicit,W=t.oxw(2);return t.KtG(W.menuSectionSelected(C))}),t.TgZ(2,"div",33),t._uU(3),t.qZA(),t.TgZ(4,"div",34),t.YNc(5,re,2,0,"button",35),t.YNc(6,oe,2,0,"button",36),t.TgZ(7,"button",37),t.NdJ("click",function(r){const W=t.CHM(i).index,j=t.oxw(2);return t.KtG(j.moveSectionUp(r,W))}),t._UZ(8,"i",38),t.qZA(),t.TgZ(9,"button",39),t.NdJ("click",function(r){const W=t.CHM(i).index,j=t.oxw(2);return t.KtG(j.moveSectionDown(r,W))}),t._UZ(10,"i",40),t.qZA(),t.TgZ(11,"button",41),t.NdJ("click",function(r){const W=t.CHM(i).$implicit,j=t.oxw(2);return t.KtG(j.addMenuItem(r,W))}),t._UZ(12,"i",42),t.qZA()()(),t.TgZ(13,"div",43),t.YNc(14,ce,3,0,"div",44),t.YNc(15,me,13,15,"div",45),t.qZA()()}if(2&m){const i=k.$implicit,l=k.index,r=t.oxw(2);t.xp6(1),t.ekj("selected",i.selected),t.xp6(1),t.Udp("color",r.textColor),t.xp6(1),t.hij(" ",i.header," "),t.xp6(2),t.Q6J("ngIf",r.model.menuSections.length>1),t.xp6(1),t.Q6J("ngIf",r.membershipService.isSuperAdmin()),t.xp6(1),t.ekj("d-none",l<1),t.xp6(2),t.ekj("d-none",1==r.model.menuSections.length||l==r.model.menuSections.length-1),t.xp6(4),t.Q6J("sortablejs",i.menuItems)("sortablejsOptions",r.itemSortableOptions),t.xp6(1),t.Q6J("ngIf",l>0&&0===i.menuItems.length),t.xp6(1),t.Q6J("ngForOf",i.menuItems)}}function ue(m,k){if(1&m&&(t.TgZ(0,"div",25)(1,"div",26)(2,"div",27)(3,"div",28),t.YNc(4,de,16,15,"div",29),t._UZ(5,"div",null,30),t.qZA()()()()),2&m){const i=t.oxw();t.xp6(2),t.Udp("background-color",i.backgroundColor),t.xp6(2),t.Q6J("ngForOf",i.model.menuSections)}}function _e(m,k){if(1&m){const i=t.EpF();t.TgZ(0,"div",58)(1,"menu-item-editor",59),t.NdJ("ngModelChange",function(r){t.CHM(i);const C=t.oxw();return t.KtG(C.selectedMenuItem=r)})("ngModelChange",function(){t.CHM(i);const r=t.oxw();return t.KtG(r.restrictions.init())}),t.qZA()()}if(2&m){const i=t.oxw();t.xp6(1),t.Q6J("ngModel",i.selectedMenuItem)("availableResources",i.availableResources)("availableRoles",i.availableRoles)("availableTargetLists",i.availableTargetLists)("menuIconColor",i.iconTintColor)("hideColorPicker",!i.multiColorIcons)("menuBuilder",i.model)("menuItemLengthLimit",i.menuItemLengthLimit)}}function pe(m,k){if(1&m){const i=t.EpF();t.TgZ(0,"div",58)(1,"menu-section-editor",60),t.NdJ("ngModelChange",function(r){t.CHM(i);const C=t.oxw();return t.KtG(C.selectedMenuSection=r)}),t.qZA()()}if(2&m){const i=t.oxw();t.xp6(1),t.Q6J("ngModel",i.selectedMenuSection)}}function ge(m,k){if(1&m&&(t.TgZ(0,"div",61),t._UZ(1,"sia-restriction-chooser",62,63),t.qZA()),2&m){const i=t.oxw();t.xp6(1),t.Q6J("model",i.selectedMenuItem)}}function ae(m,k){1&m&&(t.TgZ(0,"span",4),t._uU(1,"contentfolder.copy_content_folder_info"),t.qZA())}let he=(()=>{class m{constructor(i,l,r){this.apiChannel=i,this.modalService=l,this.membershipService=r,this.menuItemLengthLimit=30,this.itemSortableOptions={handle:".item-move-button",group:"items",animation:150}}ngOnInit(){var i=this;return(0,e.Z)(function*(){i.canManageTemplates=i.membershipService.hasRight(E.J.ManageMenuTemplates),i.getOrganizationsFromActiveOrganizationsDistricts();const[l,r]=yield Promise.all([i.loadTheme(),i.getMenuBuilderModel()]);i.loadMenuBuilderModel(r)})()}getOrganizationsFromActiveOrganizationsDistricts(){const i=new o.X;i.orgId=this.membershipService.orgContext.id,this.apiChannel.executeQuery(i).subscribe(l=>{this.selectableOrganizations=l||[],this.selectableOrganizations=this.selectableOrganizations.filter(r=>r.id!==i.orgId)})}loadTheme(){var i=this;return(0,e.Z)(function*(){const l=new K;
1l.orgId=i.membershipService.orgContext.id,i.theme=yield i.apiChannel.executeQuery(l).toPromise(),i.iconTintColor=s.i5.ARGBtoRGBA(i.theme?.primaryColor)||"#000",i.backgroundColor=s.i5.ARGBtoRGBA(i.theme?.backgroundColor)||"#f2f2f2",i.textColor=s.i5.isLightColor(i.backgroundColor)?"#000":"#fff",i.multiColorIcons=i.theme?.multiColorIcons||!1})()}getMenuBuilderModel(){var i=this;return(0,e.Z)(function*(){const l=new h.s;return l.organizationId=i.membershipService.orgContext.id,yield i.apiChannel.executeQuery(l).toPromise()})()}menuItemSelected(i){this.deselectAll(),this.selectedMenuItem=i,i.selected=!0}menuSectionSelected(i){this.deselectAll(),this.selectedMenuSection=i,i.selected=!0}createNewItem(i){const l=new A.s;return l.selected=i,l.title="New item",l.function=null,l.icon=new R.y,l.icon.enabledTypes=[g._.Icons8,g._.SiaFileResource],l.icon.imageType=g._.SiaFileResource,l.icon.linkOrFileGuid="",l.enableRestrictions=this.membershipService.orgContext.premiumFeatures.securedAccessEnabled,l.restrictionRoleModels=a.cloneDeep(this.availableRoles),l.restrictionTargetModels=a.cloneDeep(this.availableTargetLists),l.itemIds=[],l.newsCategories=a.cloneDeep(this.model.availableNewsCategories),l}addMenuItem(i,l){i.stopPropagation(),i.preventDefault(),this.deselectAll();const r=this.createNewItem(!0);l.menuItems.push(r),this.selectedMenuItem=r}addMenuSection(){this.deselectAll();const i=new D,l=this.createNewItem(!1);i.header="New section",i.selected=!0,i.menuItems=[],i.menuItems.push(l),this.model.menuSections.push(i),this.selectedMenuSection=i,setTimeout(()=>{this.menuBottom.nativeElement.scrollIntoView()},100)}removeMenuItem(i,l){if(this.selectedMenuItem==l){this.deselectAll();const C=this.model.menuSections[0].menuItems[0];C.selected=!0,this.selectedMenuItem=C}const r=i.menuItems.indexOf(l);r>-1&&i.menuItems.splice(r,1)}canCopyItem(i){return!(i.isVirtual||i.function==x.z.Content&&(i.resourceType==G._.Classroom||i.resourceType==G._.Contact)||i.function==x.z.ContentGroup&&(i.resourceGroupType==G._.Classroom||i.resourceGroupType==G._.ContactGroup)||i.function==x.z.Feature&&i.feature==_.O.FilteredNews)}copyMenuItem(i,l){var r=this;const C=this.modalService.open(d.Q,{size:"lg",windowClass:"animated zoomIn duration-300"}),W=C.componentInstance;W.copySubjectString="menubuilder.menu_item",i.function==x.z.ContentGroup&&(W.infos=[l]),W.copyContentEmitter.subscribe(function(){var j=(0,e.Z)(function*(te){if(i.function==x.z.ContentGroup){const X=new L;X.menuItem=i,X.orgIds=te.orgIds,yield r.apiChannel.executeTask(X).toPromise()}else{const X=new v;X.menuItem=i,X.orgIds=te.orgIds,yield r.apiChannel.executeCommand(X).toPromise()}C.dismiss()});return function(te){return j.apply(this,arguments)}}())}copyMenuSection(i,l){var r=this;const C=this.modalService.open(d.Q,{size:"lg",windowClass:"animated zoomIn duration-300"}),W=i.menuItems.some(te=>te.function==x.z.ContentGroup),j=C.componentInstance;j.copySubjectString="menubuilder.menu_section",W&&(j.infos=[l]),j.copyContentEmitter.subscribe(function(){var te=(0,e.Z)(function*(X){if(W){const ne=new F;ne.menuSection=i,ne.orgIds=X.orgIds,yield r.apiChannel.executeTask(ne).toPromise()}else{const ne=new I;ne.menuSection=i,ne.orgIds=X.orgIds,yield r.apiChannel.executeCommand(ne).toProm
1ise()}C.dismiss()});return function(X){return te.apply(this,arguments)}}())}removeMenuSection(i){if(this.selectedMenuSection==i){this.deselectAll();const r=this.model.menuSections[0].menuItems[0];r.selected=!0,this.selectedMenuItem=r}const l=this.model.menuSections.indexOf(i);l>-1&&this.model.menuSections.splice(l,1)}moveSectionUp(i,l){i.stopPropagation(),i.preventDefault(),this.model.menuSections.splice(l-1,0,this.model.menuSections.splice(l,1)[0])}moveSectionDown(i,l){i.stopPropagation(),i.preventDefault(),this.model.menuSections.splice(l+1,0,this.model.menuSections.splice(l,1)[0])}saveMenu(){const i=a.cloneDeep(this.model),l=this.validateMenuLength(i.menuSections);if(l.length>0)return void this.openLengthErrorModal(l);const r=new c;r.organizationId=this.membershipService.orgContext.id,r.menu=i,this.apiChannel.executeCommand(r).subscribe(()=>{this.clearErrors()},C=>{this.applyMenuItemErrors(C?.result?.itemErrors)})}applyMenuItemErrors(i){if(this.clearErrors(),!i||0===i.length)return;let l=!1;for(const r of i){const W=this.model.menuSections[r.sectionIndex]?.menuItems[r.itemIndex];W&&(W.error=r.errorMessage,l||(this.deselectAll(),this.selectedMenuItem=W,W.selected=!0,l=!0))}}clearErrors(){for(const i of this.model.menuSections)for(const l of i.menuItems)l.error=null}deselectAll(){this.selectedMenuSection=null,this.selectedMenuItem=null;for(const i of this.model.menuSections){i.selected=!1;for(const l of i.menuItems)l.selected=!1}}openApplyMenuModal(){const i=this.modalService.open(O.y,{size:"lg",windowClass:"animated fadeInDown duration-300"}),l=a.cloneDeep(this.model);i.componentInstance.selectableOrganizations=this.selectableOrganizations,i.componentInstance.model=l}openApplyMenuFromTemplateModal(){const i=this.modalService.open(T.P,{size:"lg",windowClass:"animated fadeInDown duration-300"});i.componentInstance.templateSelected.subscribe(r=>{this.fetchMenuTemplate(r,i)})}fetchMenuTemplate(i,l){const r=new y;r.orgId=this.membershipService.orgContext.id,r.templateId=i,this.apiChannel.executeQuery(r).subscribe(C=>{this.loadMenuBuilderModel(C),l.close()})}loadMenuBuilderModel(i){this.model=i,this.availableResources=i.resources,this.availableRoles=i.roles,this.availableTargetLists=i.targetLists;let l=null;if(i.menuSections&&i.menuSections.length>0){const r=i.menuSections[0];r.menuItems&&r.menuItems.length>0&&(l=r.menuItems[0],l.selected=!0)}setTimeout(()=>{this.menuLoaded=!0,this.selectedMenuItem=l},300)}openSaveMenuTemplateModal(){const i=this.modalService.open(p.v,{size:"sm",windowClass:"animated fadeInDown duration-300"}),l=a.cloneDeep(this.model),r=i.componentInstance;r.menuBuilderModel=l;const C=(new Intl.DateTimeFormat).format();r.name=this.membershipService.orgContext.name+" - "+C}validateMenuLength(i){const l=[];for(const r of i)for(const C of r.menuItems)C.title.length>this.menuItemLengthLimit&&l.push(C.title);return l}openLengthErrorModal(i){const r=this.modalService.open(B.c).componentInstance;r.itemsWithTooLongNames=i,r.itemLengthLimit=this.menuItemLengthLimit}static#e=this.\u0275fac=function(l){return new(l||m)(t.Y36(f.J),t.Y36(Z.FF),t.Y36(b.v))};static#t=this.\u0275cmp=t.Xpm({type:m,selectors:[["app-menu-builder"]],viewQuery:function(l,r){if(1&l&&(t.Gf(z,7),t.Gf($,5)),2&l){let C;t.iGM(C=t.CRH())&&(r.menuBottom=C.first),t.iGM(C=t.CRH())&&(r.restrictions=C.first)}},decls:20,vars:17,consts:[["sia-card","","class","animated bounceInLeft delay-800",4,"ngIf"],[1,"menu-builder-wrapper","animated","duration-500","slideInLeft"],["translate","",1,"alert","alert-info"],[1,"ion-information-circled","mr-2"],["translate",""],[1,"actions-phone-container"],[1,"ph
1one-view-wrapper"],["class","template-buttons mb-2",4,"ngIf"],["class","full-width mb-2",4,"ngIf"],["statusBarTitle","menubuilder.menubuilder",3,"showLeftButton","leftButtonTitle","leftButtonIconClass","showRightButton","rightButtonTitle","rightButtonIconClass","onLeftButtonClick","onRightButtonClick"],["class","menu-builder-wrapper",4,"ngIf"],[1,"ml-3","flex-grow-1"],[1,"row"],[1,"col-12"],["class","editor-box",4,"ngIf"],["class","col-12 col-xlg-6",4,"ngIf"],["folderCopyInfo",""],["sia-card","",1,"animated","bounceInLeft","delay-800"],[1,"text-center"],[1,"template-buttons","mb-2"],[1,"button-item"],["type","button","translate","",1,"btn","btn-block","btn-primary",3,"click"],[1,"button-item","pl-1"],[1,"full-width","mb-2"],["type","button","translate","",1,"btn","btn-block","btn-success",3,"click"],[1,"menu-builder-wrapper"],[1,"menu-builder-background"],[1,"menu-builder"],[1,"menu-section-container"],["class","menu-section",4,"ngFor","ngForOf"],["menuBottom",""],[1,"menu-section"],[1,"menu-section-header",3,"click"],[1,"menu-section-header-title"],[1,"menu-buttons"],["type","button","class","btn btn-danger btn-sm remove-button",3,"click",4,"ngIf"],["type","button","class","btn btn-primary btn-sm remove-button",3,"click",4,"ngIf"],["type","button",1,"btn","btn-primary","btn-sm","section-move-up-button",3,"click"],[1,"ion-arrow-up-c"],["type","button",1,"btn","btn-primary","btn-sm","section-move-down-button",3,"click"],[1,"ion-arrow-down-c"],[1,"btn","btn-sm","btn-primary","add-item-button",3,"click"],[1,"ion-plus-round"],[1,"menu-item-container",3,"sortablejs","sortablejsOptions"],["class","empty-section text-center",4,"ngIf"],["class","menu-item",3,"id","selected","error","disabled","click",4,"ngFor","ngForOf"],["type","button",1,"btn","btn-danger","btn-sm","remove-button",3,"click"],[1,"ion-close-round"],["type","button",1,"btn","btn-primary","btn-sm","remove-button",3,"click"],[1,"ion-ios-copy-outline"],[1,"empty-section","text-center"],[1,"menu-item",3,"id","click"],[1,"d-flex","align-items-center"],[1,"menu-item-icon-wrapper"],[1,"menu-item-icon",3,"applyTint","src"],[1,"menu-item-title"],["type","button",1,"btn","btn-primary","btn-sm","item-move-button"],[1,"ion-arrow-move"],[1,"editor-box"],[3,"ngModel","availableResources","availableRoles","availableTargetLists","menuIconColor","hideColorPicker","menuBuilder","menuItemLengthLimit","ngModelChange"],[3,"ngModel","ngModelChange"],[1,"col-12","col-xlg-6"],[3,"model"],["restrictions",""]],template:function(l,r){1&l&&(t.YNc(0,ee,4,0,"div",0),t.TgZ(1,"div",1)(2,"div",2),t._UZ(3,"i",3),t.TgZ(4,"span",4),t._uU(5,"menubuilder.v10_info"),t.qZA()(),t.TgZ(6,"div",5)(7,"div",6),t.YNc(8,se,7,0,"div",7),t.YNc(9,le,3,0,"div",8),t.TgZ(10,"phone-view",9),t.NdJ("onLeftButtonClick",function(){return r.addMenuSection()}
1)("onRightButtonClick",function(){return r.saveMenu()}),t.YNc(11,ue,7,3,"div",10),t.qZA()(),t.TgZ(12,"div",11)(13,"div",12)(14,"div",13),t.YNc(15,_e,2,8,"div",14),t.YNc(16,pe,2,1,"div",14),t.qZA(),t.YNc(17,ge,3,1,"div",15),t.qZA()()()(),t.YNc(18,ae,2,0,"ng-template",null,16,t.W1O)),2&l&&(t.Q6J("ngIf",!r.menuLoaded),t.xp6(1),t.ekj("d-none",!r.menuLoaded),t.xp6(7),t.Q6J("ngIf",r.canManageTemplates),t.xp6(1),t.Q6J("ngIf",r.selectableOrganizations&&r.selectableOrganizations.length>0),t.xp6(1),t.Q6J("showLeftButton",!0)("leftButtonTitle","appbuilder.section")("leftButtonIconClass","ion-plus-round")("showRightButton",!0)("rightButtonTitle","general.save")("rightButtonIconClass","ion-checkmark-round"),t.xp6(1),t.Q6J("ngIf",r.model),t.xp6(3),t.ekj("col-xlg-6",r.selectedMenuItem),t.xp6(1),t.Q6J("ngIf",r.selectedMenuItem),t.xp6(1),t.Q6J("ngIf",r.selectedMenuSection),t.xp6(1),t.Q6J("ngIf",r.selectedMenuItem))},dependencies:[P.l,N.X,H.x,q.O,V.sg,V.O5,U.JJ,U.On,Y.Pi,u.Q,w.U,M.X,J.e],styles:[".phone-view-wrapper[_ngcontent-%COMP%]{flex:0 0 442px;margin:0 auto}.actions-phone-container[_ngcontent-%COMP%]{display:flex}.menu-builder-wrapper[_ngcontent-%COMP%]{height:100%;width:100%;position:relative;display:flex;flex-direction:column}.menu-builder-wrapper[_ngcontent-%COMP%] .menu-builder-background[_ngcontent-%COMP%]{position:absolute;inset:0}.menu-builder-wrapper[_ngcontent-%COMP%] .menu-builder-background[_ngcontent-%COMP%] .menu-builder[_ngcontent-%COMP%]{width:100%;height:100%;overflow-y:auto}.menu-builder-wrapper[_ngcontent-%COMP%] .menu-builder-background[_ngcontent-%COMP%] .menu-builder[_ngcontent-%COMP%] .menu-section[_ngcontent-%COMP%]{color:var(--body-color);margin-bottom:.5rem}.menu-builder-wrapper[_ngcontent-%COMP%] .menu-builder-background[_ngcontent-%COMP%] .menu-builder[_ngcontent-%COMP%] .menu-section[_ngcontent-%COMP%] .menu-buttons[_ngcontent-%COMP%]{display:none;justify-content:space-between}.menu-builder-wrapper[_ngcontent-%COMP%] .menu-builder-background[_ngcontent-%COMP%] .menu-builder[_ngcontent-%COMP%] .menu-section[_ngcontent-%COMP%] .menu-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-right:.25rem}.menu-builder-wrapper[_ngcontent-%COMP%] .menu-builder-background[_ngcontent-%COMP%] .menu-builder[_ngcontent-%COMP%] .menu-section[_ngcontent-%COMP%] .menu-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:last-child{margin-right:0}.menu-builder-wrapper[_ngcontent-%COMP%] .menu-builder-background[_ngcontent-%COMP%] .menu-builder[_ngcontent-%COMP%] .menu-section[_ngcontent-%COMP%] .menu-section-header[_ngcontent-%COMP%]{cursor:pointer;width:100%;height:3rem;line-height:3rem;font-size:1.25rem;padding:0 1rem;display:flex;flex-direction:row;align-items:center;justify-content:space-between}.menu-builder-wrapper[_ngcontent-%COMP%] .menu-builder-background[_ngcontent-%COMP%] .menu-builder[_ngcontent-%COMP%] .menu-section[_ngcontent-%COMP%] .menu-section-header[_ngcontent-%COMP%] .menu-section-header-title[_ngcontent-%COMP%]{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:225px}.menu-builder-wrapper[_ngcontent-%COMP%] .menu-builder-background[_ngcontent-%COMP%] .menu-builder[_ngcontent-%COMP%] .menu-section[_ngcontent-%COMP%] .menu-section-header.selected[_ngcontent-%COMP%], .menu-builder-wrapper[_ngcontent-%COMP%] .menu-builder-background[_ngcontent-%COMP%] .menu-builder[_ngcontent-%COMP%] .menu-section[_ngcontent-%COMP%] .menu-section-header[_ngcontent-%COMP%]:hover{background:#5c5c5c}.menu-builder-wrapper[_ngcontent-%COMP%] .menu-builder-background[_ngcontent-%COMP%] .menu-builder[_ngcontent-%COMP%] .menu-section[_ngcontent-%COMP%] .menu-section-header[_ngcontent-%COMP%]:hover .menu-buttons[_ngcontent-%COMP%]{display:flex}.menu-builder-wrapper[_ngcontent-%COMP%] .menu-builder-background[_ngcontent-%COMP%] .menu-builder[_ngcontent-%COMP%] .menu-section[_ngcontent-%COMP%] .menu-item-container[_ngcontent-%COMP%]{min-height:.5rem}.menu-builder-wrapper[_ngcontent-%COMP%] .menu-builder-background[_ngcontent-%COMP%] .menu-builder[_ngcontent-%COMP%] .menu-section[_ngcontent-%COMP%] .menu-item-container[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%]{cursor:pointer;width:100%;height:2.5rem;line-height:2.5rem;padding:0 1rem;display:flex;flex-direction:row;justify-content:space-between;align-items:center}
1.menu-builder-wrapper[_ngcontent-%COMP%] .menu-builder-background[_ngcontent-%COMP%] .menu-builder[_ngcontent-%COMP%] .menu-section[_ngcontent-%COMP%] .menu-item-container[_ngcontent-%COMP%] .menu-item.disabled[_ngcontent-%COMP%]{opacity:.6}.menu-builder-wrapper[_ngcontent-%COMP%] .menu-builder-background[_ngcontent-%COMP%] .menu-builder[_ngcontent-%COMP%] .menu-section[_ngcontent-%COMP%] .menu-item-container[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%] .menu-item-icon-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:2rem;min-width:2rem;max-width:2rem;height:2rem;min-height:2rem;max-height:2rem;margin-right:.5rem}.menu-builder-wrapper[_ngcontent-%COMP%] .menu-builder-background[_ngcontent-%COMP%] .menu-builder[_ngcontent-%COMP%] .menu-section[_ngcontent-%COMP%] .menu-item-container[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%] .menu-item-icon-wrapper[_ngcontent-%COMP%] .menu-item-icon[_ngcontent-%COMP%]{width:100%;height:100%}.menu-builder-wrapper[_ngcontent-%COMP%] .menu-builder-background[_ngcontent-%COMP%] .menu-builder[_ngcontent-%COMP%] .menu-section[_ngcontent-%COMP%] .menu-item-container[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%] .menu-item-title[_ngcontent-%COMP%]{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:inline-block;max-width:250px}.menu-builder-wrapper[_ngcontent-%COMP%] .menu-builder-background[_ngcontent-%COMP%] .menu-builder[_ngcontent-%COMP%] .menu-section[_ngcontent-%COMP%] .menu-item-container[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%] .item-move-button[_ngcontent-%COMP%]{cursor:move}.menu-builder-wrapper[_ngcontent-%COMP%] .menu-builder-background[_ngcontent-%COMP%] .menu-builder[_ngcontent-%COMP%] .menu-section[_ngcontent-%COMP%] .menu-item-container[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%]:hover .menu-buttons[_ngcontent-%COMP%]{display:flex}.template-buttons[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.template-buttons[_ngcontent-%COMP%] .button-item[_ngcontent-%COMP%]{flex-grow:1}@media (max-width: 420px){.phone-view-wrapper[_ngcontent-%COMP%]{flex-shrink:1}}@media (max-width: 732px){.menu-item-title[_ngcontent-%COMP%]{max-width:150px!important}.menu-section-header-title[_ngcontent-%COMP%]{max-width:120px!important}}@media (max-width: 900px){.actions-phone-container[_ngcontent-%COMP%]{flex-wrap:wrap;overflow-x:scroll}}"]})}return m})()},91775:(Q,S,n)=>{n.d(S,{g:()=>T});var e=n(52798),A=(n(40628),n(17248),n(18091),n(22689),n(35898)),g=(n(50112),n(28102),n(16722),n(23383),n(91869),n(94650));let T=(()=>{class p{static#e=this.\u0275fac=function(x){return new(x||p)};static#t=this.\u0275mod=g.oAB({type:p});static#n=this.\u0275inj=g.cJS({imports:[e.n,A.b.forRoot({})]})}return p})()},66986:(Q,S,n)=>{n.d(S,{H:()=>v});class e{constructor(){this.$className="GetSignageSettingsForOrganization"}}class a{constructor(){this.$className="UpdateSignageSettingsForOrganization"}}var s=n(94650),O=n(96193),B=n(8717),A=n(8046),D=n(34750),o=n(58446),h=n(9763),R=n(88221),c=n(36895),g=n(24006),E=n(89383);function T(I,G){if(1&I){const L=s.EpF();s.TgZ(0,"div",18)(1,"sia-textbox",19),s.NdJ("ngModelChange",function(K){s.CHM(L);const _=s.oxw(2);return s.KtG(_.settingsModel.reachFacilityId=K)}),s.qZA(),s.TgZ(2,"sia-textbox",20),s.NdJ("ngModelChange",function(K){s.CHM(L);const _=s.oxw(2);return s.KtG(_.settingsModel.reachScreenId=K)}),s.qZA(),s.TgZ(3,"sia-number-box",21),s.NdJ("ngModelChange",function(K){s.CHM(L);const _=s.oxw(2);return s.KtG(_.settingsModel.reachDuration=K)}),s.qZA()()}if(2&I){const L=s.oxw(2);s.xp6(1),s.Q6J("ngModel",L.settingsModel.reachFacilityId)("label","organization.reach_facility_id"),s.xp6(1),s.Q6J("ngModel",L.settingsModel.reachScreenId)("label","organization.reach_screen_id"),s.xp6(1),s.Q6J("ngModel",L.settingsModel.reachDuration)("label","organization.reach_duration")}}function p(I,G){if(1&I){const L=s.EpF();s.TgZ(0,"div",15)(1,"sia-checkbox",16),s.NdJ("ngModelChange",function(K){s.CHM(L);const _=s.oxw();return s.KtG(_.settingsModel.reachSyncEnabled=K)}),s.qZA(),s.YNc(2,T,4,6,"div",17),s.qZA()}if(2&I){const L=s.oxw();s.xp6(1),s.Q6J("ngModel",L.settingsModel.reachSyncEnabled)("label","organization.enable_reach_integration"),s.xp6(1),s.Q6J("ngIf",L.settingsModel.reachSyncEnabled)}}function y(I,G){1&I&&(s.TgZ(0,"div",4),s._uU(1,"appbuilder.reach_signage_alert_reach "),s.qZA())}function d(I,G){1&I&&(s.TgZ(0,"div",4),s._uU(1,"appbuilder.reach_signage_alert "),s.qZA())}function x(I,G){if(1&I&&(s.TgZ(0,"div",22),s.YNc(1,y,2,0,"div",23),s.YNc(2,d,2,0,"div",23),s.TgZ(3,"div",24),s._uU(4," support.contact_us_for_assistance "),s.qZA()()),2&I){const L=s.oxw();s.xp6(1),s.Q6J("ngIf",L.isReachTenant),s.xp6(1),s.Q6J("ngIf",!L.isReachTenant)}}let v=(()=>{class I{constructor(L,F,K,_){this.activeModal=L,this.apiChannel=F,this.membershipService=K,this.tenantContext=_}ngOnInit(){const L=new e;
1L.orgId=this.membershipService.orgContext.id,this.apiChannel.executeQuery(L).subscribe(F=>{this.settingsModel=F}),this.isReachTenant=this.tenantContext.tenantKey.indexOf("reach")>-1}updateSettings(){const L=new a;L.orgId=this.membershipService.orgContext.id,L.model=this.settingsModel,this.apiChannel.executeCommand(L).subscribe(()=>this.activeModal.close())}static#e=this.\u0275fac=function(F){return new(F||I)(s.Y36(O.Kz),s.Y36(B.J),s.Y36(A.v),s.Y36(D.G))};static#t=this.\u0275cmp=s.Xpm({type:I,selectors:[["app-signage-sync-settings"]],decls:20,vars:2,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],[1,"ion-android-sync","mr-1"],["translate",""],["aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"row"],["class","col-12 col-md-6 col-lg-3",4,"ngIf"],[1,"col-12","col-md-6","col-lg-9"],["class","alert alert-info animated zoomIn duration-300 text-center",4,"ngIf"],[1,"modal-footer"],["translate","",1,"btn","btn-primary","pull-right",3,"click"],[1,"clearfix"],[1,"col-12","col-md-6","col-lg-3"],["name","reachIntegrationEnabled",3,"ngModel","label","ngModelChange"],["class","animated zoomIn duration-300",4,"ngIf"],[1,"animated","zoomIn","duration-300"],["name","reachFacilityId",3,"ngModel","label","ngModelChange"],["name","reachScreenId",3,"ngModel","label","ngModelChange"],["name","reachDuration",3,"ngModel","label","ngModelChange"],[1,"alert","alert-info","animated","zoomIn","duration-300","text-center"],["translate","",4,"ngIf"],[1,"font-weight-700","mt-1"]],template:function(F,K){1&F&&(s.TgZ(0,"div",0)(1,"div",1)(2,"h5",2),s._UZ(3,"i",3),s.TgZ(4,"span",4),s._uU(5,"appbuilder.signage_sync"),s.qZA()(),s.TgZ(6,"button",5),s.NdJ("click",function(){return K.activeModal.close()}),s.TgZ(7,"span",6),s._uU(8,"\xd7"),s.qZA()()(),s.TgZ(9,"div",7)(10,"div",8),s.YNc(11,p,3,3,"div",9),s.TgZ(12,"div",10),s.YNc(13,x,5,2,"div",11),s.qZA()(),s.TgZ(14,"div",12)(15,"button",13),s.NdJ("
1click",function(){return K.activeModal.close()}),s._uU(16,"general.cancel "),s.qZA(),s.TgZ(17,"button",13),s.NdJ("click",function(){return K.updateSettings()}),s._uU(18,"general.save "),s.qZA(),s._UZ(19,"div",14),s.qZA()()()),2&F&&(s.xp6(11),s.Q6J("ngIf",K.settingsModel),s.xp6(2),s.Q6J("ngIf",null==K.settingsModel?null:K.settingsModel.reachSyncEnabled))},dependencies:[o.I,h.G,R.c,c.O5,g.JJ,g.On,E.Pi]})}return I})()},52498:(Q,S,n)=>{n.d(S,{q:()=>o});var e=n(13675),a=n(94650),s=n(96193),O=n(93445),B=n(6273),A=n(86028),D=n(89383);let o=(()=>{class h{constructor(c,g,E){this.activeModal=c,this.httpClient=g,this.configurationService=E}closeModal(){this.activeModal.close()}onNewImage(c){e.xZ.isNullOrEmpty(c)||(this.mergedImage=c)}canSave(){return this.mergedImage&&this.onSaveCb&&!this.httpClient.isBusy}save(){this.httpClient.post(this.configurationService.getFileDownloadUrl()+"base64",{imageData:this.mergedImage}).subscribe(c=>{this.onSaveCb(c.result),this.closeModal()})}static#e=this.\u0275fac=function(g){return new(g||h)(a.Y36(s.Kz),a.Y36(O.t),a.Y36(B.e))};static#t=this.\u0275cmp=a.Xpm({type:h,selectors:[["app-add-watermark-modal"]],decls:16,vars:3,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],[1,"ion-waterdrop"],["translate","",1,"ml-1"],["aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[3,"baseSrc","images","onNewBase64Image"],[1,"modal-footer","justify-content-end"],["type","button","translate","",1,"btn","btn-success","mr-1",3,"disabled","click"],["type","button","translate","",1,"btn","btn-primary",3,"click"]],template:function(g,E){1&g&&(a.TgZ(0,"div",0)(1,"div",1)(2,"h5",2),a._UZ(3,"i",3),a.TgZ(4,"span",4),a._uU(5,"slideshowbuilder.add_watermark"),a.qZA()(),a.TgZ(6,"button",5),a.NdJ("click",function(){return E.closeModal()}),a.TgZ(7,"span",6),a._uU(8,"\xd7"),a.qZA()()(),a.TgZ(9,"div",7)(10,"sia-image-merger",8),a.NdJ("onNewBase64Image",function(p){return E.onNewImage(p)}),a.qZA()(),a.TgZ(11,"div",9)(12,"button",10),a.NdJ("click",function(){return E.save()}),a._uU(13," general.save "),a.qZA(),a.TgZ(14,"button",11),a.NdJ("click",function(){return E.closeModal()}),a._uU(15," general.close "),a.qZA()()()),2&g&&(a.xp6(10),a.Q6J("baseSrc",E.baseImageSource)("images",E.watermarks),a.xp6(2),a.Q6J("disabled",!E.canSave()))},dependencies:[A.g,D.Pi]})}return h})()},29402:(Q,S,n)=>{n.d(S,{A:()=>D});var e=n(94650),a=n(36895);function s(o,h){1&o&&(e.TgZ(0,"div",3),e._UZ(1,"i",4),e.qZA())}function O(o,h){if(1&o&&e._UZ(0,"img",5),2&o){const R=e.oxw();e.Q6J("src",R.slide.fileUrl,e.LSH)}}function B(o,h){1&o&&e._UZ(0,"img",5),2&o&&e.Q6J("src","assets/img/placeholder_generic_16_7.png",e.LSH)}function A(o,h){if(1&o&&e._UZ(0,"img",5),2&o){const R=e.oxw();e.Q6J("src",R.slide.thumbnailData,e.LSH)}}let D=(()=>{class o{constructor(){this.select=new e.vpe}static#e=this.\u0275fac=function(c){return new(c||o)};static#t=this.\u0275cmp=e.Xpm({type:o,selectors:[["sia-slide-thumbnail"]],inputs:{slide:"slide",activeSlide:"activeSlide"},outputs:{select:"select"},decls:5,vars:6,consts:[[1,"slide-thumbnail",3,"click"],["class","slide-thumbnail-overlay",4,"ngIf"],[3,"src",4,"ngIf"],[1,"slide-thumbnail-overlay"],[1,"ion-alert-circled"],[3,"src"]],template:function(c,g){1&c&&(e.TgZ(0,"div",0),e.NdJ("click",function(){return g.select.emit(g.slide)}),e.YNc(1,s,2,0,"div",1),e.YNc(2,O,1,1,"img",2),e.YNc(3,B,1,1,"img",2),e.YNc(4,A,1,1,"img",2),e.qZA()),2&c&&(e.ekj("active",g.slide.itemId===g.activeSlide.itemId),e.xp6(1),e.Q6J("ngIf",!g.slide.valid),e.xp6(1),e.Q6J("ngIf",g.slide.fileId&&!g.slide.thumbnailData),e.xp6(1),e.Q6J("ngIf",!g.slide.fileId&&!g.slide.thumbnailData),e.xp6(1),e.Q6J("ngIf",g.slide.thumbnailData))},dependencies:[a.O5],styles:[".slide-thumbnail[_ngcontent-%COMP%]{position:relative;margin:4px;cursor:move}.slide-thumbnail[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:160px;height:70px;object-fit:cover}.slide-thumbnail[_ngcontent-%COMP%] .slide-thumbnail-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;pointer-events:none;font-size:24px}"]})}return o}
1)()},1658:(Q,S,n)=>{n.d(S,{a:()=>L});var e=n(94650),a=n(74697),s=n(52498),O=n(41786),B=n(3481),A=n(8717),D=n(96193),o=n(8046),h=n(53545),R=n(5990),c=n(58446),g=n(4648),E=n(9763),T=n(88221),p=n(36895),y=n(24006),d=n(89383),x=n(28102);const v=["form"];function I(F,K){if(1&F&&e._UZ(0,"sia-menu-item-function-selector",19),2&F){const _=e.oxw(2);e.Q6J("item",_.slide.menuItem)("availableResources",_.availableResources)("availableRoles",_.availableRoles)("availableTargetLists",_.availableTargetLists)("builderModel",_.builderModel)}}function G(F,K){if(1&F){const _=e.EpF();e.TgZ(0,"div")(1,"sia-image-cropper",3),e.NdJ("ngModelChange",function(f){e.CHM(_);const Z=e.oxw();return e.KtG(Z.slide.fileId=f)})("onCrop",function(f){e.CHM(_);const Z=e.oxw();return e.KtG(Z.onCrop(f))})("onImageUrlChanged",function(f){e.CHM(_);const Z=e.oxw();return e.KtG(Z.onImageUrlChanged(f))})("ngModelChange",function(f){e.CHM(_);const Z=e.oxw();return e.KtG(Z.fileIdChanged(f))}),e.qZA(),e.TgZ(2,"div",4)(3,"sia-textbox",5),e.NdJ("ngModelChange",function(f){e.CHM(_);const Z=e.oxw();return e.KtG(Z.slide.name=f)}),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"sia-textbox",6),e.NdJ("ngModelChange",function(f){e.CHM(_);const Z=e.oxw();return e.KtG(Z.slide.ticker=f)}),e.qZA()(),e.TgZ(6,"div",7)(7,"sia-checkbox",8),e.NdJ("change",function(){e.CHM(_);const f=e.oxw();return e.KtG(f.clickableCheckboxChanged())}),e.qZA()(),e.YNc(8,I,1,5,"sia-menu-item-function-selector",9),e.TgZ(9,"div",10)(10,"sia-datepicker",11),e.NdJ("ngModelChange",function(f){e.CHM(_);const Z=e.oxw();return e.KtG(Z.slide.startDate=f)}),e.qZA(),e.TgZ(11,"sia-datepicker",12),e.NdJ("ngModelChange",function(f){e.CHM(_);const Z=e.oxw();return e.KtG(Z.slide.endDate=f)}),e.qZA()(),e.TgZ(12,"div",10)(13,"sia-number-box",13),e.NdJ("ngModelChange",function(f){e.CHM(_);const Z=e.oxw();return e.KtG(Z.slide.duration=f)}),e.qZA(),e.TgZ(14,"div",14)(15,"sia-checkbox",15),e.NdJ("ngModelChange",function(f){e.CHM(_);const Z=e.oxw();return e.KtG(Z.slide.unpublished=f)}),e.qZA(),e.TgZ(16,"button",16),e.NdJ("click",function(){e.CHM(_);const f=e.oxw();return e.KtG(f.deleteSlide(f.slide.itemId))}),e._UZ(17,"i",17),e.TgZ(18,"span",18),e._uU(19,"general.delete"),e.qZA()()()()()}if(2&F){const _=e.oxw();e.xp6(1),e.Q6J("ngModel",_.slide.fileId)("canvasWidth",640)("canvasHeight",280)("minWidth",1536)("minHeight",672),e.xp6(2),e.Q6J("ngModel",_.slide.name)("helpIcon","ion-eye")("helpTitle","general.note")("helpBody",e.lcZ(4,27,"general.image_alt_tag_warning"))("helpIconOnRightSide",!0)("label","slideshowbuilder.name"),e.xp6(2),e.Q6J("ngModel",_.slide.ticker)("label","slideshowbuilder.ticker"),e.xp6(2),e.Q6J("ngModel",_.slide.menuItem)("label","slideshowbuilder.clickable"),e.xp6(1),e.Q6J("ngIf",_.menuLoaded&&_.slide.menuItem),e.xp6(2),e.Q6J("canDelete",!0)("dateOnly",!0)("ngModel",_.slide.startDate),e.xp6(1),e.Q6J("minimum",_.slide.startDate)("canDelete",!0)("dateOnly",!0)("ngModel",_.slide.endDate),e.xp6(2),e.Q6J("label","slideshowbuilder.show_for")("ngModel",_.slide.duration),e.xp6(2),e.Q6J("ngModel",_.slide.unpublished)("label","slideshowbuilder.unpublished")}}let L=(()=>{class F{set slide(_){this.cropper&&this.cropper.resetCropper(),this._slide&&_&&this._slide.sortRank>_.sortRank?(this.leavingRight=!0,this.leavingLeft=!1):(this.leavingRight=!1,this.leavingLeft=!0),this.leaving=!0,setTimeout(()=>{this._slide=_,this.leaving=!1,this.entering=!0},300)}get slide(){return this._slide}constructor(_,t,f){this.apiChannel=_,this.modalService=t,this.membershipService=f,this.delete=new e.vpe,this.save=new e.vpe}ngAfterViewInit(){this.fetchMenu(),this.statusSub=this.form.statusChanges.subscribe(_=>{this.slide&&(this.slide.valid=this.slide.fileId&&"VALID"===_)})}ngOnDestroy(){this.statusSub&&this.statusSub.unsubscribe()}deleteSlide(_){this.delete.emit(_),this.cropper&&this.cropper.resetCropper()}onCrop(_){this.slide.thumbnailData=_}onImageUrlChanged(_){this.slide.fileUrl=_,_&&(this.slide.thumbnailData=null)}fileIdChanged(_){this.slide.fileId=_,this.slide.valid="VALID"==this.form.status,_&&this.save.emit()}openAddWatermarkModal(){const _=this.modalService.open(s.q,{size:"sm",windowClass:"animated fadeInDown duration-300"});_.componentInstance.watermarks=this.watermarks,_.componentInstance.baseImageSource=this.slide.fileUrl,_.componentInstance.onSaveCb=t=>{this.slide.fileId=t}}fetchMenu(){const _=new O.s;
1_.organizationId=this.membershipService.orgContext.id,this.apiChannel.executeQuery(_).subscribe(t=>{this.builderModel=t,this.updateSlideMenuItemRestrictions(),this.availableRoles=t.roles,this.availableResources=t.resources,this.availableTargetLists=t.targetLists,this.menuLoaded=!0})}clickableCheckboxChanged(){this.slide.menuItem=this.slide.menuItem?null:new B.s,this.updateSlideMenuItemRestrictions()}updateSlideMenuItemRestrictions(){if(!this.slide||!this.slide.menuItem||!this.builderModel)return;const _=this.builderModel.menuSections.find(t=>t.menuItems&&t.menuItems.length>0);this.slide.menuItem.enableRestrictions=!!_&&_.menuItems[0].enableRestrictions}static#e=this.\u0275fac=function(t){return new(t||F)(e.Y36(A.J),e.Y36(D.FF),e.Y36(o.v))};static#t=this.\u0275cmp=e.Xpm({type:F,selectors:[["sia-slide"]],viewQuery:function(t,f){if(1&t&&(e.Gf(a.h,5),e.Gf(v,5)),2&t){let Z;e.iGM(Z=e.CRH())&&(f.cropper=Z.first),e.iGM(Z=e.CRH())&&(f.form=Z.first)}},inputs:{slide:"slide",watermarks:"watermarks"},outputs:{delete:"delete",save:"save"},decls:4,vars:9,consts:[["sia-card","",1,"animated","duration-300"],["form","ngForm"],[4,"ngIf"],["name","cropper",3,"ngModel","canvasWidth","canvasHeight","minWidth","minHeight","ngModelChange","onCrop","onImageUrlChanged"],[1,"row","mt-3"],["name","name","required","",1,"col-12","col-md-6",3,"ngModel","helpIcon","helpTitle","helpBody","helpIconOnRightSide","label","ngModelChange"],["name","ticker",1,"col-12","col-md-6",3,"ngModel","label","ngModelChange"],[1,"row","mt-1","col-12"],["name","functionEnabled",3,"ngModel","label","change"],[3,"item","availableResources","availableRoles","availableTargetLists","builderModel",4,"ngIf"],[1,"row","mt-1"],["name","startDate","label","slideshowbuilder.visible_from",1,"col-12","col-md-6",3,"canDelete","dateOnly","ngModel","ngModelChange"],["name","endDate","label","slideshowbuilder.visible_until",1,"col-12","col-md-6",3,"minimum","canDelete","dateOnly","ngModel","ngModelChange"],["name","duration","minimum","0","required","",1,"col-12","col-sm-6","col-md-4",3,"label","ngModel","ngModelChange"],[1,"col-12","col-sm-6","col-md-8","d-flex","justify-content-end","align-items-end"],["name","unpublished",1,"mr-3",3,"ngModel","label","ngModelChange"],[1,"btn","btn-danger","mt-3","mt-sm-0",3,"click"],[1,"ion-android-delete","d-md-none"],["translate","",1,"d-none","d-md-block"],[3,"item","availableResources","availableRoles","availableTargetLists","builderModel"]],template:function(t,f){1&t&&(e.TgZ(0,"div",0)(1,"form",null,1),e.YNc(3,G,20,29,"div",2),e.qZA()()),2&t&&(e.ekj("fadeInRight",f.entering&&f.leavingLeft)("fadeInLeft",f.entering&&f.leavingRight)("fadeOutRight",f.leaving&&f.leavingRight)("fadeOutLeft",f.leaving&&f.leavingLeft),e.xp6(3),e.Q6J("ngIf",f.slide))},dependencies:[h.N,R.x,c.I,g.k,a.h,E.G,T.c,p.O5,y._Y,y.JJ,y.JL,y.Q7,y.On,y.F,d.Pi,x.G,d.X$],styles:["[_nghost-%COMP%] .form-group{margin-bottom:0}[_nghost-%COMP%] .card{max-width:680px}"]})}return F})()},33410:(Q,S,n)=>{n.d(S,{H:()=>he});var e=n(10547),a=n(62701);class s{constructor(){this.$className="GetCreateWatermarkModel"}}class O{constructor(){this.$className="GetEditWatermarkModel"}}class B{constructor(){this.$className="CreateWatermark"}}class A{constructor(){this.$className="EditWatermark"}}class D{constructor(){this.$className="DeleteWatermark"}}var o=n(94650);let h=(()=>{class m extends e.O{onEnteredEditMode(){this.layoutService.activePageIconClass="ion-edit",this.layoutService.activePageTitle="watermark.edit_watermark"}onEnteredCreateMode(){this.layoutService.activePageIconClass="ion-plus-round",this.layoutService.activePageTitle="watermark.create_watermark"}onEnteredIndex(){this.layoutService.activePageIconClass="ion-waterdrop",this.layoutService.activePageTitle="watermark.watermark_title"}singleDeleteMessage(){return"watermark.are_you_sure_you_want_to_delete_this_watermark"}multiDeleteMessage(){return"watermark.are_you_sure_you_want_to_delete_selected_watermarks"}getIndexModelImpl(){const i=new a.b;return i.orgId=this.membershipService.orgContext.id,this.apiChannel.executeQuery(i)}getCreateModel(){const i=new s;
1return i.orgId=this.membershipService.orgContext.id,this.apiChannel.executeQuery(i)}getEditModel(i){const l=new O;return l.id=i,this.apiChannel.executeQuery(l)}executeCreateImpl(){const i=new B;return i.model=this.currentModel,i.orgId=this.membershipService.orgContext.id,this.apiChannel.executeCommand(i,"watermark.watermark_created_successfully")}executeEditImpl(){const i=new A;return i.model=this.currentModel,i.orgId=this.membershipService.orgContext.id,this.apiChannel.executeCommand(i,"watermark.watermark_edited_successfully")}executeDeleteMultipleImpl(i){const l=new D;return l.ids=i,l.orgId=this.membershipService.orgContext.id,this.apiChannel.executeCommand(l,"watermark.watermarks_deleted_successfully")}executeDeleteImpl(i){const l=new D;return l.ids=[i],l.orgId=this.membershipService.orgContext.id,this.apiChannel.executeCommand(l,"watermark.watermark_deleted_successfully")}static#e=this.\u0275fac=function(){let i;return function(r){return(i||(i=o.n5z(m)))(r||m)}}();static#t=this.\u0275prov=o.Yz7({token:m,factory:m.\u0275fac})}return m})();var R=n(66126),c=n(36895),g=n(37533),E=n(93445),T=n(57975);function p(m,k){1&m&&o._UZ(0,"sia-loading",3),2&m&&o.Q6J("delayed",!0)}function y(m,k){if(1&m&&(o.TgZ(0,"div"),o.Hsn(1),o.qZA()),2&m){const i=o.oxw();o.ekj("d-none",!i.crudService.indexMode)}}function d(m,k){if(1&m&&(o.TgZ(0,"div")(1,"div"),o.Hsn(2,1),o.qZA()()),2&m){const i=o.oxw();o.xp6(1),o.Gre("animated ",i.animation," duration-400")}}function x(m,k){if(1&m&&(o.TgZ(0,"div")(1,"div"),o.Hsn(2,2),o.qZA()()),2&m){const i=o.oxw();o.xp6(1),o.Gre("animated ",i.animation," duration-400")}}const v=[[["","index",""]],[["","create",""]],[["","edit",""]]],I=["[index]","[create]","[edit]"];let G=(()=>{class m extends g.Q{constructor(i,l){super(i,l)}static#e=this.\u0275fac=function(l){return new(l||m)(o.Y36(h),o.Y36(E.t))};static#t=this.\u0275cmp=o.Xpm({type:m,selectors:[["app-watermark-crud"]],features:[o.qOj],ngContentSelectors:I,decls:4,vars:4,consts:[["size","3","label","general.loading",3,"delayed",4,"ngIf"],[3,"d-none",4,"ngIf"],[4,"ngIf"],["size","3","label","general.loading",3,"delayed"]],template:function(l,r){1&l&&(o.F$t(v),o.YNc(0,p,1,1,"sia-loading",0),o.YNc(1,y,2,2,"div",1),o.YNc(2,d,3,3,"div",2),o.YNc(3,x,3,3,"div",2)),2&l&&(o.Q6J("ngIf",!r.crudService.initialized&&!r.crudService.editMode&&!r.crudService.createMode),o.xp6(1),o.Q6J("ngIf",r.crudService.initialized),o.xp6(1),o.Q6J("ngIf",r.crudService.createMode),o.xp6(1),o.Q6J("ngIf",r.crudService.editMode))},dependencies:[T.N,c.O5],styles:[".carousel[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{min-height:350px;height:100%;width:100%}[_nghost-%COMP%] .btn-crud-action{min-width:100px;margin-right:1rem;margin-bottom:.5rem}"]})}return m})();var L=n(82542),F=n(8717);let K=(()=>{class m extends L.V{constructor(i,l,r){super(i),this.watermarkService=i,this.apiChannel=l,this.layoutService=r}static#e=this.\u0275fac=function(l){return new(l||m)(o.Y36(h),o.Y36(F.J),o.Y36(R.P))};static#t=this.\u0275dir=o.lG2({type:m,features:[o.qOj]})}return m})();var _=n(5990),t=n(839),f=n(88221),Z=n(24006),b=n(88870);function P(m,k){if(1&m){const i=o.EpF();o.TgZ(0,"div",3)(1,"div",4)(2,"sia-image-or-icon-chooser",5),o.NdJ("ngModelChange",function(r){o.CHM(i);const C=o.oxw();return o.KtG(C.model.imageData=r)}),o.qZA(),o.TgZ(3,"sia-textbox",6),o.NdJ("ngModelChange",function(r){o.CHM(i);const C=o.oxw();return o.KtG(C.model.name=r)}),o.qZA()()()}if(2&m){const i=o.oxw();o.xp6(2),o.Q6J("ngModel",i.model.imageData)("label","general.image"),o.xp6(1),o.Q6J("ngModel",i.model.name)("label","general.name")("required",!0)}}function N(m,k){if(1&m&&(o.TgZ(0,"div",7),o._UZ(1,"simple-crud-default-create-footer",8),o.qZA()),2&m){const i=o.oxw(),l=o.MAs(1);o.xp6(1),o.Q6J("crudService",i.crudService)("isValid",l.valid)}}let H=(()=>{class m extends K{static#e=this.\u0275fac=function(){let i;return function(r){return(i||(i=o.n5z(m)))(r||m)}}();static#t=this.\u0275cmp=o.Xpm({type:m,selectors:[["app-watermark-create"]],features:[o.qOj],decls:5,vars:2,consts:[["form","ngForm"],["class","row",4,"ngIf"],["class","animated fadeIn delay-500",4,"ngIf"],[1,"row"],["sia-card","",1,"col-12","col-lg-6","col-xlg-4"],["name","imageUpload",3,"ngModel","label","ngModelChange"],["name","name",3,"ngModel","label","required","ngModelChange"],[1,"animated","fadeIn","delay-500"],[3,"crudService","isValid"]],template:function(l,r){1&l&&(o.TgZ(0,"form",null,0),o.YNc(2,P,4,5,"div",1),o._UZ(3,"hr"),o.YNc(4,N,2,2,"div",2),o.qZA()),2&l&&(o.xp6(2),o.Q6J("ngIf",r.model),o.xp6(2),o.Q6J("ngIf",r.model))},dependencies:[_.x,t.F,f.c,c.O5,Z._Y,Z.JJ,Z.JL,Z.Q7,Z.On,Z.F,b.x]})}return m})();var q=n(67666);function V(m,k){if(1&m){const i=o.EpF();o.TgZ(0,"div",3)(1,"div",4)(2,"sia-image-or-icon-chooser",5),o.NdJ("ngModelChange",function(r){o.CHM(i);const C=o.oxw();return o.KtG(C.model.imageData=r)}),o.qZA(),o.TgZ(3,"sia-textbox",6),o.NdJ("ngModelChange",function(r){o.CHM(i);const C=o.oxw();return o.KtG(C.model.name=r)}),o.qZA()()()}if(2&m){const i=o.oxw();o.xp6(2),o.Q6J("ngModel",i.model.imageData)("label","general.image"),o.xp6(1),o.Q6J("ngModel",i.model.name)("label","general.name")("required",!0)}}function U(m,k){if(1&m&&(o.TgZ(0,"div",7),o._UZ(1,"simple-crud-default-edit-footer",8),o.qZA()),2&m){const i=o.oxw(),l=o.MAs(1);o.xp6(1),o.Q6J("crudService",i.crudService)("isValid",l.valid)}}let Y=(()=>{class m extends K{static#e=this.\u0275fac=function(){let i;return function(r){return(i||(i=o.n5z(m)))(r||m)}}();static#t=this.\u0275cmp=o.Xpm({type:m,selectors:[["app-watermark-edit"]],features:[o.qOj],decls:5,vars:2,consts:[["form","ngForm"],["class","row",4,"ngIf"],["class","animated fadeIn delay-500",4,"ngIf"],[1,"row"],["sia-card","",1,"col-12","col-lg-6","col-xlg-4"],["name","imageUpload",3,"ngModel","label","ngModelChange"],["name","name",3,"ngModel","label","required","ngModelChange"],[1,"animated","fadeIn","delay-500"],[3,"crudService","isValid"]],template:function(l,r){1&l&&(o.TgZ(0,"form",null,0),o.YNc(2,V,4,5,"div",1),o._UZ(3,"hr"),o.YNc(4,U,2,2,"div",2),o.qZA()),2&l&&(o.xp6(2),o.Q6J("ngIf",r.model),o.xp6(2),o.Q6J("ngIf",r.model))},dependencies:[_.x,t.F,f.c,c.O5,Z._Y,Z.JJ,Z.JL,Z.Q7,Z.On,Z.F,q.J]})}return m})();var u=n(17489),w=n(13675),M=n(91313);class J extends M.n{filter(k,i){return u.filter(k,l=>w.xZ.contains(l.name,i))}}var z=n(86638),$=n(33289),ee=n(51855),se=n(92221),le=n(92640),re=n(58446),oe=n(96193),ce=n(24271),ie=n(89383);const me=["app-watermark-list-item",""];let de=(()=>{class m{static#e=this.\u0275fac=function(l){return new(l||m)};static#t=this.\u0275cmp=o.Xpm({type:m,selectors:[["","app-watermark-list-item",""]],inputs:{item:"item",crudService:"crudService",table:"table"},attrs:me,decls:14,vars:11,consts:[[1,"check-column"],[3,"ngModel","ngModelChange"],["default","assets/img/placeholder_generic.jpg",1,"list-thumbnail-image",3,"src"],[1,"text-right"],[1,"btn","btn-sm","btn-primary",3,"ngbTooltip","click"],[1,"ion-edit"],[1,"btn","btn-sm","btn-danger",3,"ngbTooltip","click"],[1,"ion-trash-a"]],template:function(l,r){1&l&&(o.TgZ(0,"td",0)(1,"sia-checkbox",1),o.NdJ("ngModelChange",function(W){return r.item.selected=W})("ngModelChange",function(){return r.table.checkSelected()}),o.qZA()(),o.TgZ(2,"td"),o._UZ(3,"img",2),o.ALo(4,"imageAbsUrl"),o.qZA(),o.TgZ(5,"td"),o._uU(6),o.qZA(),o.TgZ(7,"td",3)(8,"button",4),o.NdJ("click",function(){return r.crudService.enterEditMode(r.item.id)}),o.ALo(9,"translate"),o._UZ(10,"i",5),o.qZA(),o.TgZ(11,"button",6),o.NdJ("click",function(){return r.crudService.delete(r.item.id)}),o.ALo(12,"translate"),o._UZ(13,"i",7),o.qZA()()),2&l&&(o.xp6(1),o.Q6J("ngModel",r.item.selected),o.xp6(2),o.s9C("src",o.lcZ(4,5,null==r.item.imageData?null:r.item.imageData.linkOrFileGuid),o.LSH),o.xp6(3),o.Oqu(r.item.name),o.xp6(2),o.s9C("ngbTooltip",o.lcZ(9,7,"general.edit")),o.xp6(3),o.s9C("ngbTooltip",o.lcZ(12,9,"general.delete")))},dependencies:[w.zt,le.z,re.I,Z.JJ,Z.On,oe._L,ce.e,ie.X$]})}return m})();function ue(m,k){if(1&m&&o._UZ(0,"tr",5),2&m){const i=k.$implicit,l=o.oxw();o.Q6J("item",i)("crudService",l.crudService)}}let _e=(()=>{class m{constructor(i,l){this.crudService=i,this.layoutService=l,this.settings={enableActionColumn:!0,enableSelect:!0,initialSortBy:"name",filter:new J,columns:[new z.A("general.image"),new z.A("general.name","name")]}}ngOnInit(){this.layoutService.addActionBarItem(new $.q(void 0,()=>this.crudService.enterCreateMode()),!0)}static#e=this.\u0275fac=function(l){return new(l||m)(o.Y36(h),o.Y36(R.P))};static#t=this.\u0275cmp=o.Xpm({type:m,selectors:[["app-watermark-index"]],decls:5,vars:4,consts:[[3,"data","settings"],["table",""],["tbody",""],["app-watermark-list-item","",3,"item","crudService",4,"ngFor","ngForOf"],["select-actions","",3,"service"],["app-watermark-list-item","",3,"item","crudService"]],template:function(l,r){if(1&l&&(o.TgZ(0,"sia-table",0,1)(2,"tbody",2),o.YNc(3,ue,1,2,"tr",3),o.qZA(),o._UZ(4,"crud-default-select-actions",4),o.qZA()),2&l){const C=o.MAs(1);o.Q6J("data",r.crudService.currentData)("settings",r.settings),o.xp6(3),o.Q6J("ngForOf",C.page),o.xp6(1),o.Q6J("service",r.crudService)}},dependencies:[ee.C,c.sg,se.V,de]})}return m})();function pe(m,k){1&m&&o._UZ(0,"app-watermark-create",3)}function ge(m,k){1&m&&o._UZ(0,"app-watermark-edit",4)}let ae=(()=>{class m{constructor(i,l){this.layoutService=i,this.crudService=l}ngOnInit(){this.layoutService.activePageIconClass="ion-wrench",this.layoutService.activePageTitle="watermark.watermark_title"}static#e=this.\u0275fac=function(l){return new(l||m)(o.Y36(R.P),o.Y36(h))};static#t=this.\u0275cmp=o.Xpm({type:m,selectors:[["app-watermark"]],features:[o._Bn([h])],decls:4,vars:2,consts:[["index",""],["create","",4,"ngIf"],["edit","",4,"ngIf"],["create",""],["edit",""]],template:function(l,r){1&l&&(o.TgZ(0,"app-watermark-crud"),o._UZ(1,"app-watermark-index",0),o.YNc(2,pe,1,0,"app-watermark-create",1),o.YNc(3,ge,1,0,"app-watermark-edit",2),o.qZA()),2&l&&(o.xp6(2),o.Q6J("ngIf",r.crudService.createMode),o.xp6(1),o.Q6J("ngIf",r.crudService.editMode))},dependencies:[c.O5,G,H,Y,_e]})}return m})(),he=(()=>{class m{constructor(i){this.activeModal=i}closeModal(){this.onCloseCb&&this.watermarkComponent&&this.onCloseCb(this.watermarkComponent.crudService.listData),this.activeModal.close()}static#e=this.\u0275fac=function(l){return new(l||m)(o.Y36(oe.Kz))};static#t=this.\u0275cmp=o.Xpm({type:m,selectors:[["app-watermark-modal"]],viewQuery:function(l,r){if(1&l&&o.Gf(ae,7),2&l){let C;
1o.iGM(C=o.CRH())&&(r.watermarkComponent=C.first)}},decls:14,vars:0,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],[1,"ion-waterdrop"],["translate","",1,"ml-1"],["aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"modal-footer"],["type","button","translate","",1,"btn","btn-primary","pull-right",3,"click"]],template:function(l,r){1&l&&(o.TgZ(0,"div",0)(1,"div",1)(2,"h5",2),o._UZ(3,"i",3),o.TgZ(4,"span",4),o._uU(5,"watermark.watermark_title"),o.qZA()(),o.TgZ(6,"button",5),o.NdJ("click",function(){return r.closeModal()}),o.TgZ(7,"span",6),o._uU(8,"\xd7"),o.qZA()()(),o.TgZ(9,"div",7),o._UZ(10,"app-watermark"),o.qZA(),o.TgZ(11,"div",8)(12,"button",9),o.NdJ("click",function(){return r.closeModal()}),o._uU(13," general.close "),o.qZA()()())},dependencies:[ie.Pi,ae]})}return m})()},47092:(Q,S,n)=>{n.d(S,{S:()=>t});var e=n(15861),a=n(1658),s=n(66986),O=n(84981),B=n(33410),A=n(30170),D=n(86328);class o{constructor(){this.$className="UpdateNewsfeedSlides"}}class h{constructor(){this.$className="GetNewsfeedSlidesOfOrg"}}var R=n(62701),c=n(94650),g=n(8717),E=n(93445),T=n(4661),p=n(8046),y=n(96193),d=n(66126),x=n(5990),v=n(36895),I=n(89383),G=n(35898),L=n(29402);function F(f,Z){if(1&f){const b=c.EpF();c.TgZ(0,"sia-slide-thumbnail",9),c.NdJ("select",function(N){c.CHM(b);const H=c.oxw(2);return c.KtG(H.selectSlide(N))}),c.qZA()}if(2&f){const b=Z.$implicit,P=c.oxw(2);c.Q6J("slide",b)("activeSlide",P.activeSlide)}}function K(f,Z){if(1&f){const b=c.EpF();c.TgZ(0,"sia-slide",10),c.NdJ("save",function(){c.CHM(b);const N=c.oxw(2);return c.KtG(N.save())})("delete",function(N){c.CHM(b);const H=c.oxw(2);return c.KtG(H.deleteSlide(N))}),c.qZA()}if(2&f){const b=c.oxw(2);c.Q6J("slide",b.activeSlide)("watermarks",b.watermarks)}}function _(f,Z){if(1&f){const b=c.EpF();c.TgZ(0,"div",1)(1,"div",2)(2,"div",1)(3,"div",3)(4,"div",4),c.NdJ("dragend",function(){c.CHM(b);const N=c.oxw();return c.KtG(N.updateSortRank())}),c.YNc(5,F,1,2,"sia-slide-thumbnail",5),c.qZA()(),c.TgZ(6,"div",6)(7,"button",7),c.NdJ("click",function(){c.CHM(b);const N=c.oxw();return c.KtG(N.addSlide())}),c._uU(8," slideshowbuilder.add "),c.qZA(),c.TgZ(9,"button",7),c.NdJ("click",function(){c.CHM(b);const N=c.oxw();return c.KtG(N.save())}),c._uU(10," general.save "),c.qZA()()()(),c.YNc(11,K,1,2,"sia-slide",8),c.qZA()}if(2&f){const b=c.oxw();c.xp6(4),c.Q6J("sortablejs",b.slides),c.xp6(1),c.Q6J("ngForOf",b.slides),c.xp6(2),c.Q6J("disabled",!b.hasEverySlideFileUrl()),c.xp6(2),c.Q6J("disabled",!b.isEverySlideValid||b.http.isBusy),c.xp6(2),c.Q6J("ngIf",b.activeSlide)}}let t=(()=>{class f{constructor(b,P,N,H,q,V){this.apiChannel=b,this.http=P,this.confirmService=N,this.membershipService=H,this.modalService=q,this.layoutService=V,this.watermarks=[]}ngOnInit(){this.getSlideshows(),this.hasSignageSettings=this.membershipService.hasRight(D.J.SignageSettings),this.hasSignageSettings&&(this.layoutService.actionBarItems||=[],this.layoutService.addActionBarItem(new O.Pg("appbuilder.signage_sync","ion-android-sync",this.openSignageSettings.bind(this),[D.J.SignageSettings],null,!1,!1)))}ngOnDestroy(){this.hasSignageSettings&&this.layoutService&&this.layoutService.actionBarItems&&this.layoutService.actionBarItems.pop()}hasEverySlideFileUrl(){return this.slides.every(b=>null!==b.fileUrl)}get isEverySlideValid(){return this.slides.every(b=>b.valid)}save(){if(!this.isEverySlideValid)return;const b=new o;b.orgId=this.membershipService.orgContext.id,b.items=this.slides,this.apiChannel.executeCommand(b).subscribe()}addSlide(){const b={sortRank:this.slides.length,itemId:null,linkUrl:null,fileId:null,fileUrl:null,openLinkExternally:!1,ticker:null,name:"",duration:8,valid:!0,thumbnailData:null,endDate:null,startDate:null,unpublished:!1,menuItem:null};this.slides.push(b),this.activeSlide=b}updateSortRank(){this.slides.forEach((b,P)=>b.sortRank=P)}deleteSlide(b){this.slides=this.slides.filter(P=>P.itemId!==b),this.activeSlide.itemId===b&&(this.activeSlide=0!==this.slides.length?this.slides[0]:null),this.updateSortRank()}selectSlide(b){var P=this;return(0,e.Z)(function*(){P.activeSlide.itemId!==b.itemId&&(P.activeSlide.thumbnailData?(yield P.confirmService.confirm("slideshowbuilder.setup_in_progress","slideshowbuilder.setup_in_progress_alert"))&&(delete P.activeSlide.thumbnailData,P.activeSlide=b):P.activeSlide=b)})()}getSlideshows(){const b=new h;
1b.orgId=this.membershipService.orgContext.id,this.apiChannel.executeQuery(b).subscribe(P=>{this.slides=P||[],this.slides.forEach(N=>N.valid=!0),this.activeSlide=P&&P.length>0?P[0]:null})}getWatermarks(){const b=new R.b;b.orgId=this.membershipService.orgContext.id,this.apiChannel.executeQuery(b).subscribe(P=>{this.watermarks=this.convertWatermarkListToSimpleListModel(P)})}openSignageSettings(){this.currentModal=this.modalService.open(s.H,{size:"sm",windowClass:"animated fadeInDown duration-300"})}openWatermarksModal(){this.currentModal=this.modalService.open(B.H,{size:"lg",windowClass:"animated fadeInDown duration-300"}),this.currentModal.componentInstance.onCloseCb=b=>{this.watermarks=this.convertWatermarkListToSimpleListModel(b)}}convertWatermarkListToSimpleListModel(b){return Array.isArray(b)?b.map(P=>{const N=new A.J;return N.selected=!1,N.imageLinkOrFileGuid=P.imageData.linkOrFileGuid,N.name=P.name,N.id=P.id,N}):[]}static#e=this.\u0275fac=function(P){return new(P||f)(c.Y36(g.J),c.Y36(E.t),c.Y36(T.z),c.Y36(p.v),c.Y36(y.FF),c.Y36(d.P))};static#t=this.\u0275cmp=c.Xpm({type:f,selectors:[["app-slideshow-builder"]],viewQuery:function(P,N){if(1&P&&c.Gf(a.a,7),2&P){let H;c.iGM(H=c.CRH())&&(N.slideComponent=H.first)}},decls:1,vars:1,consts:[["class","row",4,"ngIf"],[1,"row"],["sia-card","",1,"col-12"],[1,"col-9","col-md-10","col-lg-11","d-flex"],[1,"slide-thumbnail-container",3,"sortablejs","dragend"],[3,"slide","activeSlide","select",4,"ngFor","ngForOf"],[1,"col-3","col-md-2","col-lg-1","d-flex","flex-column","justify-content-center"],["translate","",1,"btn","btn-sm","btn-success","btn-block",3,"disabled","click"],["class","col-12 d-flex justify-content-center animated fadeInRight duration-300",3,"slide","watermarks","save","delete",4,"ngIf"],[3,"slide","activeSlide","select"],[1,"col-12","d-flex","justify-content-center","animated","fadeInRight","duration-300",3,"slide","watermarks","save","delete"]],template:function(P,N){1&P&&c.YNc(0,_,12,5,"div",0),2&P&&c.Q6J("ngIf",N.slides)},dependencies:[x.x,v.sg,v.O5,I.Pi,G.Q,a.a,L.A],styles:[".slide-thumbnail-container[_ngcontent-%COMP%]{flex-grow:1;display:flex;flex-direction:row;overflow-x:auto;overflow-y:hidden;margin-right:10px;min-height:78px}"]})}return f})()},15761:(Q,S,n)=>{n.d(S,{c:()=>p});var e=n(52798),a=n(36895),s=n(78123),O=n(94650);let B=(()=>{class y{static#e=this.\u0275fac=function(v){return new(v||y)};static#t=this.\u0275mod=O.oAB({type:y});static#n=this.\u0275inj=O.cJS({imports:[e.n,a.ez,s.Z]})}return y})();n(47092),n(66986),n(33410),n(29402),n(1658),n(52498);var g=n(35898),E=n(91775);let p=(()=>{class y{static#e=this.\u0275fac=function(v){return new(v||y)};static#t=this.\u0275mod=O.oAB({type:y});static#n=this.\u0275inj=O.cJS({imports:[e.n,g.b.forRoot({}),B,E.g]})}return y})()},82065:(Q,S,n)=>{n.d(S,{m:()=>e});class e{static needsWarning(s,O){for(let B of s)if(O.indexOf(B)>-1)return!0;return!1}}},3481:(Q,S,n)=>{n.d(S,{s:()=>e});class e{constructor(){this.$className="MenuItem"}}},77143:(Q,S,n)=>{n.d(S,{X:()=>e});class e{constructor(){this.$className="GetOrganizationsFromDistricts"}}},17663:(Q,S,n)=>{n.d(S,{J:()=>e});var e=(()=>{return(a=e||(e={}))[a.Feature=0]="Feature",a[a.Content=1]="Content",a[a.ContentGroup=2]="ContentGroup",a[a.Link=3]="Link",a[a.Call=4]="Call",a[a.Email=5]="Email",a[a.Menu=6]="Menu",a[a.MicroSite=7]="MicroSite",e;var a})()},62701:(Q,S,n)=>{n.d(S,{b:()=>e});class e{constructor(){this.$className="GetWatermarkIndex"}}}}]);
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.