PageSourceSearch

https://szerzi.hu/common-a2fc09ef.28911272c406fb5c.js

js szerzi.hu collected 2026-10-04 13:25:41 UTC 123,774 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkszerzi_front=self.webpackChunkszerzi_front||[]).push([[7136],{34361:(Ri,$,c)=>{c.d($,{U:()=>x});var L=c(15861),tt=c(97582),u=c(40700),t=c(94650),m=c(17009),g=c(71997),f=c(83092),et=c(28736),E=c(92961),p=c(37340),A=c(3550),C=c(54668),nt=c(78321),it=c(22971),z=c(36057),d=c(44224),v=c(5963),N=c(17445),w=c(52835),st=c(95698),b=c(6947),ot=c(24068),at=c(45218),rt=c(49651),lt=c(25156),R=c(30144),k=c(32925),ct=c(90735),_t=c(50211),pt=c(28952),dt=c(81664),mt=c(56229),ht=c(39889),ut=c(55089),gt=c(87341),Ct=c(47959),ft=c(8269),vt=c(93196),Tt=c(32046),St=c(41836),F=c(45144),xt=c(13345),Et=c(36927),Ot=c(76161),O=c(36895),Pt=c(47216),It=c(67151),zt=c(30918),Dt=c(74383),Z=c(66616),At=c(47044),Nt=c(21811),bt=c(51971),Mt=c(2577),B=c(73325),U=c(29562),yt=c(73679),Lt=c(47423),wt=c(66152),M=c(45655),Rt=c(73055),kt=c(6497),Ft=c(46581),y=c(20545),Zt=c(65681),V=c(62223),Bt=c(6672),Ut=c(37570),Vt=c(8943),Jt=c(58800),Kt=c(47954),Ht=c(5981),Qt=c(85594),Gt=c(1881),Wt=c(8505),Yt=c(79991),jt=c(7463),qt=c(70087),Xt=c(5233),$t=c(81801);const te=["footerdivider"],ee=["segmentsDiv"],ne=["editorDetails"],ie=["defaultContinueText"],se=["successContinueText"],oe=["workingContinueText"];function ae(s,i){1&s&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&s&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"CLIENT.CONTRACTS.PROGRESSES.PROGRESS.NOT_STARTED")))}function re(s,i){1&s&&(t.TgZ(0,"span",26),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&s&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"CLIENT.CONTRACTS.PROGRESSES.PROGRESS.DONE")))}function le(s,i){if(1&s&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.ALo(3,"translate"),t.qZA()),2&s){const e=t.oxw().percent;t.xp6(1),t.AsE("",t.xi3(2,2,e,"1.0-0")," % ",t.lcZ(3,5,"CLIENT.CONTRACTS.PROGRESSES.PROGRESS.ALREADY_PROGRESSED"),"")}}function ce(s,i){if(1&s&&(t.YNc(0,ae,3,3,"span",16),t.YNc(1,re,3,3,"span",25),t.YNc(2,le,4,7,"span",16)),2&s){const e=i.percent;t.Q6J("ngIf",0===e),t.xp6(1),t.Q6J("ngIf",100===e),t.xp6(1),t.Q6J("ngIf",e>0&&e<100)}}function _e(s,i){1&s&&(t.TgZ(0,"div",27)(1,"div",28),t._UZ(2,"nz-skeleton-element",29),t.qZA(),t.TgZ(3,"div",30)(4,"h4"),t._UZ(5,"nz-skeleton-element",31)(6,"nz-skeleton-element",32),t.qZA(),t._UZ(7,"nz-skeleton-element",33)(8,"nz-skeleton-element",34),t.qZA()()),2&s&&(t.Q6J("@skeletonPosAbsLeave",void 0),t.xp6(2),t.Q6J("nzSize",150)("nzActive",!0),t.xp6(3),t.Q6J("nzActive",!0),t.xp6(1),t.Q6J("nzActive",!0),t.xp6(1),t.Q6J("nzActive",!0),t.xp6(1),t.Q6J("nzActive",!0))}function pe(s,i){if(1&s&&(t.TgZ(0,"div",46),t._UZ(1,"nz-skeleton-element",47),t.qZA()),2&s){const e=t.oxw(2);t.Q6J("@skeletonPosAbsLeave",void 0),t.xp6(1),t.Q6J("hidden",!e.contractIconHidden)("nzSize",150)("nzActive",!0)}}function de(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"app-metadataname-editor",48),t.NdJ("tutorialVisibleChange",function(a){t.CHM(e);const o=t.oxw(2);return t.KtG(o.tutorialVisible=a)})("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.setTutorialVisible(!1))}),t.ALo(1,"translate"),t.qZA()}if(2&s){const e=t.oxw(2);t.Q6J("contractName",e.name)("contractID",e.progressID)("nzTooltipTitle",t.lcZ(1,9,"TUTORIALS.CLIENT.CONTRACT.SUGGEST_EDIT_TITLE"))("tutorialVisible",e.tutorialVisible)("nzTooltipPlacement","bottomLeft")("isDemo",e.isDemo)("isEditedByOther",e.isEditedByOther)("isOwned",e.isOwned)("isEditable",e.isContractEditable)}}function me(s,i){if(1&s&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&s){const e=t.oxw(2);t.xp6(1),t.hij(" ",e.name," ")}}function he(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"div",35)(1,"div",36),t.YNc(2,pe,2,4,"div",37),t.TgZ(3,"img",38),t.NdJ("load",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.setContractIconHidden(!1))}),t.qZA()(),t.TgZ(4,"div",39)(5,"h1",40),t.YNc(6,de,2,11,"app-metadataname-editor",41),t.ALo(7,"as"),t.YNc(8,me,2,1,"div",16),t.ALo(9,"as"),t.qZA(),t.TgZ(10,"h4",42),t._uU(11),t.qZA(),t.TgZ(12,"button",43),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.openDetailsModal(a.contractFormDisplay.name,a.contractFormEditorHelperContent?a.contractFormEditorHelperContent:a.contractFormDescription))}),t._UZ(13,"span",44),t.ALo(14,"safe"),t.ALo(15,"hyphen"),t.ALo(16,"definiteArticle"),t._UZ(17,"i",45),t.qZA()()()}if(2&s){const e=t.oxw();t.Q6J("@skeletonPosAbsLeave",void 0),t.xp6(2),t.Q6J("ngIf",e.contractIconHidden),t.xp6(1),t.Q6J("hidden",e.contractIconHidden)("src",e.contractFormDisplay&&e.contractFormDisplay.editor&&e.contractFormDisplay.editor.iconDark?e.ClientRoutes.apiRouteContractIcon(e.contractFormDisplay.editor.iconDark):"assets/images/joker-card-light.svg",t.LSH)("@imageLoadAnimation",e.contractIconHidden?"loading":"loaded"),t.xp6(3),t.Q6J("ngIf",e.contract&&(t.xi3(7,9,e.contract.progress,e.OwnContractProgress).permissions||e.contract.progress.userID===e.userService.sessionUserID&&e.userService.isLawyer)),t.xp6(2),t.Q6J("ngIf",!e.contract||!(t.xi3(9,12,e.contract.progress,e.OwnContractProgress).permissions||e.contract.progress.userID===e.userService.sessionUserID&&e.userService.isLawyer)),t.xp6(3),t.Oqu(e.contractFormDisplay.editor.title),t.xp6(2),t.Q6J("innerHTML",t.xi3(14,15,t.xi3(15,18,t.lcZ(16,21,e.contractFormEditorHelperTitle),e.progressLanguage),"html"),t.oJD)}}function ue(s,i){1&s&&t.GkF(0,56)}const ge=function(){return{isInsideHeader:!1}};function Ce(s,i){if(1&s&&(t.TgZ(0,"div",54),t.YNc(1,ue,1,0,"ng-container",55),t.qZA()),2&s){t.oxw();const e=t.MAs(4);t.xp6(1),t.Q6J("ngTemplateOutlet",e)("ngTemplateOutletContext",t.DdM(2,ge))}}const fe=function(s){return{"remove-contract-icon-client":s}};function ve(s,i){if(1&s&&(t.TgZ(0,"div",68),t._UZ(1,"img",69),t.qZA()),2&s){const e=t.oxw(2).isInsideHeader,n=t.oxw(2);t.Gre("contractIconContainer ",e?"remove-contract-icon ":"",""),t.Q6J("ngClass",t.VKq(6,fe,e&&!n.isLawyer)),t.xp6(1),t.s9C("src",n.ClientRoutes.apiRouteContractIcon(n.contractFormDisplay.editor.iconDark),t.LSH
1),t.Q6J("hidden",!e||!n.editor||!n.editor.lock||n.editor.until<=0)}}const J=function(){return{all:10}};function Te(s,i){if(1&s&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"limitTo"),t.qZA()),2&s){const e=t.oxw(6);t.xp6(1),t.Oqu(t.Dn7(2,1,e.editorName,t.DdM(5,J),null))}}function Se(s,i){1&s&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"limitTo"),t.ALo(3,"translate"),t.qZA()),2&s&&(t.xp6(1),t.Oqu(t.Dn7(2,1,t.lcZ(3,5,"CLIENT.CONTRACTS.EDITOR.YOU"),t.DdM(7,J),null)))}function xe(s,i){if(1&s&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&s){const e=t.oxw(7);t.xp6(1),t.Oqu(e.editorName)}}function Ee(s,i){1&s&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&s&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"CLIENT.CONTRACTS.EDITOR.YOU")))}function Oe(s,i){if(1&s&&(t.YNc(0,xe,2,1,"span",16),t.YNc(1,Ee,3,3,"span",16)),2&s){const e=t.oxw(6);t.Q6J("ngIf","You"!==e.editorName),t.xp6(1),t.Q6J("ngIf","You"===e.editorName)}}function Pe(s,i){1&s&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&s&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"CLIENT.CONTRACTS.EDITOR.OTHER_EDITING")," "))}function Ie(s,i){1&s&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&s&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"CLIENT.CONTRACTS.EDITOR.YOU_EDITING")," "))}function ze(s,i){if(1&s&&(t.TgZ(0,"div",78)(1,"span",79),t.YNc(2,Te,3,6,"span",16),t.YNc(3,Se,4,8,"span",16),t.YNc(4,Oe,2,2,"ng-template",null,80,t.W1O),t.qZA(),t.YNc(6,Pe,3,3,"span",16),t.YNc(7,Ie,3,3,"span",16),t.qZA()),2&s){const e=t.MAs(5),n=t.oxw(5);t.xp6(1),t.Q6J("nzTooltipTitle",e),t.xp6(1),t.Q6J("ngIf","You"!==n.editorName),t.xp6(1),t.Q6J("ngIf","You"===n.editorName),t.xp6(3),t.Q6J("ngIf","You"!==n.editorName),t.xp6(1),t.Q6J("ngIf","You"===n.editorName)}}const K=function(s){return{timeLeftEditing:s}};function De(s,i){if(1&s&&(t.TgZ(0,"span",81),t.ALo(1,"translate"),t._uU(2),t.ALo(3,"translate"),t.TgZ(4,"button",82),t._UZ(5,"i",83),t.qZA()()),2&s){const e=t.oxw(5);t.Q6J("nzTooltipTitle",t.xi3(1,2,"CLIENT.CONTRACTS.EDITOR.TIME_TOOLTIP",t.VKq(8,K,e.timeLeftEditing))),t.xp6(2),t.hij(" ",t.xi3(3,5,"CLIENT.CONTRACTS.EDITOR.FOR_TIME_LEFT",t.VKq(10,K,e.timeLeftEditing))," ")}}function Ae(s,i){if(1&s&&t._UZ(0,"nz-avatar",84),2&s){t.oxw();const e=t.MAs(10),n=t.oxw(4);t.Q6J("nzSrc",n.imagesToShow.get(n.editor.userID))("nzDropdownMenu",e)("nzTrigger","click")("nzDisabled","You"===n.editorName)}}function Ne(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"li",76),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(5);return t.KtG(a.routerService.routeToChatByID(a.editorChatID))}),t._uU(1),t.ALo(2,"translate"),t.qZA()}2&s&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"CLIENT.CONVERSATIONS.FUNCTIONS.GO_TO")," "))}function be(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"li",76),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(5);return t.KtG(a.createNewConversation())}),t._uU(1),t.ALo(2,"translate"),t.qZA()}2&s&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"CLIENT.CONVERSATIONS.FUNCTIONS.CREATE")," "))}const Me=function(s){return{"p-r-10":s}};function ye(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"nz-list-item-meta",70),t.ALo(1,"as"),t.ALo(2,"as"),t.YNc(3,ze,8,5,"ng-template",null,71,t.W1O),t.YNc(5,De,6,12,"ng-template",null,72,t.W1O),t.YNc(7,Ae,1,4,"ng-template",null,73,t.W1O),t.TgZ(9,"nz-dropdown-menu",null,74)(11,"ul",75)(12,"li",76),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(4);return t.KtG(a.openUserProfile())}),t._uU(13),t.ALo(14,"translate"),t.qZA(),t.YNc(15,Ne,3,3,"li",77),t.YNc(16,be,3,3,"li",77),t.qZA()()()}if(2&s){const e=t.MAs(4),n=t.MAs(6),a=t.MAs(8),o=t.oxw(2).isInsideHeader,r=t.oxw(2);t.Q6J("nzTitle",e)("nzAvatar",a)("nzDescription",r.contractSharedData||r.contract&&t.xi3(1,7,r.contract.progress,r.OwnContractProgress).permissions&&t.xi3(2,10,r.contract.progress,r.OwnContractProgress).permissions.users.length>0?n:null)("ngClass",t.VKq(15,Me,o)),t.xp6(13),t.hij(" ",t.lcZ(14,13,"CLIENT.CONTRACTS.EDITOR.DROPDOWN.SHOW_PROFILE")," "),t.xp6(2),t.Q6J("ngIf",r.editorChatID),t.xp6(1),t.Q6J("ngIf",!r.editorChatID)}}function Le(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"div",89)(1,"div"),t._uU(2),t.ALo(3,"translate"),t.qZA(),t.TgZ(4,"button",90),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(5);return t.KtG(a.disableSavingTutorial())}),t._uU(5),t.ALo(6,"translate"),t.qZA()()}2&s&&(t.xp6(2),t.hij(" ",t.lcZ(3,2,"TUTORIALS.CLIENT.CONTRACT.SAVING_TOOLTIP.MESSAGE")," "),t.xp6(3),t.hij(" ",t.lcZ(6,4,"TUTORIALS.CLIENT.CONTRACT.SAVING_TOOLTIP.UNDERSTAND")," "))}const H=function(s){return{"d-none d-xxl-inline-block":s}};function we(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"button",94),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(6);return t.KtG(a.releaseEditingJumpToTop())}),t.ALo(1,"translate"),t._uU(2),t.ALo(3,"translate"),t.qZA()}if(2&s){const e=t.oxw(4).isInsideHeader,n=t.oxw(2);t.Gre("",e?"":"m-t-10"," m-r-10 col-auto"),t.Q6J("nzSize","small")("ngClass",t.VKq(11,H,n.isLawyer))("nzTooltipTitle",t.lcZ(1,7,"CLIENT.CONTRACTS.FINISH_EDITING_TOOLTIP")),t.xp6(2),t.hij(" ",t.lcZ(3,9,"CLIENT.CONTRACTS.FINISH_EDITING")," ")}}const Q=function(s){return{editorName:s}};function Re(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"button",95),t.NdJ("nzOnConfirm",function(){t.CHM(e);const a=t.oxw(6);return t.KtG(a.takeoverEditing())}),t.ALo(1,"translate"),t.ALo(2,"translate"),t.ALo(3,"translate"),t._uU(4),t.ALo(5,"translate"),t.qZA()}if(2&s){const e=t.oxw(4).isInsideHeader,n=t.oxw(2);t.Gre("",e?"":"m-t-10"," m-r-10 col-auto"),t.Q6J("nzSize","small")("nzPopconfirmTitle",t.xi3(1,9,"CLIENT.CONTRACTS.TAKE_OVER_POPCONFIRM.TITLE",t.VKq(18,Q,n.editorName)))("ngClass",t.VKq(20,H,n.isLawyer))("nzCancelText",t.lcZ(2,12,"CLIENT.CONTRACTS.TAKE_OVER_POPCONFIRM.CANCEL"))("nzOkText",t.lcZ(3,14,"CLIENT.CONTRACTS.TAKE_OVER_EDITING")),t.xp6(4),t.hij(" ",t.lcZ(5,16,"CLIENT.CONTRACTS.TAKE_OVER_EDITING")," ")}}const ke=function(s){return{"d-none d-xl-inline-block":s}};function Fe(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"button",96),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(6);return t.KtG(a.rollbackContract(a.contract.progress.ID,"manage"))}),t.ALo(1,"as"),t._UZ(2,"i",97),t._uU(3),t.ALo(4,"translate"),t.qZA()}if(2&s){const e=t.oxw(4).isInsideHeader,n=t.oxw(2);t.Gre("",e?"":"m-t-10"," m-r-10 col-auto"),t.Q6J("nzSize","small")("ngClass",t.VKq(11,ke,n.canRelease&&(!n.contract&&n.contractSharedData||t.xi3(1,6,n.contract.progress,n.OwnContractProgress).permissions.users.length>0)||n.canTakeover)),t.xp6(3),t.hij(" ",t.lcZ(4,9,"CLIENT.CONTRACTS.PROGRESSES.FUNCTIONS.MANAGE")," ")}}function Ze(s,i){if(1&s&&(t.ynx(0),t.YNc(1,we,4,13,"button",91),t.ALo(2,"as"),t.YNc(3,Re,6,22,"button",92),t.YNc(4,Fe,5,13,"button",93),t.BQk()),2&s){const e=t.oxw(5);t.xp6(1),t.Q6J("ngIf",e.canRelease&&(!e.contract&&e.contractSharedData||t.xi3(2,3,e.contract.progress,e.OwnContractProgress).permissions.users.length>0)),t.xp6(2),t.Q6J("ngIf",e.canTakeover),t.xp6(1),t.Q6J("ngIf",e.contract)}}const Be=function(s){return{"d-inline-flex text-right editorButtonsDiv mx-auto align-items-center":s}},G=function(s){return{blinkingMultiStateButton:s}};function Ue(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"div",68)(1,"div",85),t.NdJ("mouseenter",function(){t.CHM(e);const a=t.oxw(4);return t.KtG(a.changeFloatingContinuePopoverVisibility(!0))})("mouseleave",function(a){t.CHM(e);const o=t.oxw(4);
1return t.KtG(o.tryClosePopover(a))}),t.YNc(2,Le,7,6,"ng-template",null,86,t.W1O),t.TgZ(4,"app-multi-state-button",87,88),t.NdJ("touchend",function(a){t.CHM(e);const o=t.oxw(4);return t.KtG(o.changeFloatingContinuePopoverVisibility(!0,!0,a))})("touchstart",function(a){t.CHM(e);const o=t.oxw(4);return t.KtG(o.saveFloatingContinueTouchStart(a))})("tutorialVisibleChange",function(a){t.CHM(e);const o=t.oxw(4);return t.KtG(o.savingTutorialVisible=a)})("click",function(){t.CHM(e);const a=t.oxw(4);return t.KtG(a.clickedMultiStateButton())}),t.qZA()(),t.YNc(6,Ze,5,6,"ng-container",16),t.ALo(7,"as"),t.qZA()}if(2&s){const e=t.MAs(3),n=t.MAs(5),a=t.oxw(2).isInsideHeader,o=t.oxw(2),r=t.MAs(22);t.Q6J("ngClass",t.VKq(27,Be,a)),t.xp6(1),t.Gre("",a?"":"m-t-10"," m-r-10 p-0 d-inline-block col-auto resizeSmartButton"),t.Q6J("nzPopoverContent",(o.isStepValid||o.onlyBooleanMissing||o.onlyOneNonBooleanFieldEdited)&&!o.nextInProgress||o.hideTooltip?null:r)("nzPopoverTrigger",null)("nzPopoverVisible",o.floatingContinuePopoverVisible&&(o.editorAffixStick&&a||!o.editorAffixStick&&!a))("nzPopoverOverlayClassName","removePopoverInnerPadding"),t.xp6(3),t.Gre("smallMultiStateButton text-right ",a?"line-clamp-override":"",""),t.Q6J("hidden",o.editingStep===o.stepDisplayElements.length-1&&o.isContractComplete||!o.editor||!o.editor.lock||o.editor.until<=0)("nzSize","small")("nzGhost",!o.isStepValid&&!o.onlyBooleanMissing&&!o.onlyOneNonBooleanFieldEdited)("nzTextKeys",o.continueText)("runFunction",o.runNextFunction)("stickResult",!0)("nzTooltipTitle",e)("tutorialVisible",o.savingTutorialVisible)("duration",0)("nzTooltipTrigger",null)("nzTooltipPlacement","bottomLeft")("ngClass",t.VKq(29,G,n.state===o.ButtonState.Default&&o.step&&o.step.complete&&o.stepDisplayElements.length>o.editingStep+1)),t.xp6(2),t.Q6J("ngIf",a&&(o.contract&&t.xi3(7,24,o.contract.progress,o.OwnContractProgress).permissions||o.contractSharedData))}}const Ve=function(s){return{editorAffixStick:s}};function Je(s,i){if(1&s&&(t.TgZ(0,"div",57)(1,"div"),t.YNc(2,ve,2,8,"div",65),t.YNc(3,ye,17,17,"nz-list-item-meta",66),t.qZA(),t.YNc(4,Ue,8,31,"div",67),t.qZA()),2&s){const e=t.oxw().isInsideHeader,n=t.oxw(2);t.Q6J("@editorAffixAnimation",void 0)("ngClass",t.VKq(8,Ve,e&&n.editor&&n.editor.lock&&n.editor.until>0)),t.xp6(1),t.Gre("",e?"":"col-4"," d-flex flex-grow-1"),t.xp6(1),t.Q6J("ngIf",n.contractFormDisplay),t.xp6(1),t.Q6J("ngIf",n.editor&&n.editor.lock&&n.editor.until>0),t.xp6(1),t.Q6J("ngIf",n.editor&&n.editor.lock&&n.editor.until>0)}}function Ke(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"button",103),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(4);return t.KtG(a.releaseEditingJumpToTop())}),t.ALo(1,"translate"),t._uU(2),t.ALo(3,"translate"),t.qZA()}2&s&&(t.Q6J("nzSize","small")("nzTooltipTitle",t.lcZ(1,3,"CLIENT.CONTRACTS.FINISH_EDITING_TOOLTIP")),t.xp6(2),t.hij(" ",t.lcZ(3,5,"CLIENT.CONTRACTS.FINISH_EDITING")," "))}function He(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"button",104),t.NdJ("nzOnConfirm",function(){t.CHM(e);const a=t.oxw(4);return t.KtG(a.takeoverEditing())}),t.ALo(1,"translate"),t.ALo(2,"translate"),t.ALo(3,"translate"),t._uU(4),t.ALo(5,"translate"),t.qZA()}if(2&s){const e=t.oxw(4);t.Q6J("nzSize","small")("nzPopconfirmTitle",t.xi3(1,5,"CLIENT.CONTRACTS.TAKE_OVER_POPCONFIRM.TITLE",t.VKq(14,Q,e.editorName)))("nzCancelText",t.lcZ(2,8,"CLIENT.CONTRACTS.TAKE_OVER_POPCONFIRM.CANCEL"))("nzOkText",t.lcZ(3,10,"CLIENT.CONTRACTS.TAKE_OVER_EDITING")),t.xp6(4),t.hij(" ",t.lcZ(5,12,"CLIENT.CONTRACTS.TAKE_OVER_EDITING")," ")}}function Qe(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"button",105),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(4);return t.KtG(a.openShareModal(a.contract))}),t._UZ(1,"i",106),t._uU(2),t.ALo(3,"translate"),t.qZA()}2&s&&(t.xp6(2),t.hij(" ",t.lcZ(3,1,"CLIENT.CONTRACTS.PROGRESSES.FUNCTIONS.SHARE")," "))}function Ge(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"button",105),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(4);return t.KtG(a.contractService.copyContract(a.contract.progress.metadata.name?a.contract.progress.metadata.name:a.contract.displayElements.name,a.contract.progress.ID,a.asPipe.transform(a.contract.progress,a.OwnContractProgress).permissions.users,a.modificationEndTime))}),t._UZ(1,"i",107),t._uU(2),t.ALo(3,"translate"),t.qZA()}2&s&&(t.xp6(2),t.hij(" ",t.lcZ(3,1,"CLIENT.CONTRACTS.PROGRESSES.FUNCTIONS.COPY")," "))}function We(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"button",108),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(4);return t.KtG(a.rollbackContract(a.contract.progress.ID,"manage"))}),t._UZ(1,"i",97),t._uU(2),t.ALo(3,"translate"),t.qZA()}2&s&&(t.xp6(2),t.hij(" ",t.lcZ(3,1,"CLIENT.CONTRACTS.PROGRESSES.FUNCTIONS.MANAGE")," "))}function Ye(s,i){if(1&s&&(t.TgZ(0,"nz-button-group",98),t.YNc(1,Ke,4,7,"button",99),t.ALo(2,"as"),t.YNc(3,He,6,16,"button",100),t.YNc(4,Qe,4,3,"button",101),t.YNc(5,Ge,4,3,"button",101),t.YNc(6,We,4,3,"button",102),t.qZA()),2&s){const e=t.oxw().isInsideHeader,n=t.oxw(2);t.Gre("m-b-10 ",e?"":"m-t-10"," flex-wrap"),t.xp6(1),t.Q6J("ngIf",n.canRelease&&(!n.contract&&n.contractSharedData||t.xi3(2,8,n.contract.progress,n.OwnContractProgress).permissions.users.length>0)),t.xp6(2),t.Q6J("ngIf",n.canTakeover),t.xp6(1),t.Q6J("ngIf",n.contract),t.xp6(1),t.Q6J("ngIf",n.contract),t.xp6(1),t.Q6J("ngIf",n.contract)}}const W=function(s,i){return{"0%":s,"100%":i}};function je(s,i){if(1&s&&(t._UZ(0,"nz-progress",109),t.ALo(1,"number")),2&s){t.oxw();const e=t.MAs(12),n=t.oxw(2);t.Q6J("@editorAffixAnimation",void 0)("nzPercent",t.xi3(1,5,100*n.contractState.percentage,"1.0-0"))("nzFormat",e)("nzStrokeColor",t.WLB(8,W,n.ColorSettings.Tertiary,n.ColorSettings.Qu
1inary))("@skeletonPosAbsLeave",void 0)}}function qe(s,i){1&s&&t.GkF(0,56)}const Y=function(s,i){return{"ant-progress-status-success":s,"ant-progress-status":i}},D=function(s){return{contract:s}};function Xe(s,i){if(1&s&&(t.TgZ(0,"div",110)(1,"span",111),t.YNc(2,qe,1,0,"ng-container",55),t.qZA()()),2&s){t.oxw();const e=t.MAs(10),n=t.oxw(2);t.Q6J("ngClass",t.WLB(3,Y,1===n.contractState.percentage,n.contractState.percentage<1)),t.xp6(2),t.Q6J("ngTemplateOutlet",e)("ngTemplateOutletContext",t.VKq(6,D,n.contract))}}function $e(s,i){1&s&&t.GkF(0,56)}function tn(s,i){if(1&s&&(t.TgZ(0,"div",110)(1,"span",111),t.YNc(2,$e,1,0,"ng-container",55),t.qZA()()),2&s){t.oxw();const e=t.MAs(10),n=t.oxw(2);t.Q6J("ngClass",t.WLB(3,Y,1===n.contractState.percentage,n.contractState.percentage<1)),t.xp6(2),t.Q6J("ngTemplateOutlet",e)("ngTemplateOutletContext",t.VKq(6,D,n.contractSharedData))}}const j=function(s){return{timeLeft:s}};function en(s,i){if(1&s&&(t.ynx(0),t.TgZ(1,"span",112),t.ALo(2,"translate"),t.ALo(3,"dateAfter"),t._uU(4),t.ALo(5,"translate"),t.ALo(6,"dateAfter"),t._UZ(7,"i",45),t.qZA(),t.BQk()),2&s){const e=t.oxw(4);t.xp6(1),t.Q6J("nzTooltipTitle",t.xi3(2,2,"CLIENT.CONTRACTS.ALLOWED_MODIFICATIONS_TIME_LEFT_TOOLTIP",t.VKq(16,j,t.Dn7(3,5,e.modificationEndTime,e.dateAfterTrigger,2)))),t.xp6(3),t.hij(" ",t.xi3(5,9,"CLIENT.CONTRACTS.ALLOWED_MODIFICATIONS_TIME_LEFT",t.VKq(18,j,t.Dn7(6,12,e.modificationEndTime,e.dateAfterTrigger,2)))," ")}}const nn=function(s){return{currentFieldChangeAllowance:s}};function sn(s,i){if(1&s&&(t.ynx(0),t._uU(1),t.ALo(2,"translate"),t.BQk()),2&s){const e=t.oxw().contract;t.xp6(1),t.hij(" ",t.xi3(2,1,"CLIENT.CONTRACTS.ALLOWED_MODIFICATIONS_LEFT",t.VKq(4,nn,e.progress.finalization.currentFieldChangeAllowance))," ")}}function on(s,i){1&s&&(t.ynx(0),t._uU(1),t.ALo(2,"translate"),t.BQk()),2&s&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"CLIENT.CONTRACTS.NO_ALLOWED_MODIFICATIONS_LEFT")," "))}function an(s,i){if(1&s&&(t.YNc(0,en,8,20,"ng-container",16),t.YNc(1,sn,3,6,"ng-container",16),t.YNc(2,on,3,3,"ng-container",16)),2&s){const e=i.contract,n=t.oxw(3);t.Q6J("ngIf",n.showModificationEndTime),t.xp6(1),t.Q6J("ngIf",!n.showModificationEndTime&&e.progress.finalization.currentFieldChangeAllowance>0),t.xp6(1),t.Q6J("ngIf",!n.showModificationEndTime&&0===e.progress.finalization.currentFieldChangeAllowance)}}function rn(s,i){1&s&&t.GkF(0,56)}function ln(s,i){if(1&s&&(t.ynx(0),t.YNc(1,rn,1,0,"ng-container",55),t._uU(2," , "),t.BQk()),2&s){t.oxw(2);const e=t.MAs(10),n=t.oxw(2);t.xp6(1),t.Q6J("ngTemplateOutlet",e)("ngTemplateOutletContext",t.VKq(2,D,n.contract))}}function cn(s,i){1&s&&t.GkF(0,56)}function _n(s,i){if(1&s&&(t.ynx(0),t.YNc(1,cn,1,0,"ng-container",55),t._uU(2," , "),t.BQk()),2&s){t.oxw(2);const e=t.MAs(10),n=t.oxw(2);t.xp6(1),t.Q6J("ngTemplateOutlet",e)("ngTemplateOutletContext",t.VKq(2,D,n.contractSharedData))}}function pn(s,i){1&s&&t.GkF(0)}const q=function(s){return{percent:s}};function dn(s,i){if(1&s&&(t.YNc(0,ln,3,4,"ng-container",16),t.ALo(1,"as"),t.YNc(2,_n,3,4,"ng-container",16),t.YNc(3,pn,1,0,"ng-container",113)),2&s){const e=i.$implicit,n=t.oxw().isInsideHeader,a=t.oxw(2),o=t.MAs(5);t.Q6J("ngIf",a.contract&&t.xi3(1,4,a.contract.progress,a.OwnContractProgress).finalization&&n),t.xp6(2),t.Q6J("ngIf",a.contractSharedData&&a.contractSharedData.progress.finalization&&n),t.xp6(1),t.Q6J("ngTemplateOutlet",o)("ngTemplateOutletContext",t.VKq(7,q,e))}}const mn=function(s){return{"editorAffixStick p-10":s}};function hn(s,i){if(1&s&&(t.TgZ(0,"div",57),t.YNc(1,Je,5,10,"div",58),t.TgZ(2,"div",59),t.YNc(3,Ye,7,11,"nz-button-group",60),t.ALo(4,"as"),t.qZA(),t.YNc(5,je,2,11,"nz-progress",61),t.YNc(6,Xe,3,8,"div",62),t.ALo(7,"as"),t.YNc(8,tn,3,8,"div",62),t.qZA(),t.YNc(9,an,3,3,"ng-template",null,63,t.W1O),t.YNc(11,dn,4,9,"ng-template",null,64,t.W1O)),2&s){const e=i.isInsideHeader,n=t.oxw(2);t.Q6J("ngClass",t.VKq(12,mn,e&&n.editor&&n.editor.lock&&n.editor.until>0)),t.xp6(1),t.Q6J("ngIf",n.editor&&n.editor.lock&&n.editor.until>0&&(n.editorAffixStick&&e||!n.editorAffixStick&&!e)),t.xp6(2),t.Q6J("ngIf",!e&&!n.isDemo&&(n.contract&&t.xi3(4,6,n.contract.progress,n.OwnContractProgress).permissions||n.contractSharedData)),t.xp6(2),t.Q6J("ngIf",(!n.editor||!n.editor.lock||n.editor.until<=0)&&
1!e||n.editor&&n.editor.lock&&n.editor.until>0&&(n.editorAffixStick&&e||!n.editorAffixStick&&!e)),t.xp6(1),t.Q6J("ngIf",n.contract&&t.xi3(7,9,n.contract.progress,n.OwnContractProgress).finalization&&(!n.editor||!n.editor.lock||n.editor.until<=0||!n.editorAffixStick)&&!e),t.xp6(2),t.Q6J("ngIf",n.contractSharedData&&n.contractSharedData.progress.finalization&&(!n.editor||!n.editor.lock||n.editor.until<=0||!n.editorAffixStick)&&!e)}}function un(s,i){if(1&s&&(t._UZ(0,"app-contract-shared-with-others",117),t.ALo(1,"as")),2&s){const e=t.oxw(3);t.Q6J("contract",t.xi3(1,2,e.contract,e.AdvancedContractDetails))("showNotShared",!1)}}const gn=function(s){return{version:s}};function Cn(s,i){if(1&s&&(t.TgZ(0,"nz-tag",118),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&s){const e=t.oxw(3);t.Q6J("nzColor",e.ColorSettings.Secondary),t.xp6(1),t.hij(" ",t.xi3(2,2,"CLIENT.CONTRACTS.VERSION_UPDATE",t.VKq(5,gn,e.contract?e.contract.progress.canonical.version:e.contractSharedData.progress.canonical.version))," ")}}function fn(s,i){if(1&s&&(t.TgZ(0,"div",114),t.YNc(1,un,2,5,"app-contract-shared-with-others",115),t.ALo(2,"as"),t.ALo(3,"as"),t.YNc(4,Cn,3,7,"nz-tag",116),t.qZA()),2&s){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.contract&&t.xi3(2,2,e.contract.progress,e.OwnContractProgress).permissions&&t.xi3(3,5,e.contract.progress,e.OwnContractProgress).permissions.users.length>0),t.xp6(3),t.Q6J("ngIf",e.latestCanonicalChange&&(e.contract||e.contractSharedData))}}const vn=function(){return{rootMargin:"-150px"}};function Tn(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"div",49)(1,"div",50),t.NdJ("inViewportAction",function(a){t.CHM(e);const o=t.oxw();return t.KtG(o.editorAffixChange(a))}),t.YNc(2,Ce,2,3,"div",51),t.qZA(),t.YNc(3,hn,13,14,"ng-template",null,52,t.W1O),t.YNc(5,fn,5,8,"div",53),t.ALo(6,"as"),t.ALo(7,"as"),t.qZA()}if(2&s){const e=t.oxw();
1t.xp6(1),t.Q6J("inViewportOptions",t.DdM(9,vn)),t.xp6(1),t.Q6J("ngIf",e.editor||e.isDemo),t.xp6(3),t.Q6J("ngIf",e.contract&&t.xi3(6,3,e.contract.progress,e.OwnContractProgress).permissions&&t.xi3(7,6,e.contract.progress,e.OwnContractProgress).permissions.users.length>0||e.latestCanonicalChange&&(e.contract||e.contractSharedData))}}function Sn(s,i){1&s&&t._UZ(0,"nz-skeleton-element",33),2&s&&t.Q6J("nzActive",!0)}function xn(s,i){1&s&&(t.TgZ(0,"div",121)(1,"div",122),t._UZ(2,"nz-skeleton-element",123),t.qZA(),t.TgZ(3,"div",124),t._UZ(4,"nz-skeleton-element",32),t.YNc(5,Sn,1,1,"nz-skeleton-element",125),t.ALo(6,"numberArray"),t.qZA()()),2&s&&(t.xp6(2),t.Q6J("nzActive",!0),t.xp6(2),t.Q6J("nzActive",!0),t.xp6(1),t.Q6J("ngForOf",t.lcZ(6,3,4)))}function En(s,i){1&s&&(t.TgZ(0,"div",119),t.YNc(1,xn,7,5,"div",120),t.ALo(2,"numberArray"),t.qZA()),2&s&&(t.Q6J("@skeletonPosAbsLeave",void 0),t.xp6(1),t.Q6J("ngForOf",t.lcZ(2,2,4)))}const On=function(s,i,e){return[s,i,0,180,e]};function Pn(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"div",134),t.NdJ("nzPopoverVisibleChange",function(a){t.CHM(e);const o=t.oxw().index,r=t.oxw(2);return t.KtG(r.stepTitleHoverPopoverVisible[o]=a)})("mouseenter",function(){t.CHM(e);const a=t.oxw().index,o=t.oxw(2);return t.KtG(o.changeStepTitleHoverPopoverVisibility(a,!0))})("mouseleave",function(a){t.CHM(e);const o=t.oxw(3);return t.KtG(o.tryClosePopover(a))}),t.TgZ(1,"div",135),t.NdJ("nzPopoverVisibleChange",function(a){t.CHM(e);const o=t.oxw().index,r=t.oxw(2);return t.KtG(r.stepTitleClickPopoverVisible[o]=a)})("nzPopoverVisibleChange",function(a){t.CHM(e);const o=t.oxw().index,r=t.oxw(2);return t.KtG(r.changeStepTitleClickPopoverVisibility(o,a))}),t._uU(2),t.ALo(3,"hyphen"),t.qZA()()}if(2&s){const e=t.oxw(),n=e.index,a=e.$implicit,o=t.oxw(2),r=t.MAs(22);t.Q6J("nzPopoverTrigger",null)("nzPopoverContent",n>o.stepProgress&&!o.onlyOneNonBooleanFieldEdited?r:null)("nzPopoverMouseEnterDelay",2)("nzPopoverVisible",o.stepTitleHoverPopoverVisible[n])("nzPopoverOverlayClassName","removePopoverInnerPadding"),t.xp6(1),t.Q6J("nzPopoverContent",n>o.stepProgress&&!o.onlyOneNonBooleanFieldEdited?r:null)("nzPopoverMouseEnterDelay",2)("nzPopoverVisible",o.stepTitleClickPopoverVisible[n])("nzPopoverOverlayClassName","removePopoverInnerPadding"),t.xp6(1),t.hij(" ",t.G7q(3,10,t.kEZ(16,On,a.title,o.progressLanguage,o.stepsWidth))," ")}}function In(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"div",134),t.NdJ("nzPopoverVisibleChange",function(a){t.CHM(e);const o=t.oxw().index,r=t.oxw(2);return t.KtG(r.stepDescriptionHoverPopoverVisible[o]=a)})("mouseenter",function(){t.CHM(e);const a=t.oxw().index,o=t.oxw(2);return t.KtG(o.changeStepDescriptionHoverPopoverVisibility(a,!0))})("mouseleave",function(a){t.CHM(e);const o=t.oxw(3);return t.KtG(o.tryClosePopover(a))}),t.TgZ(1,"div",135),t.NdJ("nzPopoverVisibleChange",function(a){t.CHM(e);const o=t.oxw().index,r=t.oxw(2);return t.KtG(r.stepDescriptionClickPopoverVisible[o]=a)})("nzPopoverVisibleChange",function(a){t.CHM(e);const o=t.oxw().index,r=t.oxw(2);return t.KtG(r.changeStepDescriptionClickPopoverVisibility(o,a))}),t._uU(2),t.ALo(3,"hyphen"),t.qZA()()}if(2&s){const e=t.oxw(),n=e.index,a=e.$implicit,o=t.oxw(2),r=t.MAs(22);t.Q6J("@stepDescriptionAnimation",!!o.mouseOverStep[n])("nzPopoverTrigger",null)("nzPopoverContent",n>o.stepProgress&&!o.onlyOneNonBooleanFieldEdited?r:null)("nzPopoverMouseEnterDelay",2)("nzPopoverVisible",o.stepDescriptionHoverPopoverVisible[n])("nzPopoverOverlayClassName","removePopoverInnerPadding"),t.xp6(1),t.Q6J("nzPopoverContent",n>o.stepProgress&&!o.onlyOneNonBooleanFieldEdited?r:null)("nzPopoverMouseEnterDelay",2)("nzPopoverVisible",o.stepDescriptionClickPopoverVisible[n])("nzPopoverOverlayClassName","removePopoverInnerPadding"),t.xp6(1),t.hij(" ",t.xi3(3,11,a.description,o.progressLanguage)," ")}}const zn=function(s,i,e){return{stickyStep:s,showStepDescription:i,customIconStep:e}};function Dn(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"nz-step",131),t.NdJ("mouseover",function(){const o=t.CHM(e).index,r=t.oxw(2);return t.KtG(r.setMouseOverStep(o,!0))})("nzOnConfirm",function(){const o=t.CHM(e).index,r=t.oxw(2);return t.KtG(r.isDemo&&o<r.stepProgress?r.routerService.routeParentWindowToReg
1ister(r.UserType.Client):null)}),t.ALo(1,"translate"),t.ALo(2,"translate"),t.ALo(3,"translate"),t.YNc(4,Pn,4,20,"ng-template",null,132,t.W1O),t.YNc(6,In,4,14,"ng-template",null,133,t.W1O),t.qZA()}if(2&s){const e=i.$implicit,n=i.index,a=t.MAs(5),o=t.MAs(7),r=t.oxw(2);t.Q6J("nzTitle",a)("nzDescription",e.description?o:null)("nzDisabled",n>r.stepProgress)("nzStatus",n===r.editingStep?"process":n<r.stepProgress?"finish":"wait")("nzIcon",n===r.stepProgress&&r.stepProgress!==r.editingStep?"right":null)("ngClass",t.kEZ(16,zn,n===r.editingStep,r.mouseOverStep[n],n===r.stepProgress&&r.stepProgress!==r.editingStep))("nzPopconfirmTitle",t.lcZ(1,10,"LANDING.DEMOS.CONTRACT.STEP_POPCONFIRM.TITLE"))("nzCancelText",t.lcZ(2,12,"LANDING.DEMOS.CONTRACT.STEP_POPCONFIRM.CANCEL_TEXT"))("nzOkText",t.lcZ(3,14,"LANDING.DEMOS.CONTRACT.STEP_POPCONFIRM.OK_TEXT"))("nzCondition",!(r.isDemo&&n<r.stepProgress))}}function An(s,i){1&s&&t.GkF(0)}function Nn(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"nz-steps",126),t.NdJ("nzIndexChange",function(a){t.CHM(e);const o=t.oxw();return t.KtG(o.tryStepChange(a))})("mouseover",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.setMouseOverSteps(!0))})("mouseleave",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.setMouseOverSteps(!1))})("resized",function(a){t.CHM(e);const o=t.oxw();return t.KtG(o.onStepsResize(a))}),t.YNc(1,Dn,8,20,"nz-step",127),t.TgZ(2,"div",128),t._UZ(3,"app-contract-building-icon",129),t.TgZ(4,"div",130),t.YNc(5,An,1,0,"ng-container",113),t.qZA()()()}if(2&s){const e=t.oxw(),n=t.MAs(5);t.Q6J("@skeletonPosAbsLeave",void 0)("nzCurrent",e.editingStep),t.xp6(1),t.Q6J("ngForOf",e.stepDisplayElements)("ngForTrackBy",e.trackByStepDisplayElement),t.xp6(2),t.Q6J("percent",100*e.contractState.percentage),t.xp6(2),t.Q6J("ngTemplateOutlet",n)("ngTemplateOutletContext",t.VKq(7,q,100*e.contractState.percentage))}}function bn(s,i){1&s&&t._UZ(0,"nz-skeleton-element",33),2&s&&t.Q6J("nzActive",!0)}function Mn(s,i){1&s&&(t.TgZ(0,"div",141,142),t._UZ(2,"nz-skeleton-element",143),t.YNc(3,bn,1,1,"nz-skeleton-element",125),t.ALo(4,"numberArray"),t._UZ(5,"nz-skeleton-element",144),t.qZA()),2&s&&(t.xp6(2),t.Q6J("nzActive",!0),t.xp6(1),t.Q6J("ngForOf",t.lcZ(4,3,3)),t.xp6(2),t.Q6J("nzActive",!0))}function yn(s,i){1&s&&t._UZ(0,"nz-skeleton-element",33),2&s&&t.Q6J("nzActive",!0)}function Ln(s,i){1&s&&(t.TgZ(0,"div"),t._UZ(1,"nz-skeleton-element",145),t.YNc(2,yn,1,1,"nz-skeleton-element",125),t.ALo(3,"numberArray"),t._UZ(4,"nz-skeleton-element",144),t.qZA()),2&s&&(t.xp6(1),t.Q6J("nzActive",!0),t.xp6(1),t.Q6J("ngForOf",t.lcZ(3,3,3)),t.xp6(2),t.Q6J("nzActive",!0))}function wn(s,i){if(1&s&&(t.TgZ(0,"div",136)(1,"div",137)(2,"div",138),t.YNc(3,Mn,6,5,"div",139),t.YNc(4,Ln,5,5,"div",140),t.ALo(5,"numberArray"),t.qZA()()()),2&s){const e=t.oxw();t.Q6J("@skeletonPosAbsLeave",void 0),t.xp6(3),t.Q6J("ngIf",!e.step),t.xp6(1),t.Q6J("ngForOf",t.lcZ(5,3,3))}}function Rn(s,i){if(1&s&&(t.TgZ(0,"nz-page-header-title"),t._uU(1),t.qZA()),2&s){const e=t.oxw(2);t.xp6(1),t.hij("",e.step.displayElements.title," ")}}function kn(s,i){if(1&s&&(t.TgZ(0,"nz-page-header-content")(1,"div",156)(2,"div",157)(3,"p",158),t._uU(4),t.qZA()()()()),2&s){const e=t.oxw(2);t.xp6(4),t.hij(" ",e.step.displayElements.description," ")}}function Fn(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"nz-spin",160)(1,"app-v1-segment",161),t.NdJ("validityChange",function(a){t.CHM(e);const o=t.oxw().index,r=t.oxw(2);return t.KtG(r.validateStep(a,o))})("variablesChange",function(a){t.CHM(e);const o=t.oxw().index,r=t.oxw(2);return t.KtG(r.variablesChanged(a,o))})("selectedStashEmitter",function(a){t.CHM(e);const o=t.oxw().index,r=t.oxw(2);return t.KtG(r.sendStashWithButton(a,o))})("focusEmitter",function(a){t.CHM(e);const o=t.oxw().index,r=t.oxw(2);return t.KtG(r.focusChange(a,o))})("inputCompleteEmitter",function(a){t.CHM(e);const o=t.oxw().index,r=t.oxw(2);return t.KtG(r.jumpToNextInput(o,a))})("rendered",function(a){t.CHM(e);const o=t.oxw().index,r=t.oxw(2);return t.KtG(r.onSegmentRender(o,a))}),t.qZA()()}if(2&s){const e=t.oxw(),n=e.index,a=e.$implicit,o=t.oxw(2);t.Q6J("nzSpinning",o.isSpinning[n])("@inOutAnimationSegmentSpinner",void 0),t.xp6(1),t.Q6J("canonical",o.contract?o.contract.progress.canonical:o.contractSharedData?o.contractSharedData.progress.canonical:null)("segment",a)("isCustomClause",!1)("isContractEditable",o.isContractEditable)("isEditedByOther",o.isEditedByOther)("isOwned",o.isOwned)("coloredBackgroun
1d",o.segmentColoredBackground[n])("progressLanguage",o.progressLanguage)("progressID",o.progressID)("contractTitle",o.contractFormDisplay?o.contractFormDisplay.name:"")("stepTitle",o.step.displayElements.title)("isDemo",o.isDemo)("showSendSuggestions",!0)("formWidth",o.formWidth)("matchmakingCategory",o.matchmakingCategory)}}function Zn(s,i){1&s&&t._UZ(0,"nz-skeleton-element",33),2&s&&t.Q6J("nzActive",!0)}function Bn(s,i){1&s&&(t.TgZ(0,"div",136)(1,"div",137)(2,"div",138)(3,"section",162)(4,"section",163)(5,"div",164),t._UZ(6,"nz-skeleton-element",165),t.qZA(),t.TgZ(7,"div",166),t.YNc(8,Zn,1,1,"nz-skeleton-element",125),t.ALo(9,"numberArray"),t._UZ(10,"nz-skeleton-element",144),t.TgZ(11,"div",167)(12,"div",168),t._UZ(13,"nz-skeleton-element",169),t.qZA(),t.TgZ(14,"div",170),t._UZ(15,"nz-skeleton-element",169),t.qZA(),t.TgZ(16,"div",168),t._UZ(17,"nz-skeleton-element",169),t.qZA()()()(),t.TgZ(18,"section",171)(19,"div",172),t.Hsn(20),t.qZA()()()()()()),2&s&&(t.Q6J("@skeletonPosAbsLeave",void 0),t.xp6(6),t.Q6J("nzActive",!0),t.xp6(2),t.Q6J("ngForOf",t.lcZ(9,7,2)),t.xp6(2),t.Q6J("nzActive",!0),t.xp6(3),t.Q6J("nzActive",!0),t.xp6(2),t.Q6J("nzActive",!0),t.xp6(2),t.Q6J("nzActive",!0))}function Un(s,i){if(1&s&&(t.TgZ(0,"div"),t.YNc(1,Fn,2,17,"nz-spin",159),t.YNc(2,Bn,21,9,"div",15),t.qZA()),2&s){const e=i.index,n=t.oxw(2);t.Q6J("@inOutAnimationSegment",void 0),t.xp6(1),t.Q6J("ngIf",e<n.minRenderedSegment||n.isRendered[e-1]),t.xp6(1),t.Q6J("ngIf",(n.showSkeletonSegment||n.step.segments.length>1&&!n.isRendered[n.step.segments.length-2])&&e===n.step.segments.length-1)}}function Vn(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"app-v1-segment",173),t.NdJ("validityChange",function(a){t.CHM(e);const o=t.oxw(2);return t.KtG(o.validateStep(a,"custom"))})("variablesChange",function(a){t.CHM(e);const o=t.oxw(2);return t.KtG(o.variablesChanged(a,"custom"))})("removedCustomClause",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.removeCustomClause())})("selectedStashEmitter",function(a){t.CHM(e);const o=t.oxw(2);return t.KtG(o.sendStashWithButton(a,"custom"))})("focusEmitter",function(a){t.CHM(e);const o=t.oxw(2);return t.KtG(o.focusChange(a,"custom"))}),t.qZA()}if(2&s){const e=t.oxw(2);t.Q6J("@inOutAnimationSegment",void 0)("segment",e.step.addon)("isCustomClause",!0)("isContractEditable",e.isContractEditable)("isEditedByOther",e.isEditedByOther)("isOwned",e.isOwned)("coloredBackground",e.addonColoredBackground)("progressLanguage",e.progressLanguage)("progressID",e.progressID)("contractTitle",e.contractFormDisplay?e.contractFormDisplay.name:"")("stepTitle",e.step.displayElements.title)("isDemo",e.isDemo)("formWidth",e.formWidth)("matchmakingCategory",e.matchmakingCategory)}}function Jn(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"button",179),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(3);return t.KtG(a.routerService.routeParentWindowToRegister(a.UserType.Client))}),t._uU(1),t.ALo(2,"translate"),t.qZA()}2&s&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"LANDING.DEMOS.CONTRACT.REGISTER")," "))}function Kn(s,i){1&s&&(t.TgZ(0,"div",180),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&s&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"LANDING.DEMOS.CONTRACT.CONTINUE_INFO")," "))}const Hn=function(s){return{blinkingMultiStateButtonDiv:s}};function Qn(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"div",174),t.NdJ("nzPopoverVisibleChange",function(a){t.CHM(e);const o=t.oxw(2);return t.KtG(o.continuePopoverVisible=a)})("mouseenter",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.changeContinuePopoverVisibility(!0))})("mouseleave",function(a){t.CHM(e);const o=t.oxw(2);return t.KtG(o.tryClosePopover(a))}),t.TgZ(1,"app-multi-state-button",175,176),t.NdJ("touchend",function(a){t.CHM(e);const o=t.oxw(2);return t.KtG(o.changeContinuePopoverVisibility(!0,!0,a))})("touchstart",function(a){t.CHM(e);const o=t.oxw(2);return t.KtG(o.saveContinueTouchStart(a))})("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.clickedMultiStateButton())}),t.qZA(),t.YNc(3,Jn,3,3,"button",177),t.YNc(4,Kn,3,3,"div",178),t.qZA()}if(2&s){const e=t.MAs(2),n=t.oxw(2),a=t.MAs(22);t.Q6J("nzPopoverContent",(n.isStepValid||n.onlyBooleanMissing||n.onlyOneNonBooleanFieldEdited)&&!n.nextInProgress||n.hideTooltip?null:a)("nzPopoverTrigger",null)("nzPopoverVisible",n.continuePopoverVisible)("nzPopoverOverlayClassName","removePopoverInnerPadding")("ngClass",t.VKq(13,Hn,e.state===n.ButtonState.Default&&n.step&&n.step.complete&&n.stepDisplayElements.length>n.editingStep+1)),t.xp6(1),t.Q6J("hidden",n.editingStep===n.stepDisplayElements.length-1&&n.isContractComplete||n.isDemoFinished)("nzGhost",!n.isStepValid&&!n.onlyBooleanMissing&&!n.onlyOneNonBooleanFieldEdited)("nzTextKeys",n.continueText)("runFunction",n.runNextFunction)("ngClass",t.VKq(15,G,e.state===n.ButtonState.Default&&n.step&&n.step.complete&&n.stepDisplayElements.length>n.editingStep+1))("stickResult",!1),t.xp6(2),t.Q6J("ngIf",n.isDemoFinished),t.xp6(1),t.Q6J("ngIf",n.isDemo)}}
1function Gn(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"button",181),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.addCustomClause())}),t.ALo(1,"translate"),t.ALo(2,"translate"),t.ALo(3,"translate"),t._UZ(4,"i",182),t._uU(5),t.ALo(6,"translate"),t.qZA()}if(2&s){const e=t.oxw(2);t.Q6J("disabled",!e.isContractEditable)("nzTooltipTitle",e.isContractEditable?null:e.isEditedByOther?t.lcZ(1,3,"CLIENT.CONTRACTS.FIELD.PERMISSION.EDITED_BY_OTHER")+(e.isOwned?" "+t.lcZ(2,5,"CLIENT.CONTRACTS.FIELD.PERMISSION.EDITED_BY_OTHER_HINT"):""):t.lcZ(3,7,"CLIENT.CONTRACTS.FIELD.PERMISSION.WARNING")),t.xp6(5),t.hij(" ",t.lcZ(6,9,"CLIENT.CONTRACTS.SEGMENT.CUSTOM_CLAUSE.ADD")," ")}}function Wn(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"button",183),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.isDemo?null:a.openContractCompleteModal())}),t.ALo(1,"translate"),t._uU(2),t.ALo(3,"translate"),t.qZA()}if(2&s){const e=t.oxw(2);t.Q6J("nzTooltipTitle",e.isDemo?t.lcZ(1,2,"CLIENT.CONTRACTS.FINALIZATION.DEMO_FINALIZE_TOOLTIP"):null),t.xp6(2),t.hij(" ",t.lcZ(3,4,"COMMON.CONTRACT.FUNCTIONS.VIEW_CONTRACT")," ")}}function Yn(s,i){1&s&&(t.ynx(0),t._uU(1),t.ALo(2,"translate"),t.BQk()),2&s&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"CLIENT.CONTRACTS.PROGRESSES.PROGRESS.SOON_DONE")," "))}function jn(s,i){if(1&s&&(t._UZ(0,"nz-progress",109),t.ALo(1,"number")),2&s){t.oxw();const e=t.MAs(3),n=t.oxw(2);t.Q6J("@editorAffixAnimation",void 0)("nzPercent",t.xi3(1,5,100*n.contractState.percentage,"1.0-0"))("nzFormat",e)("nzStrokeColor",t.WLB(8,W,n.ColorSettings.Tertiary,n.ColorSettings.Qu
1inary))("@skeletonPosAbsLeave",void 0)}}function qn(s,i){1&s&&(t.TgZ(0,"div"),t._UZ(1,"i",189),t._uU(2),t.ALo(3,"translate"),t.qZA()),2&s&&(t.xp6(2),t.hij(" ",t.lcZ(3,1,"CLIENT.CONTRACTS.PROGRESSES.INTELLIGENT_EDITING.TITLE")," "))}function Xn(s,i){1&s&&(t._uU(0),t.ALo(1,"translate")),2&s&&t.hij(" ",t.lcZ(1,1,"CLIENT.CONTRACTS.PROGRESSES.INTELLIGENT_EDITING.DESCRIPTION")," ")}function $n(s,i){if(1&s&&(t.TgZ(0,"div",184)(1,"div",185),t.YNc(2,Yn,3,3,"ng-template",null,64,t.W1O),t.YNc(4,jn,2,11,"nz-progress",61),t.YNc(5,qn,4,3,"ng-template",null,132,t.W1O),t.YNc(7,Xn,2,3,"ng-template",null,133,t.W1O),t.TgZ(9,"div",186)(10,"section",187),t._UZ(11,"info-box",188),t.qZA()()()()),2&s){const e=t.MAs(6),n=t.MAs(8),a=t.oxw(2);t.xp6(4),t.Q6J("ngIf",!a.editor||!a.editor.lock||a.editor.until<=0||a.editor&&a.editor.lock&&a.editor.until>0&&!a.editorAffixStick),t.xp6(7),t.Q6J("nzTitle",e)("nzDescription",n)}}function ti(s,i){if(1&s&&(t.TgZ(0,"div")(1,"nz-page-header",146,142),t.YNc(3,Rn,2,1,"nz-page-header-title",16),t._uU(4," > "),t.YNc(5,kn,5,1,"nz-page-header-content",16),t.qZA(),t.TgZ(6,"div",147,148),t.YNc(8,Un,3,3,"div",149),t.YNc(9,Vn,1,14,"app-v1-segment",150),t.qZA(),t.TgZ(10,"div",151),t.YNc(11,Qn,5,17,"div",152),t.YNc(12,Gn,7,11,"button",153),t.YNc(13,Wn,4,6,"button",154),t.qZA(),t.YNc(14,$n,12,3,"div",155),t.qZA()),2&s){const e=t.oxw();t.Q6J("@skeletonPosAbsLeave",void 0),t.xp6(3),t.Q6J("ngIf",e.step.displayElements.title),t.xp6(2),t.Q6J("ngIf",e.step.displayElements.description),t.xp6(3),t.Q6J("ngForOf",e.step.segments)("ngForTrackBy",e.trackBySegment),t.xp6(1),t.Q6J("ngIf",e.isCustomClauseAdded),t.xp6(2),t.Q6J("ngIf",e.editingStep!==e.stepDisplayElements.length-1||!e.isContractComplete||e.isDemo),t.xp6(1),t.Q6J("ngIf",e.step.complete&&e.step.addon&&!e.isCustomClauseAdded),t.xp6(1),t.Q6J("ngIf",e.isContractComplete),t.xp6(1),t.Q6J("ngIf",!e.isContractComplete)}}function ei(s,i){if(1&s&&t._UZ(0,"app-proofing",190),2&s){const e=t.oxw();t.Q6J("isContractComplete",e.isContractComplete)("progressID",e.progressID)("updateAutomaticProofing",e.proofingUpdateEmitter)}}const ni=function(s){return{name:s}};function ii(s,i){if(1&s&&(t._UZ(0,"app-feedback",191),t.ALo(1,"translate")),2&s){const e=t.oxw();t.Q6J("feature",e.FeedbackFeature.Contract)("unit",e.FeedbackUnit.Edit)("aspect",e.canonicalName)("title",t.xi3(1,4,"COMMON.FEEDBACK.TITLES.CONTRACT_EDIT",t.VKq(7,ni,e.name)))}}const si=function(){return[]};function oi(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"div",193),t.NdJ("mouseleave",function(a){t.CHM(e);const o=t.oxw(2);return t.KtG(o.tryClosePopover(a))}),t.TgZ(1,"div",194),t._uU(2),t.ALo(3,"translate"),t.qZA(),t.TgZ(4,"nz-tree",195),t.NdJ("nzClick",function(a){t.CHM(e);const o=t.oxw(2);return t.KtG(o.jumpTOSegmentOrField(a))})("nzExpandChange",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.setKeepPopoverOpen(!0))}),t.qZA()()}if(2&s){const e=t.oxw(2);t.xp6(2),t.hij(" ",t.lcZ(3,3,"CLIENT.CONTRACTS.VALIDATION_POPOVER")," "),t.xp6(2),t.Q6J("nzData",e.invalidFieldNodes)("nzSelectedKeys",t.DdM(5,si))}}function ai(s,i){if(1&s&&t.YNc(0,oi,5,6,"div",192),2&s){const e=t.oxw();t.Q6J("ngIf",!e.isStepValid&&e.invalidFieldNodes.length>0)}}const ri=function(s){return{contractName:s}};function li(s,i){if(1&s&&(t.TgZ(0,"span",201),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&s){const e=t.oxw(2);t.xp6(1),t.Oqu(t.xi3(2,1,"CLIENT.CONTRACTS.SHARE.FOOTER_TEXT",t.VKq(4,ri,e.name)))}}function ci(s,i){if(1&s&&(t.YNc(0,li,3,6,"ng-template",null,196,t.W1O),t._UZ(2,"nz-divider",197),t.TgZ(3,"div",198)(4,"p"),t._uU(5),t.ALo(6,"translate"),t.ALo(7,"translate"),t.qZA()(),t.TgZ(8,"div",199),t._UZ(9,"app-feedback",200),t.qZA()),2&s){const e=t.MAs(1),n=t.oxw();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("feature",n.FeedbackFeature.Modal)("unit",n.FeedbackUnit.ShareContract)("title","COMMON.FEEDBACK.TITLES.SHARING")}}const X=function(s){return{stepTitle:s}};function _i(s,i){if(1&s&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&s){const e=t.oxw(3);t.xp6(1),t.hij(" ",t.xi3(2,1,"CLIENT.CONTRACTS.NEXT.BUTTON_STATES.CONTINUE_TO",t.VKq(4,X,e.stepDisplayElements[e.editingStep+1].title))," ")}}function pi(s,i){1&s&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&s&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"CLIENT.CONTRACTS.NEXT.BUTTON_STATES.CONTINUE")," "))}
1function di(s,i){if(1&s&&(t.TgZ(0,"span"),t.YNc(1,_i,3,6,"span",16),t.YNc(2,pi,3,3,"span",16),t.qZA()),2&s){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.step&&e.stepDisplayElements&&e.step.complete&&e.stepDisplayElements.length>e.editingStep+1),t.xp6(1),t.Q6J("ngIf",!(e.step&&e.stepDisplayElements&&e.step.complete&&e.stepDisplayElements.length>e.editingStep+1))}}function mi(s,i){1&s&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&s&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"LANDING.DEMOS.CONTRACT.CONTINUE")," "))}function hi(s,i){if(1&s&&(t.YNc(0,di,3,2,"span",16),t.YNc(1,mi,3,3,"span",16)),2&s){const e=t.oxw();t.Q6J("ngIf",!e.isDemo),t.xp6(1),t.Q6J("ngIf",e.isDemo)}}function ui(s,i){1&s&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&s&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"CLIENT.CONTRACTS.NEXT.BUTTON_STATES.SAVED")," "))}function gi(s,i){if(1&s&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&s){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,"CLIENT.CONTRACTS.NEXT.BUTTON_STATES.STEP_CHANGED",t.VKq(4,X,e.stepDisplayElements[e.editingStep].title))," ")}}function Ci(s,i){if(1&s&&(t.YNc(0,ui,3,3,"span",16),t.YNc(1,gi,3,6,"span",16)),2&s){const e=t.oxw();t.Q6J("ngIf",!(e.stepChangeInProgress&&e.step&&e.stepDisplayElements&&e.stepDisplayElements.length>e.editingStep)),t.xp6(1),t.Q6J("ngIf",e.stepChangeInProgress&&e.step&&e.stepDisplayElements&&e.stepDisplayElements.length>e.editingStep)}}function fi(s,i){1&s&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&s&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"CLIENT.CONTRACTS.NEXT.BUTTON_STATES.SAVING")," "))}function vi(s,i){1&s&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&s&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"CLIENT.CONTRACTS.NEXT.BUTTON_STATES.STEP_CHANGING")," "))}function Ti(s,i){if(1&s&&(t.YNc(0,fi,3,3,"span",16),t.YNc(1,vi,3,3,"span",16)),2&s){const e=t.oxw();t.Q6J("ngIf",!e.stepChangeInProgress),t.xp6(1),t.Q6J("ngIf",e.stepChangeInProgress)}}const Si=function(s){return{border:s}},xi=function(){return{"padding-bottom":"1rem"}};let x=class{constructor(i,e,n,a,o,r,l,_,h,T,P,S,I,Oi,Pi,Ii,zi,Di,Ai,Ni,bi,Mi,yi){this.nzMessageService=i,this.nzModal=e,this.route=n,this.translate=a,this.chatService=o,this.clientService=r,this.entitiesService=l,this.modalService=_,this.contractModalService=h,this.routerService=T,this.userService=P,this.v1ContractFormService=S,this.renderer=I,this.themeService=Oi,this.router=Pi,this.contractService=Ii,this.dateTrigger=zi,this.dateAfterPipe=Di,this.notificationService=Ai,this.userInfos=Ni,this.asyncMessenger=bi,this.asPipe=Mi,this.metadataService=yi,this.ButtonState=E.BN,this.ClientRoutes=et.i,this.ColorSettings=nt.y,this.EnvironmentService=at.L,this.ProofOperationKind=ot.g,this.UserType=it.FW,this.isDemoFinished=!1,this.editingStep=0,this.name="",this.nextInProgress=!1,this.stepDisplayElements=[],this.completedSegmentOrdinals=[],this.isStepValid=!1,this.validityMap=new Map,this.variableMap=new Map,this.onlyBooleanMissing=!1,this.onlyOneNonBooleanFieldEdited=!1,this.contractState=new m.As,this.imagesToShow=new Map,this.editorName="",this.canRelease=!1,this.canTakeover=!1,this.isContractEditable=!1,this.isEditedByOther=!1,this.lastFormUpdate=Date.now(),this.isContractComplete=!1,this.stepTitleClickPopoverVisible=[],this.stepTitleHoverPopoverVisible=[],this.stepDescriptionClickPopoverVisible=[],this.stepDescriptionHoverPopoverVisible=[],this.continuePopoverVisible=!1,this.floatingContinuePopoverVisible=!1,this.keepPopoverOpen=!1,this.invalidFieldNodes=[],this.isCustomClauseAdded=!1,this.continueText=new E.PR("CLIENT.CONTRACTS.NEXT.BUTTON_STATES.CONTINUE","CLIENT.CONTRACTS.NEXT.BUTTON_STATES.SAVING","CLIENT.CONTRACTS.NEXT.BUTTON_STATES.SAVED","CLIENT.CONTRACTS.NEXT.BUTTON_STATES.FAILED"),this.editorAffixStick=!1,this.contractIconHidden=!0,this.showSkeletonSegment=!1,this.variableSaveList=[],this.autoScrollInProgress=!1,this.autoScrollAborted=!1,this.expectNewSegment=!1,this.oldInvalidSegmentsNum=0,this.mouseOverSteps=!1,this.mouseOverStep=[],this.saveTimeoutDuration=1e3,this.stashSaveList=[],this.dateAfterTrigger=0,this.modificationEndTime=0,this.showModificationEndTime=!1,this.firstLimitedModification=!1,this.hideTooltip=!0,this.hideTooltipDuration=5e3,this.tutorialVisible=!1,this.understandSavingTooltip=!1,this.savingTutorialVisible=!1,this.canonicalName="",this.stepChangeInProgress=!1,this.FeedbackFeature=g.lrp,this.FeedbackUnit=g._0Z,this.isOwned=!0,this.shouldCheckUnicreditPayment=!1,this.proofingResultOpen=!0,this.minRenderedSegment=2,this.isRendered={},this.updateContractProgressIntervalDuration=6e4,this.proofingUpdateEmitter=new t.vpe,this.OwnContractProgress=g.c9m,this.AdvancedContractDetails=g.Trt,this.resizeOb=new ResizeObserver(Li=>{window.parent.postMessage(Math.round(Li[0].contentRect.height),"*")})}ngOnInit(){this.route.params.subscribe(i=>{i.id&&("demo"===i.id&&(this.isDemo=!0),this.reloadPage())}),this.imagesToShow=this.userInfos.userImgs,this.isLawyer=this.userService.isLawyer,this.understandSavingTooltip=JSON.parse(localStorage.getItem(b.B.understandSavingTooltip)),this.resizeOb.observe(document.querySelector("#contract-height"))}closeUpdateCanonicalModal(){this.canonicalUpdateModal&&this.canonicalUpdateModal.close(),this.canonicalUpdateModal=null,this.reloadPage(!0)}reloadPage(i=!1){this.ngOnDestroy(),this.step&&(this.isSpinning=Array(this.step.segments.length).fill(!0)),this.loadContract(i)}ngAfterViewInit(){f.R.editorDetailsEmitter.emit(this.editorDetails),this.updateContinueText()}loadContract(i=!1){this.isDemo?(this.canonicalName=u.vy,this.name=u.L7.name,this.metadataService.setTranslateVariables({contractName:this.name}),this.contractFormDisplay=u.L7,this.parseFormDisplayMarkdown(),this.stepDisplayElements=u.Vb,this.setPopoverVisibility(!0),this.editingStep=u.DF.stepID,this.stepProgress=u.DF.stepID,this.stepHighestReached=u.DF.stepID,this.step=u.DF,this.step.segments&&this.step.segments.length>0&&(this.step.segments=[this.step.segments[0]]),this.setSpinners(!1),this.setColoredBackgroun
1d(!1),this.contractState=u.qp,this.isContractEditable=!0,this.continueText=new E.PR("LANDING.DEMOS.CONTRACT.CONTINUE","CLIENT.CONTRACTS.NEXT.BUTTON_STATES.SAVING","CLIENT.CONTRACTS.NEXT.BUTTON_STATES.SAVED","CLIENT.CONTRACTS.NEXT.BUTTON_STATES.FAILED")):(this.themeService.toggleFold(!0),this.route.queryParams.subscribe(n=>{this.progressID=this.route.snapshot.paramMap.get("id"),n&&n.fromCreate&&"true"===n.fromCreate&&0===this.nzModal.openModals.length&&(this.nzModal.success({nzTitle:this.translate.instant("CLIENT.CONTRACTS.LOADED_EMPTY"),nzContent:this.translate.instant("CLIENT.CONTRACTS.LOADED_EMPTY_DESC"),nzCancelText:null,nzOkText:this.translate.instant("COMMON.CONTINUE")}),this.router.navigate([],{queryParams:{fromCreate:null},queryParamsHandling:"merge"})),n.isOwned&&(this.isOwned="true"===n.isOwned);const a=Date.now();this.contractDataLoadingPromise=this.isOwned?this.loadOwnContract(n,a,!1,i):this.loadSharedContract(n,a,!1,i),this.contractDataLoadingPromise.then(o=>{},o=>{o&&404===o.status&&(this.asyncMessenger.errorMessage("CLIENT.CONTRACTS.PROGRESSES.NOT_FOUND_NOTIFICATION.TITLE","CLIENT.CONTRACTS.PROGRESSES.NOT_FOUND_NOTIFICATION.DESCRIPTION"),this.routerService.routeToContractList())}),n.check&&(this.shouldCheckUnicreditPayment="true"===n.check,this.shouldCheckUnicreditPayment&&this.contractDataLoadingPromise&&this.contractDataLoadingPromise.then(()=>{this.checkUnicreditPayment()}))})),this.clickListener=this.renderer.listen("window","click",n=>{let a=!0,o=n.target;for(;o&&a;)a=!o.classList.contains("ant-popover"),o=o.parentElement;if(a&&this.setPopoverVisibility(),this.step&&this.step.segments&&(this.step.segments.forEach((r,l)=>{const _=this.segmentsDiv.nativeElement.children[l];if(_){const h=_.getBoundingClientRect();h.top<document.documentElement.clientHeight-150&&h.bottom>150&&(this.segmentColoredBackground[l]=!1)}}),this.isCustomClauseAdded&&this.addonColoredBackground)){const r=this.segmentsDiv.nativeElement.children[this.step.segments.length];if(r){const l=r.getBoundingClientRect();l.top<document.documentElement.clientHeight-150&&l.bottom>150&&(this.addonColoredBackground=!1)}}});const e=n=>{this.autoScrollInProgress&&(this.autoScrollAborted=!0,this.autoScrollInProgress=!1)};this.wheelListener=this.renderer.listen("window","wheel",e),this.touchstartListener=this.renderer.listen("window","touchstart",e),this.dateTrigger.trigger.subscribe(n=>{this.dateAfterTrigger=n}),this.stepChangeTimeout=(0,v.H)(this.hideTooltipDuration).pipe((0,d.t)(this)).subscribe(n=>{this.hideTooltip=!1})}ngOnDestroy(){clearTimeout(this.lastSaveTimeout),clearTimeout(this.popoverTimeout),this.clickListener&&this.clickListener(),this.wheelListener&&this.wheelListener(),this.touchstartListener&&this.touchstartListener(),this.metadataService.setTranslateVariables(null),f.R.editorDetailsEmitter.emit(null)}loadOwnContract(i,e,n=!1,a=!1){return this.updateFunctions(),this.clientService.getContractProgressByID(this.progressID).pipe((0,d.t)(this)).toPromise().then(o=>(this.contract=o,this.isOwned=!0,"false"===i.isOwned&&this.router.navigate([],{queryParams:{isOwned:!0},queryParamsHandling:"merge"}),this.canonicalName=this.contract.progress.canonical.name,o.progress.finalization&&(this.modificationEndTime=o.progress.finalization.unlimitedFieldChangePeriodRemainder+e,this.showModificationEndTime=this.modificationEndTime>Date.now(),this.showModificationEndTime&&(this.modificationUpdateTimeout&&this.modificationUpdateTimeout.unsubscribe(),this.modificationUpdateTimeout=(0,v.H)(Math.max(0,this.modificationEndTime-Date.now())).pipe((0,d.t)(this)).subscribe(r=>{this.updateContractData()}))),this.name=o.progress.metadata.name?o.progress.metadata.name:o.displayElements.name,this.metadataService.setTranslateVariables({contractName:this.name}),this.contractService.getAvailableContracts().then(r=>{this.availableContracts=r,this.actContractResponse=this.availableContracts.find(l=>l.name===this.contract.progress.canonical.name),this.actContractResponse&&(this.progressLanguage=this.actContractResponse.language,this.matchmakingCategory=this.actContractResponse.metadata.matchmaking)}),this.updateFunctions(),this.loadContractDisplayElements(i,a),this.loadProfileImages(),this.updateHistory(),Promise.resolve(o)),o=>o&&404===o.status?n?Promise.reject(o):this.loadSharedContract(i,e,!0,a):o&&423===o.status&&this.userService.isLawyer?(this.asyncMessenger.errorMessage("COMMON.COMMON_ERROR_TITLE","CLIENT.PAGES.UNVERIFIED_LAWYER"),void this.routerService.routeToLobby()):Promise.reject(o))}loadSharedContract(i,e,n=!1,a=!1){return this.updateFunctions(),this.updateContractSharedData().then(o=>{let r=!1;return o.progress.permission.level===g.V5g.Write&&(r=!0),this.router.navigate([],"true"===i.isOwned?{queryParams:{isOwned:!1,writePermission:r},queryParamsHandling:"merge"}:{queryParams:{writePermission:r},queryParamsHandling:"merge"}),this.updateFunctions(),this.loadContractDisplayElements(i,a),this.updateContractSharedDataInterval&&this.updateContractSharedDataInterval.unsubscribe(),this.updateContractSharedDataInterval=(0,N.F)(3e4).pipe((0,d.t)(this)).subscribe(()=>{this.updateContractSharedData()}),this.loadProfileImages(),Promise.resolve(o)},o=>o&&404===o.status?n?Promise.reject(o):this.loadOwnContract(i,e,!0):o&&423===o.status&&this.userService.isLawyer?(this.asyncMessenger.errorMessage("COMMON.COMMON_ERROR_TITLE","CLIENT.PAGES.UNVERIFIED_LAWYER"),void this.routerService.routeToLobby()):Promise.reject(o))}loadProfileImages(){this.contract&&this.contract.progress.permissions&&(this.userInfos.batchGetUserImgsByIds(this.contract.progress.permissions.users),this.userInfos.batchGetUserNamesByIds(this.contract.progress.permissions.users))}updateFunctions(){this.getFormDisplayElementsFunction=i=>this.contract&&!this.contract.progress.permissions?this.clientService.getFormDisplayElementsLawyer(i):this.clientService.getFormDisplayElements(i),this.get
1StepDisplayElementsFunction=i=>this.contract&&!this.contract.progress.permissions?this.clientService.getStepDisplayElementsLawyer(i):this.clientService.getStepDisplayElements(i),this.getEditingStepFunction=i=>this.contract&&!this.contract.progress.permissions?this.clientService.getEditingStepLawyer(i):this.clientService.getEditingStep(i),this.getStateFunction=i=>this.contract&&!this.contract.progress.permissions?this.clientService.getStateLawyer(i):this.clientService.getState(i),this.getEditorFunction=i=>this.contract&&!this.contract.progress.permissions?this.clientService.getEditorLawyer(i):this.clientService.getEditor(i),this.getViewUnlockedStepFunction=(i,e)=>this.contract&&!this.contract.progress.permissions?this.clientService.getViewUnlockedStepLawyer(i,e):this.clientService.getViewUnlockedStep(i,e),this.getEditUnlockedStepFunction=(i,e)=>this.contract&&!this.contract.progress.permissions?this.clientService.getEditUnlockedStepLawyer(i,e):this.clientService.getEditUnlockedStep(i,e),this.postNextFunction=(i,e)=>this.contract&&!this.contract.progress.permissions?this.clientService.postNextLawyer(i,e):this.clientService.postNext(i,e),this.postBatchFunction=(i,e)=>this.contract&&!this.contract.progress.permissions?this.clientService.postBatchLawyer(i,e):this.clientService.postBatch(i,e)}loadContractDisplayElements(i,e=!1){const n=this.getFormDisplayElementsFunction(this.progressID).pipe((0,d.t)(this)).toPromise().then(o=>{this.contractFormDisplay=o,this.name=this.contract?this.contract.progress.metadata.name?this.contract.progress.metadata.name:this.contract.displayElements.name:this.contractFormDisplay.name,this.metadataService.setTranslateVariables({contractName:this.name}),this.parseFormDisplayMarkdown()},o=>{});this.getStepDisplayElementsFunction(this.progressID).pipe((0,d.t)(this)).subscribe(o=>{this.stepDisplayElements=o,this.setPopoverVisibility(!0)},o=>{});const a=this.getEditingStepFunction(this.progressID).pipe((0,d.t)(this)).toPromise().then(o=>{this.editingStep=o.stepID,this.stepProgress=o.leadingStepID,this.stepHighestReached=o.leadingStepID,this.step=o,this.setSpinners(!1),this.setColoredBackground(!1),this.isCustomClauseAdded=this.step.addon&&this.step.addon.fields[0].variableValue,this.contractState.percentage=o.percentage,this.isContractComplete=!!o.conclusion},o=>{});Promise.all([a,n]).then(()=>{i&&i.fromCreate||0!==this.editingStep||0!==this.stepProgress||0!==this.contractState.percentage||1!==this.step.segments.length||e||this.nzModal.afterAllClose.pipe((0,d.t)(this),(0,st.q)(1)).subscribe(()=>{this.openDetailsModal(this.contractFormDisplay.name,this.contractFormEditorHelperContent?this.contractFormEditorHelperContent:this.contractFormDescription,!0).afterClose.subscribe(()=>this.tutorialVisible=!0)})}),this.getStateFunction(this.progressID).pipe((0,d.t)(this)).subscribe(o=>{this.contractState=o,o.metadata&&o.metadata.name&&(this.name=o.metadata.name,this.metadataService.setTranslateVariables({contractName:this.name}))},o=>{}),this.updateEditor(),this.updateEditorInterval&&this.updateEditorInterval.unsubscribe(),this.updateEditorInterval=(0,N.F)(1e4).pipe((0,d.t)(this)).subscribe(()=>{this.updateEditor()}),this.updateContractProgressInterval=(0,N.F)(this.updateContractProgressIntervalDuration).pipe((0,d.t)(this)).subscribe(()=>{this.updateContractData()})}openShareModal(i){this.modalService.contractShareModal(this.progressID,i,this.footerdivider),this.nzModal.afterAllClose.subscribe(()=>{this.clientService.getContractProgressByID(this.progressID).pipe((0,d.t)(this)).subscribe(e=>{this.contract=e},e=>{})})}rollbackContract(i,e){this.routerService.routeToContractRollback(i,e)}handleSegments(i,e=!1){void 0!==i.stepLeading?this.stepProgress=i.stepLeading:i.conclusion&&(this.stepProgress=this.stepDisplayElements.length-1),this.step.complete=void 0!==i.stepCompleted&&void 0!==i.stepEditing,i.segmentRemove.forEach(a=>{const o=this.step.segments.findIndex(r=>(0,C.Z)(r.ordinal).eq(a));if(o&&o>-1){this.isRendered[this.step.segments.length-1]=!1,this.step.segments.splice(o,1),this.validityMap.has(o)&&this.validityMap.delete(o);const r=Array.from(this.validityMap.keys()).filter(l=>l>o).sort();for(const l of r)this.validityMap.set(Number(l)-1,this.validityMap.get(l)),this.validityMap.delete(l)}});const n=this.step.segments.length-1+i.segmentAdded.length;i.segmentAdded.forEach(a=>{const o=this.step.segments.findIndex(r=>(0,C.Z)(r.ordinal).gte(a.ordinal));if(-1===o)this.step.segments.push(a),this.segmentColoredBackgroun
1d[this.step.segments.length-1]=!0;else if((0,C.Z)(this.step.segments[o].ordinal).eq(a.ordinal))e&&(this.step.segments[o]=a);else{this.step.segments.splice(o,0,a);for(let l=this.step.segments.length-1;l>o;l--)this.isRendered[l]=this.isRendered[l-1];this.isRendered[o]=!1,this.segmentColoredBackground.splice(o,0,!0);const r=Array.from(this.validityMap.keys()).filter(l=>l>=o);for(let l=r.length-1;l>=0;l--){const _=r[l];this.validityMap.set(Number(_)+1,this.validityMap.get(_)),this.validityMap.delete(_)}}}),i.segmentAdded.length>0&&(0,v.H)(e?1500:0).pipe((0,d.t)(this)).subscribe(a=>{(!this.focusedField||this.focusedField.specification.required)&&this.jumpToSegment(n)}),i.segmentUpdated.forEach(a=>{const o=this.step.segments.findIndex(r=>(0,C.Z)(r.ordinal).eq(a.ordinal));-1!==o&&(this.step.segments[o].stash&&this.step.segments[o].stash.length>0&&(!a.stash||0===a.stash.length)&&(a.stash=this.step.segments[o].stash),this.step.segments[o]=a)}),i.segmentCompleted.forEach(a=>{if(-1===this.completedSegmentOrdinals.findIndex(o=>(0,C.Z)(o).eq(a.ordinal))&&this.completedSegmentOrdinals.push(a.ordinal),e){const o=this.step.segments.findIndex(r=>(0,C.Z)(r.ordinal).eq(a.ordinal));-1!==o&&(this.step.segments[o].stash&&this.step.segments[o].stash.length>0&&(!a.stash||0===a.stash.length)&&(a.stash=this.step.segments[o].stash),this.step.segments[o]=a)}else{const o=this.step.segments.findIndex(r=>(0,C.Z)(r.ordinal).eq(a.ordinal));-1!==o&&a.fields.forEach(r=>{if(r.variableValue){const l=this.step.segments[o].fields.find(_=>_.variable===r.variable);l&&(l.variableValue=r.variableValue)}})}}),i.segmentUncompleted.forEach(a=>{-1!==this.completedSegmentOrdinals.findIndex(r=>(0,C.Z)(r).eq(a.ordinal))&&this.completedSegmentOrdinals.splice(this.completedSegmentOrdinals.findIndex(r=>(0,C.Z)(r).eq(a.ordinal)));const o=this.step.segments.findIndex(r=>(0,C.Z)(r.ordinal).eq(a.ordinal));-1!==o&&a.fields.forEach(r=>{if(r.variableValue){const l=this.step.segments[o].fields.find(_=>_.variable===r.variable);l&&(l.variableValue=r.variableValue)}})}),this.contractState.percentage=i.percentage,this.tutorialVisible&&this.contractState.percentage>0&&this.setTutorialVisible(!1),this.isContractComplete=!!i.conclusion,this.recalculateValidity()}jumpToStep(i,e=!1){return this.isContractEditable&&this.editor&&this.editor.until>0&&this.editor.userID===this.userService.sessionUserID?this.jumpToStepEdit(i,e):this.jumpToStepView(i,e)}jumpToStepView(i,e=!1){const n=this.step;let a;return e&&(this.step=null),a=this.isDemo?(0,u.gN)(i):this.getViewUnlockedStepFunction(this.progressID,i.toString()).pipe((0,d.t)(this)).toPromise(),a.then(o=>{this.segmentRenderTimer&&e&&(this.segmentRenderTimer.unsubscribe(),this.segmentRenderTimer=null),this.step=o,this.setSpinners(!1),this.setColoredBackground(!1),this.isCustomClauseAdded=this.step.addon&&this.step.addon.fields[0].variableValue,this.editingStep=o.stepID,this.stepProgress=o.leadingStepID,this.stepHighestReached=o.leadingStepID,this.nextInProgress=!1,this.lastFormUpdate=Date.now(),this.resetStepState(),this.contractState.percentage=o.percentage,this.isContractComplete=!!o.conclusion},o=>{this.step=n}),a}jumpToStepEdit(i,e=!1){const n=this.step;let a;return e&&(this.step=null),a=this.isDemo?(0,u.gN)(i):this.getEditUnlockedStepFunction(this.progressID,i.toString()).pipe((0,d.t)(this)).toPromise(),a.then(o=>{this.segmentRenderTimer&&e&&(this.segmentRenderTimer.unsubscribe(),this.segmentRenderTimer=null),this.step=o,this.setSpinners(!1),this.setColoredBackground(!1),this.isCustomClauseAdded=this.step.addon&&this.step.addon.fields[0].variableValue,this.editingStep=o.stepID,this.stepProgress=o.leadingStepID,this.stepHighestReached=o.leadingStepID,this.nextInProgress=!1,this.lastFormUpdate=Date.now(),this.resetStepState(),this.contractState.percentage=o.percentage,this.isContractComplete=!!o.conclusion},o=>{this.step=n}),a}next(){this.themeService.toggleFold(!0),this.nextInProgress=!0;const i=this.step.segments.length-1,e=this.step.segments[i].fields;if(!this.isStepValid&&this.onlyBooleanMissing){const a=this.validityMap.get(i);
1a.validity||a.invalidIndexes.forEach(o=>{if(e[o]&&e[o].specification.kind===m.J3.Checkbox){const r=this.step.segments[i],l=this.v1ContractFormService.variableNameToFieldName(e[o],this.step.segments[i]);let _=!1;e[o].defaultValue&&(_=this.v1ContractFormService.parseVariableValue(e[o],e[o].defaultValue)),this.variableMap.set(this.v1ContractFormService.variableNameToFieldName(e[o],this.step.segments[i]),String(_)),f.R.updateFieldValueEmitter.emit({segment:r,fieldName:l,value:_})}})}e.forEach(a=>{if(!a.variableValue&&a.defaultValue&&!a.specification.field.multipliable&&!a.specification.field.range){const o=this.step.segments[i],r=this.v1ContractFormService.variableNameToFieldName(a,this.step.segments[i]),l=this.v1ContractFormService.parseVariableValue(a,a.defaultValue);this.variableMap.set(this.v1ContractFormService.variableNameToFieldName(a,this.step.segments[i]),a.defaultValue),f.R.setDefaultFieldValueEmitter.emit({segment:o,fieldName:r,value:l})}});const n=this.entitiesService.mapToVariableObject(this.variableMap);if(Object.keys(n).length>0)return this.v1ContractFormService.updateFormDataStructure(n),this.showSkeletonSegment=!0,new Promise(a=>setTimeout(()=>{this.isVariableSaveListBusy()&&!this.saveModal&&(this.saveModal=this.modalService.saveInProgressModal());let o=this.lastRecursiveSavePromise;o||(o=Promise.resolve()),a(o.then(()=>{if(this.editingStep<this.stepProgress){const r=this.tryStepChange(this.editingStep+1);return r.then(()=>{this.expectNewSegment=!1,this.nextInProgress=!1,this.showSkeletonSegment=!1}),r}return this.expectNewSegment=!1,this.nextInProgress=!1,this.showSkeletonSegment=!1,Promise.resolve()}))},0));{const a=this.step.complete&&this.stepDisplayElements.length>this.editingStep+1;return new Promise(o=>(0,v.H)(100).pipe((0,d.t)(this)).subscribe(r=>{this.isVariableSaveListBusy()&&!this.saveModal&&(this.saveModal=this.modalService.saveInProgressModal());let l=this.lastRecursiveSavePromise;l||(l=Promise.resolve()),o(l.then(()=>{if(a&&this.editingStep<this.stepProgress){const _=this.tryStepChange(this.editingStep+1);return _.then(()=>{this.expectNewSegment=!1,this.nextInProgress=!1,this.showSkeletonSegment=!1}),_}return this.expectNewSegment=!1,this.nextInProgress=!1,this.showSkeletonSegment=!1,Promise.resolve()}))}))}}tryStepChange(i){if(!this.isDemo){if(!this.lastSavePromise&&!this.lastSaveTimeout){this.stepChangeInProgress=!0;const e=this.onStepChange(i).then(()=>{this.saveModal&&(this.saveModal.close(),this.saveModal=null)});return this.lastRecursiveSavePromise||(this.lastRecursiveSavePromise=e,this.runNextFunction=e,e.then(()=>{this.lastRecursiveSavePromise=null},()=>{this.lastRecursiveSavePromise=null})),e}if(this.saveModal||(this.saveModal=this.modalService.saveInProgressModal()),this.lastSavePromise)return this.lastSavePromise.then(()=>this.tryStepChange(i));if(this.lastSaveTimeout){const e=Date.now()-this.lastSaveTimeoutStart;return new Promise(n=>(0,v.H)(e||this.saveTimeoutDuration).pipe((0,d.t)(this)).subscribe(a=>{n(this.tryStepChange(i))}))}}}onStepChange(i){const e=this.jumpToStep(i,!0);return e.then(n=>{this.clearVariableSaveList(),this.hideTooltip=!0,this.stepChangeTimeout&&this.stepChangeTimeout.unsubscribe(),this.stepChangeTimeout=(0,v.H)(this.hideTooltipDuration).pipe((0,d.t)(this)).subscribe(a=>{this.hideTooltip=!1})},n=>{}),this.jumpToStepHeader(),e}clearVariableSaveList(){clearTimeout(this.lastSaveTimeout),this.variableSaveList=[],this.lastSavePromise=null,this.lastSaveTimeout=null,this.lastSaveTimeoutStart=null}openDetailsModal(i,e,n=!1){return this.modalService.contractInformationModal(i,e,this.canonicalName,this.isOwned?this.progressID:void 0,this.contractFormDisplay.name,n,this.isDemo,this.matchmakingCategory)}resetStepState(){this.validityMap.clear(),this.variableMap.clear()}rebuildInvalidFieldNodes(){const i=Array.from(this.validityMap.entries());this.invalidFieldNodes=[],this.isStepValid||i.filter(e=>!e[1].validity&&(e[1].invalidIndexes.length>0||e[1].invalidEnsures.length>0)).forEach(e=>{const n="number"==typeof e[0]?this.step.segments[e[0]]:this.step.addon,a=[],o={title:this.v1ContractFormService.parseMarkdownText(n.displayElements.title),key:e[0],children:a,expanded:!0,icon:"box-plot"};
1this.invalidFieldNodes.push(o),e[1].invalidIndexes.forEach(r=>{if(n.fields[r]){let l="";switch(n.fields[r].specification.kind){case m.J3.Blockade:l="stop";break;case m.J3.Checkbox:case m.J3.Confirm:l="check-square";break;case m.J3.Date:case m.J3.Datetime:l="calendar";break;case m.J3.Time:l="field-time";break;case m.J3.Notice:l="info-circle";break;case m.J3.Number:l="field-binary";break;case m.J3.Selection:l="check-square";break;case m.J3.Text:l="field-string";break;case m.J3.Textarea:l="menu"}const _={title:this.v1ContractFormService.parseMarkdownText(n.fields[r].displayElements.name),key:r,isLeaf:!0,icon:l};a.push(_)}else console.log("Received missing field. Segment index: "+e[0]+"Field index:"+r)}),e[1].invalidEnsures.forEach(({invalidEnsure:r,firstIndex:l})=>{let _="";switch(n.fields[l].specification.kind){case m.J3.Blockade:_="stop";break;case m.J3.Checkbox:case m.J3.Confirm:_="check-square";break;case m.J3.Date:case m.J3.Datetime:_="calendar";break;case m.J3.Time:_="field-time";break;case m.J3.Notice:_="info-circle";break;case m.J3.Number:_="field-binary";break;case m.J3.Selection:_="check-square";break;case m.J3.Text:_="field-string";break;case m.J3.Textarea:_="menu"}const h=[];r.fields.forEach(P=>{const S=n.fields.find(I=>I.variable===P);S&&h.push(S.displayElements.name)});const T={title:this.translate.instant("CLIENT.CONTRACTS.FIELD.VALIDATION.ONE_IS_REQUIRED",{names:h.join(", ")}),key:l,isLeaf:!0,icon:_};a.push(T)})})}validateStep(i,e){this.themeService.toggleFold(!0),this.validityMap.set(e,i),this.recalculateValidity()}recalculateValidity(){const i=Array.from(this.validityMap.entries());this.isStepValid=this.validityMap.size===this.step.segments.length+(this.isCu
1stomClauseAdded?1:0)&&i.every(n=>n[1].validity),this.rebuildInvalidFieldNodes(),this.onlyBooleanMissing=this.isStepValid||i.every((n,a)=>{const o="number"==typeof n[0]?this.step.segments[n[0]]:this.step.addon;return n[1].validity?n[1].validity:n[1].invalidIndexes?0===n[1].invalidEnsures.length&&n[1].invalidIndexes.every(r=>o.fields[r]&&o.fields[r].specification.kind===m.J3.Checkbox)&&n[1].invalidEnsures.every(({invalidEnsure:r})=>r.fields.some(_=>{const h=o.fields.find(T=>T.variable===_);return h&&h.specification.kind===m.J3.Checkbox})):void 0}),this.missingNonBooleanFields=i.map((n,a)=>{const o="number"==typeof n[0]?this.step.segments[n[0]]:this.step.addon;if(!n[1].validity&&n[1].invalidIndexes){const r=n[1].invalidIndexes.filter(_=>o.fields[_]&&o.fields[_].specification.kind!==m.J3.Checkbox),l=n[1].invalidEnsures.map(({invalidEnsure:_})=>_.fields.reduce((T,P)=>{const S=o.fields.findIndex(I=>P===I.variable);return-1!==S&&o.fields[S].specification.kind!==m.J3.Checkbox&&T.push(S),T},[]));if(r.length>0||l.length>0)return{segmentIndex:n[0],invalidIndexes:r,invalidEnsures:l}}}).filter(n=>null!=n);const e=i.filter(n=>!n[1].validity).length;this.oldInvalidSegmentsNum>0&&0===e&&(this.expectNewSegment=!0),this.oldInvalidSegmentsNum=e}variablesChanged(i,e){this.themeService.toggleFold(!0),this.currentlyEditedSegment!==e&&(this.variableMap.clear(),this.currentlyEditedSegment=e),this.variableSaveList.push({saveValue:i.formData,segmentIndex:e}),!this.saveModal&&this.isVariableSaveListBusy()&&(this.saveModal=this.modalService.saveInProgressModal()),this.lastRecursiveSavePromise||(this.lastRecursiveSavePromise=this.saveVariablesWithButton(),this.lastRecursiveSavePromise.then(()=>{this.understandSavingTooltip||(this.savingTutorialVisible=!0),this.lastRecursiveSavePromise=null},()=>{this.understandSavingTooltip||(this.savingTutorialVisible=!0),this.lastRecursiveSavePromise=null}))}isVariableSaveListBusy(){return this.variableSaveList.length>10||this.variableSaveList.length>1&&!this.variableSaveList.every(i=>this.hasSameObjectKeysDeep(this.variableSaveList[0],i))}hasSameObjectKeysDeep(i,e){if(i===e||(null===i||"object"!=typeof i||Array.isArray(i))&&(null===e||"object"!=typeof e||Array.isArray(e)))return!0;{const n=Object.keys(i),a=Object.keys(e);return n.length===a.length&&n.every(o=>a.includes(o)&&this.hasSameObjectKeysDeep(i[o],e[o]))}}simplifySaveList(i=!1){for(;this.variableSaveList.length>1&&this.hasSameObjectKeysDeep(this.variableSaveList[0].saveValue,this.variableSaveList[1].saveValue);)this.variableSaveList.shift();return!this.lastSavePromise&&!this.lastSaveTimeout&&this.variableSaveList.length>0?(this.lastSaveVariableData=this.variableSaveList[0].saveValue,this.lastSaveTimeoutStart=Date.now(),new Promise(n=>{this.lastSaveTimeout=setTimeout(()=>n(this.saveVariables(this.variableSaveList[0].saveValue,this.variableSaveList[0].segmentIndex)),i?0:this.saveTimeoutDuration)})):0===this.variableSaveList.length?Promise.resolve():this.lastRecursiveSavePromise}saveVariablesWithButton(){const i=this.simplifySaveList(!0);return this.stepChangeInProgress=!1,this.runNextFunction=i,i.then(()=>{},e=>{this.updateContractData()}),i}saveVariables(i,e){var n=this;return i=JSON.parse(JSON.stringify(i).replace(/\\\\/g,"/")),this.isDemo?("number"==typeof e&&(this.isSpinning=[...Array(e+1).fill(!1),...Array(this.step.segments.length-(e+1)).fill(!0)]),this.showSkeletonSegment=this.expectNewSegment,this.lastSavePromise=new Promise((a,o)=>{a({updates:(0,u.GA)(this.step,i)})}),this.lastSavePromise.then(a=>{this.expectNewSegment=!1,this.handleSegments(a.updates),this.isDemoFinished=this.step&&this.step.segments&&this.step.segments.includes(u.Xt),this.setSpinners(!1),this.showSkeletonSegment=!1,this.lastSavePromise=null,this.lastSaveTimeout=null,this.lastSaveTimeoutStart=null,this.lastSaveVariableData&&this.lastSaveVariableData===this.variableSaveList[0].saveValue&&this.variableSaveList.shift();const o=this.simplifySaveList();return this.saveModal&&!this.isVariableSaveListBusy()&&(this.saveModal.close(),this.saveModal=null),o})):this.isContractEditable&&(!this.editor||this.editor.until<=0)?("number"==typeof e&&(this.isSpinning=[...Array(e+1).fill(!1),...Array(this.step.segments.length-(e+1)).fill(!0)]),this.getEditUnlockedStepFunction(this.progressID,this.editingStep.toString()).pipe((0,d.t)(this)).toPromise().then(function(){var o=(0,L.Z)(function*(r){return n.editingStep=r.stepID,n.stepProgress=r.leadingStepID,n.lastFormUpdate=Date.now(),n.updateEditor(),n.contractState.percentage=r.percentage,n.isContractComplete=!!r.conclusion,n.showSkeletonSegment=n.expectNewSegment,n.lastSavePromise=n.postNextFunction(n.progressID,i).pipe((0,d.t)(n)).toPromise(),n.lastSavePromise.then(l=>{n.expectNewSegment=!1,n.handleSegments(l.updates),n.setSpinners(!1),n.showSkeletonSegment=!1,n.lastSavePromise=null,n.lastSaveTimeout=null,n.lastSaveTimeoutStart=null,n.lastSaveVariableData&&n.lastSaveVariableData===n.variableSaveList[0].saveValue&&n.variableSaveList.shift();const _=n.simplifySaveList();return n.saveModal&&!n.isVariableSaveListBusy()&&(n.saveModal.close(),n.saveModal=null),n.updateContractData(),n.updateAutomaticProofing(),_},l=>(n.setSpinners(!1),n.expectNewSegment=!1,n.showSkeletonSegment=!1,n.lastSavePromise=null,n.lastSaveTimeout=null,n.lastSaveTimeoutStart=null,!n.lastSaveVariableData||n.lastSaveVariableData!==n.variableSaveList[0].saveValue||400!==l.status&&423!==l.status?(n.updateContractData(),n.simplifySaveList()):(n.variableSaveList.shift(),423===l.status&&n.nzMessageService.error(n.translate.instant("CLIENT.CONTRACTS.ALLOWED_MODIFICATION_EXCEEDS_LIMIT")),n.updateContractData(),n.simplifySaveList().then(()=>Promise.reject(l)))))});return function(r){return o.apply(this,arguments)}}(),o=>(this.setSpinners(!1),this.lastSavePromise=null,this.lastSaveTimeout=null,this.lastSaveTimeoutStart=null,this.simplifySaveList()))):this.isContractEditable?("number"==typeof e&&(this.isSpinning=[...Array(e+1).fill(!1),...Array(this.step.segments.length-(e+1)).fill(!0)]),this.showSkeletonSegment=this.expectNewSegment,this.lastSavePromise=this.postNextFunction(this.progressID,i).pipe((0,d.t)(this)).toPromise(),this.lastSavePromise.then(a=>{this.expectNewSegment=!1,this.handleSegments(a.updates),this.setSpinners(!1),this.showSkeletonSegment=!1,this.lastSavePromise=null,this.lastSaveTimeout=null,this.lastSaveTimeoutStart=null,this.lastSaveVariableData&&this.lastSaveVariableData===this.variableSaveList[0].saveValue&&this.variableSaveList.shift();const o=this.simplifySaveList();return this.saveModal&&!this.isVariableSaveListBusy()&&(this.saveModal.close(),this.saveModal=null),this.updateContractData(),this.updateAutomaticProofing(),o},a=>(this.setSpinners(!1),this.expectNewSegment=!1,this.showSkeletonSegment=!1,this.lastSavePromise=null,this.lastSaveTimeout=null,this.lastSaveTimeoutStart=null,!this.lastSaveVariableData||this.lastSaveVariableData!==this.variableSaveList[0].saveValue||400!==a.status&&423!==a.status?(this.updateContractData(),this.simplifySaveList()):(this.variableSaveList.shift(),423===a.status&&this.nzMessageService.error(this.translate.instant("CLIENT.CONTRACTS.ALLOWED_MODIFICATION_EXCEEDS_LIMIT")),this.updateContractData(),this.simplifySaveList().then(()=>Promise.reject(a)))))):void 0}jumpToStepHeader(){const i=document.getElementById("stepHeader");if(i){const e=i.getBoundingClientRect();
1if(e.top<0||e.top>document.documentElement.clientHeight-150){const n=e.top+document.documentElement.scrollTop-150;window.scrollTo({top:n,behavior:"smooth"})}}}jumpToSegment(i){const e=this.segmentsDiv.nativeElement.children[i];if(e){const n=e.getBoundingClientRect();if(n.top<0||n.top>document.documentElement.clientHeight-150)if(this.isDemo&&this.demoSimplebar){const a=this.demoSimplebar.SimpleBar.getScrollElement();this.scrollTo(n.top+a.scrollTop-150,2e3,a)}else{const a=n.top+document.documentElement.scrollTop-150;this.scrollTo(a,2e3)}}}jumpToNextInput(i,e){this.step.segments[i].fields.length>e+1?this.jumpToField(i,e+1):this.step.segments.length>i+1&&this.jumpToField(i+1,e)}jumpToField(i,e){const n=this.step.segments[i],o=document.getElementById(this.v1ContractFormService.variableNameToFieldName(n.fields[e],n));if(o){if(this.isDemo&&this.demoSimplebar){const r=this.demoSimplebar.SimpleBar.getScrollElement(),l=Math.floor(o.getBoundingClientRect().top+r.scrollTop-150-(r.clientHeight-150)/8);r.scrollTo({top:l,behavior:"smooth"})}else{const r=Math.floor(o.getBoundingClientRect().top+document.documentElement.scrollTop-150-(document.documentElement.clientHeight-150)/8);window.scrollTo({top:r,behavior:"smooth"})}if(o instanceof HTMLInputElement)o.focus({preventScroll:!0});else{const r=o.getElementsByTagName("input"),l=o.getElementsByTagName("textarea"),_=o.getElementsByTagName("button"),h=o.getElementsByTagName("nz-card");r.length>0?r[0].focus({preventScroll:!0}):l.length>0?l[0].focus({preventScroll:!0}):_.length>0?_[0].focus({preventScroll:!0}):h.length>0&&h[0].focus({preventScroll:!0})}}}handleFinalization(i,e){if(i.progress.finalization){if(this.modificationEndTime=i.progress.finalization.unlimitedFieldChangePeriodRemainder+e,this.showModificationEndTime=this.modificationEndTime>Date.now(),this.showModificationEndTime&&(this.modificationUpdateTimeout&&this.modificationUpdateTimeout.unsubscribe(),this.modificationUpdateTimeout=(0,v.H)(Math.max(0,this.modificationEndTime-Date.now())).pipe((0,d.t)(this)).subscribe(n=>{this.updateContractData()})),this.contract&&!this.contract.progress.finalization&&i.progress.finalization.unlimitedFieldChangePeriodRemainder>0){const n=this.translate.instant("CLIENT.CONTRACTS.ALLOWED_MODIFICATIONS_TIME_LEFT",{timeLeft:this.dateAfterPipe.transform(this.modificationEndTime,null,2)});this.nzMessageService.info(n.charAt(0).toUpperCase()+n.slice(1))}if(this.contract&&this.contract.progress.finalization&&(this.contract.progress.finalization.unlimitedFieldChangePeriodRemainder>0&&i.progress.finalization.unlimitedFieldChangePeriodRemainder<=0&&(this.firstLimitedModification=!0),i.progress.finalization.currentFieldChangeAllowance<this.contract.progress.finalization.currentFieldChangeAllowance)){let n="";n=i.progress.finalization.currentFieldChangeAllowance>0?this.translate.instant("CLIENT.CONTRACTS.ALLOWED_MODIFICATIONS_LEFT",{currentFieldChangeAllowance:i.progress.finalization.currentFieldChangeAllowance}):this.translate.instant("CLIENT.CONTRACTS.NO_ALLOWED_MODIFICATIONS_LEFT"),this.nzMessageService.info(n.charAt(0).toUpperCase()+n.slice(1)),0===i.progress.finalization.currentFieldChangeAllowance&&this.releaseEditing()}}}updateContractData(){const i=Date.now();this.isOwned?this.clientService.getContractProgressByID(this.progressID).pipe((0,d.t)(this)).subscribe(e=>{this.handleFinalization(e,i),this.contract&&this.contract.progress.canonical.version!==e.progress.canonical.version&&this.showCanoncialUpdateModal(),this.contract=e,this.name=e.progress.metadata.name?e.progress.metadata.name:e.displayElements.name,this.metadataService.setTranslateVariables({contractName:this.name})},e=>{this.updateContractSharedData()}):this.updateContractSharedData()}showCanoncialUpdateModal(){this.canonicalUpdateModal||(this.canonicalUpdateModal=this.nzModal.info({nzTitle:this.translate.instant("CLIENT.CONTRACTS.PROGRESSES.VERSION_UPDATE.TITLE"),nzContent:this.translate.instant("CLIENT.CONTRACTS.PROGRESSES.VERSION_UPDATE.DESCRIPTION"),nzFooter:null,nzClosable:!1,nzMaskClosable:!1,nzOkText:this.translate.instant("CLIENT.CONTRACTS.PROGRESSES.VERSION_UPDATE.UNDERSTAND"),nzOnOk:()=>this.closeUpdateCanonicalModal()}))}updateContractSharedData(){const i=Date.now(),e=this.clientService.getContractSharedPermission(this.progressID).pipe((0,d.t)(this)).toPromise().then(n=>{if(n){this.isOwned=!1;const a=this.contractSharedData&&this.contractSharedData.progress.permission.level===g.V5g.Read&&n.progress.permission.level===g.V5g.Write;this.handleFinalization(n,i),this.contractSharedData&&this.contractSharedData.progress.canonical.version!==n.progress.canonical.version&&this.showCanoncialUpdateModal(),this.contractSharedData=n,this.isContractEditable=(!this.editor||this.editor.until<=0||this.editor.until>0&&this.editor.userID===this.userService.sessionUserID)&&(!this.contractSharedData||this.contractSharedData.progress.permission.level===g.V5g.Write)&&(!this.contractSharedData.progress.finalization||this.contractSharedData.progress.finalization.currentFieldChangeAllowance>0),(!this.editor||this.editor.until>0&&this.editor.userID!==this.userService.sessionUserID)&&Date.now()-this.lastFormUpdate>3e4&&this.jumpToStep(this.editingStep),a&&this.updateEditor(),this.name=n.progress.metadata.name?n.progress.metadata.name:n.displayElements.name,this.metadataService.setTranslateVariables({contractName:this.name}),this.contractService.getAvailableContracts().then(r=>{this.availableContracts=r,this.actContractResponse=this.availableContracts.find(l=>
1l.name===n.progress.canonical.name),this.actContractResponse&&(this.progressLanguage=this.actContractResponse.language,this.matchmakingCategory=this.actContractResponse.metadata.matchmaking)})}return Promise.resolve(n)},n=>Promise.reject(n));return this.getEditingStepFunction(this.progressID).pipe((0,d.t)(this)).subscribe(n=>{this.stepProgress=n.leadingStepID,this.stepHighestReached=n.leadingStepID,this.contractState.percentage=n.percentage,this.isContractComplete=!!n.conclusion},n=>{}),e}updateEditor(){(!this.contractSharedData||this.contractSharedData.progress.permission.level===g.V5g.Write)&&this.getEditorFunction(this.progressID).pipe((0,d.t)(this)).subscribe(i=>{const e=this.editor&&this.editor.until>0&&this.editor.userID!==this.userService.sessionUserID&&(i.until<=0||i.userID===this.userService.sessionUserID);if(this.editor=i,this.isEditedByOther=this.editor.until>0&&this.editor.userID!==this.userService.sessionUserID,this.isContractEditable=!(!(this.editor.until<=0||this.editor.until>0&&this.editor.userID===this.userService.sessionUserID)||this.contractSharedData&&this.contractSharedData.progress.permission.level!==g.V5g.Write||this.contract&&this.contract.progress.finalization&&!(this.contract.progress.finalization.currentFieldChangeAllowance>0)||this.contractSharedData&&this.contractSharedData.progress.finalization&&!(this.contractSharedData.progress.finalization.currentFieldChangeAllowance>0)),this.timeLeftEditing=Math.ceil(this.editor.until/1e3/60),this.editor.userID!==this.lastEditorID&&(this.userInfos.batchGetUserImgsByIds([this.editor.userID]),this.lastEditorID=this.editor.userID),this.editor.userID===this.userService.sessionUserID)this.editorName=this.editor.lock&&this.editor.until>0?"You":"",this.canRelease=this.editor.lock&&this.editor.until>0,this.canTakeover=!1;else{this.canRelease=!1,this.canTakeover=this.contract&&this.contract.progress.userID===this.userService.sessionUserID&&this.editor.until>0;const n=this.userInfos.userInformationsChanged.subscribe(a=>{if(a.has(this.editor.userID)&&a.get(this.editor.userID)){this.editorName=this.editor.lock&&this.editor.until>0?a.get(this.editor.userID).name:"";const o=this.chatService.chatSnippetList.find(r=>r.participants.find(l=>l.userID===this.editor.userID));this.editorChatID=o?o.chatID:void 0,n.unsubscribe()}});this.userInfos.batchGetUserNamesByIds([this.editor.userID])}e&&this.jumpToStep(this.editingStep)},i=>{})}releaseEditingJumpToTop(){this.releaseEditing(),window.scrollTo({top:0,behavior:"smooth"})}releaseEditing(){return this.clientService.getRelease(this.progressID).pipe((0,d.t)(this)).toPromise().then(()=>{this.updateEditor()},i=>{})}takeoverEditing(){this.clientService.getTakeover(this.progressID).pipe((0,d.t)(this)).subscribe(()=>{this.updateEditor()},i=>{})}createNewConversation(){this.chatService.createNewConversationWithUserID(this.editor.userID)}unloadNotification(i){this.canRelease&&(!this.contract||this.contract.progress.permissions)&&this.clientService.getRelease(this.progressID).toPromise().then(()=>f.R.editorDetailsEmitter.emit(null))}canDeactivate(){return this.canRelease&&(!this.contract||this.contract.progress.permissions)&&this.clientService.getRelease(this.progressID).toPromise().then(()=>f.R.editorDetailsEmitter.emit(null)),!0}openUserProfile(){this.modalService.publicProfileModal(this.editor.userID)}openContractCompleteModal(i){this.contractModalService.contractCompleteModal(this.name,this.progressID,i).afterClose.subscribe(()=>this.updateContractData())}jumpTOSegmentOrField(i){i.node.parentNode?this.jumpToField(Number(i.node.parentNode.key),Number(i.node.key)):this.jumpToSegment(Number(i.node.key)),this.setPopoverVisibility(!0)}setPopoverVisibility(i=!1){i&&(this.stepTitleClickPopoverVisible=Array(this.stepDisplayElements.length).fill(!1),this.stepDescriptionClickPopoverVisible=Array(this.stepDisplayElements.length).fill(!1)),this.stepTitleHoverPopoverVisible=Array(this.stepDisplayElements.length).fill(!1),this.stepDescriptionHoverPopoverVisible=Array(this.stepDisplayElements.length).fill(!1),this.continuePopoverVisible=!1,this.floatingContinuePopoverVisible=!1,this.keepPopoverOpen=!1,clearTimeout(this.popoverTimeout)}setSpinners(i){this.step.segments&&(this.isSpinning=Array(this.step.segments.length).fill(i))}
1setColoredBackground(i){this.segmentColoredBackground=Array(this.step.segments.length).fill(i),this.addonColoredBackground=i}changeStepTitleHoverPopoverVisibility(i,e){this.setPopoverVisibility(),this.popoverTimeout=setTimeout(()=>this.stepTitleHoverPopoverVisible[i]=e&&this.invalidFieldNodes.length>0,2e3)}changeStepDescriptionHoverPopoverVisibility(i,e){this.setPopoverVisibility(),this.popoverTimeout=setTimeout(()=>this.stepDescriptionHoverPopoverVisible[i]=e&&this.invalidFieldNodes.length>0,2e3)}changeStepTitleClickPopoverVisibility(i,e){setTimeout(()=>this.stepTitleClickPopoverVisible[i]=e&&this.invalidFieldNodes.length>0,0)}changeStepDescriptionClickPopoverVisibility(i,e){setTimeout(()=>this.stepDescriptionClickPopoverVisible[i]=e&&this.invalidFieldNodes.length>0,0)}saveContinueTouchStart(i){this.continueTouchStart=i}changeContinuePopoverVisibility(i,e=!1,n){(!n||this.continueTouchStart&&this.continueTouchStart.changedTouches.length>0&&n.changedTouches.length>0&&Math.abs(this.continueTouchStart.changedTouches[0].clientX-n.changedTouches[0].clientX)<5&&Math.abs(this.continueTouchStart.changedTouches[0].clientY-n.changedTouches[0].clientY)<5)&&(this.continuePopoverVisible||(this.setPopoverVisibility(),e?(this.continuePopoverVisible=i&&this.invalidFieldNodes.length>0,this.setKeepPopoverOpen(!0)):this.popoverTimeout=setTimeout(()=>this.continuePopoverVisible=i&&this.invalidFieldNodes.length>0,1e3))),this.continueTouchStart=null}saveFloatingContinueTouchStart(i){this.floatingContinueTouchStart=i}changeFloatingContinuePopoverVisibility(i,e=!1,n){(!n||this.floatingContinueTouchStart&&this.floatingContinueTouchStart.changedTouches.length>0&&n.changedTouches.length>0&&Math.abs(this.floatingContinueTouchStart.changedTouches[0].clientX-n.changedTouches[0].clientX)<5&&Math.abs(this.floatingContinueTouchStart.changedTouches[0].clientY-n.changedTouches[0].clientY)<5)&&(this.floatingContinuePopoverVisible||(this.setPopoverVisibility(),this.floatingContinuePopoverVisible=i&&this.invalidFieldNodes.length>0,e&&this.setKeepPopoverOpen(!0))),this.floatingContinueTouchStart=null}setKeepPopoverOpen(i){this.keepPopoverOpen=i}tryClosePopover(i){if(!this.keepPopoverOpen){let e=!0,n=i&&i.relatedTarget?i.relatedTarget:null;for(;n&&e;)e=!n.classList.contains("ant-popover")&&!n.classList.contains("cdk-overlay-pane"),n=n.parentElement;e&&this.setPopoverVisibility()}}addCustomClause(){this.isCustomClauseAdded=!0,this.addonColoredBackground=!0}removeCustomClause(){this.isCustomClauseAdded=!1,this.step.addon.fields.forEach(i=>{i.variableValue=null})}sendStashWithButton(i,e){this.stashSaveList.push({stashValue:i,segmentIndex:e}),this.lastRecursiveStashSavePromise||(this.lastRecursiveStashSavePromise=this.simplifyStashSaveList(!0),this.runNextFunction=this.lastRecursiveStashSavePromise,this.lastRecursiveStashSavePromise.then(()=>{this.lastRecursiveStashSavePromise=null},n=>{this.updateContractData()}))}simplifyStashSaveList(i=!1){for(;this.stashSaveList.length>1&&this.hasSameObjectKeysDeep(this.stashSaveList[0].stashValue,this.stashSaveList[1].stashValue);)this.stashSaveList.shift();return!this.lastStashSavePromise&&!this.lastStashSaveTimeout&&this.stashSaveList.length>0?(this.lastStashSaveData=this.stashSaveList[0].stashValue,this.lastStashSaveTimeoutStart=Date.now(),new Promise(n=>{this.lastStashSaveTimeout=setTimeout(()=>n(this.sendStash(this.stashSaveList[0].stashValue,this.stashSaveList[0].segmentIndex)),i?0:this.saveTimeoutDuration)})):0===this.stashSaveList.length?Promise.resolve():this.lastRecursiveStashSavePromise}sendStash(i,e){var n=this;if(this.isContractEditable&&(!this.editor||this.editor.until<=0))return"number"==typeof e&&(this.isSpinning=[...Array(e).fill(!1),...Array(this.step.segments.length-e).fill(!0)]),this.getEditUnlockedStepFunction(this.progressID,this.editingStep.toString()).pipe((0,d.t)(this)).toPromise().then(function(){var o=(0,L.Z)(function*(r){n.editingStep=r.stepID,n.stepProgress=r.leadingStepID,n.lastFormUpdate=Date.now(),n.updateEditor(),n.contractState.percentage=r.percentage,n.isContractComplete=!!r.conclusion;const l=n.postBatchFunction(n.progressID,i).pipe((0,d.t)(n)).toPromise();return l.then(_=>(n.handleSegments(_.updates,!0),n.setSpinners(!1),n.lastStashSavePromise=null,n.lastStashSaveTimeout=null,n.lastStashSaveTimeoutStart=null,n.lastStashSaveData&&n.lastStashSaveData[0]&&n.lastStashSaveData===n.stashSaveList[0].stashValue&&n.stashSaveList.shift(),n.updateContractData(),n.simplifyStashSaveList()),_=>(console.log(_),n.setSpinners(!1),n.lastStashSavePromise=null,n.lastStashSaveTimeout=null,n.lastStashSaveTimeoutStart=null,n.lastStashSaveData&&n.lastStashSaveData[0]&&n.lastStashSaveData===n.lastStashSaveData[0].stashValue&&(400===_.status||423===_.status)&&(n.stashSaveList.shift(),423===_.status&&n.nzMessageService.error(n.translate.instant("CLIENT.CONTRACTS.ALLOWED_MODIFICATION_EXCEEDS_LIMIT"))),n.updateContractData(),n.simplifyStashSaveList())),l});return function(r){return o.apply(this,arguments)}}(),o=>(this.setSpinners(!1),this.lastStashSavePromise=null,this.lastStashSaveTimeout=null,this.lastStashSaveTimeoutStart=null,this.simplifyStashSaveList()));if(this.isContractEditable){"number"==typeof e&&(this.isSpinning=[...Array(e).fill(!1),...Array(this.step.segments.length-e).fill(!0)]);const a=this.postBatchFunction(this.progressID,i).pipe((0,d.t)(this)).toPromise();return a.then(o=>(this.handleSegments(o.updates,!0),this.setSpinners(!1),this.lastStashSavePromise=null,this.lastStashSaveTimeout=null,this.lastStashSaveTimeoutStart=null,this.lastStashSaveData&&this.lastStashSaveData[0]&&this.lastStashSaveData===this.stashSaveList[0].stashValue&&this.stashSaveList.shift(),this.updateContractData(),this.simplifyStashSaveList()),o=>(console.log(o),this.setSpinners(!1),this.lastStashSavePromise=null,this.lastStashSaveTimeout=null,this.lastStashSaveTimeoutStart=null,this.lastStashSaveData&&this.lastStashSaveData[0]&&this.lastStashSaveData===this.lastStashSaveData[0].stashValue&&(400===o.status||423===o.status)&&(this.stashSaveList.shift(),423===o.status&&this.nzMessageService.error(this.translate.instant("CLIENT.CONTRACTS.ALLOWED_MODIFICATION_EXCEEDS_LIMIT"))),this.updateContractData(),this.simplifyStashSaveList())),a}}editorAffixChange(i){this.editorAffixStick=!i.visible}setContractIconHidden(i){this.contractIconHidden=i}focusChange(i,e){this.onlyOneNonBooleanFieldEdited=i.change&&1===this.missingNonBooleanFields.length&&this.missingNonBooleanFields[0].segmentIndex===e&&(0===this.missingNonBooleanFields[0].invalidEnsures.length&&1===this.missingNonBooleanFields[0].invalidIndexes.length&&this.missingNonBooleanFields[0].invalidIndexes[0]===i.fieldIndex||0===this.missingNonBooleanFields[0].invalidIndexes.length&&1===this.missingNonBooleanFields[0].invalidEnsures.length&&this.missingNonBooleanFields[0].invalidEnsures[0].includes(i.fieldIndex)),this.focusedField=i.change?("number"==typeof e?this.step.segments[e]:this.step.addon).fields[i.fieldIndex]:null,i.change&&this.firstLimitedModification&&(this.firstLimitedModification=!1,this.notificationService.addNotif("info-circle",new z.n0("CLIENT.CONTRACTS.ALLOWED_MODIFICATIONS_TIME_EXPIRED_TITLE",{name:this.name}),new z.n0("CLIENT.CONTRACTS.ALLOWED_MODIFICATIONS_TIME_EXPIRED_DESCRIPTION"),z.V1.LONG,z.C7.DANGER))}updateContinueText(){this.continueText=this.defaultContinueText&&this.successContinueText&&this.workingContinueText?new E.PR(this.defaultContinueText,this.workingContinueText,this.successContinueText,"CLIENT.CONTRACTS.NEXT.BUTTON_STATES.FAILED"):new E.PR("CLIENT.CONTRACTS.NEXT.BUTTON_STATES.CONTINUE","CLIENT.CONTRACTS.NEXT.BUTTON_STATES.SAVING","CLIENT.CONTRACTS.NEXT.BUTTON_STATES.SAVED","CLIENT.CONTRACTS.NEXT.BUTTON_STATES.FAILED")}parseFormDisplayMarkdown(){this.contractFormDisplay&&this.contractFormDisplay.brief&&(this.contractFormBrief=this.v1ContractFormService.parseMarkdownText(this.contractFormDisplay.brief)),this.contractFormDisplay&&this.contractFormDisplay.description&&(this.contractFormDescription=this.v1ContractFormService.parseMarkdownText(this.contractFormDisplay.description)),this.contractFormDisplay&&this.contractFormDisplay.editor&&this.contractFormDisplay.editor.helper.title&&(this.contractFormEditorHelperTitle=this.v1ContractFormService.parseMarkdownText(this.contractFormDisplay.editor.helper.title)),this.contractFormDisplay&&this.contractFormDisplay.editor&&this.contractFormDisplay.editor.helper.content&&(this.contractFormEditorHelperContent=this.v1ContractFormService.parseMarkdownText(this.contractFormDisplay.editor.helper.content))}scrollTo(i,e,n){let a=document.documentElement;if(n&&(a=n),0===a.scrollTop){const o=a.scrollTop;++a.scrollTop,a=o+1===a.scrollTop--?a:document.body}this.scrollToC(a,a.scrollTop,i,e)}scrollToC(i,e,n,a){a<=0||("object"==typeof e&&(e=e.offsetTop),"object"==typeof n&&(n=n.offsetTop),this.autoScrollInProgress=!0,this.scrollToX(i,e,n,0,1/a,20,this.easeOutCuaic))}scrollToX(i,e,n,a,o,r,l){if(a<0||a>1||o<=0)return i.scrollTop=n,this.autoScrollInProgress=!1,void(this.autoScrollAborted=!1);i.scrollTop=e-(e-n)*l(a),a+=o*r,this.autoScrollAborted?this.autoScrollAborted=!1:setTimeout(()=>{this.scrollToX(i,e,n,a,o,r,l)},r)}easeOutCuaic(i){return--i*i*i+1}setMouseOverSteps(i){this.mouseOverSteps=i,i||this.hideDescriptions()}setMouseOverStep(i,e){this.mouseOverStep[i]=e}hideDescriptions(){this.mouseOverStep=Array(this.stepDisplayElements.length).fill(!1)}clickedMultiStateButton(){this.isStepValid||this.onlyBooleanMissing||this.onlyOneNonBooleanFieldEdited?(this.stepChangeInProgress=!1,this.runNextFunction=this.next()):f.R.updateV
1alidityEmitter.emit(this.step.segments[this.step.segments.length-1])}goToContract(i){this.routerService.routeToContract(i,this.isOwned)}setTutorialVisible(i){this.tutorialVisible=i}checkUnicreditPayment(){const i=localStorage.getItem(b.B.pendingPayment);if(i&&this.name){const e=JSON.parse(i);this.openContractCompleteModal(e.transactionID)}}onStepsResize(i){this.stepsWidth=i.newRect.width}onFormResize(i){this.formWidth=i.newRect.width}updateAutomaticProofing(){this.proofingUpdateEmitter.emit(!0)}trackBySegment(i,e){return e.ordinal}trackByStepDisplayElement(i,e){return e.title}disableSavingTutorial(){localStorage.setItem(b.B.understandSavingTooltip,JSON.stringify(!0)),this.understandSavingTooltip=!0,this.savingTutorialVisible=!1}onSegmentRender(i,e){e?this.segmentRenderTimer=(0,v.H)(200).pipe((0,d.t)(this)).subscribe(n=>{(i<this.minRenderedSegment||this.isRendered[i-1]&&this.step&&this.step.segments&&this.step.segments.length>i)&&(this.isRendered[i]=e)}):this.isRendered[i]=!1}updateHistory(){this.clientService.getContractHistoryById(this.progressID).pipe((0,d.t)(this)).subscribe(i=>{i.sort((n,a)=>n.historyNumber.primary<a.historyNumber.primary?1:-1).slice(0,10).find(n=>(this.latestCanonicalChange=n.changes.find(a=>a.type===g.bfP.CANONICAL),this.latestCanonicalChange))},i=>{})}};x.\u0275fac=function(i){return new(i||x)(t.Y36(rt.dD),t.Y36(lt.Sf),t.Y36(R.gz),t.Y36(k.sK),t.Y36(ct.a),t.Y36(_t.y),t.Y36(pt.g),t.Y36(dt.Z),t.Y36(mt.a),t.Y36(ht.c),t.Y36(ut.K),t.Y36(f.R),t.Y36(t.Qsj),t.Y36(gt.w),t.Y36(R.F0),t.Y36(Ct.W),t.Y36(ft.J),t.Y36(A.z),t.Y36(vt.g),t.Y36(Tt.h),t.Y36(St.m),t.Y36(F.j),t.Y36(xt.D))},x.\u0275cmp=t.Xpm({type:x,selectors:[["app-contract"]],viewQuery:function(i,e){if(1&i&&(t.Gf(te,5),t.Gf(ee,5),t.Gf(ne,5),t.Gf(ie,5),t.Gf(se,5),t.Gf(oe,5)),2&i){let n;t.iGM(n=t.CRH())&&(e.footerdivider=n.first),t.iGM(n=t.CRH())&&(e.segmentsDiv=n.first),t.iGM(n=t.CRH())&&(e.editorDetails=n.first),t.iGM(n=t.CRH())&&(e.defaultContinueText=n.first),t.iGM(n=t.CRH())&&(e.successContinueText=n.first),t.iGM(n=t.CRH())&&(e.workingContinueText=n.first)}},hostBindings:function(i,e){1&i&&t.NdJ("beforeunload",function(a){return e.unloadNotification(a)},!1,t.Jf7)},inputs:{isDemo:"isDemo",demoSimplebar:"demoSimplebar"},features:[t._Bn([A.z])],ngContentSelectors:["*"],decls:31,vars:14,consts:[["id","contract-height",1,"container-fluid","p-h-0","p-v-20","h-100","contractContainer"],[1,"row","m-h-0"],[1,"col-12"],[1,"contractContainerCard",3,"ngStyle","nzBodyStyle"],["percentText",""],[1,"d-flex","justify-content-between","contractHeader"],[1,"contractInfo","position-relative","w-100"],["class","media align-items-center pr-0 pr-sm-3 mobile-flex-wrap text-xs-center text-sm-left justify-content-center justify-content-sm-start w-100",4,"ngIf"],["class","media align-items-center pr-0 pr-sm-3 mobile-flex-wrap text-xs-center text-sm-left justify-content-center justify-content-sm-start",4,"ngIf"],["class","progressInfo position-relative",4,"ngIf"],[1,"m-t-40","row"],["class","col-xs-12 col-md-3",4,"ngIf"],["nzDirection","vertical","class","col-xs-12 col-md-3 stepsWithSticky",3,"nzCurrent","nzIndexChange","mouseover","mouseleave","resized",4,"ngIf"],[1,"col-xs-12","col-md-9","pr-0",3,"resized"],[1,"position-relative"],["class","w-100 z-index-1",4,"ngIf"],[4,"ngIf"],[1,"position-relative","col-xs-12","col-md-3"],[3,"isContractComplete","progressID","updateAutomaticProofing",4,"ngIf"],["class","feedback-positioning",3,"feature","unit","aspect","title",4,"ngIf"],["contentTemplate",""],["footerdivider",""],["defaultContinueText",""],["successContinueText",""],["workingContinueText",""],["class","color-quinary",4,"ngIf"],[1,"color-quinary"],[1,"media","align-items-center","pr-0","pr-sm-3","mobile-flex-wrap","text-xs-center","text-sm-left","justify-content-center","justify-content-sm-start","w-100"],[1,"pr-0","m-b-1","ng-star-inserted"],["nzType","avatar","nzShape","circle","nzSize","large",3,"nzSize","nzActive"],[1,"m-l-10","skeleton-400-width","p-r-10"],["nzType","input","nzSize","default",1,"p-b-10","w-100",3,"nzActive"],["nzType","input","nzSize","default",1,"p-b-10","w-80",3,"nzActive"],["nzType","input","nzSize","small",1,"p-b-10","w-100",3,"nzActive"],["nzType","input","nzSize","small",1,"p-b-10","w-80",3,"nzActive"],[1,"media","align-items-center","pr-0","pr-sm-3","mobile-flex-wrap","text-xs-center","text-sm-left","justify-content-center","justify-content-sm-start"],[1,"position-relative","media","align-items-center"],["class","ant-skeleton-header pr-0 mb
1-2 ng-star-inserted",4,"ngIf"],["alt","image",2,"width","150px",3,"hidden","src","load"],[1,"m-l-10"],[1,"h4"],["nz-tooltip","","appTutorial","","nzTooltipOverlayClassName","blueTooltip",3,"contractName","contractID","nzTooltipTitle","tutorialVisible","nzTooltipPlacement","isDemo","isEditedByOther","isOwned","isEditable","tutorialVisibleChange","click",4,"ngIf"],[1,"m-b-0"],["nzType","link",1,"color-primary","link-like-button","text-left","background-color-unset","brand-primary-active-hover","border-0",3,"click"],[1,"listWithMargin","descriptionContent",3,"innerHTML"],["nz-icon","","nzType","question-circle","theme","outline",1,"m-l-5"],[1,"ant-skeleton-header","pr-0","mb-2","ng-star-inserted"],["nzType","avatar",3,"hidden","nzSize","nzActive"],["nz-tooltip","","appTutorial","","nzTooltipOverlayClassName","blueTooltip",3,"contractName","contractID","nzTooltipTitle","tutorialVisible","nzTooltipPlacement","isDemo","isEditedByOther","isOwned","isEditable","tutorialVisibleChange","click"],[1,"progressInfo","position-relative"],["inViewport","",3,"inViewportOptions","inViewportAction"],["class","editorAffix",4,"ngIf"],["editorDetails",""],["class","d-flex align-items-center m-t-10 flex-wrap-reverse",4,"ngIf"],[1,"editorAffix"],["class","template",4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"template"],[1,"editorAffixContent",3,"ngClass"],["class","editorAffixContent",3,"ngClass",4,"ngIf"],[1,"text-right"],["nzSize","small",3,"class",4,"ngIf"],["class","progressLine","nzSize","small",3,"nzPercent","nzFormat","nzStrokeColor",4,"ngIf"],["class","text-right allowedModificationsLeft",3,"ngClass",4,"ngIf"],["modificationLeftTemplate",""],["percentFormat",""],[3,"class","ngClass",4,"ngIf"],["class","editorPanel",3,"nzTitle","nzAvatar","nzDescription","ngClass",4,"ngIf"],[3,"ngClass",4,"ngIf"],[3,"ngClass"],["alt","Contract icon",1,"contractIcon",3,"hidden","src"],[1,"editorPanel",3,"nzTitle","nzAvatar","nzDescription","ngClass"],["nzTitle",""],["nzDescription",""],["avatarTemplate",""],["editorSetting","nzDropdownMenu"],["nz-menu",""],["nz-menu-item","",3,"click"],["nz-menu-item","",3,"click",4,"ngIf"],["href","",1,"font-size-15"],["nzTooltipPlacement","topRight","nz-tooltip","",3,"nzTooltipTitle"],["editorNameTemplate",""],["nz-tooltip","",3,"nzTooltipTitle"],["nz-button","","nzType","link",1,"link-like-button"],["nz-icon","","nzType","question-circle","theme","outline"],["nzSize","default","nzIcon","user","nz-dropdown","","nzPlacement","bottomRight",3,"nzSrc","nzDropdownMenu","nzTrigger","nzDisabled"],["nz-popover","","nzPopoverPlacement","bottomRight",3,"nzPopoverContent","nzPopoverTrigger","nzPopoverVisible","nzPopoverOverlayClassName","mouseenter","mouseleave"],["savingTutorialTemplate",""],["nzType","primary","nz-tooltip","","appTutorial","","nzTooltipColor","default",3,"hidden","nzSize","nzGhost","nzTextKeys","runFunction","stickResult","nzTooltipTitle","tutorialVisible","duration","nzTooltipTrigger","nzTooltipPlacement","ngClass","touchend","touchstart","tutorialVisibleChange","click"],["smallMultiStateButton",""],[1,"text-center"],["nz-button","","nzType","link",1,"color-secondary","d-inline-block","link-like-button",3,"click"],["nz-button","","nz-tooltip","",3,"class","nzSize","ngClass","nzTooltipTitle","click",4,"ngIf"],["nz-button","","nz-popconfirm","","nzPopconfirmPlacement","rightBottom",3,"class","nzSize","nzPopconfirmTitle","ngClass","nzCancelText","nzOkText","nzOnConfirm",4,"ngIf"],["nz-button","",3,"nzSize","class","ngClass","click",4,"ngIf"],["nz-button","","nz-tooltip","",3,"nzSize","ngClass","nzTooltipTitle","click"],["nz-button","","nz-popconfirm","","nzPopconfirmPlacement","rightBottom",3,"nzSize","nzPopconfirmTitle","ngClass","nzCancelText","nzOkText","nzOnConfirm"],["nz-button","",3,"nzSize","ngClass","click"],["nz-icon","","nzType","file-protect","theme","outline"],["nzSize","small"],["class","col-auto","nz-button","","nz-tooltip","",3,"nzSize","nzTooltipTitle","click",4,"ngIf"],["class","col-auto","nz-button","","nz-popconfirm","","nzPopconfirmPlacement","rightBottom",3,"nzSize","nzPopconfirmTitle","nzCancelText","nzOkText","nzOnConfirm",4,"ngIf"],["nz-button","","nzSize","small",3,"click",4,"ngIf"],["style","margin: 0px !important","nz-button","","nzSize","small",3,"click",4,"ngIf"],["nz-button","","nz-tooltip","",1,"col-auto",3,"nzSize","nzTooltipTitle","click"],["nz-button","","nz-popconfirm","","nzPopconfirmPlacement","rightBottom",1,"col-auto",3,"nzSize","nzPopconfirmTitle","nzCancelText","nzOkText","nzOnConfirm"],["nz-button","","nzSize","small",3,"click"],["nz-icon","","nzType","share-alt","theme","outline"],["nz-icon","","nzType","copy","theme","outline"],["nz-button","","nzSize","small",2,"margin","0px !important",3,"click"],["nzSize","small",1,"progressLine",3,"nzPercent","nzFormat","nzStrokeColor"],[1,"text-right","allowedModificationsLeft",3,"ngClass"],[1,"ant-progress-text","m-l-0"],["nz-tooltip","",1,"text-center","text-sm-right","d-block","white-space-breakspaces","mt-3","mt-sm-0",3,"nzTooltipTitle"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"d-flex","align-items-center","m-t-10","flex-wrap-reverse"],[3,"contract","showNotShared",4,"ngIf"],["class","white-space-normal text-center m-l-auto m-b-0",3,"nzColor",4,"ngIf"],[3,"contract","showNotShared"],[1,"white-space-normal","text-center","m-l-auto","m-b-0",3,"nzColor"],[1,"col-xs-12","col-md-3"],["class","w-100",4,"ngFor","ngForOf"],[1,"w-100"],[1,"ant-skeleton-header","ng-star-inserted"],["nzType","avatar","nzSize","large",3,"nzActive"],[1,"ant-skeleton-content","ng-star-inserted"],["class","p-b-10 w-100","nzType","input","nzSize","small",3,"nzActive",4,"ngFor","ngForOf"],["nzDirection","vertical",1,"col-xs-12","col-md-3","stepsWithSticky",3,"nzCurrent","nzIndexChange","mouseover","mouseleave","resized"],["class","cursorPointer","nz-popconfirm","","nzPopconfirmPlacement","bottom","nzPopconfirmOverlayClassName","demoPopconfirm",3,"nzTitle","nzDescription","nzDisabled","nzStatus","nzIcon","ngClass","nzPopconfirmTitle","nzCancelText","nzOkText","nzCondition","mouseover","nzOnConfirm",4,"ngFor","ngForOf","ngForTrackBy"],[1,"stickyContractBuildingIconContainer","font-size-base","text-center"],[1,"stickyContractBuildingIcon",3,"percent"],[1,"m-t-10"],["nz-popconfirm","","nzPopconfirmPlacement","bottom","nzPopconfirmOverlayClassName","demoPopconfirm",1,"curs
1orPointer",3,"nzTitle","nzDescription","nzDisabled","nzStatus","nzIcon","ngClass","nzPopconfirmTitle","nzCancelText","nzOkText","nzCondition","mouseover","nzOnConfirm"],["titleTemplate",""],["descriptionTemplate",""],["nz-popover","","nzPopoverPlacement","right",1,"popoverDiv",3,"nzPopoverTrigger","nzPopoverContent","nzPopoverMouseEnterDelay","nzPopoverVisible","nzPopoverOverlayClassName","nzPopoverVisibleChange","mouseenter","mouseleave"],["nz-popover","","nzPopoverPlacement","right","nzPopoverTrigger","click",1,"popoverDiv",3,"nzPopoverContent","nzPopoverMouseEnterDelay","nzPopoverVisible","nzPopoverOverlayClassName","nzPopoverVisibleChange"],[1,"w-100","z-index-1"],[1,"media","align-items-center","w-100"],[1,"ant-skeleton-content","ng-star-inserted","w-100"],["id","stepHeader","class","w-100",4,"ngIf"],[4,"ngFor","ngForOf"],["id","stepHeader",1,"w-100"],["stepHeader",""],["nzType","input","nzSize","large",1,"p-b-20","w-50",3,"nzActive"],["nzType","input","nzSize","small",1,"p-b-10","w-40",3,"nzActive"],["nzType","input","nzSize","default",1,"p-b-10","w-60",3,"nzActive"],["id","stepHeader",1,"site-page-header"],["id","segmentsDiv"],["segmentsDiv",""],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"segment","isCustomClause","isContractEditable","isEditedByOther","isOwned","coloredBackground","progressLanguage","progressID","contractTitle","stepTitle","isDemo","formWidth","matchmakingCategory","validityChange","variablesChange","removedCustomClause","selectedStashEmitter","focusEmitter",4,"ngIf"],[1,"buttonDiv"],["class","popoverDiv m-10","nz-popover","","nzPopoverPlacement","top",3,"nzPopoverContent","nzPopoverTrigger","nzPopoverVisible","nzPopoverOverlayClassName","ngClass","nzPopoverVisibleChange","mouseenter","mouseleave",4,"ngIf"],["nz-button","","nz-tooltip","","nzTooltipPlacement","top","class","m-10",3,"disabled","nzTooltipTitle","click",4,"ngIf"],["nz-button","","nzType","primary","class","button-text-wrap m-10","nz-tooltip","","nzTooltipTrigger","click",3,"nzTooltipTitle","click",4,"ngIf"],["class","w-100 text-right",4,"ngIf"],["nz-row",""],[1,"content"],["nz-paragraph",""],["class","segmentSpinner",3,"nzSpinning",4,"ngIf"],[1,"segmentSpinner",3,"nzSpinning"],[3,"canonical","segment","isCustomClause","isContractEditable","isEditedByOther","isOwned","coloredBackground","progressLanguage","progressID","contractTitle","stepTitle","isDemo","showSendSuggestions","formWidth","matchmakingCategory","validityChange","variablesChange","selectedStashEmitter","focusEmitter","inputCompleteEmitter","rendered"],[1,"code-box","expand","skeleton-code-box"],[1,"markdown"],[1,"code-box-title","w-40"],["nzType","input","nzSize","small",1,"w-100",3,"nzActive"],[1,"code-box-description"],[1,"row"],[1,"col-3"],["nzType","input","nzSize","small",1,"p-b-10","w-90",3,"nzActive"],[1,"col-6"],[1,"highlight-wrapper"],[1,"highlight","m-t-5"],[3,"segment","isCustomClause","isContractEditable","isEditedByOther","isOwned","coloredBackground","progressLanguage","progressID","contractTitle","stepTitle","isDemo","formWidth","matchmakingCategory","validityChange","variablesChange","removedCustomClause","selectedStashEmitter","focusEmitter"],["nz-popover","","nzPopoverPlacement","top",1,"popoverDiv","m-10",3,"nzPopoverContent","nzPopoverTrigger","nzPopoverVisible","nzPopoverOverlayClassName","ngClass","nzPopoverVisibleChange","mouseenter","mouseleave"],["nzType","primary",1,"defaultMultiStateButton","text-right","m-t-30","m-10",3,"hidden","nzGhost","nzTextKeys","runFunction","ngClass","stickResult","touchend","touchstart","click"],["defaultMultiStateButton",""],["nz-button","","nzType","primary","class","brand-success-bg-border button-text-wrap m-10",3,"click",4,"ngIf"],["class","text-center font-size-smaller m-t-10",4,"ngIf"],["nz-button","","nzType","primary",1,"brand-success-bg-border","button-text-wrap","m-10",3,"click"],[1,"text-center","font-size-smaller","m-t-10"],["nz-button","","nz-tooltip","","nzTooltipPlacement","top",1,"m-10",3,"disabled","nzTooltipTitle","click"],["nz-icon","","nzType","solution","theme","outline"],["nz-button","","nzType","primary","nz-tooltip","","nzTooltipTrigger","click",1,"button-text-wrap","m-10",3,"nzTooltipTitle","click"],[1,"w-100","text-right"],[1,"d-inline-block","progressInfo","position-relative"],[1,"m-t-25","text-left"],[1,"code-box","expand"],[1,"segmentInfoBox",3,"nzTitle","nzDescription"],["nz-icon","","nzType","bulb","nzTheme","outline"],[3,"isContractComplete","progressID","updateAutomaticProofing"],[1,"feedback-positioning",3,"feature","unit","as
1pect","title"],["class","popoverPadding",3,"mouseleave",4,"ngIf"],[1,"popoverPadding",3,"mouseleave"],[1,"m-b-10",2,"max-width","fit-content"],["nzShowIcon","",3,"nzData","nzSelectedKeys","nzClick","nzExpandChange"],["dividerText",""],["nzOrientation","left",3,"nzText"],["nz-row","","nzJustify","start"],[1,"row","w-100","justify-content-end"],[1,"feedback-positioning",3,"feature","unit","title"],[1,"white-space-normal"]],template:function(i,e){1&i&&(t.F$t(),t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"nz-card",3),t.YNc(4,ce,3,3,"ng-template",null,4,t.W1O),t.TgZ(6,"div",5)(7,"div",6),t.YNc(8,_e,9,7,"div",7),t.YNc(9,he,18,23,"div",8),t.qZA(),t.YNc(10,Tn,8,10,"div",9),t.qZA(),t.TgZ(11,"div",10),t.YNc(12,En,3,4,"div",11),t.YNc(13,Nn,6,9,"nz-steps",12),t.TgZ(14,"div",13),t.NdJ("resized",function(a){return e.onFormResize(a)}),t.TgZ(15,"div",14),t.YNc(16,wn,6,5,"div",15),t.YNc(17,ti,15,10,"div",16),t.qZA()(),t.TgZ(18,"div",17),t.YNc(19,ei,1,3,"app-proofing",18),t.qZA()(),t.YNc(20,ii,2,9,"app-feedback",19),t.qZA()()()(),t.YNc(21,ai,1,1,"ng-template",null,20,t.W1O),t.YNc(23,ci,10,10,"ng-template",null,21,t.W1O),t.YNc(25,hi,2,2,"ng-template",null,22,t.W1O),t.YNc(27,Ci,2,2,"ng-template",null,23,t.W1O),t.YNc(29,Ti,2,2,"ng-template",null,24,t.W1O)),2&i&&(t.xp6(3),t.Q6J("ngStyle",t.VKq(11,Si,e.isDemo?"0px":""))("nzBodyStyle",t.DdM(13,xi)),t.xp6(5),t.Q6J("ngIf",!e.contractFormDisplay),t.xp6(1),t.Q6J("ngIf",e.contractFormDisplay),t.xp6(1),t.Q6J("ngIf",e.contractState),t.xp6(2),t.Q6J("ngIf",!e.stepDisplayElements||0===e.stepDisplayElements.length),t.xp6(1),t.Q6J("ngIf",e.stepDisplayElements&&e.stepDisplayElements.length>0),t.xp6(3),t.Q6J("ngIf",!e.step||!e.step.segments),t.xp6(1),t.Q6J("ngIf",e.step&&e.step.segments),t.xp6(2),t.Q6J("ngIf",e.EnvironmentService.config.proofingEnabled&&e.isLawyer&&e.contract),t.xp6(1),t.Q6J("ngIf",!e.isDemo))},dependencies:[Et.I,Ot.wt,O.mk,O.sg,O.O5,O.tP,O.PC,Pt.X,It.a5,E.P4,zt.O,Dt.Dz,Z.ix,Z.fY,At.w,Nt.dQ,bt.bd,Mt.g,B.wO,B.r9,U.cm,U.RR,yt.SK,Lt.Ls,wt.yi,M.$O,M.u9,M.u5,Rt.M,kt.JW,Ft.lU,y.Xw,y.yx,y.yg,Zt.W,V.iy,V.$W,Bt.j,Ut.SY,Vt.Hc,Jt.ZU,Kt.r,Ht._,Qt.G,Gt.s,Wt._,O.JJ,k.X$,F.j,A.z,Yt.Y,jt.N,qt.L,Xt.y,$t.A],styles:['@charset "UTF-8";.brand-success[_ngcontent-%COMP%]{color:#92ddea!important}.brand-failure[_ngcontent-%COMP%]{color:#9579d1!important}.brand-red[_ngcontent-%COMP%]{color:#de4436!important}.brand-success-bg-border[_ngcontent-%COMP%]{background-color:#92ddea!important;border-color:#92ddea!important;color:#fff!important}.brand-failure-bg-border[_ngcontent-%COMP%]{background-color:#ffa5d8!important;border-color:#ffa5d8!important;color:#fff!important}.popoverDiv[_ngcontent-%COMP%]{width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content;display:inline-block}.buttonDiv[_ngcontent-%COMP%]{width:100%;text-align:center}nz-tag[_ngcontent-%COMP%]{height:auto;display:flex}.inlineBlock[_ngcontent-%COMP%]{display:inline-block}.progressInfo[_ngcontent-%COMP%]{min-width:300px;width:50%;vertical-align:top;flex-grow:1}[_nghost-%COMP%]     .ant-affix{z-index:1000!important;background-color:#fff}  .vertical-center-modal{display:flex;align-items:center;justify-content:center}  .vertical-center-modal .ant-modal{top:0}.editorAffixStick[_ngcontent-%COMP%]{width:100%;max-width:1060px;display:flex;justify-content:space-between;z-index:1}.editorAffixStick[_ngcontent-%COMP%] > nz-progress[_ngcontent-%COMP%]{width:100%;position:absolute;left:0;top:55px}.editorAffixStick[_ngcontent-%COMP%] >   nz-progress .ant-progress-outer{padding-right:0}.editorAffixStick[_ngcontent-%COMP%] >   nz-progress .ant-progress-text{width:auto;float:right;background:white;padding:3px;margin-top:-6px}.editorAffix[_ngcontent-%COMP%]   .editorAffixContent[_ngcontent-%COMP%]{opacity:1!important;display:block!important}.editorAffixStick[_ngcontent-%COMP%]     .smartButton span{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.line-clamp-override[_ngcontent-%COMP%]     .smartButton span{-webkit-line-clamp:2!important}
1.editorPanel[_ngcontent-%COMP%]{min-width:200px;align-items:center;display:inline-flex;flex-grow:1}.progressLine[_ngcontent-%COMP%]{width:calc(100% + 30px)}[_nghost-%COMP%]   .progressLine[_ngcontent-%COMP%]     .ant-progress-line>div{display:flex}[_nghost-%COMP%]   .progressLine[_ngcontent-%COMP%]     .ant-progress-text{width:auto;margin-top:auto;margin-bottom:auto}.editorAffixStick[_ngcontent-%COMP%]   .progressLine[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.stickyContractBuildingIconContainer[_ngcontent-%COMP%]{width:100%}.stickyContractBuildingIcon[_ngcontent-%COMP%]{width:170px;max-width:100%;margin:auto;display:block}@media (min-width: 768px){.stickyContractBuildingIconContainer[_ngcontent-%COMP%]{position:sticky;top:170px;z-index:500;background-color:#fff;padding-top:10px;display:block}}@media (min-width: 767px){.stickyStep[_ngcontent-%COMP%]{position:sticky;top:70px;bottom:0;z-index:500;background-color:#fff;padding-top:10px}[_nghost-%COMP%]     .ant-steps-vertical>.stickyStep>  .ant-steps-item-container>  .ant-steps-item-tail{padding-top:48px}}[_nghost-%COMP%]     .stepsWithSticky{display:block}[_nghost-%COMP%]     .stepsWithSticky .ant-steps-item{flex-grow:0!important}.skeleton-code-box[_ngcontent-%COMP%]{margin-top:-5px;margin-bottom:0}[_nghost-%COMP%]     .ant-steps-item-process>.ant-steps-item-container>.ant-steps-item-icon{background-color:#9579d1}@media (min-width: 445px){.defaultMultiStateButton[_ngcontent-%COMP%]     .smartButton{min-width:330px}.smallMultiStateButton[_ngcontent-%COMP%]     .smartButton{min-width:320px}}@media (max-width: 444.98px){.defaultMultiStateButton[_ngcontent-%COMP%]     .smartButton{width:calc(100% - 20px)}.defaultMultiStateButton[_ngcontent-%COMP%]     .smartButton span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.smallMultiStateButton[_ngcontent-%COMP%]     .smartButton{width:calc(100% - 20px)}}.editorAffixStick[_ngcontent-%COMP%]   .smallMultiStateButton[_ngcontent-%COMP%]     .smartButton{min-width:100px;width:100%;max-width:320px;display:flex;justify-content:center}.resizeSmartButton[_ngcontent-%COMP%]{flex-shrink:1;flex-grow:1;max-width:350px;height:-moz-fit-content;height:fit-content}@media (max-width: 959.98px){.contractHeader[_ngcontent-%COMP%]{flex-wrap:wrap}}.contractInfo[_ngcontent-%COMP%]{flex-grow:1}.contractIcon[_ngcontent-%COMP%]{padding-left:7px;padding-right:7px;height:60px;margin-top:-10px}.contractIconContainer[_ngcontent-%COMP%]{height:40px;margin-top:auto;margin-bottom:auto}.allowedModificationsLeft[_ngcontent-%COMP%]{font-size:smaller}.allowedModificationsLeft[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{width:auto}.blinkingMultiStateButtonDiv[_ngcontent-%COMP%]{max-width:500px;width:100%}.blinkingMultiStateButton.defaultMultiStateButton[_ngcontent-%COMP%]     .smartButton{width:calc(100% - 20px)}.defaultMultiStateButton[_ngcontent-%COMP%]     .smartButton .contentSpan{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.blinkingMultiStateButton[_ngcontent-%COMP%]     .smartButton{border:1px solid;animation:blinkingButton 3s infinite linear}@keyframes blinkingButton{0%{background-color:#9579d1}50%{background-color:#b89888}to{background-color:#9579d1}}.cursorPointer[_ngcontent-%COMP%]{cursor:pointer}  .demoContractDetailsModal{overflow-x:hidden}@media (max-width: 575.98px){.mobile-flex-wrap[_ngcontent-%COMP%]{flex-wrap:wrap}[_nghost-%COMP%]   .progressLine[_ngcontent-%COMP%]     .ant-progress-line>div{flex-wrap:wrap}[_nghost-%COMP%]   .progressLine[_ngcontent-%COMP%]     .ant-progress-line>div>.ant-progress-outer{padding:0;margin:0}}@media (max-width: 575.98px){.progressInfo[_ngcontent-%COMP%]{min-width:0!important;min-width:initial!important}}.skeleton-400-width[_ngcontent-%COMP%]{width:400px}.skeleton-img-size[_ngcontent-%COMP%]{width:130px}@media (max-width: 1098.98px){.remove-contract-icon[_ngcontent-%COMP%]{display:none}}@media (min-width: 1200px) and (max-width: 1229.98px){.remove-contract-icon-client[_ngcontent-%COMP%]{display:none}}.segmentSpinner[_ngcontent-%COMP%]     .ant-spin-container.ant-spin-blur{overflow:visible;overflow:initial}.customIconStep.ant-steps-item-custom[_ngcontent-%COMP%]     .ant-steps-item-icon{border:1px solid #9579d1;width:2rem;height:2rem;line-height:2rem;border-radius:2rem}.customIconStep.ant-steps-item-custom[_ngcontent-%COMP%]     .ant-steps-item-icon>.ant-steps-icon{color:#9579d1;font-size:16px}.customIconStep.ant-steps-item-custom[_ngcontent-%COMP%]     .ant-steps-item-content .ant-steps-item-title{color:#2a2a2a}.hoverBorder[_ngcontent-%COMP%]:hover{border-color:#9579d1}[_nghost-%COMP%]   .segmentInfoBox[_ngcontent-%COMP%]     .code-box-title>div{border-radius:.25rem}[_nghost-%COMP%]   .segmentInfoBox[_ngcontent-%COMP%]     .code-box-description{line-height:1.5715}[_nghost-%COMP%]   .hoverBorder[_ngcontent-%COMP%]:hover   .segmentInfoBox[_ngcontent-%COMP%]     .code-box-title{color:#9579d1}@media (max-width: 991.98px){.progressInfo[_ngcontent-%COMP%]{width:auto}}.editorPanel[_ngcontent-%COMP%]     .ant-list-item-meta-title, .editorPanel[_ngcontent-%COMP%]     .ant-list-item-meta-description{width:-moz-max-content;width:max-content}.editorPanel[_ngcontent-%COMP%]     nz-list-item-meta-title, .editorPanel[_ngcontent-%COMP%]     nz-list-item-meta-description{width:-moz-fit-content;width:fit-content}.editorPanel[_ngcontent-%COMP%]     .ant-list-item-meta-content{width:-moz-fit-content;width:fit-content;flex-grow:0}.editorPanel[_ngcontent-%COMP%]{flex-grow:0}.popoverPadding[_ngcontent-%COMP%]{padding:.75rem 1rem}  nz-button-group{gap:.25rem}'],data:{animation:[w.Ln,w.nV,(0,p.X$)("inOutAnimationSegment",[(0,p.eR)(":leave",[(0,p.oB)({opacity:1,height:"*"}),(0,p.jt)("0.4s ease-in",(0,p.oB)({opacity:0,height:0}))])]),(0,p.X$)("stepDescriptionAnimation",[(0,p.SB)("false",(0,p.oB)({height:0,overflow:"hidden",opacity:0}
1)),(0,p.SB)("true",(0,p.oB)({height:"*",overflow:"*",opacity:1})),(0,p.eR)("true => false",[(0,p.jt)("0.6s 1.0s ease-out")]),(0,p.eR)("false => true",[(0,p.jt)("0.3s ease-out")])]),(0,p.X$)("editorAffixStickAnimation",[(0,p.SB)("false",(0,p.oB)({opacity:0,display:"none"})),(0,p.SB)("true",(0,p.oB)({opacity:1})),(0,p.eR)("false => true",[(0,p.oB)({display:"flex"}),(0,p.jt)("0.3s ease-out")]),(0,p.eR)("true => false",[(0,p.jt)("0.3s ease-out")])]),(0,p.X$)("editorAffixAnimation",[(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-out",(0,p.oB)({opacity:0,display:"none"}))])]),(0,p.X$)("inOutAnimationSegmentSpinner",[(0,p.eR)(":enter",[(0,p.oB)({height:0,opacity:0}),(0,p.jt)("0.3s ease-out",(0,p.oB)({height:"*",opacity:1}))]),(0,p.eR)(":leave",[(0,p.oB)({opacity:1,height:"*"}),(0,p.jt)("0.4s ease-in",(0,p.oB)({opacity:0,height:0}))])])]}}),x=(0,tt.gn)([(0,d.c)()],x)}}]);

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.