PageSourceSearch

https://pmmlarchives.in/3456.01752c9406aaf774.js

js pmmlarchives.in collected 2026-10-02 00:38:09 UTC 49,317 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdspace_angular=self.webpackChunkdspace_angular||[]).push([[3456],{33358:(U,P,n)=>{n.d(P,{M:()=>B});var e=n(94650),h=n(31555),b=(n(42621),n(19109)),T=n(36895),C=n(71697),D=n(17944);function f(O,r){if(1&O){const d=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"ds-dso-edit-metadata-value",3),e.\u0275\u0275listener("edit",function(){const c=e.\u0275\u0275restoreView(d).$implicit;return e.\u0275\u0275resetView(c.editing=!0)})("confirm",function(o){const M=e.\u0275\u0275restoreView(d).$implicit,v=e.\u0275\u0275nextContext();return M.confirmChanges(o),v.form.resetReinstatable(),e.\u0275\u0275resetView(v.valueSaved.emit())})("remove",function(){const o=e.\u0275\u0275restoreView(d),c=o.$implicit,M=o.index,v=e.\u0275\u0275nextContext();return c.change===v.DsoEditMetadataChangeTypeEnum.ADD?v.form.remove(v.mdField,M):c.change=v.DsoEditMetadataChangeTypeEnum.REMOVE,v.form.resetReinstatable(),e.\u0275\u0275resetView(v.valueSaved.emit())})("undo",function(){const o=e.\u0275\u0275restoreView(d),c=o.$implicit,M=o.index,v=e.\u0275\u0275nextContext();return c.change===v.DsoEditMetadataChangeTypeEnum.ADD?v.form.remove(v.mdField,M):c.discard(),e.\u0275\u0275resetView(v.valueSaved.emit())})("dragging",function(o){e.\u0275\u0275restoreView(d);const c=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(c.draggingMdField$.next(o?c.mdField:null))}),e.\u0275\u0275elementEnd()}if(2&O){const d=r.$implicit,i=e.\u0275\u0275nextContext();e.\u0275\u0275property("dso",i.dso)("mdValue",d)("dsoType",i.dsoType)("saving$",i.saving$)("isOnlyValue",1===i.form.fields[i.mdField].length)}}let B=(()=>{class O{constructor(){this.valueSaved=new e.EventEmitter,this.DsoEditMetadataChangeTypeEnum=h.bT}drop(d){(0,b.bA)(this.form.fields[this.mdField],d.previousIndex,d.currentIndex),this.form.fields[this.mdField].forEach((c,M)=>{c.newValue.place=M,c.confirmChanges()}),this.form.resetReinstatable(),this.valueSaved.emit()}}return O.\u0275fac=function(d){return new(d||O)},O.\u0275cmp=e.\u0275\u0275defineComponent({type:O,selectors:[["ds-dso-edit-metadata-field-values"]],inputs:{dso:"dso",form:"form",mdField:"mdField",dsoType:"dsoType",saving$:"saving$",draggingMdField$:"draggingMdField$"},outputs:{valueSaved:"valueSaved"},decls:5,vars:8,consts:[["cdkDropList","","role","table",1,"flex-grow-1","ds-drop-list","h-100",3,"cdkDropListDropped"],["role","presentation",3,"dsoType"],["role","presentation",3,"dso","mdValue","dsoType","saving$","isOnlyValue","edit","confirm","remove","undo","dragging",4,"ngFor","ngForOf"],["role","presentation",3,"dso","mdValue","dsoType","saving$","isOnlyValue","edit","confirm","remove","undo","dragging"]],template:function(d,i){1&d&&(e.\u0275\u0275elementStart(0,"div",0),e.\u0275\u0275listener("cdkDropListDropped",function(c){return i.drop(c)}),e.\u0275\u0275pipe(1,"async"),e.\u0275\u0275pipe(2,"async"),e.\u0275\u0275element(3,"ds-dso-edit-metadata-value-headers",1),e.\u0275\u0275template(4,f,1,5,"ds-dso-edit-metadata-value",2),e.\u0275\u0275elementEnd()),2&d&&(e.\u0275\u0275classProp("disabled",e.\u0275\u0275pipeBind1(1,4,i.draggingMdField$)&&e.\u0275\u0275pipeBind1(2,6,i.draggingMdField$)!==i.mdField),e.\u0275\u0275advance(3),e.\u0275\u0275property("dsoType",i.dsoType),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",i.form.fields[i.mdField]))},dependencies:[T.sg,b.Wj,C.J,D.V,T.Ov],styles:[".ds-drop-list[_ngcontent-%COMP%]{background-color:var(--bs-gray-500)}.ds-drop-list.disabled[_ngcontent-%COMP%]{opacity:.3}"]}),O})()},31555:(U,P,n)=>{n.d(P,{bT:()=>f,BS:()=>O});var e=n(79300),h=n(24702);class I{constructor(d,i){this.op=d,this.field=i}}let b=(()=>{class r extends I{constructor(i,o,c){super(r.operationType,i),this.place=o,this.value=c}toOperation(){return{op:this.op,path:`/metadata/${this.field}/${this.place}`,value:this.value}}}return r.operationType="replace",r})(),T=(()=>{class r extends I{constructor(i,o){super(r.operationType,i),this.place=o}toOperation(){return{op:this.op,path:`/metadata/${this.field}/${this.place}`}}}return r.operationType="remove",r})(),C=(()=>{class r extends I{constructor(i,o){super(r.operationType,i),this.value=o}toOperation(){return{op:this.op,path:`/metadata/${this.field}/-`,value:this.value}}}return r.operationType="add",r})(),D=(()=>{class r extends I{constructor(i,o,c){super(r.operationType,i),this.from=o,this.to=c}toOperation(){return{op:this.op,from:`/metadata/${this.field}/${this.from}`,path:`/metadata/${this.field}/${this.to}`}}}return r.operationType="move",r})();var f=(()=>{return(r=f||(f={}))[r.UPDATE=1]="UPDATE",r[r.ADD=2]="ADD",r[r.REMOVE=3]="REMOVE",f;var r})();class B{constructor(d,i=!1){this.editing=!1,this.reordered=!1,this.originalValue=d,this.newValue=Object.assign(new e.DA,d),i&&(this.change=f.ADD,this.editing=!0)}confirmChanges(d=!1){this.reordered=this.originalValue.place!==this.newValue.place,((0,h.xI)(this.change)||this.change===f.UPDATE)&&(this.change=this.originalValue.value!==this.newValue.value||this.originalValue.language!==this.newValue.language?f.UPDATE:void 0),d&&(this.editing=!1)}hasChanges(){return(0,h.Uh)(this.change)||this.reordered}
1discardAndMarkReinstatable(){(this.change===f.UPDATE||this.reordered)&&(this.reinstatableValue=this.newValue),this.reinstatableChange=this.change,this.discard(!1)}discard(d=!0){this.change=void 0;const i=this.newValue.place;this.newValue=Object.assign(new e.DA,this.originalValue),d&&(this.newValue.place=i),this.confirmChanges(!0)}reinstate(){(0,h.Uh)(this.reinstatableValue)&&(this.newValue=this.reinstatableValue,this.reinstatableValue=void 0),(0,h.Uh)(this.reinstatableChange)&&(this.change=this.reinstatableChange,this.reinstatableChange=void 0),this.confirmChanges()}isReinstatable(){return(0,h.Uh)(this.reinstatableValue)||(0,h.Uh)(this.reinstatableChange)}resetReinstatable(){this.reinstatableValue=void 0,this.reinstatableChange=void 0}}class O{constructor(d){this.originalFieldKeys=[],this.fieldKeys=[],this.fields={},this.reinstatableNewValues={},Object.entries(d).forEach(([i,o])=>{this.originalFieldKeys.push(i),this.fieldKeys.push(i),this.setValuesForFieldSorted(i,o.map(c=>new B(c)))}),this.sortFieldKeys()}add(){(0,h.xI)(this.newValue)&&(this.newValue=new B(new e.DA,!0))}setMetadataField(d){this.newValue.editing=!1,this.addValueToField(this.newValue,d);const i=this.fields[d].length-1;this.fields[d][i].originalValue.place=i,this.fields[d][i].newValue.place=i,this.newValue=void 0}addValueToField(d,i){(0,h.xb)(this.fields[i])&&(this.fieldKeys.push(i),this.sortFieldKeys(),this.fields[i]=[]),this.fields[i].push(d)}remove(d,i){(0,h.UE)(this.fields[d])&&(this.fields[d].splice(i,1),0===this.fields[d].length&&(this.fieldKeys.splice(this.fieldKeys.indexOf(d),1),delete this.fields[d]))}hasChanges(){return Object.values(this.fields).some(d=>d.some(i=>i.hasChanges()))}hasOrderChanges(d){return this.fields[d].some(i=>i.originalValue.place!==i.newValue.place)}discard(){this.resetReinstatable(),Object.entries(this.fields).forEach(([d,i])=>{let o=-1;i.forEach((c,M)=>{c.change===f.ADD?((0,h.xb)(this.reinstatableNewValues[d])&&(this.reinstatableNewValues[d]=[]),this.reinstatableNewValues[d].push(c),-1===o&&(o=M)):c.discardAndMarkReinstatable()}),o>-1&&this.fields[d].splice(o,this.fields[d].length-o)}),this.fieldKeys.forEach(d=>{this.originalFieldKeys.indexOf(d)<0&&delete this.fields[d]}),this.fieldKeys=[...this.originalFieldKeys],this.sortFieldKeys(),this.fieldKeys.forEach(d=>{this.setValuesForFieldSorted(d,this.fields[d])})}resetOrder(d){this.fields[d].forEach(i=>{i.newValue.place=i.originalValue.place,i.confirmChanges()}),this.setValuesForFieldSorted(d,this.fields[d])}sortFieldKeys(){this.fieldKeys.sort((d,i)=>d.localeCompare(i))}reinstate(){Object.values(this.fields).forEach(d=>{d.forEach(i=>{i.reinstate()})}),Object.entries(this.reinstatableNewValues).forEach(([d,i])=>{i.forEach(o=>{this.addValueToField(o,d)})}),this.fieldKeys.forEach(d=>{this.setValuesForFieldSorted(d,this.fields[d])}),this.reinstatableNewValues={}}isReinstatable(){return(0,h.UE)(this.reinstatableNewValues)||Object.values(this.fields).some(d=>d.some(i=>i.isReinstatable()))}resetReinstatable(){this.reinstatableNewValues={},Object.values(this.fields).forEach(d=>{d.forEach(i=>{i.resetReinstatable()})})}setValuesForFieldSorted(d,i){this.fields[d]=i.sort((o,c)=>o.newValue.place-c.newValue.place)}getOperations(d){const i=[];return Object.entries(this.fields).forEach(([o,c])=>{const M=[],v=[],E=[];[...c].sort((p,S)=>p.originalValue.place-S.originalValue.place).forEach(p=>{(0,h.Uh)(p.change)&&(p.change===f.UPDATE?(p.originalValue.value!==p.newValue.value||p.originalValue.language!==p.newValue.language)&&M.push(new b(o,p.originalValue.place,{value:p.newValue.value,language:p.newValue.language})):p.change===f.REMOVE?v.push(new T(o,p.originalValue.place)):p.change===f.ADD&&E.push(new C(o,{value:p.newValue.value,language:p.newValue.language})))}),i.push(...M.map(p=>p.toOperation())),i.push(...v.sort((p,S)=>S.place-p.place).map(p=>p.toOperation())),i.push(...E.map(p=>p.toOperation()))}),Object.entries(this.fields).forEach(([o,c])=>{const M=c.filter(E=>E.change!==f.REMOVE),v=d.diff([...M].sort((E,p)=>E.originalValue.place-p.originalValue.place).map(E=>E.originalValue.place),[...M].sort((E,p)=>E.newValue.place-p.newValue.place).map(E=>E.originalValue.place)).map(E=>new D(o,+E.from.substr(1),+E.path.substr(1)).toOperation());i.push(...v)}),i}}},3521:(U,P,n)=>{n.d(P,{i:()=>I});var e=n(94650),h=n(89383);let I=(()=>{class b{}return b.\u0275fac=function(C){return new(C||b)},b.\u0275cmp=e.\u0275\u0275defineComponent({type:b,selectors:[["ds-dso-edit-metadata-headers"]],inputs:{dsoType:"dsoType"},decls:18,vars:12,consts:[[1,"d-flex","flex-row","ds-field-row","ds-header-row"],[1,"lbl-cell"],[1,"flex-grow-1"],[1,"d-flex","flex-row"],[1,"flex-grow-1","ds-flex-cell","ds-value-cell"],[1,"dont-break-out","preserve-line-breaks"],[1,"ds-flex-cell","ds-lang-cell"],[1,"text-center","ds-flex-cell","ds-edit-cell"]],template:function(C,D){1&C&&(e.\u0275\u0275elementStart(0,"div",0)(1,"div",1),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div",2)(5,"div",3)(6,"div",4)(7,"b",5),e.\u0275\u0275text(8),e.\u0275\u0275pipe(9,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(10,"div",6)(11,"b"),e.\u0275\u0275text(12),e.\u0275\u0275pipe(13,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(14,"div",7)(1
15,"b"),e.\u0275\u0275text(16),e.\u0275\u0275pipe(17,"translate"),e.\u0275\u0275elementEnd()()()()()),2&C&&(e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(3,4,D.dsoType+".edit.metadata.headers.field")),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(9,6,D.dsoType+".edit.metadata.headers.value")),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(13,8,D.dsoType+".edit.metadata.headers.language")),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(17,10,D.dsoType+".edit.metadata.headers.edit")))},dependencies:[h.X$],styles:[".lbl-cell[_ngcontent-%COMP%]{min-width:var(--ds-dso-edit-field-width);max-width:var(--ds-dso-edit-field-width);background-color:var(--bs-gray-100);font-weight:700;padding:1rem;border:1px solid var(--bs-gray-200)}.ds-header-row[_ngcontent-%COMP%]{background-color:var(--bs-gray-100)}",".ds-field-row[_ngcontent-%COMP%]{border:1px solid var(--bs-gray-400)}.ds-flex-cell[_ngcontent-%COMP%]{padding:1rem;border:1px solid var(--bs-gray-200)}.ds-lang-cell[_ngcontent-%COMP%]{min-width:var(--ds-dso-edit-lang-width);max-width:var(--ds-dso-edit-lang-width)}.ds-edit-cell[_ngcontent-%COMP%]{min-width:var(--ds-dso-edit-actions-width)}.ds-value-row[_ngcontent-%COMP%]{background-color:#fff}.ds-value-row[_ngcontent-%COMP%]:active{cursor:grabbing}.ds-value-row.ds-warning[_ngcontent-%COMP%]{background-color:var(--bs-warning-bg)}.ds-value-row.ds-warning[_ngcontent-%COMP%]   .ds-flex-cell[_ngcontent-%COMP%]{border:1px solid var(--bs-warning)}.ds-value-row.ds-danger[_ngcontent-%COMP%]{background-color:var(--bs-danger-bg)}.ds-value-row.ds-danger[_ngcontent-%COMP%]   .ds-flex-cell[_ngcontent-%COMP%]{border:1px solid var(--bs-danger)}.ds-value-row.ds-success[_ngcontent-%COMP%]{background-color:var(--bs-success-bg)}.ds-value-row.ds-success[_ngcontent-%COMP%]   .ds-flex-cell[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}"]}),b})()},17944:(U,P,n)=>{n.d(P,{V:()=>I});var e=n(94650),h=n(89383);let I=(()=>{class b{}return b.\u0275fac=function(C){return new(C||b)},b.\u0275cmp=e.\u0275\u0275defineComponent({type:b,selectors:[["ds-dso-edit-metadata-value-headers"]],inputs:{dsoType:"dsoType"},decls:10,vars:9,consts:[["role","row",1,"visually-hidden"],["role","columnheader"]],template:function(C,D){1&C&&(e.\u0275\u0275elementStart(0,"div",0)(1,"div",1),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div",1),e.\u0275\u0275text(5),e.\u0275\u0275pipe(6,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(7,"div",1),e.\u0275\u0275text(8),e.\u0275\u0275pipe(9,"translate"),e.\u0275\u0275elementEnd()()),2&C&&(e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(3,3,D.dsoType+".edit.metadata.headers.value")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(6,5,D.dsoType+".edit.metadata.headers.language")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(9,7,D.dsoType+".edit.metadata.headers.edit")))},dependencies:[h.X$],styles:[".ds-field-row[_ngcontent-%COMP%]{border:1px solid var(--bs-gray-400)}.ds-flex-cell[_ngcontent-%COMP%]{padding:1rem;border:1px solid var(--bs-gray-200)}.ds-lang-cell[_ngcontent-%COMP%]{min-width:var(--ds-dso-edit-lang-width);max-width:var(--ds-dso-edit-lang-width)}.ds-edit-cell[_ngcontent-%COMP%]{min-width:var(--ds-dso-edit-actions-width)}.ds-value-row[_ngcontent-%COMP%]{background-color:#fff}.ds-value-row[_ngcontent-%COMP%]:active{cursor:grabbing}.ds-value-row.ds-warning[_ngcontent-%COMP%]{background-color:var(--bs-warning-bg)}.ds-value-row.ds-warning[_ngcontent-%COMP%]   .ds-flex-cell[_ngcontent-%COMP%]{border:1px solid var(--bs-warning)}.ds-value-row.ds-danger[_ngcontent-%COMP%]{background-color:var(--bs-danger-bg)}.ds-value-row.ds-danger[_ngcontent-%COMP%]   .ds-flex-cell[_ngcontent-%COMP%]{border:1px solid var(--bs-danger)}.ds-value-row.ds-success[_ngcontent-%COMP%]{background-color:var(--bs-success-bg)}.ds-value-row.ds-success[_ngcontent-%COMP%]   .ds-flex-cell[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}"]}),b})()},71697:(U,P,n)=>{n.d(P,{J:()=>A});var e=n(94650),h=n(31555),I=n(52885),b=n(88002),C=(n(42621),n(54004)),D=n(40747),f=n(83616),B=n(60515),O=n(36895),r=n(24006),d=n(9769),i=n(34793),o=n(19109),c=n(77048),M=n(98605),v=n(34159),E=n(89383);function p(l,y){if(1&l&&(e.\u0275\u0275elementStart(0,"div",20),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&l){const s=e.\u0275\u0275nextContext(3);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(s.mdValue.newValue.value)}}function S(l,y){if(1&l){const s=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"textarea",21),e.\u0275\u0275listener("ngModelChange",function(u){e.\u0275\u0275restoreView(s);const t=e.\u0275\u0275nextContext(3);
1return e.\u0275\u0275resetView(t.mdValue.newValue.value=u)})("onDebounce",function(){e.\u0275\u0275restoreView(s);const u=e.\u0275\u0275nextContext(3);return e.\u0275\u0275resetView(u.confirm.emit(!1))}),e.\u0275\u0275elementEnd()}if(2&l){const s=e.\u0275\u0275nextContext(3);e.\u0275\u0275property("ngModel",s.mdValue.newValue.value)("dsDebounce",300)}}function K(l,y){if(1&l&&(e.\u0275\u0275elementStart(0,"div",22)(1,"a",23),e.\u0275\u0275pipe(2,"async"),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"async"),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(5,"ds-themed-type-badge",24),e.\u0275\u0275elementEnd()),2&l){const s=e.\u0275\u0275nextContext().ngVar,a=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275property("routerLink",e.\u0275\u0275pipeBind1(2,3,a.mdRepresentationItemRoute$)),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(4,5,a.mdRepresentationName$)),e.\u0275\u0275advance(2),e.\u0275\u0275property("object",s)}}function L(l,y){if(1&l&&(e.\u0275\u0275elementStart(0,"div",17),e.\u0275\u0275template(1,p,2,1,"div",4),e.\u0275\u0275template(2,S,1,2,"textarea",18),e.\u0275\u0275template(3,K,6,7,"div",19),e.\u0275\u0275elementEnd()),2&l){const s=y.ngVar,a=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!a.mdValue.editing&&!s),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",a.mdValue.editing&&!s),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",s)}}function $(l,y){if(1&l&&(e.\u0275\u0275elementStart(0,"div",20),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&l){const s=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(s.mdValue.newValue.language)}}function W(l,y){if(1&l){const s=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"input",25),e.\u0275\u0275listener("ngModelChange",function(u){e.\u0275\u0275restoreView(s);const t=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(t.mdValue.newValue.language=u)})("onDebounce",function(){e.\u0275\u0275restoreView(s);const u=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(u.confirm.emit(!1))}),e.\u0275\u0275elementEnd()}if(2&l){const s=e.\u0275\u0275nextContext(2);e.\u0275\u0275property("ngModel",s.mdValue.newValue.language)("dsDebounce",300)}}function k(l,y){if(1&l){const s=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",26),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(s);const u=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(u.edit.emit())}),e.\u0275\u0275pipe(1,"translate"),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275pipe(3,"async"),e.\u0275\u0275element(4,"i",27),e.\u0275\u0275elementEnd()}if(2&l){const s=e.\u0275\u0275nextContext().ngVar,a=e.\u0275\u0275nextContext();e.\u0275\u0275propertyInterpolate("ngbTooltip",e.\u0275\u0275pipeBind1(2,5,a.dsoType+".edit.metadata.edit.buttons.edit")),e.\u0275\u0275property("title",e.\u0275\u0275pipeBind1(1,3,a.dsoType+".edit.metadata.edit.buttons.edit"))("disabled",s||a.mdValue.change===a.DsoEditMetadataChangeTypeEnum.REMOVE||e.\u0275\u0275pipeBind1(3,7,a.saving$))}}function V(l,y){if(1&l){const s=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",28),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(s);const u=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(u.confirm.emit(!0))}),e.\u0275\u0275pipe(1,"translate"),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275pipe(3,"async"),e.\u0275\u0275element(4,"i",29),e.\u0275\u0275elementEnd()}if(2&l){const s=e.\u0275\u0275nextContext().ngVar,a=e.\u0275\u0275nextContext();e.\u0275\u0275propertyInterpolate("ngbTooltip",e.\u0275\u0275pipeBind1(2,5,a.dsoType+".edit.metadata.edit.buttons.confirm")),e.\u0275\u0275property("title",e.\u0275\u0275pipeBind1(1,3,a.dsoType+".edit.metadata.edit.buttons.confirm"))("disabled",s||e.\u0275\u0275pipeBind1(3,7,a.saving$))}}const F=function(l){return{disabled:l}};function _(l,y){if(1&l&&(e.\u0275\u0275elementStart(0,"button",30),e.\u0275\u0275pipe(1,"translate"),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275element(3,"i",31),e.\u0275\u0275elementEnd()),2&l){const s=y.ngVar,a=e.\u0275\u0275nextContext(2);e.\u0275\u0275propertyInterpolate("ngbTooltip",e.\u0275\u0275pipeBind1(2,7,a.dsoType+".edit.metadata.edit.buttons.drag")),e.\u0275\u0275property("cdkDragHandleDisabled",s)("ngClass",e.\u0275\u0275pureFunction1(9,F,s))("disabled",s)("title",e.\u0275\u0275pipeBind1(1,5,a.dsoType+".edit.metadata.edit.buttons.drag"))}}const x=function(l,y,s,a){return{"ds-warning":l,"ds-danger":y,"ds-success":s,"h-100":a}};function w(l,y){if(1&l){const s=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",1),e.\u0275\u0275listener("cdkDragStarted",function(){e.\u0275\u0275restoreView(s);const u=e.\u0275\u0275nextContext();
1return e.\u0275\u0275resetView(u.dragging.emit(!0))})("cdkDragEnded",function(){e.\u0275\u0275restoreView(s);const u=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(u.dragging.emit(!1))}),e.\u0275\u0275template(1,L,4,3,"div",2),e.\u0275\u0275pipe(2,"async"),e.\u0275\u0275elementStart(3,"div",3),e.\u0275\u0275template(4,$,2,1,"div",4),e.\u0275\u0275template(5,W,1,2,"input",5),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(6,"div",6)(7,"div",7)(8,"div",8)(9,"div",9),e.\u0275\u0275pipe(10,"translate"),e.\u0275\u0275template(11,k,5,9,"button",10),e.\u0275\u0275template(12,V,5,9,"button",11),e.\u0275\u0275elementStart(13,"button",12),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(s);const u=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(u.remove.emit())}),e.\u0275\u0275pipe(14,"translate"),e.\u0275\u0275pipe(15,"translate"),e.\u0275\u0275pipe(16,"async"),e.\u0275\u0275element(17,"i",13),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(18,"button",14),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(s);const u=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(u.undo.emit())}),e.\u0275\u0275pipe(19,"translate"),e.\u0275\u0275pipe(20,"translate"),e.\u0275\u0275pipe(21,"async"),e.\u0275\u0275element(22,"i",15),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275template(23,_,4,11,"button",16),e.\u0275\u0275pipe(24,"async"),e.\u0275\u0275elementEnd()()()}if(2&l){const s=y.ngVar,a=e.\u0275\u0275nextContext();e.\u0275\u0275property("ngClass",e.\u0275\u0275pureFunction4(32,x,a.mdValue.reordered||a.mdValue.change===a.DsoEditMetadataChangeTypeEnum.UPDATE,a.mdValue.change===a.DsoEditMetadataChangeTypeEnum.REMOVE,a.mdValue.change===a.DsoEditMetadataChangeTypeEnum.ADD,a.isOnlyValue)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngVar",e.\u0275\u0275pipeBind1(2,14,a.mdRepresentation$)),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",!a.mdValue.editing),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",a.mdValue.editing),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngbTooltip",s?e.\u0275\u0275pipeBind1(10,16,a.dsoType+".edit.metadata.edit.buttons.virtual"):null),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",!a.mdValue.editing),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",a.mdValue.editing),e.\u0275\u0275advance(1),e.\u0275\u0275propertyInterpolate("ngbTooltip",e.\u0275\u0275pipeBind1(15,20,a.dsoType+".edit.metadata.edit.buttons.remove")),e.\u0275\u0275property("title",e.\u0275\u0275pipeBind1(14,18,a.dsoType+".edit.metadata.edit.buttons.remove"))("disabled",s||a.mdValue.change&&a.mdValue.change!==a.DsoEditMetadataChangeTypeEnum.ADD||a.mdValue.editing||e.\u0275\u0275pipeBind1(16,22,a.saving$)),e.\u0275\u0275advance(5),e.\u0275\u0275propertyInterpolate("ngbTooltip",e.\u0275\u0275pipeBind1(20,26,a.dsoType+".edit.metadata.edit.buttons.undo")),e.\u0275\u0275property("title",e.\u0275\u0275pipeBind1(19,24,a.dsoType+".edit.metadata.edit.buttons.undo"))("disabled",s||!a.mdValue.change&&a.mdValue.reordered||!a.mdValue.change&&!a.mdValue.editing||e.\u0275\u0275pipeBind1(21,28,a.saving$)),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngVar",a.isOnlyValue||e.\u0275\u0275pipeBind1(24,30,a.saving$))}}let A=(()=>{class l{constructor(s,a){this.relationshipService=s,this.dsoNameService=a,this.isOnlyValue=!1,this.edit=new e.EventEmitter,this.confirm=new e.EventEmitter,this.remove=new e.EventEmitter,this.undo=new e.EventEmitter,this.dragging=new e.EventEmitter,this.DsoEditMetadataChangeTypeEnum=h.bT}ngOnInit(){this.initVirtualProperties()}initVirtualProperties(){this.mdRepresentation$=this.mdValue.newValue.isVirtual?this.relationshipService.resolveMetadataRepresentation(this.mdValue.newValue,this.dso,"Item").pipe((0,C.U)(s=>s.representationType===I.P.Item?s:null)):B.E,this.mdRepresentationItemRoute$=this.mdRepresentation$.pipe((0,C.U)(s=>s?(0,D.Tt)(s):null)),this.mdRepresentationName$=this.mdRepresentation$.pipe((0,C.U)(s=>s?this.dsoNameService.getName(s):null))}}return l.\u0275fac=function(s){return new(s||l)(e.\u0275\u0275directiveInject(b.U),e.\u0275\u0275directiveInject(f._))},l.\u0275cmp=e.\u0275\u0275defineComponent({type:l,selectors:[["ds-dso-edit-metadata-value"]],inputs:{dso:"dso",mdValue:"mdValue",dsoType:"dsoType",saving$:"saving$",isOnlyValue:"isOnlyValue"},outputs:{edit:"edit",confirm:"confirm",remove:"remove",undo:"undo",dragging:"dragging"},decls:1,vars:1,consts:[["class","d-flex flex-row ds-value-row","role","row","cdkDrag","",3,"ngClass","cdkDragStarted","cdkDragEnded",4,"ngVar"],["role","row","cdkDrag","",1,"d-flex","flex-row","ds-value-row",3,"ngClass","cdkDragStarted","cdkDragEnded"],["class","flex-grow-1 ds-flex-cell ds-value-cell d-flex align-items-center","role","cell",4,"ngVar"],["role","cell",1,"ds-flex-cell","ds-lang-cell"],["class","dont-break-out preserve-line-breaks",4,"ngIf"],["class","form-control","type","text",3,"ngModel","dsDebounce","ngModelChange","onDebounce",4,"ngIf"],["role","cell",1,"text-center","ds-flex-cell","ds-edit-cell"],[1,"btn-group"],[1,"edit-field"],[1,"btn-group","edit-buttons",3,"ngbTooltip"],["class","btn btn-outline-primary btn-sm ng-star-inserted","id","metadata-edit-btn",3,"title","ngbTooltip","disabled","click",4,"ngIf"],["class","btn btn-outline-success btn-sm ng-star-inserted","id","metadata-confirm-btn",3,"title","ngbTooltip","disabled","click",4,"ngIf"],["id","metadata-remove-btn",1,"btn","btn-outline-danger","btn-sm",3,"title","ngbTooltip","disabled","click"],[1,"fas","fa-tras
1h-alt","fa-fw"],["id","metadata-undo-btn",1,"btn","btn-outline-warning","btn-sm",3,"title","ngbTooltip","disabled","click"],[1,"fas","fa-undo-alt","fa-fw"],["class","btn btn-outline-secondary ds-drag-handle btn-sm","id","metadata-drag-btn","cdkDragHandle","",3,"cdkDragHandleDisabled","ngClass","disabled","title","ngbTooltip",4,"ngVar"],["role","cell",1,"flex-grow-1","ds-flex-cell","ds-value-cell","d-flex","align-items-center"],["class","form-control","rows","5",3,"ngModel","dsDebounce","ngModelChange","onDebounce",4,"ngIf"],["class","d-flex",4,"ngIf"],[1,"dont-break-out","preserve-line-breaks"],["rows","5",1,"form-control",3,"ngModel","dsDebounce","ngModelChange","onDebounce"],[1,"d-flex"],["target","_blank",1,"mr-2",3,"routerLink"],[3,"object"],["type","text",1,"form-control",3,"ngModel","dsDebounce","ngModelChange","onDebounce"],["id","metadata-edit-btn",1,"btn","btn-outline-primary","btn-sm","ng-star-inserted",3,"title","ngbTooltip","disabled","click"],[1,"fas","fa-edit","fa-fw"],["id","metadata-confirm-btn",1,"btn","btn-outline-success","btn-sm","ng-star-inserted",3,"title","ngbTooltip","disabled","click"],[1,"fas","fa-check","fa-fw"],["id","metadata-drag-btn","cdkDragHandle","",1,"btn","btn-outline-secondary","ds-drag-handle","btn-sm",3,"cdkDragHandleDisabled","ngClass","disabled","title","ngbTooltip"],[1,"fas","fa-grip-vertical","fa-fw"]],template:function(s,a){1&s&&e.\u0275\u0275template(0,w,25,37,"div",0),2&s&&e.\u0275\u0275property("ngVar",a.mdValue.newValue.isVirtual)},dependencies:[O.mk,O.O5,r.Fj,r.JJ,r.On,d._L,i.rH,o.Zt,o.Bh,c.o,M.g,v.q,O.Ov,E.X$],styles:[".ds-success[_ngcontent-%COMP%]{background-color:var(--bs-success-bg);border:1px solid var(--bs-success)}.ds-drag-handle[_ngcontent-%COMP%]:not(.disabled){cursor:grab}  .edit-field>ngb-tooltip-window .tooltip-inner{min-width:var(--ds-dso-edit-virtual-tooltip-min-width)}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}",".ds-field-row[_ngcontent-%COMP%]{border:1px solid var(--bs-gray-400)}.ds-flex-cell[_ngcontent-%COMP%]{padding:1rem;border:1px solid var(--bs-gray-200)}.ds-lang-cell[_ngcontent-%COMP%]{min-width:var(--ds-dso-edit-lang-width);max-width:var(--ds-dso-edit-lang-width)}.ds-edit-cell[_ngcontent-%COMP%]{min-width:var(--ds-dso-edit-actions-width)}.ds-value-row[_ngcontent-%COMP%]{background-color:#fff}.ds-value-row[_ngcontent-%COMP%]:active{cursor:grabbing}.ds-value-row.ds-warning[_ngcontent-%COMP%]{background-color:var(--bs-warning-bg)}.ds-value-row.ds-warning[_ngcontent-%COMP%]   .ds-flex-cell[_ngcontent-%COMP%]{border:1px solid var(--bs-warning)}.ds-value-row.ds-danger[_ngcontent-%COMP%]{background-color:var(--bs-danger-bg)}.ds-value-row.ds-danger[_ngcontent-%COMP%]   .ds-flex-cell[_ngcontent-%COMP%]{border:1px solid var(--bs-danger)}.ds-value-row.ds-success[_ngcontent-%COMP%]{background-color:var(--bs-success-bg)}.ds-value-row.ds-success[_ngcontent-%COMP%]   .ds-flex-cell[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}"]}),l})()},73456:(U,P,n)=>{n.r(P),n.d(P,{DsoEditMetadataComponent:()=>s});var e=n(94650),h=n(74711),b=(n(42621),n(31555)),T=n(54004),C=n(39841),D=n(24702),f=n(61135),B=n(68285),O=n(3879),r=n(46418),d=n(46329),i=n(21147),o=n(34793),c=n(89383),M=n(85870),v=n(36895),E=n(38605),p=n(45863),S=n(33358),K=n(71697),L=n(3521),$=n(17944);function W(a,u){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",20),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const g=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(g.reinstate())}),e.\u0275\u0275pipe(1,"async"),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275element(3,"i",21),e.\u0275\u0275elementStart(4,"span",6),e.\u0275\u0275text(5),e.\u0275\u0275pipe(6,"translate"),e.\u0275\u0275elementEnd()()}if(2&a){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275property("disabled",e.\u0275\u0275pipeBind1(1,3,t.saving$))("title",e.\u0275\u0275pipeBind1(2,5,t.dsoType+".edit.metadata.reinstate-button")),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1("\xa0",e.\u0275\u0275pipeBind1(6,7,t.dsoType+".edit.metadata.reinstate-button"),"")}}function k(a,u){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",22),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const g=e.\u0275\u0275nextContext(2);
1return e.\u0275\u0275resetView(g.discard())}),e.\u0275\u0275pipe(1,"translate"),e.\u0275\u0275pipe(2,"async"),e.\u0275\u0275element(3,"i",23),e.\u0275\u0275elementStart(4,"span",6),e.\u0275\u0275text(5),e.\u0275\u0275pipe(6,"translate"),e.\u0275\u0275elementEnd()()}if(2&a){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275property("title",e.\u0275\u0275pipeBind1(1,3,t.dsoType+".edit.metadata.discard-button"))("disabled",!t.hasChanges||e.\u0275\u0275pipeBind1(2,5,t.saving$)),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1("\xa0",e.\u0275\u0275pipeBind1(6,7,t.dsoType+".edit.metadata.discard-button"),"")}}function V(a,u){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",24)(1,"div",25)(2,"ds-metadata-field-selector",26),e.\u0275\u0275listener("mdFieldChange",function(g){e.\u0275\u0275restoreView(t);const R=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(R.newMdField=g)}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(3,"div",27)(4,"div",11),e.\u0275\u0275element(5,"ds-dso-edit-metadata-value-headers",28),e.\u0275\u0275elementStart(6,"ds-dso-edit-metadata-value",29),e.\u0275\u0275listener("confirm",function(g){e.\u0275\u0275restoreView(t);const R=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(R.confirmNewValue(g))})("remove",function(){e.\u0275\u0275restoreView(t);const g=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(g.form.newValue=void 0)})("undo",function(){e.\u0275\u0275restoreView(t);const g=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(g.form.newValue=void 0)}),e.\u0275\u0275elementEnd()()()()}if(2&a){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(2),e.\u0275\u0275property("dsoType",t.dsoType)("mdField",t.newMdField)("autofocus",!0),e.\u0275\u0275advance(3),e.\u0275\u0275property("dsoType",t.dsoType),e.\u0275\u0275advance(1),e.\u0275\u0275property("dso",t.dso)("mdValue",t.form.newValue)("dsoType",t.dsoType)("saving$",t.savingOrLoadingFieldValidation$)("isOnlyValue",!0)}}function F(a,u){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",34),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const g=e.\u0275\u0275nextContext().$implicit,R=e.\u0275\u0275nextContext(2);return R.form.resetOrder(g),e.\u0275\u0275resetView(R.onValueSaved())}),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275elementEnd()}if(2&a){const t=e.\u0275\u0275nextContext(3);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(2,1,t.dsoType+".edit.metadata.reset-order-button")," ")}}function _(a,u){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",24)(1,"div",30)(2,"span",31),e.\u0275\u0275text(3),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(4,F,3,3,"div",32),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"ds-dso-edit-metadata-field-values",33),e.\u0275\u0275listener("valueSaved",function(){e.\u0275\u0275restoreView(t);const g=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(g.onValueSaved())}),e.\u0275\u0275elementEnd()()}if(2&a){const t=u.$implicit,m=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(t),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",m.form.hasOrderChanges(t)),e.\u0275\u0275advance(1),e.\u0275\u0275property("dso",m.dso)("form",m.form)("dsoType",m.dsoType)("saving$",m.saving$)("draggingMdField$",m.draggingMdField$)("mdField",t)}}function x(a,u){if(1&a&&(e.\u0275\u0275elementStart(0,"div"),e.\u0275\u0275element(1,"ds-alert",35),e.\u0275\u0275elementEnd()),2&a){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275property("content",t.dsoType+".edit.metadata.empty")("type",t.AlertTypeEnum.Info)}}function w(a,u){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",36),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const g=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(g.reinstate())}),e.\u0275\u0275pipe(1,"async"),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275element(3,"i",21),e.\u0275\u0275text(4),e.\u0275\u0275pipe(5,"translate"),e.\u0275\u0275elementEnd()}if(2&a){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275property("disabled",e.\u0275\u0275pipeBind1(1,3,t.saving$))("title",e.\u0275\u0275pipeBind1(2,5,t.dsoType+".edit.metadata.reinstate-button")),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(5,7,t.dsoType+".edit.metadata.reinstate-button")," ")}}function A(a,u){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",37),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const g=e.\u0275\u0275nextContext(2);
1return e.\u0275\u0275resetView(g.discard())}),e.\u0275\u0275pipe(1,"translate"),e.\u0275\u0275pipe(2,"async"),e.\u0275\u0275element(3,"i",23),e.\u0275\u0275text(4),e.\u0275\u0275pipe(5,"translate"),e.\u0275\u0275elementEnd()}if(2&a){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275property("title",e.\u0275\u0275pipeBind1(1,3,t.dsoType+".edit.metadata.discard-button"))("disabled",!t.hasChanges||e.\u0275\u0275pipeBind1(2,5,t.saving$)),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(5,7,t.dsoType+".edit.metadata.discard-button")," ")}}function l(a,u){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"button",4),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const g=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(g.add())}),e.\u0275\u0275pipe(3,"async"),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275element(5,"i",5),e.\u0275\u0275elementStart(6,"span",6),e.\u0275\u0275text(7),e.\u0275\u0275pipe(8,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(9,W,7,9,"button",7),e.\u0275\u0275elementStart(10,"button",8),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const g=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(g.submit())}),e.\u0275\u0275pipe(11,"async"),e.\u0275\u0275pipe(12,"translate"),e.\u0275\u0275element(13,"i",9),e.\u0275\u0275elementStart(14,"span",6),e.\u0275\u0275text(15),e.\u0275\u0275pipe(16,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(17,k,7,9,"button",10),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(18,"div",11),e.\u0275\u0275pipe(19,"translate"),e.\u0275\u0275element(20,"ds-dso-edit-metadata-headers",12),e.\u0275\u0275template(21,V,7,9,"div",13),e.\u0275\u0275template(22,_,6,8,"div",14),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(23,x,2,2,"div",1),e.\u0275\u0275elementStart(24,"div",15)(25,"div",16),e.\u0275\u0275template(26,w,6,9,"button",17),e.\u0275\u0275elementStart(27,"button",18),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const g=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(g.submit())}),e.\u0275\u0275pipe(28,"async"),e.\u0275\u0275pipe(29,"translate"),e.\u0275\u0275element(30,"i",9),e.\u0275\u0275text(31),e.\u0275\u0275pipe(32,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(33,A,6,9,"button",19),e.\u0275\u0275elementEnd()()()}if(2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275property("disabled",t.form.newValue||e.\u0275\u0275pipeBind1(3,18,t.saving$))("title",e.\u0275\u0275pipeBind1(4,20,t.dsoType+".edit.metadata.add-button")),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1("\xa0",e.\u0275\u0275pipeBind1(8,22,t.dsoType+".edit.metadata.add-button"),""),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",t.isReinstatable),e.\u0275\u0275advance(1),e.\u0275\u0275property("disabled",!t.hasChanges||e.\u0275\u0275pipeBind1(11,24,t.saving$))("title",e.\u0275\u0275pipeBind1(12,26,t.dsoType+".edit.metadata.save-button")),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1("\xa0",e.\u0275\u0275pipeBind1(16,28,t.dsoType+".edit.metadata.save-button"),""),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",!t.isReinstatable),e.\u0275\u0275advance(1),e.\u0275\u0275attribute("aria-label",e.\u0275\u0275pipeBind1(19,30,"item.edit.head")),e.\u0275\u0275advance(2),e.\u0275\u0275property("dsoType",t.dsoType),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",t.form.newValue),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",t.form.fieldKeys),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",t.isEmpty&&!t.form.newValue),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",t.isReinstatable),e.\u0275\u0275advance(1),e.\u0275\u0275property("disabled",!t.hasChanges||e.\u0275\u0275pipeBind1(28,32,t.saving$))("title",e.\u0275\u0275pipeBind1(29,34,t.dsoType+".edit.metadata.save-button")),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(32,36,t.dsoType+".edit.metadata.save-button")," "),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",!t.isReinstatable)}}function y(a,u){1&a&&e.\u0275\u0275element(0,"ds-loading")}let s=(()=>{class a{constructor(t,m,g,R,j,H){this.route=t,this.notificationsService=m,this.translateService=g,this.parentInjector=R,this.arrayMoveChangeAnalyser=j,this.getDataServiceFor=H,this.saving$=new f.X(!1),this.draggingMdField$=new f.X(null),this.loadingFieldValidation$=new f.X(!1),this.AlertTypeEnum=h.N}ngOnInit(){(0,D.xI)(this.dso)?this.dsoUpdateSubscription=(0,C.a)([this.route.data,this.route.parent.data]).pipe((0,T.U)(([t,m])=>Object.assign({},t,m)),(0,T.U)(t=>t.dso)).subscribe(t=>{this.dso=t.payload,this.initDataService(),this.initForm()}):(this.initDataService(),this.initForm()),this.savingOrLoadingFieldValidation$=(0,C.a)([this.saving$,this.loadingFieldValidation$]).pipe((0,T.U)(([t,m])=>t||m))}initDataService(){let t;if(t="string"==typeof this.dso.type?new O._(this.dso.type):this.dso.type,(0,D.xI)(this.updateDataService)){const m=this.getDataServiceFor(t);this.updateDataService=e.Injector.create({providers:[],parent:this.parentInjector}).get(m)}this.dsoType=t.value}initForm(){this.form=new b.BS(this.dso.metadata),this.onValueSaved()}onValueSaved(){this.hasChanges=this.form.hasChanges(),this.isReinstatable=this.form.isReinstatable(),this.isEmpty=0===Object.keys(this.form.fields).length}submit(){this.saving$.next(!0),this.updateDataService.patch(this.dso,this.form.getOperations(this.arrayMoveChangeAnalyser)).pipe((0,B.hC)()).subscribe(t=>{this.saving$.next(!1),t.hasFailed?this.notificationsService.error(this.translateService.instant(`${this.dsoType}.edit.metadata.notifications.error.title`),t.errorMessage):(this.notificationsService.success(this.translateService.instant(`${this.dsoType}.edit.metadata.notifications.saved.title`),this.translateService.instant(`${this.dsoType}.edit.metadata.notifications.saved.content`)),this.dso=t.payload,this.initForm())})}confirmNewValue(t){t&&this.setMetadataField()}setMetadataField(){this.form.resetReinstatable(),this.loadingFieldValidation$.next(!0),this.metadataFieldSelectorComponent.validate().subscribe(t=>{this.loadingFieldValidation$.next(!1),t&&(this.form.setMetadataField(this.newMdField),this.onValueSaved())})}add(){this.newMdField=void 0,this.form.add()}discard(){this.form.discard(),this.onValueSaved()}reinstate(){this.form.reinstate(),this.onValueSaved()}ngOnDestroy(){(0,D.Uh)(this.dsoUpdateSubscription)&&this.dsoUpdateSubscription.unsubscribe()}}return a.\u0275fac=function(t){return new(t||a)(e.\u0275\u0275directiveInject(o.gz),e.\u0275\u0275directiveInject(r.T),e.\u0275\u0275directiveInject(c.sK),e.\u0275\u0275directiveInject(e.Injector),e.\u0275\u0275directiveInject(M.g),e.\u0275\u0275directiveInject(i.II))}
1,a.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["ds-dso-edit-metadata"]],viewQuery:function(t,m){if(1&t&&e.\u0275\u0275viewQuery(d.V,5),2&t){let g;e.\u0275\u0275queryRefresh(g=e.\u0275\u0275loadQuery())&&(m.metadataFieldSelectorComponent=g.first)}},inputs:{dso:"dso",updateDataService:"updateDataService"},decls:2,vars:2,consts:[["class","item-metadata",4,"ngIf"],[4,"ngIf"],[1,"item-metadata"],[1,"button-row","top","d-flex","my-2","space-children-mr","ml-gap"],["id","dso-add-btn",1,"mr-auto","btn","btn-success",3,"disabled","title","click"],[1,"fas","fa-plus"],[1,"d-none","d-sm-inline"],["class","btn btn-warning ml-1","id","dso-reinstate-btn",3,"disabled","title","click",4,"ngIf"],["id","dso-save-btn",1,"btn","btn-primary","ml-1",3,"disabled","title","click"],[1,"fas","fa-save"],["class","btn btn-danger ml-1","id","dso-discard-btn",3,"title","disabled","click",4,"ngIf"],["role","table"],[3,"dsoType"],["class","d-flex flex-row ds-field-row","role","row",4,"ngIf"],["class","d-flex flex-row ds-field-row","role","row",4,"ngFor","ngForOf"],[1,"button-row","bottom","d-inline-block","w-100"],[1,"mt-2","float-right","space-children-mr","ml-gap"],["class","btn btn-warning",3,"disabled","title","click",4,"ngIf"],[1,"btn","btn-primary",3,"disabled","title","click"],["class","btn btn-danger",3,"title","disabled","click",4,"ngIf"],["id","dso-reinstate-btn",1,"btn","btn-warning","ml-1",3,"disabled","title","click"],[1,"fas","fa-undo-alt"],["id","dso-discard-btn",1,"btn","btn-danger","ml-1",3,"title","disabled","click"],[1,"fas","fa-times"],["role","row",1,"d-flex","flex-row","ds-field-row"],["role","rowheader",1,"lbl-cell","ds-success"],[3,"dsoType","mdField","autofocus","mdFieldChange"],["role","cell",1,"flex-grow-1","ds-drop-list"],["role","presentation",3,"dsoType"],[3,"dso","mdValue","dsoType","saving$","isOnlyValue","confirm","remove","undo"],["role","rowheader",1,"lbl-cell"],[1,"dont-break-out","preserve-line-breaks"],["class","btn btn-warning reset-order-button mt-2 w-100",3,"click",4,"ngIf"],["role","cell",1,"flex-grow-1",3,"dso","form","dsoType","saving$","draggingMdField$","mdField","valueSaved"],[1,"btn","btn-warning","reset-order-button","mt-2","w-100",3,"click"],[3,"content","type"],[1,"btn","btn-warning",3,"disabled","title","click"],[1,"btn","btn-danger",3,"title","disabled","click"]],template:function(t,m){1&t&&(e.\u0275\u0275template(0,l,34,38,"div",0),e.\u0275\u0275template(1,y,1,0,"ds-loading",1)),2&t&&(e.\u0275\u0275property("ngIf",m.form),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!m.form))},dependencies:[v.sg,v.O5,E.w,p.LoadingComponent,d.V,S.M,K.J,L.i,$.V,v.Ov,c.X$],styles:[".lbl-cell[_ngcontent-%COMP%]{min-width:var(--ds-dso-edit-field-width);max-width:var(--ds-dso-edit-field-width);background-color:var(--bs-gray-100);font-weight:700;padding:1rem;border:1px solid var(--bs-gray-200)}.lbl-cell.ds-success[_ngcontent-%COMP%]{background-color:var(--bs-success-bg);border:1px solid var(--bs-success)}.ds-field-row[_ngcontent-%COMP%]{border:1px solid var(--bs-gray-400)}.reset-order-button[_ngcontent-%COMP%]:hover{cursor:pointer}"]}),a})()},46329:(U,P,n)=>{n.d(P,{V:()=>k});var e=n(94650),h=n(78372),I=n(71884),b=n(63900),T=n(95698),C=n(54004),D=n(18505),f=n(93369),B=n(68285),O=n(45879),r=n(24006),d=n(61135),i=n(24702),o=n(39646),c=n(46418),M=n(42943),v=n(89383),E=n(36895),p=n(90059);const S=["mdFieldInput"];function K(V,F){if(1&V&&(e.\u0275\u0275elementStart(0,"div",7),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275elementEnd()),2&V){const _=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(2,1,_.dsoType+".edit.metadata.metadatafield.invalid"))}}function L(V,F){if(1&V){const _=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div")(1,"a",8),e.\u0275\u0275listener("click",function(){const A=e.\u0275\u0275restoreView(_).$implicit,l=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(l.select(A))}),e.\u0275\u0275element(2,"span",9),e.\u0275\u0275elementEnd()()}if(2&V){const _=F.$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275property("innerHTML",_,e.\u0275\u0275sanitizeHtml)}}const $=function(V){return{"is-invalid":V}},W=function(V){return{show:V}};let k=(()=>{class V{constructor(_,x,w){this.registryService=_,this.notificationsService=x,this.translate=w,this.autofocus=!1,this.mdFieldChange=new e.EventEmitter,this.input=new r.p4,this.query$=new d.X(null),this.debounceTime=300,this.selectedValueLoading=!1,this.showInvalid=!1,this.subs=[]}ngOnInit(){this.subs.push(this.input.valueChanges.pipe((0,h.b)(this.debounceTime)).subscribe(_=>{this.selectedValueLoading||this.query$.next(_),this.selectedValueLoading=!1,this.mdField=_,this.mdFieldChange.emit(this.mdField)})),this.mdFieldOptions$=this.query$.pipe((0,I.x)(),(0,b.w)(_=>(this.showInvalid=!1,null!==_?this.registryService.queryMetadataFields(_,{elementsPerPage:10,sort:new M.o("fieldName",M.S.ASC)},!0,!1,(0,f.l)("schema")).pipe((0,B.g1)(),(0,B.EB)()):[[]])))}ngAfterViewInit(){this.autofocus&&this.mdFieldInput.nativeElement.focus()}validate(){return this.registryService.queryMetadataFields(this.mdField,null,!0,!1,(0,f.l)("schema")).pipe((0,B.hC)(),(0,b.w)(_=>_.hasSucceeded?(0,o.of)(_).pipe((0,B.EB)(),(0,T.q)(1),(0,C.U)(x=>x.indexOf(this.mdField)>-1),(0,D.b)(x=>this.showInvalid=!x)):(this.notificationsService.error(this.translate.instant(`${this.dsoType}.edit.metadata.metadatafield.error`),_.errorMessage),[!1])))}select(_){this.selectedValueLoading=!0,this.input.setValue(_)}ngOnDestroy(){this.subs.filter(_=>
1(0,i.Uh)(_)).forEach(_=>_.unsubscribe())}}return V.\u0275fac=function(_){return new(_||V)(e.\u0275\u0275directiveInject(O.k),e.\u0275\u0275directiveInject(c.T),e.\u0275\u0275directiveInject(v.sK))},V.\u0275cmp=e.\u0275\u0275defineComponent({type:V,selectors:[["ds-metadata-field-selector"]],viewQuery:function(_,x){if(1&_&&e.\u0275\u0275viewQuery(S,7),2&_){let w;e.\u0275\u0275queryRefresh(w=e.\u0275\u0275loadQuery())&&(x.mdFieldInput=w.first)}},inputs:{dsoType:"dsoType",mdField:"mdField",autofocus:"autofocus"},outputs:{mdFieldChange:"mdFieldChange"},decls:9,vars:14,consts:[[1,"w-100","position-relative"],["type","text",1,"form-control",3,"ngClass","value","formControl","focusin","dsClickOutside","click"],["mdFieldInput",""],["class","invalid-feedback show-feedback",4,"ngIf"],[1,"autocomplete","dropdown-menu",3,"ngClass"],[1,"dropdown-list"],[4,"ngFor","ngForOf"],[1,"invalid-feedback","show-feedback"],["href","javascript:void(0);",1,"d-block","dropdown-item",3,"click"],[3,"innerHTML"]],template:function(_,x){if(1&_&&(e.\u0275\u0275elementStart(0,"div",0)(1,"input",1,2),e.\u0275\u0275listener("focusin",function(){return x.query$.next(x.mdField)})("dsClickOutside",function(){return x.query$.next(null)})("click",function(A){return A.stopPropagation()}),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(3,K,3,3,"div",3),e.\u0275\u0275elementStart(4,"div",4),e.\u0275\u0275pipe(5,"async"),e.\u0275\u0275elementStart(6,"div",5),e.\u0275\u0275template(7,L,3,1,"div",6),e.\u0275\u0275pipe(8,"async"),e.\u0275\u0275elementEnd()()()),2&_){let w;e.\u0275\u0275advance(1),e.\u0275\u0275property("ngClass",e.\u0275\u0275pureFunction1(10,$,x.showInvalid))("value",x.mdField)("formControl",x.input),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",x.showInvalid),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngClass",e.\u0275\u0275pureFunction1(12,W,(null==(w=e.\u0275\u0275pipeBind1(5,6,x.mdFieldOptions$))?null:w.length)>0)),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngForOf",e.\u0275\u0275pipeBind1(8,8,x.mdFieldOptions$))}},dependencies:[E.mk,E.sg,E.O5,r.Fj,r.JJ,r.oH,p._,E.Ov,v.X$]}),V})()}}]);

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.