1"use strict";(self.webpackChunkgw_core_sites_app=self.webpackChunkgw_core_sites_app||[]).push([["doc-library"],{29776:(P,f,c)=>{c.r(f),c.d(f,{DocLibraryModule:()=>fe});var u=c(54364),L=c(71556),r=c(3138),y=c(58842),A=c(3830),d=c(55311),g=c(92612),b=c(68411),_=c(79441),m=c(22663),s=(()=>{return(n=s||(s={})).DOWNLOAD_MODAL="downloadModal",n.DOWNLOAD_PROGRESS_MODAL="downloadProgressModal",n.DOWNLOAD_SUCCESS_MODAL="downloadSuccessModal",n.DOWNLOAD_FAILURE_MODAL="downloadFailureModal",n.EMAIL_DOCUMENT_MODAL="emailDocumentModal",n.EMAIL_RECEPIENT_MODAL="emailRecepientModal",n.EMAIL_PROGRESS_MODAL="emailProgressModal",n.EMAIL_SUCCESS_MODAL="emailSuccessModal",n.EMAIL_FAILURE_MODAL="emailFailureModal",s;var n})(),e=c(2316),R=c(70160),C=c.n(R);const x=b.Y.getLogger("DocLibraryService");let v=(()=>{class n{constructor(t){this.appStateService=t,this.brLabels={}}getAllDocs(t){const o=t.map(a=>this.mapWidenToDocLibrary(a));return x.debug("docs docs",o),o}getRecentDocs(t,o=5){const a=t.map(l=>this.mapWidenToDocLibrary(l)).sort((l,h)=>this.dateComparator(l.lastUpdatedDate,h.lastUpdatedDate)).slice(0,o);return x.debug("recent docs",a),a}
1getDownloadUrl(){return`${this.appStateService.getLiteratureDownloadZipUrl()}?channel=${this.appStateService.getChannel()}`}getEmailUrl(){return`${this.appStateService.getLiteratureBaseApiUrl()}/email?channel=${this.appStateService.getChannel()}`}getWindenDocument(t){return t&&JSON.parse(t)}dateComparator(t,o){const a=new Date(t).getTime();return new Date(o).getTime()-a}mapWidenToDocLibrary(t){const o=this.getWindenDocument(t?.widenDocument?.widenDocument);return{id:o?.id[0],url:o?.url,audience:o?.audience?.split(",")||[],documentSource:o?.document_source,documentTitle:o?.document_title,documentType:t?.documentType,documentDescription:t?.description,noIndex:o?.noindex,lastUpdatedDate:o?.last_update_date,externalId:o?.external_id,lastUpdatedDateStd:C()(o?.last_update_date).format("YYYY-MM-DD"),lastUpdatedDateLocal:C()(o?.last_update_date).format("L")}}}return n.\u0275fac=function(t){return new(t||n)(e.LFG(d.ZQ))},n.\u0275prov=e.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),D=(()=>{class n{constructor(){this.brLabels={}}setBrLabels(t){this.brLabels=t}instant(t){return this.brLabels[t]||`doc-library.${t}`}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=e.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();var M=c(53882),U=c(68226),q=c(53809);let B=(()=>{class n{constructor(t,o){this.httpClient=t,this.save=o}download$(t,o,a){return this.httpClient.post(t,o,a)}downloadDocs$(t,o){const a={headers:(new M.WM).set("accept","application/zip"),reportProgress:!0,observe:"events",responseType:"blob"};return this.download$(t,o,a).pipe((0,U.L)((l,h)=>this.save(l,h)))}emailDocument$(t,o){return this.httpClient.post(t,o)}}return n.\u0275fac=function(t){return new(t||n)(e.LFG(M.eN),e.LFG(q.O))},n.\u0275prov=e.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();var w=c(10487),p=c(1707),I=c(59413),Z=c(66237);let S=(()=>{class n{constructor(t){this.docLibraryTranslateService=t}transform(t){return this.docLibraryTranslateService.instant(t)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(D,16))},n.\u0275pipe=e.Yjl({name:"docLibraryTranslate",type:n,pure:!0}),n})();function Q(n,i){if(1&n&&(e.TgZ(0,"div",11),e.TgZ(1,"p"),e._uU(2),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(null==t.modalData?null:t.modalData.modalHeaderText)}}const O=function(n){return{tableData:n}};function J(n,i){if(1&n&&(e.ynx(0),e.GkF(1,12),e.BQk()),2&n){const t=e.oxw(),o=e.MAs(15);e.xp6(1),e.Q6J("ngTemplateOutlet",o)("ngTemplateOutletContext",e.VKq(2,O,t.docItems))}}function Y(n,i){if(1&n&&(e.ynx(0),e.GkF(1,12),e.BQk()),2&n){const t=e.oxw(),o=e.MAs(15);e.xp6(1),e.Q6J("ngTemplateOutlet",o)("ngTemplateOutletContext",e.VKq(2,O,t.docItems))}}function H(n,i){if(1&n&&(e.ynx(0),e.GkF(1,13),e.BQk()),2&n){e.oxw();const t=e.MAs(17);e.xp6(1),e.Q6J("ngTemplateOutlet",t)}}const W=function(n){return{textData:n}};function $(n,i){if(1&n&&(e.ynx(0),e.GkF(1,12),e.BQk()),2&n){const t=e.oxw(),o=e.MAs(13);e.xp6(1),e.Q6J("ngTemplateOutlet",o)("ngTemplateOutletContext",e.VKq(2,W,null==t.modalData?null:t.modalData.modalBodyText))}}function G(n,i){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"button",14),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return null==l?null:l.clickhandler()}),e.TgZ(2,"span"),e._uU(3),e.qZA(),e.qZA(),e.BQk()}if(2&n){const t=i.$implicit,o=e.oxw();e.xp6(1),e.Q6J("edsButton",null==t?null:t.edsButtonType)("size",null==t?null:t.size)("disabled",!!t.checkForDisable&&(null==o.recipientArrayForm?null:o.recipientArrayForm.invalid)),e.xp6(2),e.hij("",null==t?null:t.label," ")}}function j(n,i){if(1&n&&(e.TgZ(0,"div",15),e.ALo(1,"async"),e.TgZ(2,"p"),e._uU(3),e.qZA(),e.qZA()),2&n){const t=i.textData,o=e.oxw();e.Q6J("flexDirection",e.lcZ(1,2,o.isHandheld$)?"column":"row"),e.xp6(3),e.hij(" ",t," ")}}function z(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"tr",18),e.TgZ(1,"td",23),e._uU(2),e.qZA(),e.TgZ(3,"td",24),e.TgZ(4,"div",25),e.TgZ(5,"eds-link-item",26),e.NdJ("click",function(a){const l=e.CHM(t),h=l.$implicit,De=l.index;return e.oxw(2).onRemoveFromSelected(a,h,De)}),e._uU(6),e.ALo(7,"docLibraryTranslate"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=i.$implicit;e.xp6(2),e.Oqu(null==t?null:t.documentTitle),e.xp6(4),e.hij(" ",e.lcZ(7,2,"remove-link-table")," ")}}
1function K(n,i){if(1&n&&(e.TgZ(0,"table",16),e.TgZ(1,"thead",17),e.TgZ(2,"tr",18),e.TgZ(3,"th",19),e.TgZ(4,"span"),e._uU(5),e.ALo(6,"docLibraryTranslate"),e.qZA(),e.qZA(),e.TgZ(7,"th",20),e.TgZ(8,"span"),e._uU(9),e.ALo(10,"docLibraryTranslate"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(11,"tbody",21),e.YNc(12,z,8,4,"tr",22),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(5),e.Oqu(e.lcZ(6,3,"table-header-name")),e.xp6(4),e.Oqu(e.lcZ(10,5,"table-header-action")),e.xp6(3),e.Q6J("ngForOf",t.docItems)}}function X(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",36),e.TgZ(1,"eds-link-item",37),e.NdJ("click",function(a){e.CHM(t);const l=e.oxw().index;return e.oxw(2).deleteRecipient(a,l)}),e.ALo(2,"docLibraryTranslate"),e.qZA(),e.qZA()}2&n&&(e.xp6(1),e.s9C("title",e.lcZ(2,1,"sticky-delete-button")))}function V(n,i){if(1&n&&(e.TgZ(0,"div",32),e.TgZ(1,"div",33),e._UZ(2,"eds-text-input",34),e.ALo(3,"docLibraryTranslate"),e.ALo(4,"docLibraryTranslate"),e.YNc(5,X,3,3,"div",35),e.qZA(),e.qZA()),2&n){const t=i.index,o=e.oxw(2);e.xp6(2),e.s9C("placeholder",e.lcZ(3,9,"form-field-placeholder-recipient-mail-id")),e.s9C("label",e.lcZ(4,11,"form-field-label-recipient-mail-id")),e.Q6J("flexBasis",1===o.getFormArray().length?"100%":"90%")("hasHelperText",!1)("required",!0)("invalid",o.recipients.at(t).get("recipientEmailId").invalid&&o.recipients.at(t).get("recipientEmailId").touched)("inputControl",o.recipients.at(t).get("recipientEmailId"))("invalidText",o.recipients.at(t).get("recipientEmailId").invalid&&o.recipients.at(t).get("recipientEmailId").touched?o.validatorFunction(null==o.recipients.at(t).get("recipientEmailId").errors?null:o.recipients.at(t).get("recipientEmailId").errors.required,"recipientEmailId"):""),e.xp6(3),e.Q6J("ngIf",1!==o.getFormArray().length)}}function ee(n,i){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"form",27),e.YNc(2,V,6,13,"div",28),e.TgZ(3,"button",29),e.NdJ("click",function(){return e.CHM(t),e.oxw().addRecipients()}),e.TgZ(4,"span",30),e._uU(5),e.ALo(6,"docLibraryTranslate"),e.qZA(),e._UZ(7,"eds-icon",31),e.qZA(),e.qZA(),e.BQk()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("formGroup",t.recipientArrayForm),e.xp6(1),e.Q6J("ngForOf",t.getFormArray().controls)("ngForTrackBy",t.track),e.xp6(1),e.Q6J("disabled",4===t.getFormArray().length),e.xp6(2),e.hij(" ",e.lcZ(6,5,"sticky-add-recipient-button"),"")}}let te=(()=>{class n{constructor(t,o){this.responsiveService=t,this.translateService=o,this.isMandatoryAvailable=!1,this.DocLibraryModalEnum=s,this.docItems=[],this.recipients=new p.Oe([new p.cw({recipientEmailId:new p.NI("",[p.kI.required,p.kI.pattern(I.QI)])})]),this.removeFromSelected=new e.vpe,this.modalClosed=new e.vpe,this.downloadStart=new e.vpe,this.emailStart=new e.vpe,this.modalClose=new e.vpe,this.backEmail=new e.vpe,this.continueEmail=new e.vpe,this.closeOnSuccess=new e.vpe,this.closeOnFailure=new e.vpe,this.emailContinue=()=>{this.continueEmail.emit(this.recipientArrayForm.value),this.recipientArrayForm.reset(),this.recipients.clear()}}ngOnInit(){this.isHandheld$=this.responsiveService.isHandheld$(),this.recipientArrayForm=new p.cw({recipients:this.recipients})}ngOnChanges(){this.modalData=this.assignModelData(this.modalId)}onRemoveFromSelected(t,o,a){t.preventDefault(),this.removeFromSelected.emit({index:a,docLibraryItem:o})}handleCloseModal(t){this.modalClosed.emit(t)}addRecipients(){this.getFormArray().length<4&&this.getFormArray().push(new p.cw({recipientEmailId:new p.NI("",[p.kI.required,p.kI.pattern(I.QI)])}))}getFormArray(){return this.recipientArrayForm.get("recipients")}translateKey(t){return this.translateService.instant(t)}track(t,o){return o}validatorFunction(t,o){return this.translateKey(t?`email-form-error-${o}-required`:`email-form-error-${o}-data`)}deleteRecipient(t,o){t.preventDefault(),this.getFormArray().removeAt(o)}assignModelData(t){const o={closeBtnLabel:"close",themeTitle:"dark"};return{[s.DOWNLOAD_MODAL]:{modalConfig:{...o,id:s.DOWNLOAD_MODAL,title:this.translateService.instant("download-modal-title")},modalHeaderText:this.translateService.instant("download-modal-header-text"),footerAction:{justifyContent:"flex-end",buttonData:[{edsButtonType:"primary",size:"normal",clickhandler:()=>this.downloadStart.emit(),label:this.translateService.instant("download-button-label")}]}},[s.DOWNLOAD_PROGRESS_MODAL]:{modalConfig:{...o,id:s.DOWNLOAD_PROGRESS_MODAL,title:this.translateService.instant("download-progress-modal-title")},modalBodyText:this.translateService.instant("download-progress-modal-body-text"),footerAction:{justifyContent:"flex-end",buttonData:[]}},[s.DOWNLOAD_SUCCESS_MODAL]:{modalConfig:{...o,id:s.DOWNLOAD_SUCCESS_MODAL,title:this.translateService.instant("download-success-modal-title")},modalBodyText:this.translateService.instant("download-success-modal-body-text"),footerAction:{justifyContent:"flex-end",buttonData:[{edsButtonType:"primary",size:"normal",clickhandler:()=>{this.closeOnSuccess.emit()},label:this.translateService.instant("close-button-label")}]}},[s.DOWNLOAD_FAILURE_MODAL]:{modalConfig:{...o,id:s.DOWNLOAD_FAILURE_MODAL,title:this.translateService.instant("download-failure-modal-title")},modalBodyText:this.translateService.instant("download-failure-modal-body-text"),footerAction:{justifyContent:"flex-end",buttonData:[{edsButtonType:"primary",size:"normal",clickhandler:()=>{this.closeOnFailure.emit()},label:this.translateService.instant("close-button-label")}]}},[s.EMAIL_DOCUMENT_MODAL]:{modalConfig:{...o,id:s.EMAIL_DOCUMENT_MODAL,title:this.translateService.instant("email-document-modal-title"),preTitle:this.translateService.instant("email-document-modal-pre-title")},modalHeaderText:this.translateService.instant("email-document-modal-header-text"),footerAction:{justifyContent:"flex-end",buttonData:[{edsButtonType:"primary",size:"normal",clickhandler:()=>{this.emailStart.emit()},label:this.translateService.instant("add-recipients-button-label")}]}},[s.EMAIL_RECEPIENT_MODAL]:{modalConfig:{...o,id:s.EMAIL_RECEPIENT_MODAL,title:this.translateService.instant("email-recepient-modal-title"),preTitle:this.translateService.instant("email-recepient-modal-pre-title")},modalHeaderText:this.translateService.instant("email-recepient-modal-header-text"),footerAction:{justifyContent:"flex-end",buttonData:[{edsButtonType:"secondary",size:"normal",clickhandler:()=>this.backEmail.emit(),label:this.translateService.instant("receipents-back-button-label")},{edsButtonType:"primary",size:"normal",clickhandler:this.emailContinue,label:this.translateService.instant("receipents-continue-button-label"),checkForDisable:!0}]}},[s.EMAIL_PROGRESS_MODAL]:{modalConfig:{...o,id:s.EMAIL_PROGRESS_MODAL,title:this.translateService.instant("email-progress-modal-title")},modalBodyText:this.translateService.instant("email-progress-modal-body-text"),footerAction:{justifyContent:"flex-end",buttonData:[]}},[s.EMAIL_SUCCESS_MODAL]:{modalConfig:{...o,id:s.EMAIL_SUCCESS_MODAL,title:this.translateService.instant("email-success-modal-title")},modalBodyText:this.translateService.instant("email-success-modal-body-text"),footerAction:{justifyContent:"flex-end",buttonData:[{edsButtonType:"primary",size:"normal",clickhandler:()=>{this.closeOnSuccess.emit()},label:this.translateService.instant("close-button-label")}]}},[s.EMAIL_FAILURE_MODAL]:{modalConfig:{...o,id:s.EMAIL_FAILURE_MODAL,title:this.translateService.instant("email-failure-modal-title")},modalBodyText:this.translateService.instant("email-failure-modal-body-text"),footerAction:{justifyContent:"flex-end",buttonData:[{edsButtonType:"primary",size:"normal",clickhandler:()=>{this.closeOnFailure.emit()},label:this.translateService.instant("close-button-label")}]}}}[t]}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(r.kzD),e.Y36(D))},n.\u0275cmp=e.Xpm({type:n,selectors:[["ft-doc-library-download-modal"]],inputs:{modalId:"modalId",docItems:"docItems",brL
1abels:"brLabels"},outputs:{removeFromSelected:"removeFromSelected",modalClosed:"modalClosed",downloadStart:"downloadStart",emailStart:"emailStart",modalClose:"modalClose",backEmail:"backEmail",continueEmail:"continueEmail",closeOnSuccess:"closeOnSuccess",closeOnFailure:"closeOnFailure"},features:[e.TTD],decls:18,vars:16,consts:[["aria-modal","true",3,"modalAriaLabel","closeAriaLabel","id","showModal","config","onClose"],["modal-header","",4,"ngIf"],["modal-body","",3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["modal-footer",""],["edsFlexbox","",3,"justifyContent"],[4,"ngFor","ngForOf"],["modalTextTemplate",""],["modalTable",""],["recepientsTemplate",""],["modal-header",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngTemplateOutlet"],["data-analytics-no-event","true",3,"edsButton","size","disabled","click"],["edsFlexbox","","justifyContent","space-between",3,"flexDirection"],[1,"table","table--secondary"],[1,"table__thead"],[1,"table__tr"],[1,"table__th"],[1,"table__th","text-align-right"],[1,"table__body"],["class","table__tr",4,"ngFor","ngForOf"],[1,"table__td"],[1,"table__td","text-align-right"],["edsFlexbox","","flexDirection","row","justifyContent","flex-end"],["edsSpacing","md","data-analytics-no-event","true","title","Remove",3,"click"],[3,"formGroup"],["formArrayName","recipients",4,"ngFor","ngForOf","ngForTrackBy"],["edsButton","secondary","edsSpacing","md","size","compact",3,"disabled","click"],[1,"ft__btn__txt"],["type","add","size","small","aria-hidden","true",1,"modal-close__icon"],["formArrayName","recipients"],["edsFlexbox","","flexDirection","row"],["edsFlexItem","","value","","type","text","aria-label","inputText",3,"flexBasis","placeholder","label","hasHelperText","required","invalid","inputControl","invalidText"],["edsPadding","","edsFlexItem","","edsPaddingTop","md","flexBasis","10%","edsPaddingLeft","sm",4,"ngIf"],["edsPadding","","edsFlexItem","","edsPaddingTop","md","flexBasis","10%","edsPaddingLeft","sm"],[3,"title","click"]],template:function(t,o){1&t&&(e.TgZ(0,"eds-simple-modal",0),e.NdJ("onClose",function(l){return o.handleCloseModal(l)}),e.ALo(1,"translate"),e.ALo(2,"translate"),e.YNc(3,Q,3,1,"div",1),e.TgZ(4,"div",2),e.YNc(5,J,2,4,"ng-container",3),e.YNc(6,Y,2,4,"ng-container",3),e.YNc(7,H,2,1,"ng-container",3),e.YNc(8,$,2,4,"ng-container",4),e.qZA(),e.TgZ(9,"div",5),e.TgZ(10,"div",6),e.YNc(11,G,4,4,"ng-container",7),e.qZA(),e.qZA(),e.qZA(),e.YNc(12,j,4,4,"ng-template",null,8,e.W1O),e.YNc(14,K,13,7,"ng-template",null,9,e.W1O),e.YNc(16,ee,8,7,"ng-template",null,10,e.W1O)),2&t&&(e.s9C("modalAriaLabel",e.lcZ(1,12,"common.modal-open")),e.s9C("closeAriaLabel",e.lcZ(2,14,"common.modal-close")),e.Q6J("id",null==o.modalData||null==o.modalData.modalConfig?null:o.modalData.modalConfig.id)("showModal",!!o.modalId)("config",null==o.modalData?null:o.modalData.modalConfig),e.xp6(3),e.Q6J("ngIf",null==o.modalData?null:o.modalData.modalHeaderText),e.xp6(1),e.Q6J("ngSwitch",null==o.modalData||null==o.modalData.modalConfig?null:o.modalData.modalConfig.id),e.xp6(1),e.Q6J("ngSwitchCase",o.DocLibraryModalEnum.DOWNLOAD_MODAL),e.xp6(1),e.Q6J("ngSwitchCase",o.DocLibraryModalEnum.EMAIL_DOCUMENT_MODAL),e.xp6(1),e.Q6J("ngSwitchCase",o.DocLibraryModalEnum.EMAIL_RECEPIENT_MODAL),e.xp6(3),e.Q6J("justifyContent",null==o.modalData||null==o.modalData.footerAction?null:o.modalData.footerAction.justifyContent),e.xp6(1),e.Q6J("ngForOf",null==o.modalData||null==o.modalData.footerAction?null:o.modalData.footerAction.buttonData))},directives:[r.FOF,u.O5,u.RF,u.n9,u.ED,r.Wxy,u.sg,u.tP,r.Hq3,r.zj4,r.OPD,p._Y,p.JL,p.sg,r.oJW,p.CE,r.tmB,r.R65,r.cph],pipes:[Z.X,u.Ov,S],styles:[""]}),n})();const oe=function(){return[25,50,75,100]};function ne(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"eds-filter-grid",4),e.NdJ("checkboxChanged",function(a){return e.CHM(t),e.oxw().onCheckboxChanged(a)}),e.ALo(1,"docLibraryTranslate"),e.ALo(2,"docLibraryTranslate"),e.ALo(3,"docLibraryTranslate"),e.ALo(4,"docLibraryTranslate"),e.ALo(5,"docLibraryTranslate"),e.ALo(6,"docLibraryTranslate"),e.ALo(7,"docLibraryTranslate"),e.ALo(8,"docLibraryTranslate"),e.ALo(9,"docLibraryTranslate"),e.ALo(10,"docLibraryTranslate"),e.ALo(11,"docLibraryTranslate"),e.ALo(12,"docLibraryTranslate"),e.ALo(13,"docLibraryTranslate"),e.ALo(14,"docLibraryTranslate"),e.ALo(15,"docLibraryTranslate"),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("colDefs",t.colDefs)("rowData",t.docs)("isScrollTopEnabled",!0)("useAgGrid",!1)("hasBorders",!0)("hasStickyHeader",!0)("hasCheckboxColumn",!0)("hasTextSearch",!0)("showPagination",!0)("pageSize",25)("pageSizeOptions",e.DdM(58,oe))("isGridFullWidth",!0)("cardBreakpoint",t.breakpoint)("labelTitle",e.lcZ(1,28,"document-library"))("labelShowing",e.lcZ(2,30,"showing"))("labelShowingOf",e.lcZ(3,32,"of"))("labelResetFilter",e.lcZ(4,34,"reset-filters"))("labelSelected",e.lcZ(5,36,"selected"))("labelNoMatchingData",e.lcZ(6,38,"no-matching-documents"))("labelDropdown",e.lcZ(7,40,"select-page-size"))("labelDropdownAria",e.lcZ(8,42,"select-page-size"))("labelNextPage",e.lcZ(9,44,"next-page"))("labelPrevPage",e.lcZ(10,46,"previous-page"))("labelToggleCheckbox",e.lcZ(11,48,"select-document"))("labelToggleAllCheckboxes",e.lcZ(12,50,"select-all-documents"))("labelSearch",e.lcZ(13,52,"search"))("labelSearchPlaceholder",e.lcZ(14,54,"search-placeholder"))("labelSearchClear",e.lcZ(15,56,"search-clear"))}}function ae(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"eds-sticky-footer",5),e.NdJ("btnSubscribePrimary",function(a){return e.CHM(t),e.oxw().onDownloadClick(a)})("btnSubscribeSecond",function(a){return e.CHM(t),e.oxw().onEmailClick(a)}),e.ALo(1,"docLibraryTranslate"),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("itemCount",t.selectedDocs.length)("primaryAction",t.downloadAction)("secondaryAction",t.emailAction)("isHide",t.selectedDocs.length<1)("variation",2)("label",e.lcZ(1,6,"documents-selected"))}}const E=function(){return{s:4,m:6,l:6}},F=function(){return{m:1,l:2}};function ie(n,i){if(1&n&&(e.TgZ(0,"div",6),e.TgZ(1,"div",7),e.TgZ(2,"div",8),e.TgZ(3,"div",9),e._UZ(4,"div",10),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(3),e.Q6J("columnNumbers",e.DdM(3,E))("offsets",e.DdM(4,F)),e.xp6(1),e.Q6J("innerHTML",t.insufficientAcce
1ssMessage,e.oJD)}}const re=function(){return{skin:"Basic 2 Columns",legacy:!1,signOut:!1}};function le(n,i){1&n&&(e.TgZ(0,"div",6),e.TgZ(1,"div",7),e.TgZ(2,"div",11),e.TgZ(3,"div",9),e._UZ(4,"ft-sign-in",12),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&n&&(e.xp6(3),e.Q6J("columnNumbers",e.DdM(3,E))("offsets",e.DdM(4,F)),e.xp6(1),e.Q6J("inputParameters",e.DdM(5,re)))}function se(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"ft-doc-library-download-modal",13),e.NdJ("removeFromSelected",function(a){return e.CHM(t),e.oxw().handleOnRemoveFromSelected(a)})("modalClosed",function(a){return e.CHM(t),e.oxw().handleModalClosed(a)})("emailStart",function(){return e.CHM(t),e.oxw().handleEmailStart()})("backEmail",function(){return e.CHM(t),e.oxw().handleBackEmail()})("downloadStart",function(){return e.CHM(t),e.oxw().handleDownloadStart()})("continueEmail",function(a){return e.CHM(t),e.oxw().handleContinueEmail(a)})("closeOnSuccess",function(){return e.CHM(t),e.oxw().handleModalClosedSuccess()})("closeOnFailure",function(){return e.CHM(t),e.oxw().handleModalClosedFailure()}),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("modalId",t.openedModalId)("docItems",t.selectedDocs)}}const T=b.Y.getLogger("DocLibraryListingComponent");let ce=(()=>{class n extends g.N{constructor(t,o,a,l,h){super(),this.docLibraryService=t,this.profileService=o,this.cdr=a,this.translateService=l,this.docLibraryApiService=h,this.unsubscribe$=new _.xQ,this.selectedDocs=[],this.loggedInStatus=d.Fk.NotLoggedIn,this.colDefs=[],this.breakpoint=r.IM0.Tablet,this.LoggedInStatusEnum=d.Fk}ngOnInit(){const t=this.component?.getModels()&&this.component?.getModels()["ft.core.doc-library"]||{};this.translateService.setBrLabels(t);const{authenticatedRole:o}=this.component?.getParameters();o&&(this.authenticatedRole=o),this.assignColDefs(),this.downloadAction={buttonLabel:this.translateService.instant("download"),hasAction:!0},this.emailAction={buttonLabel:this.translateService.instant("email"),hasAction:!0},this.profileService.getUserProfile$().pipe((0,m.R)(this.unsubscribe$)).subscribe(a=>{if(a?.isLoggedIn){const{documents:l,content:h}=this.document.getData();this.loggedInStatus=a.profileInfo?.additionalRoles?.includes(this.authenticatedRole)?d.Fk.LoggedInWithAccess:d.Fk.LoggedInNoAccess,this.loggedInStatus===d.Fk.LoggedInNoAccess?this.insufficientAccessMessage=h?.value||this.translateService.instant("insufficient-access"):this.docs=this.docLibraryService.getAllDocs(l)}else this.loggedInStatus=d.Fk.NotLoggedIn;this.cdr.detectChanges()})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}onCheckboxChanged(t){T.debug("onCheckboxChanged()",t),this.selectedDocs=t.checkedItems,this.selectedDocs?.length||(this.openedModalId="")}onDownloadClick(t){T.debug("onDownloadClick()",this.selectedDocs,t),this.openedModalId=s.DOWNLOAD_MODAL}onEmailClick(t){T.debug("onEmailClick()",this.selectedDocs,t),this.openedModalId=s.EMAIL_DOCUMENT_MODAL}handleOnRemoveFromSelected(t){this?.edsFilterGridComponent?.deselectRow(t?.docLibraryItem?.id)}handleDownloadStart(){!this.selectedDocs.map(o=>o.id)?.length||(this.openedModalId=s.DOWNLOAD_PROGRESS_MODAL,this.docLibraryApiService.downloadDocs$(this.docLibraryService.getDownloadUrl(
1),{literatureCodes:[""],documentProperties:this.selectedDocs.map(o=>({title:o?.documentTitle,url:o?.url.replace("https://","")}))}).pipe((0,m.R)(this.unsubscribe$)).subscribe(o=>{this.openedModalId=s.DOWNLOAD_SUCCESS_MODAL,this.cdr.detectChanges()},o=>{this.openedModalId=s.DOWNLOAD_FAILURE_MODAL,this.cdr.detectChanges()}))}handleModalClosed(t){this.openedModalId=""}handleModalClosedSuccess(){this.openedModalId=""}handleModalClosedFailure(){this.openedModalId=""}handleEmailStart(){this.openedModalId=s.EMAIL_RECEPIENT_MODAL}handleBackEmail(){this.openedModalId=s.EMAIL_DOCUMENT_MODAL}handleContinueEmail(t){const{recipients:o}=t;if(!o||!o?.length)return;const a={emailIds:o?.map(l=>l?.recipientEmailId),documentProperties:this.selectedDocs.map(l=>({title:l?.documentTitle,url:l?.url.replace("https://","")}))};this.openedModalId=s.EMAIL_PROGRESS_MODAL,this.docLibraryApiService.emailDocument$(this.docLibraryService.getEmailUrl(),a).pipe((0,m.R)(this.unsubscribe$)).subscribe(l=>{this.openedModalId=s.EMAIL_SUCCESS_MODAL,this.cdr.detectChanges()},l=>{this.openedModalId=s.EMAIL_FAILURE_MODAL,this.cdr.detectChanges()})}assignColDefs(){this.colDefs=[{field:"documentTitle",headerName:this.translateService.instant("doc-listing-title-header"),sortable:!0,isCardTitle:!0,linkField:"url",isSearchable:!0},{field:"documentType",headerName:this.translateService.instant("doc-listing-doc-type-header"),sortable:!0,isFilter:!0,isSearchable:!0},{field:"documentDescription",headerName:this.translateService.instant("doc-listing-description-header"),sortable:!1,isSearchable:!0},{field:"lastUpdatedDateLocal",headerName:this.translateService.instant("doc-listing-date-header"),sortable:!0}]}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(v),e.Y36(d.H3),e.Y36(e.sBO),e.Y36(D),e.Y36(B))},n.\u0275cmp=e.Xpm({type:n,selectors:[["ft-doc-library-listing"]],viewQuery:function(t,o){if(1&t&&e.Gf(r.bhK,5),2&t){let a;e.iGM(a=e.CRH())&&(o.edsFilterGridComponent=a.first)}},inputs:{component:"component",page:"page"},features:[e.qOj],decls:5,vars:5,consts:[["idCol","id","tableTheme","secondary",3,"colDefs","rowData","isScrollTopEnabled","useAgGrid","hasBorders","hasStickyHeader","hasCheckboxColumn","hasTextSearch","showPagination","pageSize","pageSizeOptions","isGridFullWidth","cardBreakpoint","labelTitle","labelShowing","labelShowingOf","labelResetFilter","labelSelected","labelNoMatchingData","labelDropdown","labelDropdownAria","labelNextPage","labelPrevPage","labelToggleCheckbox","labelToggleAllCheckboxes","labelSearch","labelSearchPlaceholder","labelSearchClear","checkboxChanged",4,"ngIf"],["stickyFooterName","Document Library",3,"itemCount","primaryAction","secondaryAction","isHide","variation","label","btnSubscribePrimary","btnSubscribeSecond",4,"ngIf"],["edsGrid","",4,"ngIf"],[3,"modalId","docItems","removeFromSelected","modalClosed","emailStart","backEmail","downloadStart","continueEmail","closeOnSuccess","closeOnFailure",4,"ngIf"],["idCol","id","tableTheme","secondary",3,"colDefs","rowData","isScrollTopEnabled","useAgGrid","hasBorders","hasStickyHeader","hasCheckboxColumn","hasTextSearch","showPagination","pageSize","pageSizeOptions","isGridFullWidth","cardBreakpoint","labelTitle","labelShowing","labelShowingOf","labelResetFilter","labelSelected","labelNoMatchingData","labelDropdown","labelDropdownAria","labelNextPage","labelPrevPage","labelToggleCheckbox","labelToggleAllCheckboxes","labelSearch","labelSearchPlaceholder","labelSearchClear","checkboxChanged"],["stickyFooterName","Document Library",3,"itemCount","primaryAction","secondaryAction","isHide","variation","label","btnSubscribePrimary","btnSubscribeSecond"],["edsGrid",""],[1,"container","container--wide"],["edsRow","","edsSpacing","lg"],["edsCol","",3,"columnNumbers","offsets"],[3,"innerHTML"],["edsRow",""],[3,"inputParameters"],[3,"modalId","docItems","removeFromSelected","modalClosed","emailStart","backEmail","downloadStart","continueEmail","closeOnSuccess","closeOnFailure"]],template:function(t,o){1&t&&(e.YNc(0,ne,16,59,"eds-filter-grid",0),e.YNc(1,ae,2,8,"eds-sticky-footer",1),e.YNc(2,ie,5,5,"div",2),e.YNc(3,le,5,6,"div",2),e.YNc(4,se,1,2,"ft-doc-library-download-modal",3)),2&t&&(e.Q6J("ngIf",o.loggedInStatus===o.LoggedInStatusEnum.LoggedInWithAccess),e.xp6(1),e.Q6J("ngIf",o.loggedInStatus===o.LoggedInStatusEnum.LoggedInWithAccess),e.xp6(1),e.Q6J("ngIf",o.loggedInStatus===o.LoggedInStatusEnum.LoggedInNoAccess),e.xp6(1),e.Q6J("ngIf",o.loggedInStatus===o.LoggedInStatusEnum.NotLoggedIn),e.xp6(1),e.Q6J("ngIf",o.openedModalId))},directives:[u.O5,r.bhK,r.GsX,r.ljP,r.vZ,r.OPD,r.iKq,w.F,te],pipes:[S],styles:[""],changeDetection:0}),n})();function de(n,i){if(1&n&&(e.TgZ(0,"eds-panel",5),e.TgZ(1,"div",6),e.TgZ(2,"div"),e.TgZ(3,"eds-title",7),e._uU(4),e.ALo(5,"docLibraryTranslate"),e.qZA(),e.qZA(),e.TgZ(6,"div",8),e.TgZ(7,"a",9),e._uU(8),e.ALo(9,"docLibraryTranslate"),e.qZA(),e.qZA(),e.qZA(),e._UZ(10,"eds-dynamic-table",10),e.ALo(11,"translate"),e.ALo(12,"translate"),e.ALo(13,"translate"),e.ALo(14,"translate"),e.qZA()),2&n){const t=e.oxw();e.Q6J("hasBorders",!0)("hasPadding",!0)("hasShadows",!0),e.xp6(3),e.Q6J("level",5),e.xp6(1),e.hij(" ",e.lcZ(5,14,"recently-added-documents"),""),e.xp6(4),e.hij(" ",e.lcZ(9,16,"show-all")," "),e.xp6(2),e.Q6J("colDefs",t.colDefs)("rowData",t.recentDocs)("hasBorders",!0)("showPagination",!1)("sortAccessibilityText",e.lcZ(11,18,"common.sortAccessibilityText"))("ariaLabelGoToPage",e.lcZ(12,20,"common.ariaLabelGoToPage"))("sortAriaLiveText",e.lcZ(13,22,"common.sortAriaLiveText"))("pageTransitionAriaLiveText",e.lcZ(14,24,"common.pageTransitionAriaLiveText"))}}const k=function(){return{s:4,m:6,l:6}},N=function(){return{m:1,l:2}};function me(n,i){if(1&n&&(e.TgZ(0,"div",0),e.TgZ(1,"div",11),e.TgZ(2,"div",12),e.TgZ(3,"div",13),e._UZ(4,"div",14),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(3),e.Q6J("columnNumbers",e.DdM(3,k))("offsets",e.DdM(4,N)),e.xp6(1),e.Q6J("innerHTML",t.insufficientAcce
1ssMessage,e.oJD)}}const ue=function(){return{skin:"Basic 2 Columns",legacy:!1,signOut:!1}};function pe(n,i){1&n&&(e.TgZ(0,"div",15),e.TgZ(1,"div",13),e._UZ(2,"ft-sign-in",16),e.qZA(),e.qZA()),2&n&&(e.xp6(1),e.Q6J("columnNumbers",e.DdM(3,k))("offsets",e.DdM(4,N)),e.xp6(1),e.Q6J("inputParameters",e.DdM(5,ue)))}b.Y.getLogger("DocLibraryRecentlyAddedComponent");let ge=(()=>{class n extends g.N{constructor(t,o,a,l){super(),this.docLibraryService=t,this.profileService=o,this.translateService=a,this.cdr=l,this.unsubscribe$=new _.xQ,this.colDefs=[],this.LoggedInStatusEnum=d.Fk,this.loggedInStatus=d.Fk.NotLoggedIn}ngOnInit(){const t=this.component?.getModels()&&this.component?.getModels()["ft.core.doc-library"]||{};this.translateService.setBrLabels(t);const{authenticatedRole:o}=this.component?.getParameters();o&&(this.authenticatedRole=o),this.colDefs=this.getDefaultColDefs(),this.handleDocLibForProfile()}handleDocLibForProfile(){this.profileService.getUserProfile$().pipe((0,m.R)(this.unsubscribe$)).subscribe(t=>{if(t?.isLoggedIn){const{documents:o,content:a}=this.document.getData();this.loggedInStatus=t.profileInfo?.additionalRoles?.includes(this.authenticatedRole)?d.Fk.LoggedInWithAccess:d.Fk.LoggedInNoAccess,this.loggedInStatus===d.Fk.LoggedInNoAccess?this.insufficientAccessMessage=a?.value||this.translateService.instant("insufficient-access"):this.recentDocs=this.docLibraryService.getRecentDocs(o)}else this.loggedInStatus=d.Fk.NotLoggedIn;this.cdr.detectChanges()})}getDefaultColDefs(){return[{field:"documentTitle",headerName:this.translateService.instant("recently-added-doc-title-header"),isCardTitle:!0,linkField:"url",sortable:!1},{field:"documentType",headerName:this.translateService.instant("recently-added-doc-type-header"),dataType:"string"},{field:"lastUpdatedDateLocal",headerName:this.translateService.instant("recently-added-doc-date-header"),dataType:"date",sortable:!1,dateFormat:"DD/MM/YYYY"}]}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(v),e.Y36(d.H3),e.Y36(D),e.Y36(e.sBO))},n.\u0275cmp=e.Xpm({type:n,selectors:[["ft-doc-library-recently-added"]],inputs:{component:"component",page:"page"},features:[e.qOj],decls:5,vars:3,consts:[["edsGrid",""],["edsPadding","",1,"container","container--wide"],[3,"hasBorders","hasPadding","hasShadows",4,"ngIf"],["edsGrid","",4,"ngIf"],["edsRow","",4,"ngIf"],[3,"hasBorders","hasPadding","hasShadows"],["edsFlexbox","","flexDirection","row","justifyContent","space-between","edsSpacing","md"],["theme","basic","size","h5",3,"level"],["alignText","right"],["href","./document-listing","edsButton","primary","size","compact"],["tableTheme","secondary",3,"colDefs","rowData","hasBorders","showPagination","sortAccessibilityText","ariaLabelGoToPage","sortAriaLiveText","pageTransitionAriaLiveText"],[1,"container","container--wide"],["edsRow","","edsSpacing","lg"],["edsCol","",3,"columnNumbers","offsets"],[3,"innerHTML"],["edsRow",""],[3,"inputParameters"]],template:function(t,o){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.YNc(2,de,15,26,"eds-panel",2),e.YNc(3,me,5,5,"div",3),e.YNc(4,pe,3,6,"div",4),e.qZA(),e.qZA()),2&t&&(e.xp6(2),e.Q6J("ngIf",o.loggedInStatus===o.LoggedInStatusEnum.LoggedInWithAccess),e.xp6(1),e.Q6J("ngIf",o.loggedInStatus===o.LoggedInStatusEnum.LoggedInNoAccess),e.xp6(1),e.Q6J("ngIf",o.loggedInStatus===o.LoggedInStatusEnum.NotLoggedIn))},directives:[r.ljP,r.cph,u.O5,r.yXm,r.Wxy,r.OPD,r.r3N,r.Hq3,r.Qne,r.vZ,r.iKq,w.F],pipes:[S,Z.X],styles:[""]}),n})();function _e(n,i){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"button",4),e.NdJ("click",function(){return e.CHM(t),e.oxw().enhance()}),e._uU(2,"Enhance Profile"),e.qZA(),e.BQk()}}let he=(()=>{class n{constructor(t,o,a,l){this.profileService=t,this.appStateService=o,this.sessionService=a,this.cdr=l,this.unsubscribe$=new _.xQ,this.isLoggedIn=!1,this.roles=[],this.name=""}ngOnInit(){this.profileService.getUserProfile$().pipe((0,m.R)(this.unsubscribe$)).subscribe(t=>{this.isLoggedIn=t.isLoggedIn,this.cdr.detectChanges()}),this.sessionService.getAuth0Client()?.then(t=>{t.getUser().then(o=>{o&&(this.roles=o["https://franklintempleton.com/roles"],this.name=o["https://franklintempleton.com/firstname"],this.cdr.detectChanges())})})}enhance(){this.sessionService.auth0Authorize({profile:`${this.appStateService.getHomePageUrl()}/progressive-profile1`})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(d.H3),e.Y36(d.ZQ),e.Y36(d.mj),e.Y36(e.sBO))},n.\u0275cmp=e.Xpm({type:n,selectors:[["ft-doc-library-profile"]],decls:19,vars:4,consts:[[1,"table"],[1,"table__tr"],[1,"table__td"],[4,"ngIf"],[3,"click"]],template:function(t,o){1&t&&(e.TgZ(0,"h1"),e._uU(1,"Profile"),e.qZA(),e.TgZ(2,"table",0),e.TgZ(3,"tr",1),e.TgZ(4,"td",2),e._uU(5,"Logged In"),e.qZA(),e.TgZ(6,"td",2),e._uU(7),e.qZA(),e.qZA(),e.TgZ(8,"tr",1),e.TgZ(9,"td",2),e._uU(10,"Name"),e.qZA(),e.TgZ(11,"td",2),e._uU(12),e.qZA(),e.qZA(),e.TgZ(13,"tr",1),e.TgZ(14,"td",2),e._uU(15,"Roles"),e.qZA(),e.TgZ(16,"td",2),e._uU(17),e.qZA(),e.qZA(),e.qZA(),e.YNc(18,_e,3,0,"ng-container",3)),2&t&&(e.xp6(7),e.Oqu(o.isLoggedIn),e.xp6(
15),e.Oqu(o.name),e.xp6(5),e.Oqu(o.roles.join(", ")),e.xp6(1),e.Q6J("ngIf",o.isLoggedIn&&!o.name))},directives:[u.O5],styles:[""],changeDetection:0}),n})(),be=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}),n.\u0275inj=e.cJS({imports:[[u.ez]]}),n})(),fe=(()=>{class n{getComponentMapping(){return{"Doc Library Listing":ce,"Doc Library Recently Added":ge,"Doc Library Profile":he}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}),n.\u0275inj=e.cJS({imports:[[L.q8,r.hJ1,u.ez,r.cFv,r.BHe,r.WF4,r.zE6,r.JI,r.QGW,y.K,r.cv2,r.E9$,r.idt,A.a,r.QSA,r.SZ7,r.QX1,r.Nz7,p.UX,be]]}),n})()},68226:(P,f,c)=>{c.d(f,{L:()=>d});var u=c(53882),L=c(77430),r=c(83720);function d(g){return b=>b.pipe((0,L.R)((_,m)=>{if(function(g){return g.type===u.dt.DownloadProgress||g.type===u.dt.UploadProgress}(m))return{progress:m.total?Math.round(100*m.loaded/m.total):_.progress,state:"IN_PROGRESS",content:null};if(function(g){return g.type===u.dt.Response}(m)){if(g){const s=m.headers.get("Content-Disposition").split(";")[1].split("filename")[1].split("=")[1].trim().replace(/\"/g,"");g(m.body,s)}return{progress:100,state:"DONE",content:m.body}}return _},{state:"PENDING",progress:0,content:null}),(0,r.x)((_,m)=>_.state===m.state&&_.progress===m.progress&&_.content===m.content))}}}]); 2//# sourceMappingURL=doc-library.fdf6980588808d58216e.js.map
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.