@ngageoint/mage.web-app
Version:
The Mage web-app is the UI for interacting with the Mage service in a web browser.
1 lines • 10.2 kB
JavaScript
;(self.webpackChunkapp=self.webpackChunkapp||[]).push([[195],{11716:(b,p,n)=>{n.d(p,{O:()=>s});var t=n(70262),u=n(39646),g=n(94650),f=n(1584);let s=(()=>{class l{constructor(M){this.service=M}resolve(M,v){return this.service.getMyself().pipe((0,t.K)(()=>(0,u.of)(null)))}}return l.\u0275fac=function(M){return new(M||l)(g.LFG(f.K))},l.\u0275prov=g.Yz7({token:l,factory:l.\u0275fac,providedIn:"root"}),l})()},864:(b,p,n)=>{n.d(p,{k:()=>v});var t=n(94650),u=n(80529),g=n(11481),f=n(36895),s=n(97392);function l(c,h){if(1&c&&t._UZ(0,"img",2),2&c){const e=t.oxw();t.Q6J("src",e.data||e.url,t.LSH)("width",e.avatarWidth)("height",e.avatarHeight)}}const _=function(c){return{"font-size":c}};function M(c,h){if(1&c&&(t.TgZ(0,"mat-icon",3),t._uU(1,"account_circle"),t.qZA()),2&c){const e=t.oxw();t.Udp("width",e.avatarWidth+"px")("height",e.avatarHeight+"px"),t.Q6J("ngStyle",t.VKq(5,_,e.avatarHeight+"px"))}}let v=(()=>{class c{constructor(e,i){this.httpClient=e,this.sanitizer=i,this.avatarWidth=40,this.avatarHeight=40,this.url=null}ngOnChanges(e){if(e.file&&this.file){if(window.FileReader){const i=new FileReader;i.onload=(d=>m=>{this.data=m.target.result})(),i.readAsDataURL(e.file.currentValue)}}else e.user&&this.user&&this.fetchAvatar()}fetchAvatar(){this.httpClient.get(`/api/users/${this.user.id}/avatar`,{responseType:"blob"}).subscribe({next:i=>{this.url=this.sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(i))},error:i=>{404===i.status?console.warn("Avatar not found (404). Using fallback."):console.error("Error fetching avatar:",i),this.url="/assets/images/baseline-account_circle-24px.svg"}})}}return c.\u0275fac=function(e){return new(e||c)(t.Y36(u.eN),t.Y36(g.H7))},c.\u0275cmp=t.Xpm({type:c,selectors:[["user-avatar"]],inputs:{user:"user",file:"file",avatarWidth:"avatarWidth",avatarHeight:"avatarHeight"},features:[t.TTD],decls:2,vars:2,consts:[["class","avatar",3,"src","width","height",4,"ngIf"],["class","icon",3,"ngStyle","width","height",4,"ngIf"],[1,"avatar",3,"src","width","height"],[1,"icon",3,"ngStyle"]],template:function(e,i){1&e&&(t.YNc(0,l,1,3,"img",0),t.YNc(1,M,2,7,"mat-icon",1)),2&e&&(t.Q6J("ngIf",i.data||i.url),t.xp6(1),t.Q6J("ngIf",!i.data&&!i.url))},dependencies:[f.O5,f.PC,s.Hw],styles:[".avatar[_ngcontent-%COMP%]{border-radius:50%;overflow:hidden;background:#FFFFFF;vertical-align:middle}.icon[_ngcontent-%COMP%]{vertical-align:middle;color:#0006}"]}),c})()},93390:(b,p,n)=>{n.d(p,{l:()=>f});var t=n(36895),u=n(97392),g=n(94650);let f=(()=>{class s{}return s.\u0275fac=function(_){return new(_||s)},s.\u0275mod=g.oAB({type:s}),s.\u0275inj=g.cJS({imports:[t.ez,u.Ps]}),s})()},73546:(b,p,n)=>{n.d(p,{G2:()=>d,QW:()=>w,a8:()=>A,dk:()=>T,dn:()=>v,hq:()=>e,kc:()=>y,n5:()=>c,rt:()=>i});var t=n(94650),u=n(3238);const g=["*",[["mat-card-footer"]]],f=["*","mat-card-footer"],s=[[["","mat-card-avatar",""],["","matCardAvatar",""]],[["mat-card-title"],["mat-card-subtitle"],["","mat-card-title",""],["","mat-card-subtitle",""],["","matCardTitle",""],["","matCardSubtitle",""]],"*"],l=["[mat-card-avatar], [matCardAvatar]","mat-card-title, mat-card-subtitle,\n [mat-card-title], [mat-card-subtitle],\n [matCardTitle], [matCardSubtitle]","*"];let v=(()=>{class a{}return a.\u0275fac=function(o){return new(o||a)},a.\u0275dir=t.lG2({type:a,selectors:[["mat-card-content"],["","mat-card-content",""],["","matCardContent",""]],hostAttrs:[1,"mat-card-content"]}),a})(),c=(()=>{class a{}return a.\u0275fac=function(o){return new(o||a)},a.\u0275dir=t.lG2({type:a,selectors:[["mat-card-title"],["","mat-card-title",""],["","matCardTitle",""]],hostAttrs:[1,"mat-card-title"]}),a})(),e=(()=>{class a{constructor(){this.align="start"}}return a.\u0275fac=function(o){return new(o||a)},a.\u0275dir=t.lG2({type:a,selectors:[["mat-card-actions"]],hostAttrs:[1,"mat-card-actions"],hostVars:2,hostBindings:function(o,C){2&o&&t.ekj("mat-card-actions-align-end","end"===C.align)},inputs:{align:"align"},exportAs:["matCardActions"]}),a})(),i=(()=>{class a{}return a.\u0275fac=function(o){return new(o||a)},a.\u0275dir=t.lG2({type:a,selectors:[["mat-card-footer"]],hostAttrs:[1,"mat-card-footer"]}),a})(),d=(()=>{class a{}return a.\u0275fac=function(o){return new(o||a)},a.\u0275dir=t.lG2({type:a,selectors:[["","mat-card-image",""],["","matCardImage",""]],hostAttrs:[1,"mat-card-image"]}),a})(),y=(()=>{class a{}return a.\u0275fac=function(o){return new(o||a)},a.\u0275dir=t.lG2({type:a,selectors:[["","mat-card-avatar",""],["","matCardAvatar",""]],hostAttrs:[1,"mat-card-avatar"]}),a})(),A=(()=>{class a{constructor(o){this._animationMode=o}}return a.\u0275fac=function(o){return new(o||a)(t.Y36(t.QbO,8))},a.\u0275cmp=t.Xpm({type:a,selectors:[["mat-card"]],hostAttrs:[1,"mat-card","mat-focus-indicator"],hostVars:2,hostBindings:function(o,C){2&o&&t.ekj("_mat-animation-noopable","NoopAnimations"===C._animationMode)},exportAs:["matCard"],ngContentSelectors:f,decls:2,vars:0,template:function(o,C){1&o&&(t.F$t(g),t.Hsn(0),t.Hsn(1,1))},styles:[".mat-card{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:block;position:relative;padding:16px;border-radius:4px}.mat-card._mat-animation-noopable{transition:none !important;animation:none !important}.mat-card>.mat-divider-horizontal{position:absolute;left:0;width:100%}[dir=rtl] .mat-card>.mat-divider-horizontal{left:auto;right:0}.mat-card>.mat-divider-horizontal.mat-divider-inset{position:static;margin:0}[dir=rtl] .mat-card>.mat-divider-horizontal.mat-divider-inset{margin-right:0}.cdk-high-contrast-active .mat-card{outline:solid 1px}.mat-card-actions,.mat-card-subtitle,.mat-card-content{display:block;margin-bottom:16px}.mat-card-title{display:block;margin-bottom:8px}.mat-card-actions{margin-left:-8px;margin-right:-8px;padding:8px 0}.mat-card-actions-align-end{display:flex;justify-content:flex-end}.mat-card-image{width:calc(100% + 32px);margin:0 -16px 16px -16px;display:block;overflow:hidden}.mat-card-image img{width:100%}.mat-card-footer{display:block;margin:0 -16px -16px -16px}.mat-card-actions .mat-button,.mat-card-actions .mat-raised-button,.mat-card-actions .mat-stroked-button{margin:0 8px}.mat-card-header{display:flex;flex-direction:row}.mat-card-header .mat-card-title{margin-bottom:12px}.mat-card-header-text{margin:0 16px}.mat-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;object-fit:cover}.mat-card-title-group{display:flex;justify-content:space-between}.mat-card-sm-image{width:80px;height:80px}.mat-card-md-image{width:112px;height:112px}.mat-card-lg-image{width:152px;height:152px}.mat-card-xl-image{width:240px;height:240px;margin:-8px}.mat-card-title-group>.mat-card-xl-image{margin:-8px 0 8px}@media(max-width: 599px){.mat-card-title-group{margin:0}.mat-card-xl-image{margin-left:0;margin-right:0}}.mat-card>:first-child,.mat-card-content>:first-child{margin-top:0}.mat-card>:last-child:not(.mat-card-footer),.mat-card-content>:last-child:not(.mat-card-footer){margin-bottom:0}.mat-card-image:first-child{margin-top:-16px;border-top-left-radius:inherit;border-top-right-radius:inherit}.mat-card>.mat-card-actions:last-child{margin-bottom:-8px;padding-bottom:0}.mat-card-actions:not(.mat-card-actions-align-end) .mat-button:first-child,.mat-card-actions:not(.mat-card-actions-align-end) .mat-raised-button:first-child,.mat-card-actions:not(.mat-card-actions-align-end) .mat-stroked-button:first-child{margin-left:0;margin-right:0}.mat-card-actions-align-end .mat-button:last-child,.mat-card-actions-align-end .mat-raised-button:last-child,.mat-card-actions-align-end .mat-stroked-button:last-child{margin-left:0;margin-right:0}.mat-card-title:not(:first-child),.mat-card-subtitle:not(:first-child){margin-top:-4px}.mat-card-header .mat-card-subtitle:not(:first-child){margin-top:-8px}.mat-card>.mat-card-xl-image:first-child{margin-top:-8px}.mat-card>.mat-card-xl-image:last-child{margin-bottom:-8px}"],encapsulation:2,changeDetection:0}),a})(),T=(()=>{class a{}return a.\u0275fac=function(o){return new(o||a)},a.\u0275cmp=t.Xpm({type:a,selectors:[["mat-card-header"]],hostAttrs:[1,"mat-card-header"],ngContentSelectors:l,decls:4,vars:0,consts:[[1,"mat-card-header-text"]],template:function(o,C){1&o&&(t.F$t(s),t.Hsn(0),t.TgZ(1,"div",0),t.Hsn(2,1),t.qZA(),t.Hsn(3,2))},encapsulation:2,changeDetection:0}),a})(),w=(()=>{class a{}return a.\u0275fac=function(o){return new(o||a)},a.\u0275mod=t.oAB({type:a}),a.\u0275inj=t.cJS({imports:[u.BQ,u.BQ]}),a})()},83683:(b,p,n)=>{n.d(p,{Ye:()=>v,g0:()=>h,rD:()=>M});var t=n(94650),u=n(3238),g=n(83353),f=n(36895);const s=["*",[["mat-toolbar-row"]]],l=["*","mat-toolbar-row"],_=(0,u.pj)(class{constructor(e){this._elementRef=e}});let M=(()=>{class e{}return e.\u0275fac=function(d){return new(d||e)},e.\u0275dir=t.lG2({type:e,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),e})(),v=(()=>{class e extends _{constructor(d,m,x){super(d),this._platform=m,this._document=x}ngAfterViewInit(){this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(()=>this._checkToolbarMixedModes()))}_checkToolbarMixedModes(){}}return e.\u0275fac=function(d){return new(d||e)(t.Y36(t.SBq),t.Y36(g.t4),t.Y36(f.K0))},e.\u0275cmp=t.Xpm({type:e,selectors:[["mat-toolbar"]],contentQueries:function(d,m,x){if(1&d&&t.Suo(x,M,5),2&d){let D;t.iGM(D=t.CRH())&&(m._toolbarRows=D)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(d,m){2&d&&t.ekj("mat-toolbar-multiple-rows",m._toolbarRows.length>0)("mat-toolbar-single-row",0===m._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[t.qOj],ngContentSelectors:l,decls:2,vars:0,template:function(d,m){1&d&&(t.F$t(s),t.Hsn(0),t.Hsn(1,1))},styles:[".cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}"],encapsulation:2,changeDetection:0}),e})(),h=(()=>{class e{}return e.\u0275fac=function(d){return new(d||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[u.BQ,u.BQ]}),e})()}}]);