PageSourceSearch

https://theo-logos.pl/2577.a574e01e098441ba.js

js theo-logos.pl collected 2026-10-02 20:44:32 UTC 225,727 bytes, 1 lines download raw bytes

1(self.webpackChunkdspace_angular=self.webpackChunkdspace_angular||[]).push([[2577],{37920:(ie,W,t)=>{"use strict";t.d(W,{w:()=>k});var z,i=t(70655),m=t(10102),u=t(6952),e=t(18005),p=t(55624),v=t(13604),s=t(16066),I=t(1411),A=t(98678);let k=((z=class extends m.o{constructor(C,l,D,j){super("submissionuploads",C,l,D,j),this.requestService=C,this.rdbService=l,this.objectCache=D,this.halService=j}findByHref(C,l=!0,D=!0,...j){return super.findByHref(C,l,D,...j)}}).\u0275fac=function(C){return new(C||z)(A.\u0275\u0275inject(u.s),A.\u0275\u0275inject(s.Q),A.\u0275\u0275inject(p.a),A.\u0275\u0275inject(e.q))},z.\u0275prov=A.\u0275\u0275defineInjectable({token:z,factory:z.\u0275fac}),z);k=(0,i.__decorate)([(0,I.cQ)(v.fB),(0,i.__metadata)("design:paramtypes",[u.s,s.Q,p.a,e.q])],k)},60030:(ie,W,t)=>{"use strict";t.d(W,{K:()=>u});var i=t(45608),m=t(65521);class u extends m.R{constructor(p,...v){super(p,...v),this._rootElement=p,this._subRootElement=v.join("/")}get rootElement(){return this._rootElement}get subRootElement(){return this._subRootElement}getPath(p){(0,i.pT)(p)&&Array.isArray(p)&&(p=p.join("/"));let v="/"+this.toString();return(0,i.pT)(p)&&(v+="/"+p),{rootElement:this._rootElement,subRootElement:this._subRootElement,path:v}}}},33194:(ie,W,t)=>{"use strict";t.d(W,{e:()=>e});var i=t(78964),m=t(16441),u=t(98678);let e=(()=>{class p{constructor(s,I){this.config=s,this.httpNoInterceptors=new i.eN(I)}getMetadata(s){const A=`${this.getApiUrl()}${encodeURIComponent(s)}`;return this.httpNoInterceptors.get(A,{withCredentials:!1})}getApiUrl(){return this.config.crossref.api.baseUrl}}return p.\u0275fac=function(s){return new(s||p)(u.\u0275\u0275inject(m.q),u.\u0275\u0275inject(i.jN))},p.\u0275prov=u.\u0275\u0275defineInjectable({token:p,factory:p.\u0275fac,providedIn:"root"}),p})()},75245:(ie,W,t)=>{"use strict";t.d(W,{d:()=>m});const i=[{iso1:"pl",iso2:"pol"},{iso1:"en",iso2:"eng"},{iso1:"sq",iso2:"alb"},{iso1:"ar",iso2:"ara"},{iso1:"be",iso2:"bel"},{iso1:"bg",iso2:"bul"},{iso1:"zh",iso2:"chi"},{iso1:"hr",iso2:"hrv"},{iso1:"cs",iso2:"cze"},{iso1:"da",iso2:"dan"},{iso1:"nl",iso2:"dut"},{iso1:"et",iso2:"est"},{iso1:"fi",iso2:"fin"},{iso1:"fr",iso2:"fre"},{iso1:"ka",iso2:"geo"},{iso1:"de",iso2:"ger"},{iso1:"el",iso2:"gre"},{iso1:"he",iso2:"heb"},{iso1:"hu",iso2:"hun"},{iso1:"is",iso2:"ice"},{iso1:"ga",iso2:"gle"},{iso1:"it",iso2:"ita"},{iso1:"ja",iso2:"jpn"},{iso1:"csb",iso2:"csb"},{iso1:"kk",iso2:"kaz"},{iso1:"la",iso2:"lat"},{iso1:"lv",iso2:"lav"},{iso1:"lt",iso2:"lit"},{iso1:"mk",iso2:"mac"},{iso1:"mt",iso2:"mlt"},{iso1:"no",iso2:"nor"},{iso1:"pt",iso2:"por"},{iso1:"ro",iso2:"rum"},{iso1:"ru",iso2:"rus"},{iso1:"sr",iso2:"srp"},{iso1:"sk",iso2:"slo"},{iso1:"sl",iso2:"slv"},{iso1:"es",iso2:"spa"},{iso1:"sv",iso2:"swe"},{iso1:"tr",iso2:"tur"},{iso1:"uk",iso2:"ukr"},{iso1:"yi",iso2:"yid"},{iso1:"other",iso2:"other"}];class m{constructor(e){this.work=e}getPrimaryTitle(){const e=this.work;return e&&(this.norm(e.title?.[0])||this.norm(e["original-title"]?.[0])||this.norm(e["short-title"]?.[0])||this.norm(e["container-title"]?.[0]))||""}getISO2Language(){const e=this.work;if(!e||!e.language)return"";const p=e.language.toLowerCase(),v=i.find(s=>s.iso1===p);return v&&v.iso2?v.iso2:"other"}getAbstract(){const e=this.work;return e&&e.abstract?e.abstract.replace(/<\/jats:p>/g,"\n").replace(/<[^>]+>/g,"").trim():""}getAuthors(){const e=this.work;return e&&Array.isArray(e.author)?e.author.filter(p=>!!p.family||!!p.given).map(p=>{const v=(p.family??"").trim(),s=(p.given??"").trim();return v&&s?`${v}, ${s}`:v||s||""}).filter(Boolean):[]}getTitleAndSubTitle(){const e=this.work;if(!e)return"";const p=this.norm(e.title?.[0]||""),v=(e.subtitle||[]).map(s=>this.norm(s)).filter(s=>!!s);return p||0!==v.length?[p,...v].filter(Boolean).join(", "):""}getISSNs(){const e=this.work;return e&&Array.isArray(e.ISSN)?this.uniqIgnoreCase(e.ISSN.filter(p=>"string"==typeof p&&p.trim().length>0).map(p=>p.trim())):[]}getISBNs(){const e=this.work;return e&&Array.isArray(e.ISBN)?this.uniqIgnoreCase(e.ISBN.filter(p=>"string"==typeof p&&p.trim().length>0).map(p=>p.trim())):[]}getPublishedFullDate(){const e=this.extractPublishedDateParts();if(!e||0===e.length)return"";const[p,v,s]=e;let I=p?`${p}`:"";return v&&(I+=`-${String(v).padStart(2,"0")}`),s&&(I+=`-${String(s).padStart(2,"0")}`),I}getPublisher(){return this.work?.publisher?.trim()??""}getSubjects(){const e=this.work;return e&&Array.isArray(e.subject)?this.uniqIgnoreCase(e.subject.filter(p=>"string"==typeof p&&p.trim().length>0).map(p=>p.trim())):[]}extractPublishedDateParts(){const e=this.work;if(!e)return null;const p=e.published?.["date-parts"]?.[0]??e["published-print"]?.["date-parts"]?.[0]??e["published-online"]?.["date-parts"]?.[0]??e.issued?.["date-parts"]?.[0];return Array.isArray(p)&&p.length?p:null}norm(e){return(e??"").trim()}uniqIgnoreCase(e){const p=new Set,v=[];
1for(const s of e.map(this.norm).filter(Boolean)){const I=s.toLocaleLowerCase();p.has(I)||(p.add(I),v.push(s))}return v}}},44918:(ie,W,t)=>{"use strict";t.r(W),t.d(W,{SubmissionEditComponent:()=>V});var i=t(35841),m=t(21160),u=t(77007),e=t(3358),p=t(45608),v=t(93033),s=t(65384),I=t(10572),A=t(29442),z=t(11915),k=t(97176),S=t(39662),C=t(98678),l=t(67522),D=t(96342),j=t(86183);let V=(()=>{class Y{constructor(U,q,d,J,c,F,G,f,h){this.changeDetectorRef=U,this.notificationsService=q,this.route=d,this.router=J,this.itemDataService=c,this.submissionService=F,this.translate=G,this.formBuilderService=f,this.submissionJsonPatchOperationsService=h,this.collectionModifiable=null,this.subs=[],this.itemLink$=new i.X(void 0)}ngOnInit(){this.formBuilderService.clearForms(),this.collectionModifiable=this.route.snapshot.data?.collectionModifiable??null,this.subs.push(this.route.paramMap.pipe((0,m.w)(U=>this.submissionService.retrieveSubmission(U.get("id"))),(0,u.h)(U=>(0,p.K0)(U))).subscribe(U=>{if(U.hasSucceeded)if((0,p.xb)(U.payload))this.notificationsService.info(null,this.translate.get("submission.general.cannot_submit")),this.router.navigate(["/mydspace"]);else{const{errors:q}=U.payload;this.submissionErrors=(0,k.Z)(q),this.submissionId=U.payload.id.toString(),this.collectionId=U.payload.collection.id,this.selfUrl=U.payload._links.self.href,this.sections=U.payload.sections,this.itemLink$.next(U.payload._links.item.href),this.item=U.payload.item,this.submissionDefinition=U.payload.submissionDefinition}else 404===U.statusCode&&this.router.navigate(["/404"],{skipLocationChange:!0})}),this.itemLink$.pipe((0,p.iy)(),(0,m.w)(U=>this.itemDataService.findByHref(U)),(0,I.g1)(),(0,e.b)(300)).subscribe(U=>{this.item=U.payload,this.changeDetectorRef.detectChanges()}))}ngOnDestroy(){this.subs.filter(U=>(0,p.Uh)(U)).forEach(U=>U.unsubscribe()),this.submissionJsonPatchOperationsService.deletePendingJsonPatchOperations()}}return Y.\u0275fac=function(U){return new(U||Y)(C.\u0275\u0275directiveInject(C.ChangeDetectorRef),C.\u0275\u0275directiveInject(s.T),C.\u0275\u0275directiveInject(l.gz),C.\u0275\u0275directiveInject(l.F0),C.\u0275\u0275directiveInject(A.S),C.\u0275\u0275directiveInject(v.b),C.\u0275\u0275directiveInject(D.sK),C.\u0275\u0275directiveInject(S.c),C.\u0275\u0275directiveInject(z.E))},Y.\u0275cmp=C.\u0275\u0275defineComponent({type:Y,selectors:[["ds-submission-edit"]],decls:2,vars:8,consts:[[1,"submission-submit-container"],[3,"collectionId","sections","selfUrl","submissionDefinition","submissionErrors","item","collectionModifiable","submissionId"]],template:function(U,q){1&U&&(C.\u0275\u0275elementStart(0,"div",0),C.\u0275\u0275element(1,"ds-submission-form",1),C.\u0275\u0275elementEnd()),2&U&&(C.\u0275\u0275advance(1),C.\u0275\u0275property("collectionId",q.collectionId)("sections",q.sections)("selfUrl",q.selfUrl)("submissionDefinition",q.submissionDefinition)("submissionErrors",q.submissionErrors)("item",q.item)("collectionModifiable",q.collectionModifiable)("submissionId",q.submissionId))},dependencies:[j.G]}),Y})()},97359:(ie,W,t)=>{"use strict";t.d(W,{I:()=>p});var i=t(4682),m=t(98678);function u(v,s){}const e=["*"];let p=(()=>{class v extends i.F{getComponentName(){return"SubmissionEditComponent"}importThemedComponent(I){return t(8377)(`./${I}/app/submission/edit/submission-edit.component`)}importUnthemedComponent(){return Promise.resolve().then(t.bind(t,44918))}}return v.\u0275fac=function(){let s;return function(A){return(s||(s=m.\u0275\u0275getInheritedFactory(v)))(A||v)}}(),v.\u0275cmp=m.\u0275\u0275defineComponent({type:v,selectors:[["ds-themed-submission-edit"]],features:[m.\u0275\u0275InheritDefinitionFeature],ngContentSelectors:e,decls:5,vars:0,consts:[["vcr",""],["content",""]],template:function(I,A){1&I&&(m.\u0275\u0275projectionDef(),m.\u0275\u0275template(0,u,0,0,"ng-template",null,0,m.\u0275\u0275templateRefExtractor),m.\u0275\u0275elementStart(2,"div",null,1),m.\u0275\u0275projection(4),m.\u0275\u0275elementEnd())},encapsulation:2}),v})()},35273:(ie,W,t)=>{"use strict";t.d(W,{z:()=>G});var i=t(98678),m=t(35841),u=t(9237),e=t(66154),p=t(48358),v=t(69637),s=t(45608),I=t(60030),A=t(78187),z=t(93033),k=t(11915),S=t(95445),C=t(52972),l=t(73797),D=t(10572),j=t(96289),V=t(8842),Y=t(35103),te=t(65706),U=t(19829),q=t(96342);function d(f,h){if(1&f&&(i.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"span",4),i.\u0275\u0275text(3),i.\u0275\u0275pipe(4,"translate"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(5,"div",5)(6,"span",4),i.\u0275\u0275text(7),i.\u0275\u0275pipe(8,"async"),i.\u0275\u0275elementEnd()()()),2&f){const g=i.\u0275\u0275nextContext();i.\u0275\u0275advance(3),i.\u0275\u0275textInterpolate(i.\u0275\u0275pipeBind1(4,2,"submission.sections.general.collection")),i.\u0275\u0275advance(4),i.\u0275\u0275textInterpolate(i.\u0275\u0275pipeBind1(8,4,g.selectedCollectionName$))}}function J(f,h){1&f&&(i.\u0275\u0275elementStart(0,"span"),i.\u0275\u0275element(1,"i",13),i.\u0275\u0275elementEnd())}function c(f,h){if(1&f&&(i.\u0275\u0275elementStart(0,"span"),i.\u0275\u0275text(1),i.\u0275\u0275pipe(2,"async"),i.\u0275\u0275elementEnd()),2&f){const g=i.\u0275\u0275nextContext(2);i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate(i.\u0275\u0275pipeBind1(2,1,g.selectedCollectionName$))}}function F(f,h){if(1&f){const g=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div",6,7),i.\u0275\u0275listener("openChange",function(R){i.\u0275\u0275restoreView(g);
1const ee=i.\u0275\u0275nextContext();return i.\u0275\u0275resetView(ee.toggled(R))}),i.\u0275\u0275elementStart(2,"div",3)(3,"span",8),i.\u0275\u0275text(4),i.\u0275\u0275pipe(5,"translate"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(6,"button",9),i.\u0275\u0275listener("blur",function(){i.\u0275\u0275restoreView(g);const R=i.\u0275\u0275nextContext();return i.\u0275\u0275resetView(R.onClose())})("click",function(){i.\u0275\u0275restoreView(g);const R=i.\u0275\u0275nextContext();return i.\u0275\u0275resetView(R.onClose())}),i.\u0275\u0275pipe(7,"async"),i.\u0275\u0275template(8,J,2,0,"span",10),i.\u0275\u0275pipe(9,"async"),i.\u0275\u0275template(10,c,3,3,"span",10),i.\u0275\u0275pipe(11,"async"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(12,"div",11)(13,"ds-themed-collection-dropdown",12),i.\u0275\u0275listener("selectionChange",function(R){i.\u0275\u0275restoreView(g);const ee=i.\u0275\u0275nextContext();return i.\u0275\u0275resetView(ee.onSelect(R))}),i.\u0275\u0275elementEnd()()()}if(2&f){const g=i.\u0275\u0275nextContext();i.\u0275\u0275advance(4),i.\u0275\u0275textInterpolate1(" ",i.\u0275\u0275pipeBind1(5,4,"submission.sections.general.collection")," "),i.\u0275\u0275advance(2),i.\u0275\u0275property("disabled",i.\u0275\u0275pipeBind1(7,6,g.processingChange$)||0==g.collectionModifiable||g.isReadonly),i.\u0275\u0275advance(2),i.\u0275\u0275property("ngIf",i.\u0275\u0275pipeBind1(9,8,g.processingChange$)),i.\u0275\u0275advance(2),i.\u0275\u0275property("ngIf",!i.\u0275\u0275pipeBind1(11,10,g.processingChange$))}}let G=(()=>{class f{constructor(g,T,R,ee,B,K,w){this.cdr=g,this.collectionDataService=T,this.operationsBuilder=R,this.operationsService=ee,this.submissionService=B,this.sectionsService=K,this.dsoNameService=w,this.collectionModifiable=null,this.isReadonly=!1,this.collectionChange=new i.EventEmitter,this.processingChange$=new m.X(!1),this.subs=[]}ngOnChanges(g){(0,s.Uh)(g.currentCollectionId)&&(0,s.Uh)(g.currentCollectionId.currentValue)&&(this.selectedCollectionId=this.currentCollectionId,this.selectedCollectionName$=this.collectionDataService.findById(this.currentCollectionId).pipe((0,e.s)(T=>(0,s.UE)(T.payload)),(0,p.U)(T=>this.dsoNameService.getName(T.payload))))}ngOnInit(){this.pathCombiner=new I.K("sections","collection"),this.available$=this.sectionsService.isSectionTypeAvailable(this.submissionId,j.i.collection)}ngOnDestroy(){this.subs.filter(g=>(0,s.Uh)(g)).forEach(g=>g.unsubscribe())}onSelect(g){this.processingChange$.next(!0),this.operationsBuilder.replace(this.pathCombiner.getPath(),g.collection.id,!0),this.subs.push(this.operationsService.jsonPatchByResourceID(this.submissionService.getSubmissionObjectLinkName(),this.submissionId,"sections","collection").pipe((0,v.z)(T=>this.submissionService.retrieveSubmission(T[0].id).pipe((0,D.Gp)()))).subscribe(T=>{this.selectedCollectionId=g.collection.id,this.selectedCollectionName$=(0,u.of)(g.collection.name),this.collectionChange.emit(T),this.submissionService.changeSubmissionCollection(this.submissionId,g.collection.id),this.processingChange$.next(!1),this.cdr.detectChanges()}))}onClose(){this.collectionDropdown?.reset()}toggled(g){g||this.collectionDropdown?.reset()}}return f.\u0275fac=function(g){return new(g||f)(i.\u0275\u0275directiveInject(i.ChangeDetectorRef),i.\u0275\u0275directiveInject(S.W),i.\u0275\u0275directiveInject(A.w),i.\u0275\u0275directiveInject(k.E),i.\u0275\u0275directiveInject(z.b),i.\u0275\u0275directiveInject(l.J),i.\u0275\u0275directiveInject(V._))},f.\u0275cmp=i.\u0275\u0275defineComponent({type:f,selectors:[["ds-submission-form-collection"]],viewQuery:function(g,T){if(1&g&&i.\u0275\u0275viewQuery(C.CollectionDropdownComponent,5),2&g){let R;i.\u0275\u0275queryRefresh(R=i.\u0275\u0275loadQuery())&&(T.collectionDropdown=R.first)}},inputs:{currentCollectionId:"currentCollectionId",currentDefinition:"currentDefinition",collectionModifiable:"collectionModifiable",submissionId:"submissionId",isReadonly:"isReadonly"},outputs:{collectionChange:"collectionChange"},features:[i.\u0275\u0275NgOnChangesFeature],decls:5,vars:6,consts:[["class","input-group mb-3",4,"ngIf"],["ngbDropdown","","class","btn-group input-group",3,"openChange",4,"ngIf"],[1,"input-group","mb-3"],[1,"input-group-prepend"],[1,"input-group-text"],[1,"input-group-append"],["ngbDropdown","",1,"btn-group","input-group",3,"openChange"],["collectionControls","ngbDropdown"],["id","collectionControlsMenuLabel",1,"input-group-text"],["aria-describedby","collectionControlsMenuLabel","id","collectionControlsMenuButton","
1ngbDropdownToggle","",1,"btn","btn-outline-primary",3,"disabled","blur","click"],[4,"ngIf"],["ngbDropdownMenu","","id","collectionControlsDropdownMenu","aria-labelledby","collectionControlsMenuButton",1,"dropdown-menu","p-0"],[3,"selectionChange"],[1,"fas","fa-circle-notch","fa-spin"]],template:function(g,T){1&g&&(i.\u0275\u0275elementStart(0,"div"),i.\u0275\u0275template(1,d,9,6,"div",0),i.\u0275\u0275pipe(2,"async"),i.\u0275\u0275template(3,F,14,12,"div",1),i.\u0275\u0275pipe(4,"async"),i.\u0275\u0275elementEnd()),2&g&&(i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",!i.\u0275\u0275pipeBind1(2,2,T.available$)),i.\u0275\u0275advance(2),i.\u0275\u0275property("ngIf",i.\u0275\u0275pipeBind1(4,4,T.available$)))},dependencies:[Y.O5,te.jt,te.iD,te.Vi,U.t,Y.Ov,q.X$],styles:[".scrollable-menu[_ngcontent-%COMP%]{height:auto;max-height:var(--ds-dropdown-menu-max-height);overflow-x:hidden}.collection-item[_ngcontent-%COMP%]{border-bottom:var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color)}#collectionControlsDropdownMenu[_ngcontent-%COMP%]{left:0!important}#collectionControlsDropdownMenu[_ngcontent-%COMP%]{outline:0;box-shadow:var(--bs-btn-focus-box-shadow)}"]}),f})()},71532:(ie,W,t)=>{"use strict";t.d(W,{z:()=>q});var i=t(9237),m=t(48358),u=t(53597),e=t(93033),p=t(94056),v=t(45608),s=t(98678),I=t(65706),A=t(35103),z=t(7027),k=t(96342);function S(d,J){if(1&d){const c=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementStart(0,"button",13),s.\u0275\u0275listener("click",function(G){s.\u0275\u0275restoreView(c);const f=s.\u0275\u0275nextContext(2),h=s.\u0275\u0275reference(2);return G.preventDefault(),s.\u0275\u0275resetView(f.confirmDiscard(h))}),s.\u0275\u0275pipe(1,"dsBrowserOnly"),s.\u0275\u0275pipe(2,"async"),s.\u0275\u0275pipe(3,"async"),s.\u0275\u0275element(4,"i",14),s.\u0275\u0275text(5),s.\u0275\u0275pipe(6,"translate"),s.\u0275\u0275elementEnd()}if(2&d){const c=s.\u0275\u0275nextContext(2);s.\u0275\u0275property("disabled",s.\u0275\u0275pipeBind1(2,5,c.processingSaveStatus)||s.\u0275\u0275pipeBind1(3,7,c.processingDepositStatus)),s.\u0275\u0275attribute("data-test",s.\u0275\u0275pipeBind1(1,3,"discard")),s.\u0275\u0275advance(5),s.\u0275\u0275textInterpolate1(" ",s.\u0275\u0275pipeBind1(6,9,"submission.general.discard.submit")," ")}}function C(d,J){1&d&&(s.\u0275\u0275elementStart(0,"span"),s.\u0275\u0275element(1,"i",15),s.\u0275\u0275text(2),s.\u0275\u0275pipe(3,"translate"),s.\u0275\u0275elementEnd()),2&d&&(s.\u0275\u0275advance(2),s.\u0275\u0275textInterpolate1(" ",s.\u0275\u0275pipeBind1(3,1,"submission.general.info.saved")," "))}function l(d,J){1&d&&(s.\u0275\u0275elementStart(0,"span"),s.\u0275\u0275element(1,"i",16),s.\u0275\u0275text(2),s.\u0275\u0275pipe(3,"translate"),s.\u0275\u0275elementEnd()),2&d&&(s.\u0275\u0275advance(2),s.\u0275\u0275textInterpolate1(" ",s.\u0275\u0275pipeBind1(3,1,"submission.general.info.pending-changes")," "))}function D(d,J){1&d&&(s.\u0275\u0275elementStart(0,"div",20),s.\u0275\u0275text(1,"Saving..."),s.\u0275\u0275elementEnd()),2&d&&s.\u0275\u0275styleProp("width","100%")}function j(d,J){1&d&&(s.\u0275\u0275elementStart(0,"div",20),s.\u0275\u0275text(1,"Depositing..."),s.\u0275\u0275elementEnd()),2&d&&s.\u0275\u0275styleProp("width","100%")}function V(d,J){if(1&d&&(s.\u0275\u0275elementStart(0,"div",17)(1,"div",18),s.\u0275\u0275template(2,D,2,2,"div",19),s.\u0275\u0275pipe(3,"async"),s.\u0275\u0275template(4,j,2,2,"div",19),s.\u0275\u0275pipe(5,"async"),s.\u0275\u0275elementEnd()()),2&d){const c=s.\u0275\u0275nextContext(2);s.\u0275\u0275advance(2),s.\u0275\u0275property("ngIf",s.\u0275\u0275pipeBind1(3,2,c.processingSaveStatus)),s.\u0275\u0275advance(2),s.\u0275\u0275property("ngIf",s.\u0275\u0275pipeBind1(5,4,c.processingDepositStatus))}}function Y(d,J){if(1&d){const c=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementStart(0,"button",21),s.\u0275\u0275listener("click",function(G){s.\u0275\u0275restoreView(c);const f=s.\u0275\u0275nextContext(2);return s.\u0275\u0275resetView(f.deposit(G))}),s.\u0275\u0275pipe(1,"dsBrowserOnly"),s.\u0275\u0275pipe(2,"async"),s.\u0275\u0275pipe(3,"async"),s.\u0275\u0275elementStart(4,"span"),s.\u0275\u0275element(5,"i",22),s.\u0275\u0275text(6),s.\u0275\u0275pipe(7,"translate"),s.\u0275\u0275elementEnd()()}if(2&d){const c=s.\u0275\u0275nextContext(2);s.\u0275\u0275property("disabled",s.\u0275\u0275pipeBind1(2,5,c.processingSaveStatus)||s.\u0275\u0275pipeBind1(3,7,c.processingDepositStatus)),s.\u0275\u0275attribute("data-test",s.\u0275\u0275pipeBind1(1,3,"deposit")),s.\u0275\u0275advance(6),s.\u0275\u0275textInterpolate1(" ",s.\u0275\u0275pipeBind1(7,9,"submission.general.deposit"),"")}}function te(d,J){if(1&d){const c=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementStart(0,"div",2)(1,"div",3),s.\u0275\u0275template(2,S,7,11,"button",4),s.\u0275\u0275pipe(3,"async"),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(4,"div",5),s.\u0275\u0275template(5,C,4,3,"span",6),s.\u0275\u0275pipe(6,"async"),s.\u0275\u0275pipe(7,"async"),s.\u0275\u0275pipe(8,"async"),s.\u0275\u0275template(9,l,4,3,"span",6),s.\u0275\u0275pipe(10,"async"),s.\u0275\u0275pipe(11,"async"),s.\u0275\u0275pipe(12,"async"),s.\u0275\u0275template(13,V,6,6,"div",7),s.\u0275\u0275pipe(14,"async"),s.\u0275\u0275pipe(15,"async"),s.\u0275\u0275elementStart(16,"div",8)(17,"button",9),s.\u0275\u0275listener("click",function(G){s.\u0275\u0275restoreView(c);const f=s.\u0275\u0275nextContext();
1return s.\u0275\u0275resetView(f.save(G))}),s.\u0275\u0275pipe(18,"dsBrowserOnly"),s.\u0275\u0275pipe(19,"async"),s.\u0275\u0275pipe(20,"async"),s.\u0275\u0275elementStart(21,"span"),s.\u0275\u0275element(22,"i",10),s.\u0275\u0275text(23),s.\u0275\u0275pipe(24,"translate"),s.\u0275\u0275elementEnd()(),s.\u0275\u0275elementStart(25,"button",11),s.\u0275\u0275listener("click",function(G){s.\u0275\u0275restoreView(c);const f=s.\u0275\u0275nextContext();return s.\u0275\u0275resetView(f.saveLater(G))}),s.\u0275\u0275pipe(26,"async"),s.\u0275\u0275pipe(27,"async"),s.\u0275\u0275pipe(28,"dsBrowserOnly"),s.\u0275\u0275pipe(29,"async"),s.\u0275\u0275pipe(30,"async"),s.\u0275\u0275elementStart(31,"span"),s.\u0275\u0275element(32,"i",10),s.\u0275\u0275text(33),s.\u0275\u0275pipe(34,"translate"),s.\u0275\u0275elementEnd()(),s.\u0275\u0275template(35,Y,8,11,"button",12),s.\u0275\u0275pipe(36,"async"),s.\u0275\u0275elementEnd()()()}if(2&d){const c=s.\u0275\u0275nextContext();s.\u0275\u0275advance(2),s.\u0275\u0275property("ngIf",s.\u0275\u0275pipeBind1(3,15,c.showDepositAndDiscard)),s.\u0275\u0275advance(3),s.\u0275\u0275property("ngIf",!s.\u0275\u0275pipeBind1(6,17,c.hasUnsavedModification)&&!s.\u0275\u0275pipeBind1(7,19,c.processingSaveStatus)&&!s.\u0275\u0275pipeBind1(8,21,c.processingDepositStatus)),s.\u0275\u0275advance(4),s.\u0275\u0275property("ngIf",s.\u0275\u0275pipeBind1(10,23,c.hasUnsavedModification)&&!s.\u0275\u0275pipeBind1(11,25,c.processingSaveStatus)&&!s.\u0275\u0275pipeBind1(12,27,c.processingDepositStatus)),s.\u0275\u0275advance(4),s.\u0275\u0275property("ngIf",s.\u0275\u0275pipeBind1(14,29,c.processingSaveStatus)||s.\u0275\u0275pipeBind1(15,31,c.processingDepositStatus)),s.\u0275\u0275advance(4),s.\u0275\u0275property("disabled",s.\u0275\u0275pipeBind1(19,35,c.processingSaveStatus)||!s.\u0275\u0275pipeBind1(20,37,c.hasUnsavedModification)),s.\u0275\u0275attribute("data-test",s.\u0275\u0275pipeBind1(18,33,"save")),s.\u0275\u0275advance(6),s.\u0275\u0275textInterpolate1(" ",s.\u0275\u0275pipeBind1(24,39,"submission.general.save"),""),s.\u0275\u0275advance(2),s.\u0275\u0275classProp("btn-primary",!s.\u0275\u0275pipeBind1(26,41,c.showDepositAndDiscard))("btn-secondary",s.\u0275\u0275pipeBind1(27,43,c.showDepositAndDiscard)),s.\u0275\u0275property("disabled",s.\u0275\u0275pipeBind1(29,47,c.processingSaveStatus)||s.\u0275\u0275pipeBind1(30,49,c.processingDepositStatus)),s.\u0275\u0275attribute("data-test",s.\u0275\u0275pipeBind1(28,45,"save-for-later")),s.\u0275\u0275advance(8),s.\u0275\u0275textInterpolate1(" ",s.\u0275\u0275pipeBind1(34,51,"submission.general.save-later"),""),s.\u0275\u0275advance(2),s.\u0275\u0275property("ngIf",s.\u0275\u0275pipeBind1(36,53,c.showDepositAndDiscard))}}function U(d,J){if(1&d){const c=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementStart(0,"div",23)(1,"h4",24),s.\u0275\u0275text(2),s.\u0275\u0275pipe(3,"translate"),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(4,"button",25),s.\u0275\u0275listener("click",function(){const f=s.\u0275\u0275restoreView(c).dismiss;return s.\u0275\u0275resetView(f("cancel"))}),s.\u0275\u0275elementStart(5,"span",26),s.\u0275\u0275text(6,"\xd7"),s.\u0275\u0275elementEnd()()(),s.\u0275\u0275elementStart(7,"div",27)(8,"p"),s.\u0275\u0275text(9),s.\u0275\u0275pipe(10,"translate"),s.\u0275\u0275elementEnd()(),s.\u0275\u0275elementStart(11,"div",28)(12,"button",29),s.\u0275\u0275listener("click",function(){const f=s.\u0275\u0275restoreView(c).close;return s.\u0275\u0275resetView(f("cancel"))}),s.\u0275\u0275text(13),s.\u0275\u0275pipe(14,"translate"),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(15,"button",30),s.\u0275\u0275listener("click",function(){const f=s.\u0275\u0275restoreView(c).close;return s.\u0275\u0275resetView(f("ok"))}),s.\u0275\u0275text(16),s.\u0275\u0275pipe(17,"translate"),s.\u0275\u0275elementEnd()()}2&d&&(s.\u0275\u0275advance(2),s.\u0275\u0275textInterpolate(s.\u0275\u0275pipeBind1(3,4,"submission.general.discard.confirm.title")),s.\u0275\u0275advance(7),s.\u0275\u0275textInterpolate(s.\u0275\u0275pipeBind1(10,6,"submission.general.discard.confirm.info")),s.\u0275\u0275advance(4),s.\u0275\u0275textInterpolate(s.\u0275\u0275pipeBind1(14,8,"submission.general.discard.confirm.cancel")),s.\u0275\u0275advance(3),s.\u0275\u0275textInterpolate(s.\u0275\u0275pipeBind1(17,10,"submission.general.discard.confirm.submit")))}let q=(()=>{class d{constructor(c,F,G){this.modalService=c,this.restService=F,this.submissionService=G,this.submissionIsInvalid=(0,i.of)(!0)}ngOnChanges(c){(0,v.UE)(this.submissionId)&&(this.submissionIsInvalid=this.submissionService.getSubmissionStatus(this.submissionId).pipe((0,m.U)(F=>!1===F)),this.processingSaveStatus=this.submissionService.getSubmissionSaveProcessingStatus(this.submissionId),this.processingDepositStatus=this.submissionService.getSubmissionDepositProcessingStatus(this.submissionId),this.showDepositAndDiscard=(0,i.of)(this.submissionService.getSubmissionScope()===p.S.Worksp
1aceItem),this.hasUnsavedModification=this.submissionService.hasUnsavedModification())}save(c){this.submissionService.dispatchSave(this.submissionId,!0)}saveLater(c){this.submissionService.dispatchSaveForLater(this.submissionId)}deposit(c){this.submissionService.dispatchDeposit(this.submissionId)}confirmDiscard(c){this.modalService.open(c).result.then(F=>{"ok"===F&&this.submissionService.dispatchDiscard(this.submissionId)})}}return d.\u0275fac=function(c){return new(c||d)(s.\u0275\u0275directiveInject(I.FF),s.\u0275\u0275directiveInject(u.F),s.\u0275\u0275directiveInject(e.b))},d.\u0275cmp=s.\u0275\u0275defineComponent({type:d,selectors:[["ds-submission-form-footer"]],inputs:{submissionId:"submissionId"},features:[s.\u0275\u0275NgOnChangesFeature],decls:3,vars:1,consts:[["class","row",4,"ngIf"],["content",""],[1,"row"],[1,"col"],["type","button","id","discard","class","btn btn-danger",3,"disabled","click",4,"ngIf"],[1,"col","text-right","d-flex","justify-content-end","align-items-center"],[4,"ngIf"],["class","col d-flex justify-content-end align-items-center",4,"ngIf"],[1,"ml-2","space-children-mr"],["type","button","id","save",1,"btn","btn-secondary",3,"disabled","click"],[1,"fas","fa-save"],["type","button","id","saveForLater",1,"btn",3,"disabled","click"],["type","button","id","deposit","class","btn btn-success",3,"disabled","click",4,"ngIf"],["type","button","id","discard",1,"btn","btn-danger",3,"disabled","click"],[1,"fas","fa-trash"],[1,"fas","fa-check-circle"],[1,"fas","fa-exclamation-circle"],[1,"col","d-flex","justify-content-end","align-items-center"],[1,"progress","w-75"],["class","progress-bar progress-bar-striped progress-bar-animated bg-info","role","progressbar","aria-valuenow","100","aria-valuemin","0","aria-valuemax","100",3,"width",4,"ngIf"],["role","progressbar","aria-valuenow","100","aria-valuemin","0","aria-valuemax","100",1,"progress-bar","progress-bar-striped","progress-bar-animated","bg-info"],["type","button","id","deposit",1,"btn","btn-success",3,"disabled","click"],[1,"fas","fa-plus"],[1,"modal-header"],[1,"modal-title","text-danger"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"modal-footer","space-children-mr"],["type","button","id","discard_cancel",1,"btn","btn-secondary",3,"click"],["type","button","id","discard_submit",1,"btn","btn-danger",3,"click"]],template:function(c,F){1&c&&(s.\u0275\u0275template(0,te,37,55,"div",0),s.\u0275\u0275template(1,U,18,12,"ng-template",null,1,s.\u0275\u0275templateRefExtractor)),2&c&&s.\u0275\u0275property("ngIf",!!F.submissionId)},dependencies:[A.O5,A.Ov,z.g,k.X$]}),d})()},51104:(ie,W,t)=>{"use strict";t.d(W,{i:()=>C});var i=t(48358),m=t(73797),u=t(79849),e=t(93033),p=t(98678),v=t(35103),s=t(65706),I=t(96342);const A=function(l){return{"w-100":l}};function z(l,D){if(1&l&&(p.\u0275\u0275elementContainerStart(0),p.\u0275\u0275elementStart(1,"button",6),p.\u0275\u0275pipe(2,"async"),p.\u0275\u0275text(3),p.\u0275\u0275pipe(4,"translate"),p.\u0275\u0275element(5,"i",7),p.\u0275\u0275elementEnd(),p.\u0275\u0275elementContainerEnd()),2&l){const j=p.\u0275\u0275nextContext();p.\u0275\u0275advance(1),p.\u0275\u0275property("ngClass",p.\u0275\u0275pureFunction1(6,A,p.\u0275\u0275pipeBind1(2,2,j.windowService.isXs()))),p.\u0275\u0275advance(2),p.\u0275\u0275textInterpolate1(" ",p.\u0275\u0275pipeBind1(4,4,"submission.sections.general.add-more")," ")}}function k(l,D){1&l&&(p.\u0275\u0275elementStart(0,"button",8),p.\u0275\u0275text(1),p.\u0275\u0275pipe(2,"translate"),p.\u0275\u0275elementEnd()),2&l&&(p.\u0275\u0275advance(1),p.\u0275\u0275textInterpolate1(" ",p.\u0275\u0275pipeBind1(2,1,"submission.sections.general.no-sections")," "))}function S(l,D){if(1&l){const j=p.\u0275\u0275getCurrentView();p.\u0275\u0275elementStart(0,"button",9),p.\u0275\u0275listener("click",function(){const te=p.\u0275\u0275restoreView(j).$implicit,U=p.\u0275\u0275nextContext();
1return p.\u0275\u0275resetView(U.addSection(te.id))}),p.\u0275\u0275text(1),p.\u0275\u0275pipe(2,"translate"),p.\u0275\u0275elementEnd()}if(2&l){const j=D.$implicit;p.\u0275\u0275advance(1),p.\u0275\u0275textInterpolate1(" ",p.\u0275\u0275pipeBind1(2,1,"submission.sections."+j.header)," ")}}let C=(()=>{class l{constructor(j,V,Y){this.sectionService=j,this.submissionService=V,this.windowService=Y}ngOnInit(){this.sectionList$=this.submissionService.getDisabledSectionsList(this.submissionId),this.hasSections$=this.sectionList$.pipe((0,i.U)(j=>j.length>0))}addSection(j){this.sectionService.addSection(this.submissionId,j)}}return l.\u0275fac=function(j){return new(j||l)(p.\u0275\u0275directiveInject(m.J),p.\u0275\u0275directiveInject(e.b),p.\u0275\u0275directiveInject(u.I3))},l.\u0275cmp=p.\u0275\u0275defineComponent({type:l,selectors:[["ds-submission-form-section-add"]],inputs:{collectionId:"collectionId",submissionId:"submissionId"},decls:10,vars:17,consts:[["ngbDropdown","","placement","bottom-right",1,"d-inline-block",3,"ngClass"],["sectionAdd","ngbDropdown"],[4,"ngIf"],["ngbDropdownMenu","","aria-labelledby","sectionControls",1,"sections-dropdown-menu",3,"ngClass"],["class","dropdown-item disabled",4,"ngIf"],["class","dropdown-item",3,"click",4,"ngFor","ngForOf"],["id","sectionControls","ngbDropdownToggle","",1,"btn","btn-outline-primary","dropdown-toggle",3,"ngClass"],["aria-hidden","true",1,"fa","fa-plus"],[1,"dropdown-item","disabled"],[1,"dropdown-item",3,"click"]],template:function(j,V){1&j&&(p.\u0275\u0275elementStart(0,"div",0,1),p.\u0275\u0275template(2,z,6,8,"ng-container",2),p.\u0275\u0275pipe(3,"async"),p.\u0275\u0275elementStart(4,"div",3),p.\u0275\u0275pipe(5,"async"),p.\u0275\u0275template(6,k,3,3,"button",4),p.\u0275\u0275pipe(7,"async"),p.\u0275\u0275template(8,S,3,3,"button",5),p.\u0275\u0275pipe(9,"async"),p.\u0275\u0275elementEnd()()),2&j&&(p.\u0275\u0275property("ngClass",p.\u0275\u0275pureFunction1(13,A,V.windowService.isXs())),p.\u0275\u0275advance(2),p.\u0275\u0275property("ngIf",p.\u0275\u0275pipeBind1(3,5,V.hasSections$)),p.\u0275\u0275advance(2),p.\u0275\u0275property("ngClass",p.\u0275\u0275pureFunction1(15,A,p.\u0275\u0275pipeBind1(5,7,V.windowService.isXs()))),p.\u0275\u0275advance(2),p.\u0275\u0275property("ngIf",!p.\u0275\u0275pipeBind1(7,9,V.hasSections$)),p.\u0275\u0275advance(2),p.\u0275\u0275property("ngForOf",p.\u0275\u0275pipeBind1(9,11,V.sectionList$)))},dependencies:[v.mk,v.sg,v.O5,s.jt,s.iD,s.Vi,v.Ov,I.X$],styles:[".dropdown-toggle[_ngcontent-%COMP%]:after{display:none}.sections-dropdown-menu[_ngcontent-%COMP%]{z-index:var(--ds-submission-header-z-index)}"]}),l})()},86183:(ie,W,t)=>{"use strict";t.d(W,{G:()=>_e});var i=t(9237),m=t(48358),u=t(9249),e=t(77176),p=t(77007),v=t(49887),s=t(21160),I=t(38123),z=(t(96187),t(18005)),k=t(45608),S=t(22170),C=t(93033),D=(t(13005),t(96289)),j=t(73797),V=t(99043),Y=t(94667),te=t.n(Y),U=t(33194),q=t(75245),d=t(31042),J=t(32924),c=t(98678),F=t(35103),G=t(5476),f=t(87657),h=t(51104),g=t(35273),T=t(71532),R=t(49868),ee=t(51437),B=t(96342);function K(ne,Z){if(1&ne&&(c.\u0275\u0275elementStart(0,"div",22),c.\u0275\u0275element(1,"ds-submission-upload-files",23)(2,"div",24),c.\u0275\u0275elementEnd()),2&ne){const y=c.\u0275\u0275nextContext(2);c.\u0275\u0275advance(1),c.\u0275\u0275property("submissionId",y.submissionId)("collectionId",y.collectionId)("uploadFilesOptions",y.uploadFilesOptions)}}function w(ne,Z){1&ne&&(c.\u0275\u0275elementStart(0,"span",25),c.\u0275\u0275text(1),c.\u0275\u0275pipe(2,"translate"),c.\u0275\u0275elementEnd()),2&ne&&(c.\u0275\u0275advance(1),c.\u0275\u0275textInterpolate(c.\u0275\u0275pipeBind1(2,1,"import-doi.data-not-found")))}function P(ne,Z){if(1&ne){const y=c.\u0275\u0275getCurrentView();c.\u0275\u0275elementContainerStart(0),c.\u0275\u0275elementStart(1,"ds-submission-form-collection",26),c.\u0275\u0275listener("collectionChange",function(X){c.\u0275\u0275restoreView(y);const pe=c.\u0275\u0275nextContext(2);return c.\u0275\u0275resetView(pe.onCollectionChange(X))}),c.\u0275\u0275elementEnd(),c.\u0275\u0275elementContainerEnd()}if(2&ne){const y=c.\u0275\u0275nextContext(2);c.\u0275\u0275advance(1),c.\u0275\u0275property("currentCollectionId",y.collectionId)("currentDefinition",y.definitionId)("submissionId",y.submissionId)("collectionModifiable",y.collectionModifiable)("isReadonly",y.isSectionReadonly)}}const L=function(){return{standalone:!0}};function $(ne,Z){if(1&ne){const y=c.\u0275\u0275getCurrentView();c.\u0275\u0275elementStart(0,"div",6),c.\u0275\u0275template(1,K,3,3,"div",7),c.\u0275\u0275pipe(2,"async"),c.\u0275\u0275elementStart(3,"div",8)(4,"div",9)(5,"div",10)(6,"div",11)(7,"input",12),c.\u0275\u0275listener("ngModelChange",function(X){c.\u0275\u0275restoreView(y);const pe=c.\u0275\u0275nextContext();
1return c.\u0275\u0275resetView(pe.doiValue=X)}),c.\u0275\u0275pipe(8,"translate"),c.\u0275\u0275elementEnd(),c.\u0275\u0275elementStart(9,"button",13),c.\u0275\u0275listener("click",function(){c.\u0275\u0275restoreView(y);const X=c.\u0275\u0275nextContext();return c.\u0275\u0275resetView(X.importByDio())}),c.\u0275\u0275text(10),c.\u0275\u0275pipe(11,"translate"),c.\u0275\u0275elementEnd()(),c.\u0275\u0275elementStart(12,"div",14)(13,"span",15),c.\u0275\u0275text(14),c.\u0275\u0275pipe(15,"translate"),c.\u0275\u0275elementEnd()(),c.\u0275\u0275elementStart(16,"div",16),c.\u0275\u0275template(17,w,3,3,"span",17),c.\u0275\u0275elementEnd()()()(),c.\u0275\u0275elementStart(18,"div",18),c.\u0275\u0275template(19,P,2,5,"ng-container",19),c.\u0275\u0275elementEnd(),c.\u0275\u0275elementStart(20,"div",20),c.\u0275\u0275element(21,"ds-submission-form-section-add",21),c.\u0275\u0275elementEnd()()}if(2&ne){const y=c.\u0275\u0275nextContext();c.\u0275\u0275advance(1),c.\u0275\u0275property("ngIf",c.\u0275\u0275pipeBind1(2,10,y.uploadEnabled$)),c.\u0275\u0275advance(6),c.\u0275\u0275property("placeholder",c.\u0275\u0275pipeBind1(8,12,"import-doi.doi"))("ngModel",y.doiValue)("ngModelOptions",c.\u0275\u0275pureFunction0(18,L)),c.\u0275\u0275advance(3),c.\u0275\u0275textInterpolate1(" ",c.\u0275\u0275pipeBind1(11,14,"import-doi.button.import")," "),c.\u0275\u0275advance(4),c.\u0275\u0275textInterpolate1(" ",c.\u0275\u0275pipeBind1(15,16,"import-doi.type-doi"),""),c.\u0275\u0275advance(3),c.\u0275\u0275property("ngIf",y.doiNotFound),c.\u0275\u0275advance(2),c.\u0275\u0275property("ngIf",!y.isSectionHidden),c.\u0275\u0275advance(2),c.\u0275\u0275property("collectionId",y.collectionId)("submissionId",y.submissionId)}}function E(ne,Z){1&ne&&c.\u0275\u0275element(0,"ds-themed-loading",27)}function Q(ne,Z){if(1&ne&&(c.\u0275\u0275elementContainerStart(0),c.\u0275\u0275element(1,"ds-submission-section-container",28),c.\u0275\u0275elementContainerEnd()),2&ne){const y=Z.$implicit,b=c.\u0275\u0275nextContext();c.\u0275\u0275advance(1),c.\u0275\u0275property("crossrefData",b.crossrefData)("collectionId",b.collectionId)("submissionId",b.submissionId)("sectionData",y)}}function H(ne,Z){if(1&ne&&(c.\u0275\u0275elementStart(0,"div",29),c.\u0275\u0275element(1,"ds-submission-form-footer",30),c.\u0275\u0275elementEnd()),2&ne){const y=c.\u0275\u0275nextContext();c.\u0275\u0275advance(1),c.\u0275\u0275property("submissionId",y.submissionId)}}let _e=(()=>{class ne{constructor(y,b,X,pe,fe,Ee,ve){this.authService=y,this.changeDetectorRef=b,this.halService=X,this.submissionService=pe,this.doiMetadataService=fe,this.cdr=Ee,this.sectionsService=ve,this.doiNotFound=!1,this.crossrefData=null,this.doiValue="",this.collectionModifiable=null,this.loading=(0,i.of)(!0),this.uploadFilesOptions=new S.n,this.subs=[],this.isActive=!0}importByDio(){const y=["dc.subject","dc.description.abstract"],b=["dc.title","dc.contributor.author","dc.language.iso","dc.identifier.issn","dc.identifier.isbn","dc.publisher","dc.date.issued"];this.doiNotFound=!1,this.submissionService.dispatchSave(this.submissionId),this.submissionService.getResultAction([J.tI.SAVE_SUBMISSION_FORM,J.tI.SAVE_SUBMISSION_FORM_ERROR],this.submissionId).subscribe(X=>{X.type!==J.tI.SAVE_SUBMISSION_FORM_ERROR&&this.doiMetadataService.getMetadata(this.doiValue.trim()).pipe((0,m.U)(pe=>pe?.message??null),(0,u.K)(()=>(this.doiNotFound=!0,this.cdr.detectChanges(),(0,i.of)(null)))).subscribe(pe=>{pe?this.submissionSections.pipe((0,e.q)(1)).subscribe(fe=>{const Ee=fe[0],ve=fe[1],Se=this.getSectionData(pe);this.updateCrossref({sections:[{id:Ee.id,metadataAvailable:b},{id:ve.id,metadataAvailable:y}],sectionData:Se}),this.submissionService.dispatchSave(this.submissionId,!0)}):(this.doiNotFound=!0,this.cdr.detectChanges())})})}updateCrossref(y){this.crossrefData={...y},this.cdr.detectChanges()}getSectionData(y){const b=new q.d(y),X=(fe,Ee)=>Array.isArray(fe)?fe.filter(Boolean).map((ve,Se)=>new d.u(ve,void 0,void 0,ve,void 0!==Ee?Ee:Se)):fe?[new d.u(fe)]:[];return{...X(b.getTitleAndSubTitle()).length&&{"dc.title":X(b.getTitleAndSubTitle())},...X(b.getISO2Language()).length&&{"dc.language.iso":X(b.getISO2Language())},...X(b.getSubjects()).length&&{"dc.subject":X(b.getSubjects())},...X(b.getAuthors()).length&&{"dc.contributor.author":X(b.getAuthors())},...X(b.getISSNs()).length&&{"dc.identifier.issn":X(b.getISSNs())},...X(b.getISBNs()).length&&{"dc.identifier.isbn":X(b.getISBNs())},...X(b.getPublisher()).length&&{"dc.publisher":X(b.getPublisher())},...X(b.getAbstract()).length&&{"dc.description.abstract":X(b.getAbstract())},...X(b.getPublishedFullDate()).length&&{"dc.date.issued":X(b.getPublishedFullDate())}}}ngOnChanges(y){y.collectionId&&this.collectionId&&y.submissionId&&this.submissionId&&(this.isActive=!0,this.submissionSections=this.submissionService.getSubmissionObject(this.submissionId).pipe((0,p.h)(()=>this.isActive),(0,m.U)(b=>b.isLoading),(0,m.U)(b=>b),(0,v.x)(),(0,s.w)(b=>b?(0,i.of)([]):this.getSectionsList())),this.uploadEnabled$=this.sectionsService.isSectionTypeAvailable(this.submissionId,D.i.Upload),this.loading=this.submissionService.getSubmissionObject(this.submissionId).pipe((0,p.h)(()=>this.isActive),(0,m.U)(b=>b.isLoading),(0,m.U)(b=>b),(0,v.x)()),this.subs.push(this.halService.getEndpoint(this.submissionService.getSubmissionObjectLinkName()).pipe((0,p.h)(b=>(0,k.UE)(b)),(0,v.x)()).subscribe(b=>{this.uploadFilesOptions.authToken=this.authService.buildAuthHeader(),this.uploadFilesOptions.url=b.concat(`/${this.submissionId}`),this.definitionId=this.submissionDefinition.name,this.submissionService.dispatchInit(this.collectionId,this.submissionId,this.selfUrl,this.submissionDefinition,this.sections,this.item,this.submissionErrors),this.changeDetectorRef.detectChanges()})),this.submissionService.startAutoSave(this.submissionId))}getCollectionVisibility(){const y=this.submissionDefinition.sections.page.find(b=>te()(b.sectionType,D.i.Collection));return(0,k.pT)(y.visibility)?y.visibility:null}get isSectionHidden(){const y=this.getCollectionVisibility();return(0,k.Uh)(y)&&te()(y.main,V.x.HIDDEN)&&te()(y.other,V.x.HIDDEN)}get isSectionReadonly(){const y=this.getCollectionVisibility();return(0,k.Uh)(y)&&te()(y.main,V.x.READONLY)&&te()(y.other,V.x.READONLY)}ngOnDestroy(){this.isActive=!1,this.submissionService.stopAutoSave(),this.submissionService.resetAllSubmissionObjects(),this.subs.filter(y=>
1(0,k.Uh)(y)).forEach(y=>y.unsubscribe())}onCollectionChange(y){this.collectionId=y.collection.id,this.definitionId!==y.submissionDefinition.name?(this.sections=y.sections,this.submissionDefinition=y.submissionDefinition,this.definitionId=this.submissionDefinition.name,this.submissionService.resetSubmissionObject(this.collectionId,this.submissionId,y._links.self.href,this.submissionDefinition,this.sections,this.item)):this.changeDetectorRef.detectChanges()}isLoading(){return this.loading}getSectionsList(){return this.submissionService.getSubmissionSections(this.submissionId).pipe((0,p.h)(y=>(0,k.UE)(y)),(0,m.U)(y=>y.filter(b=>!te()(b.sectionType,D.i.Collection))))}}return ne.\u0275fac=function(y){return new(y||ne)(c.\u0275\u0275directiveInject(I.e8),c.\u0275\u0275directiveInject(c.ChangeDetectorRef),c.\u0275\u0275directiveInject(z.q),c.\u0275\u0275directiveInject(C.b),c.\u0275\u0275directiveInject(U.e),c.\u0275\u0275directiveInject(c.ChangeDetectorRef),c.\u0275\u0275directiveInject(j.J))},ne.\u0275cmp=c.\u0275\u0275defineComponent({type:ne,selectors:[["ds-submission-form"]],inputs:{collectionId:"collectionId",item:"item",collectionModifiable:"collectionModifiable",sections:"sections",submissionErrors:"submissionErrors",selfUrl:"selfUrl",submissionDefinition:"submissionDefinition",submissionId:"submissionId"},features:[c.\u0275\u0275NgOnChangesFeature],decls:10,vars:12,consts:[[1,"container-fluid"],["class","submission-form-header mb-3 d-flex flex-wrap position-sticky",4,"ngIf"],[1,"submission-form-content"],["message","Loading...",4,"ngIf"],[4,"ngFor","ngForOf"],["class","submission-form-footer mt-3 mb-3 position-sticky",4,"ngIf"],[1,"submission-form-header","mb-3","d-flex","flex-wrap","position-sticky"],["class","w-100",4,"ngIf"],[1,"row","justify-content-start"],[1,"col-12"],[1,"doi-import-container"],[1,"d-flex","align-items-center"],["type","text","name","doiValue",1,"form-control","me-2",3,"placeholder","ngModel","ngModelOptions","ngModelChange"],["type","button",1,"btn","btn-primary",3,"click"],[1,"small","mb-1"],[1,"text-muted"],[1,"text-danger","small"],["class","text-danger",4,"ngIf"],[1,"submission-form-header-item","mb-3","mb-sm-0","flex-sm-grow-1","flex-md-grow-0"],[4,"ngIf"],[1,"submission-form-header-item","text-right"],[3,"collectionId","submissionId"],[1,"w-100"],[3,"submissionId","collectionId","uploadFilesOptions"],[1,"clearfix"],[1,"text-danger"],[3,"currentCollectionId","currentDefinition","submissionId","collectionModifiable","isReadonly","collectionChange"],["message","Loading..."],[3,"crossrefData","collectionId","submissionId","sectionData"],[1,"submission-form-footer","mt-3","mb-3","position-sticky"],[3,"submissionId"]],template:function(y,b){1&y&&(c.\u0275\u0275elementStart(0,"div",0),c.\u0275\u0275template(1,$,22,19,"div",1),c.\u0275\u0275pipe(2,"async"),c.\u0275\u0275elementStart(3,"div",2),c.\u0275\u0275template(4,E,1,0,"ds-themed-loading",3),c.\u0275\u0275pipe(5,"async"),c.\u0275\u0275template(6,Q,2,4,"ng-container",4),c.\u0275\u0275pipe(7,"async"),c.\u0275\u0275elementEnd(),c.\u0275\u0275template(8,H,2,1,"div",5),c.\u0275\u0275pipe(9,"async"),c.\u0275\u0275elementEnd()),2&y&&(c.\u0275\u0275advance(1),c.\u0275\u0275property("ngIf",!c.\u0275\u0275pipeBind1(2,4,b.isLoading())),c.\u0275\u0275advance(3),c.\u0275\u0275property("ngIf",c.\u0275\u0275pipeBind1(5,6,b.isLoading())),c.\u0275\u0275advance(2),c.\u0275\u0275property("ngForOf",c.\u0275\u0275pipeBind1(7,8,b.submissionSections)),c.\u0275\u0275advance(2),c.\u0275\u0275property("ngIf",!c.\u0275\u0275pipeBind1(9,10,b.isLoading())))},dependencies:[F.sg,F.O5,G.Fj,G.JJ,G.On,f.Z,h.i,g.z,T.z,R.h,ee.y,F.Ov,B.X$],styles:[".submission-form-header[_ngcontent-%COMP%]{background-color:var(--background);padding:calc(var(--bs-spacer) / 2) 0 calc(var(--bs-spacer) / 2) 0;top:0;z-index:var(--ds-submission-header-z-index)}.submission-form-header-item[_ngcontent-%COMP%]{flex-grow:1}.submission-form-footer[_ngcontent-%COMP%]{border-radius:var(--bs-card-border-radius);bottom:0;background-color:var(--bs-gray-400);padding:calc(var(--bs-spacer) / 2);z-index:var(--ds-submission-footer-z-index)}.btn-link-focus[_ngcontent-%COMP%]{font-weight:400;color:#568;text-decoration:none}.btn-link-focus[_ngcontent-%COMP%]:hover{color:#384359;text-decoration:underline}.btn-link-focus[_ngcontent-%COMP%]:disabled, .btn-link-focus.disabled[_ngcontent-%COMP%]{color:#6c757d;pointer-events:none}.btn-link-focus[_ngcontent-%COMP%]:focus, .btn-link-focus.focus[_ngcontent-%COMP%]{text-decoration:underline}"]}),ne})()},49868:(ie,W,t)=>{"use strict";t.d(W,{h:()=>V});var i=t(9237),m=t(76215),u=t(77176),e=t(73797),p=t(45608),v=t(73716),s=t(93033),I=t(65384),A=t
1(97176),z=t(11915),k=t(96289),S=t(98678),C=t(96342),l=t(35103),D=t(17026);function j(Y,te){if(1&Y){const U=S.\u0275\u0275getCurrentView();S.\u0275\u0275elementStart(0,"ds-uploader",1),S.\u0275\u0275listener("onCompleteItem",function(d){S.\u0275\u0275restoreView(U);const J=S.\u0275\u0275nextContext();return S.\u0275\u0275resetView(J.onCompleteItem(d))})("onUploadError",function(){S.\u0275\u0275restoreView(U);const d=S.\u0275\u0275nextContext();return S.\u0275\u0275resetView(d.onUploadError())}),S.\u0275\u0275elementEnd()}if(2&Y){const U=S.\u0275\u0275nextContext();S.\u0275\u0275property("dropMsg",U.dropMsg)("dropOverDocumentMsg",U.dropOverDocumentMsg)("enableDragOverDocument",U.enableDragOverDocument)("onBeforeUpload",U.onBeforeUpload)("uploadFilesOptions",U.uploadFilesOptions)}}let V=(()=>{class Y{constructor(U,q,d,J,c){this.notificationsService=U,this.operationsService=q,this.sectionService=d,this.submissionService=J,this.translate=c,this.enableDragOverDocument=!0,this.dropOverDocumentMsg="submission.sections.upload.drop-message",this.dropMsg="submission.sections.upload.drop-message",this.subs=[],this.uploadEnabled=(0,i.of)(!1),this.onBeforeUpload=()=>{const F=this.operationsService.jsonPatchByResourceType(this.submissionService.getSubmissionObjectLinkName(),this.submissionId,"sections").subscribe();return this.subs.push(F),F}}ngOnChanges(){this.uploadEnabled=this.sectionService.isSectionTypeAvailable(this.submissionId,k.i.Upload)}onCompleteItem(U){this.subs.push(this.uploadEnabled.pipe((0,m.P)()).subscribe(q=>{if(q){const{sections:d}=U,{errors:J}=U,c=(0,A.Z)(J);d&&(0,p.UE)(d)&&Object.keys(d).forEach(F=>{const G=(0,v.Vv)(d[F]),f=c[F];this.sectionService.isSectionType(this.submissionId,F,k.i.Upload).pipe((0,u.q)(1)).subscribe(h=>{h&&((0,p.xb)(f)?this.notificationsService.success(null,this.translate.get("submission.sections.upload.upload-successful")):this.notificationsService.error(null,this.translate.get("submission.sections.upload.upload-failed")))}),this.sectionService.updateSectionData(this.submissionId,F,G,f,f)})}}))}onUploadError(){this.notificationsService.error(null,this.translate.get("submission.sections.upload.upload-failed"))}ngOnDestroy(){this.subs.filter(U=>(0,p.Uh)(U)).forEach(U=>U.unsubscribe())}}return Y.\u0275fac=function(U){return new(U||Y)(S.\u0275\u0275directiveInject(I.T),S.\u0275\u0275directiveInject(z.E),S.\u0275\u0275directiveInject(e.J),S.\u0275\u0275directiveInject(s.b),S.\u0275\u0275directiveInject(C.sK))},Y.\u0275cmp=S.\u0275\u0275defineComponent({type:Y,selectors:[["ds-submission-upload-files"]],inputs:{collectionId:"collectionId",submissionId:"submissionId",uploadFilesOptions:"uploadFilesOptions"},features:[S.\u0275\u0275NgOnChangesFeature],decls:1,vars:1,consts:[[3,"dropMsg","dropOverDocumentMsg","enableDragOverDocument","onBeforeUpload","uploadFilesOptions","onCompleteItem","onUploadError",4,"ngIf"],[3,"dropMsg","dropOverDocumentMsg","enableDragOverDocument","onBeforeUpload","uploadFilesOptions","onCompleteItem","onUploadError"]],template:function(U,q){1&U&&S.\u0275\u0275template(0,j,1,5,"ds-uploader",0),2&U&&S.\u0275\u0275property("ngIf",q.uploadFilesOptions.url)},dependencies:[l.O5,D.B],encapsulation:2}),Y})()},76890:(ie,W,t)=>{"use strict";t.d(W,{v:()=>l}),t(45123);var m=t(71432),u=t(69637),e=t(93033),p=t(65384),v=t(9925),s=t(98678),I=t(65706),A=t(67522),z=t(35103),k=t(96342);function S(D,j){if(1&D&&(s.\u0275\u0275elementContainerStart(0),s.\u0275\u0275elementStart(1,"span"),s.\u0275\u0275text(2),s.\u0275\u0275elementEnd(),s.\u0275\u0275element(3,"br"),s.\u0275\u0275elementContainerEnd()),2&D){const V=j.$implicit;s.\u0275\u0275advance(2),s.\u0275\u0275textInterpolate(V.value)}}function C(D,j){if(1&D&&(s.\u0275\u0275elementStart(0,"div",5)(1,"p",6)(2,"strong",11),s.\u0275\u0275text(3),s.\u0275\u0275pipe(4,"translate"),s.\u0275\u0275elementEnd(),s.\u0275\u0275element(5,"br"),s.\u0275\u0275template(6,S,4,1,"ng-container",12),s.\u0275\u0275elementEnd()()),2&D){const V=j.$implicit;s.\u0275\u0275advance(3),s.\u0275\u0275textInterpolate(s.\u0275\u0275pipeBind1(4,2,"item.preview."+V.key)),s.\u0275\u0275advance(3),s.\u0275\u0275property("ngForOf",V.values)}}let l=(()=>{class D{constructor(V,Y,te,U,q){this.activeModal=V,this.submissionService=Y,this.modalService=te,this.router=U,this.notificationService=q}ngOnInit(){this.metadataList=[],Object.keys(this.externalSourceEntry.metadata).forEac
1h(Y=>{this.metadataList.push({key:Y,values:m.S.all(this.externalSourceEntry.metadata,Y)})})}closeMetadataModal(){this.activeModal.dismiss(!1)}import(){this.modalRef=this.modalService.open(v.L,{size:"lg"}),this.modalRef.componentInstance.entityType=this.labelPrefix,this.closeMetadataModal(),this.modalRef.componentInstance.selectedEvent.pipe((0,u.z)(V=>this.submissionService.createSubmissionFromExternalSource(this.externalSourceEntry._links.self.href,V.collection.id))).subscribe(V=>{let Y=!1;1===V.length&&null!==V[0]&&(Y=!0,this.router.navigateByUrl("/workspaceitems/"+V[0].id+"/edit")),Y||this.notificationService.error("submission.import-external.preview.error.import.title","submission.import-external.preview.error.import.body"),this.modalRef.close()})}}return D.\u0275fac=function(V){return new(V||D)(s.\u0275\u0275directiveInject(I.Kz),s.\u0275\u0275directiveInject(e.b),s.\u0275\u0275directiveInject(I.FF),s.\u0275\u0275directiveInject(A.F0),s.\u0275\u0275directiveInject(p.T))},D.\u0275cmp=s.\u0275\u0275defineComponent({type:D,selectors:[["ds-submission-import-external-preview"]],inputs:{externalSourceEntry:"externalSourceEntry"},decls:27,vars:10,consts:[[1,"modal-header"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"container"],[1,"row"],[1,"col-md-12"],["class","row",4,"ngFor","ngForOf"],[1,"col-md-12","text-right"],["role","button",1,"btn","btn-success",3,"click"],["aria-hidden","true",1,"fa","fa-file-import"],[1,""],[4,"ngFor","ngForOf"]],template:function(V,Y){1&V&&(s.\u0275\u0275elementStart(0,"div",0)(1,"h2"),s.\u0275\u0275text(2),s.\u0275\u0275pipe(3,"translate"),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(4,"button",1),s.\u0275\u0275listener("click",function(){return Y.closeMetadataModal()}),s.\u0275\u0275elementStart(5,"span",2),s.\u0275\u0275text(6,"\xd7"),s.\u0275\u0275elementEnd()()(),s.\u0275\u0275elementStart(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"p"),s.\u0275\u0275text(12),s.\u0275\u0275pipe(13,"translate"),s.\u0275\u0275elementEnd()()(),s.\u0275\u0275elementStart(14,"div",5)(15,"div",6),s.\u0275\u0275element(16,"hr"),s.\u0275\u0275elementEnd()(),s.\u0275\u0275template(17,C,7,4,"div",7),s.\u0275\u0275elementStart(18,"div",5)(19,"div",6),s.\u0275\u0275element(20,"hr"),s.\u0275\u0275elementEnd()(),s.\u0275\u0275elementStart(21,"div",5)(22,"div",8)(23,"button",9),s.\u0275\u0275listener("click",function(){return Y.import()}),s.\u0275\u0275element(24,"i",10),s.\u0275\u0275text(25),s.\u0275\u0275pipe(26,"translate"),s.\u0275\u0275elementEnd()()()()()),2&V&&(s.\u0275\u0275advance(2),s.\u0275\u0275textInterpolate(s.\u0275\u0275pipeBind1(3,4,"submission.import-external.preview.title."+Y.labelPrefix)),s.\u0275\u0275advance(10),s.\u0275\u0275textInterpolate(s.\u0275\u0275pipeBind1(13,6,"submission.import-external.preview.subtitle")),s.\u0275\u0275advance(5),s.\u0275\u0275property("ngForOf",Y.metadataList),s.\u0275\u0275advance(8),s.\u0275\u0275textInterpolate1(" ",s.\u0275\u0275pipeBind1(26,8,"submission.import-external.preview.button.import")," "))},dependencies:[z.sg,k.X$],styles:[".close[_ngcontent-%COMP%]:focus{outline:none!important}"]}),D})()},8019:(ie,W,t)=>{"use strict";t.d(W,{p:()=>c});var i=t(98678),m=t(9237),u=t(9249),e=t(27303),p=t(5803),v=t(74304),s=t(20942),I=t(87483),A=t(41121),z=t(10572),k=t(79849),S=t(45608),C=t(6144),l=t(35103),D=t(5476),j=t(60235),V=t(65706),Y=t(96342);function te(F,G){if(1&F){const f=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div",10)(1,"input",11),i.\u0275\u0275listener("keyup.enter",function(){i.\u0275\u0275restoreView(f);const g=i.\u0275\u0275nextContext();return i.\u0275\u0275resetView(""===g.searchString?null:g.search())})("ngModelChange",function(g){i.\u0275\u0275restoreView(f);const T=i.\u0275\u0275nextContext();return i.\u0275\u0275resetView(T.searchString=g)}),i.\u0275\u0275pipe(2,"translate"),i.\u0275\u0275pipe(3,"translate"),i.\u0275\u0275elementEnd()()}if(2&F){const f=i.\u0275\u0275nextContext();i.\u0275\u0275advance(1),i.\u0275\u0275propertyInterpolate("placeholder",i.\u0275\u0275pipeBind1(2,3,"submission.import-external.search.placeholder")),i.\u0275\u0275property("ngModel",f.searchString),i.\u0275\u0275attribute("aria-label",i.\u0275\u0275pipeBind1(3,5,"submission.import-external.search.placeholder"))}}function U(F,G){if(1&F){const f=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"input",11),i.\u0275\u0275listener("keyup.enter",function(){i.\u0275\u0275restoreView(f);const g=i.\u0275\u0275nextContext();
1return i.\u0275\u0275resetView(""===g.searchString?null:g.search())})("ngModelChange",function(g){i.\u0275\u0275restoreView(f);const T=i.\u0275\u0275nextContext();return i.\u0275\u0275resetView(T.searchString=g)}),i.\u0275\u0275pipe(1,"translate"),i.\u0275\u0275pipe(2,"translate"),i.\u0275\u0275elementEnd()}if(2&F){const f=i.\u0275\u0275nextContext();i.\u0275\u0275propertyInterpolate("placeholder",i.\u0275\u0275pipeBind1(1,3,"submission.import-external.search.placeholder")),i.\u0275\u0275property("ngModel",f.searchString),i.\u0275\u0275attribute("aria-label",i.\u0275\u0275pipeBind1(2,5,"submission.import-external.search.placeholder"))}}function q(F,G){if(1&F){const f=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"button",12),i.\u0275\u0275listener("click",function(){const T=i.\u0275\u0275restoreView(f).$implicit,R=i.\u0275\u0275nextContext();return i.\u0275\u0275resetView(R.makeSourceSelection(T))}),i.\u0275\u0275text(1),i.\u0275\u0275pipe(2,"translate"),i.\u0275\u0275elementEnd()}if(2&F){const f=G.$implicit;i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate(i.\u0275\u0275pipeBind1(2,1,"submission.import-external.source."+(null==f?null:f.name)))}}function d(F,G){1&F&&(i.\u0275\u0275elementStart(0,"div",13)(1,"p"),i.\u0275\u0275text(2),i.\u0275\u0275pipe(3,"translate"),i.\u0275\u0275elementEnd()()),2&F&&(i.\u0275\u0275advance(2),i.\u0275\u0275textInterpolate(i.\u0275\u0275pipeBind1(3,1,"submission.import-external.source.loading")))}const J=function(F){return{"input-group-append":F}};let c=(()=>{class F{constructor(f,h,g){this.externalService=f,this.cdr=h,this.windowService=g,this.sourceListLoading=!1,this.externalSourceData=new i.EventEmitter}ngOnInit(){this.selectedElement={id:"",name:"loading"},this.searchString="",this.sourceList=[],this.findListOptions=Object.assign({},new C.R,{elementsPerPage:5,currentPage:1,searchParams:[new p.g("entityType",this.initExternalSourceData.entity)]}),this.externalService.searchBy("findByEntityType",this.findListOptions).pipe((0,u.K)(()=>{const f=new I.S,h=(0,s.b)(f,[]),g=(0,A.AC)(h);return(0,m.of)(g)}),(0,z.Gp)()).subscribe(f=>{f.page.forEach(h=>{this.sourceList.push({id:h.id,name:h.name}),this.initExternalSourceData.sourceId===h.id&&(this.selectedElement={id:h.id,name:h.name},this.searchString=this.initExternalSourceData.query)}),""===this.selectedElement.id&&(this.selectedElement=this.sourceList[0]),this.pageInfo=f.pageInfo,this.cdr.detectChanges()}),this.isXsOrSm$=this.windowService.isXsOrSm()}makeSourceSelection(f){this.selectedElement=f}onScroll(){!this.sourceListLoading&&this.pageInfo.currentPage+1<=this.pageInfo.totalPages&&(this.sourceListLoading=!0,this.findListOptions=Object.assign({},new C.R,{elementsPerPage:5,currentPage:this.findListOptions.currentPage+1,searchParams:[new p.g("entityType",this.initExternalSourceData.entity)]}),this.externalService.searchBy("findByEntityType",this.findListOptions).pipe((0,u.K)(()=>{const f=new I.S,h=(0,s.b)(f,[]),g=(0,A.AC)(h);return(0,m.of)(g)}),(0,z.xw)(),(0,e.b)(()=>this.sourceListLoading=!1)).subscribe(f=>{f.payload.page.forEach(h=>{this.sourceList.push({id:h.id,name:h.name})}),this.pageInfo=f.payload.pageInfo,this.cdr.detectChanges()}))}search(){this.externalSourceData.emit({entity:this.initExternalSourceData.entity,sourceId:this.selectedElement.id,query:this.searchString})}ngOnDestroy(){(0,S.Uh)(this.sub)&&this.sub.unsubscribe()}}return F.\u0275fac=function(f){return new(f||F)(i.\u0275\u0275directiveInject(v.G),i.\u0275\u0275directiveInject(i.ChangeDetectorRef),i.\u0275\u0275directiveInject(k.I3))},F.\u0275cmp=i.\u0275\u0275defineComponent({type:F,selectors:[["ds-submission-import-external-searchbar"]],inputs:{initExternalSourceData:"initExternalSourceData"},outputs:{externalSourceData:"externalSourceData"},decls:20,vars:32,consts:[["class","input-group mb-2",4,"ngIf"],[1,"input-group","mb-5"],["type","text","class","form-control",3,"ngModel","placeholder","keyup.enter","ngModelChange",4,"ngIf"],["ngbDropdown","","role","group",3,"ngClass"],["ngbDropdownToggle","",1,"btn","btn-outline-secondary","w-fx",3,"title"],["ngbDropdownMenu","","aria-haspopup","true","aria-expanded","fal
1se",1,"dropdown-menu","scrollable-dropdown-menu","w-100"],["infiniteScroll","",1,"scrollable-menu",3,"infiniteScrollDistance","infiniteScrollThrottle","scrollWindow","scrolled"],["ngbDropdownItem","","class","dropdown-item text-truncate",3,"click",4,"ngFor","ngForOf"],["ngbDropdownItem","","class","scrollable-dropdown-loading text-center",4,"ngIf"],["type","button",1,"btn","btn-primary",3,"title","disabled","click"],[1,"input-group","mb-2"],["type","text",1,"form-control",3,"ngModel","placeholder","keyup.enter","ngModelChange"],["ngbDropdownItem","",1,"dropdown-item","text-truncate",3,"click"],["ngbDropdownItem","",1,"scrollable-dropdown-loading","text-center"]],template:function(f,h){1&f&&(i.\u0275\u0275template(0,te,4,7,"div",0),i.\u0275\u0275pipe(1,"async"),i.\u0275\u0275elementStart(2,"div",1),i.\u0275\u0275template(3,U,3,7,"input",2),i.\u0275\u0275pipe(4,"async"),i.\u0275\u0275elementStart(5,"div",3),i.\u0275\u0275pipe(6,"async"),i.\u0275\u0275elementStart(7,"button",4),i.\u0275\u0275pipe(8,"translate"),i.\u0275\u0275pipe(9,"translate"),i.\u0275\u0275text(10),i.\u0275\u0275pipe(11,"translate"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(12,"ul",5)(13,"li",6),i.\u0275\u0275listener("scrolled",function(){return h.onScroll()}),i.\u0275\u0275template(14,q,3,3,"button",7),i.\u0275\u0275template(15,d,4,3,"div",8),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(16,"button",9),i.\u0275\u0275listener("click",function(){return h.search()}),i.\u0275\u0275pipe(17,"translate"),i.\u0275\u0275text(18),i.\u0275\u0275pipe(19,"translate"),i.\u0275\u0275elementEnd()()()),2&f&&(i.\u0275\u0275property("ngIf",i.\u0275\u0275pipeBind1(1,14,h.isXsOrSm$)),i.\u0275\u0275advance(3),i.\u0275\u0275property("ngIf",!i.\u0275\u0275pipeBind1(4,16,h.isXsOrSm$)),i.\u0275\u0275advance(2),i.\u0275\u0275property("ngClass",i.\u0275\u0275pureFunction1(30,J,!i.\u0275\u0275pipeBind1(6,18,h.isXsOrSm$))),i.\u0275\u0275advance(2),i.\u0275\u0275propertyInterpolate("title",i.\u0275\u0275pipeBind1(9,22,"submission.import-external.search.source.hint")),i.\u0275\u0275attribute("aria-label",i.\u0275\u0275pipeBind1(8,20,"submission.import-external.search.source.hint")),i.\u0275\u0275advance(3),i.\u0275\u0275textInterpolate1(" ",i.\u0275\u0275pipeBind1(11,24,"submission.import-external.source."+(null==h.selectedElement?null:h.selectedElement.name))," "),i.\u0275\u0275advance(3),i.\u0275\u0275property("infiniteScrollDistance",2)("infiniteScrollThrottle",50)("scrollWindow",!1),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngForOf",h.sourceList),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",h.sourceListLoading),i.\u0275\u0275advance(1),i.\u0275\u0275property("title",""===h.searchString?i.\u0275\u0275pipeBind1(17,26,"submission.import-external.search.button.hint"):"")("disabled",""===h.searchString),i.\u0275\u0275advance(2),i.\u0275\u0275textInterpolate(i.\u0275\u0275pipeBind1(19,28,"submission.import-external.search.button")))},dependencies:[l.mk,l.sg,l.O5,D.Fj,D.JJ,D.On,j.Ry,V.jt,V.iD,V.Vi,V.TH,l.Ov,Y.X$],styles:[".input-group-append[_ngcontent-%COMP%]:last-child > .btn[_ngcontent-%COMP%]:not(:last-child):not(.dropdown-toggle){margin-left:-1px;border-radius:0 .25rem .25rem 0}.input-group-append[_ngcontent-%COMP%]   .dropdown-toggle[_ngcontent-%COMP%]{border-radius:0}
1.w-fx[_ngcontent-%COMP%]{min-width:200px}.scrollable-menu[_ngcontent-%COMP%]{height:auto;max-height:calc(var(--ds-dropdown-menu-max-height) / 2);overflow-x:hidden}.scrollable-dropdown-loading[_ngcontent-%COMP%]{height:calc(var(--bs-spacer) * 2)!important}.scrollable-dropdown-loading[_ngcontent-%COMP%]{background-color:var(--bs-primary);color:#fff;line-height:calc(var(--bs-spacer) * 2);position:sticky;bottom:0}"]}),F})()},10251:(ie,W,t)=>{"use strict";t.r(W),t.d(W,{SubmissionImportExternalComponent:()=>ne});var i=t(35841),m=t(53426),u=t(77176),e=t(77007),p=t(21160),v=t(27303),s=t(69637),I=t(74304),A=t(20942),z=t(27496),k=t(97462),S=t(45180),C=t(74997),l=t(41121),D=t(76890),j=t(58106),V=t(87483),Y=t(45608),te=t(10572),U=t(44205),q=t(60987),d=t(98678),J=t(67522),c=t(65706),F=t(35103),G=t(87586),f=t(87657),h=t(12955),g=t(41966),T=t(8019),R=t(96342);function ee(Z,y){1&Z&&(d.\u0275\u0275elementStart(0,"h2"),d.\u0275\u0275text(1),d.\u0275\u0275pipe(2,"translate"),d.\u0275\u0275elementEnd()),2&Z&&(d.\u0275\u0275advance(1),d.\u0275\u0275textInterpolate(d.\u0275\u0275pipeBind1(2,1,"submission.sections.describe.relationship-lookup.selection-tab.title")))}const B=function(Z,y){return{repeatable:Z,listId:y}};function K(Z,y){if(1&Z){const b=d.\u0275\u0275getCurrentView();d.\u0275\u0275elementStart(0,"ds-viewable-collection",15),d.\u0275\u0275listener("importObject",function(pe){d.\u0275\u0275restoreView(b);const fe=d.\u0275\u0275nextContext(4);return d.\u0275\u0275resetView(fe.import(pe))}),d.\u0275\u0275elementEnd()}if(2&Z){const b=d.\u0275\u0275nextContext().ngVar,X=d.\u0275\u0275nextContext(3);d.\u0275\u0275property("@fadeIn",void 0)("objects",b)("selectionConfig",d.\u0275\u0275pureFunction2(8,B,X.repeatable,X.listId))("config",X.initialPagination)("hideGear",!0)("context",X.context)("importable",!0)("importConfig",X.importConfig)}}
1function w(Z,y){1&Z&&(d.\u0275\u0275element(0,"ds-themed-loading",16),d.\u0275\u0275pipe(1,"translate")),2&Z&&d.\u0275\u0275propertyInterpolate("message",d.\u0275\u0275pipeBind1(1,1,"loading.search-results"))}function P(Z,y){if(1&Z&&(d.\u0275\u0275elementStart(0,"div",17)(1,"ds-alert",18),d.\u0275\u0275text(2),d.\u0275\u0275pipe(3,"translate"),d.\u0275\u0275elementEnd()()),2&Z){const b=d.\u0275\u0275nextContext(4);d.\u0275\u0275advance(1),d.\u0275\u0275property("type",b.AlertType.Info),d.\u0275\u0275advance(1),d.\u0275\u0275textInterpolate(d.\u0275\u0275pipeBind1(3,2,"search.results.empty"))}}function L(Z,y){if(1&Z&&(d.\u0275\u0275elementStart(0,"div",19)(1,"ds-alert",18),d.\u0275\u0275text(2),d.\u0275\u0275pipe(3,"translate"),d.\u0275\u0275elementEnd()()),2&Z){const b=d.\u0275\u0275nextContext(4);d.\u0275\u0275advance(1),d.\u0275\u0275property("type",b.AlertType.Info),d.\u0275\u0275advance(1),d.\u0275\u0275textInterpolate(d.\u0275\u0275pipeBind1(3,2,"search.results.response.500"))}}function $(Z,y){if(1&Z&&(d.\u0275\u0275elementContainerStart(0),d.\u0275\u0275template(1,ee,3,3,"h2",10),d.\u0275\u0275template(2,K,1,11,"ds-viewable-collection",11),d.\u0275\u0275pipe(3,"async"),d.\u0275\u0275template(4,w,2,3,"ds-themed-loading",12),d.\u0275\u0275pipe(5,"async"),d.\u0275\u0275template(6,P,4,4,"div",13),d.\u0275\u0275pipe(7,"async"),d.\u0275\u0275template(8,L,4,4,"div",14),d.\u0275\u0275pipe(9,"async"),d.\u0275\u0275elementContainerEnd()),2&Z){const b=y.ngVar,X=d.\u0275\u0275nextContext(3);d.\u0275\u0275advance(1),d.\u0275\u0275property("ngIf",b&&0!==(null==b||null==b.payload||null==b.payload.page?null:b.payload.page.length)),d.\u0275\u0275advance(1),d.\u0275\u0275property("ngIf",(null==b?null:b.hasSucceeded)&&!d.\u0275\u0275pipeBind1(3,5,X.isLoading$)&&(null==b||null==b.payload||null==b.payload.page?null:b.payload.page.length)>0),d.\u0275\u0275advance(2),d.\u0275\u0275property("ngIf",d.\u0275\u0275pipeBind1(5,7,X.isLoading$)),d.\u0275\u0275advance(2),d.\u0275\u0275property("ngIf",!d.\u0275\u0275pipeBind1(7,9,X.isLoading$)&&0===(null==b||null==b.payload||null==b.payload.page?null:b.payload.page.length)),d.\u0275\u0275advance(2),d.\u0275\u0275property("ngIf",!d.\u0275\u0275pipeBind1(9,11,X.isLoading$)&&500===b.statusCode)}}function E(Z,y){if(1&Z&&(d.\u0275\u0275elementStart(0,"div",2),d.\u0275\u0275template(1,$,10,13,"ng-container",9),d.\u0275\u0275pipe(2,"async"),d.\u0275\u0275elementEnd()),2&Z){const b=d.\u0275\u0275nextContext(2);d.\u0275\u0275advance(1),d.\u0275\u0275property("ngVar",d.\u0275\u0275pipeBind1(2,1,b.entriesRD$))}}function Q(Z,y){if(1&Z&&(d.\u0275\u0275elementStart(0,"div",2)(1,"ds-alert",18)(2,"p",20),d.\u0275\u0275text(3),d.\u0275\u0275pipe(4,"translate"),d.\u0275\u0275elementEnd()()()),2&Z){const b=d.\u0275\u0275nextContext(2);d.\u0275\u0275advance(1),d.\u0275\u0275property("type",b.AlertType.Info),d.\u0275\u0275advance(2),d.\u0275\u0275textInterpolate(d.\u0275\u0275pipeBind1(4,2,"submission.import-external.page.hint"))}}function H(Z,y){if(1&Z&&(d.\u0275\u0275elementStart(0,"div",1),d.\u0275\u0275template(1,E,3,3,"div",8),d.\u0275\u0275template(2,Q,5,4,"div",8),d.\u0275\u0275elementEnd()),2&Z){const b=d.\u0275\u0275nextContext();d.\u0275\u0275advance(1),d.\u0275\u0275property("ngIf",""!==b.reload$.value.sourceId),d.\u0275\u0275advance(1),d.\u0275\u0275property("ngIf",""===b.reload$.value.sourceId)}}const _e=function(){return["/mydspace"]};let ne=(()=>{class Z{constructor(b,X,pe,fe,Ee){this.searchConfigService=b,this.externalService=X,this.routeService=pe,this.router=fe,this.modalService=Ee,this.entriesRD$=new i.X(null),this.isLoading$=new i.X(!1),this.reload$=new i.X({entity:"",query:"",sourceId:""}),this.initialPagination=Object.assign(new S.r,{id:"spc",pageSize:10}),this.subs=[],this.AlertType=q.N}ngOnInit(){this.listId="list-submission-external-sources",this.context=k._.EntitySearchModalWithNameVariants,this.repeatable=!1,this.routeData={entity:"",sourceId:"",query:""},this.importConfig={buttonLabel:"submission.sections.describe.relationship-lookup.external-source.import-button-title."+this.label},this.entriesRD$=new i.X((0,l.AC)((0,A.b)(new V.S,[]))),this.isLoading$=new i.X(!1),this.subs.push((0,m.a)([this.routeService.getQueryParameterValue("entity"),this.routeService.getQueryParameterValue("sourceId"),this.routeService.getQueryParameterValue("query")]).pipe((0,u.q)(1)).subscribe(([b,X,pe])=>{this.reload$.next({entity:b||U.N,query:pe,sourceId:X}
1),this.selectLabel(b),this.retrieveExternalSources()}))}getExternalSourceData(b){this.router.navigate([],{queryParams:b,replaceUrl:!0}).then(()=>{this.reload$.next(b),this.retrieveExternalSources()})}import(b){this.modalRef=this.modalService.open(D.v,{size:"lg"});const X=this.modalRef.componentInstance;X.externalSourceEntry=b,X.labelPrefix=this.label}ngOnDestroy(){this.subs.filter(b=>(0,Y.Uh)(b)).forEach(b=>b.unsubscribe()),(0,Y.Uh)(this.retrieveExternalSourcesSub)&&this.retrieveExternalSourcesSub.unsubscribe()}retrieveExternalSources(){(0,Y.Uh)(this.retrieveExternalSourcesSub)&&this.retrieveExternalSourcesSub.unsubscribe(),this.retrieveExternalSourcesSub=this.reload$.pipe((0,e.h)(b=>(0,Y.UE)(b.sourceId)&&(0,Y.UE)(b.query)),(0,p.w)(b=>{const X=b.query;return this.routeData=b,this.searchConfigService.paginatedSearchOptions.pipe((0,v.b)(()=>this.isLoading$.next(!0)),(0,e.h)(pe=>pe.query===X),(0,s.z)(pe=>this.externalService.getExternalSourceEntries(this.routeData.sourceId,pe).pipe((0,te.sJ)())))})).subscribe(b=>{this.entriesRD$.next(b),this.isLoading$.next(!1)})}selectLabel(b){this.label=b,this.importConfig={buttonLabel:"submission.sections.describe.relationship-lookup.external-source.import-button-title."+this.label}}}return Z.\u0275fac=function(b){return new(b||Z)(d.\u0275\u0275directiveInject(z.U),d.\u0275\u0275directiveInject(I.G),d.\u0275\u0275directiveInject(C.MZ),d.\u0275\u0275directiveInject(J.F0),d.\u0275\u0275directiveInject(c.FF))},Z.\u0275cmp=d.\u0275\u0275defineComponent({type:Z,selectors:[["ds-submission-import-external"]],decls:15,vars:10,consts:[[1,"container"],[1,"row"],[1,"col-md-12"],["id","header",1,"pb-2"],[3,"initExternalSourceData","externalSourceData"],["class","row",4,"ngIf"],["role","button",1,"btn","btn-outline-secondary",3,"routerLink"],["aria-hidden","true",1,"fa","fa-chevron-left"],["class","col-md-12",4,"ngIf"],[4,"ngVar"],[4,"ngIf"],[3,"objects","selectionConfig","config","hideGear","context","importable","importConfig","importObject",4,"ngIf"],[3,"message",4,"ngIf"],["data-test","empty-external-entry-list",4,"ngIf"],["data-test","empty-external-error-500",4,"ngIf"],[3,"objects","selectionConfig","config","hideGear","context","importable","importConfig","importObject"],[3,"message"],["data-test","empty-external-entry-list"],[3,"type"],["data-test","empty-external-error-500"],[1,"lead","mb-0"]],template:function(b,X){1&b&&(d.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),d.\u0275\u0275text(4),d.\u0275\u0275pipe(5,"translate"),d.\u0275\u0275elementEnd(),d.\u0275\u0275elementStart(6,"ds-submission-import-external-searchbar",4),d.\u0275\u0275listener("externalSourceData",function(fe){return X.getExternalSourceData(fe)}
1),d.\u0275\u0275elementEnd()()(),d.\u0275\u0275template(7,H,3,2,"div",5),d.\u0275\u0275elementStart(8,"div",1)(9,"div",2),d.\u0275\u0275element(10,"hr"),d.\u0275\u0275elementStart(11,"a",6),d.\u0275\u0275element(12,"i",7),d.\u0275\u0275text(13),d.\u0275\u0275pipe(14,"translate"),d.\u0275\u0275elementEnd()()()()),2&b&&(d.\u0275\u0275advance(4),d.\u0275\u0275textInterpolate(d.\u0275\u0275pipeBind1(5,5,"submission.import-external.title"+(X.label?"."+X.label:""))),d.\u0275\u0275advance(2),d.\u0275\u0275property("initExternalSourceData",X.reload$.value),d.\u0275\u0275advance(1),d.\u0275\u0275property("ngIf",X.reload$.value.entity),d.\u0275\u0275advance(4),d.\u0275\u0275property("routerLink",d.\u0275\u0275pureFunction0(9,_e)),d.\u0275\u0275advance(2),d.\u0275\u0275textInterpolate1(" ",d.\u0275\u0275pipeBind1(14,7,"submission.import-external.back-to-my-dspace")," "))},dependencies:[F.O5,J.rH,G.w,f.Z,h.c,g.g,T.p,F.Ov,R.X$],data:{animation:[j.Ji]}}),Z})()},13873:(ie,W,t)=>{"use strict";t.d(W,{i:()=>p});var i=t(4682),m=t(98678);function u(v,s){}const e=["*"];let p=(()=>{class v extends i.F{getComponentName(){return"SubmissionImportExternalComponent"}importThemedComponent(I){return t(49252)(`./${I}/app/submission/import-external/submission-import-external.component`)}importUnthemedComponent(){return Promise.resolve().then(t.bind(t,10251))}}return v.\u0275fac=function(){let s;return function(A){return(s||(s=m.\u0275\u0275getInheritedFactory(v)))(A||v)}}(),v.\u0275cmp=m.\u0275\u0275defineComponent({type:v,selectors:[["ds-themed-submission-import-external"]],features:[m.\u0275\u0275InheritDefinitionFeature],ngContentSelectors:e,decls:5,vars:0,consts:[["vcr",""],["content",""]],template:function(I,A){1&I&&(m.\u0275\u0275projectionDef(),m.\u0275\u0275template(0,u,0,0,"ng-template",null,0,m.\u0275\u0275templateRefExtractor),m.\u0275\u0275elementStart(2,"div",null,1),m.\u0275\u0275projection(4),m.\u0275\u0275elementEnd())},encapsulation:2}),v})()},51437:(ie,W,t)=>{"use strict";t.d(W,{y:()=>f});var i=t(98678),m=t(32931),u=t(76297),e=t(60987),p=t(35841),v=t(35103),s=t(87586),I=t(65706),A=t(96342);const z=["sectionRef"];function k(h,g){1&h&&(i.\u0275\u0275element(0,"i",18),i.\u0275\u0275pipe(1,"translate"),i.\u0275\u0275pipe(2,"translate")),2&h&&(i.\u0275\u0275propertyInterpolate("title",i.\u0275\u0275pipeBind1(1,2,"submission.sections.status.warnings.title")),i.\u0275\u0275attribute("aria-label",i.\u0275\u0275pipeBind1(2,4,"submission.sections.status.warnings.aria")))}function S(h,g){1&h&&(i.\u0275\u0275element(0,"i",19),i.\u0275\u0275pipe(1,"translate"),i.\u0275\u0275pipe(2,"translate")),2&h&&(i.\u0275\u0275propertyInterpolate("title",i.\u0275\u0275pipeBind1(1,2,"submission.sections.status.errors.title")),i.\u0275\u0275attribute("aria-label",i.\u0275\u0275pipeBind1(2,4,"submission.sections.status.errors.aria")))}function C(h,g){1&h&&(i.\u0275\u0275element(0,"i",20),i.\u0275\u0275pipe(1,"translate"),i.\u0275\u0275pipe(2,"translate")),2&h&&(i.\u0275\u0275propertyInterpolate("title",i.\u0275\u0275pipeBind1(1,2,"submission.sections.status.valid.title")),i.\u0275\u0275attribute("aria-label",i.\u0275\u0275pipeBind1(2,4,"submission.sections.status.valid.aria")))}function l(h,g){1&h&&(i.\u0275\u0275element(0,"i",21),i.\u0275\u0275pipe(1,"translate"),i.\u0275\u0275pipe(2,"translate")),2&h&&(i.\u0275\u0275propertyInterpolate("title",i.\u0275\u0275pipeBind1(1,2,"submission.sections.status.info.title")),i.\u0275\u0275attribute("aria-label",i.\u0275\u0275pipeBind1(2,4,"submission.sections.status.info.aria")))}const D=function(h){return{"text-white":h}};function j(h,g){if(1&h&&i.\u0275\u0275element(0,"span",22),2&h){i.\u0275\u0275nextContext(3);const T=i.\u0275\u0275reference(1);i.\u0275\u0275property("ngClass",i.\u0275\u0275pureFunction1(1,D,T.isInfo()))}}function V(h,g){1&h&&i.\u0275\u0275element(0,"span",23)}function Y(h,g){if(1&h){const T=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"a",24),i.\u0275\u0275listener("click",function(ee){i.\u0275\u0275restoreView(T);const B=i.\u0275\u0275nextContext(3);return i.\u0275\u0275resetView(B.removeSection(ee))}),i.\u0275\u0275element(1,"i",25),i.\u0275\u0275elementEnd()}}const te=function(h){return{sectionHeader:h}};function U(h,g){if(1&h&&(i.\u0275\u0275elementStart(0,"span",8),i.\u0275\u0275text(1),i.\u0275\u0275pipe(2,"translate"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(3,"div",9),i.\u0275\u0275template(4,k,3,6,"i",10),i.\u0275\u0275pipe(5,"async"),i.\u0275\u0275template(6,S,3,6,"i",11),i.\u0275\u0275template(7,C,3,6,"i",12),i.\u0275\u0275pipe(8,"async"),i.\u0275\u0275template(9,l,3,6,"i",13),i.\u0275\u0275elementStart(10,"a",14),i.\u0275\u0275pipe(11,"translate"),i.\u0275\u0275pipe(12,"translate"),i.\u0275\u0275pipe(13,"translate"),i.\u0275\u0275template(14,j,1,3,"span",15),i.\u0275\u0275template(15,V,1,0,"span",16),i.\u0275\u0275elementEnd(),i.\u0275\u0275template(16,Y,2,0,"a",17),i.\u0275\u0275elementEnd()),2&h){const T=i.\u0275\u0275nextContext(2),R=i.\u0275\u0275reference(1);i.\u0275\u0275property("ngClass",i.\u0275\u0275pureFunction1(24,D,R.isInfo())),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate(i.\u0275\u0275pipeBind1(2,11,"submission.sections."+T.sectionData.header)),i.\u0275\u0275advance(3),i.\u0275\u0275property("ngIf",!i.\u0275\u0275pipeBind1(5,13,R.isValid())&&!R.hasErrors()&&!R.isInfo()),i.\u0275\u0275advance(2),i.\u0275\u0275property("ngIf",R.hasErrors()&&!R.isInfo()),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",i.\u0275\u0275pipeBind1(8,15,R.isValid())&&!R.hasErrors()&&!R.isInfo()),i.\u0275\u0275advance(2),i.\u0275\u0275property("ngIf",R.isInfo()),i.\u0275\u0275advance(1),i.\u0275\u0275property("title",i.\u0275\u0275pipeBind1(13,22,R.isOpen()?"submission.sections.toggle.close"
1:"submission.sections.toggle.open")),i.\u0275\u0275attribute("aria-label",i.\u0275\u0275pipeBind2(11,17,R.isOpen()?"submission.sections.toggle.aria.close":"submission.sections.toggle.aria.open",i.\u0275\u0275pureFunction1(26,te,i.\u0275\u0275pipeBind1(12,20,"submission.sections."+T.sectionData.header)))),i.\u0275\u0275advance(4),i.\u0275\u0275property("ngIf",R.isOpen()),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",!R.isOpen()),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",!R.isMandatory())}}function q(h,g){if(1&h){const T=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"ds-alert",31),i.\u0275\u0275listener("close",function(){const B=i.\u0275\u0275restoreView(T).index;i.\u0275\u0275nextContext(4);const K=i.\u0275\u0275reference(1);return i.\u0275\u0275resetView(K.removeError(B))}),i.\u0275\u0275elementEnd()}if(2&h){const T=g.$implicit,R=i.\u0275\u0275nextContext(4);i.\u0275\u0275property("content",T)("dismissible",!0)("type",R.AlertTypeEnum.Error)}}function d(h,g){if(1&h&&(i.\u0275\u0275elementStart(0,"div",29),i.\u0275\u0275template(1,q,1,3,"ds-alert",30),i.\u0275\u0275elementEnd()),2&h){const T=i.\u0275\u0275nextContext(3),R=i.\u0275\u0275reference(1);i.\u0275\u0275propertyInterpolate1("id","sectionGenericError_",T.sectionData.id,""),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngForOf",R.getErrors())}}function J(h,g){1&h&&i.\u0275\u0275elementContainer(0)}function c(h,g){if(1&h){const T=i.\u0275\u0275getCurrentView();i.\u0275\u0275template(0,d,2,2,"div",26),i.\u0275\u0275elementStart(1,"div",27),i.\u0275\u0275listener("click",function(ee){i.\u0275\u0275restoreView(T),i.\u0275\u0275nextContext(2);const B=i.\u0275\u0275reference(1);return i.\u0275\u0275resetView(B.setFocus(ee))}),i.\u0275\u0275template(2,J,1,0,"ng-container",28),i.\u0275\u0275elementEnd()}if(2&h){const T=i.\u0275\u0275nextContext(2),R=i.\u0275\u0275reference(1);i.\u0275\u0275property("ngIf",R.hasGenericErrors()),i.\u0275\u0275advance(1),i.\u0275\u0275propertyInterpolate1("id","sectionContent_",T.sectionData.id,""),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngComponentOutlet",T.getSectionContent())("ngComponentOutletInjector",T.objectInjector)}}function F(h,g){if(1&h){const T=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"ngb-accordion",3,4),i.\u0275\u0275listener("panelChange",function(ee){i.\u0275\u0275restoreView(T),i.\u0275\u0275nextContext();const B=i.\u0275\u0275reference(1);return i.\u0275\u0275resetView(B.sectionChange(ee))}),i.\u0275\u0275elementStart(2,"ngb-panel",5),i.\u0275\u0275template(3,U,17,28,"ng-template",6),i.\u0275\u0275template(4,c,3,4,"ng-template",7),i.\u0275\u0275elementEnd()()}if(2&h){const T=i.\u0275\u0275nextContext(),R=i.\u0275\u0275reference(1);i.\u0275\u0275propertyInterpolate("activeIds",T.sectionData.id),i.\u0275\u0275property("destroyOnHide",!1),i.\u0275\u0275advance(2),i.\u0275\u0275propertyInterpolate("id",T.sectionData.id),i.\u0275\u0275property("type",R.isInfo()?"info":"")}}const G=function(h){return{"section-focus":h}};let f=(()=>{class h{constructor(T){this.injector=T,this.crossrefSubject=new p.X(null),this.crossrefData=null,this.AlertTypeEnum=e.N}ngOnInit(){this.objectInjector=i.Injector.create({providers:[{provide:"collectionIdProvider",useFactory:()=>this.collectionId,deps:[]},{provide:"sectionDataProvider",useFactory:()=>this.sectionData,deps:[]},{provide:"submissionIdProvider",useFactory:()=>this.submissionId,deps:[]},{provide:"crossrefDataProvider",useFactory:()=>this.crossrefSubject,deps:[]}],parent:this.injector})}removeSection(T){T.preventDefault(),T.stopPropagation(),this.sectionRef.removeSection(this.submissionId,this.sectionData.id)}ngOnChanges(T){T.crossrefData&&this.crossrefSubject.next(this.crossrefData??null)}getSectionContent(){return(0,u.A)(this.sectionData.sectionType)}}return h.\u0275fac=function(T){return new(T||h)(i.\u0275\u0275directiveInject(i.Injector))},h.\u0275cmp=i.\u0275\u0275defineComponent({type:h,selectors:[["ds-submission-section-container"]],viewQuery:function(T,R){if(1&T&&i.\u0275\u0275viewQuery(z,5),2&T){let ee;i.\u0275\u0275queryRefresh(ee=i.\u0275\u0275loadQuery())&&(R.sectionRef=ee.first)}},inputs:{crossrefData:"crossrefData",collectionId:"collectionId",sectionData:"sectionData",submissionId:"submissionId"},features:[i.\u0275\u0275NgOnChangesFeature],decls:4,vars:11,consts:[["dsSection","",3,"ngClass","mandatory","submissionId","sectionType","sectionId"],["sectionRef","sectionRef"],[3,"activeIds","destroyOnHide","panelChange",4,"ngIf"],[3,"activeIds","destroyOnHide","panelChange"],["acc","ngbAccordion"],[3,"id","type"],["ngbPanelTitle",""],["ngbPanelContent",""],["tabindex","0",1,"float-left","section-title",3,"ngClass"],[1,"d-inline-block","float-right"],["class","fas fa-exclamation-circle text-warning mr-3","role","img",3,"title",4,"ngIf"],["class","fas fa-exclamation-circle text-danger mr-3","role","img",3,"title",4,"ngIf"],["class","fas fa-check-circle text-success mr-3","role","img",3,"title",4,"ngIf"],["class","fas fa-info-circle mr-3 text-white","role","img",3,"title",4,"ngIf"],["tabindex","0","role","button",1,"close",3,"title"],["class","fas fa-chevron-up fa-fw",3,"ngClass",4,"ngIf"],["class","fas fa-chevron-down fa-fw",4,"ngIf"],["href","javascript:void(0);","class","close mr-3",3,"click",4,"ngIf"],["role","img",1,"fas","fa-exclamation-circle","text-warning","mr-3",3,"title"],["role","img",1,"fas","fa-exclamation-circle","text-danger","mr-3",3,"title"],["role","img",1,"fas","fa-check-circle","text-success","mr-3",3,"title"],["role","img",1,"fas","fa-info-circle","mr-3","text-white",3,"title"],[1,"fas","fa-chevron-up","fa-fw",3,"ngClass"],[1,"fas","fa-chevron-down","fa-fw"],["href","javascript:void(0);",1,"close","mr-3",3,"click"],["aria-hidden","true","tabindex","0",1,"fas","fa-tras
1h-o"],[3,"id",4,"ngIf"],[3,"id","click"],[4,"ngComponentOutlet","ngComponentOutletInjector"],[3,"id"],[3,"content","dismissible","type","close",4,"ngFor","ngForOf"],[3,"content","dismissible","type","close"]],template:function(T,R){if(1&T&&(i.\u0275\u0275elementStart(0,"div",0,1),i.\u0275\u0275template(2,F,5,4,"ngb-accordion",2),i.\u0275\u0275pipe(3,"async"),i.\u0275\u0275elementEnd()),2&T){const ee=i.\u0275\u0275reference(1);i.\u0275\u0275property("ngClass",i.\u0275\u0275pureFunction1(9,G,ee.isSectionActive()))("mandatory",R.sectionData.mandatory)("submissionId",R.submissionId)("sectionType",R.sectionData.sectionType)("sectionId",R.sectionData.id),i.\u0275\u0275attribute("id","section_"+R.sectionData.id),i.\u0275\u0275advance(2),i.\u0275\u0275property("ngIf",i.\u0275\u0275pipeBind1(3,7,ee.isEnabled()))}},dependencies:[v.mk,v.$G,v.sg,v.O5,s.w,I.gY,I.Gk,I.Cu,I.gW,m.y,v.Ov,A.X$],styles:["[_nghost-%COMP%]     .card{margin-bottom:var(--ds-submission-sections-margin-bottom);overflow:unset}.section-focus[_ngcontent-%COMP%]{border-radius:var(--bs-border-radius);box-shadow:var(--bs-btn-focus-box-shadow)}[_nghost-%COMP%]     .card:first-of-type{border-bottom:var(--bs-card-border-width) solid var(--bs-card-border-color)!important;border-bottom-left-radius:var(--bs-card-border-radius)!important;border-bottom-right-radius:var(--bs-card-border-radius)!important}[_nghost-%COMP%]     .card-header button{box-shadow:none!important}[_nghost-%COMP%]     .card-header button{width:100%}"]}),h})()},79900:(ie,W,t)=>{"use strict";t.d(W,{v:()=>p});var i=t(77007),m=t(9302),u=t(45608),e=t(98678);let p=(()=>{class v{constructor(I,A,z){this.injectedCollectionId=I,this.injectedSectionData=A,this.injectedSubmissionId=z,this.collectionId=I,this.sectionData=A,this.submissionId=z}ngOnInit(){this.onSectionInit(),this.updateSectionStatus()}updateSectionStatus(){this.sectionStatusSub=this.getSectionStatus().pipe((0,i.h)(I=>(0,u.pT)(I)),(0,m.O)(!0)).subscribe(I=>{this.sectionService.setSectionStatus(this.submissionId,this.sectionData.id,I)})}ngOnDestroy(){(0,u.Uh)(this.sectionStatusSub)&&this.sectionStatusSub.unsubscribe(),this.onSectionDestroy()}}return v.\u0275fac=function(I){return new(I||v)(e.\u0275\u0275directiveInject("collectionIdProvider"),e.\u0275\u0275directiveInject("sectionDataProvider"),e.\u0275\u0275directiveInject("submissionIdProvider"))},v.\u0275cmp=e.\u0275\u0275defineComponent({type:v,selectors:[["ds-section-model"]],decls:0,vars:0,template:function(I,A){},encapsulation:2}),v})()},76297:(ie,W,t)=>{"use strict";t.d(W,{A:()=>u,E:()=>m});const i=new Map;function m(e){return function(v){v&&i.set(e,v)}}function u(e){return i.get(e)}},96289:(ie,W,t)=>{"use strict";t.d(W,{i:()=>i});var i=(()=>{return(m=i||(i={})).Relationships="relationships",m.SubmissionForm="submission-form",m.Upload="upload",m.License="license",m.CcLicense="cclicense",m.collection="collection",m.AccessesCondition="accessCondition",m.SherpaPolicies="sherpaPolicy",m.Identifiers="identifiers",m.Collection="collection",i;var m})()},32931:(ie,W,t)=>{"use strict";t.d(W,{y:()=>A});var i=t(48358),m=t(75004),u=t.n(m),e=t(73797),p=t(45608),v=t(14297),s=t(93033),I=t(98678);let A=(()=>{class z{constructor(S,C,l){this.changeDetectorRef=S,this.submissionService=C,this.sectionService=l,this.mandatory=!0,this.genericSectionErrors=[],this.allSectionErrors=[],this.active=!0,this.sectionState=this.mandatory,this.subs=[]}ngOnInit(){this.valid=this.sectionService.isSectionValid(this.submissionId,this.sectionId).pipe((0,i.U)(S=>(S&&this.resetErrors(),S))),this.subs.push(this.sectionService.getShownSectionErrors(this.submissionId,this.sectionId,this.sectionType).subscribe(S=>{(0,p.UE)(S)?S.forEach(C=>{(0,v.Z)(C.path).forEach(D=>{D.fieldId?this.allSectionErrors.push(C.message):this.genericSectionErrors=u()(this.genericSectionErrors.concat(C.message))})}):this.resetErrors()}),this.submissionService.getActiveSectionId(this.submissionId).subscribe(S=>{const C=this.active;this.active=S===this.sectionId,C!==this.active&&(this.changeDetectorRef.detectChanges(),!this.active&&(0,p.K0)(S)&&this.submissionService.dispatchSave(this.submissionId))})),this.enabled=this.sectionService.isSectionEnabled(this.submissionId,this.sectionId)}ngOnDestroy(){this.subs.filter(S=>
1(0,p.Uh)(S)).forEach(S=>S.unsubscribe())}sectionChange(S){this.sectionState=S.nextState}isOpen(){return this.sectionState}isMandatory(){return this.mandatory}isSectionActive(){return this.active}isEnabled(){return this.enabled}isValid(){return this.valid}removeSection(S,C){this.sectionService.removeSection(S,C)}hasGenericErrors(){return this.genericSectionErrors&&this.genericSectionErrors.length>0}hasErrors(){return this.genericSectionErrors&&this.genericSectionErrors.length>0||this.allSectionErrors&&this.allSectionErrors.length>0}getErrors(){return this.genericSectionErrors}setFocus(S){this.active||this.submissionService.setActiveSection(this.submissionId,this.sectionId)}isInfo(){return this.sectionService.getIsInformational(this.sectionType)}removeError(S){this.genericSectionErrors.splice(S)}resetErrors(){(0,p.UE)(this.genericSectionErrors)&&this.sectionService.dispatchRemoveSectionErrors(this.submissionId,this.sectionId),this.genericSectionErrors=[],this.allSectionErrors=[]}}return z.\u0275fac=function(S){return new(S||z)(I.\u0275\u0275directiveInject(I.ChangeDetectorRef),I.\u0275\u0275directiveInject(s.b),I.\u0275\u0275directiveInject(e.J))},z.\u0275dir=I.\u0275\u0275defineDirective({type:z,selectors:[["","dsSection",""]],inputs:{mandatory:"mandatory",sectionId:"sectionId",sectionType:"sectionType",submissionId:"submissionId"},exportAs:["sectionRef"]}),z})()},73797:(ie,W,t)=>{"use strict";t.d(W,{J:()=>T});var i=t(53426),m=t(48358),u=t(49887),e=t(69637),p=t(77007),v=t(77176),s=t(54385),I=t.n(s),A=t(34045),z=t.n(A),k=t(94667),S=t.n(k),C=t(45608),l=t(32924),D=t(86769),j=t(94056),V=t(14297),Y=t(64405),te=t(65384),U=t(93033),q=t(96289),d=t(73716),J=t(5737),c=t(4786),F=t(60030),G=t(98678),f=t(18603),h=t(89702),g=t(96342);let T=(()=>{class R{constructor(B,K,w,P,L,$){this.formService=B,this.notificationsService=K,this.scrollToService=w,this.submissionService=P,this.store=L,this.translate=$}checkSectionErrors(B,K,w,P,L=[]){if((0,C.xb)(P))this.store.dispatch(new l.QC(B,K)),this.store.dispatch(new Y.y5(w));else if(!S()(P,L)){const $=[];P.forEach(E=>{(0,V.Z)(E.path).forEach(H=>{H.fieldId&&(this.formService.addError(w,H.fieldId,H.fieldIndex,E.message),$.push(H.fieldId))})}),L.forEach(E=>{(0,V.Z)(E.path).forEach(H=>{H.fieldId&&($.includes(H.fieldId)||this.formService.removeError(w,H.fieldId,H.fieldIndex))})})}}dispatchRemoveSectionErrors(B,K){this.store.dispatch(new l.QC(B,K))}dispatchSetSectionFormId(B,K,w){this.store.dispatch(new l.re(B,K,w))}getSectionData(B,K,w){return this.store.select((0,D.y5)(B,K)).pipe((0,m.U)(P=>w===q.i.SubmissionForm?(0,d.Vv)(P):P),(0,u.x)())}getShownSectionErrors(B,K,w){let P;return P=w!==q.i.SubmissionForm?this.getSectionErrors(B,K):this.getSectionState(B,K,w).pipe((0,e.z)(L=>this.formService.getFormErrors(L.formId).pipe((0,m.U)($=>{const E=new F.K("sections",K),Q=$.map(H=>({path:E.getPath(H.fieldId.replace(/\_/g,".")).path,message:H.message})).filter(H=>-1===I()(L.errorsToShow,{path:H.path}));return[...L.errorsToShow,...Q]})))),P}getSectionErrors(B,K){return this.store.select((0,D.Mb)(B,K)).pipe((0,u.x)())}getSectionServerErrors(B,K){return this.store.select((0,D.fh)(B,K)).pipe((0,u.x)())}getSectionState(B,K,w){return this.store.select((0,D.gd)(B,K)).pipe((0,p.h)(P=>(0,C.Uh)(P)),(0,m.U)(P=>P),(0,m.U)(P=>(0,C.Uh)(P.data)&&w===q.i.SubmissionForm?Object.assign({},P,{data:(0,d.Vv)(P.data)}):P),(0,u.x)())}isSectionValid(B,K){return this.store.select((0,D.gd)(B,K)).pipe((0,p.h)(w=>(0,C.Uh)(w)),(0,m.U)(w=>w.isValid),(0,u.x)())}isSectionActive(B,K){return this.submissionService.getActiveSectionId(B).pipe((0,m.U)(w=>K===w),(0,u.x)())}isSectionEnabled(B,K){return this.store.select((0,D.gd)(B,K)).pipe((0,p.h)(w=>(0,C.Uh)(w)),(0,m.U)(w=>w.enabled),(0,u.x)())}isSectionReadOnly(B,K,w){return this.store.select((0,D.gd)(B,K)).pipe((0,p.h)(P=>(0,C.Uh)(P)),(0,m.U)(P=>(0,C.UE)(P.visibility)&&("READONLY"===P.visibility.other&&w!==j.S.WorkspaceItem||"READONLY"===P.visibility.main&&w===j.S.WorkspaceItem)),(0,u.x)())}isSectionAvailable(B,K){return this.store.select((0,D.ak)(B)).pipe((0,p.h)(w=>(0,C.pT)(w)),(0,m.U)(w=>
1(0,C.pT)(w.sections)&&(0,C.pT)(w.sections[K])),(0,u.x)())}isSectionTypeAvailable(B,K){return this.store.select((0,D.ak)(B)).pipe((0,p.h)(w=>(0,C.pT)(w)),(0,m.U)(w=>(0,C.pT)(w.sections)&&(0,C.pT)(z()(w.sections,{sectionType:K}))),(0,u.x)())}isSectionType(B,K,w){return this.store.select((0,D.ak)(B)).pipe((0,p.h)(P=>(0,C.pT)(P)),(0,m.U)(P=>(0,C.pT)(P.sections)&&(0,C.pT)(P.sections[K])&&P.sections[K].sectionType===w),(0,u.x)())}addSection(B,K){this.store.dispatch(new l.gn(B,K)),this.scrollToService.scrollTo({target:K,offset:-70})}removeSection(B,K){this.store.dispatch(new l.s0(B,K))}updateSectionData(B,K,w,P=[],L=[],$){if((0,C.UE)(w)){const E=this.isSectionAvailable(B,K),Q=this.isSectionEnabled(B,K);(0,i.a)(E,Q).pipe((0,v.q)(1),(0,p.h)(([H,_e])=>H)).subscribe(([H,_e])=>{this.store.dispatch(new l.z6(B,K,w,P,L,$))})}}setSectionError(B,K,w){this.store.dispatch(new l.uO(B,K,w))}setSectionStatus(B,K,w){this.store.dispatch(new l.hx(B,K,w))}computeSectionConfiguredMetadata(B){const K=[],w="string"==typeof B?JSON.parse(B,J.WMN):B;return w.rows&&!(0,C.xb)(w.rows)&&w.rows.forEach(P=>{P.fields&&!(0,C.xb)(P.fields)&&P.fields.forEach(L=>{L.selectableMetadata&&!(0,C.xb)(L.selectableMetadata)&&L.selectableMetadata.forEach($=>{K.includes($.metadata)||K.push($.metadata)})})}),K}getIsInformational(B){return B===q.i.SherpaPolicies}}return R.\u0275fac=function(B){return new(B||R)(G.\u0275\u0275inject(c.o),G.\u0275\u0275inject(te.T),G.\u0275\u0275inject(f.ij),G.\u0275\u0275inject(U.b),G.\u0275\u0275inject(h.yh),G.\u0275\u0275inject(g.sK))},R.\u0275prov=G.\u0275\u0275defineInjectable({token:R,factory:R.\u0275fac}),R})()},89360:(ie,W,t)=>{"use strict";t.d(W,{O:()=>k});var i=t(66154),m=t(30303),u=t(45608),e=t(8842),p=t(98678),v=t(35103);function s(S,C){if(1&S&&(p.\u0275\u0275elementStart(0,"span",3),p.\u0275\u0275text(1),p.\u0275\u0275elementEnd()),2&S){const l=p.\u0275\u0275nextContext().$implicit;p.\u0275\u0275advance(1),p.\u0275\u0275textInterpolate3(" ",l.name," ",l.startDate," ",l.endDate," ")}}function I(S,C){if(1&S&&(p.\u0275\u0275elementStart(0,"span",3),p.\u0275\u0275text(1),p.\u0275\u0275elementEnd()),2&S){const l=p.\u0275\u0275nextContext().$implicit;p.\u0275\u0275advance(1),p.\u0275\u0275textInterpolate2("",l.name," from ",l.endDate,"")}}function A(S,C){if(1&S&&(p.\u0275\u0275elementStart(0,"span",4),p.\u0275\u0275text(1),p.\u0275\u0275elementEnd()),2&S){const l=p.\u0275\u0275nextContext().$implicit;p.\u0275\u0275advance(1),p.\u0275\u0275textInterpolate2("",l.name," until ",l.startDate,"")}}function z(S,C){if(1&S&&(p.\u0275\u0275elementContainerStart(0),p.\u0275\u0275template(1,s,2,3,"span",1),p.\u0275\u0275template(2,I,2,2,"span",1),p.\u0275\u0275template(3,A,2,2,"span",2),p.\u0275\u0275element(4,"br"),p.\u0275\u0275elementContainerEnd()),2&S){const l=C.$implicit;p.\u0275\u0275advance(1),p.\u0275\u0275property("ngIf","DEFAULT_BITSTREAM_READ"==l.action),p.\u0275\u0275advance(1),p.\u0275\u0275property("ngIf","lease"==l.name),p.\u0275\u0275advance(1),p.\u0275\u0275property("ngIf","embargo"==l.name)}}let k=(()=>{class S{constructor(l,D){this.dsoNameService=l,this.groupService=D,this.accessConditionsList=[]}ngOnInit(){this.accessConditions.forEach(l=>{(0,u.xb)(l.name)?this.groupService.findByHref(l._links.group.href).pipe((0,i.s)(D=>!D.isResponsePending&&D.hasSucceeded)).subscribe(D=>{const j=D.payload,V=Object.assign({},l);V.name=this.dsoNameService.getName(j),this.accessConditionsList.push(V)}):this.accessConditionsList.push(l)})}}return S.\u0275fac=function(l){return new(l||S)(p.\u0275\u0275directiveInject(e._),p.\u0275\u0275directiveInject(m.O))},S.\u0275cmp=p.\u0275\u0275defineComponent({type:S,selectors:[["ds-submission-section-upload-access-conditions"]],inputs:{accessConditions:"accessConditions"},decls:1,vars:1,consts:[[4,"ngFor","ngForOf"],["class","badge badge-primary mt-3 mr-2",4,"ngIf"],["class","badge badge-dark mt-3 mr-2",4,"ngIf"],[1,"badge","badge-primary","mt-3","mr-2"],[1,"badge","badge-dark","mt-3","mr-2"]],template:function(l,D){1&l&&p.\u0275\u0275template(0,z,5,3,"ng-container",0),2&l&&p.\u0275\u0275property("ngForOf",D.accessConditionsList)},dependencies:[v.sg,v.O5],encapsulation:2}),S})()},56152:(ie,W,t)=>{"use strict";t.d(W,{e:()=>B});var i=t(5737),m=t(39662);const u={id:"metadata",group:[]},e={element:{container:"form-group",label:"col-form-label"},grid:{label:"col-sm-3"}},p={id:"accessConditionGroup",group:[]},v={element:{host:"form-group access-condition-group col",container:"pl-1 pr-1",control:"form-row "}},s={id:"accessConditions",groupFactory:null},I={grid:{group:"form-row pt-4"}}
1,A={id:"name",label:"submission.sections.upload.form.access-condition-label",hint:"submission.sections.upload.form.access-condition-hint",options:[]},z={element:{host:"col-12",label:"col-form-label name-label"}},k={id:"startDate",label:"submission.sections.upload.form.from-label",hint:"submission.sections.upload.form.from-hint",placeholder:"submission.sections.upload.form.from-placeholder",inline:!1,toggleIcon:"far fa-calendar-alt",relations:[{match:i.O6Y,operator:i.F8e,when:[]}],required:!0,validators:{required:null},errorMessages:{required:"submission.sections.upload.form.date-required-from"}},S={element:{label:"col-form-label"},grid:{host:"col-6"}},C={id:"endDate",label:"submission.sections.upload.form.until-label",hint:"submission.sections.upload.form.until-hint",placeholder:"submission.sections.upload.form.until-placeholder",inline:!1,toggleIcon:"far fa-calendar-alt",relations:[{match:i.O6Y,operator:i.F8e,when:[]}],required:!0,validators:{required:null},errorMessages:{required:"submission.sections.upload.form.date-required-until"}},l={element:{label:"col-form-label"},grid:{host:"col-6"}};var D=t(50123),j=t(45608),V=t(93033),Y=t(4786),te=t(82485),U=t(77176),q=t(77007),d=t(69637),J=t(710),c=t(78187),F=t(11915),G=t(53113),f=t(98678),h=t(65706),g=t(35103),T=t(96342);const R=["formRef"];function ee(K,w){if(1&K){const P=f.\u0275\u0275getCurrentView();f.\u0275\u0275elementStart(0,"ds-form",6,7),f.\u0275\u0275listener("submitForm",function(){f.\u0275\u0275restoreView(P);const $=f.\u0275\u0275nextContext();return f.\u0275\u0275resetView($.onSubmit())})("cancel",function(){f.\u0275\u0275restoreView(P);const $=f.\u0275\u0275nextContext();return f.\u0275\u0275resetView($.onModalClose())})("dfChange",function($){f.\u0275\u0275restoreView(P);const E=f.\u0275\u0275nextContext();return f.\u0275\u0275resetView(E.onChange($))}),f.\u0275\u0275elementEnd()}if(2&K){const P=f.\u0275\u0275nextContext();f.\u0275\u0275property("formId",P.formId)("formModel",P.formModel)("displaySubmit",!P.isSaving)("displayCancel",!P.isSaving)}}let B=(()=>{class K{constructor(P,L,$,E,Q,H,_e,ne){this.activeModal=P,this.cdr=L,this.formBuilderService=$,this.formService=E,this.submissionService=Q,this.operationsBuilder=H,this.operationsService=_e,this.uploadService=ne,this.formMetadata=[],this.isSaving=!1,this.subscriptions=[]}initModelData(P){this.fileData.accessConditions.forEach((L,$)=>{Array.of("name","startDate","endDate").filter(E=>L.hasOwnProperty(E)&&(0,j.UE)(L[E])).forEach(E=>{const Q=this.formBuilderService.findById(E,P,$);if(Q)if(Q.type===i.VId){const H=new Date(L[E]);Q.value={year:H.getUTCFullYear(),month:H.getUTCMonth()+1,day:H.getUTCDate()}}else Q.value=L[E]})})}onChange(P){"name"===P.model.id&&this.setOptions(P.model,P.control)}onModalClose(){this.activeModal.dismiss()}onSubmit(){this.isSaving=!0,this.saveBitstreamData()}setOptions(P,L){let $=null;if(this.availableAccessConditionOptions.filter(E=>E.name===L.value).forEach(E=>$=E),(0,j.UE)($)){const E=L.parent.get("startDate"),Q=L.parent.get("endDate");E?.markAsUntouched(),Q?.markAsUntouched(),E?.setValue(null),L.parent.markAsDirty(),Q?.setValue(null)}}ngOnInit(){this.fileData&&this.formId&&(this.formModel=this.buildFileEditForm(),this.cdr.detectChanges())}ngOnDestroy(){this.unsubscribeAll()}retrieveValueFromField(P){const L=Array.isArray(P)?P[0]:P;return L?L.value:void 0}buildFileEditForm(){const P=Object.assign({},this.configMetadataForm.rows[0].fields[0]);P.repeatable=!1;const L=Object.assign({},this.configMetadataForm,{fields:Object.assign([],this.configMetadataForm.rows[0].fields[0],[this.configMetadataForm.rows[0].fields[0],P])}),$=[],E=Object.assign({},u);E.group=this.formBuilderService.modelFromConfiguration(this.submissionId,L,this.collectionId,this.fileData.metadata,this.submissionService.getSubmissionScope()),$.push(new i.S_O(E,e));const Q=Object.assign({},A),H=Object.assign({},s),_e=[];if(this.collectionPolicyType===D.B1){for(const ve of this.availableAccessConditionOptions)_e.push({label:ve.name,value:ve.name});Q.options=_e;const ne=[],Z=[];let y,b;this.availableAccessConditionOptions.forEach(ve=>{if(ve.hasStartDate&&(ne.push({id:"name",value:ve.name}),ve.maxStartDate)){const Se=new Date(ve.maxStartDate);y={year:Se.getUTCFullYear(),month:Se.getUTCMonth()+1,day:Se.getUTCDate()}}if(ve.hasEndDate&&(Z.push({id:"name",value:ve.name}),ve.maxEndDate)){const Se=new Date(ve.maxEndDate);b={year:Se.getUTCFullYear(),month:Se.getUTCMonth()+1,day:Se.getUTCDate()}}});const X={relations:[{match:i.O6Y,operator:i.F8e,when:ne}]},pe={relations:[{match:i.O6Y,operator:i.F8e,when:Z}]},fe=ne.length>0,Ee=Z.length>0;H.groupFactory=()=>{const ve=new i.nMt(Q,z),Se=Object.assign({},k,X);y&&(Se.max=y);const me=Object.assign({},C,pe);b&&(me.max=b);const Ke=new i.oqv(Se,S),Ie=new i.oqv(me,l),ye=Object.assign({},p);return ye.group=[ve],fe&&ye.group.push(Ke),Ee&&ye.group.push(Ie),[new i.S_O(ye,v)]},H.initialCount=(0,j.UE)(this.fileData.accessConditions)?this.fileData.accessConditions.length:1,$.push(new i.RRz(H,I))}return this.initModelData($),$}saveBitstreamData(){this.formService.validateAllFormFields(this.formRef.formGroup);const P=this.formService.isValid(this.formId).pipe((0,U.q)(1),(0,q.h)(L=>L),(0,d.z)(()=>this.formService.getFormData(this.formId)),(0,U.q)(1),(0,d.z)(L=>{Object.keys(L.metadata).filter(E=>
1(0,j.UE)(L.metadata[E])).forEach(E=>{const H=`metadata/${E.replace(/_/g,".")}`;this.operationsBuilder.add(this.pathCombiner.getPath(H),L.metadata[E],!0)}),Object.keys(this.fileData.metadata).filter(E=>(0,j.UE)(this.fileData.metadata[E])).filter(E=>(0,j.xI)(L.metadata[E])).filter(E=>this.formMetadata.includes(E)).forEach(E=>{const H=`metadata/${E.replace(/_/g,".")}`;this.operationsBuilder.remove(this.pathCombiner.getPath(H))});const $=[];return L.hasOwnProperty("accessConditions")&&L.accessConditions.filter(E=>(0,j.K0)(E)).map(E=>E.accessConditionGroup).filter(E=>(0,j.UE)(E)).forEach(E=>{let Q;if(this.availableAccessConditionOptions.filter(H=>(0,j.K0)(E.name)&&H.name===E.name[0].value).forEach(H=>Q=H),Q){const H=Object.assign({},E);if(H.name=this.retrieveValueFromField(E.name),Q.hasStartDate){if(E.startDate){const _e=this.retrieveValueFromField(E.startDate);let ne=new Date(_e);if(Q.maxStartDate){const Z=new Date(Q.maxStartDate);ne>Z&&(ne=Z)}H.startDate=(0,J.iV)(ne)}}else delete H.startDate;if(Q.hasEndDate){if(E.endDate){const _e=this.retrieveValueFromField(E.endDate);let ne=new Date(_e);if(Q.maxEndDate){const Z=new Date(Q.maxEndDate);ne>Z&&(ne=Z)}H.endDate=(0,J.iV)(ne)}}else delete H.endDate;$.push(H)}}),(0,j.UE)($)&&this.operationsBuilder.add(this.pathCombiner.getPath("accessConditions"),$,!0),this.operationsService.jsonPatchByResourceID(this.submissionService.getSubmissionObjectLinkName(),this.submissionId,this.pathCombiner.rootElement,this.pathCombiner.subRootElement)})).subscribe(L=>{if(L[0].sections[this.sectionId]){const $=L[0].sections[this.sectionId];Object.keys($.files).filter(E=>$.files[E].uuid===this.fileId).forEach(E=>this.uploadService.updateFileData(this.submissionId,this.sectionId,this.fileId,$.files[E]))}this.isSaving=!1,this.activeModal.close()});this.subscriptions.push(P)}unsubscribeAll(){this.subscriptions.filter(P=>(0,j.Uh)(P)).forEach(P=>P.unsubscribe())}}return K.\u0275fac=function(P){return new(P||K)(f.\u0275\u0275directiveInject(h.Kz),f.\u0275\u0275directiveInject(f.ChangeDetectorRef),f.\u0275\u0275directiveInject(m.c),f.\u0275\u0275directiveInject(Y.o),f.\u0275\u0275directiveInject(V.b),f.\u0275\u0275directiveInject(c.w),f.\u0275\u0275directiveInject(F.E),f.\u0275\u0275directiveInject(G.K))},K.\u0275cmp=f.\u0275\u0275defineComponent({type:K,selectors:[["ds-submission-section-upload-file-edit"]],viewQuery:function(P,L){if(1&P&&f.\u0275\u0275viewQuery(R,5),2&P){let $;f.\u0275\u0275queryRefresh($=f.\u0275\u0275loadQuery())&&(L.formRef=$.first)}},decls:10,vars:5,consts:[[1,"modal-header"],[1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"disabled","click"],["aria-hidden","true"],[1,"modal-body"],[3,"formId","formModel","displaySubmit","displayCancel","submitForm","cancel","dfChange",4,"ngIf"],[3,"formId","formModel","displaySubmit","displayCancel","submitForm","cancel","dfChange"],["formRef","formComponent"]],template:function(P,L){1&P&&(f.\u0275\u0275elementStart(0,"div")(1,"div",0)(2,"h4",1),f.\u0275\u0275text(3),f.\u0275\u0275pipe(4,"translate"),f.\u0275\u0275elementEnd(),f.\u0275\u0275elementStart(5,"button",2),f.\u0275\u0275listener("click",function(){return L.onModalClose()}),f.\u0275\u0275elementStart(6,"span",3),f.\u0275\u0275text(7,"\xd7"),f.\u0275\u0275elementEnd()()(),f.\u0275\u0275elementStart(8,"div",4),f.\u0275\u0275template(9,ee,2,4,"ds-form",5),f.\u0275\u0275elementEnd()()),2&P&&(f.\u0275\u0275advance(3),f.\u0275\u0275textInterpolate(f.\u0275\u0275pipeBind1(4,3,"submission.sections.upload.edit.title")),f.\u0275\u0275advance(2),f.\u0275\u0275property("disabled",L.isSaving),f.\u0275\u0275advance(4),f.\u0275\u0275property("ngIf",L.formModel))},dependencies:[g.O5,te.U,T.X$],styles:[".access-condition-group{position:relative;top:-2.3rem;margin-bottom:-2.3rem}"]}),K})()},80434:(ie,W,t)=>{"use strict";t.r(W),t.d(W,{SubmissionSectionUploadFileComponent:()=>F});var i=t(35841),m=t(77007),u=t(53113),e=t(45608),p=t(4786),v=t(78187),s=t(60030),A=(t(36424),t(93033)),z=t(18005),k=t(11915),S=t(56152),C=t(1535),l=t(98678),D=t(65706),j=t(35103),V=t(50122),Y=t(64744),te=t(69721),U=t(96342);function q(G,f){1&G&&l.\u0275\u0275element(0,"i",16)}function d(G,f){1&G&&l.\u0275\u0275element(0,"i",17)}function J(G,f){if(1&G){const h=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementContainerStart(0),l.\u0275\u0275elementStart(1,"div",2)(2,"div",3)(3,"div",4)(4,"h3"),l.\u0275\u0275text(5),l.\u0275\u0275elementStart(6,"span",5),l.\u0275\u0275text(7),l.\u0275\u0275pipe(8,"dsFileSize"),l.\u0275\u0275elementEnd()()(),l.\u0275\u0275elementStart(9,"div",6),l.\u0275\u0275elementContainerStart(10),l.\u0275\u0275elementStart(11,"ds-themed-file-download-l
1ink",7),l.\u0275\u0275element(12,"i",8),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(13,"button",9),l.\u0275\u0275listener("click",function(T){l.\u0275\u0275restoreView(h);const R=l.\u0275\u0275nextContext();return T.preventDefault(),l.\u0275\u0275resetView(R.editBitstreamData())}),l.\u0275\u0275pipe(14,"translate"),l.\u0275\u0275pipe(15,"translate"),l.\u0275\u0275element(16,"i",10),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(17,"button",11),l.\u0275\u0275listener("click",function(T){l.\u0275\u0275restoreView(h);const R=l.\u0275\u0275nextContext(),ee=l.\u0275\u0275reference(2);return T.preventDefault(),l.\u0275\u0275resetView(R.confirmDelete(ee))}),l.\u0275\u0275pipe(18,"translate"),l.\u0275\u0275pipe(19,"translate"),l.\u0275\u0275pipe(20,"async"),l.\u0275\u0275template(21,q,1,0,"i",12),l.\u0275\u0275pipe(22,"async"),l.\u0275\u0275template(23,d,1,0,"i",13),l.\u0275\u0275pipe(24,"async"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementContainerEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275element(25,"div",14)(26,"ds-submission-section-upload-file-view",15),l.\u0275\u0275elementEnd()(),l.\u0275\u0275elementContainerEnd()}if(2&G){const h=l.\u0275\u0275nextContext();l.\u0275\u0275advance(5),l.\u0275\u0275textInterpolate1("",h.fileName," "),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate1("(",l.\u0275\u0275pipeBind1(8,14,null==h.fileData?null:h.fileData.sizeBytes),")"),l.\u0275\u0275advance(4),l.\u0275\u0275property("cssClasses","btn btn-link-focus")("isBlank",!0)("bitstream",h.getBitstream())("enableRequestACopy",!1),l.\u0275\u0275advance(2),l.\u0275\u0275propertyInterpolate("title",l.\u0275\u0275pipeBind1(15,18,"submission.sections.upload.edit.title")),l.\u0275\u0275attribute("aria-label",l.\u0275\u0275pipeBind1(14,16,"submission.sections.upload.edit.title")),l.\u0275\u0275advance(4),l.\u0275\u0275propertyInterpolate("title",l.\u0275\u0275pipeBind1(19,22,"submission.sections.upload.delete.confirm.title")),l.\u0275\u0275property("disabled",l.\u0275\u0275pipeBind1(20,24,h.processingDelete$)),l.\u0275\u0275attribute("aria-label",l.\u0275\u0275pipeBind1(18,20,"submission.sections.upload.delete.confirm.title")),l.\u0275\u0275advance(4),l.\u0275\u0275property("ngIf",l.\u0275\u0275pipeBind1(22,26,h.processingDelete$)),l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",!l.\u0275\u0275pipeBind1(24,28,h.processingDelete$)),l.\u0275\u0275advance(3),l.\u0275\u0275property("fileData",h.fileData)}}function c(G,f){if(1&G){const h=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",18)(1,"h4",19),l.\u0275\u0275text(2),l.\u0275\u0275pipe(3,"translate"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(4,"button",20),l.\u0275\u0275listener("click",function(){const R=l.\u0275\u0275restoreView(h).dismiss;return l.\u0275\u0275resetView(R("cancel"))}),l.\u0275\u0275elementStart(5,"span",21),l.\u0275\u0275text(6,"\xd7"),l.\u0275\u0275elementEnd()()(),l.\u0275\u0275elementStart(7,"div",22)(8,"p"),l.\u0275\u0275text(9),l.\u0275\u0275pipe(10,"translate"),l.\u0275\u0275elementEnd()(),l.\u0275\u0275elementStart(11,"div",23)(12,"button",24),l.\u0275\u0275listener("click",function(){const R=l.\u0275\u0275restoreView(h).close;return l.\u0275\u0275resetView(R("cancel"))}),l.\u0275\u0275text(13),l.\u0275\u0275pipe(14,"translate"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(15,"button",25),l.\u0275\u0275listener("click",function(){const R=l.\u0275\u0275restoreView(h).close;return l.\u0275\u0275resetView(R("ok"))}),l.\u0275\u0275text(16),l.\u0275\u0275pipe(17,"translate"),l.\u0275\u0275elementEnd()()}2&G&&(l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate(l.\u0275\u0275pipeBind1(3,4,"submission.sections.upload.delete.confirm.title")),l.\u0275\u0275advance(7),l.\u0275\u0275textInterpolate(l.\u0275\u0275pipeBind1(10,6,"submission.sections.upload.delete.confirm.info")),l.\u0275\u0275advance(4),l.\u0275\u0275textInterpolate(l.\u0275\u0275pipeBind1(14,8,"submission.sections.upload.delete.confirm.cancel")),l.\u0275\u0275advance(3),l.\u0275\u0275textInterpolate(l.\u0275\u0275pipeBind1(17,10,"submission.sections.upload.delete.confirm.submit")))}let F=(()=>{class G{constructor(h,g,T,R,ee,B,K,w){this.cdr=h,this.formService=g,this.halService=T,this.modalService=R,this.operationsBuilder=ee,this.operationsService=B,this.submissionService=K,this.uploadService=w,this.processingDelete$=new i.X(!1),this.subscriptions=[],this.formMetadata=[],this.readMode=!0}ngOnChanges(h){this.availableAccessConditionOptions&&this.subscriptions.push(this.uploadService.getFileData(this.submissionId,this.sectionId,this.fileId).pipe((0,m.h)(g=>(0,e.pT)(g))).subscribe(g=>{this.fileData=g}))}ngOnInit(){this.formId=this.formService.getUniqueId(this.fileId),this.pathCombiner=new s.K("sections",this.sectionId,"files",this.fileIndex),this.loadFormMetadata()}confirmDelete(h){this.modalService.open(h).result.then(g=>{"ok"===g&&(this.processingDelete$.next(!0),this.deleteFile())})}getBitstream(){return Object.assign(new C.Z,{uuid:this.fileData.uuid})}editBitstreamData(){const g=this.modalService.open(S.e,{size:"xl",backdrop:"static"});g.componentInstance.availableAccessConditionOptions=this.availableAccessConditionOptions,g.componentInstance.collectionId=this.collectionId,g.componentInstance.collectionPolicyType=this.collectionPolicyType,g.componentInstance.configMetadataForm=this.configMetadataForm,g.componentInstance.fileData=this.fileData,g.componentInstance.fileId=this.fileId,g.componentInstance.fileIndex=this.fileIndex,g.componentInstance.formId=this.formId,g.componentInstance.sectionId=this.sectionId,g.componentInstance.formMetadata=this.formMetadata,g.componentInstance.pathCombiner=this.pathCombiner,g.componentInstance.submissionId=this.submissionId}ngOnDestroy(){this.unsubscribeAll()}unsubscribeAll(){this.subscriptions.filter(h=>
1(0,e.Uh)(h)).forEach(h=>h.unsubscribe())}loadFormMetadata(){this.configMetadataForm.rows.forEach(h=>{h.fields.forEach(g=>{g.selectableMetadata.forEach(T=>{this.formMetadata.push(T.metadata)})})})}deleteFile(){this.operationsBuilder.remove(this.pathCombiner.getPath()),this.subscriptions.push(this.operationsService.jsonPatchByResourceID(this.submissionService.getSubmissionObjectLinkName(),this.submissionId,this.pathCombiner.rootElement,this.pathCombiner.subRootElement).subscribe(()=>{this.uploadService.removeUploadedFile(this.submissionId,this.sectionId,this.fileId),this.processingDelete$.next(!1)}))}}return G.\u0275fac=function(h){return new(h||G)(l.\u0275\u0275directiveInject(l.ChangeDetectorRef),l.\u0275\u0275directiveInject(p.o),l.\u0275\u0275directiveInject(z.q),l.\u0275\u0275directiveInject(D.FF),l.\u0275\u0275directiveInject(v.w),l.\u0275\u0275directiveInject(k.E),l.\u0275\u0275directiveInject(A.b),l.\u0275\u0275directiveInject(u.K))},G.\u0275cmp=l.\u0275\u0275defineComponent({type:G,selectors:[["ds-submission-upload-section-file"]],viewQuery:function(h,g){if(1&h&&l.\u0275\u0275viewQuery(S.e,5),2&h){let T;l.\u0275\u0275queryRefresh(T=l.\u0275\u0275loadQuery())&&(g.fileEditComp=T.first)}},inputs:{availableAccessConditionOptions:"availableAccessConditionOptions",collectionId:"collectionId",collectionPolicyType:"collectionPolicyType",configMetadataForm:"configMetadataForm",fileId:"fileId",fileIndex:"fileIndex",fileName:"fileName",sectionId:"sectionId",submissionId:"submissionId"},features:[l.\u0275\u0275NgOnChangesFeature],decls:3,vars:1,consts:[[4,"ngIf"],["content",""],[1,"row"],[1,"col-md-12"],[1,"float-left","w-75"],[1,"text-muted"],[1,"float-right","w-15"],[3,"cssClasses","isBlank","bitstream","enableRequestACopy"],["aria-hidden","true",1,"fa","fa-download","fa-2x","text-normal"],[1,"btn","btn-link-focus",3,"title","click"],[1,"fa","fa-edit","fa-2x","text-normal"],[1,"btn","btn-link-focus",3,"title","disabled","click"],["class","fas fa-circle-notch fa-spin fa-2x text-danger",4,"ngIf"],["class","fa fa-trash fa-2x text-danger",4,"ngIf"],[1,"clearfix"],[3,"fileData"],[1,"fas","fa-circle-notch","fa-spin","fa-2x","text-danger"],[1,"fa","fa-trash","fa-2x","text-danger"],[1,"modal-header"],[1,"modal-title","text-danger"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"modal-footer"],["type","button",1,"btn","btn-secondary",3,"click"],["type","button",1,"btn","btn-danger",3,"click"]],template:function(h,g){1&h&&(l.\u0275\u0275template(0,J,27,30,"ng-container",0),l.\u0275\u0275template(1,c,18,12,"ng-template",null,1,l.\u0275\u0275templateRefExtractor)),2&h&&l.\u0275\u0275property("ngIf",g.fileData)},dependencies:[j.O5,V.t,Y.m,j.Ov,te.p,U.X$]}),G})()},64744:(ie,W,t)=>{"use strict";t.d(W,{m:()=>q});var i=t(45608),m=t(71432),u=t(98678),e=t(35103),p=t(89360),v=t(21322),s=t(96342);function I(d,J){if(1&d&&(u.\u0275\u0275elementContainerStart(0),u.\u0275\u0275elementStart(1,"h5"),u.\u0275\u0275text(2),u.\u0275\u0275elementEnd(),u.\u0275\u0275elementContainerEnd()),2&d){const c=u.\u0275\u0275nextContext().$implicit;u.\u0275\u0275advance(2),u.\u0275\u0275textInterpolate1(" ",c.value," ")}}function A(d,J){if(1&d&&(u.\u0275\u0275elementStart(0,"h5")(1,"span",5),u.\u0275\u0275text(2),u.\u0275\u0275pipe(3,"translate"),u.\u0275\u0275elementEnd()()),2&d){const c=u.\u0275\u0275nextContext(4);u.\u0275\u0275advance(2),u.\u0275\u0275textInterpolate2("",u.\u0275\u0275pipeBind1(3,2,"submission.sections.upload.no-entry")," ",c.fileTitleKey,"")}}function z(d,J){if(1&d&&(u.\u0275\u0275elementContainerStart(0),u.\u0275\u0275template(1,A,4,4,"h5",0),u.\u0275\u0275elementContainerEnd()),2&d){const c=u.\u0275\u0275nextContext().$implicit,F=u.\u0275\u0275nextContext(2);u.\u0275\u0275advance(1),u.\u0275\u0275property("ngIf",0===F.metadata[F.fileTitleKey].indexOf(c))}}function k(d,J){if(1&d&&(u.\u0275\u0275elementContainerStart(0),u.\u0275\u0275template(1,I,3,1,"ng-container",0),u.\u0275\u0275template(2,z,2,1,"ng-container",0),u.\u0275\u0275element(3,"span",2),u.\u0275\u0275elementContainerEnd()),2&d){const c=J.$implicit;u.\u0275\u0275advance(1),u.\u0275\u0275property("ngIf",""!==c.value),u.\u0275\u0275advance(1),u.\u0275\u0275property("ngIf",""===c.value)}}const S=function(){return["150"]};function C(d,J){if(1&d&&(u.\u0275\u0275elementContainerStart(0),u.\u0275\u0275text(1),u.\u0275\u0275pipe(2,"dsTruncate"),u.\u0275\u0275elementContainerEnd()),2&d){const c=u.\u0275\u0275nextContext().$implicit;u.\u0275\u0275advance(1),u.\u0275\u0275textInterpolate1(" ",u.\u0275\u0275pipeBind2(2,1,c.value,u.\u0275\u0275pureFunction0(4,S))," ")}}function l(d,J){if(1&d&&(u.\u0275\u0275elementStart(0,"span",5),u.\u0275\u0275text(1),u.\u0275\u0275pipe(2,"translate"),u.\u0275\u0275elementEnd()),2&d){const c=u.\u0275\u0275nextContext(4);u.\u0275\u0275advance(1),u.\u0275\u0275textInterpolate2("",u.\u0275\u0275pipeBind1(2,2,"submission.sections.upload.no-entry")," ",c.fileDescrKey,"")}}function D(d,J){if(1&d&&(u.\u0275\u0275elementContainerStart(0),u.\u0275\u0275template(1,l,3,4,"span",6),u.\u0275\u0275elementContainerEnd()),2&d){const c=u.\u0275\u0275nextContext().$implicit,F=u.\u0275\u0275nextContext(2);u.\u0275\u0275advance(1),u.\u0275\u0275property("ngIf",0===F.metadata[F.fileDescrKey].indexOf(c))}}function j(d,J){if(1&d&&(u.\u0275\u0275elementContainerStart(0),u.\u0275\u0275template(1,C,3,5,"ng-container",0),u.\u0275\u0275template(2,D,2,1,"ng-container",0),u.\u0275\u0275element(3,"span",2),u.\u0275\u0275elementContainerEnd()),2&d){const c=J.$implicit;u.\u0275\u0275advance(1),u.\u0275\u0275property("ngIf",""!==c.value),u.\u0275\u0275advance(1),u.\u0275\u0275property("ngIf",""===c.value)}}function V(d,J){if(1&d&&(u.\u0275\u0275elementContainerStart(0),u.\u0275\u0275template(1,k,4,2,"ng-container",4),u.\u0275\u0275template(2,j,4,2,"ng-container",4),u.\u0275\u0275elementContainerEnd()),2&d){const c=u.\u0275\u0275nextContext();u.\u0275\u0275advance(1),u.\u0275\u0275property("ngForOf",c.getAllMetadataValue(c.fileTitleKey)),u.\u0275\u0275advance(1),u.\u0275\u0275property("ngForOf",c.getAllMetadataValue(c.fileDescrKey))}}const Y=function(d){return{format:d}};function te(d,J){if(1&d&&(u.\u0275\u0275elementStart(0,"div",7),u.\u0275\u0275text(1),u.\u0275\u0275pipe(2,"translate"),u.\u0275\u0275elementEnd()),2&d){const c=u.\u0275\u0275nextContext();u.\u0275\u0275advance(1),u.\u0275\u0275textInterpolate1(" ",u.\u0275\u0275pipeBind2(2,1,"admin.registries.bitstream-formats.edit.head",u.\u0275\u0275pureFunction1(4,Y,c.fileFormat))," ")}}function U(d,J){if(1&d&&(u.\u0275\u0275elementStart(0,"div",7),u.\u0275\u0275text(1),u.\u0275\u0275elementEnd()),2&d){const c=u.\u0275\u0275nextContext();u.\u0275\u0275advance(1),u.\u0275\u0275textInterpolate2(" Checksum ",c.fileCheckSum.checkSumAlgorithm,": ",c.fileCheckSum.value," ")}}let q=(()=>{class d{constructor(){this.metadata=Object.create({}),this.fileTitleKey="Title",this.fileDescrKey="Description"}ngOnInit(){(0,i.UE)(this.fileData.metadata)&&(this.metadata[this.fileTitleKey]=m.S.all(this.fileData.metadata,"dc.title"),this.metadata[this.fileDescrKey]=m.S.all(this.fileData.metadata,"dc.description")),this.fileCheckSum=this.fileData.checkSum,this.fileFormat=this.fileData.format.shortDe
1scription}getAllMetadataValue(c){return m.S.all(this.metadata,c)}}return d.\u0275fac=function(c){return new(c||d)},d.\u0275cmp=u.\u0275\u0275defineComponent({type:d,selectors:[["ds-submission-section-upload-file-view"]],inputs:{fileData:"fileData"},decls:6,vars:4,consts:[[4,"ngIf"],["class","mt-1",4,"ngIf"],[1,"clearfix"],[3,"accessConditions"],[4,"ngFor","ngForOf"],[1,"text-muted"],["class","text-muted",4,"ngIf"],[1,"mt-1"]],template:function(c,F){1&c&&(u.\u0275\u0275elementStart(0,"div"),u.\u0275\u0275template(1,V,3,2,"ng-container",0),u.\u0275\u0275template(2,te,3,6,"div",1),u.\u0275\u0275template(3,U,2,2,"div",1),u.\u0275\u0275element(4,"span",2)(5,"ds-submission-section-upload-access-conditions",3),u.\u0275\u0275elementEnd()),2&c&&(u.\u0275\u0275advance(1),u.\u0275\u0275property("ngIf",F.metadata),u.\u0275\u0275advance(1),u.\u0275\u0275property("ngIf",F.fileFormat),u.\u0275\u0275advance(1),u.\u0275\u0275property("ngIf",F.fileCheckSum),u.\u0275\u0275advance(2),u.\u0275\u0275property("accessConditions",F.fileData.accessConditions))},dependencies:[e.sg,e.O5,p.O,v.W,s.X$],encapsulation:2}),d})()},50123:(ie,W,t)=>{"use strict";t.d(W,{B1:()=>w,vk:()=>P});var G,i=t(70655),m=t(98678),u=t(35841),e=t(53426),p=t(48358),v=t(21160),s=t(77007),I=t(27303),A=t(69637),z=t(49887),k=t(79900),S=t(45608),C=t(53113),l=t(95445),D=t(30303),j=t(35071),V=t(37920),Y=t(96289),te=t(76297),U=t(60987),q=t(73797),d=t(93033),J=t(46533),c=t(10572),F=t(8842);function f(L,$){1&L&&(m.\u0275\u0275elementContainerStart(0),m.\u0275\u0275elementStart(1,"div",2)(2,"div",3)(3,"h3",4)(4,"span",5),m.\u0275\u0275text(5),m.\u0275\u0275pipe(6,"translate"),m.\u0275\u0275elementEnd()()()(),m.\u0275\u0275elementContainerEnd()),2&L&&(m.\u0275\u0275advance(5),m.\u0275\u0275textInterpolate(m.\u0275\u0275pipeBind1(6,1,"submission.sections.upload.no-file-uploaded")))}const h=function(L){return{collectionName:L}};function g(L,$){if(1&L&&(m.\u0275\u0275elementContainerStart(0),m.\u0275\u0275text(1),m.\u0275\u0275pipe(2,"translate"),m.\u0275\u0275elementContainerEnd()),2&L){const E=m.\u0275\u0275nextContext(3);m.\u0275\u0275advance(1),m.\u0275\u0275textInterpolate1(" ",m.\u0275\u0275pipeBind2(2,1,"submission.sections.upload.header.policy.default.nolist",m.\u0275\u0275pureFunction1(4,h,E.collectionName))," ")}}function T(L,$){if(1&L&&(m.\u0275\u0275elementContainerStart(0),m.\u0275\u0275text(1),m.\u0275\u0275pipe(2,"translate"),m.\u0275\u0275elementContainerEnd()),2&L){const E=m.\u0275\u0275nextContext(3);m.\u0275\u0275advance(1),m.\u0275\u0275textInterpolate1(" ",m.\u0275\u0275pipeBind2(2,1,"submission.sections.upload.header.policy.default.withlist",m.\u0275\u0275pureFunction1(4,h,E.collectionName))," ")}}function R(L,$){if(1&L&&(m.\u0275\u0275elementStart(0,"div",2)(1,"div",8)(2,"ds-alert",9),m.\u0275\u0275template(3,g,3,6,"ng-container",1),m.\u0275\u0275template(4,T,3,6,"ng-container",1),m.\u0275\u0275element(5,"span",10)(6,"ds-submission-section-upload-access-conditions",11),m.\u0275\u0275elementEnd()()()),2&L){const E=m.\u0275\u0275nextContext(2);m.\u0275\u0275advance(2),m.\u0275\u0275property("type",E.AlertTypeEnum.Warning),m.\u0275\u0275advance(1),m.\u0275\u0275property("ngIf",1===E.collectionPolicyType),m.\u0275\u0275advance(1),m.\u0275\u0275property("ngIf",2===E.collectionPolicyType),m.\u0275\u0275advance(2),m.\u0275\u0275property("accessConditions",E.collectionDefaultAccessConditions)}}function ee(L,$){if(1&L&&(m.\u0275\u0275elementContainerStart(0),m.\u0275\u0275element(1,"ds-themed-submission-upload-section-file",12),m.\u0275\u0275pipe(2,"async"),m.\u0275\u0275elementStart(3,"div",2)(4,"div",3),m.\u0275\u0275element(5,"hr"),m.\u0275\u0275elementEnd()(),m.\u0275\u0275elementContainerEnd()),2&L){const E=$.$implicit,Q=m.\u0275\u0275nextContext(2);m.\u0275\u0275advance(1),m.\u0275\u0275property("availableAccessConditionOptions",Q.availableAccessConditionOptions)("collectionId",Q.collectionId)("collectionPolicyType",Q.collectionPolicyType)("configMetadataForm",m.\u0275\u0275pipeBind1(2,9,Q.configMetadataForm$))("fileId",Q.fileIndexes[Q.fileList.indexOf(E)])("fileIndex",Q.fileList.indexOf(E))("fileName",Q.fileNames[Q.fileList.indexOf(E)])("sectionId",Q.sectionData.id)("submissionId",Q.submissionId)}}function B(L,$){if(1&L&&(m.\u0275\u0275elementContainerStart(0),m.\u0275\u0275template(1,R,7,4,"div",6),m.\u0275\u0275template(2,ee,6,11,"ng-container",7),m.\u0275\u0275elementContainerEnd()),2&L){const E=m.\u0275\u0275nextContext();m.\u0275\u0275advance(1),m.\u0275\u0275property("ngIf",E.collectionDefaultAccessConditions.length>0),m.\u0275\u0275advance(1),m.\u0275\u0275property("ngForOf",E.fileList)}}const w=2;let P=((G=class extends k.v{constructor($,E,Q,H,_e,ne,Z,y,b,X,pe){super(void 0,X,pe),this.bitstreamService=$,this.changeDetectorRef=E,this.collectionDataService=Q,this.groupService=H,this.resourcePolicyService=_e,this.sectionService=ne,this.submissionService=Z,this.uploadsConfigService=y,this.dsoNameService=b,this.injectedSectionData=X,this.injectedSubmissionId=pe,this.AlertTypeEnum=U.N,this.fileIndexes=[],this.fileList=[],this.fileNames=[],this.collectionDefaultAccessConditions=[],this.required$=new u.X(!0),this.subs=[]}onSectionInit(){const $=this.uploadsConfigService.findByHref(this.sectionData.config,!0,!1,(0,J.l)("metadata")).pipe((0,c.xw)(),(0,p.U)(E=>E.payload));this.configMetadataForm$=$.pipe((0,v.w)(E=>E.metadata.pipe((0,c.xw)(),(0,p.U)(Q=>Q.payload)))),this.subs.push(this.submissionService.getSubmissionObject(this.submissionId).pipe((0,s.h)(E=>(0,S.pT)(E)&&!E.isLoading),(0,s.h)(E=>(0,S.o8)(this.collectionId)||this.collectionId!==E.collection),(0,I.b)(E=>this.collectionId=E.collection),(0,A.z)(E=>this.collectionDataService.findById(E.collection)),(0,s.h)(E=>(0,S.pT)(E.payload)),(0,I.b)(E=>this.collectionName=this.dsoNameService.getName(E.payload)),(0,A.z)(()=>$)).subscribe(E=>{this.required$.next(E.required),this.availableAccessConditionOptions=(0,S.UE)(E.accessConditionOptions)?E.accessConditionOptions:[],this.collectionPolicyType=this.availableAccessConditionOptions.length>0?w:1,this.changeDetectorRef.detectChanges()}),(0,e.a)(this.configMetadataForm$,this.bitstreamService.getUploadedFileList(this.submissionId,this.sectionData.id)).pipe((0,s.h)(([E,Q])=>(0,S.UE)(E)&&(0,S.pT)(Q)),(0,z.x)()).subscribe(([E,Q])=>{this.fileList=[],this.fileIndexes=[],this.fileNames=[],this.changeDetectorRef.detectChanges(),(0,S.pT)(Q)&&Q.length>0&&Q.forEach(H=>{this.fileList.push(H),this.fileIndexes.push(H.uuid),this.fileNames.push(this.getFileName(E,H))}),this.changeDetectorRef.detectChanges()}))}getFileName($,E){const Q=$.rows[0].fields[0].selectableMetadata[0].metadata;let H;return H=(0,S.UE)(E.metadata)&&(0,S.UE)(E.metadata[Q])?E.metadata[Q][0].display:E.uuid,H}getSectionStatus(){return(0,e.a)(this.required$,this.bitstreamService.getUploadedFileList(this.submissionId,this.sectionData.id),($,E)=>!$||(0,S.pT)(E)&&E.length>0)}onSectionDestroy(){this.subs.filter($=>
1(0,S.Uh)($)).forEach($=>$.unsubscribe())}}).\u0275fac=function($){return new($||G)(m.\u0275\u0275directiveInject(C.K),m.\u0275\u0275directiveInject(m.ChangeDetectorRef),m.\u0275\u0275directiveInject(l.W),m.\u0275\u0275directiveInject(D.O),m.\u0275\u0275directiveInject(j.I),m.\u0275\u0275directiveInject(q.J),m.\u0275\u0275directiveInject(d.b),m.\u0275\u0275directiveInject(V.w),m.\u0275\u0275directiveInject(F._),m.\u0275\u0275directiveInject("sectionDataProvider"),m.\u0275\u0275directiveInject("submissionIdProvider"))},G.\u0275cmp=m.\u0275\u0275defineComponent({type:G,selectors:[["ds-submission-section-upload"]],features:[m.\u0275\u0275InheritDefinitionFeature],decls:3,vars:5,consts:[[3,"content","dismissible","type"],[4,"ngIf"],[1,"row"],[1,"col-md-12"],[1,"text-center"],[1,"text-muted"],["class","row",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"col-sm-12"],[3,"type"],[1,"clearfix"],[3,"accessConditions"],[3,"availableAccessConditionOptions","collectionId","collectionPolicyType","configMetadataForm","fileId","fileIndex","fileName","sectionId","submissionId"]],template:function($,E){1&$&&(m.\u0275\u0275element(0,"ds-alert",0),m.\u0275\u0275template(1,f,7,3,"ng-container",1),m.\u0275\u0275template(2,B,3,2,"ng-container",1)),2&$&&(m.\u0275\u0275property("content","submission.sections.upload.info")("dismissible",!0)("type",E.AlertTypeEnum.Info),m.\u0275\u0275advance(1),m.\u0275\u0275property("ngIf",0==E.fileList.length),m.\u0275\u0275advance(1),m.\u0275\u0275property("ngIf",E.fileList.length>0))}}),G);P=(0,i.__decorate)([(0,te.E)(Y.i.Upload),(0,i.__metadata)("design:paramtypes",[C.K,m.ChangeDetectorRef,l.W,D.O,j.I,q.J,d.b,V.w,F._,Object,String])],P)},53113:(ie,W,t)=>{"use strict";t.d(W,{K:()=>A});var i=t(48358),m=t(49887),u=t(77007),e=t(32924),p=t(86769),v=t(45608),s=t(98678),I=t(89702);let A=(()=>{class z{constructor(S){this.store=S}getUploadedFileList(S,C){return this.store.select((0,p.y8)(S,C)).pipe((0,i.U)(l=>l),(0,m.x)())}getFileData(S,C,l){return this.store.select((0,p.y8)(S,C)).pipe((0,u.h)(D=>!(0,v.o8)(D)),(0,i.U)(D=>{let j;return Object.keys(D).filter(V=>D[V].uuid===l).forEach(V=>j=D[V]),j}),(0,m.x)())}getDefaultPolicies(S,C,l){return this.store.select((0,p.G)(S,C,l)).pipe((0,i.U)(D=>D),(0,m.x)())}addUploadedFile(S,C,l,D){this.store.dispatch(new e.l5(S,C,l,D))}updateFileData(S,C,l,D){this.store.dispatch(new e.GM(S,C,l,D))}removeUploadedFile(S,C,l){this.store.dispatch(new e.YU(S,C,l))}}return z.\u0275fac=function(S){return new(S||z)(s.\u0275\u0275inject(I.yh))},z.\u0275prov=s.\u0275\u0275defineInjectable({token:z,factory:z.\u0275fac}),z})()},72577:(ie,W,t)=>{"use strict";t.d(W,{o:()=>Xi});var i=t(59058),m=t(93510),u=t(70655),e=t(98678),p=t(53426),v=t(35841),s=t(48358),I=t(27303),A=t(69637),z=t(77176),k=t(77007),S=t(66154),C=t(49887),l=t(96342),D=t(54385),j=t.n(D),V=t(94667),Y=t.n(V),te=t(39662),U=t(82485),q=t(4786),d=t(79900),J=t(61285),c=t(45608),F=t(60030);class G{constructor(o=null,n=null){this._path=o,this._value=n}get path(){return this._path}set path(o){this._path=o}get value(){return this._value}set value(o){this._value=o}delete(){this._value=null,this._path=null}isPathEqual(o){return this._path&&Y()(this._path,o)}}var f=t(76297),h=t(96289),g=t(93033),T=t(90537),R=t.n(T),ee=t(5737),B=t(78187),K=t(97686),w=t(22726),P=t(31042),L=t(88666),$=t(55152),E=t(710);let Q=(()=>{class a{constructor(n,r){this.formBuilder=n,this.operationsBuilder=r}dispatchOperationsFromEvent(n,r,_,x){switch(r.type){case"remove":this.dispatchOperationsFromRemoveEvent(n,r,_);break;case"change":this.dispatchOperationsFromChangeEvent(n,r,_,x);break;case"move":this.dispatchOperationsFromMoveEvent(n,r,_)}}dispatchOperation(n,r,_,x){const M=new Set([...Object.keys(n),...Object.keys(r)]);for(const N of M){if(x&&!x.includes(N))continue;const se=n[N]||[],oe=r[N]||[],he=Math.min(se.length,oe.length);for(let O=0;O<=he;O++){const ce=void 0!==se[O],ue=void 0!==oe[O];let ae=!1;if(N.startsWith("dc.identifier.")&&(ae=!0),ce&&ue){const de=oe[O],ge=_.getPath(`${N}/${O}`);this.operationsBuilder.replace(ge,de)}else if(ue)if(ae){const de=_.getPath(N);this.operationsBuilder.add(de,oe)}else{const de=_.getPath(`${N}`);this.operationsBuilder.add(de,oe)}}}}getArrayIndexFromEvent(n){let r;return(0,c.UE)(n)&&((0,ee.Gp8)(n)?(0,c.Ft)(n.context)?this.isPartOfArrayOfGroup(n.model)&&(r=n.model.parent.parent.index):r=n.context.
1index:r=n.index),(0,c.pT)(r)?r:0}isPartOfArrayOfGroup(n){return(0,c.K0)(n.parent)&&n.parent.type===ee.Qam&&n.parent.parent&&n.parent.parent.context&&n.parent.parent.context.type===ee.i9b}getQualdropValueMap(n){const r=new Map;return(this.formBuilder.isQualdropGroup(n.model)?n.model.parent.context:n.model.parent.parent.context).groups.forEach(x=>{const M=x.group[0],N=r.get(M.qualdropId)?r.get(M.qualdropId):[];M.value&&(N.push(M.value),r.set(M.qualdropId,N))}),r}getFieldPathFromEvent(n){const r=this.getArrayIndexFromEvent(n),_=this.getFieldPathSegmentedFromChangeEvent(n);return(0,c.pT)(r)?_+"/"+r:_}getQualdropItemPathFromEvent(n){const r=this.getArrayIndexFromEvent(n),_=new Map;let x=null;return(this.formBuilder.isQualdropGroup(n.model)?n.model.parent.context:n.model.parent.parent.context).groups.forEach((N,se)=>{const oe=N.group[0],he=_.get(oe.qualdropId)?_.get(oe.qualdropId):[];oe.value&&(he.push(oe.value),_.set(oe.qualdropId,he)),se===r&&(x=oe.qualdropId+"/"+(he.length-1))}),x}getFieldPathSegmentedFromChangeEvent(n){let r;return r=this.formBuilder.isQualdropGroup(n.model)?n.model.qualdropId:this.formBuilder.isQualdropGroup(n.model.parent)?n.model.parent.qualdropId:this.formBuilder.getId(n.model),r}getFieldValueFromChangeEvent(n){let r;const _=n.model.value;if(this.formBuilder.isModelInCustomGroup(n.model))r=n.model.parent.value;else if(this.formBuilder.isRelationGroup(n.model))r=n.model.getGroupValue();else if(n.model.hasLanguages){const x=n.model.language;n.model.hasAuthority?Array.isArray(_)?(_.forEach((M,N)=>{M=Object.assign(new w.j,M,{language:x}),_[N]=M}),r=_):r=Object.assign(new w.j,_,{language:x}):r=new P.u(_,x)}else r=(0,E.UV)(_)?new P.u((0,E.UW)(_)):_ instanceof K.Z||_ instanceof w.j||_ instanceof L.w||R()(_)?_:new P.u(_);return r}getValueMap(n){const r=new Map;return n.forEach(_=>{Object.keys(_).forEach(x=>{const M=r.get(x)?r.get(x):[];M.push(_[x]),r.set(x,M)})}),r}dispatchOperationsFromRemoveEvent(n,r,_){const x=this.getFieldPathFromEvent(r),M=this.getFieldValueFromChangeEvent(r);this.formBuilder.isQualdropGroup(r.model)?this.dispatchOperationsFromMap(this.getQualdropValueMap(r),n,r,_):r.context&&r.context instanceof ee.NJD?this.handleArrayGroupPatch(n,r,r.context.context,_):((0,c.UE)(M)&&"string"==typeof M||(0,c.UE)(M)&&M instanceof P.u&&M.hasValue())&&this.operationsBuilder.remove(n.getPath(x))}dispatchOperationsFromAddEvent(n,r){const _=this.getFieldPathSegmentedFromChangeEvent(r),x=(0,$.I8)(this.getFieldValueFromChangeEvent(r));(0,c.UE)(x)&&(x.place=this.getArrayIndexFromEvent(r),(0,c.Uh)(r.group)&&(0,c.Uh)(r.group.value)&&(1===r.group.value.map(N=>Object.values(N)).reduce((N,se)=>N.concat(se)).filter(N=>(0,c.UE)(N)).length?this.operationsBuilder.add(n.getPath([_]),[x],!1):this.operationsBuilder.add(n.getPath([_,"-"]),x,!1)))}dispatchOperationsFromChangeEvent(n,r,_,x){if(r.context&&r.context instanceof ee.NJD)return void this.handleArrayGroupPatch(n,r,r.context.context,_);const M=this.getFieldPathFromEvent(r),N=this.getFieldPathSegmentedFromChangeEvent(r),se=this.getFieldValueFromChangeEvent(r);if(this.formBuilder.isQualdropGroup(r.model.parent)||this.formBuilder.isQualdropGroup(r.model))this.dispatchOperationsFromMap(this.getQualdropValueMap(r),n,r,_);else if(this.formBuilder.isRelationGroup(r.model))this.dispatchOperationsFromMap(this.getValueMap(se),n,r,_);else if(this.formBuilder.hasArrayGroupValue(r.model))this.operationsBuilder.add(n.getPath(N),se,!0);else if(_.isPathEqual(this.formBuilder.getPath(r.model))||x&&(0,c.UE)(_.value)){if((0,c.Uh)(r.$event)&&(0,c.Uh)(r.$event.previousIndex))if(r.$event.previousIndex<0)this.operationsBuilder.add(n.getPath(N),se,!0);else{const oe=n.getPath(M),he=n.getPath(N+"/"+r.$event.previousIndex);(0,c.UE)(he.path)&&(0,c.UE)(oe.path)&&he.path!==oe.path&&this.operationsBuilder.move(oe,he.path)}else se.hasValue()?this.operationsBuilder.replace(n.getPath(M),se):0===this.getArrayIndexFromEvent(r)?this.operationsBuilder.remove(n.getPath(N)):this.operationsBuilder.remove(n.getPath(M));_.delete()}else se.hasValue()&&((0,c.o8)(this.getArrayIndexFromEvent(r))||0===this.getArrayIndexFromEvent(r)?this.operationsBuilder.add(n.getPath(N),se,!0):this.operationsBuilder.add(n.getPath(M),se))}dispatchOperationsFromMap(n,r,_,x){const M=n;if("remove"===_.type){const N=this.getQualdropItemPathFromEvent(_);this.operationsBuilder.remove(r.getPath(N))}else x.isPathEqual(this.formBuilder.getPath(_.model))&&x.value.forEach((N,se)=>{const oe=M.get(se);oe?(Y()(N,oe)||this.operationsBuilder.add(r.getPath(se),oe,!0),M.delete(se)):oe||this.operationsBuilder.remove(r.getPath(se))}),M.forEach((N,se)=>{1===N.length&&(0,c.Ft)(N[0])?this.operationsBuilder.remove(r.getPath(se)):this.operationsBuilder.add(r.getPath(se),N,!0)});x.delete()}dispatchOperationsFromMoveEvent(n,r,_){return this.handleArrayGroupPatch(n,r.$event,r.$event.arrayModel,_)}handleArrayGroupPatch(n,r,_,x){const M=this.formBuilder.getValueFromModel([_]),N=this.getFieldPathSegmentedFromChangeEvent(r);(0,c.UE)(M)?this.operationsBuilder.add(n.getPath(N),M[N],!1):x.isPathEqual(this.formBuilder.getPath(r.model))&&this.operationsBuilder.remove(n.getPath(N))}}return a.\u0275fac=function(n){return new(n||a)(e.\u0275\u0275inject(te.c),e.\u0275\u0275inject(B.w))}
1,a.\u0275prov=e.\u0275\u0275defineInjectable({token:a,factory:a.\u0275fac}),a})();var Ie,H=t(65384),_e=t(73797),ne=t(10882),Z=t(31638),y=t(10572),b=t(14677),X=t(55624),pe=t(6952),fe=t(46533),Ee=t(76774),ve=t(94056),Se=t(54384),me=t(35103),Ke=t(87657);const ye=["formRef"];function ht(a,o){1&a&&e.\u0275\u0275element(0,"ds-themed-loading",2)}function ft(a,o){if(1&a){const n=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"ds-form",3,4),e.\u0275\u0275listener("dfChange",function(_){e.\u0275\u0275restoreView(n);const x=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(x.onChange(_))})("dfFocus",function(_){e.\u0275\u0275restoreView(n);const x=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(x.onFocus(_))})("remove",function(_){e.\u0275\u0275restoreView(n);const x=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(x.onRemove(_))})("ngbEvent",function(_){e.\u0275\u0275restoreView(n);const x=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(x.onCustomEvent(_))})("removeArrayItem",function(_){e.\u0275\u0275restoreView(n);const x=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(x.onRemove(_))}),e.\u0275\u0275elementEnd()}if(2&a){const n=e.\u0275\u0275nextContext();e.\u0275\u0275property("formId",n.formId)("formModel",n.formModel)("displaySubmit",!1)("displayCancel",!1)}}let We=((Ie=class extends d.v{constructor(o,n,r,_,x,M,N,se,oe,he,O,ce,ue,ae,de,ge){super(ue,ae,ge),this.cdr=o,this.formBuilderService=n,this.formOperationsService=r,this.formService=_,this.formConfigService=x,this.notificationsService=M,this.sectionService=N,this.submissionService=se,this.translate=oe,this.submissionObjectService=he,this.objectCache=O,this.requestService=ce,this.injectedCollectionId=ue,this.injectedSectionData=ae,this.crossref$=de,this.injectedSubmissionId=ge,this.isUpdating=!1,this.isLoading=!0,this.fieldsOnTheirWayToBeRemoved=new Map,this.formData=Object.create({}),this.previousValue=new G,this.subs=[],this.isSectionReadonly=!1}onSectionInit(){this.crossrefSubDetector(),this.pathCombiner=new F.K("sections",this.sectionData.id),this.formId=this.formService.getUniqueId(this.sectionData.id),this.sectionService.dispatchSetSectionFormId(this.submissionId,this.sectionData.id,this.formId),this.formConfigService.findByHref(this.sectionData.config).pipe((0,s.U)(o=>o.payload),(0,I.b)(o=>this.formConfig=o),(0,A.z)(()=>(0,p.a)([this.sectionService.getSectionData(this.submissionId,this.sectionData.id,this.sectionData.sectionType),this.submissionObjectService.findById(this.submissionId,!0,!1,(0,fe.l)("item")).pipe((0,y.xw)(),(0,y.xe)()),this.sectionService.isSectionReadOnly(this.submissionId,this.sectionData.id,this.submissionService.getSubmissionScope())])),(0,z.q)(1)).subscribe(([o,n,r])=>{(0,c.o8)(this.formModel)&&(this.submissionObject=n,this.isSectionReadonly=r,this.initForm(o,this.sectionData.errorsToShow,this.sectionData.serverValidationErrors),this.sectionData.data=o,this.subscriptions(),this.isLoading=!1,this.cdr.detectChanges())})}crossrefSubDetector(){this.crossrefSub=this.crossref$.pipe((0,k.h)(o=>!!o)).subscribe(o=>{this.applyDoiInformation(o)})}applyDoiInformation(o){const n=this.sectionData,r=this.sectionData.data;this.forceUpdateForm({data:o.sectionData});const M=o.sections.find(N=>N.id===n.id).metadataAvailable;this.formOperationsService.dispatchOperation(r,o.sectionData,this.pathCombiner,M)}onSectionDestroy(){this.crossrefSub&&this.crossrefSub.unsubscribe(),this.subs.filter(o=>(0,c.Uh)(o)).forEach(o=>o.unsubscribe())}getSectionStatus(){const o=this.formService.isValid(this.formId),n=this.sectionService.getSectionServerErrors(this.submissionId,this.sectionData.id).pipe((0,s.U)(r=>(0,c.xb)(r)));return(0,p.a)([o,n]).pipe((0,s.U)(([r,_])=>r&&_))}hasMetadataEnrichment(o){const n={};Object.keys(o).forEach(x=>{this.inCurrentSubmissionScope(x)&&(n[x]=o[x])});const r=[],_=(0,ne.e5)(n,this.formData);return Object.keys(_).forEach(x=>{_[x].forEach(M=>{M.hasOwnProperty("value")&&j()(this.formData[x],{value:M.value})<0&&r.push(M)})}),(0,c.UE)(r)}inCurrentSubmissionScope(o){switch(this.formConfig?.rows.find(r=>r.fields?.[0]?.selectableMetadata?r.fields?.[0]?.selectableMetadata?.[0]?.metadata===o:!!r.fields?.[0]?.selectableRelationship&&r.fields?.[0]?.selectableRelationship.relationshipType===o.replace(/^relationship\./g,""))?.fields?.[0]?.scope){case ve.S.Worksp
1aceItem:return this.submissionObject.type===Z.K.type.value;case ve.S.WorkflowItem:return this.submissionObject.type===Se.p.type.value;default:return!0}}initForm(o,n,r){try{this.formModel=this.formBuilderService.modelFromConfiguration(this.submissionId,this.formConfig,this.collectionId,o,this.submissionService.getSubmissionScope(),this.isSectionReadonly);const _=this.sectionService.computeSectionConfiguredMetadata(this.formConfig);this.sectionService.updateSectionData(this.submissionId,this.sectionData.id,o,n,r,_)}catch(_){const M={message:this.translate.instant("error.submission.sections.init-form-error")+_.toString(),path:"/sections/"+this.sectionData.id};console.error(_.stack),this.sectionService.setSectionError(this.submissionId,this.sectionData.id,M)}}updateForm(o){const n=o.data,r=o.errorsToShow;(0,c.UE)(n)&&!Y()(n,this.sectionData.data)?(this.sectionData.data=n,this.hasMetadataEnrichment(n)?(this.isUpdating=!0,this.formModel=null,this.cdr.detectChanges(),this.initForm(n,r,o.serverValidationErrors),this.checksForErrors(r),this.isUpdating=!1,this.cdr.detectChanges()):((0,c.UE)(r)||(0,c.UE)(this.sectionData.errorsToShow))&&this.checksForErrors(r)):((0,c.UE)(r)||(0,c.UE)(this.sectionData.errorsToShow))&&this.checksForErrors(r)}forceUpdateForm(o){const n=o.data,r=o.errorsToShow;this.sectionData.data=n,this.isUpdating=!0,this.formModel=null,this.cdr.detectChanges(),this.initForm(n,r,o.serverValidationErrors),this.checksForErrors(r),this.isUpdating=!1,this.cdr.detectChanges()}checksForErrors(o){this.formService.isFormInitialized(this.formId).pipe((0,S.s)(n=>!0===n&&!this.isUpdating)).subscribe(()=>{this.sectionService.checkSectionErrors(this.submissionId,this.sectionData.id,this.formId,o,this.sectionData.errorsToShow),this.sectionData.errorsToShow=o,this.cdr.detectChanges()})}subscriptions(){this.subs.push(this.formService.getFormData(this.formId).pipe((0,C.x)()).subscribe(o=>{this.formData=o}),this.sectionService.getSectionState(this.submissionId,this.sectionData.id,this.sectionData.sectionType).pipe((0,k.h)(o=>(0,c.UE)(o)&&((0,c.UE)(o.data)||(0,c.UE)(o.errorsToShow))),(0,C.x)()).subscribe(o=>{this.fieldsOnTheirWayToBeRemoved=new Map,this.sectionMetadata=o.metadata,this.updateForm(o)}))}onChange(o){this.formOperationsService.dispatchOperationsFromEvent(this.pathCombiner,o,this.previousValue,this.hasStoredValue(this.formBuilderService.getId(o.model),this.formOperationsService.getArrayIndexFromEvent(o)));const n=this.formOperationsService.getFieldPathSegmentedFromChangeEvent(o),r=this.formOperationsService.getFieldValueFromChangeEvent(o);(-1!==Ee.N.submission.autosave.metadata.indexOf(n)&&(0,c.UE)(r)||this.hasRelatedCustomError(n))&&this.submissionService.dispatchSave(this.submissionId)}hasRelatedCustomError(o){const n=j()(this.sectionData.errorsToShow,{path:this.pathCombiner.getPath(o).path});if(-1!==n){const _=this.sectionData.errorsToShow[n].message.replace("error.validation.","");return!Ee.N.form.validatorMap.hasOwnProperty(_)}return!1}onFocus(o){const n=this.formOperationsService.getFieldValueFromChangeEvent(o),r=this.formBuilderService.getPath(o.model);this.formBuilderService.hasMappedGroupValue(o.model)?(this.previousValue.path=r,this.previousValue.value=this.formOperationsService.getQualdropValueMap(o)):(0,c.UE)(n)&&("object"==typeof n&&(0,c.UE)(n.value)||"string"==typeof n)&&(this.previousValue.path=r,this.previousValue.value=n)}onRemove(o){const n=this.formBuilderService.getId(o.model),r=this.formOperationsService.getArrayIndexFromEvent(o);if(this.fieldsOnTheirWayToBeRemoved.has(n)){const _=this.fieldsOnTheirWayToBeRemoved.get(n);_.push(r),this.fieldsOnTheirWayToBeRemoved.set(n,_)}else this.fieldsOnTheirWayToBeRemoved.set(n,[r]);this.formOperationsService.dispatchOperationsFromEvent(this.pathCombiner,o,this.previousValue,this.hasStoredValue(n,r))}hasStoredValue(o,n){return!!(0,c.UE)(this.sectionData.data)&&this.sectionData.data.hasOwnProperty(o)&&(0,c.UE)(this.sectionData.data[o][n])&&!this.isFieldToRemove(o,n)}isFieldToRemove(o,n){return this.fieldsOnTheirWayToBeRemoved.has(o)&&this.fieldsOnTheirWayToBeRemoved.get(o).includes(n)}onCustomEvent(o){this.formOperationsService.dispatchOperationsFromEvent(this.pathCombiner,o,this.previousValue,null)}}).\u0275fac=function(o){return new(o||Ie)(e.\u0275\u0275directiveInject(e.ChangeDetectorRef),e.\u0275\u0275directiveInject(te.c),e.\u0275\u0275directiveInject(Q),e.\u0275\u0275directiveInject(q.o),e.\u0275\u0275directiveInject(J.X),e.\u0275\u0275directiveInject(H.T),e.\u0275\u0275directiveInject(_e.J),e.\u0275\u0275directiveInject(g.b),e.\u0275\u0275directiveInject(l.sK),e.\u0275\u0275directiveInject(b.O),e.\u0275\u0275directiveInject(X.a),e.\u0275\u0275directiveInject(pe.s),e.\u0275\u0275directiveInject("collectionIdProvider"),e.\u0275\u0275directiveInject("sectionDataProvider"),e.\u0275\u0275directiveInject("crossrefDataProvider"),e.\u0275\u0275directiveInject("submissionIdProvider"))},Ie.\u0275cmp=e.\u0275\u0275defineComponent({type:Ie,selectors:[["ds-submission-section-form"]],viewQuery:function(o,n){if(1&o&&e.\u0275\u0275viewQuery(ye,5),2&o){let r;e.\u0275\u0275queryRefresh(r=e.\u0275\u0275loadQuery())&&(n.formRef=r.first)}},features:[e.\u0275\u0275InheritDefinitionFeature],decls:2,vars:2,consts:[["message","Loading...",4,"ngIf"],[3,"formId","formModel","displaySubmit","displayCancel","dfChange","dfFocus","remove","ngbEvent","removeArrayItem",4,"ngIf"],["message","Loading..."],[3,"formId","formModel","displaySubmit","displayCancel","dfChange","dfFocus","remove","ngbEvent","removeArrayItem"],["formRef","formComponent"]],template:function(o,n){1&o&&(e.\u0275\u0275template(0,ht,1,0,"ds-themed-loading",0),e.\u0275\u0275template(1,ft,2,4,"ds-form",1)),2&o&&(e.\u0275\u0275property("ngIf",n.isLoading),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!n.isLoading&&n.formModel))},dependencies:[me.O5,Ke.Z,U.U]}),Ie);We=(0,u.__decorate)([(0,f.E)(h.i.SubmissionForm),(0,u.__metadata)("design:paramtypes",[e.ChangeDetectorRef,te.c,Q,q.o,J.X,H.T,_e.J,g.b,l.sK,b.O,X.a,pe.s,String,Object,v.X,String])],We);t(32931),t(35273),t(71532),t(86183),t(51104),t(51437);var Ve=t(89702),le=t(589),It=t(66723),xt=t(34045),Dt=t.n(xt),Ot=t(56246),yt=t.n(Ot),we=t(14111),be=t(9237),Ce=t(21160),Me=t(9249),Le=t(22040),$e=t(11915),Mt=t(97176),re=t(32924),Pt=t(14297),Tt=t(46342);function Bt(a,o,n){return a?a[o.sections[n].formId]:null}function At(a,o,n,r){if(r||n!==h.i.SubmissionForm)return o;if(!a||!a.touched)return[];const _=[];return o.forEach(x=>
1{(0,Pt.Z)(x.path).forEach(N=>{N.fieldId&&a.touched[N.fieldId]&&_.push(x)})}),_}const Ft=[(()=>{class a{constructor(n,r,_,x,M,N,se,oe,he){this.actions$=n,this.notificationsService=r,this.operationsService=_,this.sectionService=x,this.store$=M,this.submissionService=N,this.submissionObjectService=se,this.translate=oe,this.workspaceItemDataService=he,this.loadForm$=(0,le.GW)(()=>this.actions$.pipe((0,le.l4)(re.tI.INIT_SUBMISSION_FORM),(0,s.U)(O=>{const ce=O.payload.submissionDefinition,ue=[];return ce.sections.page.forEach(ae=>{const de=ae._links.self.href||ae._links.self,ge=de.substr(de.lastIndexOf("/")+1),Fe=ae._links.config?ae._links.config.href||ae._links.config:"",xe=ae.mandatory||(0,c.UE)(O.payload.sections)&&O.payload.sections.hasOwnProperty(ge);let je;je=ae.sectionType!==h.i.SubmissionForm?(0,c.pT)(O.payload.sections)&&(0,c.pT)(O.payload.sections[ge])?O.payload.sections[ge]:Object.create(null):O.payload.item.metadata;const Yi=(0,c.UE)(O.payload.errors)&&O.payload.errors[ge]||null;ue.push(new re.qK(O.payload.submissionId,ge,ae.header,Fe,ae.mandatory,ae.sectionType,ae.visibility,xe,je,Yi))}),{action:O,definition:ce,mappedActions:ue}}),(0,A.z)(O=>(0,we.D)(O.mappedActions.concat(new re.p3(O.action.payload.submissionId)))))),this.resetForm$=(0,le.GW)(()=>this.actions$.pipe((0,le.l4)(re.tI.RESET_SUBMISSION_FORM),(0,s.U)(O=>new re.Xq(O.payload.collectionId,O.payload.submissionId,O.payload.selfUrl,O.payload.submissionDefinition,O.payload.sections,O.payload.item,null)))),this.saveSubmission$=(0,le.GW)(()=>this.actions$.pipe((0,le.l4)(re.tI.SAVE_SUBMISSION_FORM),(0,Ce.w)(O=>this.operationsService.jsonPatchByResourceType(this.submissionService.getSubmissionObjectLinkName(),O.payload.submissionId,"sections").pipe((0,s.U)(ce=>new re.Uq(O.payload.submissionId,ce,O.payload.isManual,O.payload.isManual)),(0,Me.K)(()=>(0,be.of)(new re.ec(O.payload.submissionId))))))),this.saveForLaterSubmission$=(0,le.GW)(()=>this.actions$.pipe((0,le.l4)(re.tI.SAVE_FOR_LATER_SUBMISSION_FORM),(0,Ce.w)(O=>this.operationsService.jsonPatchByResourceType(this.submissionService.getSubmissionObjectLinkName(),O.payload.submissionId,"sections").pipe((0,s.U)(ce=>new re.gA(O.payload.submissionId,ce)),(0,Me.K)(()=>(0,be.of)(new re.ec(O.payload.submissionId))))))),this.saveSubmissionSuccess$=(0,le.GW)(()=>this.actions$.pipe((0,le.l4)(re.tI.SAVE_SUBMISSION_FORM_SUCCESS),(0,Le.M)(this.store$),(0,s.U)(([O,ce])=>this.parseSaveResponse(ce.submission.objects[O.payload.submissionId],O.payload.submissionObject,O.payload.submissionId,ce.forms,O.payload.showNotifications,O.payload.showErrors)),(0,A.z)(O=>(0,we.D)(O)))),this.saveSubmissionSectionSuccess$=(0,le.GW)(()=>this.actions$.pipe((0,le.l4)(re.tI.SAVE_SUBMISSION_SECTION_FORM_SUCCESS),(0,Le.M)(this.store$),(0,s.U)(([O,ce])=>this.parseSaveResponse(ce.submission.objects[O.payload.submissionId],O.payload.submissionObject,O.payload.submissionId,ce.forms,!1,!1)),(0,A.z)(O=>(0,we.D)(O)))),this.saveSection$=(0,le.GW)(()=>this.actions$.pipe((0,le.l4)(re.tI.SAVE_SUBMISSION_SECTION_FORM),(0,Ce.w)(O=>this.operationsService.jsonPatchByResourceID(this.submissionService.getSubmissionObjectLinkName(),O.payload.submissionId,"sections",O.payload.sectionId).pipe((0,s.U)(ce=>new re.hM(O.payload.submissionId,ce)),(0,Me.K)(()=>(0,be.of)(new re.cT(O.payload.submissionId))))))),this.saveError$=(0,le.GW)(()=>this.actions$.pipe((0,le.l4)(re.tI.SAVE_SUBMISSION_FORM_ERROR,re.tI.SAVE_SUBMISSION_SECTION_FORM_ERROR),(0,Le.M)(this.store$),(0,I.b)(()=>this.notificationsService.error(null,this.translate.get("submission.sections.general.save_error_notice")))),{dispatch:!1}),this.saveAndDeposit$=(0,le.GW)(()=>this.actions$.pipe((0,le.l4)(re.tI.SAVE_AND_DEPOSIT_SUBMISSION),(0,Le.M)(this.submissionService.hasUnsavedModification()),(0,Ce.w)(([O,ce])=>{let ue;return ue=ce?this.operationsService.jsonPatchByResourceType(this.submissionService.getSubmissionObjectLinkName(),O.payload.submissionId,"sections"):this.submissionObjectService.findById(O.payload.submissionId,!1,!0,(0,fe.l)("item"),(0,fe.l)("collection")).pipe((0,y.Gp)(),(0,s.U)(ae=>[ae])),ue.pipe((0,s.U)(ae=>
1this.canDeposit(ae)?new re.wn(O.payload.submissionId):(this.notificationsService.warning(null,this.translate.instant("submission.sections.general.cannot_deposit"),null,!0),new re.Uq(O.payload.submissionId,ae,!1,!0))),(0,Me.K)(()=>(0,be.of)(new re.ec(O.payload.submissionId))))}))),this.depositSubmission$=(0,le.GW)(()=>this.actions$.pipe((0,le.l4)(re.tI.DEPOSIT_SUBMISSION),(0,Le.M)(this.store$),(0,Ce.w)(([O,ce])=>this.submissionService.depositSubmission(ce.submission.objects[O.payload.submissionId].selfUrl).pipe((0,s.U)(()=>new re.e7(O.payload.submissionId)),(0,Me.K)(ue=>(0,be.of)(new re.jn(O.payload.submissionId))))))),this.saveForLaterSubmissionSuccess$=(0,le.GW)(()=>this.actions$.pipe((0,le.l4)(re.tI.SAVE_FOR_LATER_SUBMISSION_FORM_SUCCESS),(0,I.b)(()=>this.notificationsService.success(null,this.translate.get("submission.sections.general.save_success_notice"))),(0,I.b)(()=>this.submissionService.redirectToMyDSpace())),{dispatch:!1}),this.depositSubmissionSuccess$=(0,le.GW)(()=>this.actions$.pipe((0,le.l4)(re.tI.DEPOSIT_SUBMISSION_SUCCESS),(0,I.b)(()=>this.notificationsService.success(null,this.translate.get("submission.sections.general.deposit_success_notice"))),(0,I.b)(O=>this.workspaceItemDataService.invalidateById(O.payload.submissionId)),(0,I.b)(()=>this.submissionService.redirectToMyDSpace())),{dispatch:!1}),this.depositSubmissionError$=(0,le.GW)(()=>this.actions$.pipe((0,le.l4)(re.tI.DEPOSIT_SUBMISSION_ERROR),(0,I.b)(()=>this.notificationsService.error(null,this.translate.get("submission.sections.general.deposit_error_notice")))),{dispatch:!1}),this.discardSubmission$=(0,le.GW)(()=>this.actions$.pipe((0,le.l4)(re.tI.DISCARD_SUBMISSION),(0,Ce.w)(O=>this.submissionService.discardSubmission(O.payload.submissionId).pipe((0,s.U)(()=>new re._w(O.payload.submissionId)),(0,Me.K)(()=>(0,be.of)(new re.kj(O.payload.submissionId))))))),this.addAllMetadataToSectionData=(0,le.GW)(()=>this.actions$.pipe((0,le.l4)(re.tI.UPDATE_SECTION_DATA),(0,Ce.w)(O=>this.sectionService.getSectionState(O.payload.submissionId,O.payload.sectionId,h.i.Upload).pipe((0,s.U)(ce=>[O,ce]),(0,z.q)(1))),(0,k.h)(([O,ce])=>ce.sectionType===h.i.SubmissionForm),(0,Ce.w)(([O,ce])=>ce.sectionType===h.i.SubmissionForm?this.submissionObjectService.findById(O.payload.submissionId,!0,!1,(0,fe.l)("item")).pipe((0,y.Gp)()).pipe((0,Ce.w)(de=>de.item.pipe((0,y.Gp)()))).pipe((0,s.U)(de=>de.metadata),(0,k.h)(de=>!Y()(O.payload.data,de)),(0,s.U)(de=>new re.z6(O.payload.submissionId,O.payload.sectionId,de,O.payload.errorsToShow,O.payload.serverValidationErrors,O.payload.metadata))):(0,be.of)(new re.jQ)))),this.discardSubmissionSuccess$=(0,le.GW)(()=>this.actions$.pipe((0,le.l4)(re.tI.DISCARD_SUBMISSION_SUCCESS),(0,I.b)(()=>this.notificationsService.success(null,this.translate.get("submission.sections.general.discard_success_notice"))),(0,I.b)(()=>this.submissionService.redirectToMyDSpace())),{dispatch:!1}),this.discardSubmissionError$=(0,le.GW)(()=>this.actions$.pipe((0,le.l4)(re.tI.DISCARD_SUBMISSION_ERROR),(0,I.b)(()=>this.notificationsService.error(null,this.translate.get("submission.sections.general.discard_error_notice")))),{dispatch:!1})}canDeposit(n){let r=!0;return(0,c.UE)(n)&&n.forEach(_=>{const{errors:x}=_;x&&!(0,c.xb)(x)&&(r=!1)}),r}parseSaveResponse(n,r,_,x,M=!0,N=!0){const se=[];return(0,c.UE)(r)&&(M&&this.notificationsService.success(null,this.translate.get("submission.sections.general.save_success_notice")),r.forEach(oe=>{let he=Object.create({});const{errors:O}=oe;O&&!(0,c.xb)(O)&&(he=(0,Mt.Z)(O),M&&this.notificationsService.warning(null,this.translate.get("submission.sections.general.sections_not_valid")));const ce=oe.sections&&(0,c.UE)(oe.sections)?oe.sections:{},ue=yt()(Object.keys(ce),Object.keys(he));for(const de of ue){const ge=he[de]||[],Fe=ce[de]||{};if(n.sections[de].sectionType===h.i.Upload&&(0,c.xb)(Fe.files)&&!n.sections[de].enabled)continue;M&&!n.sections[de].enabled&&this.submissionService.notifyNewSection(_,de,n.sections[de].sectionType);const je=At(Bt(x,n,de),ge,n.sections[de].sectionType,N);se.push(new re.z6(_,de,Fe,je,ge))}const ae=Dt()(n.sections,de=>de.sectionType===h.i.SherpaPolicies);(0,c.pT)(ae)&&(0,c.UE)(n.sections[ae]?.data)&&(0,c.xb)(ce[ae])&&se.pu
1sh(new re.z6(_,ae,null,[],[]))})),se}}return a.\u0275fac=function(n){return new(n||a)(e.\u0275\u0275inject(le.eX),e.\u0275\u0275inject(H.T),e.\u0275\u0275inject($e.E),e.\u0275\u0275inject(_e.J),e.\u0275\u0275inject(Ve.yh),e.\u0275\u0275inject(g.b),e.\u0275\u0275inject(b.O),e.\u0275\u0275inject(l.sK),e.\u0275\u0275inject(Tt.p))},a.\u0275prov=e.\u0275\u0275defineInjectable({token:a,factory:a.\u0275fac}),a})()];var Ze=t(50123),Lt=t(53113),ke=(t(49868),t(9302)),qe=t(95445);const jt={granted:{element:{container:"custom-control custom-checkbox pl-1",control:"custom-control-input",label:"custom-control-label pt-1"}}},Kt=[{id:"granted",label:"submission.sections.license.granted-label",required:!0,value:!1,validators:{required:null},errorMessages:{required:"submission.sections.license.required",notgranted:"submission.sections.license.notgranted"},type:"CHECKBOX"}];var Pe;const Wt=["formRef"];function Vt(a,o){if(1&a){const n=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"ds-form",2,3),e.\u0275\u0275listener("dfChange",function(_){e.\u0275\u0275restoreView(n);const x=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(x.onChange(_))}),e.\u0275\u0275elementEnd()}if(2&a){const n=e.\u0275\u0275nextContext();e.\u0275\u0275property("formId",n.formId)("formModel",n.formModel)("formLayout",n.formLayout)("displaySubmit",n.displaySubmit)("displayCancel",!1)}}let Ne=((Pe=class extends d.v{constructor(o,n,r,_,x,M,N,se,oe,he,O,ce){super(he,O,ce),this.changeDetectorRef=o,this.collectionDataService=n,this.formBuilderService=r,this.formOperationsService=_,this.formService=x,this.operationsBuilder=M,this.sectionService=N,this.submissionService=se,this.translateService=oe,this.injectedCollectionId=he,this.injectedSectionData=O,this.injectedSubmissionId=ce,this.formLayout=jt,this.displaySubmit=!1,this.subs=[]}onSectionInit(){this.pathCombiner=new F.K("sections",this.sectionData.id),this.formId=this.formService.getUniqueId(this.sectionData.id),this.formModel=this.formBuilderService.fromJSON(Kt);const o=this.formBuilderService.findById("granted",this.formModel);o.label=this.translateService.instant(o.label),o.value=this.sectionData.data.granted,this.licenseText$=this.collectionDataService.findById(this.collectionId,!0,!0,(0,fe.l)("license")).pipe((0,k.h)(n=>(0,c.pT)(n.payload)),(0,A.z)(n=>n.payload.license),(0,S.s)(n=>(0,c.pT)(n.payload)),(0,s.U)(n=>n.payload.text),(0,ke.O)("")),this.subs.push(this.sectionService.isSectionReadOnly(this.submissionId,this.sectionData.id,this.submissionService.getSubmissionScope()).pipe((0,z.q)(1),(0,k.h)(n=>n)).subscribe(()=>{o.disabled=!0}),this.sectionService.getSectionErrors(this.submissionId,this.sectionData.id).pipe((0,k.h)(n=>(0,c.UE)(n)),(0,C.x)()).subscribe(n=>{const r=n.map(_=>"/sections/license"===_.path?o.checked?null:Object.assign({},_,{path:"/sections/license/granted"}):_).filter(_=>(0,c.K0)(_));(0,c.UE)(r)?(this.sectionService.checkSectionErrors(this.submissionId,this.sectionData.id,this.formId,r),this.sectionData.errors=n):this.sectionService.dispatchRemoveSectionErrors(this.submissionId,this.sectionData.id),this.changeDetectorRef.detectChanges()}))}getSectionStatus(){const o=this.formBuilderService.findById("granted",this.formModel);return o.valueChanges.pipe((0,s.U)(n=>!0===n),(0,ke.O)(o.value))}onChange(o){const n=this.formOperationsService.getFieldPathSegmentedFromChangeEvent(o),r=this.formOperationsService.getFieldValueFromChangeEvent(o);r?(this.operationsBuilder.add(this.pathCombiner.getPath(n),r.value.toString(),!1,!0),this.sectionService.dispatchRemoveSectionErrors(this.submissionId,this.sectionData.id)):this.operationsBuilder.remove(this.pathCombiner.getPath(n))}onSectionDestroy(){this.subs.filter(o=>(0,c.Uh)(o)).forEach(o=>o.unsubscribe())}}).\u0275fac=function(o){return new(o||Pe)(e.\u0275\u0275directiveInject(e.ChangeDetectorRef),e.\u0275\u0275directiveInject(qe.W),e.\u0275\u0275directiveInject(te.c),e.\u0275\u0275directiveInject(Q),e.\u0275\u0275directiveInject(q.o),e.\u0275\u0275directiveInject(B.w),e.\u0275\u0275directiveInject(_e.J),e.\u0275\u0275directiveInject(g.b),e.\u0275\u0275directiveInject(l.sK),e.\u0275\u0275directiveInject("collectionIdProvider"),e.\u0275\u0275directiveInject("sectionDataProvider"),e.\u0275\u0275directiveInject("submissionIdProvider"))},Pe.\u0275cmp=e.\u0275\u0275defineComponent({type:Pe,selectors:[["ds-submission-section-license"]],viewQuery:function(o,n){if(1&o&&e.\u0275\u0275viewQuery(Wt,5),2&o){let r;e.\u0275\u0275queryRefresh(r=e.\u0275\u0275loadQuery())&&(n.formRef=r.first)}},features:[e.\u0275\u0275InheritDefinitionFeature],decls:5,vars:4,consts:[[1,"mb-5","preserve-line-breaks",3,"innerHTML"],[3,"formId","formModel","formLayout","displaySubmit","displayCancel","dfChange",4,"ngIf"],[3,"formId","formModel","formLayout","displaySubmit","displayCancel","dfChange"],["formRef","formComponent"]],template:function(o,n){1&o&&(e.\u0275\u0275element(0,"span",0),e.\u0275\u0275pipe(1,"async"),e.\u0275\u0275element(2,"br")(3,"br"),e.\u0275\u0275template(4,Vt,2,5,"ds-form",1)),2&o&&(e.\u0275\u0275property("innerHTML",e.\u0275\u0275pipeBind1(1,2,n.licenseText$),e.\u0275\u0275sanitizeHtml),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",n.formModel))},dependencies:[me.O5,U.U,me.Ov]}),Pe);Ne=(0,u.__decorate)([(0,f.E)(h.i.License),(0,u.__metadata)("design:paramtypes",[e.ChangeDetectorRef,qe.W,te.c,Q,q.o,B.w,_e.J,g.b,l.sK,String,Object,String])],Ne);var Te,wt=t(37920),et=(t(44918),t(80434),t(56152),t(64744),t(89360)),Xt=(t(69653),t(39100)),tt=(t(10251),t(8019),t(76890),t(9925),t(23266)),De=t(65706),nt=t(29353),it=t(73194),kt=t(78154),Ge=t(41966);function qt(a,o){1&a&&(e.\u0275\u0275elementStart(0,"span"),e.\u0275\u0275element(1,"ds-themed-loading"),e.\u0275\u0275elementEnd())}function en(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"span"),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",n.getSelectedCcLicense().name," ")}}function tn(a,o){1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275elementContainerEnd()),2&a&&(e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(2,1,"submission.sections.ccLicense.change")," "))}function nn(a,o){1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275elementContainerEnd()),2&a&&(e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(2,1,"submission.sections.ccLicense.select")," "))}function sn(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"span"),e.\u0275\u0275template(1,tn,3,3,"ng-container",3),e.\u0275\u0275template(2,nn,3,3,"ng-container",3),e.\u0275\u0275elementEnd()),2&a){const n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.storedCcLicenseLink),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!n.storedCcLicenseLink)}}function on(a,o){1&a&&(e.\u0275\u0275elementStart(0,"button",7),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275elementEnd()),2&a&&(e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(2,1,"submission.sections.ccLicense.none")," "))}function an(a,o){if(1&a){const n=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",8),e.\u0275\u0275listener("click",function(){const x=e.\u0275\u0275restoreView(n).$implicit,M=e.\u0275\u0275nextContext();
1return e.\u0275\u0275resetView(M.selectCcLicense(x))}),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()}if(2&a){const n=o.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",n.name," ")}}function rn(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"div",10)(1,"h5"),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(3,"div",21),e.\u0275\u0275elementEnd()),2&a){const n=o.$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",n.label," "),e.\u0275\u0275advance(1),e.\u0275\u0275property("innerHTML",n.description,e.\u0275\u0275sanitizeHtml)}}function cn(a,o){if(1&a){const n=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div")(1,"div",16)(2,"div")(3,"h4"),e.\u0275\u0275text(4),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(5,"div",17),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(6,"button",18),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(n);const _=e.\u0275\u0275nextContext(3);return e.\u0275\u0275resetView(_.closeInfoModal())}),e.\u0275\u0275elementStart(7,"span",19),e.\u0275\u0275text(8,"\xd7"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(9,"div",20),e.\u0275\u0275template(10,rn,4,2,"div",9),e.\u0275\u0275elementEnd()()}if(2&a){const n=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",n.label," "),e.\u0275\u0275advance(1),e.\u0275\u0275property("innerHTML",n.description,e.\u0275\u0275sanitizeHtml),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngForOf",n.enums)}}function ln(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"span"),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const n=e.\u0275\u0275nextContext().ngVar;e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",n.label," ")}}function dn(a,o){1&a&&(e.\u0275\u0275elementStart(0,"span"),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275elementEnd()),2&a&&(e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(2,1,"submission.sections.ccLicense.option.select")," "))}function pn(a,o){if(1&a&&(e.\u0275\u0275elementContainerStart(0,2),e.\u0275\u0275template(1,ln,2,1,"span",3),e.\u0275\u0275template(2,dn,3,3,"span",3),e.\u0275\u0275elementContainerEnd()),2&a){const n=o.ngVar;e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!n)}}function mn(a,o){if(1&a){const n=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",8),e.\u0275\u0275listener("click",function(){const x=e.\u0275\u0275restoreView(n).$implicit,M=e.\u0275\u0275nextContext(2).$implicit,N=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(N.selectOption(N.getSelectedCcLicense(),M,x))}),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()}if(2&a){const n=o.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",n.label," ")}}function un(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"ds-select",1),e.\u0275\u0275template(1,pn,3,2,"ng-container",22),e.\u0275\u0275elementContainerStart(2,4),e.\u0275\u0275elementStart(3,"div",23),e.\u0275\u0275template(4,mn,2,1,"button",6),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()),2&a){const n=e.\u0275\u0275nextContext().$implicit,r=e.\u0275\u0275nextContext(2);e.\u0275\u0275property("disabled","jurisdiction"===n.id&&void 0!==r.defaultJurisdiction&&"none"!==r.defaultJurisdiction),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngVar",r.getSelectedOption(r.getSelectedCcLicense(),n)),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngForOf",n.enums)}}function _n(a,o){if(1&a){const n=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",25)(1,"div",26),e.\u0275\u0275listener("click",function(){const x=e.\u0275\u0275restoreView(n).$implicit,M=e.\u0275\u0275nextContext(2).$implicit,N=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(N.selectOption(N.getSelectedCcLicense(),M,x))}),e.\u0275\u0275element(2,"input",27),e.\u0275\u0275elementStart(3,"span"),e.\u0275\u0275text(4),e.\u0275\u0275elementEnd()()()}if(2&a){const n=o.$implicit,r=e.\u0275\u0275nextContext(2).$implicit,_=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(2),e.\u0275\u0275propertyInterpolate("title",n.label),e.\u0275\u0275property("checked",_.isSelectedOption(_.getSelectedCcLicense(),r,n)),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(n.label)}}function hn(a,o){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,_n,5,3,"div",24),e.\u0275\u0275elementContainerEnd()),2&a){const n=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",n.enums)}}function fn(a,o){if(1&a){const n=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",10)(1,"div",11)(2,"div"),e.\u0275\u0275text(3),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"button",12),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(n);const _=e.\u0275\u0275reference(7),x=e.\u0275\u0275nextContext(2);
1return e.\u0275\u0275resetView(x.openInfoModal(_))}),e.\u0275\u0275element(5,"i",13),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(6,cn,11,3,"ng-template",null,14,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275template(8,un,5,3,"ds-select",15),e.\u0275\u0275template(9,hn,2,1,"ng-container",3),e.\u0275\u0275elementEnd()}if(2&a){const n=o.$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275classMapInterpolate1("font-weight-bold ",n.id,""),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",n.label," "),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngIf",(null==n.enums?null:n.enums.length)>5),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",(null==n.enums?null:n.enums.length)<=5)}}function vn(a,o){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,fn,10,6,"div",9),e.\u0275\u0275elementContainerEnd()),2&a){const n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",n.getSelectedCcLicense().fields)}}function gn(a,o){1&a&&(e.\u0275\u0275elementStart(0,"div"),e.\u0275\u0275element(1,"ds-themed-loading"),e.\u0275\u0275elementEnd())}function Sn(a,o){if(1&a){const n=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",30)(1,"div"),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"a",31),e.\u0275\u0275text(5),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(6,"div",32)(7,"div",26),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(n);const _=e.\u0275\u0275nextContext(3);return e.\u0275\u0275resetView(_.setAccepted(!_.accepted))}),e.\u0275\u0275element(8,"input",33),e.\u0275\u0275elementStart(9,"span"),e.\u0275\u0275text(10),e.\u0275\u0275pipe(11,"translate"),e.\u0275\u0275elementEnd()()()()}if(2&a){const n=e.\u0275\u0275nextContext().ngVar,r=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(3,5,"submission.sections.ccLicense.link")," "),e.\u0275\u0275advance(2),e.\u0275\u0275propertyInterpolate("href",n,e.\u0275\u0275sanitizeUrl),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",n," "),e.\u0275\u0275advance(3),e.\u0275\u0275property("checked",r.accepted),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(11,7,"submission.sections.ccLicense.confirmation"),"")}}function En(a,o){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,gn,2,0,"div",3),e.\u0275\u0275template(2,Sn,12,9,"div",29),e.\u0275\u0275elementContainerEnd()),2&a){const n=o.ngVar;e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!n),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n)}}function bn(a,o){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,En,3,2,"ng-container",28),e.\u0275\u0275pipe(2,"async"),e.\u0275\u0275elementContainerEnd()),2&a){const n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngVar",e.\u0275\u0275pipeBind1(2,1,n.getCcLicenseLink$()))}}let ze=((Te=class extends d.v{constructor(o,n,r,_,x,M,N,se,oe){super(N,se,oe),this.modalService=o,this.sectionService=n,this.submissionCcLicensesDataService=r,this.submissionCcLicenseUrlDataService=_,this.operationsBuilder=x,this.configService=M,this.injectedCollectionId=N,this.injectedSectionData=se,this.injectedSubmissionId=oe,this.isLoading=!0,this.subscriptions=[]}get storedCcLicenseLink(){return this.data.uri}get accepted(){return void 0===this.data.accepted?!!this.data.uri:this.data.accepted}get data(){return this.sectionData.data}selectCcLicense(o){this.getSelectedCcLicense()&&this.getSelectedCcLicense().id===o.id||(this.setAccepted(!1),this.updateSectionData({ccLicense:{id:o.id,fields:{}},uri:void 0}))}getSelectedCcLicense(){return this.submissionCcLicenses&&this.data.ccLicense?this.submissionCcLicenses.filter(o=>o.id===this.data.ccLicense.id)[0]:null}selectOption(o,n,r){this.isSelectedOption(o,n,r)||this.updateSectionData({ccLicense:{id:o.id,fields:Object.assign({},this.data.ccLicense.fields,{[n.id]:r})},accepted:!1})}getSelectedOption(o,n){return"jurisdiction"===n.id&&void 0!==this.defaultJurisdiction&&"none"!==this.defaultJurisdiction?n.enums.find(r=>r.id===this.defaultJurisdiction):this.data.ccLicense.fields[n.id]}
1isSelectedOption(o,n,r){return this.getSelectedOption(o,n)&&this.getSelectedOption(o,n).id===r.id}getCcLicenseLink$(){if(this.storedCcLicenseLink)return(0,be.of)(this.storedCcLicenseLink);if(!this.getSelectedCcLicense()||this.getSelectedCcLicense().fields.some(n=>!this.getSelectedOption(this.getSelectedCcLicense(),n)))return;const o=this.getSelectedCcLicense();return this.submissionCcLicenseUrlDataService.getCcLicenseLink(o,new Map(o.fields.map(n=>[n,this.getSelectedOption(o,n)])))}openInfoModal(o){this.modalRef=this.modalService.open(o)}closeInfoModal(){this.modalRef.close()}getSectionStatus(){return(0,be.of)(this.accepted)}onSectionDestroy(){this.subscriptions.forEach(o=>o.unsubscribe())}onSectionInit(){this.pathCombiner=new F.K("sections",this.sectionData.id),this.subscriptions.push(this.sectionService.getSectionState(this.submissionId,this.sectionData.id,h.i.CcLicense).pipe((0,k.h)(o=>(0,c.UE)(o)&&((0,c.UE)(o.data)||(0,c.UE)(o.errorsToShow))),(0,C.x)(),(0,s.U)(o=>o.data)).subscribe(o=>{if(this.data.accepted!==o.accepted){const n=this.pathCombiner.getPath("uri");o.accepted?this.getCcLicenseLink$().pipe((0,z.q)(1)).subscribe(r=>{this.operationsBuilder.add(n,r.toString(),!1,!0)}):this.data.uri&&this.operationsBuilder.remove(n)}this.sectionData.data=o}),this.submissionCcLicensesDataService.findAll({elementsPerPage:9999}).pipe((0,y.xw)(),(0,y.xe)(),(0,s.U)(o=>o.page)).subscribe(o=>this.submissionCcLicenses=o),this.configService.findByPropertyName("cc.license.jurisdiction").pipe((0,y.hC)(),(0,y.xe)()).subscribe(o=>{this.defaultJurisdiction=void 0===o||0===o.values.length?"":o.values[0]}))}setAccepted(o){this.updateSectionData({accepted:o}),this.updateSectionStatus()}updateSectionData(o){this.sectionService.updateSectionData(this.submissionId,this.sectionData.id,Object.assign({},this.data,o))}}).\u0275fac=function(o){return new(o||Te)(e.\u0275\u0275directiveInject(De.FF),e.\u0275\u0275directiveInject(_e.J),e.\u0275\u0275directiveInject(tt.I),e.\u0275\u0275directiveInject(nt.K),e.\u0275\u0275directiveInject(B.w),e.\u0275\u0275directiveInject(it.i),e.\u0275\u0275directiveInject("collectionIdProvider"),e.\u0275\u0275directiveInject("sectionDataProvider"),e.\u0275\u0275directiveInject("submissionIdProvider"))},Te.\u0275cmp=e.\u0275\u0275defineComponent({type:Te,selectors:[["ds-submission-section-cc-licenses"]],features:[e.\u0275\u0275InheritDefinitionFeature],decls:11,vars:8,consts:[[1,"mb-4","ccLicense-select"],[3,"disabled"],[1,"selection"],[4,"ngIf"],[1,"menu"],["class","dropdown-item disabled",4,"ngIf"],["class","dropdown-item",3,"click",4,"ngFor","ngForOf"],[1,"dropdown-item","disabled"],[1,"dropdown-item",3,"click"],["class","mb-4",4,"ngFor","ngForOf"],[1,"mb-4"],[1,"d-flex","flex-row"],[1,"btn","btn-outline-info","btn-sm","ml-2",3,"click"],[1,"fas","fa-question"],["infoModal",""],[3,"disabled",4,"ngIf"],[1,"modal-header","mb-4"],[3,"innerHTML"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"font-weight-light",3,"innerHTML"],["class","selection",4,"ngVar"],[1,"options-select-menu","overflow-auto"],["class","d-flex flex-row m-1",4,"ngFor","ngForOf"],[1,"d-flex","flex-row","m-1"],[3,"click"],["type","radio",1,"mr-1",3,"title","checked"],[4,"ngVar"],["class","mt-2 p-4 bg-light text-dark",4,"ngIf"],[1,"mt-2","p-4","bg-light","text-dark"],["target","_blank","rel","noopener noreferrer",1,"license-link",3,"href"],[1,"m-2"],["type","checkbox","title","accepted",1,"mr-2",3,"checked"]],template:function(o,n){1&o&&(e.\u0275\u0275elementStart(0,"div",0)(1,"ds-select",1),e.\u0275\u0275elementContainerStart(2,2),e.\u0275\u0275template(3,qt,2,0,"span",3),e.\u0275\u0275template(4,en,2,1,"span",3),e.\u0275\u0275template(5,sn,3,2,"span",3),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(6,4),e.\u0275\u0275template(7,on,3,3,"button",5),e.\u0275\u0275template(8,an,2,1,"button",6),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(9,vn,2,1,"ng-container",3),e.\u0275\u0275template(10,bn,3,3,"ng-container",3)),2&o&&(e.\u0275\u0275advance(1),e.\u0275\u0275property("disabled",!n.submissionCcLicenses),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",!n.submissionCcLicenses),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.getSelectedCcLicense()),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.submissionCcLicenses&&!n.getSelectedCcLicense()),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",0==(null==n.submissionCcLicenses?null:n.submissionCcLicenses.length)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",n.submissionCcLicenses),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.getSelectedCcLicense()),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.getCcLicenseLink$()))},dependencies:[me.sg,me.O5,kt.N,Ke.Z,Ge.g,me.Ov,l.X$],styles:[".options-select-menu[_ngcontent-%COMP%]{max-height:25vh}"]}
1),Te);ze=(0,u.__decorate)([(0,f.E)(h.i.CcLicense),(0,u.__metadata)("design:paramtypes",[De.FF,_e.J,tt.I,nt.K,B.w,it.i,String,Object,String])],ze);var Cn=t(40472),In=t(76844),yn=(t(97359),t(83346),t(13873),t(36424),t(4682));function Mn(a,o){}const Pn=["*"];let st=(()=>{class a extends yn.F{constructor(){super(...arguments),this.inAndOutputNames=["availableAccessConditionOptions","collectionId","collectionPolicyType","configMetadataForm","fileId","fileIndex","fileName","sectionId","submissionId"]}getComponentName(){return"SubmissionSectionUploadFileComponent"}importThemedComponent(n){return t(88402)(`./${n}/app/submission/sections/upload/file/section-upload-file.component`)}importUnthemedComponent(){return Promise.resolve().then(t.bind(t,80434))}}return a.\u0275fac=function(){let o;return function(r){return(o||(o=e.\u0275\u0275getInheritedFactory(a)))(r||a)}}(),a.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["ds-themed-submission-upload-section-file"]],inputs:{availableAccessConditionOptions:"availableAccessConditionOptions",collectionId:"collectionId",collectionPolicyType:"collectionPolicyType",configMetadataForm:"configMetadataForm",fileId:"fileId",fileIndex:"fileIndex",fileName:"fileName",sectionId:"sectionId",submissionId:"submissionId"},features:[e.\u0275\u0275InheritDefinitionFeature],ngContentSelectors:Pn,decls:5,vars:0,consts:[["vcr",""],["content",""]],template:function(n,r){1&n&&(e.\u0275\u0275projectionDef(),e.\u0275\u0275template(0,Mn,0,0,"ng-template",null,0,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275elementStart(2,"div",null,1),e.\u0275\u0275projection(4),e.\u0275\u0275elementEnd())},encapsulation:2}),a})();var ot=t(50867),Tn=t(86769);let Qe=(()=>{class a{constructor(n){this.store=n}getAccessesData(n,r){return this.store.select((0,Tn.y5)(n,r)).pipe((0,k.h)(_=>(0,c.pT)(_)),(0,C.x)())}}return a.\u0275fac=function(n){return new(n||a)(e.\u0275\u0275inject(Ve.yh))},a.\u0275prov=e.\u0275\u0275defineInjectable({token:a,factory:a.\u0275fac}),a})();const Un={id:"discoverable",name:"discoverable"},Bn={element:{container:"custom-control custom-checkbox pl-1",control:"custom-control-input",label:"custom-control-label pt-1"}},An={id:"accessConditionGroup",group:[]},Fn={element:{host:"form-group access-condition-group col",container:"pl-1 pr-1",control:"form-row "}},Ln={id:"accessCondition",groupFactory:null},Rn={grid:{group:"form-row pt-4"}},at={id:"name",label:"submission.sections.accesses.form.access-condition-label",hint:"submission.sections.accesses.form.access-condition-hint",options:[]},jn={element:{host:"col-12",label:"col-form-label name-label"}},Kn={id:"startDate",label:"submission.sections.accesses.form.from-label",hint:"submission.sections.accesses.form.from-hint",placeholder:"submission.sections.accesses.form.from-placeholder",inline:!1,toggleIcon:"far fa-calendar-alt",relations:[{match:ee.O6Y,operator:ee.F8e,when:[]}],required:!0,validators:{required:null},errorMessages:{required:"submission.sections.accesses.form.date-required-from"}},Wn={element:{label:"col-form-label"},grid:{host:"col-6"}},Vn={id:"endDate",label:"submission.sections.accesses.form.until-label",hint:"submission.sections.accesses.form.until-hint",placeholder:"submission.sections.accesses.form.until-placeholder",inline:!1,toggleIcon:"far fa-calendar-alt",relations:[{match:ee.O6Y,operator:ee.F8e,when:[]}],required:!0,validators:{required:null},errorMessages:{required:"submission.sections.accesses.form.date-required-until"}},wn={element:{label:"col-form-label"},grid:{host:"col-6"}};var Oe,$n=t(10102),rt=t(18005),Nn=t(13604),ct=t(16066),Gn=t(1411);let Re=((Oe=class extends $n.o{constructor(o,n,r,_){super("submissionaccessoptions",o,n,r,_),this.requestService=o,this.rdbService=n,this.objectCache=r,this.halService=_}findByHref(o,n=!0,r=!0,..._){return super.findByHref(o,n,r,..._)}}).\u0275fac=function(o){return new(o||Oe)(e.\u0275\u0275inject(pe.s),e.\u0275\u0275inject(ct.Q),e.\u0275\u0275inject(X.a),e.\u0275\u0275inject(rt.q))},Oe.\u0275prov=e.\u0275\u0275defineInjectable({token:Oe,factory:Oe.\u0275fac}),Oe);var Ue;Re=(0,u.__decorate)([(0,Gn.cQ)(Nn.MX),(0,u.__metadata)("design:paramtypes",[pe.s,ct.Q,X.a,rt.q])],Re);const zn=["formRef"];function Qn(a,o){if(1&a){const n=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"ds-form",1,2),e.\u0275\u0275listener("dfChange",function(_){e.\u0275\u0275restoreView(n);const x=e.\u0275\u0275nextContext();
1return e.\u0275\u0275resetView(x.onChange(_))})("removeArrayItem",function(_){e.\u0275\u0275restoreView(n);const x=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(x.onRemove(_))}),e.\u0275\u0275elementEnd()}if(2&a){const n=e.\u0275\u0275nextContext();e.\u0275\u0275property("formId",n.formId)("formModel",n.formModel)("displaySubmit",!1)("displayCancel",!1)}}let Xe=((Ue=class extends d.v{constructor(o,n,r,_,x,M,N,se,oe,he,O){super(void 0,he,O),this.sectionService=o,this.formBuilderService=n,this.accessesConfigService=r,this.accessesService=_,this.formOperationsService=x,this.operationsBuilder=M,this.formService=N,this.translate=se,this.operationsService=oe,this.injectedSectionData=he,this.injectedSubmissionId=O,this.subs=[]}initModelData(o){this.accessesData.accessConditions.forEach((n,r)=>{Array.of("name","startDate","endDate").filter(_=>n.hasOwnProperty(_)&&(0,c.UE)(n[_])).forEach(_=>{const x=this.formBuilderService.findById(_,o,r);if(x)if(x.type===ee.VId){const M=new Date(n[_]);x.value={year:M.getUTCFullYear(),month:M.getUTCMonth()+1,day:M.getUTCDate()}}else x.value=n[_]})})}onChange(o){if(o.model.type===ee.fSU){const n=this.formOperationsService.getFieldPathSegmentedFromChangeEvent(o),r=this.formOperationsService.getFieldValueFromChangeEvent(o);this.operationsBuilder.replace(this.pathCombiner.getPath(n),r.value,!0)}else{if(o.model.id===at.id){const n=o.control.parent.get("startDate"),r=o.control.parent.get("endDate");n?.markAsUntouched(),r?.markAsUntouched(),n?.setValue(null),r?.setValue(null),o.control.parent.markAsDirty()}this.formService.validateAllFormFields(this.formRef.formGroup),this.formService.isValid(this.formId).pipe((0,z.q)(1),(0,k.h)(n=>n),(0,A.z)(()=>this.formService.getFormData(this.formId)),(0,z.q)(1)).subscribe(n=>{const r=[];n.accessCondition.map(_=>_.accessConditionGroup).filter(_=>(0,c.UE)(_)).forEach(_=>{let x;if(this.availableAccessConditionOptions.filter(M=>(0,c.K0)(_.name)&&M.name===_.name[0].value).forEach(M=>x=M),x){const M=Object.assign({},_);if(M.name=this.retrieveValueFromField(_.name),x.hasStartDate){if(_.startDate){const N=this.retrieveValueFromField(_.startDate);M.startDate=(0,E.iV)(N)}}else delete M.startDate;if(x.hasEndDate){if(_.endDate){const N=this.retrieveValueFromField(_.endDate);M.endDate=(0,E.iV)(N)}}else delete M.endDate;r.push(M)}}),this.operationsBuilder.add(this.pathCombiner.getPath("accessConditions"),r,!0)})}}onRemove(o){const r="accessConditions/"+this.formOperationsService.getArrayIndexFromEvent(o);this.operationsBuilder.remove(this.pathCombiner.getPath(r))}onSectionDestroy(){this.subs.filter(o=>(0,c.Uh)(o)).forEach(o=>o.unsubscribe())}onSectionInit(){this.pathCombiner=new F.K("sections",this.sectionData.id),this.formId=this.formService.getUniqueId(this.sectionData.id);const o=this.accessesConfigService.findByHref(this.sectionData.config,!0,!1).pipe((0,y.xw)(),(0,s.U)(r=>r.payload)),n=this.accessesService.getAccessesData(this.submissionId,this.sectionData.id);(0,p.a)([o,n]).subscribe(([r,_])=>{this.availableAccessConditionOptions=(0,c.UE)(r.accessConditionOptions)?r.accessConditionOptions:[],this.canChangeDiscoverable=!!r.canChangeDiscoverable,this.accessesData=_,this.formModel=this.buildFileEditForm()})}getSectionStatus(){return(0,be.of)(!0)}buildFileEditForm(){const o=[];if(this.canChangeDiscoverable){const ue=Object.assign({},Un,{label:this.translate.instant("submission.sections.accesses.form.discoverable-label"),hint:this.translate.instant("submission.sections.accesses.form.discoverable-description"),value:this.accessesData.discoverable});o.push(new ee.dwp(ue,Bn))}const n=Object.assign({},at),r=Object.assign({},Ln),_=[];for(const ue of this.availableAccessConditionOptions)_.push({label:ue.name,value:ue.name});n.options=_;const x=[],M=[];let N,se;this.availableAccessConditionOptions.forEach(ue=>{if(ue.hasStartDate&&(x.push({id:"name",value:ue.name}),ue.maxStartDate)){const ae=new Date(ue.maxStartDate);N={year:ae.getUTCFullYear(),month:ae.getUTCMonth()+1,day:ae.getUTCDate()}}if(ue.hasEndDate&&(M.push({id:"name",value:ue.name}),ue.maxEndDate)){const ae=new Date(ue.maxEndDate);se={year:ae.getUTCFullYear(),month:ae.getUTCMonth()+1,day:ae.getUTCDate()}}});const oe={relations:[{match:ee.O6Y,operator:ee.F8e,when:x}]},he={relations:[{match:ee.O6Y,operator:ee.F8e,when:M}]},O=x.length>0,ce=M.length>0;return r.groupFactory=()=>{const ue=new ee.nMt(n,jn),ae=Object.assign({},Kn,oe);N&&(ae.max=N);const de=Object.assign({},Vn,he);se&&(de.max=se);const ge=new ee.oqv(ae,Wn),Fe=new ee.oqv(de,wn),xe=Object.assign({},An);return xe.group=[ue],O&&xe.group.push(ge),ce&&xe.group.push(Fe),[new ee.S_O(xe,Fn)]},r.initialCount=(0,c.UE)(this.accessesData.accessConditions)?this.accessesData.accessConditions.length:1,o.push(new ee.RRz(r,Rn)),this.initModelData(o),o}retrieveValueFromField(o){const n=Array.isArray(o)?o[0]:o;return n?n.value:void 0}}).\u0275fac=function(o){return new(o||Ue)(e.\u0275\u0275directiveInject(_e.J),e.\u0275\u0275directiveInject(te.c),e.\u0275\u0275directiveInject(Re),e.\u0275\u0275directiveInject(Qe),e.\u0275\u0275directiveInject(Q),e.\u0275\u0275directiveInject(B.w),e.\u0275\u0275directiveInject(q.o),e.\u0275\u0275directiveInject(l.sK),e.\u0275\u0275directiveInject($e.E),e.\u0275\u0275directiveInject("sectionDataProvider"),e.\u0275\u0275directiveInject("submissionIdProvider"))},Ue.\u0275cmp=e.\u0275\u0275defineComponent({type:Ue,selectors:[["ds-section-accesses"]],viewQuery:function(o,n){if(1&o&&e.\u0275\u0275viewQuery(zn,5),2&o){let r;e.\u0275\u0275queryRefresh(r=e.\u0275\u0275loadQuery())&&(n.formRef=r.first)}},features:[e.\u0275\u0275InheritDefinitionFeature],decls:1,vars:1,consts:[[3,"formId","formModel","displaySubmit","displayCancel","dfChange","removeArrayItem",4,"ngIf"],[3,"formId","formModel","displaySubmit","displayCancel","dfChange","removeArrayItem"],["formRef","formComponent"]],template:function(o,n){1&o&&e.\u0275\u0275template(0,Qn,2,4,"ds-form",0),2&o&&e.\u0275\u0275property("ngIf",!!n.formModel)},dependencies:[me.O5,U.U],styles:[".access-condition-group{position:relative;top:-2.3rem;margin-bottom:-2.3rem}"]}),Ue);Xe=(0,u.__decorate)([(0,f.E)(h.i.AccessesCondition),(0,u.__metadata)("design:paramtypes",[_e.J,te.c,Re,Qe,Q,B.w,q.o,l.sK,$e.E,Object,String])],Xe);var Ye=t(60987),lt=t(87586);function Xn(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"span"),e.\u0275\u0275element(1,"i",15),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd()),2&a){const n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate2(" ",n.version.embargo.amount," ",null==n.version.embargo?null:n.version.embargo.units[0],"")}}function Yn(a,o){1&a&&(e.\u0275\u0275elementStart(0,"span"),e.\u0275\u0275element(1,"i",15),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd()),2&a&&(e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(3,1,"submission.sections.sherpa.publisher.policy.noembargo"),""))}function Jn(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"span"),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const n=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1("+",n.version.locations.length-1,"")}}function Hn(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"span"),e.\u0275\u0275text(1),e.\u0275\u0275template(2,Jn,2,1,"span",16),e.\u0275\u0275elementEnd()),2&a){const n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",n.version.locations[0]," "),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.version.locations.length>1)}}function Zn(a,o){1&a&&(e.\u0275\u0275elementStart(0,"span"),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275elementEnd()),2&a&&(e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(2,1,"submission.sections.sherpa.publisher.policy.nolocation")))}function kn(a,o){1&a&&e.\u0275\u0275element(0,"span",17)}function qn(a,o){1&a&&e.\u0275\u0275element(0,"span",18)}function ei(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"p",23),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const n=e.\u0275\u0275nextContext(3);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate2("",n.version.embargo.amount," ",n.version.embargo.units,"")}}function ti(a,o){1&a&&(e.\u0275\u0275elementStart(0,"p",23),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275elementEnd()),2&a&&(e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(2,1,"submission.sections.sherpa.publisher.policy.noembargo")))}function ni(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"div",21)(1,"div",22)(2,"p",23),e.\u0275\u0275element(3,"i",15),e.\u0275\u0275text(4),e.\u0275\u0275pipe(5,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(6,"div",24),e.\u0275\u0275template(7,ei,2,2,"p",25),e.\u0275\u0275template(8,ti,3,3,"ng-template",null,26,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275elementEnd()()),2&a){const n=e.\u0275\u0275reference(9),r=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(5,3,"submission.sections.sherpa.publisher.policy.embargo"),""),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",!!r.version.embargo)("ngIfElse",n)}}function ii(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"p",23),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const n=o.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(n)}}function si(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"div",21)(1,"div",22)(2,"p",23),e.\u0275\u0275element(3,"i",27),e.\u0275\u0275text(4),e.\u0275\u0275pipe(5,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(6,"div",24),e.\u0275\u0275template(7,ii,2,1,"p",28),e.\u0275\u0275elementEnd()()),2&a){const n=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(5,2,"submission.sections.sherpa.publisher.policy.license"),""),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngForOf",n.version.licenses)}}function oi(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"p",23),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const n=o.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(n)}}function ai(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"div",21)(1,"div",22)(2,"p",23),e.\u0275\u0275element(3,"i",29),e.\u0275\u0275text(4),e.\u0275\u0275pipe(5,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(6,"div",24),e.\u0275\u0275template(7,oi,2,1,"p",28),e.\u0275\u0275elementEnd()()),2&a){const n=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(5,2,"submission.sections.sherpa.publisher.policy.prerequisites"),""),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngForOf",n.version.prerequisites)}}function ri(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"p",23),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const n=o.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(n)}}function ci(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"div",21)(1,"div",22)(2,"p",23),e.\u0275\u0275element(3,"i",7),e.\u0275\u0275text(4),e.\u0275\u0275pipe(5,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(6,"div",24),e.\u0275\u0275template(7,ri,2,1,"p",28),e.\u0275\u0275elementEnd()()),2&a){const n=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(5,2,"submission.sections.sherpa.publisher.policy.location"),""),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngForOf",n.version.locations)}}function li(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"p",23),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const n=o.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(n)}}function di(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"div",21)(1,"div",22)(2,"p",23),e.\u0275\u0275element(3,"i",30),e.\u0275\u0275text(4),e.\u0275\u0275pipe(5,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(6,"div",24),e.\u0275\u0275template(7,li,2,1,"p",28),e.\u0275\u0275elementEnd()()),2&a){const n=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(5,2,"submission.sections.sherpa.publisher.policy.conditions"),""),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngForOf",n.version.conditions)}}function pi(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"div",19),e.\u0275\u0275template(1,ni,10,5,"div",20),e.\u0275\u0275template(2,si,8,4,"div",20),e.\u0275\u0275template(3,ai,8,4,"div",20),e.\u0275\u0275template(4,ci,8,4,"div",20),e.\u0275\u0275template(5,di,8,4,"div",20),e.\u0275\u0275elementEnd()),2&a){const n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!(null==n.version||!n.version.embargo||null==n.version||!n.version.embargo.amount)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!(null==n.version||!n.version.licenses)&&n.version.licenses.length>0),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!(null==n.version||!n.version.prerequisites)&&n.version.prerequisites.length>0),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!(null==n.version||!n.version.locations)&&n.version.locations.length>0),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!(null==n.version||!n.version.conditions)&&n.version.conditions.length>0)}}let dt=(()=>{class a{constructor(){this.isCollapsed=!0}}return a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["ds-content-accordion"]],inputs:{version:"version"},decls:22,vars:15,consts:[["data-test","collapse",1,"mb-3","border-bottom"],[1,"w-100","d-flex","justify-content-between","collapse-toggle",3,"click"],[1,"d-flex"],["type","button","aria-controls","collapseExample",1,"btn","btn-link","p-0","mr-4",3,"click"],[4,"ngIf","ngIfElse"],["noEmbargoTitle",""],[1,"m-1","ml-4"],[1,"far","fa-folder-open"],["noLocations",""],[1,"d-inline-block"],["class","fas fa-chevron-down",4,"ngIf"],["class","fas fa-chevron-up",4,"ngIf"],[3,"ngbCollapse"],["collapse","ngbCollapse"],["class","ml-4",4,"ngIf"],[1,"fas","fa-hourglass-half"],[4,"ngIf"],[1,"fas","fa-chevron-down"],[1,"fas","fa-chevron-up"],[1,"ml-4"],["class","row",4,"ngIf"],[1,"row"],[1,"col-4"],[1,"m-1"],[1,"col-6"],["class","m-1",4,"ngIf","ngIfElse"],["noEmbargo",""],[1,"fas","fa-certificate"],["class","m-1",4,"ngFor","ngForOf"],[1,"fas","fa-exclamation-circle"],[1,"fas","fa-tasks"]],template:function(n,r){if(1&n){const _=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",0)(1,"div",1),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(_);const M=e.\u0275\u0275reference(20);
1return e.\u0275\u0275resetView(M.toggle())}),e.\u0275\u0275elementStart(2,"div",2)(3,"button",3),e.\u0275\u0275listener("click",function(M){return M.preventDefault()}),e.\u0275\u0275text(4),e.\u0275\u0275pipe(5,"titlecase"),e.\u0275\u0275pipe(6,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(7,"div"),e.\u0275\u0275template(8,Xn,3,2,"span",4),e.\u0275\u0275template(9,Yn,4,3,"ng-template",null,5,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275elementStart(11,"span",6),e.\u0275\u0275element(12,"i",7),e.\u0275\u0275template(13,Hn,3,2,"span",4),e.\u0275\u0275template(14,Zn,3,3,"ng-template",null,8,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(16,"div",9),e.\u0275\u0275template(17,kn,1,0,"span",10),e.\u0275\u0275template(18,qn,1,0,"span",11),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(19,"div",12,13),e.\u0275\u0275template(21,pi,6,5,"div",14),e.\u0275\u0275elementEnd()()}if(2&n){const _=e.\u0275\u0275reference(10),x=e.\u0275\u0275reference(15),M=e.\u0275\u0275reference(20);e.\u0275\u0275advance(3),e.\u0275\u0275attribute("aria-expanded",!M.collapsed),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate2(" ",e.\u0275\u0275pipeBind1(5,11,r.version.articleVersion)," ",e.\u0275\u0275pipeBind1(6,13,"submission.sections.sherpa.publisher.policy.version")," "),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",!(null==r.version||!r.version.embargo||null==r.version||!r.version.embargo.amount))("ngIfElse",_),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngIf",!(null==r.version||!r.version.locations)&&r.version.locations.length>0)("ngIfElse",x),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",M.collapsed),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!M.collapsed),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngbCollapse",r.isCollapsed),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",!!r.version)}},dependencies:[me.sg,me.O5,De._D,me.rS,l.X$]}),a})();function mi(a,o){1&a&&e.\u0275\u0275element(0,"ds-content-accordion",3),2&a&&e.\u0275\u0275property("version",o.$implicit)}function ui(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"li")(1,"a",8),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd()()),2&a){const n=o.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275propertyInterpolate("href",n.key,e.\u0275\u0275sanitizeUrl),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(n.value)}}function _i(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"div",4)(1,"div",5)(2,"p",6),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"ul"),e.\u0275\u0275template(6,ui,3,2,"li",7),e.\u0275\u0275pipe(7,"keyvalue"),e.\u0275\u0275elementEnd()()()),2&a){const n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(4,2,"submission.sections.sherpa.publisher.policy.more.information")," "),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngForOf",e.\u0275\u0275pipeBind1(7,4,n.policy.urls))}}let pt=(()=>{class a{constructor(){this.AlertTypeEnum=Ye.N}}return a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["ds-publisher-policy"]],inputs:{policy:"policy"},decls:3,vars:2,consts:[[1,"ml-4"],[3,"version",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],[3,"version"],[1,"row"],[1,"col-12"],[1,"m-1"],[4,"ngFor","ngForOf"],["target","_blank","rel","noopener noreferrer",3,"href"]],template:function(n,r){1&n&&(e.\u0275\u0275elementStart(0,"div",0),e.\u0275\u0275template(1,mi,1,1,"ds-content-accordion",1),e.\u0275\u0275template(2,_i,8,6,"div",2),e.\u0275\u0275elementEnd()),2&n&&(e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",r.policy.permittedVersions),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!(null==r.policy||!r.policy.urls)))},dependencies:[me.sg,me.O5,dt,me.Nd,l.X$]}),a})();function hi(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"p",4),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const n=o.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1("",n," ")}}function fi(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"p",4),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(5,"div",3),e.\u0275\u0275template(6,hi,2,1,"p",5),e.\u0275\u0275elementEnd()()),2&a){const n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(4,2,"submission.sections.sherpa.publication.information.title")),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngForOf",n.journal.titles)}}function vi(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"p",4),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const n=o.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1("",n," ")}}function gi(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"p",4),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(5,"div",3),e.\u0275\u0275template(6,vi,2,1,"p",5),e.\u0275\u0275elementEnd()()),2&a){const n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(4,2,"submission.sections.sherpa.publication.information.issns")),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngForOf",n.journal.issns)}}function Si(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"p",4),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(5,"div",3)(6,"p",4)(7,"a",6),e.\u0275\u0275text(8),e.\u0275\u0275elementEnd()()()()),2&a){const n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(4,3,"submission.sections.sherpa.publication.information.url")),e.\u0275\u0275advance(4),e.\u0275\u0275propertyInterpolate("href",n.journal.url,e.\u0275\u0275sanitizeUrl),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",n.journal.url," ")}}function Ei(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"div",3)(1,"p",4)(2,"a",6),e.\u0275\u0275text(3),e.\u0275\u0275elementEnd()()()),2&a){const n=o.$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275propertyInterpolate("href",n.uri,e.\u0275\u0275sanitizeUrl),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",n.name," ")}}function bi(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"p",4),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(5,Ei,4,2,"div",7),e.\u0275\u0275elementEnd()),2&a){const n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(4,2,"submission.sections.sherpa.publication.information.publishers")),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngForOf",n.journal.publishers)}}function Ci(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"p",4),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(5,"div",3)(6,"p",4),e.\u0275\u0275text(7),e.\u0275\u0275elementEnd()()()),2&a){const n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(4,2,"submission.sections.sherpa.publication.information.romeoPub")),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",n.journal.romeoPub," ")}}function Ii(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"p",4),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(5,"div",3)(6,"p",4),e.\u0275\u0275text(7),e.\u0275\u0275elementEnd()()()),2&a){const n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(4,2,"submission.sections.sherpa.publication.information.zetoPub")),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",n.journal.zetoPub," ")}}let mt=(()=>{class a{}return a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["ds-publication-information"]],inputs:{journal:"journal"},decls:7,vars:6,consts:[[1,"ml-4"],["class","row",4,"ngIf"],[1,"row"],[1,"col-4"],[1,"m-1"],["class","m-1",4,"ngFor","ngForOf"],["target","_blank","rel","noopener noreferrer",3,"href"],["class","col-4",4,"ngFor","ngForOf"]],template:function(n,r){1&n&&(e.\u0275\u0275elementStart(0,"div",0),e.\u0275\u0275template(1,fi,7,4,"div",1),e.\u0275\u0275template(2,gi,7,4,"div",1),e.\u0275\u0275template(3,
1Si,9,5,"div",1),e.\u0275\u0275template(4,bi,6,4,"div",1),e.\u0275\u0275template(5,Ci,8,4,"div",1),e.\u0275\u0275template(6,Ii,8,4,"div",1),e.\u0275\u0275elementEnd()),2&n&&(e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!(null==r.journal||!r.journal.titles)&&r.journal.titles.length>0),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!(null==r.journal||!r.journal.issns)&&r.journal.issns.length>0),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!(null==r.journal||!r.journal.url)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!(null==r.journal||!r.journal.publishers)&&r.journal.publishers.length>0),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!(null==r.journal||!r.journal.romeoPub)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!(null==r.journal||!r.journal.zetoPub)))},dependencies:[me.sg,me.O5,l.X$]}),a})();function xi(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"p",4),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(5,"div",5)(6,"p",4),e.\u0275\u0275text(7),e.\u0275\u0275elementEnd()()()),2&a){const n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(4,2,"submission.sections.sherpa.record.information.id")),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1("",n.metadata.id," ")}}function Di(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"p",4),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(5,"div",5)(6,"p",4),e.\u0275\u0275text(7),e.\u0275\u0275pipe(8,"date"),e.\u0275\u0275elementEnd()()()),2&a){const n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(4,2,"submission.sections.sherpa.record.information.date.created")),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1("",e.\u0275\u0275pipeBind2(8,4,n.metadata.dateCreated,"d MMMM Y H:mm:ss zzzz")," ")}}function Oi(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"p",4),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(5,"div",5)(6,"p",4),e.\u0275\u0275text(7),e.\u0275\u0275pipe(8,"date"),e.\u0275\u0275elementEnd()()()),2&a){const n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(4,2,"submission.sections.sherpa.record.information.date.modified")),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1("",e.\u0275\u0275pipeBind2(8,4,n.metadata.dateModified,"d MMMM Y H:mm:ss zzzz")," ")}}function yi(a,o){if(1&a&&(e.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"p",4),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(5,"div",5)(6,"p",4)(7,"a",6),e.\u0275\u0275text(8),e.\u0275\u0275elementEnd()()()()),2&a){const n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(4,3,"submission.sections.sherpa.record.information.uri")),e.\u0275\u0275advance(4),e.\u0275\u0275property("href",n.metadata.uri,e.\u0275\u0275sanitizeUrl),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(n.metadata.uri)}}let ut=(()=>{class a{}return a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["ds-metadata-information"]],inputs:{metadata:"metadata"},decls:5,vars:4,consts:[[1,"ml-4"],["class","row",4,"ngIf"],[1,"row"],[1,"col-4"],[1,"m-1"],[1,"col-8"],["target","_blank",3,"href"]],template:function(n,r){1&n&&(e.\u0275\u0275elementStart(0,"div",0),e.\u0275\u0275template(1,xi,8,4,"div",1),e.\u0275\u0275template(2,Di,9,7,"div",1),e.\u0275\u0275template(3,Oi,9,7,"div",1),e.\u0275\u0275template(4,yi,9,5,"div",1),e.\u0275\u0275elementEnd()),2&n&&(e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!(null==r.metadata||!r.metadata.id)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!(null==r.metadata||!r.metadata.dateCreated)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!(null==r.metadata||!r.metadata.dateModified)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!(null==r.metadata||!r.metadata.uri)))},dependencies:[me.O5,me.uU,l.X$]}
1),a})();var Be;function Mi(a,o){1&a&&e.\u0275\u0275element(0,"ds-alert",3),2&a&&e.\u0275\u0275property("type","alert-info")("content","submission.sections.sherpa-policy.title-empty")}function Pi(a,o){if(1&a){const n=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",4)(1,"ds-alert",5),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div")(5,"button",6),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(n);const _=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(_.refresh())}),e.\u0275\u0275elementStart(6,"span"),e.\u0275\u0275element(7,"i",7),e.\u0275\u0275text(8),e.\u0275\u0275pipe(9,"translate"),e.\u0275\u0275elementEnd()()()()}2&a&&(e.\u0275\u0275advance(1),e.\u0275\u0275property("type","alert-info"),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(3,3,"submission.sections.sherpa.publisher.policy.description")," "),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(9,5,"submission.sections.sherpa.publisher.policy.refresh")," "))}function Ti(a,o){1&a&&e.\u0275\u0275element(0,"span",21)}function Ui(a,o){1&a&&e.\u0275\u0275element(0,"span",22)}function Bi(a,o){1&a&&e.\u0275\u0275element(0,"span",21)}function Ai(a,o){1&a&&e.\u0275\u0275element(0,"span",22)}function Fi(a,o){if(1&a){const n=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",10)(1,"div",11),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(n);const _=e.\u0275\u0275reference(9);
1return e.\u0275\u0275resetView(_.toggle())}),e.\u0275\u0275elementStart(2,"button",12),e.\u0275\u0275listener("click",function(_){return _.preventDefault()}),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"div",13),e.\u0275\u0275template(6,Bi,1,0,"span",14),e.\u0275\u0275template(7,Ai,1,0,"span",15),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(8,"div",16,17),e.\u0275\u0275element(10,"ds-publisher-policy",23),e.\u0275\u0275elementEnd()()}if(2&a){const n=o.$implicit,r=e.\u0275\u0275reference(9),_=e.\u0275\u0275nextContext(4);e.\u0275\u0275advance(2),e.\u0275\u0275attribute("aria-expanded",!r.collapsed),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(4,6,"submission.sections.sherpa.publisher.policy")," "),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",r.collapsed),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!r.collapsed),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngbCollapse",_.isCollapsed),e.\u0275\u0275advance(2),e.\u0275\u0275property("policy",n)}}function Li(a,o){if(1&a){const n=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",10)(2,"div",11),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(n);const _=e.\u0275\u0275reference(10);
1return e.\u0275\u0275resetView(_.toggle())}),e.\u0275\u0275elementStart(3,"button",12),e.\u0275\u0275listener("click",function(_){return _.preventDefault()}),e.\u0275\u0275text(4),e.\u0275\u0275pipe(5,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(6,"div",13),e.\u0275\u0275template(7,Ti,1,0,"span",14),e.\u0275\u0275template(8,Ui,1,0,"span",15),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(9,"div",16,17),e.\u0275\u0275element(11,"ds-publication-information",19),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(12,Fi,11,8,"div",20),e.\u0275\u0275elementContainerEnd()}if(2&a){const n=o.$implicit,r=e.\u0275\u0275reference(10),_=e.\u0275\u0275nextContext(3);e.\u0275\u0275advance(3),e.\u0275\u0275attribute("aria-expanded",!r.collapsed),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(5,7,"submission.sections.sherpa.publication.information")," "),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",r.collapsed),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!r.collapsed),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngbCollapse",_.isCollapsed),e.\u0275\u0275advance(2),e.\u0275\u0275property("journal",n),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",n.policies)}}function Ri(a,o){1&a&&e.\u0275\u0275element(0,"span",21)}function ji(a,o){1&a&&e.\u0275\u0275element(0,"span",22)}function Ki(a,o){if(1&a){const n=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,Li,13,9,"ng-container",9),e.\u0275\u0275elementStart(2,"div",10)(3,"div",11),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(n);const _=e.\u0275\u0275reference(11);
1return e.\u0275\u0275resetView(_.toggle())}),e.\u0275\u0275elementStart(4,"button",12),e.\u0275\u0275listener("click",function(_){return _.preventDefault()}),e.\u0275\u0275text(5),e.\u0275\u0275pipe(6,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(7,"div",13),e.\u0275\u0275template(8,Ri,1,0,"span",14),e.\u0275\u0275template(9,ji,1,0,"span",15),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(10,"div",16,17),e.\u0275\u0275element(12,"ds-metadata-information",18),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementContainerEnd()}if(2&a){const n=e.\u0275\u0275reference(11),r=e.\u0275\u0275nextContext().ngVar,_=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",r.journals),e.\u0275\u0275advance(3),e.\u0275\u0275attribute("aria-expanded",!n.collapsed),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(6,7,"submission.sections.sherpa.record.information")," "),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",n.collapsed),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!n.collapsed),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngbCollapse",_.isCollapsed),e.\u0275\u0275advance(2),e.\u0275\u0275property("metadata",r.metadata)}}function Wi(a,o){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275element(1,"ds-alert",3),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275elementContainerEnd()),2&a){const n=e.\u0275\u0275nextContext().ngVar,r=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("type",r.AlertTypeEnum.Error)("content",n.message?n.message:e.\u0275\u0275pipeBind1(2,2,"submission.sections.sherpa.error.message"))}}function Vi(a,o){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,Ki,13,9,"ng-container",8),e.\u0275\u0275template(2,Wi,3,4,"ng-container",8),e.\u0275\u0275elementContainerEnd()),2&a){const n=o.ngVar,r=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!r.hasNoData()&&!!n&&!n.error),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!!n&&n.error)}}let Je=((Be=class extends d.v{constructor(o,n,r,_,x){super(void 0,_,x),this.sectionService=o,this.operationsBuilder=n,this.submissionService=r,this.injectedSectionData=_,this.injectedSubmissionId=x,this.sherpaPoliciesData$=new v.X(null),this.subs=[],this.isCollapsed=!1,this.AlertTypeEnum=Ye.N}onSectionDestroy(){this.subs.filter(o=>(0,c.Uh)(o)).forEach(o=>o.unsubscribe())}onSectionInit(){this.pathCombiner=new F.K("sections",this.sectionData.id),this.subs.push(this.sectionService.getSectionData(this.submissionId,this.sectionData.id,this.sectionData.sectionType).subscribe(o=>{this.sherpaPoliciesData$.next(o)}))}getSectionStatus(){return(0,be.of)(!0)}hasNoData(){return(0,c.xb)(this.sherpaPoliciesData$.value)}refresh(){this.operationsBuilder.remove(this.pathCombiner.getPath("retrievalTime")),this.submissionService.dispatchSaveSection(this.submissionId,this.sectionData.id)}}).\u0275fac=function(o){return new(o||Be)(e.\u0275\u0275directiveInject(_e.J),e.\u0275\u0275directiveInject(B.w),e.\u0275\u0275directiveInject(g.b),e.\u0275\u0275directiveInject("sectionDataProvider"),e.\u0275\u0275directiveInject("submissionIdProvider"))},Be.\u0275cmp=e.\u0275\u0275defineComponent({type:Be,selectors:[["ds-section-sherpa-policies"]],features:[e.\u0275\u0275InheritDefinitionFeature],decls:4,vars:5,consts:[[3,"type","content",4,"ngIf"],["class","d-flex flex-column flex-nowrap mt-2 mb-4",4,"ngIf"],[4,"ngVar"],[3,"type","content"],[1,"d-flex","flex-column","flex-nowrap","mt-2","mb-4"],[3,"type"],["type","button","data-test","refresh-btn",1,"btn","btn-secondary","float-right",3,"click"],[1,"fas","fa-sync"],[4,"ngIf"],[4,"ngFor","ngForOf"],["data-test","collapse",1,"mb-3","border-bottom"],[1,"w-100","d-flex","justify-content-between","collapse-toggle","mb-3",3,"click"],["type","button","aria-controls","collapseExample",1,"btn","btn-link","p-0",3,"click"],[1,"d-inline-block"],["class","fas fa-chevron-down",4,"ngIf"],["class","fas fa-chevron-up",4,"ngIf"],[3,"ngbCollapse"],["collapse","ngbCollapse"],[3,"metadata"],[3,"journal"],["class","mb-3 border-bottom","data-test","collapse",4,"ngFor","ngForOf"],[1,"fas","fa-chevron-down"],[1,"fas","fa-chevron-up"],[3,"policy"]],template:function(o,n){if(1&o&&(e.\u0275\u0275template(0,Mi,1,2,"ds-alert",0),e.\u0275\u0275template(1,Pi,10,7,"div",1),e.\u0275\u0275template(2,Vi,3,2,"ng-container",2),e.\u0275\u0275pipe(3,"async")),2&o){let r;e.\u0275\u0275property("ngIf",n.hasNoData()),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!n.hasNoData()),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngVar",null==(r=e.\u0275\u0275pipeBind1(3,3,n.sherpaPoliciesData$))?null:r.sherpaResponse)}},dependencies:[me.sg,me.O5,lt.w,Ge.g,De._D,pt,mt,ut,me.Ov,l.X$]}),Be);Je=(0,u.__decorate)([(0,f.E)(h.i.SherpaPolicies),(0,u.__metadata)("design:paramtypes",[_e.J,B.w,g.b,Object,String])],Je);var Ae,wi=t(89716),$i=t(42878);function Ni(a,o){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"li"),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd()),2&a){const n=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate2("",e.\u0275\u0275pipeBind1(3,2,"submission.sections.identifiers."+n.identifierType+"_label")," ",n.value,"")}}function Gi(a,o){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,Ni,4,4,"ng-container",1),e.\u0275\u0275elementContainerEnd()),2&a){const n=o.$implicit,r=e.\u0275\u0275nextContext(2).ngVar;e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",r.displayTypes.includes(n.identifierType)&&n.value)}}function zi(a,o){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div")(2,"span"),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"ul"),e.\u0275\u0275template(6,Gi,2,1,"ng-container",2),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementContainerEnd()),2&a){const n=e.\u0275\u0275nextContext().ngVar;e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(4,2,"submission.sections.identifiers.info")),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngForOf",n.identifiers)}}function Qi(a,o){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,zi,7,4,"ng-container",1),e.\u0275\u0275elementContainerEnd()),2&a){const n=o.ngVar;e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n&&n.identifiers)}}let He=((Ae=class extends d.v{constructor(o,n,r,_,x,M){super(_,x,M),this.translate=o,this.sectionService=n,this.submissionService=r,this.injectedCollectionId=_,this.injectedSectionData=x,this.injectedSubmissionId=M,this.AlertTypeEnum=Ye.N,this.isLoading=!0,this.identifierData$=new $i.y,this.subs=[]}ngOnInit(){super.ngOnInit()}onSectionInit(){this.isLoading=!1,this.identifierData$=this.getIdentifierData()}isReadOnly(){return!0}onSectionDestroy(){}getSectionStatus(){return(0,be.of)(!this.isLoading)}getIdentifierData(){return this.sectionService.getSectionData(this.submissionId,this.sectionData.id,this.sectionData.sectionType)}}).\u0275fac=function(o){return new(o||Ae)(e.\u0275\u0275directiveInject(l.sK),e.\u0275\u0275directiveInject(_e.J),e.\u0275\u0275directiveInject(g.b),e.\u0275\u0275directiveInject("collectionIdProvider"),e.\u0275\u0275directiveInject("sectionDataProvider"),e.\u0275\u0275directiveInject("submissionIdProvider"))},Ae.\u0275cmp=e.\u0275\u0275defineComponent({type:Ae,selectors:[["ds-submission-section-identifiers"]],features:[e.\u0275\u0275InheritDefinitionFeature],decls:2,vars:3,consts:[[4,"ngVar"],[4,"ngIf"],[4,"ngFor","ngForOf"]],template:function(o,n){1&o&&(e.\u0275\u0275template(0,Qi,2,1,"ng-container",0),e.\u0275\u0275pipe(1,"async")),2&o&&e.\u0275\u0275property("ngVar",e.\u0275\u0275pipeBind1(1,1,n.getIdentifierData()))},dependencies:[me.sg,me.O5,Ge.g,me.Ov,l.X$],encapsulation:2}),Ae);He=(0,u.__decorate)([(0,f.E)(h.i.Identifiers),(0,u.__metadata)("design:paramtypes",[l.sK,_e.J,g.b,String,Object,String])],He);const _t=[Ze.vk,We,Ne,ze,Xe,Je];let Xi=(()=>{class a{static withEntryComponents(){return{ngModule:a,providers:_t.map(n=>({provide:n}))}}}return a.\u0275fac=function(n){return new(n||a)},a.\u0275mod=e.\u0275\u0275defineNgModule({type:a}),a.\u0275inj=e.\u0275\u0275defineInjector({providers:[Lt.K,_e.J,wt.w,Re,Qe,Q],imports:[me.ez,i.IR.forRoot(),m.m,Ve.Aw.forFeature
1("submission",It.L,Xt.z7),le.sQ.forFeature(Ft),Cn.x.withEntryComponents(),In.a.withEntryComponents(),ot.e,De.bz,De.lQ,De.Gs,wi.c,ot.e]}),a})();e.\u0275\u0275setComponentScope(Ze.vk,function(){return[me.sg,me.O5,lt.w,et.O,st]},function(){return[me.Ov,l.X$]})},69653:(ie,W,t)=>{"use strict";t.r(W),t.d(W,{SubmissionSubmitComponent:()=>S});var i=t(35841),m=t(21160),u=t(3358),e=t(45608),p=t(65384),v=t(93033),s=t(10572),I=t(29442),A=t(98678),z=t(67522),k=t(96342);let S=(()=>{class C{constructor(D,j,V,Y,te,U,q,d){this.changeDetectorRef=D,this.notificationsService=j,this.router=V,this.itemDataService=Y,this.submissionService=te,this.translate=U,this.viewContainerRef=q,this.route=d,this.itemLink$=new i.X(void 0),this.subs=[],this.route.queryParams.subscribe(J=>{this.collectionParam=J.collection})}ngOnInit(){this.subs.push(this.submissionService.createSubmission(this.collectionParam).subscribe(D=>{(0,e.K0)(D)&&((0,e.xb)(D)?(this.notificationsService.info(null,this.translate.get("submission.general.cannot_submit")),this.router.navigate(["/mydspace"])):this.router.navigate(["/workspaceitems",D.id,"edit"],{replaceUrl:!0}))}),this.itemLink$.pipe((0,e.iy)(),(0,m.w)(D=>this.itemDataService.findByHref(D)),(0,s.g1)(),(0,u.b)(300)).subscribe(D=>{this.item=D.payload,this.changeDetectorRef.detectChanges()}))}ngOnDestroy(){this.subs.filter(D=>(0,e.Uh)(D)).forEach(D=>D.unsubscribe()),this.viewContainerRef.clear(),this.changeDetectorRef.markForCheck()}}return C.\u0275fac=function(D){return new(D||C)(A.\u0275\u0275directiveInject(A.ChangeDetectorRef),A.\u0275\u0275directiveInject(p.T),A.\u0275\u0275directiveInject(z.F0),A.\u0275\u0275directiveInject(I.S),A.\u0275\u0275directiveInject(v.b),A.\u0275\u0275directiveInject(k.sK),A.\u0275\u0275directiveInject(A.ViewContainerRef),A.\u0275\u0275directiveInject(z.gz))},C.\u0275cmp=A.\u0275\u0275defineComponent({type:C,selectors:[["ds-submission-submit"]],decls:0,vars:0,template:function(D,j){}}
1),C})()},83346:(ie,W,t)=>{"use strict";t.d(W,{Y:()=>p});var i=t(4682),m=t(98678);function u(v,s){}const e=["*"];let p=(()=>{class v extends i.F{getComponentName(){return"SubmissionSubmitComponent"}importThemedComponent(I){return t(39881)(`./${I}/app/submission/submit/submission-submit.component`)}importUnthemedComponent(){return Promise.resolve().then(t.bind(t,69653))}}return v.\u0275fac=function(){let s;return function(A){return(s||(s=m.\u0275\u0275getInheritedFactory(v)))(A||v)}}(),v.\u0275cmp=m.\u0275\u0275defineComponent({type:v,selectors:[["ds-themed-submission-submit"]],features:[m.\u0275\u0275InheritDefinitionFeature],ngContentSelectors:e,decls:5,vars:0,consts:[["vcr",""],["content",""]],template:function(I,A){1&I&&(m.\u0275\u0275projectionDef(),m.\u0275\u0275template(0,u,0,0,"ng-template",null,0,m.\u0275\u0275templateRefExtractor),m.\u0275\u0275elementStart(2,"div",null,1),m.\u0275\u0275projection(4),m.\u0275\u0275elementEnd())},encapsulation:2}),v})()},14297:(ie,W,t)=>{"use strict";t.d(W,{Z:()=>p});var i=t(45608);const m=/([^\/]+)/g,u=/\/sections\/(.*)/,p=v=>("string"==typeof v?[v]:v).map(I=>I.match(m)&&I.match(m).length>2?{sectionId:I.match(m)[1],fieldId:I.match(m)[2],fieldIndex:(0,i.Uh)(I.match(m)[3])?+I.match(m)[3]:0,originalPath:I}:{sectionId:I.match(u)[1],originalPath:I})},97176:(ie,W,t)=>{"use strict";t.d(W,{Z:()=>u});var i=t(14297);const u=(e=[])=>{const p=Object.create({});return e.forEach(v=>{(0,i.Z)(v.paths).forEach(I=>{const A={path:I.originalPath,message:v.message};p[I.sectionId]||(p[I.sectionId]=[]),p[I.sectionId].push(A)})}),p}},56246:(ie,W,t)=>{var i=t(6380),m=t(86667),u=t(40976),e=t(91609),p=m(function(v){return u(i(v,1,e,!0))});ie.exports=p},75004:(ie,W,t)=>{var i=t(40976);ie.exports=function m(u){return u&&u.length?i(u):[]}},8377:(ie,W,t)=>{var i={"./custom/app/submission/edit/submission-edit.component":[52678,2678]};function m(u){if(!t.o(i,u))return Promise.resolve().then(()=>{var v=new Error("Cannot find module '"+u+"'");throw v.code="MODULE_NOT_FOUND",v});var e=i[u],p=e[0];return t.e(e[1]).then(()=>t(p))}m.keys=()=>Object.keys(i),m.id=8377,ie.exports=m},49252:(ie,W,t)=>{var i={"./custom/app/submission/import-external/submission-import-external.component":[57094,7094]};function m(u){if(!t.o(i,u))return Promise.resolve().then(()=>{var v=new Error("Cannot find module '"+u+"'");throw v.code="MODULE_NOT_FOUND",v});var e=i[u],p=e[0];return t.e(e[1]).then(()=>t(p))}m.keys=()=>Object.keys(i),m.id=49252,ie.exports=m},88402:(ie,W,t)=>{var i={"./custom/app/submission/sections/upload/file/section-upload-file.component":[62285,2285]};function m(u){if(!t.o(i,u))return Promise.resolve().then(()=>{var v=new Error("Cannot find module '"+u+"'");throw v.code="MODULE_NOT_FOUND",v});var e=i[u],p=e[0];return t.e(e[1]).then(()=>t(p))}m.keys=()=>Object.keys(i),m.id=88402,ie.exports=m},39881:(ie,W,t)=>{var i={"./custom/app/submission/submit/submission-submit.component":[9700,9700]};function m(u){if(!t.o(i,u))return Promise.resolve().then(()=>{var v=new Error("Cannot find module '"+u+"'");throw v.code="MODULE_NOT_FOUND",v});var e=i[u],p=e[0];return t.e(e[1]).then(()=>t(p))}m.keys=()=>Object.keys(i),m.id=39881,ie.exports=m}}]);

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.