1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[6794],{32752:(M,p,l)=>{l.d(p,{a:()=>h});var t=l(94650),e=l(59928);let h=(()=>{class c{constructor(){this.placeholder="Search",this.disabled=!1,this.search=new t.vpe}ngOnInit(){}onSearch(_){this.search.emit(_.target.value)}}return c.\u0275fac=function(_){return new(_||c)},c.\u0275cmp=t.Xpm({type:c,selectors:[["app-rokit-searchbar"]],inputs:{placeholder:"placeholder",disabled:"disabled"},outputs:{search:"search"},decls:1,vars:5,consts:[["debounce","700",1,"ion-text-start","ion-no-padding",3,"placeholder","searchIcon","clearIcon","showClearButton","disabled","ionChange"]],template:function(_,m){1&_&&(t.TgZ(0,"ion-searchbar",0),t.NdJ("ionChange",function(u){return m.onSearch(u)}),t.qZA()),2&_&&t.Q6J("placeholder",m.placeholder)("searchIcon","search")("clearIcon","close")("showClearButton","always")("disabled",m.disabled)},dependencies:[e.VI,e.j9],styles:["ion-searchbar[_ngcontent-%COMP%]{--background: var(--ion-color-white);--border-radius: 25px;--box-sha
1dow: none;--color: var(--ion-color-dark);--placeholder-color: var(--ion-color-dark);padding:0;margin:0;height:30px;display:block} .searchbar-input{border:1px solid var(--ion-color-medium)!important;color:var(--ion-color-dark)!important;font-size:10px!important;min-height:30px!important;height:30px!important;padding-right:35px!important;padding-left:10px!important;text-align:left!important} .searchbar-search-icon{color:var(--ion-color-dark)!important;height:20px!important;width:14px!important;right:10px!important;left:auto!important;left:initial!important;top:50%!important;transform:translateY(-50%)!important;position:absolute!important} .searchbar-clear-button{display:none!important} .searchbar-has-value .searchbar-clear-button{display:block!important} .searchbar-has-value .searchbar-search-icon{display:none!important} .searchbar-input::-moz-placeholder{text-align:left!important;padding-left:0!important} .searchbar-input::placeholder{text-align:left!important;padding-left:0!important}"]}),c})()},16794:(M,p,l)=>{l.d(p,{r:()=>E});var t=l(95698),e=l(94650),h=l(255),c=l(31443),r=l(59928),_=l(9116),m=l(40704),g=l(36895),u=l(34184),Z=l(53524),f=l(32752);function x(o,d){if(1&o){const i=e.EpF();e.TgZ(0,"app-media-item",16),e.NdJ("setMediaAsMain",function(a){e.CHM(i);const s=e.oxw(2);return e.KtG(s.setMediaAsMain(a))})("removeMedia",function(a){e.CHM(i);const s=e.oxw(2);return e.KtG(s.removeMediaFromService(a))}),e.qZA()}2&o&&e.Q6J("item",d.$implicit)}function T(o,d){if(1&o&&(e.TgZ(0,"ion-row")(1,"ion-col",12)(2,"ion-label",13),e._uU(3,"Current Media Selected"),e.qZA(),e.TgZ(4,"ion-card")(5,"ion-card-content")(6,"ion-list",14),e.YNc(7,x,1,1,"app-media-item",15),e.qZA()()()()()),2&o){const i=e.oxw();e.xp6(7),e.Q6J("ngForOf",i.currentMedia)}}function C(o,d){if(1&o){const i=e.EpF();e.TgZ(0,"app-media-item",20),e.NdJ("addMedia",function(a){e.CHM(i);const s=e.oxw(3);return e.KtG(s.addMediaFromService(a))}),e.qZA()}2&o&&e.Q6J("item",d.$implicit)}function A(o,d){if(1&o&&(e.TgZ(0,"ion-card")(1,"ion-card-content")(2,"ion-list",14),e.YNc(3,C,1,1,"app-media-item",19),e.qZA()()()),2&o){const i=e.oxw(2);e.xp6(3),e.Q6J("ngForOf",i.media)}}function v(o,d){if(1&o){const i=e.EpF();e.TgZ(0,"ion-row")(1,"ion-col",12)(2,"div",17)(3,"ion-label",13),e._uU(4,"All Media Selected"),e.qZA(),e.TgZ(5,"app-rokit-searchbar",18),e.NdJ("search",function(a){e.CHM(i);const s=e.oxw();return e.KtG(s.filterFiles(a))}),e.qZA()(),e.YNc(6,A,4,1,"ion-card",7),e.qZA()()}if(2&o){const i=e.oxw(),n=e.MAs(14);e.xp6(6),e.Q6J("ngIf",(null==i.media?null:i.media.length)>0)("ngIfElse",n)}}function b(o,d){1&o&&(e.TgZ(0,"ion-col"),e._UZ(1,"app-skeleton"),e.qZA())}function w(o,d){1&o&&(e.TgZ(0,"ion-col")(1,"ion-text",24)(2,"p"),e._uU(3,"No media found"),e.qZA()()())}function k(o,d){if(1&o&&(e.TgZ(0,"ion-grid",21)(1,"ion-row",22),e.YNc(2,b,2,0,"ion-col",23),e.YNc(3,w,4,0,"ion-col",23),e.qZA()()),2&o){const i=e.oxw();e.xp6(2),e.Q6J("ngIf",!i.showNoMediaAllMessage),e.xp6(1),e.Q6J("ngIf",i.showNoMediaAllMessage)}}function O(o,d){1&o&&(e.TgZ(0,"ion-col")(1,"ion-text",24)(2,"p"),e._uU(3,"No media on this service so far"),e.qZA()()())}function S(o,d){if(1&o&&(e.TgZ(0,"ion-grid",21)(1,"ion-row",22),e.YNc(2,O,4,0,"ion-col",23),e.qZA()()),2&o){const i=e.oxw();e.xp6(2),e.Q6J("ngIf",i.showNoMediaServiceMessage)}}let E=(()=>{class o{constructor(i,n,a,s,U){this.mediaService=i,this.toastService=n,this.modalController=a,this.router=s,this.alertService=U,this.searchValue=""}ngOnInit(){this.selectedDestination="",this.selectedCity="",this.selectedType="",this.originalCurrentMedia=JSON.parse(JSON.stringify(this.currentMedia)),this.showNoMediaServiceMessage=0===this.currentMedia.length,this.loadMedia()}ngOnDestroy(){}loadMedia(){this.mediaService.getMedia(this.organizationId).pipe((0,t.q)(1)).subscribe(i=>{this.loadedMedia=i.filter(n=>n.active),this.showNoMediaAllMessage=0===this.loadedMedia.length,this.initializeFiles()},i=>{this.toastService.presentErrorToast(i.message)})}initializeFiles(){this.media=this.loadedMedia}filterFiles(i){this.showNoMediaAllMessage=!0,this.searchValue=i||this.searchValue,this.initializeFiles(),this.searchValue.length>2&&(this.media=this.media.filter(n=>{if(n.name&&this.searchValue)return!!(n.name.toLowerCase().indexOf(this.searchValue.toLowerCase())>-1||this.filterMediaByTag(n))}))}filterMediaByTag(i){let n=!1;for(let a=0;a<i.tags.length;a++)if(i.tags[a].toLowerCase().indexOf(this.searchValue.toLowerCase())>-1){n=!0;break}return n}dismiss(i){i?this.modalController.dismiss({selectedMedia:this.currentMedia}
1):(this.currentMedia.length=0,this.originalCurrentMedia.forEach(n=>{this.currentMedia.push({...n})}),this.modalController.dismiss())}setMediaAsMain(i){this.currentMedia.forEach((n,a)=>{if(n.name===i.name){this.currentMedia[a].isMainImage=!0;const s=this.currentMedia[a];this.currentMedia.splice(a,1),this.currentMedia.unshift(s)}else this.currentMedia[a].isMainImage=!1})}removeMediaFromService(i){this.currentMedia.forEach((a,s)=>{a.name===i.name&&this.currentMedia.splice(s,1)}),this.showNoMediaServiceMessage=0===this.currentMedia.length,this.toastService.presentToast({header:"Success",message:"The image was successfully removed",color:"success"})}addMediaFromService(i){let n=!0;for(let s=0;s<this.currentMedia.length;s++)if(this.currentMedia[s].name===i.name){this.toastService.presentErrorToast("Cannot add a media with the same name",!0),n=!1;break}n&&this.currentMedia.push(i),this.showNoMediaServiceMessage=0===this.currentMedia.length,this.toastService.presentToast({header:"Success",message:"The image was successfully added",color:"success"})}navigateToAdminMedia(){this.router.navigate([`/administration/${this.user.id}/media-admin/${this.user.organizationId}`]),this.dismiss(!1)}}return o.\u0275fac=function(i){return new(i||o)(e.Y36(h.y),e.Y36(c.k),e.Y36(r.IN),e.Y36(_.F0),e.Y36(m.c))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-select-file-modal"]],hostBindings:function(i,n){1&i&&e.NdJ("unloaded",function(){return n.ngOnDestroy()})},inputs:{organizationId:"organizationId",currentMedia:"currentMedia",user:"user"},decls:21,vars:4,consts:[["translucent","true",1,"modal-ion-header"],["slot","end"],["color","primary",3,"click"],["slot","end","name","close-circle"],[1,"ion-text-center"],[1,"media-modal-content"],[1,"modal-grid"],[4,"ngIf","ngIfElse"],["loadingAll",""],["loadingService",""],[1,"modal-ion-footer"],["color","secondary",3,"click"],["size","12"],["color","dark",1,"header-media-label"],[1,"item-list","media-card-list"],["mode","current",3,"item","setMediaAsMain","removeMedia",4,"ngFor","ngForOf"],["mode","current",3,"item","setMediaAsMain","removeMedia"],[1,"all-media-header"],[1,"media-searchbar",3,"search"],["mode","all",3,"item","addMedia",4,"ngFor","ngForOf"],["mode","all",3,"item","addMedia"],[1,"no-media-background","ion-no-padding"],[1,"ion-justify-content-center","ion-align-items-center"],[4,"ngIf"],["color","dark",1,"ion-text-center"]],template:function(i,n){if(1&i&&(e.TgZ(0,"ion-header",0)(1,"ion-toolbar")(2,"ion-buttons",1)(3,"ion-button",2),e.NdJ("click",function(){return n.dismiss(!1)}),e._uU(4," Close "),e._UZ(5,"ion-icon",3),e.qZA()()(),e.TgZ(6,"ion-toolbar")(7,"ion-title",4),e._uU(8,"Manage Media"),e.qZA()()(),e.TgZ(9,"ion-content",5)(10,"ion-grid",6),e.YNc(11,T,8,1,"ion-row",7),e.YNc(12,v,7,2,"ion-row",7),e.YNc(13,k,4,2,"ng-template",null,8,e.W1O),e.YNc(15,S,3,1,"ng-template",null,9,e.W1O),e.qZA()(),e.TgZ(17,"ion-footer",10)(18,"ion-toolbar",4)(19,"ion-button",11),e.NdJ("click",function(){return n.dismiss(!0)}),e._uU(20," Confirm "),e.qZA()()()),2&i){const a=e.MAs(14),s=e.MAs(16);e.xp6(11),e.Q6J("ngIf",(null==n.currentMedia?null:n.currentMedia.length)>0)("ngIfElse",s),e.xp6(1),e.Q6J("ngIf",(null==n.loadedMedia?null:n.loadedMedia.length)>0)("ngIfElse",a)}},dependencies:[g.sg,g.O5,r.YG,r.Sm,r.PM,r.FN,r.wI,r.W2,r.fr,r.jY,r.Gu,r.gu,r.Q$,r.q_,r.Nd,r.yW,r.sr,r.wd,u.i,Z._,f.a],styles:["ion-img[_ngcontent-%COMP%]{width:250px;height:200px;margin:auto}.no-media-background[_ngcontent-%COMP%]{margin:8px 13px;border-radius:4px;background-color:var(--ion-color-light);height:25vh}.rating-info[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle}.rating-info[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle}.header-media-label[_ngcontent-%COMP%]{font-size:16px;font-weight:bolder;padding-left:8px}.all-media-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding-right:8px}.media-card-list[_ngcontent-%COMP%]{max-height:216px;overflow-y:auto;padding:0}.media-card-list[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.media-modal-content[_ngcontent-%COMP%]{--padding-top: 0px;--padding-end: 30px;--padding-bottom: 0px;--padding-start: 30px}.media-searchbar[_ngcontent-%COMP%]{min-width:270px}"]}),o})()},53524:(M,p,l)=>{l.d(p,{_:()=>h});var t=l(94650),e=l(59928);let h=(()=>{class c{constructor(){}ngOnInit(){}}return c.\u0275fac=function(_){return new(_||c)},c.\u0275cmp=t.Xpm({type:c,selectors:[["app-skeleton"]],decls:81,vars:0,consts:[["detail",""],["animated","",2,"width","30%"],["animated","",2,"width","65%"],["animated","",2,"width","43%"],["animated","",2,"width","12%"],["animated","",2,"width","54%"],["animated","",2,"width","98%"],["animated","",2,"width","11%"],["animated","",2,"width","23%"],["animated","",2,"width","22%"],["animated","",2,"width","77%"],["animated","",2,"width","24%"],["animated","",2,"width","34%"],["animated","",2,"width","35%"],["animated","",2,"width","66%"],["animated","",2,"width","87%"],["animated","",2,"width","45%"],["animated","",2,"width","67%"],["animated","",2,"width","32%"],["animated","",2,"width","78%"]],template:function(_,m){1&_&&(t.TgZ(0,"ion-list")(1,"ion-item",0)(2,"ion-label")(3,"h3"),t._UZ(4,"ion-skeleton-text",1),t.qZA(),t.TgZ(5,"p"),t._UZ(6,"ion-skeleton-text",2),t.qZA(),t.TgZ(7,"p"),t._UZ(8,"ion-skeleton-text",3),t.qZA()()(),t.TgZ(9,"ion-item",0)(10,"ion-label")(11,"h3"),t._UZ(12,"ion-skeleton-text",4),t.qZA(),t.TgZ(13,"p"),t._UZ(14,"ion-skeleton-text",5),t.qZA(),t.TgZ(15,"p"),t._UZ(16,"ion-skeleton-text",6),t.qZA()()(),t.TgZ(17,"ion-item",0)(18,"ion-label")(19,"h3"),t._UZ(20,"ion-skeleton-text",7),t.qZA(),t.TgZ(21,"p"),t._UZ(22,"ion-skeleton-text",5),t.qZA(),t.TgZ(23,"p"),t._UZ(24,"ion-skeleton-text",8),t.qZA()()(),t.TgZ(25,"ion-item",0)(26,"ion-label")(27,"h3"),t._UZ(28,"ion-skeleton-text",9),t.qZA(),t.TgZ(29,"p"),t._UZ(30,"ion-skeleton-text",10),t.qZA(),t.TgZ(31,"p"),t._UZ(32,"ion-skeleton-text",11),t.qZA()()(),t.TgZ(33,"ion-item",0)(34,"ion-label")(35,"h3"),t._UZ(36,"ion-skeleton-text",6),t.qZA(),t.TgZ(37,"p"),t._UZ(38,"ion-skeleton-text",4),t.qZA(),t.TgZ(39,"p"),t._UZ(40,"ion-skeleton-text",12),t.qZA()()(),t.TgZ(41,"ion-item",0)(42,"ion-label")(43,"h3"),t._UZ(44,"ion-skeleton-text",2),t.qZA(),t.TgZ(45,"p"),t._UZ(46,"ion-skeleton-text",8),t.qZA(),t.TgZ(47,"p"),t._UZ(48,"ion-skeleton-text",13),t.qZA()()(),t.TgZ(49,"ion-item",0)(50,"ion-label")(51,"h3"),t._UZ(52,"ion-skeleton-text",6),t.qZA(),t.TgZ(53,"p"),t._UZ(54,"ion-skeleton-text",12),t.qZA(),t.TgZ(55,"p"),t._UZ(56,"ion-skeleton-text",14),t.qZA()()(),t.TgZ(57,"ion-item",0)(58,"ion-label")(59,"h3"),t._UZ(60,"ion-skeleton-text",4),t.qZA(),t.TgZ(61,"p"),t._UZ(62,"ion-skeleton-text",12),t.qZA(),t.TgZ(63,"p"),t._UZ(64,"ion-skeleton-text",15),t.qZA()()(),t.TgZ(65,"ion-item",0)(66,"ion-label")(67,"h3"),t._UZ(68,"ion-skeleton-text",16),t.qZA(),t.TgZ(69,"p"),t._UZ(70,"ion-skeleton-text",17),t.qZA(),t.TgZ(71,"p"),t._UZ(72,"ion-skeleton-text",18),t.qZA()()(),t.TgZ(73,"ion-item",0)(74,"ion-label")(75,"h3"),t._UZ(76,"ion-skeleton-text",4),t.qZA(),t.TgZ(77,"p"),t._UZ(78,"ion-skeleton-text",19),t.qZA(),t.TgZ(79,"p"),t._UZ(80,"ion-skeleton-text",16),t.qZA()()()())},dependencies:[e.Ie,e.Q$,e.q_,e.CK]}),c})()}}]);
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.