1"use strict";(self.webpackChunkszerzi_front=self.webpackChunkszerzi_front||[]).push([[1704],{21412:(re,w,s)=>{s.d(w,{h:()=>T});var B=s(97582),t=s(94650),c=s(71997),p=s(37340),A=s(92961),Z=s(78321),E=s(5963),l=s(44224),f=s(52835),O=s(36057),C=s(45218),b=s(6947),L=s(37570),y=s(50211),W=s(81664),F=s(81404),K=s(11481),Y=s(75489),k=s(55089),J=s(47959),H=s(39889),M=s(25156),Q=s(61479),G=s(52632),j=s(49651),I=s(32925),V=s(8269),X=s(97895),S=s(45144),$=s(48454),D=s(36895),q=s(47216),tt=s(67151),et=s(87918),nt=s(75382),it=s(39597),v=s(66616),ot=s(47044),st=s(21811),P=s(51971),at=s(2577),rt=s(73679),ct=s(47423),lt=s(73055),N=s(20545),pt=s(65681),_t=s(3550),dt=s(7463),ht=s(35232); 2/* 3 * @license 4 * Szerzi UG (haftungsbeschränkt) CONFIDENTIAL 5 * Unpublished Copyright (c) 2021 Szerzi UG (haftungsbeschränkt), All Rights Reserved. 6 * 7 * NOTICE: All information contained herein is, and remains the property of Szerzi UG (haftungsbeschränkt) 8 * The intellectual and technical concepts contained herein are proprietary to Szerzi UG (haftungsbeschränkt) 9 * and may be covered by E.U. and Foreign Patents, patents in process, and are protected by 10 * trade secret or copyright law. 11 * 12 * Dissemination of this information or reproduction of this material is strictly forbidden 13 * unless prior written permission is obtained from Szerzi UG (haftungsbeschränkt). Access to the source code
14 * obtained herein is hereby forbidden to anyone except current Szerzi UG (haftungsbeschränkt) employees, 15 * managers or contractors who have executed Confidentiality and Non-disclosure agreements 16 * explicitly covering such access. 17 * 18 * The copyright notice above does not evidence any actual or intended publication or disclosure 19 * of this source code, which includes information that is confidential and/or proprietary, 20 * and is a trade secret, of Szerzi UG (haftungsbeschränkt) ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, 21 * PUBLIC PERFORMANCE, OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT THE 22 * EXPRESS WRITTEN CONSENT OF Szerzi UG (haftungsbeschränkt) IS STRICTLY PROHIBITED, AND IN VIOLATION OF 23 * APPLICABLE LAWS AND INTERNATIONAL TREATIES. THE RECEIPT OR POSSESSION OF THIS SOURCE CODE 24 * AND/OR RELATED INFORMATION DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR 25 * DISTRIBUTE ITS CONTENTS, OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, 26 * IN WHOLE OR IN PART. 27 */const mt=["downloadDefaultText"],gt=["footerdivider"],Ct=["simpleBar"],Tt=["actionEdit"],ut=["actionSetting"],Et=["actionEllipsis"],ft=["finalizationAlert"];function Dt(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"nz-button-group",19)(1,"button",20),t.NdJ("click",function(){t.CHM(e);const r=t.oxw(2);return t.KtG(r.openShareModal())}),t._UZ(2,"i",21),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"button",20),t.NdJ("click",function(){t.CHM(e);const r=t.oxw(2);return t.KtG(r.copyContract(r.contractDetails.progress.metadata.name?r.contractDetails.progress.metadata.name:r.contractDetails.displayElements.name,r.contractDetails.progress.ID,r.asPipe.transform(r.contractDetails.progress,r.OwnContractProgress).permissions.users))}),t._UZ(6,"i",22),t._uU(7),t.ALo(8,"translate"),t.qZA(),t.TgZ(9,"button",20),t.NdJ("click",function(){t.CHM(e);const r=t.oxw(2);return t.KtG(r.rollbackContract(r.contractDetails.progress.ID,"manage"))}),t._UZ(10,"i",23),t._uU(11),t.ALo(12,"translate"),t.qZA()()}2&i&&(t.xp6(3),t.hij(" ",t.lcZ(4,3,"CLIENT.CONTRACTS.PROGRESSES.FUNCTIONS.SHARE")," "),t.xp6(4),t.hij(" ",t.lcZ(8,5,"CLIENT.CONTRACTS.PROGRESSES.FUNCTIONS.COPY")," "),t.xp6(4),t.hij(" ",t.lcZ(12,7,"CLIENT.CONTRACTS.PROGRESSES.FUNCTIONS.MANAGE")," "))}const At=function(i){return{contractName:i}};function Ot(i,n){if(1&i&&(t.TgZ(0,"span",29),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(t.xi3(2,1,"CLIENT.CONTRACTS.SHARE.FOOTER_TEXT",t.VKq(4,At,e.contractName)))}}function Lt(i,n){if(1&i&&(t.YNc(0,Ot,3,6,"ng-template",null,24,t.W1O),t._UZ(2,"nz-divider",25),t.TgZ(3,"div",26)(4,"p"),t._uU(5),t.ALo(6,"translate"),t.ALo(7,"translate"),t.qZA()(),t.TgZ(8,"div",27),t._UZ(9,"app-feedback",28),t.qZA()),2&i){const e=t.MAs(1),o=t.oxw(2);t.xp6(2),t.Q6J("nzText",e),t.xp6(3),t.AsE(" ",t.lcZ(6,6,"CLIENT.CONTRACTS.SHARE.ENTER_EMAIL")," ",t.lcZ(7,8,"CLIENT.CONTRACTS.SHARE.WARNING.LIMIT")," "),t.xp6(4),t.Q6J("title","COMMON.FEEDBACK.TITLES.SHARING")("feature",o.FeedbackFeature.Modal)("unit",o.FeedbackUnit.ShareContract)}}const Mt=function(i){return{"row m-h-0":i}},R=function(i,n,e){return[i,n,0,500,e]},x=function(i){return{contract:i}},It=function(i,n){return[i,null,0,500,n]};
27function St(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"div",14),t.NdJ("resized",function(r){t.CHM(e);const a=t.oxw();return t.KtG(a.onTitleResize(r))}),t.TgZ(1,"div",15),t.YNc(2,Dt,13,9,"nz-button-group",16),t.ALo(3,"as"),t.ALo(4,"as"),t.YNc(5,Lt,10,10,"ng-template",null,17,t.W1O),t.qZA(),t.TgZ(7,"span",18),t._uU(8),t.ALo(9,"hyphen"),t.ALo(10,"translate"),t.ALo(11,"hyphen"),t.ALo(12,"translate"),t.ALo(13,"hyphen"),t.qZA()()}if(2&i){const e=t.oxw();t.Q6J("ngClass",t.VKq(33,Mt,e.windowWidth<576)),t.xp6(2),t.Q6J("ngIf",e.sampleURL&&e.contractDetails.progress&&t.xi3(3,3,e.contractDetails,e.ContractDetails).progress.userID===e.userID&&t.xi3(4,6,e.contractDetails.progress,e.OwnContractProgress).permissions),t.xp6(6),t.hij(" ",t.G7q(9,9,t.WLB(47,It,e.sampleURL?t.xi3(10,15,"CLIENT.CONTRACTS.COMPLETE.READY",t.VKq(39,x,t.G7q(11,18,t.kEZ(35,R,e.contractName,e.progressLanguage,e.titleWidth)))):t.xi3(12,24,"CLIENT.CONTRACTS.COMPLETE.ALMOST_READY",t.VKq(45,x,t.G7q(13,27,t.kEZ(41,R,e.contractName,e.progressLanguage,e.titleWidth)))),e.titleWidth))," ")}}function vt(i,n){1&i&&(t.TgZ(0,"p"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"CLIENT.CONTRACTS.COMPLETE.FINALIZATION_WARNING")," "))}function Pt(i,n){1&i&&(t.TgZ(0,"p"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"CLIENT.CONTRACTS.COMPLETE.FINALIZATION_WARNING_SHARED_CLIENT")," "))}function Nt(i,n){1&i&&(t.TgZ(0,"p"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"CLIENT.CONTRACTS.COMPLETE.FINALIZATION_WARNING_SHARED_LAWYER")," "))}function Rt(i,n){1&i&&(t.TgZ(0,"p",32),t._uU(1),t.ALo(2,"translate"),t.ALo(3,"translate"),t.ALo(4,"translate"),t.TgZ(5,"a",33),t.ALo(6,"localizeRoute"),t._uU(7),t.ALo(8,"translate"),t.qZA()()),2&i&&(t.xp6(1),t.AsE(" ",t.lcZ(2,4,"CLIENT.CONTRACTS.COMPLETE.ADDON_WARNING")," ",t.lcZ(3,6,"CLIENT.CONTRACTS.SEGMENT.CUSTOM_CLAUSE.WARNING").charAt(0).toLowerCase()+t.lcZ(4,8,"CLIENT.CONTRACTS.SEGMENT.CUSTOM_CLAUSE.WARNING").slice(1)," "),t.xp6(4),t.Q6J("href",t.lcZ(6,10,"/general-terms-of-service#tab-0"),t.LSH),t.xp6(2),t.Oqu(t.lcZ(8,12,"CLIENT.CONTRACTS.SEGMENT.CUSTOM_CLAUSE.TOS_LINK")))}function xt(i,n){if(1&i&&(t.TgZ(0,"p"),t._uU(1),t.ALo(2,"translate"),t.qZA(),t.TgZ(3,"p"),t._uU(4),t.ALo(5,"translate"),t.TgZ(6,"a",30),t._uU(7),t.ALo(8,"translate"),t.qZA(),t._uU(9),t.ALo(10,"translate"),t.qZA(),t.YNc(11,vt,3,3,"p",11),t.ALo(12,"as"),t.ALo(13,"as"),t.YNc(14,Pt,3,3,"p",11),t.ALo(15,"as"),t.ALo(16,"as"),t.YNc(17,Nt,3,3,"p",11),t.ALo(18,"as"),t.ALo(19,"as"),t.YNc(20,Rt,9,14,"p",31)),2&i){const e=t.oxw();
27t.xp6(1),t.hij(" ",t.lcZ(2,8,"CLIENT.CONTRACTS.COMPLETE.SUPPORT")," "),t.xp6(3),t.hij(" ",t.lcZ(5,10,"CLIENT.CONTRACTS.COMPLETE.AVDH.PART_1")," "),t.xp6(3),t.hij(" ",t.lcZ(8,12,"CLIENT.CONTRACTS.COMPLETE.AVDH.LINK"),""),t.xp6(2),t.hij("",t.lcZ(10,14,"CLIENT.CONTRACTS.COMPLETE.AVDH.PART_2")," "),t.xp6(2),t.Q6J("ngIf",e.contractDetails&&e.contractDetails.progress&&!t.xi3(12,16,e.contractDetails.progress,e.AdvancedContractProgress).finalization&&t.xi3(13,19,e.contractDetails,e.ContractDetails).progress.userID===e.userID),t.xp6(3),t.Q6J("ngIf",e.contractDetails&&e.contractDetails.progress&&!t.xi3(15,22,e.contractDetails.progress,e.AdvancedContractProgress).finalization&&t.xi3(16,25,e.contractDetails,e.ContractDetails).progress.userID!==e.userID&&!e.isLawyer),t.xp6(3),t.Q6J("ngIf",e.contractDetails&&e.contractDetails.progress&&!t.xi3(18,28,e.contractDetails.progress,e.AdvancedContractProgress).finalization&&t.xi3(19,31,e.contractDetails,e.ContractDetails).progress.userID!==e.userID&&e.isLawyer),t.xp6(3),t.Q6J("ngIf",e.contractState&&e.contractState.addons>0)}}function zt(i,n){1&i&&t._UZ(0,"img",34)}function Ut(i,n){1&i&&(t.TgZ(0,"div",42),t._uU(1),t.ALo(2,"translate"),t.TgZ(3,"a",33),t.ALo(4,"localizeRoute"),t._uU(5),t.ALo(6,"translate"),t.qZA()()),2&i&&(t.Q6J("@showErrorInnerAnimation",void 0),t.xp6(1),t.hij(" ",t.lcZ(2,4,"CLIENT.CONTRACTS.COMPLETE.SAMPLE_ERROR.MESSAGE")," "),t.xp6(2),t.Q6J("href",t.lcZ(4,6,"/contact-us"),t.LSH),t.xp6(2),t.Oqu(t.lcZ(6,8,"CLIENT.CONTRACTS.COMPLETE.SAMPLE_ERROR.CONTACT_US")))}const wt=function(i,n){return{"0%":i,"100%":n}};function Bt(i,n){if(1&i&&(t.TgZ(0,"div",39),t._UZ(1,"nz-progress",40),t.YNc(2,Ut,7,10,"div",41),t.qZA()),2&i){const e=t.oxw(2);t.Q6J("@showErrorOuterAnimation",e.showError),t.xp6(1),t.Q6J("nzPercent",e.percent)("nzStrokeColor",t.WLB(5,wt,e.ColorSettings.Tertiary,e.ColorSettings.Qu
27inary))("nzStatus",e.showError?"exception":null),t.xp6(1),t.Q6J("ngIf",e.showError)}}function Zt(i,n){1&i&&t._UZ(0,"nz-skeleton-element",48),2&i&&t.Q6J("nzActive",!0)}const z=function(){return{autoHide:!1}};function bt(i,n){if(1&i&&(t.TgZ(0,"ngx-simplebar",43)(1,"div",44)(2,"div",45),t._UZ(3,"nz-skeleton-element",46),t.qZA(),t.YNc(4,Zt,1,1,"nz-skeleton-element",47),t.qZA()()),2&i){const e=t.oxw(2);t.Q6J("@skeletonPosAbsLeave",void 0)("options",t.DdM(4,z)),t.xp6(3),t.Q6J("nzActive",!0),t.xp6(1),t.Q6J("ngForOf",e.skeletonLines)}}function yt(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"ngx-simplebar",49,50),t.NdJ("nzTooltipVisibleChange",function(r){t.CHM(e);const a=t.oxw(2);return t.KtG(a.scrollTooltipVisible=r)})("click",function(){t.CHM(e);const r=t.oxw(2);return t.KtG(r.pdfRendered?r.changeScrollTooltip(!0):null)}),t.ALo(2,"translate"),t.TgZ(3,"pdf-viewer",51),t.NdJ("page-rendered",function(){t.CHM(e);const r=t.oxw(2);return t.KtG(r.pdfProgressRendered())}),t.qZA()()}if(2&i){const e=t.oxw(2);t.Q6J("@skeletonPosAbsLeave",void 0)("options",t.DdM(14,z))("nzTooltipTitle",t.lcZ(2,12,"CLIENT.CONTRACTS.COMPLETE.CAN_SCROLL"))("nzTooltipTrigger",null)("nzTooltipVisible",e.scrollTooltipVisible)("nzTooltipPlacement","left")("nzTooltipOverlayClassName","scrollTooltip")("@pdfAnimation",e.pdfRendered?"rendered":"loading"),t.xp6(3),t.Q6J("src",e.sampleURL)("render-text",!0)("original-size",!1)("autoresize",!0)}}function Wt(i,n){if(1&i&&(t.YNc(0,Bt,3,8,"ng-template",null,35,t.W1O),t.TgZ(2,"nz-spin",36),t.YNc(3,bt,5,5,"ngx-simplebar",37),t.YNc(4,yt,4,15,"ngx-simplebar",38),t.qZA()),2&i){const e=t.MAs(1),o=t.oxw();t.xp6(2),t.Q6J("nzDelay",1e3)("nzSpinning",o.showSpinner||!o.pdfRendered)("nzIndicator",e),t.xp6(1),t.Q6J("ngIf",!o.sampleURL||o.showSpinner||!o.pdfRendered),t.xp6(1),t.Q6J("ngIf",o.sampleURL)}}function Ft(i,n){if(1&i&&t._UZ(0,"app-need-help-button",52),2&i){const e=t.oxw();t.Q6J("progressID",e.isOwned?e.progressID:null)("matchmakingCategoryKind",e.matchmakingCategory)}}
27function Kt(i,n){if(1&i){const e=t.EpF();t.TgZ(0,"button",54),t.NdJ("click",function(){t.CHM(e);const r=t.oxw(2);return t.KtG(r.openSample())}),t.TgZ(1,"span",55),t._uU(2),t.ALo(3,"translate"),t.qZA()()}if(2&i){const e=t.oxw(2);t.Q6J("disabled",!e.sampleURL),t.xp6(2),t.hij(" ",t.lcZ(3,2,"CLIENT.CONTRACTS.COMPLETE.FUNCTIONS.SAMPLE")," ")}}function Yt(i,n){if(1&i&&(t.YNc(0,Kt,4,4,"button",53),t.ALo(1,"as")),2&i){const e=t.oxw();t.Q6J("ngIf",!e.contractDetails||!e.contractDetails.progress||!t.xi3(1,1,e.contractDetails.progress,e.AdvancedContractProgress).finalization)}}function kt(i,n){if(1&i&&(t._UZ(0,"app-multi-state-button",57),t.ALo(1,"as")),2&i){const e=t.oxw(2);t.Q6J("defaultIcon",e.contractDetails.progress&&t.xi3(1,5,e.contractDetails.progress,e.AdvancedContractProgress).finalization||e.isLawyer?"download":null)("disabled",!e.sampleURL)("defaultFunction",e.defaultFunction)("nzTextKeys",e.downloadText)("stickResult",!1)}}function Jt(i,n){if(1&i&&(t.YNc(0,kt,2,8,"app-multi-state-button",56),t.ALo(1,"as")),2&i){const e=t.oxw();t.Q6J("ngIf",e.contractDetails&&e.contractDetails.progress&&t.xi3(1,1,e.contractDetails,e.ContractDetails).progress.userID===e.userID||e.isLawyer)}}const Ht=function(i){return{name:i}};function Qt(i,n){if(1&i&&(t._UZ(0,"nz-alert",58),t.ALo(1,"translate")),2&i){const e=t.oxw();t.Q6J("nzMessage",t.xi3(1,1,e.contractDetails&&e.contractDetails.progress&&e.contractDetails.progress.finalization?"CLIENT.CONTRACTS.COMPLETE.FINALIZATION_SHARED_NOTICE.AFTER":e.isLawyer?"CLIENT.CONTRACTS.COMPLETE.FINALIZATION_SHARED_NOTICE.LAWYER_BEFORE":"CLIENT.CONTRACTS.COMPLETE.FINALIZATION_SHARED_NOTICE.CLIENT_BEFORE",t.VKq(4,Ht,e.contractName)))}}const U=function(i){return{timeLeft:i}};function Gt(i,n){if(1&i&&(t.ynx(0),t._UZ(1,"i",61),t.ALo(2,"translate"),t.ALo(3,"dateAfter"),t._uU(4),t.ALo(5,"translate"),t.ALo(6,"dateAfter"),t.BQk()),2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("nzTooltipTitle",t.xi3(2,3,"CLIENT.CONTRACTS.ALLOWED_MODIFICATIONS_TIME_LEFT_TOOLTIP",t.VKq(17,U,t.Dn7(3,6,e.modificationEndTime,e.dateAfterTrigger,2))))("nzTooltipTrigger","click"),t.xp6(3),t.hij(" ",t.xi3(5,10,"CLIENT.CONTRACTS.COMPLETE.ALLOWED_MODIFICATIONS_TIME_LEFT",t.VKq(19,U,t.Dn7(6,13,e.modificationEndTime,e.dateAfterTrigger,2)))," ")}}const jt=function(i,n){return{currentFieldChangeAllowance:i,initialFieldChangeAllowance:n}};function Vt(i,n){if(1&i&&(t.ynx(0),t._UZ(1,"i",61),t.ALo(2,"translate"),t._uU(3),t.ALo(4,"translate"),t.BQk()),2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("nzTooltipTitle",t.lcZ(2,3,"CLIENT.CONTRACTS.COMPLETE.ALLOWED_MODIFICATIONS_DESC"))("nzTooltipTrigger","click"),t.xp6(2),t.hij(" ",t.xi3(4,5,"CLIENT.CONTRACTS.COMPLETE.ALLOWED_MODIFICATIONS",t.WLB(8,jt,e.contractDetails.progress.finalization.currentFieldChangeAllowance,e.contractDetails.progress.finalization.initialFieldChangeAllowance))," ")}}function Xt(i,n){if(1&i&&(t.TgZ(0,"div",60),t.YNc(1,Gt,7,21,"ng-container",11),t.YNc(2,Vt,5,11,"ng-container",11),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.showModificationEndTime),t.xp6(1),t.Q6J("ngIf",!e.showModificationEndTime)}}function $t(i,n){1&i&&(t.TgZ(0,"div"),t.YNc(1,Xt,3,2,"div",59),t.qZA())}function qt(i,n){1&i&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"CLIENT.CONTRACTS.COMPLETE.FUNCTIONS.BUTTON_STATES.DOWNLOAD")))}function te(i,n){1&i&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"CLIENT.CONTRACTS.COMPLETE.FUNCTIONS.BUTTON_STATES.BUY")))}function ee(i,n){if(1&i&&(t.YNc(0,qt,3,3,"span",11),t.ALo(1,"as"),t.YNc(2,te,3,3,"span",11),t.ALo(3,"as")),2&i){const e=t.oxw();t.Q6J("ngIf",e.contractDetails.progress&&t.xi3(1,2,e.contractDetails.progress,e.AdvancedContractProgress).finalization||e.isLawyer),t.xp6(2),t.Q6J("ngIf",!(e.contractDetails.progress&&t.xi3(3,5,e.contractDetails.progress,e.AdvancedContractProgress).finalization||e.isLawyer))}}let T=class{constructor(n,e,o,r,a,h,m,g,d,_,u,ne,ie,oe,se,ae){this.clientService=n,this.modalService=e,this.paymentModalService=o,this.sanitizer=r,this.eventService=a,this.userService=h,this.contractService=m,this.routerService=g,this.modal=d,this.resizeService=_,this.paymentService=u,this.nzMessageService=ne,this.translate=ie,this.dateTrigger=oe,this.trackingService=se,this.asPipe=ae,this.skeletonLines=Array(20).fill(!0),this.showError=!1,this.percent=0,this.expectedLoadTime=15e3,this.showSpinner=!0,this.isLawyer=!1,this.userID="",this.buttonList=[],this.pdfRendered=!1,this.scrollTooltipVisible=!1,this.tooltipHandlerAdded=!1,this.dateAfterTrigger=0,this.modificationEndTime=0,this.showModificationEndTime=!1,this.isOwned=!0,this.ContractDetails=c.Bot,this.ColorSettings=Z.y,this.FeedbackFeature=c.lrp,this.FeedbackUnit=c._0Z,this.OwnContractProgress=c.c9m,this.AdvancedContractProgress=c._Wq}ngOnInit(){this.isLawyer=this.userService.isLawyer,this.updateContractData().then(n=>
27{this.getProgressLanguage(),this.updateFunctions(),this.getState(),n.progress.finalization?(this.expectedLoadTime=1e3,this.getDownload()):(this.expectedLoadTime=15e3,this.getSample()),this.scheduleUpdateButtonList()},n=>{}),this.defaultFunction=()=>this.finalize(),this.increasePercent(),this.userID=this.userService.sessionUserID,this.windowWidth=window.innerWidth,this.resizeWidthSubscription=this.resizeService.width.subscribe(n=>{this.windowWidth=n}),this.scheduleUpdateButtonList(),this.dateTrigger.trigger.subscribe(n=>{this.dateAfterTrigger=n})}updateContractData(){let n=Date.now();return this.clientService.getContractProgressByID(this.progressID).pipe((0,l.t)(this)).toPromise().then(e=>(this.contractDetails=e,this.isOwned=!0,this.updateModificationTimer(n),Promise.resolve(e)),e=>(console.log(e),n=Date.now(),this.clientService.getContractSharedPermission(this.progressID).pipe((0,l.t)(this)).toPromise().then(o=>(this.contractDetails=o,this.isOwned=!1,this.updateModificationTimer(n),Promise.resolve(o)),o=>(console.log(o),Promise.reject(o)))))}updateModificationTimer(n){this.contractDetails.progress.finalization&&(this.modificationEndTime=this.contractDetails.progress.finalization.unlimitedFieldChangePeriodRemainder+n,this.showModificationEndTime=this.modificationEndTime>Date.now(),this.showModificationEndTime&&(this.modificationUpdateTimeout&&this.modificationUpdateTimeout.unsubscribe(),this.modificationUpdateTimeout=(0,E.H)(Math.max(0,this.modificationEndTime-Date.now())).pipe((0,l.t)(this)).subscribe(e=>{this.updateContractData()})))}getProgressLanguage(){this.contractService.getAvailableContracts().then(n=>{this.availableContracts=n,this.actContractResponse=this.availableContracts.find(e=>e.name===this.contractDetails.progress.canonical.name),this.actContractResponse&&(this.progressLanguage=this.actContractResponse.language,this.matchmakingCategory=this.actContractResponse.metadata.matchmaking)})}updateFunctions(){this.getContractDownloadFunction=n=>this.contractDetails&&(this.contractDetails.progress.permissions||this.contractDetails.progress.permission)?this.clientService.getContractDownload(n):this.clientService.getContractDownloadLawyer(n),this.get
27StateFunction=n=>this.contractDetails&&(this.contractDetails.progress.permissions||this.contractDetails.progress.permission)?this.clientService.getState(n):this.clientService.getStateLawyer(n),this.getContractSampleFunction=n=>this.contractDetails&&(this.contractDetails.progress.permissions||this.contractDetails.progress.permission)?this.clientService.getContractSample(n):this.clientService.getContractSampleLawyer(n)}getState(){this.getStateFunction(this.progressID).pipe((0,l.t)(this)).subscribe(n=>{this.contractState=n},n=>{console.log(n)})}ngAfterViewInit(){this.downloadText=new A.PR(this.downloadDefaultText,"CLIENT.CONTRACTS.COMPLETE.FUNCTIONS.BUTTON_STATES.DOWNLOADING","CLIENT.CONTRACTS.COMPLETE.FUNCTIONS.BUTTON_STATES.DOWNLOADED","CLIENT.CONTRACTS.COMPLETE.FUNCTIONS.BUTTON_STATES.FAILED"),this.scheduleUpdateButtonList(),this.viewInitResolve(null),this.transactionID&&this.finalize()}ngOnDestroy(){this.resizeWidthSubscription&&this.resizeWidthSubscription.unsubscribe(),window.removeEventListener("click",n=>this.tooltipClickHandler(n))}increasePercent(){let n;(this.sampleURL||!this.showError&&this.percent<90)&&this.percent++,this.sampleURL?n=10:(n=this.expectedLoadTime,n*=this.percent>80?.1:this.percent>70?.025:this.percent<=60&&this.percent>=20?.00625:.25/30),this.increasePercentTimeout=this.percent<100?(0,E.H)(n).pipe((0,l.t)(this)).subscribe(e=>{this.increasePercent()}):(0,E.H)(600).pipe((0,l.t)(this)).subscribe(e=>{this.showSpinner=!1})}getSample(n=3){n>0?this.getContractSampleFunction(this.progressID).pipe((0,l.t)(this)).subscribe(e=>{this.contractService.filename(this.contractDetails.progress.metadata.name?this.contractDetails.progress.metadata.name:this.contractDetails.displayElements.name,"sample"),document.createElement("a"),this.sampleURL=URL.createObjectURL(e),this.scheduleUpdateButtonList(),this.showSpinner=!1},e=>{console.log(e),this.modalService.generatorErrorModal(this.contractName,this.progressID)}):this.showError=!0}copyContract(n,e,o){this.contractService.copyContract(n,e,o,this.modificationEndTime),this.eventService.copiedContract.subscribe(r=>{this.modal.close(!1)})}getDownload(n=3){n>0?this.getContractDownloadFunction(this.progressID).pipe((0,l.t)(this)).subscribe(e=>{this.contractService.filename(this.contractDetails.progress.metadata.name?this.contractDetails.progress.metadata.name:this.contractDetails.displayElements.name),document.createElement("a"),this.sampleURL=URL.createObjectURL(e),this.scheduleUpdateButtonList()},e=>{this.modalService.generatorErrorModal(this.contractName,this.progressID)}):this.showError=!0}openSample(){this.sampleURL&&this.routerService.windowOpenAlternative(this.sampleURL)}finalize(){if(this.contractDetails&&this.contractDetails.progress.finalization||this.isLawyer)return this.downloadFinal();{let n=Date.now();return new Promise((e,o)=>{const r=this.contractService.allModules?.filter(a=>a.kindName===this.contractDetails.progress.canonical.name);C.L.config.currentPaymentProvider===c.OHy.Stripe&&this.contractService.currentSubscriptionState&&r.some(a=>this.contractService.currentSubscriptionState.modules.includes(a.ID))?this.clientService.postContractStripeFinalizeWithSubscription(new c.sxX(this.contractDetails.progress.ID,this.contractService.currentSubscriptionState.ID,this.contractService.currentSubscriptionState.key,this.contractService.currentSubscriptionState.modules,this.contractService.currentSubscriptionState.providerData.status)).pipe((0,l.t)(this)).toPromise().then(a=>{this.contractDetails.progress=a,this.updateModificationTimer(n);const h=this.downloadFinal(!0);return e(h),this.scheduleUpdateButtonList(),h},a=>{if(409===a.status){this.eventService.quotaChanged.emit(),n=Date.now(),this.clientService.getContractProgressByID(this.progressID).pipe((0,l.t)(this)).subscribe(m=>{this.contractDetails=m,this.isOwned=!0,this.updateModificationTimer(n),this.scheduleUpdateButtonList()},m=>{console.log(m)});const h=this.downloadFinal(!0);return e(h),h}return this.modalService.generatorErrorModal(this.contractName,this.progressID),console.log(a),o(),Promise.reject()}):this.paymentModalService.benefitListModal(this.progressID,null,O.Oz.CONTRACT,(a,h,m)=>{let g;return g=a instanceof c.h$3?this.clientService.postContractCreditFinalize(new c.AWd(this.progressID,a)).pipe((0,l.t)(this)).toPromise():C.L.config.currentPaymentProvider===c.OHy.Braintree&&a instanceof c.xJR?this.clientService.postContractBraintreeFinalize(new c.Uso(this.progressID,a)).pipe((0,l.t)(this)).toPromise():C.L.config.currentPaymentProvider===c.OHy.Str
27ipe&&a instanceof c.BAK?this.clientService.postContractStripeFinalize(new c.K64(this.progressID,a.idempotencyID)).pipe((0,l.t)(this)).toPromise().then(d=>a.stripe.confirmCardPayment(d.clientSecret,{payment_method:a.paymentID}).then(_=>!_.error||_.error.code&&"payment_intent_unexpected_state"===_.error.code?this.paymentService.paymentStripeCheck(this.clientService.postContractStripeCheck(this.progressID,new c.otv(d.paymentIntentID)).pipe((0,l.t)(this))):Promise.reject(),_=>(console.log(_),Promise.reject())),d=>(console.log(d),Promise.reject())):this.transactionID&&a instanceof c.Ink&&a.checkNeeded?this.clientService.postContractUnicreditCheck(this.progressID,new c._mi(this.transactionID)).pipe((0,l.t)(this)).toPromise():a instanceof c.Ink?this.clientService.postContractUnicreditFinalize(new c.f2E(this.progressID)).pipe((0,l.t)(this)).toPromise().then(d=>{const _=new c.JdH(O.Oz.CONTRACT,d.transactionID,this.progressID);localStorage.setItem(b.B.pendingPayment,JSON.stringify(_)),this.routerService.hrefOrRouter(C.L.config.unicreditTransactionUrl+d.transactionID)},d=>(console.log(d),Promise.reject())):Promise.reject(),g.then(d=>{let _;return this.contractDetails.progress=d,this.updateModificationTimer(n),this.eventService.quotaChanged.emit(),_=!(a instanceof c.Ink)||this.transactionID&&a.checkNeeded?this.downloadFinal(!0):Promise.resolve(),e(_),this.scheduleUpdateButtonList(),(C.L.config.currentPaymentProvider===c.OHy.Braintree&&a instanceof c.xJR||C.L.config.currentPaymentProvider===c.OHy.Stripe&&a instanceof c.BAK||this.transactionID&&a instanceof c.Ink&&a.checkNeeded)&&(this.trackingService.sendGoogleTagManagerPurchaseEvent(h,m),this.trackingService.sendPixelPurchaseEvent([this.contractDetails.progress.canonical.name],h,m)),_},d=>{if(409===d.status){this.eventService.quotaChanged.emit(),n=Date.now(),this.clientService.getContractProgressByID(this.progressID).pipe((0,l.t)(this)).subscribe(u=>{this.contractDetails=u,this.isOwned=!0,this.updateModificationTimer(n),this.scheduleUpdateButtonList()},u=>{console.log(u)});const _=this.downloadFinal(!0);return e(_),_}return this.modalService.generatorErrorModal(this.contractName,this.progressID),console.log(d),o(),Promise.reject()})},()=>o(),0,c.Fa6.HUF,this.eventService.clientStatus&&this.eventService.clientStatus.valueAddedTax?this.eventService.clientStatus.valueAddedTax:null,C.L.config.unicreditEnabled?c.OHy.Unicredit:C.L.config.currentPaymentProvider,null!=this.transactionID)})}}downloadFinal(n=!1){const e=this.getContractDownloadFunction(this.progressID).pipe((0,l.t)(this)).toPromise();return e.then(o=>{const r=this.contractService.filename(this.contractDetails.progress.metadata.name?this.contractDetails.progress.metadata.name:this.contractDetails.displayElements.name),a=document.createElement("a"),h=URL.createObjectURL(o);n&&(this.sampleURL=URL.createObjectURL(o),this.scheduleUpdateButtonList()),a.href=h,a.download=r,document.body.appendChild(a),a.click(),(0,E.H)(0).pipe((0,l.t)(this)).subscribe(m=>{document.body.removeChild(a),window.URL.revokeObjectURL(h)})},o=>{this.modalService.generatorErrorModal(this.contractName,this.progressID)}),e}openShareModal(){this.contractDetails.progress.userID===this.userID&&this.modalService.contractShareModal(this.progressID,this.contractDetails,this.footerdivider,n=>{n&&(this.contractDetails.progress.permissions=n)},n=>{n&&(this.contractDetails.progress.permissions=n)})}rollbackContract(n,e){this.routerService.routeToContractRollback(n,e),this.modal.close()}scheduleUpdateButtonList(){this.viewInitPromise||(this.viewInitPromise=new Promise((n,e)=>{this.viewInitResolve=n})),this.viewInitPromise.then(()=>this.updateButtonList())}updateButtonList(){this.buttonList=this.sampleURL?(this.contractDetails&&this.contractDetails.progress&&this.contractDetails.progress.finalization?[]:[this.actionEdit]).concat((this.isLawyer?[]:[this.actionSetting]).concat(this.contractDetails&&this.contractDetails.progress&&this.contractDetails.progress.userID===this.userID||this.isLawyer?[this.actionEllipsis]:[])).concat(this.contractDetails&&this.contractDetails.progress&&this.contractDetails.progress.userID!==this.userID?[this.finalizationAlert]:[]):[]}pdfProgressRendered(){this.pdfRendered=!0,this.initializeScrollTooltip()}initializeScrollTooltip(){if(this.scrollTooltipVisible=!0,!this.tooltipHandlerAdded&&this.simpleBar&&this.simpleBar.SimpleBar){const n=this.simpleBar.SimpleBar.axis.y.track.el;if(n&&this.nzTooltipDirective){const e=new t.SBq(n);this.nzTooltipDirective.component.origin=e,this.scrollTooltipVisible=!0,this.tooltipHandlerAdded=!0,window.addEventListener("click",o=>
27this.tooltipClickHandler(o))}}}changeScrollTooltip(n){this.scrollTooltipVisible=n}tooltipClickHandler(n){if(this.simpleBar&&this.simpleBar.SimpleBar){const e=this.simpleBar.SimpleBar.getScrollElement();let o=n.target;for(;o&&o!==e;)o=o.parentElement;n.target&&o!==e&&this.changeScrollTooltip(!1)}}onTitleResize(n){this.titleWidth=n.newRect.width}};T.\u0275fac=function(n){return new(n||T)(t.Y36(y.y),t.Y36(W.Z),t.Y36(F.u),t.Y36(K.H7),t.Y36(Y.P),t.Y36(k.K),t.Y36(J.W),t.Y36(H.c),t.Y36(M.Lf),t.Y36(Q._),t.Y36(G.t),t.Y36(j.dD),t.Y36(I.sK),t.Y36(V.J),t.Y36(X.e),t.Y36(S.j))},T.\u0275cmp=t.Xpm({type:T,selectors:[["app-contract-complete-modal"]],viewQuery:function(n,e){if(1&n&&(t.Gf(mt,5),t.Gf(gt,5),t.Gf(Ct,5),t.Gf(Tt,5),t.Gf(ut,5),t.Gf(Et,5),t.Gf(ft,5),t.Gf(L.SY,5)),2&n){let o;t.iGM(o=t.CRH())&&(e.downloadDefaultText=o.first),t.iGM(o=t.CRH())&&(e.footerdivider=o.first),t.iGM(o=t.CRH())&&(e.simpleBar=o.first),t.iGM(o=t.CRH())&&(e.actionEdit=o.first),t.iGM(o=t.CRH())&&(e.actionSetting=o.first),t.iGM(o=t.CRH())&&(e.actionEllipsis=o.first),t.iGM(o=t.CRH())&&(e.finalizationAlert=o.first),t.iGM(o=t.CRH())&&(e.nzTooltipDirective=o.first)}},inputs:{contractName:"contractName",progressID:"progressID",transactionID:"transactionID"},decls:23,vars:9,consts:[[1,"m-b-0","contractCard",3,"nzCover","nzActions"],[3,"nzTitle","nzDescription","nzAvatar"],["titleTemplate",""],["descriptionTemplate",""],["avatarTemplate",""],["coverTemplate",""],["actionSetting",""],["actionEdit",""],["actionEllipsis",""],["finalizationAlert",""],[1,"p-b-20"],[4,"ngIf"],[1,"feedback-positioning",3,"unit","feature","title"],["downloadDefaultText",""],[3,"ngClass","resized"],[1,"m-b-10","float-right","col-xs-12","col-sm-12","col-md-auto","w-auto","ml-auto","m-r-0"],["class","flex-wrap float-right","nzSize","small",4,"ngIf"],["footerdivider",""],[1,"col-xs-12","col-sm-12","col-md-auto","white-space-normal","p-l-0"],["nzSize","small",1,"flex-wrap","float-right"],["nz-button","","nzType","primary",3,"click"],["nz-icon","","nzType","share-alt","theme","outline"],["nz-icon","","nzType","copy","theme","outline"],["nz-icon","","nzType","file-protect","theme","outline"],["dividerText",""],["nzOrientation","left",3,"nzText"],["nz-row","","nzJustify","start"],[1,"row","w-100","justify-content-end"],[1,"feedback-positioning",3,"title","feature","unit"],[1,"white-space-normal"],["href","https://magyarorszag.hu/avdh","target","_blank","rel","noopener noreferrer",1,"open-link-brand-16"],["class","font-size-smaller",4,"ngIf"],[1,"font-size-smaller"],["target","_blank","rel","noopener noreferrer",1,"open-link-brand-16",3,"href"],["src","assets/images/done-contract.svg","alt","Done contract logo"],["indicatorTemplate",""],[1,"loadingSpin",3,"nzDelay","nzSpinning","nzIndicator"],["style","height: 100%",3,"options",4,"ngIf"],["style","height: 100%","nz-tooltip","",3,"options","nzTooltipTitle","nzTooltipTrigger","nzTooltipVisible","nzTooltipPlacement","nzTooltipOverlayClassName","nzTooltipVisibleChange","click",4,"ngIf"],[1,"centerProgress","w-100"],["nzType","circle",1,"progressCirlce",3,"nzPercent","nzStrokeColor","nzStatus"],["class","text-danger p-t-10 p-l-20 p-r-20",4,"ngIf"],[1,"text-danger","p-t-10","p-l-20","p-r-20"],[2,"height","100%",3,"options"],[1,"w-100","m-t-10","p-t-30","text-center"],[1,"w-100","text-center"],["nzType","input","nzSize","small",1,"p-b-10","w-30",3,"nzActive"],["class","p-b-10 w-75 pdfSkeleton","nzType","input",3,"nzActive",4,"ngFor","ngForOf"],["nzType","input",1,"p-b-10","w-75","pdfSkeleton",3,"nzActive"],["nz-tooltip","",2,"height","100%",3,"options","nzTooltipTitle","nzTooltipTrigger","nzTooltipVisible","nzTooltipPlacement","nzTooltipOverlayClassName","nzTooltipVisibleChange","click"],["simpleBar",""],[2,"display","block",3,"src","render-text","original-size","autoresize","page-rendered"],[1,"helpButton",3,"progressID","matchmakingCategoryKind"],["nz-button","","nzType","default",3,"disabled","click",4,"ngIf"],["nz-button","","nzType","default",3,"disabled","click"],[1,"open-link-brand-button-16"],["nzType","primary","class","downloadButton",3,"defaultIcon","disabled","defaultFunction","nzTextKeys","stickResult",4,"ngIf"],["nzType","primary",1,"downloadButton",3,"defaultIcon","disabled","defaultFunction","nzTextKeys","stickResult"],["nzType","info","nzShowIcon","",1,"curs
27or-default",3,"nzMessage"],["class","p-b-10",4,"nzModalFooter"],[1,"p-b-10"],["nz-icon","","nzType","info-circle","nzTheme","outline","nz-tooltip","",1,"middle-alignment","pr-1",3,"nzTooltipTitle","nzTooltipTrigger"]],template:function(n,e){if(1&n&&(t.TgZ(0,"nz-card",0),t._UZ(1,"nz-card-meta",1),t.qZA(),t.YNc(2,St,14,50,"ng-template",null,2,t.W1O),t.YNc(4,xt,21,34,"ng-template",null,3,t.W1O),t.YNc(6,zt,1,0,"ng-template",null,4,t.W1O),t.YNc(8,Wt,5,5,"ng-template",null,5,t.W1O),t.YNc(10,Ft,1,2,"ng-template",null,6,t.W1O),t.YNc(12,Yt,2,4,"ng-template",null,7,t.W1O),t.YNc(14,Jt,2,4,"ng-template",null,8,t.W1O),t.YNc(16,Qt,2,6,"ng-template",null,9,t.W1O),t.TgZ(18,"div",10),t.YNc(19,$t,2,0,"div",11),t._UZ(20,"app-feedback",12),t.qZA(),t.YNc(21,ee,4,8,"ng-template",null,13,t.W1O)),2&n){const o=t.MAs(3),r=t.MAs(5),a=t.MAs(7),h=t.MAs(9);t.Q6J("nzCover",h)("nzActions",e.buttonList),t.xp6(1),t.Q6J("nzTitle",o)("nzDescription",r)("nzAvatar",a),t.xp6(18),t.Q6J("ngIf",e.contractDetails&&e.contractDetails.progress&&e.contractDetails.progress.finalization),t.xp6(1),t.Q6J("unit",e.FeedbackUnit.ContractFinalization)("feature",e.FeedbackFeature.Modal)("title",e.contractName)}},dependencies:[$.rQ,D.mk,D.sg,D.O5,q.X,tt.a5,et.M,A.P4,nt.u,it.r,v.ix,v.fY,ot.w,st.dQ,P.bd,P.l7,at.g,rt.SK,ct.Ls,M.Uh,lt.M,N.Xw,N.yg,pt.W,L.SY,I.X$,S.j,_t.z,dt.N,ht.d],styles:['@charset "UTF-8";[_nghost-%COMP%] .ant-card-cover{height:40vh;overflow:auto}[_nghost-%COMP%] .ant-card-actions{display:flex;justify-content:center;flex-wrap:wrap}[_nghost-%COMP%] .ant-card-actions li{width:-moz-fit-content!important;width:fit-content!important;margin:12px}[_nghost-%COMP%] .pdfSkeleton[_ngcontent-%COMP%]{height:12px}[_nghost-%COMP%] .pdfSkeleton[_ngcontent-%COMP%] .ant-skeleton-input{height:12px}[_nghost-%COMP%] .contractCard[_ngcontent-%COMP%] .ant-card-actions{height:auto;opacity:1;animation:.3s ease-out 0s 1 contractCardAnimation}@keyframes contractCardAnimation{0%{transform:translateY(-100%);height:0;opacity:0}
27to{transform:translateY(0);height:auto;opacity:1}}.helpIcon[_ngcontent-%COMP%]{line-height:0!important}.downloadButton[_ngcontent-%COMP%] .anticon, .helpButton[_ngcontent-%COMP%] .anticon{border:0!important}.centerProgress[_ngcontent-%COMP%]{position:absolute;top:50%;transform:translateY(-50%)}.loadingSpin[_ngcontent-%COMP%]{height:100%;overflow:hidden}.loadingSpin[_ngcontent-%COMP%] .ant-spin-container{height:100%}.scrollTooltip[_ngcontent-%COMP%]{position:absolute}.contractCard[_ngcontent-%COMP%] .ant-card-meta-description{margin-bottom:1rem} nz-button-group{gap:.25rem}'],data:{animation:[f.Ln,f.rL,f.le,(0,p.X$)("inOutAnimationSkeleton",[(0,p.eR)(":enter",[(0,p.oB)({opacity:0}),(0,p.jt)("0.3s ease-out",(0,p.oB)({opacity:1}))]),(0,p.eR)(":leave",[(0,p.oB)({opacity:1}),(0,p.jt)("0.3s ease-in",(0,p.oB)({opacity:0}))])]),(0,p.X$)("showErrorInnerAnimation",[(0,p.eR)(":enter",[(0,p.oB)({opacity:0,height:0}),(0,p.jt)("0.3s ease-out",(0,p.oB)({opacity:1,height:"*"}))])]),(0,p.X$)("showErrorOuterAnimation",[(0,p.eR)(":enter",[(0,p.oB)({height:"*"}),(0,p.jt)("0.3s ease-out",(0,p.oB)({height:"*"}))])])]}}),T=(0,B.gn)([(0,l.c)()],T)}}]);
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.