1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="440280a7-07da-5865-b178-cbacd4b8e386")}catch(e){}}(); 3import{b as Et,c as wt}from"./chunk-N2JZYPGP.js";import{a as St,c as B}from"./chunk-SNIZGRWM.js";import"./chunk-WCKIHH4E.js";import"./chunk-H3FK3NGC.js";import{a as Rt}from"./chunk-5UQCCOJX.js";import"./chunk-NEXQTY2J.js";import{a as xt}from"./chunk-PRVZHEXG.js";import{a as it}from"./chunk-3HPJAYXA.js";import{a as bt,c as Mt,d as Tt,h as Dt}from"./chunk-NDD7CGWO.js";import"./chunk-MTUM7EG7.js";import{a as vt}from"./chunk-5RDNZTTM.js";import{b as nt}from"./chunk-T3VVOZZT.js";import"./chunk-T7DF7PY6.js";import"./chunk-WUY2JFPV.js";import"./chunk-Y3UE7WYA.js";import"./chunk-CAZIV44N.js";import"./chunk-XIEPXTT7.js";import"./chunk-V32LTTP3.js";import"./chunk-64AE4N5H.js";import{b as rt}from"./chunk-T3SBJBZK.js";import"./chunk-2IL73E45.js";import"./chunk-VQTNL4J6.js";import"./chunk-NXGCLNSX.js";import{a as gt,e as ft,f as ht,h as _t,i as yt,l as Ct,m as v}from"./chunk-N37DZZN7.js";import"./chunk-OD6I7YAT.js";import"./chunk-6GTHYMO6.js";import"./chunk-LQWW6DAP.js";import"./chunk-QVMKUOA2.js";import"./chunk-DUEKGWVE.js";import{b as ot}from"./chunk-SV4QHZ6R.js";import"./chunk-J7WPYGOY.js";import{b as $,j as O,k as S,l as C}from"./chunk-ZY36BRPM.js";import{a as lt,b as st,d as ct,e as pt,f as mt,g as dt,h as ut}from"./chunk-WO2N3BGC.js";import"./chunk-WHTYCSAG.js";import"./chunk-MIRAE4HP.js";import{b as at,e as j}from"./chunk-7V2B6WIV.js";import"./chunk-VMBK3ESP.js";import"./chunk-VQM3N5YY.js";import"./chunk-U2S4Q5VS.js";import"./chunk-7B3DFEIE.js";import"./chunk-QFRXUKCK.js";import{$b as q,Bb as h,Ca as I,Ec as d,Fc as k,Gc as M,Hb as K,Hc as Q,P as W,Rd as tt,Sc as X,Wb as _,Yb as y,Zc as c,_c as p,_d as et,ac as H,ba as z,bc as u,cc as r,dc as l,ec as L,ha as N,hd as A,id as Y,jb as a,lc as D,ma as n,md as Z,nc as f,nd as R,pc as g,s as U,sa as x,t as P,ta as b,zc as J}from"./chunk-MPV5Q6GW.js";import{a as w,b as F}from"./chunk-THKSGHO2.js";function jt(i,m){if(i&1&&d(0),i&2){let t=g();M(" ",t.desc," ")}}function Bt(i,m){i&1&&(d(0),c(1,"transloco")),i&2&&M(" ",p(1,1,"explorer.entity_detail_dialog.entity_has_no_description")," ")}function Gt(i,m){if(i&1){let t=D();r(0,"mat-action-list")(1,"button",1),f("click",function(){x(t);let o=g(2);return b(o.onRouteToCatalog())}),r(2,"mat-icon",2),d(3,"open_in_new"),l(),r(4,"span",3),d(5),c(6,"transloco"),l()()()}if(i&2){let t=g(2);a(5),k(t.title()||p(6,1,"explorer.entity_detail_dialog.default_catalog_title"))}}function Vt(i,m){if(i&1&&(r(0,"div",0),_(1,jt,1,1)(2,Bt,2,3),l(),_(3,Gt,7,3,"mat-action-list")),i&2){let t=m;a(),y(t.desc?1:2),a(2),y(t.catalog?3:-1)}}var Lt=(()=>{class i{constructor(){this.entity=R(),this.catalogEnv=n(nt),this.catalogRouting=n(vt),this.transloco=n(O),this.title=A(()=>{let t=this.entity();if(!t||!t.catalog)return null;let{configId:e}=t.catalog;try{return this.catalogEnv.getEnv(e).title[this.transloco.getActiveLang()]}catch{return null}})}onRouteToCatalog(){let t=this.entity();if(!t||!t.catalog)return;let{configId:e,coreId:o}=t.catalog,s=xt(o,t.genID),T=this.catalogRouting.detailSingleAbsUrl(s,e);it(T)}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=h({type:i,selectors:[["ex-overview"]],inputs:{entity:[1,"entity"]},decls:1,vars:1,consts:[[1,"p-3"],["mat-list-item","",3,"click"],["matListItemIcon",""],["matListItemTitle",""]],template:function(e,o){if(e&1&&_(0,Vt,4,2),e&2){let s;y((s=o.entity())?0:-1,s)}},dependencies:[C,v,ht,_t,ft,gt,ot,S],encapsulation:2,changeDetection:0})}}return i})();var E=(()=>{class i{constructor(){this.#i=I(null),this.#t=I({}),this.#e=I({}),this.#o=I(!1),this.loading$=$(this.#o),this.relations$=$(A(()=>{let t=this.#t(),e=this.#e();return Object.keys(t).map(o=>w(w({},t[o]),e[o]??{}))})),this.graphRepository=n(B)}#i;#t;#e;#o;get entity(){return this.#i()}setRelations(t){this.#t.set(Object.fromEntries(t.map(e=>[e.id,e]))),this.#e.set(Object.fromEntries(t.map(e=>[e.id,{id:e.id,checked:this.graphRepository.hasEdgeWithRelation({source:"_"+this.#i()?.id,target:"_"+e.target.id},e.label)}])))}getSelectedRelations(){let t=this.#t(),e=this.#e();return Object.keys(e).filter(o=>e[o].checked).map(o=>t[o]).filter(o=>!!o)}getAllRelations(){return Object.values(this.#t())}updateRelationChecked(t,e){this.#e.update(o=>F(w({},o),{[t]:F(w({},o[t]),{checked:e})}))}setEntity(t){this.#i.set(t)}setLoading(t){this.#o.set(t)}reset(){this.#i.set(null),this.#t.set({}),this.#e.set({}),this.#o.set(!1)}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275prov=N({token:i,factory:i.\u0275fac})}}return i})(),V=(()=>{class i{constructor(){this.repository=n(E),this.api=n(St)}
3fetchRelations(t){this.repository.setLoading(!0),this.api.getEntityRelations([t.genID]).pipe(W(()=>{this.repository.setLoading(!1)}),U(e=>Object.keys(e.result[0].relations.items).map(o=>Object.keys(e.result[0].relations.items[o].items).map(s=>e.result[0].relations.items[o].items[s].items.map(T=>({id:o+"_"+T.genID,label:o,count:e.result[0].relations.items[o].counter,target:T}))).flat()).flat()),z(e=>this.repository.setRelations(e.sort((o,s)=>s.label.localeCompare(o.label))))).subscribe()}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275prov=N({token:i,factory:i.\u0275fac})}}return i})();var Ft=(i,m)=>m.id;function Nt(i,m){if(i&1&&(r(0,"mat-list-option",1),d(1),c(2,"transloco"),l()),i&2){let t=m.$implicit;u("value",t.id)("selected",t.checked),a(),Q("",p(2,4,"explorer.relations."+t.label),' "',t.target.label,'"')}}var kt=(()=>{class i{constructor(){this.relations=R([]),this.selectionChange=Z(),this.compareFn=(t,e)=>t.id===e.id}onSelectionChange(t){t.options.forEach(o=>{this.selectionChange.emit([o.value,o.selected])})}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=h({type:i,selectors:[["ex-relation-selection-list"]],inputs:{relations:[1,"relations"]},outputs:{selectionChange:"selectionChange"},decls:3,vars:1,consts:[[3,"selectionChange","compareWith"],[3,"value","selected"]],template:function(e,o){e&1&&(r(0,"mat-selection-list",0),f("selectionChange",function(T){return o.onSelectionChange(T)}),q(1,Nt,3,6,"mat-list-option",1,Ft),l()),e&2&&(u("compareWith",o.compareFn),a(),H(o.relations()))},dependencies:[v,Ct,yt,C,S],encapsulation:2,changeDetection:0})}}return i})();function $t(i,m){if(i&1){let t=D();L(0,"aipb-loading",0),r(1,"ex-relation-selection-list",1),f("selectionChange",function(o){x(t);let s=g();return b(s.onSelectionChange(o))}),l()}if(i&2){let t=m;u("loading",t.loading),a(),u("relations",t.relations)}}var At=(()=>{class i{constructor(){this.entity=R(),this.service=n(V),this.repository=n(E),this.vm$=P({relations:this.repository.relations$,loading:this.repository.loading$}),Y(()=>{let t=this.entity();t&&this.service.fetchRelations(t)})}onSelectionChange(t){this.repository.updateRelationChecked(t[0],t[1])}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=h({type:i,selectors:[["ex-relations"]],inputs:{entity:[1,"entity"]},decls:2,vars:3,consts:[[3,"loading"],[3,"selectionChange","relations"]],template:function(e,o){if(e&1&&(_(0,$t,2,2),c(1,"async")),e&2){let s;y((s=p(1,1,o.vm$))?0:-1,s)}},dependencies:[et,v,C,j,kt,Rt,tt],encapsulation:2})}}return i})();function Ut(i,m){if(i&1&&L(0,"ex-relations",4),i&2){let t=g();u("entity",t.data.entity)}}function Pt(i,m){if(i&1){let t=D();r(0,"div")(1,"button",8),f("click",function(){x(t);let o=g();return b(o.onAddAllToGraph())}),d(2),c(3,"transloco"),l(),r(4,"button",8),f("click",function(){x(t);let o=g();return b(o.onAddSelectedToGraph())}),d(5),c(6,"transloco"),l()()}i&2&&(a(2),M(" ",p(3,2,"explorer.entity_detail_dialog.add_all_to_graph")," "),a(3),M(" ",p(6,4,"explorer.entity_detail_dialog.add_selected_to_graph")," "))}var $e=(()=>{class i{constructor(){this.dialogRef=n(lt),this.data=n(st),this.graph=n(wt),this.graphRepository=n(B),this.repository=n(E),this.snackbar=n(rt),this.transloco=n(O);let t=this.data;this.repository.setEntity(t.entity)}onAddSelectedToGraph(){this.addRelationsToGraph(this.repository.getSelectedRelations())}onAddAllToGraph(){this.addRelationsToGraph(this.repository.getAllRelations())}addRelationsToGraph(t){t.forEach(e=>{this.graph.addNode(Et(e.target,[e.label]),!0),this.graph.addEntityRelation(this.data.entity.id+"",e.target,e.label,!0)}),this.snackbar.open(this.transloco.translate("explorer.entity_detail_dialog.relations_added_to_graph"),void 0,{duration:3e3})}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=h({type:i,selectors:[["ex-entity-detail-dialog"]],features:[X([V,E])],decls:15,vars:12,consts:[["tabs",""],["mat-dialog-title",""],["mat-dialog-content",""],[3,"label"],[3,"entity"],["matTabContent",""],["align","start","mat-dialog-actions","",1,"justify-between"],["mat-button","","mat-dialog-close","",1,"primary-button"],["mat-button","",3,"click"]],template:function(e,o){if(e&1&&(r(0,"h1",1),d(1),l(),r(2,"mat-tab-group",2,0)(4,"mat-tab",3),c(5,"transloco"),L(6,"ex-overview",4),l(),r(7,"mat-tab",3),c(8,"transloco"),K(9,Ut,1,1,"ng-template",5),l()(),r(10,"div",6)(11,"button",7),d(12),c(13,"transloco"),l(),_(14,Pt,7,6,"div"),l()),e&2){let s=J(3);a(),k(o.data.entity.label),a(3),u("label",p(5,6,"explorer.entity_detail_dialog.overview")),a(2),u("entity",o.data.entity),a(),u("label",p(8,8,"explorer.entity_detail_dialog.relations")),a(5),M(" ",p(13,10,"ui.buttons.close")," "),a(2),y(s.selectedIndex===1?14:-1)}},dependencies:[ut,ct,pt,dt,mt,j,at,v,C,Dt,bt,Mt,Tt,Lt,At,S],encapsulation:2})}}return i})();export{$e as EntityDetailDialogComponent}; 4//# sourceMappingURL=chunk-LKKILG7F.js.map 5
6//# debugId=440280a7-07da-5865-b178-cbacd4b8e386
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.