PageSourceSearch

https://minasidor.k2a.se/692.d087f35c067abd9e.js

js k2a.se collected 2026-10-02 06:20:40 UTC 304,266 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunktaiga=self.webpackChunktaiga||[]).push([[692],{2692(Ut,mt,d){d.d(mt,{MarketModule:()=>sl});var $=d(2200),U=d(8132),it=d(2280),D=d(7052),L=d(7468),x=d(274),X=d(7586),f=d.n(X),E=d(8709),V=d(6090),A=d(9338),t=d(3664),r=d(2615),y=d(7705),N=d(3718),dt=d(6354),Lt=d(980),zt=d(5850),Yt=d(7456),nt=d(9297);let S=(()=>{class n{constructor(e,i,a){this.request=e,this.appConfigService=i,this.menuService=a}getMarketObjects(e,i,a,s,l,c,m,h,_,p,C,R,P,v,q){const O={type:e};return i&&(O.sizeRoomsMin=i),a&&(O.sizeRoomsMax=a),s&&(O.sizeAreaMin=s),l&&(O.sizeAreaMax=l),c&&(O.priceMin=c),m&&(O.priceMax=m),h&&(O.limit=h),_&&(O.offset=_),p&&(O.order=p),C&&(O.orderReverse=C),R&&(O.locationAreaId=R),P&&(O.includedDisplayName=P),v&&(O.locationAreaDisplayName=v),q&&(O.attribute=q),this.request.get("v2/market/objects",O,{cache:!1})}getMarketObject(e){return this.request.get(`v2/market/objects/${e}`,null,{cache:!1})}saveMarketObjectsFilterSettings(e,i,a,s,l,c,m,h,_,p){const C={sizeRoomsMin:i,sizeRoomsMax:a,locationAreaMin:s,locationAreaMax:l,priceMin:c,priceMax:m,areas:h,includes:_,attributes:p};localStorage.setItem(`${e.toUpperCase()}_SEARCH_FILTERS`,JSON.stringify(C)),this.setPageYOffset(null)}getMarketObjectsFilterSettings(e){const i=localStorage.getItem(`${e.toUpperCase()}_SEARCH_FILTERS`),a=JSON.parse(i);return{sizeRoomsMin:a?.sizeRoomsMin??null,sizeRoomsMax:a?.sizeRoomsMax??null,locationAreaMin:a?.locationAreaMin??null,locationAreaMax:a?.locationAreaMax??null,priceMin:a?.priceMin??null,priceMax:a?.priceMax??null,areas:a?.areas??null,includes:a?.includes??null,attributes:a?.attributes??null}}clearMarketObjectsFilterSettings(e){localStorage.removeItem(`${e.toUpperCase()}_SEARCH_FILTERS`),this.setPageYOffset(null)}setPageYOffset(e){this.pageYOffset=e}getPageYOffset(){return this.pageYOffset}getMarketObjectStatus(e){return this.request.get(`v2/market/objects/${e}/status`,{removedApplications:!0},{cache:!1})}postMarketApplication(e){return this.request.postOnce(`v2/market/${e}/applications`,{command:{type:"apply"},contact:null})}postMarketApplicationsItemPost(e,i,a,s){return this.request.postOnce(`v2/market/${e}/applications/${i}`,{command:a,etag:s})}getMarketApplications(e){return this.request.get("v2/market/applications",{queueType:e,removed:!0,closed:!0},{cache:!1})}getMarketObjectImage(e,i){return this.appConfigService.apiBaseUrl+`/v2/market/objects/${e}/images/${i}?width=1024&height=1024`}getMarketObjectThumbnail(e,i){return this.appConfigService.apiBaseUrl+`v2/market/objects/${e}/thumbnail?width=660&height=440&version=${i}`}getMarketObjectsTypesItem(e){return this.request.get(`v2/market/objects/types/${e}`,null,{cache:!1}).pipe((0,dt.T)(i=>(i.maxPrice=i?.maxPrice?i.maxPrice:1e5,i.maxSize=i?.maxSize?i.maxSize:"500",i.maxNumberOfRooms=i?.maxNumberOfRooms?i.maxNumberOfRooms:"20",i)))}getMarketApplicantProfileOptions(){return this.request.get("v2/market/applicant/profile/options")}getMarketApplicantProfile(){return this.request.get("v2/market/applicant/profile")}patchMarketApplicantProfile(e){return this.request.patchOnce("v2/market/applicant/profile",e).pipe((0,Lt.j)(()=>{this.menuService.refreshMenu(3e3)}))}getMarketSubscriptions(){return this.request.get("v2/market/subscriptions")}putMarketSubscriptions(e){return e?.id||(e.id=N.Q.generateUniqueId()),this.request.putOnce(`v2/market/subscriptions/${e.id}`,e)}deleteMarketSubscriptions(e){return this.request.delete(`v2/market/subscriptions/${e}`)}getMarketObjectsTypesItemSubscriptionsSetting(e){return this.request.get(`v2/market/objects/types/${e}/subscriptions/setting`)}getMarketCoApplicants(){return this.request.get("v2/market/applicant/coApplicants",{includeStatusDraft:!0})}patchMarketApplicantCoApplicantsItem(e,i){return this.request.patchOnce(`v2/market/applicant/coApplicants/${e}`,{accept:i})}getMarketObjectsAreas(){return this.request.get("v2/market/objects/areas")}getMarketObjectsTypesAreas(e){return this.request.get(`v2/market/objects/types/${e}/areas`).pipe((0,dt.T)(i=>{const a=JSON.parse(JSON.stringify(i));let s=[];return function l(c,m){for(const h of c){let _=h.displayName,p={id:"",displayName:"",sortName:""};p.id=h.id,m?(p.displayName=`${h.displayName}, ${m}`,p.sortName=m):p.displayName=h.displayName,s.push(p),h?.areas&&l(h.areas,_)}}(a.items,null),a.items=s.sort((c,m)=>c?.sortName<m?.sortName?-1:c?.sortName>m?.sortName?1:0),a}))}deleteMarketApplicantCoApplicantsItem(e){return this.request.delete(`v2/market/applicant/coApplicants/${e}`)}getMarketSubscriptionsMarketObjectsTypes(){return this.request.get("v2/market/subscriptions/marketobjects/types")}getMarketObjectsIncludes(){return this.request.get("v2/market/objects/includes")}putMarketApplicantCoApplicantsItem(e){const i=N.Q.generateUniqueId();return this.request.putOnce(`v2/market/applicant/coApplicants/${i}`,{applicantIdentifier:e})}getMarketApplicationsItem(e,i=!0){return this.request.get(`v2/market/applications/${e}`,null,{cache:i}
1)}postSystemFilesItem(e){const i=new FormData;return i.append("file",e),this.request.postObserveEvents("v2/system/files?ngsw-bypass=true",i,null,!0)}static{this.\u0275fac=function(i){return new(i||n)(r.KVO(zt.B),r.KVO(Yt.R),r.KVO(nt.$))}}static{this.\u0275prov=r.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var T=d(2043),F=d(8793),W=d(666),pt=d(9945),b=d(8018),Q=d(7342),yt=d(8875),k=d(2591),G=d(9213),I=d(8834),lt=d(2598),at=d(100),j=d(9588),B=d(5084),ut=d(6183),_t=d(3029),ht=d(2765),u=d(9417),jt=d(3881),Qt=d(1577),ft=d(9842),st=d(2496),Ht=d(8968),Jt=d(1804),qt=d(2046),Tt=d(1413),Wt=d(2466),Zt=d(6881);const Kt=["knob"],te=["valueIndicatorContainer"];function ee(n,o){if(1&n&&(t.j41(0,"div",2,1)(2,"div",5)(3,"span",6),t.EFF(4),t.k0s()()()),2&n){const e=t.XpG();t.R7$(4),t.JRh(e.valueIndicatorText)}}const ie=["trackActive"],ne=["*"];function ae(n,o){if(1&n&&t.nrm(0,"div"),2&n){const e=o.$implicit,i=o.$index,a=t.XpG(3);t.HbH(0===e?"mdc-slider__tick-mark--active":"mdc-slider__tick-mark--inactive"),t.xc7("transform",a._calcTickMarkTransform(i))}}function se(n,o){if(1&n&&t.Z7z(0,ae,1,4,"div",8,t.Vm6),2&n){const e=t.XpG(2);t.Dyx(e._tickMarks)}}function oe(n,o){if(1&n&&(t.j41(0,"div",6,1),t.nVh(2,se,2,0),t.k0s()),2&n){const e=t.XpG();t.R7$(2),t.vxM(e._cachedWidth?2:-1)}}function re(n,o){if(1&n&&t.nrm(0,"mat-slider-visual-thumb",7),2&n){const e=t.XpG();t.Y8G("discrete",e.discrete)("thumbPosition",1)("valueIndicatorText",e.startValueIndicatorText)}}var g=function(n){return n[n.START=1]="START",n[n.END=2]="END",n}(g||{}),Z=function(n){return n[n.ACTIVE=0]="ACTIVE",n[n.INACTIVE=1]="INACTIVE",n}(Z||{});const gt=new r.nKC("_MatSlider"),It=new r.nKC("_MatSliderThumb"),Ft=new r.nKC("_MatSliderRangeThumb"),Ot=new r.nKC("_MatSliderVisualThumb");let le=(()=>{class n{_cdr=(0,r.WQX)(y.gRc);_ngZone=(0,r.WQX)(t.SKi);_slider=(0,r.WQX)(gt);_renderer=(0,r.WQX)(t.sFG);_listenerCleanups;discrete;thumbPosition;valueIndicatorText;_ripple;_knob;_valueIndicatorContainer;_sliderInput;_sliderInputEl;_hoverRippleRef;_focusRippleRef;_activeRippleRef;_isHovered=!1;_isActive=!1;_isValueIndicatorVisible=!1;_hostElement=(0,r.WQX)(t.aKT).nativeElement;_platform=(0,r.WQX)(ft.O);constructor(){}ngAfterViewInit(){const e=this._slider._getInput(this.thumbPosition);e&&(this._ripple.radius=24,this._sliderInput=e,this._sliderInputEl=this._sliderInput._hostElement,this._ngZone.runOutsideAngular(()=>{const i=this._sliderInputEl,a=this._renderer;this._listenerCleanups=[a.listen(i,"pointermove",this._onPointerMove),a.listen(i,"pointerdown",this._onDragStart),a.listen(i,"pointerup",this._onDragEnd),a.listen(i,"pointerleave",this._onMouseLeave),a.listen(i,"focus",this._onFocus),a.listen(i,"blur",this._onBlur)]}))}ngOnDestroy(){this._listenerCleanups?.forEach(e=>e())}_onPointerMove=e=>{if(this._sliderInput._isFocused)return;const i=this._hostElement.getBoundingClientRect(),a=this._slider._isCursorOnSliderThumb(e,i);this._isHovered=a,a?this._showHoverRipple():this._hideRipple(this._hoverRippleRef)};_onMouseLeave=()=>{this._isHovered=!1,this._hideRipple(this._hoverRippleRef)};_onFocus=()=>{this._hideRipple(this._hoverRippleRef),this._showFocusRipple(),this._hostElement.classList.add("mdc-slider__thumb--focused")};_onBlur=()=>{this._isActive||this._hideRipple(this._focusRippleRef),this._isHovered&&this._showHoverRipple(),this._hostElement.classList.remove("mdc-slider__thumb--focused")};_onDragStart=e=>{0===e.button&&(this._isActive=!0,this._showActiveRipple())};_onDragEnd=()=>{this._isActive=!1,this._hideRipple(this._activeRippleRef),this._sliderInput._isFocused||this._hideRipple(this._focusRippleRef),this._platform.SAFARI&&this._showHoverRipple()};_showHoverRipple(){this._isShowingRipple(this._hoverRippleRef)||(this._hoverRippleRef=this._showRipple({enterDuration:0,exitDuration:0}),this._hoverRippleRef?.element.classList.add("mat-mdc-slider-hover-ripple"))}_showFocusRipple(){this._isShowingRipple(this._focusRippleRef)||(this._focusRippleRef=this._showRipple({enterDuration:0,exitDuration:0},!0),this._focusRippleRef?.element.classList.add("mat-mdc-slider-focus-ripple"))}_showActiveRipple(){this._isShowingRipple(this._activeRippleRef)||(this._activeRippleRef=this._showRipple({enterDuration:225,exitDuration:400}),this._activeRippleRef?.element.classList.add("mat-mdc-slider-active-ripple"))}_isShowingRipple(e){return e?.state===st.Ex.FADING_IN||e?.state===st.Ex.VISIBLE}_showRipple(e,i){if(!this._slider.disabled&&(this._showValueIndicator(),this._slider._isRange&&this._slider._getThumb(this.thumbPosition===g.START?g.END:g.START)._showValueIndicator(),!this._slider._globalRippleOptions?.disabled||i))return this._ripple.launch({animation:this._slider._noopAnimations?{enterDuration:0,exitDuration:0}:e,centered:!0,persistent:!0})}_hideRipple(e){if(e?.fadeOut(),this._isShowingAnyRipple())return;this._slider._isRange||this._hideValueIndicator();const i=this._getSibling();i._isShowingAnyRipple()||(this._hideValueIndicator(),i._hideValueIndicator())}_showValueIndicator(){this._hostElement.classList.add("mdc-slider__thumb--with-indicator")}_hideValueIndicator(){this._hostElement.classList.remove("mdc-slider__thumb--with-indicator")}_getSibling(){return this._slider._getThumb(this.thumbPosition===g.START?g.END:g.START)}_getValueIndicatorContainer(){return this._valueIndicatorContainer?.nativeElement}_getKnob(){return this._knob.nativeElement}_isShowingAnyRipple(){return this._isShowingRipple(this._hoverRippleRef)||this._isShowingRipple(this._focusRippleRef)||this._isShowingRipple(this._activeRippleRef)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=t.VBU({type:n,selectors:[["mat-slider-visual-thumb"]],viewQuery:function(i,a){if(1&i&&(t.GBs(st.r6,5),t.GBs(Kt,5),t.GBs(te,5)),2&i){let s;t.mGM(s=t.lsd())&&(a._ripple=s.first),t.mGM(s=t.lsd())&&(a._knob=s.first),t.mGM(s=t.lsd())&&(a._valueIndicatorContainer=s.first)}}
1,hostAttrs:[1,"mdc-slider__thumb","mat-mdc-slider-visual-thumb"],inputs:{discrete:"discrete",thumbPosition:"thumbPosition",valueIndicatorText:"valueIndicatorText"},features:[t.Jv_([{provide:Ot,useExisting:n}])],decls:4,vars:2,consts:[["knob",""],["valueIndicatorContainer",""],[1,"mdc-slider__value-indicator-container"],[1,"mdc-slider__thumb-knob"],["matRipple","",1,"mat-focus-indicator",3,"matRippleDisabled"],[1,"mdc-slider__value-indicator"],[1,"mdc-slider__value-indicator-text"]],template:function(i,a){1&i&&(t.nVh(0,ee,5,1,"div",2),t.nrm(1,"div",3,0)(3,"div",4)),2&i&&(t.vxM(a.discrete?0:-1),t.R7$(3),t.Y8G("matRippleDisabled",!0))},dependencies:[st.r6],styles:[".mat-mdc-slider-visual-thumb .mat-ripple{height:100%;width:100%}.mat-mdc-slider .mdc-slider__tick-marks{justify-content:start}.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--active,.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--inactive{position:absolute;left:2px}\n"],encapsulation:2,changeDetection:0})}return n})(),St=(()=>{class n{_ngZone=(0,r.WQX)(t.SKi);_cdr=(0,r.WQX)(y.gRc);_elementRef=(0,r.WQX)(t.aKT);_dir=(0,r.WQX)(Qt.dS,{optional:!0});_globalRippleOptions=(0,r.WQX)(st.$E,{optional:!0});_trackActive;_thumbs;_input;_inputs;get disabled(){return this._disabled}set disabled(e){this._disabled=e;const i=this._getInput(g.END),a=this._getInput(g.START);i&&(i.disabled=this._disabled),a&&(a.disabled=this._disabled)}_disabled=!1;get discrete(){return this._discrete}set discrete(e){this._discrete=e,this._updateValueIndicatorUIs()}_discrete=!1;get showTickMarks(){return this._showTickMarks}set showTickMarks(e){this._showTickMarks=e,this._hasViewInitialized&&(this._updateTickMarkUI(),this._updateTickMarkTrackUI())}_showTickMarks=!1;get min(){return this._min}set min(e){const i=null==e||isNaN(e)?this._min:e;this._min!==i&&this._updateMin(i)}_min=0;color;disableRipple=!1;_updateMin(e){const i=this._min;this._min=e,this._isRange?this._updateMinRange({old:i,new:e}):this._updateMinNonRange(e),this._onMinMaxOrStepChange()}_updateMinRange(e){const i=this._getInput(g.END),a=this._getInput(g.START),s=i.value,l=a.value;a.min=e.new,i.min=Math.max(e.new,a.value),a.max=Math.min(i.max,i.value),a._updateWidthInactive(),i._updateWidthInactive(),e.new<e.old?this._onTranslateXChangeBySideEffect(i,a):this._onTranslateXChangeBySideEffect(a,i),s!==i.value&&this._onValueChange(i),l!==a.value&&this._onValueChange(a)}_updateMinNonRange(e){const i=this._getInput(g.END);if(i){const a=i.value;i.min=e,i._updateThumbUIByValue(),this._updateTrackUI(i),a!==i.value&&this._onValueChange(i)}}get max(){return this._max}set max(e){const i=null==e||isNaN(e)?this._max:e;this._max!==i&&this._updateMax(i)}_max=100;_updateMax(e){const i=this._max;this._max=e,this._isRange?this._updateMaxRange({old:i,new:e}):this._updateMaxNonRange(e),this._onMinMaxOrStepChange()}_updateMaxRange(e){const i=this._getInput(g.END),a=this._getInput(g.START),s=i.value,l=a.value;i.max=e.new,a.max=Math.min(e.new,i.value),i.min=a.value,i._updateWidthInactive(),a._updateWidthInactive(),e.new>e.old?this._onTranslateXChangeBySideEffect(a,i):this._onTranslateXChangeBySideEffect(i,a),s!==i.value&&this._onValueChange(i),l!==a.value&&this._onValueChange(a)}_updateMaxNonRange(e){const i=this._getInput(g.END);if(i){const a=i.value;i.max=e,i._updateThumbUIByValue(),this._updateTrackUI(i),a!==i.value&&this._onValueChange(i)}}get step(){return this._step}set step(e){const i=isNaN(e)?this._step:e;this._step!==i&&this._updateStep(i)}_step=1;_updateStep(e){this._step=e,this._isRange?this._updateStepRange():this._updateStepNonRange(),this._onMinMaxOrStepChange()}_updateStepRange(){const e=this._getInput(g.END),i=this._getInput(g.START),a=e.value,s=i.value,l=i.value;e.min=this._min,i.max=this._max,e.step=this._step,i.step=this._step,this._platform.SAFARI&&(e.value=e.value,i.value=i.value),e.min=Math.max(this._min,i.value),i.max=Math.min(this._max,e.value),i._updateWidthInactive(),e._updateWidthInactive(),e.value<l?this._onTranslateXChangeBySideEffect(i,e):this._onTranslateXChangeBySideEffect(e,i),a!==e.value&&this._onValueChange(e),s!==i.value&&this._onValueChange(i)}_updateStepNonRange(){const e=this._getInput(g.END);if(e){const i=e.value;e.step=this._step,this._platform.SAFARI&&(e.value=e.value),e._updateThumbUIByValue(),i!==e.value&&this._onValueChange(e)}}displayWith=e=>`${e}`;_tickMarks;_noopAnimations=(0,Jt.Rc)();_dirChangeSubscription;_resizeObserver;_cachedWidth;_cachedLeft;_rippleRadius=24;startValueIndicatorText="";endValueIndicatorText="";_endThumbTransform;_startThumbTransform;_isRange=!1;_isRtl=!1;_hasViewInitialized=!1;_tickMarkTrackWidth=0;_hasAnimation=!1;_resizeTimer=null;_platform=(0,r.WQX)(ft.O);
vendor: 4,164 bytes, line 1
1constructor(){(0,r.WQX)(Ht.l).load(qt.A),this._dir&&(this._dirChangeSubscription=this._dir.change.subscribe(()=>this._onDirChange()),this._isRtl="rtl"===this._dir.value)}_knobRadius=8;_inputPadding;ngAfterViewInit(){this._platform.isBrowser&&this._updateDimensions();const e=this._getInput(g.END),i=this._getInput(g.START);this._isRange=!!e&&!!i,this._cdr.detectChanges();const a=this._getThumb(g.END);this._rippleRadius=a._ripple.radius,this._inputPadding=this._rippleRadius-this._knobRadius,this._isRange?this._initUIRange(e,i):this._initUINonRange(e),this._updateTrackUI(e),this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._observeHostResize(),this._cdr.detectChanges()}_initUINonRange(e){e.initProps(),e.initUI(),this._updateValueIndicatorUI(e),this._hasViewInitialized=!0,e._updateThumbUIByValue()}_initUIRange(e,i){e.initProps(),e.initUI(),i.initProps(),i.initUI(),e._updateMinMax(),i._updateMinMax(),e._updateStaticStyles(),i._updateStaticStyles(),this._updateValueIndicatorUIs(),this._hasViewInitialized=!0,e._updateThumbUIByValue(),i._updateThumbUIByValue()}ngOnDestroy(){this._dirChangeSubscription.unsubscribe(),this._resizeObserver?.disconnect(),this._resizeObserver=null}_onDirChange(){this._isRtl="rtl"===this._dir?.value,this._isRange?this._onDirChangeRange():this._onDirChangeNonRange(),this._updateTickMarkUI()}_onDirChangeRange(){const e=this._getInput(g.END),i=this._getInput(g.START);e._setIsLeftThumb(),i._setIsLeftThumb(),e.translateX=e._calcTranslateXByValue(),i.translateX=i._calcTranslateXByValue(),e._updateStaticStyles(),i._updateStaticStyles(),e._updateWidthInactive(),i._updateWidthInactive(),e._updateThumbUIByValue(),i._updateThumbUIByValue()}_onDirChangeNonRange(){this._getInput(g.END)._updateThumbUIByValue()}_observeHostResize(){typeof ResizeObserver>"u"||!ResizeObserver||this._ngZone.runOutsideAngular(()=>{this._resizeObserver=new ResizeObserver(()=>{this._isActive()||(this._resizeTimer&&clearTimeout(this._resizeTimer),this._onResize())}),this._resizeObserver.observe(this._elementRef.nativeElement)})}_isActive(){return this._getThumb(g.START)._isActive||this._getThumb(g.END)._isActive}_getValue(e=g.END){const i=this._getInput(e);return i?i.value:this.min}_skipUpdate(){return!(!this._getInput(g.START)?._skipUIUpdate&&!this._getInput(g.END)?._skipUIUpdate)}_updateDimensions(){this._cachedWidth=this._elementRef.nativeElement.offsetWidth,this._cachedLeft=this._elementRef.nativeElement.getBoundingClientRect().left}_setTrackActiveStyles(e){const i=this._trackActive.nativeElement.style;i.left=e.left,i.right=e.right,i.transformOrigin=e.transformOrigin,i.transform=e.transform}_calcTickMarkTransform(e){const i=e*(this._tickMarkTrackWidth/(this._tickMarks.length-1));return`translateX(${this._isRtl?this._cachedWidth-6-i:i}px`}_onTranslateXChange(e){this._hasViewInitialized&&(this._updateThumbUI(e),this._updateTrackUI(e),this._updateOverlappingThumbUI(e))}_onTranslateXChangeBySideEffect(e,i){this._hasViewInitialized&&(e._updateThumbUIByValue(),i._updateThumbUIByValue())}_onValueChange(e){this._hasViewInitialized&&(this._updateValueIndicatorUI(e),this._updateTickMarkUI(),this._cdr.detectChanges())}_onMinMaxOrStepChange(){this._hasViewInitialized&&(this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._cdr.markForCheck())}_onResize(){if(this._hasViewInitialized){if(this._updateDimensions(),this._isRange){const e=this._getInput(g.END),i=this._getInput(g.START);e._updateThumbUIByValue(),i._updateThumbUIByValue(),e._updateStaticStyles(),i._updateStaticStyles(),e._updateMinMax(),i._updateMinMax(),e._updateWidthInactive(),i._updateWidthInactive()}else{const e=this._getInput(g.END);e&&e._updateThumbUIByValue()}this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._cdr.detectChanges()}}_thumbsOverlap=!1;_areThumbsOverlapping(){const e=this._getInput(g.START),i=this._getInput(g.END);return!(!e||!i)&&i.translateX-e.translateX<20}_updateOverlappingThumbClassNames(e){const i=e.getSibling(),a=this._getThumb(e.thumbPosition);this._getThumb(i.thumbPosition)._hostElement.classList.remove("mdc-slider__thumb--top"),a._hostElement.classList.toggle("mdc-slider__thumb--top",this._thumbsOverlap
1)}_updateOverlappingThumbUI(e){!this._isRange||this._skipUpdate()||this._thumbsOverlap!==this._areThumbsOverlapping()&&(this._thumbsOverlap=!this._thumbsOverlap,this._updateOverlappingThumbClassNames(e))}_updateThumbUI(e){this._skipUpdate()||(this._getThumb(e.thumbPosition===g.END?g.END:g.START)._hostElement.style.transform=`translateX(${e.translateX}px)`)}_updateValueIndicatorUI(e){if(this._skipUpdate())return;const i=this.displayWith(e.value);if(this._hasViewInitialized?e._valuetext.set(i):e._hostElement.setAttribute("aria-valuetext",i),this.discrete){e.thumbPosition===g.START?this.startValueIndicatorText=i:this.endValueIndicatorText=i;const a=this._getThumb(e.thumbPosition);i.length<3?a._hostElement.classList.add("mdc-slider__thumb--short-value"):a._hostElement.classList.remove("mdc-slider__thumb--short-value")}}_updateValueIndicatorUIs(){const e=this._getInput(g.END),i=this._getInput(g.START);e&&this._updateValueIndicatorUI(e),i&&this._updateValueIndicatorUI(i)}_updateTickMarkTrackUI(){if(!this.showTickMarks||this._skipUpdate())return;const e=this._step&&this._step>0?this._step:1,a=(Math.floor(this.max/e)*e-this.min)/(this.max-this.min);this._tickMarkTrackWidth=(this._cachedWidth-6)*a}_updateTrackUI(e){this._skipUpdate()||(this._isRange?this._updateTrackUIRange(e):this._updateTrackUINonRange(e))}_updateTrackUIRange(e){const i=e.getSibling();if(!i||!this._cachedWidth)return;const a=Math.abs(i.translateX-e.translateX)/this._cachedWidth;this._setTrackActiveStyles(e._isLeftThumb&&this._cachedWidth?{left:"auto",right:this._cachedWidth-i.translateX+"px",transformOrigin:"right",transform:`scaleX(${a})`}:{left:`${i.translateX}px`,right:"auto",transformOrigin:"left",transform:`scaleX(${a})`})}_updateTrackUINonRange(e){this._setTrackActiveStyles(this._isRtl?{left:"auto",right:"0px",transformOrigin:"right",transform:`scaleX(${1-e.fillPercentage})`}:{left:"0px",right:"auto",transformOrigin:"left",transform:`scaleX(${e.fillPercentage})`})}_updateTickMarkUI(){if(!this.showTickMarks||void 0===this.step||void 0===this.min||void 0===this.max)return;const e=this.step>0?this.step:1;this._isRange?this._updateTickMarkUIRange(e):this._updateTickMarkUINonRange(e)}_updateTickMarkUINonRange(e){const i=this._getValue();let a=Math.max(Math.round((i-this.min)/e),0)+1,s=Math.max(Math.round((this.max-i)/e),0)-1;this._isRtl?a++:s++,this._tickMarks=Array(a).fill(Z.ACTIVE).concat(Array(s).fill(Z.INACTIVE))}_updateTickMarkUIRange(e){const i=this._getValue(),a=this._getValue(g.START),s=Math.max(Math.round((a-this.min)/e),0),l=Math.max(Math.round((i-a)/e)+1,0),c=Math.max(Math.round((this.max-i)/e),0);this._tickMarks=Array(s).fill(Z.INACTIVE).concat(Array(l).fill(Z.ACTIVE),Array(c).fill(Z.INACTIVE))}_getInput(e){return e===g.END&&this._input?this._input:this._inputs?.length?e===g.START?this._inputs.first:this._inputs.last:void 0}_getThumb(e){return e===g.END?this._thumbs?.last:this._thumbs?.first}_setTransition(e){this._hasAnimation=!this._platform.IOS&&e&&!this._noopAnimations,this._elementRef.nativeElement.classList.toggle("mat-mdc-slider-with-animation",this._hasAnimation)}_isCursorOnSliderThumb(e,i){const a=i.width/2,m=e.clientY-(i.y+a);return Math.pow(e.clientX-(i.x+a),2)+Math.pow(m,2)<Math.pow(a,2)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=t.VBU({type:n,selectors:[["mat-slider"]],contentQueries:function(i,a,s){if(1&i&&(t.wni(s,It,5),t.wni(s,Ft,4)),2&i){let l;t.mGM(l=t.lsd())&&(a._input=l.first),t.mGM(l=t.lsd())&&(a._inputs=l)}},viewQuery:function(i,a){if(1&i&&(t.GBs(ie,5),t.GBs(Ot,5)),2&i){let s;t.mGM(s=t.lsd())&&(a._trackActive=s.first),t.mGM(s=t.lsd())&&(a._thumbs=s)}},hostAttrs:[1,"mat-mdc-slider","mdc-slider"],hostVars:12,hostBindings:function(i,a){2&i&&(t.HbH("mat-"+(a.color||"primary")),t.AVh("mdc-slider--range",a._isRange)("mdc-slider--disabled",a.disabled)("mdc-slider--discrete",a.discrete)("mdc-slider--tick-marks",a.showTickMarks)("_mat-animation-noopable",a._noopAnimations))},inputs:{disabled:[2,"disabled","disabled",y.L39],discrete:[2,"discrete","discrete",y.L39],showTickMarks:[2,"showTickMarks","showTickMarks",y.L39],min:[2,"min","min",y.Udg],color:"color",disableRipple:[2,"disableRipple","disableRipple",y.L39],max:[2,"max","max",y.Udg],step:[2,"step","step",y.Udg],displayWith:"displayWith"},exportAs:["matSlider"],features:[t.Jv_([{provide:gt,useExisting:n}])],ngContentSelectors:ne,decls:9,vars:5,consts:[["trackActive",""],["t
1ickMarkContainer",""],[1,"mdc-slider__track"],[1,"mdc-slider__track--inactive"],[1,"mdc-slider__track--active"],[1,"mdc-slider__track--active_fill"],[1,"mdc-slider__tick-marks"],[3,"discrete","thumbPosition","valueIndicatorText"],[3,"class","transform"]],template:function(i,a){1&i&&(t.NAR(),t.SdG(0),t.j41(1,"div",2),t.nrm(2,"div",3),t.j41(3,"div",4),t.nrm(4,"div",5,0),t.k0s(),t.nVh(6,oe,3,1,"div",6),t.k0s(),t.nVh(7,re,1,3,"mat-slider-visual-thumb",7),t.nrm(8,"mat-slider-visual-thumb",7)),2&i&&(t.R7$(6),t.vxM(a.showTickMarks?6:-1),t.R7$(),t.vxM(a._isRange?7:-1),t.R7$(),t.Y8G("discrete",a.discrete)("thumbPosition",2)("valueIndicatorText",a.endValueIndicatorText))},dependencies:[le],styles:['.mdc-slider__track{position:absolute;top:50%;transform:translateY(-50%);width:100%;pointer-events:none;height:var(--mat-slider-inactive-track-height, 4px)}.mdc-slider__track--active,.mdc-slider__track--inactive{display:flex;height:100%;position:absolute;width:100%}.mdc-slider__track--active{overflow:hidden;border-radius:var(--mat-slider-active-track-shape, var(--mat-sys-corner-full));height:var(--mat-slider-active-track-height, 4px);top:calc((var(--mat-slider-inactive-track-height, 4px) - var(--mat-slider-active-track-height, 4px))/2)}.mdc-slider__track--active_fill{border-top-style:solid;box-sizing:border-box;height:100%;width:100%;position:relative;transform-origin:left;transition:transform 80ms ease;border-color:var(--mat-slider-active-track-color, var(--mat-sys-primary));border-top-width:var(--mat-slider-active-track-height, 4px)}.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:var(--mat-slider-disabled-active-track-color, var(--mat-sys-on-surface))}[dir=rtl] .mdc-slider__track--active_fill{-webkit-transform-origin:right;transform-origin:right}.mdc-slider__track--inactive{left:0;top:0;opacity:.24;background-color:var(--mat-slider-inactive-track-color, var(--mat-sys-surface-variant));height:var(--mat-slider-inactive-track-height, 4px);border-radius:var(--mat-slider-inactive-track-shape, var(--mat-sys-corner-full))}.mdc-slider--disabled .mdc-slider__track--inactive{background-color:var(--mat-slider-disabled-inactive-track-color, var(--mat-sys-on-surface));opacity:.24}.mdc-slider__track--inactive::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media(forced-colors: active){.mdc-slider__track--inactive::before{border-color:CanvasText}}.mdc-slider__value-indicator-container{bottom:44px;left:50%;pointer-events:none;position:absolute;transform:var(--mat-slider-value-indicator-container-transform, translateX(-50%) rotate(-45deg))}.mdc-slider__thumb--with-indicator .mdc-slider__value-indicator-container{pointer-events:auto}.mdc-slider__value-indicator{display:flex;align-items:center;transform:scale(0);transform-origin:var(--mat-slider-value-indicator-transform-origin, 0 28px);transition:transform 100ms cubic-bezier(0.4, 0, 1, 1);word-break:normal;background-color:var(--mat-slider-label-container-color, var(--mat-sys-primary));color:var(--mat-slider-label-label-text-color, var(--mat-sys-on-primary));width:var(--mat-slider-value-indicator-width, 28px);height:var(--mat-slider-value-indicator-height, 28px);padding:var(--mat-slider-value-indicator-padding, 0);opacity:var(--mat-slider-value-indicator-opacity, 1);border-radius:var(--mat-slider-value-indicator-border-radius, 50% 50% 50% 0)}.mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:transform 100ms cubic-bezier(0, 0, 0.2, 1);transform:scale(1)}.mdc-slider__value-indicator::before{border-left:6px solid rgba(0,0,0,0);border-right:6px solid rgba(0,0,0,0);border-top:6px solid;bottom:-5px;content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;display:var(--mat-slider-value-indicator-caret-display, none);border-top-color:var(--mat-slider-label-container-color, var(--mat-sys-primary))}.mdc-slider__value-indicator::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}
1@media(forced-colors: active){.mdc-slider__value-indicator::after{border-color:CanvasText}}.mdc-slider__value-indicator-text{text-align:center;width:var(--mat-slider-value-indicator-width, 28px);transform:var(--mat-slider-value-indicator-text-transform, rotate(45deg));font-family:var(--mat-slider-label-label-text-font, var(--mat-sys-label-medium-font));font-size:var(--mat-slider-label-label-text-size, var(--mat-sys-label-medium-size));font-weight:var(--mat-slider-label-label-text-weight, var(--mat-sys-label-medium-weight));line-height:var(--mat-slider-label-label-text-line-height, var(--mat-sys-label-medium-line-height));letter-spacing:var(--mat-slider-label-label-text-tracking, var(--mat-sys-label-medium-tracking))}.mdc-slider__thumb{-webkit-user-select:none;user-select:none;display:flex;left:-24px;outline:none;position:absolute;height:48px;width:48px;pointer-events:none}.mdc-slider--discrete .mdc-slider__thumb{transition:transform 80ms ease}.mdc-slider--disabled .mdc-slider__thumb{pointer-events:none}.mdc-slider__thumb--top{z-index:1}.mdc-slider__thumb-knob{position:absolute;box-sizing:border-box;left:50%;top:50%;transform:translate(-50%, -50%);border-style:solid;width:var(--mat-slider-handle-width, 20px);height:var(--mat-slider-handle-height, 20px);border-width:calc(var(--mat-slider-handle-height, 20px)/2) calc(var(--mat-slider-handle-width, 20px)/2);box-shadow:var(--mat-slider-handle-elevation, var(--mat-sys-level1));background-color:var(--mat-slider-handle-color, var(--mat-sys-primary));border-color:var(--mat-slider-handle-color, var(--mat-sys-primary));border-radius:var(--mat-slider-handle-shape, var(--mat-sys-corner-full))}.mdc-slider__thumb:hover .mdc-slider__thumb-knob{background-color:var(--mat-slider-hover-handle-color, var(--mat-sys-primary));border-color:var(--mat-slider-hover-handle-color, var(--mat-sys-primary))}.mdc-slider__thumb--focused .mdc-slider__thumb-knob{background-color:var(--mat-slider-focus-handle-color, var(--mat-sys-primary));border-color:var(--mat-slider-focus-handle-color, var(--mat-sys-primary))}.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:var(--mat-slider-disabled-handle-color, var(--mat-sys-on-surface));border-color:var(--mat-slider-disabled-handle-color, var(--mat-sys-on-surface))}.mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border:solid 1px #fff;box-sizing:content-box;border-color:var(--mat-slider-with-overlap-handle-outline-color, var(--mat-sys-on-primary));border-width:var(--mat-slider-with-overlap-handle-outline-width, 1px)}.mdc-slider__tick-marks{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding:0 1px;position:absolute;width:100%}.mdc-slider__tick-mark--active,.mdc-slider__tick-mark--inactive{width:var(--mat-slider-with-tick-marks-container-size, 2px);height:var(--mat-slider-with-tick-marks-container-size, 2px);border-radius:var(--mat-slider-with-tick-marks-container-shape, var(--mat-sys-corner-full))}.mdc-slider__tick-mark--inactive{opacity:var(--mat-slider-with-tick-marks-inactive-container-opacity, 0.38);background-color:var(--mat-slider-with-tick-marks-inactive-container-color, var(--mat-sys-on-surface-variant))}.mdc-slider--disabled .mdc-slider__tick-mark--inactive{opacity:var(--mat-slider-with-tick-marks-inactive-container-opacity, 0.38);background-color:var(--mat-slider-with-tick-marks-disabled-container-color, var(--mat-sys-on-surface))}.mdc-slider__tick-mark--active{opacity:var(--mat-slider-with-tick-marks-active-container-opacity, 0.38);background-color:var(--mat-slider-with-tick-marks-active-container-color, var(--mat-sys-on-primary))}.mdc-slider__input{cursor:pointer;left:2px;margin:0;height:44px;opacity:0;position:absolute;top:2px;width:44px;box-sizing:content-box}.mdc-slider__input.mat-mdc-slider-input-no-pointer-events{pointer-events:none}.mdc-slider__input.mat-slider__right-input{left:auto;right:0}.mat-mdc-slider{display:inline-block;box-sizing:border-box;outline:none;vertical-align:middle;cursor:pointer;height:48px;margin:0 8px;position:relative;touch-action:pan-y;width:auto;min-width:112px;-webkit-tap-highlight-color:rgba(0,0,0,0)}
1.mat-mdc-slider.mdc-slider--disabled{cursor:auto;opacity:.38}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__input{cursor:auto}.mat-mdc-slider .mdc-slider__thumb,.mat-mdc-slider .mdc-slider__track--active_fill{transition-duration:0ms}.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__thumb,.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__track--active_fill{transition-duration:80ms}.mat-mdc-slider.mdc-slider--discrete .mdc-slider__thumb,.mat-mdc-slider.mdc-slider--discrete .mdc-slider__track--active_fill{transition-duration:0ms}.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__thumb,.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__track--active_fill{transition-duration:80ms}.mat-mdc-slider .mat-ripple .mat-ripple-element{background-color:var(--mat-slider-ripple-color, var(--mat-sys-primary))}.mat-mdc-slider .mat-ripple .mat-mdc-slider-hover-ripple{background-color:var(--mat-slider-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-primary) 5%, transparent))}.mat-mdc-slider .mat-ripple .mat-mdc-slider-focus-ripple,.mat-mdc-slider .mat-ripple .mat-mdc-slider-active-ripple{background-color:var(--mat-slider-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-primary) 20%, transparent))}.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__thumb,.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__track--active_fill,.mat-mdc-slider._mat-animation-noopable .mdc-slider__value-indicator{transition:none}.mat-mdc-slider .mat-focus-indicator::before{border-radius:50%}.mdc-slider__thumb--focused .mat-focus-indicator::before{content:""}\n'],encapsulation:2,changeDetection:0})}return n})();const me={provide:u.kq,useExisting:(0,r.Rfq)(()=>At),multi:!0},de={provide:u.kq,useExisting:(0,r.Rfq)(()=>bt),multi:!0};let At=(()=>{class n{_ngZone=(0,r.WQX)(t.SKi);_elementRef=(0,r.WQX)(t.aKT);_cdr=(0,r.WQX)(y.gRc);_slider=(0,r.WQX)(gt);_platform=(0,r.WQX)(ft.O);_listenerCleanups;get value(){return(0,y.Udg)(this._hostElement.value,0)}set value(e){null===e&&(e=this._getDefaultValue());const i=(e=isNaN(e)?0:e)+"";this._hasSetInitialValue?this._isActive||this._setValue(i):this._initialValue=i}_setValue(e){this._hostElement.value=e,this._updateThumbUIByValue(),this._slider._onValueChange(this),this._cdr.detectChanges(),this._slider._cdr.markForCheck()}valueChange=new t.bkB;dragStart=new t.bkB;dragEnd=new t.bkB;get translateX(){return this._slider.min>=this._slider.max?(this._translateX=this._tickMarkOffset,this._translateX):(void 0===this._translateX&&(this._translateX=this._calcTranslateXByValue()),this._translateX)}set translateX(e){this._translateX=e}_translateX;thumbPosition=g.END;get min(){return(0,y.Udg)(this._hostElement.min,0)}set min(e){this._hostElement.min=e+"",this._cdr.detectChanges()}get max(){return(0,y.Udg)(this._hostElement.max,0)}set max(e){this._hostElement.max=e+"",this._cdr.detectChanges()}get step(){return(0,y.Udg)(this._hostElement.step,0)}set step(e){this._hostElement.step=e+"",this._cdr.detectChanges()}get disabled(){return(0,y.L39)(this._hostElement.disabled)}set disabled(e){this._hostElement.disabled=e,this._cdr.detectChanges(),this._slider.disabled!==this.disabled&&(this._slider.disabled=this.disabled)}get percentage(){return this._slider.min>=this._slider.max?this._slider._isRtl?1:0:(this.value-this._slider.min)/(this._slider.max-this._slider.min)}get fillPercentage(){return this._slider._cachedWidth?0===this._translateX?0:this.translateX/this._slider._cachedWidth:this._slider._isRtl?1:0}_hostElement=this._elementRef.nativeElement;_valuetext=(0,r.vPA)("");_knobRadius=8;_tickMarkOffset=3;_isActive=!1;_isFocused=!1;_setIsFocused(e){this._isFocused=e}_hasSetInitialValue=!1;_initialValue;_formControl;_destroyed=new Tt.B;_skipUIUpdate=!1;_onChangeFn;_onTouchedFn=()=>{};_isControlInitialized=!1;constructor(){const e=(0,r.WQX)(t.sFG);this._ngZone.runOutsideAngular(()=>{this._listenerCleanups=[e.listen(this._hostElement,"pointerdown",this._onPointerDown.bind(this)),e.listen(this._hostElement,"pointermove",this._onPointerMove.bind(this)),e.listen(this._hostElement,"pointerup",this._onPointerUp.bind(this))]})}
vendor: 4,520 bytes, line 1
1ngOnDestroy(){this._listenerCleanups.forEach(e=>e()),this._destroyed.next(),this._destroyed.complete(),this.dragStart.complete(),this.dragEnd.complete()}initProps(){this._updateWidthInactive(),this.disabled!==this._slider.disabled&&(this._slider.disabled=!0),this.step=this._slider.step,this.min=this._slider.min,this.max=this._slider.max,this._initValue()}initUI(){this._updateThumbUIByValue()}_initValue(){this._hasSetInitialValue=!0,void 0===this._initialValue?this.value=this._getDefaultValue():(this._hostElement.value=this._initialValue,this._updateThumbUIByValue(),this._slider._onValueChange(this),this._cdr.detectChanges())}_getDefaultValue(){return this.min}_onBlur(){this._setIsFocused(!1),this._onTouchedFn()}_onFocus(){this._slider._setTransition(!1),this._slider._updateTrackUI(this),this._setIsFocused(!0)}_onChange(){this.valueChange.emit(this.value),this._isActive&&this._updateThumbUIByValue({withAnimation:!0})}_onInput(){this._onChangeFn?.(this.value),(this._slider.step||!this._isActive)&&this._updateThumbUIByValue({withAnimation:!0}),this._slider._onValueChange(this)}_onNgControlValueChange(){(!this._isActive||!this._isFocused)&&(this._slider._onValueChange(this),this._updateThumbUIByValue()),this._slider.disabled=this._formControl.disabled}_onPointerDown(e){if(!this.disabled&&0===e.button){if(this._platform.IOS){const i=this._slider._isCursorOnSliderThumb(e,this._slider._getThumb(this.thumbPosition)._hostElement.getBoundingClientRect());return this._isActive=i,this._updateWidthActive(),void this._slider._updateDimensions()}this._isActive=!0,this._setIsFocused(!0),this._updateWidthActive(),this._slider._updateDimensions(),this._slider.step||this._updateThumbUIByPointerEvent(e,{withAnimation:!0}),this.disabled||(this._handleValueCorrection(e),this.dragStart.emit({source:this,parent:this._slider,value:this.value}))}}_handleValueCorrection(e){this._skipUIUpdate=!0,setTimeout(()=>{this._skipUIUpdate=!1,this._fixValue(e)},0)}_fixValue(e){const i=e.clientX-this._slider._cachedLeft,a=this._slider._cachedWidth,s=0===this._slider.step?1:this._slider.step,l=Math.floor((this._slider.max-this._slider.min)/s),h=Math.round((this._slider._isRtl?1-i/a:i/a)*l)/l*(this._slider.max-this._slider.min)+this._slider.min,_=Math.round(h/s)*s;if(_===this.value)return this._slider._onValueChange(this),void(this._slider.step>0?this._updateThumbUIByValue():this._updateThumbUIByPointerEvent(e,{withAnimation:this._slider._hasAnimation}));this.value=_,this.valueChange.emit(this.value),this._onChangeFn?.(this.value),this._slider._onValueChange(this),this._slider.step>0?this._updateThumbUIByValue():this._updateThumbUIByPointerEvent(e,{withAnimation:this._slider._hasAnimation})}_onPointerMove(e){!this._slider.step&&this._isActive&&this._updateThumbUIByPointerEvent(e)}_onPointerUp(){this._isActive&&(this._isActive=!1,this._platform.SAFARI&&this._setIsFocused(!1),this.dragEnd.emit({source:this,parent:this._slider,value:this.value}),setTimeout(()=>this._updateWidthInactive(),this._platform.IOS?10:0))}_clamp(e){const i=this._tickMarkOffset;return Math.max(Math.min(e,this._slider._cachedWidth-this._tickMarkOffset),i)}_calcTranslateXByValue(){return this._slider._isRtl?(1-this.percentage)*(this._slider._cachedWidth-2*this._tickMarkOffset)+this._tickMarkOffset:this.percentage*(this._slider._cachedWidth-2*this._tickMarkOffset)+this._tickMarkOffset}_calcTranslateXByPointerEvent(e){return e.clientX-this._slider._cachedLeft}_updateWidthActive(){}_updateWidthInactive(){this._hostElement.style.padding=`0 ${this._slider._inputPadding}px`,this._hostElement.style.width=`calc(100% + ${this._slider._inputPadding-2*this._tickMarkOffset}px)`,this._hostElement.style.left=`-${this._slider._rippleRadius-this._tickMarkOffset}px`}_updateThumbUIByValue(e){this.translateX=this._clamp(this._calcTranslateXByValue()),this._updateThumbUI(e)}_updateThumbUIByPointerEvent(e,i){this.translateX=this._clamp(this._calcTranslateXByPointerEvent(e)),this._updateThumbUI(i)}_updateThumbUI(e){this._slider._setTransition(!!e?.withAnimation),this._slider._onTranslateXChange(this)}writeValue(e){(this._isControlInitialized||null!==e)&&(this.value=e)}registerOnChange(e){this._onChangeFn=e,this._isControlInitialized=!0}registerOnTouched(e){this._onTouchedFn=e}setDisabledState(e){this.disabled=e}focus(){this._hostElement.focus()}blur(){this._hostElement.blur()}static \u0275fac=function(i){return new(i||n)};static \u0275dir=t.FsC({type:n,selectors:[["input","matSliderThumb",""]],hostAttrs:["type","range",1,"mdc-sli
1der__input"],hostVars:1,hostBindings:function(i,a){1&i&&t.bIt("change",function(){return a._onChange()})("input",function(){return a._onInput()})("blur",function(){return a._onBlur()})("focus",function(){return a._onFocus()}),2&i&&t.BMQ("aria-valuetext",a._valuetext())},inputs:{value:[2,"value","value",y.Udg]},outputs:{valueChange:"valueChange",dragStart:"dragStart",dragEnd:"dragEnd"},exportAs:["matSliderThumb"],features:[t.Jv_([me,{provide:It,useExisting:n}])]})}return n})(),bt=(()=>{class n extends At{_cdr=(0,r.WQX)(y.gRc);getSibling(){return this._sibling||(this._sibling=this._slider._getInput(this._isEndThumb?g.START:g.END)),this._sibling}_sibling;getMinPos(){const e=this.getSibling();return!this._isLeftThumb&&e?e.translateX:this._tickMarkOffset}getMaxPos(){const e=this.getSibling();return this._isLeftThumb&&e?e.translateX:this._slider._cachedWidth-this._tickMarkOffset}_setIsLeftThumb(){this._isLeftThumb=this._isEndThumb&&this._slider._isRtl||!this._isEndThumb&&!this._slider._isRtl}_isLeftThumb;_isEndThumb;constructor(){super(),this._isEndThumb=this._hostElement.hasAttribute("matSliderEndThumb"),this._setIsLeftThumb(),this.thumbPosition=this._isEndThumb?g.END:g.START}_getDefaultValue(){return this._isEndThumb&&this._slider._isRange?this.max:this.min}_onInput(){super._onInput(),this._updateSibling(),this._isActive||this._updateWidthInactive()}_onNgControlValueChange(){super._onNgControlValueChange(),this.getSibling()?._updateMinMax()}_onPointerDown(e){this.disabled||0!==e.button||(this._sibling&&(this._sibling._updateWidthActive(),this._sibling._hostElement.classList.add("mat-mdc-slider-input-no-pointer-events")),super._onPointerDown(e))}_onPointerUp(){super._onPointerUp(),this._sibling&&setTimeout(()=>{this._sibling._updateWidthInactive(),this._sibling._hostElement.classList.remove("mat-mdc-slider-input-no-pointer-events")})}_onPointerMove(e){super._onPointerMove(e),!this._slider.step&&this._isActive&&this._updateSibling()}_fixValue(e){super._fixValue(e),this._sibling?._updateMinMax()}_clamp(e){return Math.max(Math.min(e,this.getMaxPos()),this.getMinPos())}_updateMinMax(){const e=this.getSibling();e&&(this._isEndThumb?(this.min=Math.max(this._slider.min,e.value),this.max=this._slider.max):(this.min=this._slider.min,this.max=Math.min(this._slider.max,e.value)))}_updateWidthActive(){const e=2*this._slider._rippleRadius-2*this._slider._inputPadding;this._hostElement.style.width=`${(this._slider._cachedWidth+this._slider._inputPadding-e-2*this._tickMarkOffset)*(this._slider.min<this._slider.max?(this.max-this.min)/(this._slider.max-this._slider.min):1)+e}px`,this._hostElement.style.padding=`0 ${this._slider._inputPadding}px`}_updateWidthInactive(){const e=this.getSibling();if(!e)return;const a=this._isEndThumb?this.value-(this.value-e.value)/2:this.value+(e.value-this.value)/2,l=this._slider.min<this._slider.max?this._isEndThumb?(this.max-a)/(this._slider.max-this._slider.min):(a-this.min)/(this._slider.max-this._slider.min):1;let c=this._slider._rippleRadius;1===l?c=48:0===l&&(c=0),this._hostElement.style.width=`${(this._slider._cachedWidth-2*this._tickMarkOffset)*l+c}px`,this._hostElement.style.padding="0px",this._isLeftThumb?(this._hostElement.style.left=`-${this._slider._rippleRadius-this._tickMarkOffset}px`,this._hostElement.style.right="auto"):(this._hostElement.style.left="auto",this._hostElement.style.right=`-${this._slider._rippleRadius-this._tickMarkOffset}px`)}_updateStaticStyles(){this._hostElement.classList.toggle("mat-slider__right-input",!this._isLeftThumb)}_updateSibling(){const e=this.getSibling();e&&(e._updateMinMax(),this._isActive?e._updateWidthActive():e._updateWidthInactive())}writeValue(e){(this._isControlInitialized||null!==e)&&(this.value=e,this._updateWidthInactive(),this._updateSibling())}_setValue(e){super._setValue(e),this._updateWidthInactive(),this._updateSibling()}static \u0275fac=function(i){return new(i||n)};static \u0275dir=t.FsC({type:n,selectors:[["input","matSliderStartThumb",""],["input","matSliderEndThumb",""]],exportAs:["matSliderRangeThumb"],features:[t.Jv_([de,{provide:Ft,useExisting:n}]),t.Vt3]})}return n})(),pe=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=t.$C({type:n});
1static \u0275inj=r.G2t({imports:[Wt.y,Zt.p]})}return n})();const ue=n=>({invalidChars:n}),_e=n=>({item:n});function he(n,o){if(1&n&&(t.j41(0,"span",19),t.EFF(1),t.k0s()),2&n){const e=t.XpG(3);t.R7$(),t.Lme(": ",e.sizeRoomsMin," - ",e.sizeRoomsMax)}}function fe(n,o){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"fieldset")(2,"legend",18),t.EFF(3),t.nI1(4,"translate"),t.nVh(5,he,2,2,"span",19),t.k0s(),t.j41(6,"div",20)(7,"label",21),t.EFF(8,"Min"),t.k0s(),t.j41(9,"label",22),t.EFF(10,"Max"),t.k0s()(),t.j41(11,"mat-slider",23)(12,"input",24),t.mxI("ngModelChange",function(a){r.eBV(e);const s=t.XpG(2);return t.DH7(s.sizeRoomsMin,a)||(s.sizeRoomsMin=a),r.Njj(a)}),t.k0s(),t.j41(13,"input",25),t.mxI("ngModelChange",function(a){r.eBV(e);const s=t.XpG(2);return t.DH7(s.sizeRoomsMax,a)||(s.sizeRoomsMax=a),r.Njj(a)}),t.k0s()()()()}if(2&n){const e=t.XpG(2);t.R7$(3),t.SpI(" ",t.bMT(4,6,"NUMBEROFROOMS")," "),t.R7$(2),t.vxM(e.sizeRoomsMax||e.sizeRoomsMin?5:-1),t.R7$(6),t.Y8G("min",null==e.marketObjectsTypesItem?null:e.marketObjectsTypesItem.minNumberOfRooms)("max",null==e.marketObjectsTypesItem?null:e.marketObjectsTypesItem.maxNumberOfRooms),t.R7$(),t.R50("ngModel",e.sizeRoomsMin),t.R7$(),t.R50("ngModel",e.sizeRoomsMax)}}function ge(n,o){if(1&n&&(t.j41(0,"span",27),t.EFF(1),t.k0s()),2&n){const e=t.XpG(3);t.R7$(),t.Lme(": ",e.locationAreaMin," - ",e.locationAreaMax," kvm")}}function be(n,o){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"fieldset")(2,"legend",26),t.EFF(3),t.nI1(4,"translate"),t.nVh(5,ge,2,2,"span",27),t.k0s(),t.j41(6,"div",20)(7,"label",28),t.EFF(8,"Min"),t.k0s(),t.j41(9,"label",29),t.EFF(10,"Max"),t.k0s()(),t.j41(11,"mat-slider",30)(12,"input",31),t.mxI("ngModelChange",function(a){r.eBV(e);const s=t.XpG(2);return t.DH7(s.locationAreaMin,a)||(s.locationAreaMin=a),r.Njj(a)}),t.k0s(),t.j41(13,"input",32),t.mxI("ngModelChange",function(a){r.eBV(e);const s=t.XpG(2);return t.DH7(s.locationAreaMax,a)||(s.locationAreaMax=a),r.Njj(a)}),t.k0s()()()()}if(2&n){const e=t.XpG(2);t.R7$(3),t.SpI(" ",t.bMT(4,7,"SIZESQM")," "),t.R7$(2),t.vxM(e.locationAreaMin||e.locationAreaMax?5:-1),t.R7$(6),t.Y8G("step",10)("min",null==e.marketObjectsTypesItem?null:e.marketObjectsTypesItem.minSize)("max",null==e.marketObjectsTypesItem?null:e.marketObjectsTypesItem.maxSize),t.R7$(),t.R50("ngModel",e.locationAreaMin),t.R7$(),t.R50("ngModel",e.locationAreaMax)}}function Me(n,o){if(1&n&&(t.j41(0,"span",34),t.EFF(1),t.k0s()),2&n){const e=t.XpG(3);t.R7$(),t.Lme(": ",e.priceMin," - ",e.priceMax,":-")}}function ke(n,o){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"fieldset")(2,"legend",33),t.EFF(3),t.nI1(4,"translate"),t.nVh(5,Me,2,2,"span",34),t.k0s(),t.j41(6,"div",20)(7,"label",35),t.EFF(8,"Min"),t.k0s(),t.j41(9,"label",36),t.EFF(10,"Max"),t.k0s()(),t.j41(11,"mat-slider",30)(12,"input",37),t.mxI("ngModelChange",function(a){r.eBV(e);const s=t.XpG(2);return t.DH7(s.priceMin,a)||(s.priceMin=a),r.Njj(a)}),t.k0s(),t.j41(13,"input",38),t.mxI("ngModelChange",function(a){r.eBV(e);const s=t.XpG(2);return t.DH7(s.priceMax,a)||(s.priceMax=a),r.Njj(a)}),t.k0s()()()()}if(2&n){const e=t.XpG(2);t.R7$(3),t.SpI(" ",t.bMT(4,7,"PRICE")," "),t.R7$(2),t.vxM(e.priceMin||e.priceMax?5:-1),t.R7$(6),t.Y8G("step",(null==e.marketObjectsTypesItem?null:e.marketObjectsTypesItem.maxPrice)>2e3?1e3:100)("min",null==e.marketObjectsTypesItem?null:e.marketObjectsTypesItem.minPrice)("max",null==e.marketObjectsTypesItem?null:e.marketObjectsTypesItem.maxPrice),t.R7$(),t.R50("ngModel",e.priceMin),t.R7$(),t.R50("ngModel",e.priceMax)}}function Ce(n,o){if(1&n&&(t.j41(0,"mat-option",41),t.EFF(1),t.k0s()),2&n){const e=o.$implicit,i=t.XpG(3);t.Y8G("value",i.areaUseGeographicRentalArea?e.id:e.displayName),t.BMQ("data-mom-test","Market_Filter_District_Option_"+e.id),t.R7$(),t.SpI(" ",e.displayName," ")}}function ve(n,o){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"mat-form-field")(2,"mat-label",39),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"mat-select",40),t.mxI("ngModelChange",function(a){r.eBV(e);const s=t.XpG(2);return t.DH7(s.areas,a)||(s.areas=a),r.Njj(a)}),t.Z7z(6,Ce,2,3,"mat-option",41,t.fX1),t.k0s()()()}if(2&n){const e=t.XpG(2);t.R7$(3),t.JRh(t.bMT(4,2,"DISTRICT")),t.R7$(2),t.R50("ngModel",e.areas),t.R7$(),t.Dyx(e.marketObjectsAreas.items)}}function xe(n,o){if(1&n&&(t.j41(0,"mat-option",41),t.EFF(1),t.k0s()),2&n){const e=o.$implicit;t.Y8G("value",e.displayName),t.BMQ("data-mom-test","Market_Filter_Wishes_Option_"+e.displayName),t.R7$(),t.SpI(" ",e.displayName," ")}}function Re(n,o){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"mat-form-field",42)(2,"mat-label",43),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"mat-select",44),t.mxI("ngModelChange",function(a){r.eBV(e);const s=t.XpG(2);return t.DH7(s.includes,a)||(s.includes=a),r.Njj(a)}),t.Z7z(6,xe,2,3,"mat-option",41,t.fX1),t.k0s()()()}if(2&n){const e=t.XpG(2);t.R7$(3),t.JRh(t.bMT(4,2,"WISHES")),t.R7$(2),t.R50("ngModel",e.includes),t.R7$(),t.Dyx(e.marketObjectsIncludes.items)}}function ye(n,o){if(1&n&&(t.j41(0,"mat-option",41),t.EFF(1),t.k0s()),2&n){const e=o.$implicit,i=t.XpG().$implicit;t.Y8G("value",e.id),t.BMQ("data-mom-test","Market_Filter_Alternative_Option_"+i.type+"_"+e.id),t.R7$(),t.SpI(" ",e.displayName," ")}}function je(n,o){if(1&n){const e=t.RV6();t.j41(0,"mat-form-field",42)(1,"mat-label"),t.EFF(2),t.k0s(),t.j41(3,"mat-select",45),t.mxI("ngModelChange",function(a){const s=r.eBV(e).$implicit,l=t.XpG(3);return t.DH7(l.attributesModels[s.type].values,a)||(l.attributesModels[s.type].values=a),r.Njj(a)}),t.Z7z(4,ye,2,3,"mat-option",41,t.fX1),t.k0s()()}if(2&n){const e=o.$implicit,i=t.XpG(3);t.R7$(),t.BMQ("data-mom-test","Market_Filter_Alternative_Label_"+e.type),t.R7$(),t.JRh(e.typeDisplayName),t.R7$(),t.R50("ngModel",i.attributesModels[e.type].values),t.Y8G("name",e.type),t.R7$(),t.Dyx(e.alternatives)}}function Te(n,o){if(1&n&&(t.j41(0,"div"),t.Z7z(1,je,6,4,"mat-form-field",42,t.fX1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Dyx(e.attributesAlternatives)}}function Ie(n,o){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"mat-form-field")(2,"mat-label"),t.EFF(3),t.k0s(),t.j41(4,"input",46,1
1),t.mxI("ngModelChange",function(a){const s=r.eBV(e).$implicit,l=t.XpG(3);return t.DH7(l.attributesModels[s.type].value,a)||(l.attributesModels[s.type].value=a),r.Njj(a)}),t.k0s(),t.j41(6,"mat-error"),t.EFF(7),t.nI1(8,"translate"),t.k0s()()()}if(2&n){const e=o.$implicit,i=t.sdS(5),a=t.XpG(3);t.R7$(2),t.BMQ("data-mom-test","Market_Filter_Text_Label_"+e.type),t.R7$(),t.JRh(e.typeDisplayName),t.R7$(),t.R50("ngModel",a.attributesModels[e.type].value),t.Y8G("name",e.type),t.BMQ("data-mom-test","Market_Filter_Text_Input_"+e.type),t.R7$(2),t.BMQ("data-mom-test","Market_Filter_Text_Error_"+e.type),t.R7$(),t.JRh(t.i5U(8,7,"INVALIDCHARACTERS",t.eq3(10,ue,null==i.errors||null==i.errors.allowedCharacters?null:i.errors.allowedCharacters.invalidChars)))}}function Fe(n,o){if(1&n&&(t.j41(0,"div",9),t.Z7z(1,Ie,9,12,"div",null,t.fX1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Dyx(e.attributesTexts)}}function Oe(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",47)(1,"mat-label"),t.EFF(2),t.k0s()(),t.j41(3,"div")(4,"mat-form-field")(5,"mat-label",48),t.EFF(6,"Min"),t.k0s(),t.j41(7,"input",49),t.mxI("ngModelChange",function(a){const s=r.eBV(e).$implicit,l=t.XpG(3);return t.DH7(l.attributesModels[s.type].minValue,a)||(l.attributesModels[s.type].minValue=a),r.Njj(a)}),t.k0s(),t.j41(8,"mat-error"),t.EFF(9),t.nI1(10,"translate"),t.k0s()(),t.j41(11,"span",50),t.EFF(12,"-"),t.k0s(),t.j41(13,"mat-form-field")(14,"mat-label",51),t.EFF(15,"Max"),t.k0s(),t.j41(16,"input",52),t.mxI("ngModelChange",function(a){const s=r.eBV(e).$implicit,l=t.XpG(3);return t.DH7(l.attributesModels[s.type].maxValue,a)||(l.attributesModels[s.type].maxValue=a),r.Njj(a)}),t.k0s(),t.j41(17,"mat-error"),t.EFF(18),t.nI1(19,"translate"),t.k0s()()()}if(2&n){const e=o.$implicit,i=t.XpG(3);t.R7$(),t.BMQ("data-mom-test","Market_Filter_NumberRange_Label_"+e.type),t.R7$(),t.JRh(e.typeDisplayName),t.R7$(5),t.Y8G("max",i.attributesModels[e.type].maxValue),t.R50("ngModel",i.attributesModels[e.type].minValue),t.Y8G("name",e.type+"Min"),t.BMQ("data-mom-test","Market_Filter_NumberRange_Min_Input_"+e.type),t.R7$(),t.BMQ("data-mom-test","Market_Filter_NumberRange_Min_Error_"+e.type),t.R7$(),t.JRh(t.bMT(10,15,"CANNOTBEMORETHANMAX")),t.R7$(2),t.BMQ("data-mom-test","Market_Filter_NumberRange_Hyphen_"+e.type),t.R7$(5),t.Y8G("min",i.attributesModels[e.type].minValue??1),t.R50("ngModel",i.attributesModels[e.type].maxValue),t.Y8G("name",e.type+"Max"),t.BMQ("data-mom-test","Market_Filter_NumberRange_Max_Input_"+e.type),t.R7$(),t.BMQ("data-mom-test","Market_Filter_NumberRange_Max_Error_"+e.type),t.R7$(),t.JRh(t.bMT(19,17,"CANNOTBELESSTHANMIN"))}}function Se(n,o){if(1&n&&(t.j41(0,"div",10),t.Z7z(1,Oe,20,19,null,null,t.fX1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Dyx(e.attributesNumbers)}}function Ae(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",58),t.nI1(1,"translate"),t.bIt("click",function(){r.eBV(e);const a=t.XpG().$implicit,s=t.XpG(3);return s.attributesModels[a.type].minValue="",r.Njj(s.attributesModels[a.type].maxValue="")}),t.j41(2,"mat-icon"),t.EFF(3,"cancel"),t.k0s()()}if(2&n){const e=t.XpG().$implicit;t.BMQ("aria-label",t.i5U(1,3,"RESETITEM",t.eq3(6,_e,e.typeDisplayName)))("data-mom-test","Market_Filter_DateRange_ResetButton_"+e.type),t.R7$(2),t.BMQ("data-mom-test","Market_Filter_DateRange_ResetIcon_"+e.type)}}function Ee(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",47)(1,"mat-label"),t.EFF(2),t.k0s(),t.nVh(3,Ae,4,8,"button",53),t.k0s(),t.j41(4,"div")(5,"mat-form-field",54),t.bIt("click",function(){r.eBV(e);const a=t.sdS(12);return r.Njj(a.open())}),t.j41(6,"mat-label"),t.EFF(7),t.nI1(8,"translate"),t.k0s(),t.j41(9,"input",55),t.mxI("ngModelChange",function(a){const s=r.eBV(e).$implicit,l=t.XpG(3);return t.DH7(l.attributesModels[s.type].minValue,a)||(l.attributesModels[s.type].minValue=a),r.Njj(a)}),t.k0s(),t.nrm(10,"mat-datepicker-toggle",56)(11,"mat-datepicker",null,2),t.k0s(),t.j41(13,"span",50),t.EFF(14,"-"),t.k0s(),t.j41(15,"mat-form-field",54),t.bIt("click",function(){r.eBV(e);const a=t.sdS(22);return r.Njj(a.open())}),t.j41(16,"mat-label"),t.EFF(17),t.nI1(18,"translate"),t.k0s(),t.j41(19,"input",57),t.mxI("ngModelChange",function(a){const s=r.eBV(e).$implicit,l=t.XpG(3);return t.DH7(l.attributesModels[s.type].maxValue,a)||(l.attributesModels[s.type].maxValue=a),r.Njj(a)}),t.k0s(),t.nrm(20,"mat-datepicker-toggle",56)(21,"mat-datepicker",null,3),t.k0s()()}if(2&n){const e=o.$implicit,i=t.sdS(12),a=t.sdS(22),s=t.XpG(3);t.R7$(),t.BMQ("data-mom-test","Market_Filter_DateRange_Label_"+e.type),t.R7$(),t.JRh(e.typeDisplayName),t.R7$(),t.vxM(s.attributesModels[e.type].minValue||s.attributesModels[e.type].maxValue?3:-1),t.R7$(3),t.BMQ("data-mom-test","Market_Filter_DateRange_From_Label_"+e.type),t.R7$(),t.JRh(t.bMT(8,22,"FROM")),t.R7$(2),t.Y8G("matDatepicker",i),t.R50("ngModel",s.attributesModels[e.type].minValue),t.Y8G("name",e.type+"Min")("max",s.attributesModels[e.type].maxValue),t.BMQ("data-mom-test","Market_Filter_DateRange_From_Input_"+e.type),t.R7$(),t.Y8G("for",i),t.BMQ("data-mom-test","Market_Filter_DateRange_From_Toggle_"+e.type),t.R7$(3),t.BMQ("data-mom-test","Market_Filter_DateRange_Hyphen_"+e.type),t.R7$(3),t.BMQ("data-mom-test","Market_Filter_DateRange_To_Label_"+e.type),t.R7$(),t.JRh(t.bMT(18,24,"TO")),t.R7$(2),t.Y8G("matDatepicker",a),t.R50("ngModel",s.attributesModels[e.type].maxValue),t.Y8G("name",e.type+"Max")("min",s.attributesModels[e.type].minValue??1),t.BMQ("data-mom-test","Market_Filter_DateRange_To_Input_"+e.type),t.R7$(),t.Y8G("for",a),t.BMQ("data-mom-test","Market_Filter_DateRange_To_Toggle_"+e.type)}}function $e(n,o){if(1&n&&(t.j41(0,"div",11),t.Z7z(1,Ee,23,26,null,null,t.fX1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Dyx(e.attributesDates)}}function Pe(n,o){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"mat-checkbox",59),t.mxI("ngModelChange",function(a){const s=r.eBV(e).$implicit,l=t.XpG(3);return t.DH7(l.attributesModels[s.type].value,a)||(l.attributesModels[s.type].value=a),r.Njj(a)}),t.EFF(2),t.k0s()()}if(2&n){const e=o.$implicit,i=t.XpG(3);t.R7$(),t.R50("ngModel",i.attributesModels[e.type].value),t.Y8G("name",e.type),t.BMQ("data-mom-test","Market_Filter_Checkbox_"+e.type),t.R7$(),t.SpI(" ",e.typeDisplayName," ")}}function Ve(n,o){if(1&n&&(t.j41(0,"div",12),t.Z7z(1,Pe,3,4,"div",null,t.fX1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Dyx(e.attributesBools)}}function Ne(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",60),t.bIt("click",function(){r.eBV(e);const a=t.XpG(2);
1return r.Njj(a.saveSubscription(!1))}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}if(2&n){t.XpG(2);const e=t.sdS(1);t.Y8G("disabled",!(null!=e&&e.valid)),t.R7$(),t.SpI(" ",t.bMT(2,2,"SAVESUBSCRIPTION")," ")}}function De(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",61),t.bIt("click",function(){r.eBV(e);const a=t.XpG(2);return r.Njj(a.close())}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}if(2&n){const e=t.XpG(2);t.Y8G("routerLink",e.marketSubscriptionsLink),t.R7$(),t.SpI(" ",t.bMT(2,2,"MYMARKETSUBSCRIPTIONS")," ")}}function Ge(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",4)(1,"div",5)(2,"mat-icon",6),t.EFF(3,"filter_alt"),t.k0s()(),t.j41(4,"div",7),t.nVh(5,fe,14,8,"div"),t.nVh(6,be,14,9,"div"),t.nVh(7,ke,14,9,"div"),t.k0s(),t.j41(8,"div",8),t.nVh(9,ve,8,4,"div"),t.nVh(10,Re,8,4,"div"),t.nVh(11,Te,3,0,"div"),t.k0s(),t.nVh(12,Fe,3,0,"div",9),t.nVh(13,Se,3,0,"div",10),t.nVh(14,$e,3,0,"div",11),t.nVh(15,Ve,3,0,"div",12),t.j41(16,"button",13),t.bIt("click",function(){r.eBV(e);const a=t.XpG();return r.Njj(a.close())}),t.EFF(17),t.nI1(18,"translate"),t.k0s(),t.j41(19,"button",14),t.nI1(20,"translate"),t.bIt("click",function(){r.eBV(e);const a=t.XpG();return r.Njj(a.clear())}),t.EFF(21),t.nI1(22,"translate"),t.k0s(),t.j41(23,"button",15),t.bIt("click",function(){r.eBV(e);const a=t.XpG();return r.Njj(a.saveFilter())}),t.EFF(24),t.nI1(25,"translate"),t.k0s(),t.nVh(26,Ne,3,4,"button",16),t.nVh(27,De,3,4,"button",17),t.k0s()}if(2&n){const e=t.XpG(),i=t.sdS(1);t.R7$(5),t.vxM(null!=e.marketObjectsTypesSubscriptionsSetting&&e.marketObjectsTypesSubscriptionsSetting.numberOfRoomsMin?5:-1),t.R7$(),t.vxM(null!=e.marketObjectsTypesSubscriptionsSetting&&e.marketObjectsTypesSubscriptionsSetting.areaMin?6:-1),t.R7$(),t.vxM(null!=e.marketObjectsTypesSubscriptionsSetting&&e.marketObjectsTypesSubscriptionsSetting.priceMax?7:-1),t.R7$(2),t.vxM(null!=e.marketObjectsTypesSubscriptionsSetting&&e.marketObjectsTypesSubscriptionsSetting.areas&&(null==e.marketObjectsAreas.items?null:e.marketObjectsAreas.items.length)>0?9:-1),t.R7$(),t.vxM((null==e.marketObjectsIncludes||null==e.marketObjectsIncludes.items?null:e.marketObjectsIncludes.items.length)>0?10:-1),t.R7$(),t.vxM((null==e.attributesAlternatives?null:e.attributesAlternatives.length)>0?11:-1),t.R7$(),t.vxM((null==e.attributesTexts?null:e.attributesTexts.length)>0?12:-1),t.R7$(),t.vxM((null==e.attributesNumbers?null:e.attributesNumbers.length)>0?13:-1),t.R7$(),t.vxM((null==e.attributesDates?null:e.attributesDates.length)>0?14:-1),t.R7$(),t.vxM((null==e.attributesBools?null:e.attributesBools.length)>0?15:-1),t.R7$(2),t.SpI(" ",t.bMT(18,17,"CLOSE")," "),t.R7$(2),t.BMQ("aria-label",t.bMT(20,19,"RESETFILTER")),t.R7$(2),t.SpI(" ",t.bMT(22,21,"CLEAR")," "),t.R7$(2),t.Y8G("disabled",!(null!=i&&i.valid)),t.R7$(),t.SpI(" ",t.bMT(25,23,"SAVE")," "),t.R7$(2),t.vxM(e.showSaveSubscription?26:-1),t.R7$(),t.vxM(e.marketSubscriptionsLink?27:-1)}}let we=(()=>{class n{constructor(e,i,a,s,l,c,m,h,_,p,C,R,P){if(this.marketService=e,this.mediaQueryService=i,this.injector=a,this.router=s,this.route=l,this.changeDetectorRef=c,this.data=m,this.clientConfigurationService=h,this.adapter=_,this.translate=p,this.snackBarService=C,this.signinService=R,this.dialog=P,this.filters=[],this.rightSheetRef=null,this.attributesModels={},this.marketSubscriptionsPutAttributes=[],this.adapter.setLocale("sv"),this.marketObjectsTypeId=m.marketObjectsTypeId,this.rightSheetRef=this.injector.get(it.rH,null),m.saveSubscriptionFromSessionStorage){const v=JSON.parse(sessionStorage.getItem("SUBSCRIPTION_TO_SAVE"));if(this.sizeRoomsMin=v.sizeRoomsMin,this.sizeRoomsMax=v.sizeRoomsMax,this.locationAreaMin=v.sizeAreaMin,this.locationAreaMax=v.sizeAreaMax,this.priceMin=v.priceMin,this.priceMax=v.priceMax,this.areas=v.areas?.split(","),v.attributes?.length>0){let q={};for(const O of v.attributes)q[O.type]={values:O.value.replaceAll(";",":")};this.attributesString=JSON.stringify(q)}}else{const v=this.marketService.getMarketObjectsFilterSettings(this.marketObjectsTypeId);this.sizeRoomsMin=this.route.snapshot.queryParams.sizeRoomsMin?this.route.snapshot.queryParams.sizeRoomsMin:v.sizeRoomsMin,this.sizeRoomsMax=this.route.
1snapshot.queryParams.sizeRoomsMax?this.route.snapshot.queryParams.sizeRoomsMax:v.sizeRoomsMax,this.locationAreaMin=this.route.snapshot.queryParams.locationAreaMin?this.route.snapshot.queryParams.locationAreaMin:v.locationAreaMin,this.locationAreaMax=this.route.snapshot.queryParams.locationAreaMax?this.route.snapshot.queryParams.locationAreaMax:v.locationAreaMax,this.priceMin=this.route.snapshot.queryParams.priceMin?this.route.snapshot.queryParams.priceMin:v.priceMin,this.priceMax=this.route.snapshot.queryParams.priceMax?this.route.snapshot.queryParams.priceMax:v.priceMax,this.areas=this.route.snapshot.queryParams.areas?this.route.snapshot.queryParams.areas.split(","):v.areas,this.includes=this.route.snapshot.queryParams.includes?this.route.snapshot.queryParams.includes.split(","):v.includes,this.attributesString=this.route.snapshot.queryParams.attributes?this.route.snapshot.queryParams.attributes:v.attributes}}ngOnInit(){this.data.saveSubscriptionFromSessionStorage&&this.saveSubscription(!0),this.clientConfigurationService.getClientConfigurationFeatures().pipe((0,x.H)(e=>(e?.subscription?.enabled&&(this.marketSubscriptionsLink=D.t.MARKETSUBSCRIPTIONS),this.areaUseGeographicRentalArea=e?.areaUseGeographicRentalArea?.enabled,(0,L.p)([this.marketService.getMarketObjectsTypesItem(this.marketObjectsTypeId),this.areaUseGeographicRentalArea?this.marketService.getMarketObjectsTypesAreas(this.marketObjectsTypeId):this.marketService.getMarketObjectsAreas(),this.marketService.getMarketObjectsTypesItemSubscriptionsSetting(this.marketObjectsTypeId),this.marketService.getMarketSubscriptionsMarketObjectsTypes()])))).subscribe(e=>{this.marketObjectsTypesItem=e[0],this.marketSubscriptionsMarketObjectsTypes=e[3],this.sizeRoomsMin=this.sizeRoomsMin?this.sizeRoomsMin:this.marketObjectsTypesItem.minNumberOfRooms?+this.marketObjectsTypesItem.minNumberOfRooms:0,this.sizeRoomsMax=this.sizeRoomsMax?this.sizeRoomsMax:+this.marketObjectsTypesItem.maxNumberOfRooms,this.locationAreaMin=this.locationAreaMin?this.locationAreaMin:this.marketObjectsTypesItem.minSize?+this.marketObjectsTypesItem.minSize:0,this.locationAreaMax=this.locationAreaMax?this.locationAreaMax:+this.marketObjectsTypesItem.maxSize,this.priceMin=this.priceMin?this.priceMin:this.marketObjectsTypesItem.minPrice?+this.marketObjectsTypesItem.minPrice:0,this.priceMax=this.priceMax?this.priceMax:+this.marketObjectsTypesItem.maxPrice,this.marketObjectsAreas=e[1];const i=e[0].attributes?.filter(a=>a.canHaveFilter);this.marketObjectsTypesSubscriptionsSetting=e[2],i?.length>0?(this.attributesAlternatives=i.filter(a=>a.isAlternative&&a.alternatives.filter(s=>s.id)?.length>0),this.buildAttributeModels(this.attributesAlternatives,"isAlternative"),this.attributesBools=i.filter(a=>a.isBool),this.buildAttributeModels(this.attributesBools,"isBool"),this.attributesDates=i.filter(a=>a.isDate),this.buildAttributeModels(this.attributesDates,"isDate"),this.attributesNumbers=i.filter(a=>a.isNumber),this.buildAttributeModels(this.attributesNumbers,"isNumber"),this.attributesTexts=i.filter(a=>a.isText),this.buildAttributeModels(this.attributesTexts,"isText"),this.setAttributeModelsValues(),this.setShowSaveSubscription()):this.marketService.getMarketObjectsIncludes().subscribe(a=>{this.marketObjectsIncludes=a,this.changeDetectorRef.detectChanges(),this.setShowSaveSubscription()}),this.changeDetectorRef.detectChanges()})}formatLabel(e){return e>=1e3?Math.round(e/1e3)+"k":e}close(){this.rightSheetRef.dismiss("cancel")}saveFilter(e){const i=this.sizeRoomsMin&&+this.sizeRoomsMin!=+this.marketObjectsTypesItem.minNumberOfRooms?+this.sizeRoomsMin:void 0,a=this.sizeRoomsMax&&+this.sizeRoomsMax!=+this.marketObjectsTypesItem.maxNumberOfRooms?+this.sizeRoomsMax:void 0,s=this.locationAreaMin&&+this.locationAreaMin!=+this.marketObjectsTypesItem.minSize?+this.locationAreaMin:void 0,l=this.locationAreaMax&&+this.locationAreaMax!=+this.marketObjectsTypesItem.maxSize?+this.locationAreaMax:void 0,c=this.priceMin&&+this.priceMin!=+this.marketObjectsTypesItem.minPrice?+this.priceMin:void 0,m=this.priceMax&&+this.priceMax!=+this.marketObjectsTypesItem.maxPrice?+this.priceMax:void 0;this.rightSheetRef.dismiss();const h={sizeRoomsMin:i,sizeRoomsMax:a,locationAreaMin:s,locationAreaMax:l,priceMin:c,priceMax:m,clear:e,areas:this.areas&&this.areas.length>0?this.areas?.join(","):null,includes:this.includes&&this.includes.length>0?this.includes?.join(","):null,attributes:null,page:null};if(!e){let _={};this.attributesString=null,Object.keys(this.attributesModels).forEac
1h(p=>{switch(this.attributesModels[p].type){case"isAlternative":this.attributesModels[p].values?.length>0&&(_[p]={values:this.attributesModels[p].values.join(":")});break;case"isBool":!0===this.attributesModels[p].value&&(_[p]={values:this.attributesModels[p].value});break;case"isDate":if("object"==typeof this.attributesModels[p].minValue||"object"==typeof this.attributesModels[p].maxValue){const C=this.attributesModels[p].minValue?f()(this.attributesModels[p].minValue).format("YYYY-MM-DD"):null,R=this.attributesModels[p].maxValue?f()(this.attributesModels[p].maxValue).format("YYYY-MM-DD"):null;_[p]={values:C+":"+R}}break;case"isNumber":"number"!=typeof this.attributesModels[p].minValue&&"number"!=typeof this.attributesModels[p].maxValue||(_[p]={values:(this.attributesModels[p].minValue?this.attributesModels[p].minValue:null)+":"+(this.attributesModels[p].maxValue?this.attributesModels[p].maxValue:null)});break;case"isText":this.attributesModels[p].value&&""!==this.attributesModels[p].value&&(_[p]={values:this.attributesModels[p].value})}Object.keys(_).length>0&&(this.attributesString=JSON.stringify(_),h.attributes=this.attributesString)})}Object.values(h).filter(_=>_)?.length>0?(this.router.navigate([],{relativeTo:this.route,queryParams:h,queryParamsHandling:"merge"}),e||this.marketService.saveMarketObjectsFilterSettings(this.marketObjectsTypeId,i,a,s,l,c,m,this.areas,this.includes,this.attributesString)):this.clear()}clear(){this.sizeRoomsMin=null,this.sizeRoomsMax=null,this.locationAreaMin=null,this.locationAreaMax=null,this.priceMin=null,this.priceMax=null,this.areas=null,this.includes=null,this.sizeRoomsMin=this.sizeRoomsMin?this.sizeRoomsMin:this.marketObjectsTypesItem.minNumberOfRooms?+this.marketObjectsTypesItem.minNumberOfRooms:0,this.sizeRoomsMax=this.sizeRoomsMax?this.sizeRoomsMax:+this.marketObjectsTypesItem.maxNumberOfRooms,this.locationAreaMin=this.locationAreaMin?this.locationAreaMin:this.marketObjectsTypesItem.minSize?+this.marketObjectsTypesItem.minSize:0,this.locationAreaMax=this.locationAreaMax?this.locationAreaMax:+this.marketObjectsTypesItem.maxSize,this.priceMin=this.priceMin?this.priceMin:this.marketObjectsTypesItem.minPrice?+this.marketObjectsTypesItem.minPrice:0,this.priceMax=this.priceMax?this.priceMax:+this.marketObjectsTypesItem.maxPrice,this.marketService.clearMarketObjectsFilterSettings(this.marketObjectsTypeId),this.saveFilter(!0)}buildAttributeModels(e,i){if(e)for(const a of e)this.attributesModels[a.type]={type:i}}setAttributeModelsValues(){if(this.attributesString){const e=JSON.parse(this.attributesString);Object.keys(e).forEach(i=>{switch(this.attributesModels[i]?.type){case"isAlternative":this.attributesModels[i].values=e[i].values.split(":");break;case"isBool":case"isText":this.attributesModels[i].value=e[i].values;break;case"isDate":this.attributesModels[i].minValue="null"!==e[i].values.split(":")[0]?new Date(e[i].values.split(":")[0]):null,this.attributesModels[i].maxValue="null"!==e[i].values.split(":")[1]?new Date(e[i].values.split(":")[1]):null;break;case"isNumber":const a=e[i].values.split(":")[0],s=e[i].values.split(":")[1];this.attributesModels[i].minValue="null"!==a?+a:null,this.attributesModels[i].maxValue="null"!==s?+s:null}})}}saveSubscriptionClicked(){this.includes?.length>0?this.dialog.open(E.w,{data:{text:this.translate.instant("SUBSCRIPTIONWISHES",{whishes:this.translate.instant("WISHES").toLowerCase()}),dialogChoices:V.$.Custom,customButtonText:"Ok"},scrollStrategy:new A.t0,ariaLabel:this.translate.instant("SUBSCRIPTIONWISHES",{whishes:this.translate.instant("WISHES").toLowerCase()}),autoFocus:!1}).afterClosed().subscribe(i=>{"custom"===i&&this.saveSubscription(!1)}):this.saveSubscription(!1)}saveSubscription(e){if(e){const i=JSON.parse(sessionStorage.getItem("SUBSCRIPTION_TO_SAVE"));sessionStorage.removeItem("SUBSCRIPTION_TO_SAVE"),this.signinService.isAuth&&this.marketService.putMarketSubscriptions(i).subscribe(()=>{this.snackBarService.success(this.translate.instant("SUBSCRIPTIONSAVED"))})}else{Object.keys(this.attributesModels).forEach(_=>{switch(this.attributesModels[_].type){case"isAlternative":this.attributesModels[_].values?.length>0&&this.marketSubscriptionsPutAttributes.push({type:_,isNumber:!1,isText:!1,isDate:!1,isBool:!1,isAlternative:!0,value:this.attributesModels[_].values.join(";")});break;case"isBool":!0===this.attributesModels[_].value&&this.marketSubscriptionsPutAttributes.push({type:_,isNumber:!1,isText:!1,isDate:!1,isBool:!0,isAlternative:!1,value:this.attributesModels[_].value.toString().toLowerCase()});break;case"isDate":if("object"==typeof this.attributesModels[_].minValue||"object"==typeof this.attributesModels[_].maxValue){const p=this.attributesModels[_].minValue?f()(this.attributesModels[_].minValue).format("YYYY-MM-DD"):null,C=this.attributesModels[_].maxValue?f()(this.attributesModels[_].maxValue).format("YYYY-MM-DD"):null;this.marketSubscriptionsPutAttributes.push({type:_,isNumber:!1,isText:!1,isDate:!0,isBool:!1,isAlternative:!1,value:p+";"+C})}break;case"isNumber":"number"!=typeof this.attributesModels[_].minValue&&"number"!=typeof this.attributesModels[_].maxValue||this.marketSubscriptionsPutAttributes.push({type:_,isNumber:!0,isText:!1,isDate:!1,isBool:!1,isAlternative:!1,value:(this.attributesModels[_].minValue?this.attributesModels[_].minValue:null)+";"+(this.attributesModels[_].maxValue?this.attributesModels[_].maxValue:null)});break;case"isText":this.attributesModels[_].value&&""!==this.attributesModels[_].value&&this.marketSubscriptionsPutAttributes.push({type:_,isNumber:!1,isText:!0,isDate:!1,isBool:!1,isAlternative:!1,value:this.attributesModels[_].value})}});let h={marketObjectType:this.marketObjectsTypeId,sizeRoomsMin:this.sizeRoomsMin&&+this.sizeRoomsMin!=+this.marketObjectsTypesItem.minNumberOfRooms?+this.sizeRoomsMin:void 0,sizeRoomsMax:this.sizeRoomsMax&&+this.sizeRoomsMax!=+this.marketObjectsTypesItem.maxNumberOfRooms?+this.sizeRoomsMax:void 0,sizeAreaMin:this.locationAreaMin&&+this.locationAreaMin!=+this.marketObjectsTypesItem.minSize?+this.locationAreaMin:void 0,sizeAreaMax:this.locationAreaMax&&+this.locationAreaMax!=+this.marketObjectsTypesItem.maxSize?+this.locationAreaMax:void 0,priceMin:this.priceMin&&+this.priceMin!=+this.marketObjectsTypesItem.minPrice?+this.priceMin:void 0,priceMax:this.priceMax&&+this.priceMax!=+this.marketObjectsTypesItem.maxPrice?+this.priceMax:void 0,areas:this.areas&&this.areas.length>0?this.areas?.join(","):null,attributes:this.marketSubscriptionsPutAttributes};this.signinService.isAuth?this.marketService.putMarketSubscriptions(h).subscribe(()=>{this.snackBarService.success(this.translate.instant("SUBSCRIPTIONSAVED"))}):(this.rightSheetRef.dismiss("cancel"),sessionStorage.setItem("SUBSCRIPTION_TO_SAVE",JSON.stringify(h)),this.router.navigate(["/signin"],{queryParams:{returnUrl:this.router.url}}))}}setShowSaveSubscription(){this.marketSubscriptionsLink&&this.marketSubscriptionsMarketObjectsTypes.items.find(e=>e.id===this.marketObjectsTypeId)&&(this.marketObjectsIncludes?.items?.length>0||(this.showSaveSubscription=!0,this.changeDetectorRef.detectChanges()))}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(S),t.rXU(T.M),t.rXU(r.zZn),t.rXU(F.Ix),t.rXU(F.nX),t.rXU(y.gRc),t.rXU(it.Zu),t.rXU(W.t),t.rXU(pt.MJ),t.rXU(b.c$),t.rXU(Q.z),t.rXU(yt.W),t.rXU(k.bZ))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-objects-filter"]],standalone:!1,decls:3,vars:1,consts:[["form","ngForm"],["attrModel","ngModel"],["fomPicker",""],["tomPicker",""],[1,"filters"],[1,"icon"],["color","primary","data-mom-test","Market_Filter_FilterIcon",1,"filter-icon"],[1,"sliders","mat-body"],[1,"selects"],[1,"inputs"],[1,"input-ranges"],[1,"dates"],[1,"checkboxes"],["matButton","tonal","data-mom-test","Market_Filter_Close_Button",1,"close-button",3,"click"],["matButton","tonal","data-mom-test","Market_Filter_Clear_Button",1,"close-button",3,"click"],["matButton","tonal","color","primary","data-mom-test","Market_Filter_Save_Button",1,"save-button",3,"click","disabled"],["matButton","tonal","color","primary","data-mom-test","Market_Filter_SaveSubscription_Button",1,"save-button",3,"disabled"],["matButton","tonal","data-mom-test","Market_Filter_MySubscriptions_Button",1,"close-button",3,"routerLink"],["data-mom-test","Market_Filter_NumberOfRooms_Legend"],["data-mom-test","Market_Filter_NumberOfRooms_RangeText"],[1,"group-labels-container"],["for","sizeRoomsMin","data-mom-test","Market_Filter_NumberOfRooms_MinLabel"],["for","sizeRoomsMax","data-mom-test","Market_Filter_NumberOfRooms_MaxLabel"],["color","primary","ngDefaultControl","",3,"min","max"],["id","sizeRoomsMin","matSliderStartThumb","","name","sizeRoomsMin","autocomplete","off","data-mom-test","Market_Filter_NumberOfRooms_MinInput",3,"ngModelChange","ngModel"],["id","sizeRoomsMax","matSliderEndThumb","","name","sizeRoomsMax","autocomplete","off","data-mom-test","Market_Filter_NumberOfRooms_MaxInput",3,"ngModelChange","ngModel"],["data-mom-test","Market_Filter_SizeSqm_Legend"],["data-mom-test","Market_Filter_SizeSqm_RangeText"],["for","locationAreaMin","data-mom-test","Market_Filter_SizeSqm_MinLabel"],["for","locationAreaMax","data-mom-test","Market_Filter_SizeSqm_MaxLabel"],["color","primary","ngDefaultControl","",3,"step","min","max"],["id","locationAreaMin","matSliderStartThumb","","name","locationAreaMin","autocomplete","off","data-mom-test","Market_Filter_SizeSqm_MinInput",3,"ngModelChange","ngModel"],["id","locationAreaMax","matSliderEndThumb","","name","locationAreaMax","autocomplete","off","data-mom-test","Market_Filter_SizeSqm_MaxInput",3,"ngModelChange","ngModel"],["data-mom-test","Market_Filter_Price_Legend"],["data-mom-test","Market_Filter_Price_RangeText"],["for","priceMin","data-mom-test","Market_Filter_Price_MinLabel"],["for","priceMax","data-mom-test","Market_Filter_Price_MaxLabel"],["id","priceMin","matSliderStartThumb","","name","priceMin","autocomplete","off","data-mom-test","Market_Filter_Price_MinInput",3,"ngModelChange","ngModel"],["id","priceMax","matSliderEndThumb","","name","priceMax","autocomplete","off","data-mom-test","Market_Filter_Price_MaxInput",3,"ngModelChange","ngModel"],["data-mom-test","Market_Filter_District_Label"],["multiple","","ngDefaultControl","","name","areas","data-mom-test","Market_Filter_District_Select",3,"ngModelChange","ngModel"],[3,"value"],["ngDefaultControl",""],["data-mom-test","Market_Filter_Wishes_Label"],["multiple","","ngDefaultControl","","name","includes","data-mom-test","Market_Filter_Wishes_Select",3,"ngModelChange","ngModel"],["multiple","","ngDefaultControl","",3,"ngModelChange","ngModel","name"],["matInput","","taigaAllowedCharacters","","autocomplete","off",3,"ngModelChange","ngModel","name"],[2,"display","flex","justify-content","space-between","height","40px"],["data-mom-test","Market_Filter_NumberRange_Min_Label"],["matInput","","min","1","type","number","autocomplete","off",3,"ngModelChange","max","ngModel","name"],[1,"hyphen"],["data-mom-test","Market_Filter_NumberRange_Max_Label"],["matInput","","type","number","autocomplete","off",3,"ngModelChange","min","ngModel","name"],["mat-icon-button","","color","primary"],[3,"click"],["matInput","","readonly","true","min","1","autocomplete","off",3,"ngModelChange","matDatepicker","ngModel","name","max"],["matIconSuffix","",3,"for"],["matInput","","readonly","true","autocomplete","off",3,"ngModelChange","matDatepicker","ngModel","name","min"],["mat-icon-button","","color","primary",3,"click"],["color","primary",1,"checkbox",3,"ngModelChange","ngModel","name"],["matButton","tonal","color","primary","data-mom-test","Market_Filter_SaveSubscription_Button",1,"save-button",3,"click","disabled"],["matButton","tonal","data-mom-test","Market_Filter_MySubscriptions_Button",1,"close-button",3,"click","routerLink"]],template:function(i,a){1&i&&(t.j41(0,"form",null,0),t.nVh(2,Ge,28,25,"div",4),t.k0s()),2&i&&(t.R7$(2),t.vxM(a.marketObjectsTypesItem&&a.marketObjectsAreas?2:-1))},dependencies:[U.Wk,G.An,I.$z,lt.iY,at.fg,j.rl,j.nJ,j.TL,j.yw,B.Vh,B.bZ,B.bU,ut.VO,_t.wT,ht.So,u.qT,u.me,u.Q0,u.BC,u.cb,u.VZ,u.zX,u.vS,u.cV,jt.S,St,bt,b.D9],styles:["mat-slider[_ngcontent-%COMP%]{width:94%}mat-form-field[_ngcontent-%COMP%]{width:100%}.selects[_ngcontent-%COMP%], .checkboxes[_ngcontent-%COMP%], .sliders[_ngcontent-%COMP%]{width:100%}.icon[_ngcontent-%COMP%]{display:flex;justify-content:center}.filters[_ngcontent-%COMP%]{margin-top:30px}.filter-icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-width:40px;min-height:40px;font-size:1.875rem;border:solid;border-radius:50%;margin-bottom:8px}.close-button[_ngcontent-%COMP%], .save-button[_ngcontent-%COMP%]{width:100%;margin-top:10px}mat-select[_ngcontent-%COMP%]{width:97%}.checkboxes[_ngcontent-%COMP%], .dates[_ngcontent-%COMP%]{margin-bottom:12px}.dates[_ngcontent-%COMP%]   div[_ngcontent-%COMP%], .input-ranges[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.hyphen[_ngcontent-%COMP%]{margin-left:15px;margin-right:15px;margin-bottom:10px}.dates[_ngcontent-%COMP%]   mat-form-field[_ngcontent-%COMP%], .input-ranges[_ngcontent-%COMP%]   mat-form-field[_ngcontent-%COMP%]{margin-bottom:8px}fieldset[_ngcontent-%COMP%]{border:none;padding:0}legend[_ngcontent-%COMP%]{padding:0}.group-labels-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-top:8px}"],changeDetection:0})}}return n})();var Xe=d(4572),Be=d(2099),Mt=d(345),Ue=d(1975),K=d(3013),w=d(6112),H=d(7201),kt=d(6695),Le=d(5665),M=d(5596);const ze=n=>({place:n}
1);function Ye(n,o){if(1&n&&t.nrm(0,"img",5),2&n){const e=t.XpG(2);t.Y8G("alt",null==e.marketObject.thumbnail?null:e.marketObject.thumbnail.displayName)("src",e.getMarketObjectThumbnail(e.marketObject.id,null==e.marketObject.thumbnail?null:e.marketObject.thumbnail.version),t.B4B)}}function Qe(n,o){1&n&&(t.j41(0,"div",6)(1,"mat-icon",20),t.nI1(2,"translate"),t.EFF(3,"hide_image"),t.k0s()()),2&n&&(t.R7$(),t.BMQ("aria-label",t.bMT(2,1,"NOIMAGE")))}function He(n,o){if(1&n&&(t.nrm(0,"taiga-pill-badge",14),t.nI1(1,"translate")),2&n){const e=t.XpG(2);t.Y8G("text",t.i5U(1,1,"QUEUEPLACE",t.eq3(4,ze,e.placeSorted)))}}function Je(n,o){if(1&n&&t.nrm(0,"taiga-pill-badge",15),2&n){const e=t.XpG(2);t.Y8G("text",e.statusDisplayName)}}function qe(n,o){if(1&n&&(t.j41(0,"span",17),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.JRh(null==e.marketObject.location||null==e.marketObject.location.area?null:e.marketObject.location.area.displayName)}}function We(n,o){1&n&&t.EFF(0," , ")}function Ze(n,o){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.k0s(),t.nVh(2,We,1,0)),2&n){const e=o.$implicit,i=o.$index,a=t.XpG(3);t.BMQ("data-mom-test","Market_ObjectCard_LocationAreaPath_"+i),t.R7$(),t.JRh(e.displayName),t.R7$(),t.vxM((null==a.marketObject.location?null:a.marketObject.location.areaPath.length)>1&&i!==(null==a.marketObject.location?null:a.marketObject.location.areaPath.length)-1?2:-1)}}function Ke(n,o){if(1&n&&(t.j41(0,"span"),t.Z7z(1,Ze,3,3,null,null,t.fX1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Dyx(null==e.marketObject.location?null:e.marketObject.location.areaPath)}}function ti(n,o){if(1&n&&(t.j41(0,"div",21)(1,"div",22),t.EFF(2),t.k0s(),t.j41(3,"div",23),t.EFF(4),t.k0s()()),2&n){const e=t.XpG(2).$implicit;t.R7$(),t.BMQ("data-mom-test","Market_ObjectCard_DetailValue_"+e.type),t.R7$(),t.SpI(" ",e.values," "),t.R7$(),t.BMQ("data-mom-test","Market_ObjectCard_DetailLabel_"+e.type),t.R7$(),t.SpI(" ",e.displayName," ")}}function ei(n,o){if(1&n&&(t.j41(0,"div",21)(1,"div",22),t.EFF(2),t.k0s(),t.j41(3,"div",23),t.EFF(4),t.k0s()()),2&n){const e=t.XpG(2).$implicit;t.R7$(),t.BMQ("data-mom-test","Market_ObjectCard_DetailValue_"+e.type),t.R7$(),t.SpI(" ",e.values," "),t.R7$(),t.BMQ("data-mom-test","Market_ObjectCard_DetailLabel_"+e.type),t.R7$(),t.SpI(" ",e.displayName," ")}}function ii(n,o){if(1&n&&(t.j41(0,"div",21)(1,"div",22),t.EFF(2),t.k0s(),t.j41(3,"div",23),t.EFF(4),t.k0s()()),2&n){const e=t.XpG(2).$implicit;t.R7$(),t.BMQ("data-mom-test","Market_ObjectCard_DetailValue_"+e.type),t.R7$(),t.SpI(" ",e.values," "),t.R7$(),t.BMQ("data-mom-test","Market_ObjectCard_DetailLabel_"+e.type),t.R7$(),t.SpI(" ",e.displayName," ")}}function ni(n,o){if(1&n&&(t.nVh(0,ti,5,4,"div",21),t.nVh(1,ei,5,4,"div",21),t.nVh(2,ii,5,4,"div",21)),2&n){const e=t.XpG().$implicit;t.XpG(2);const i=t.sdS(21),a=t.XpG();t.vxM("size.roomsDisplayName"!==e.type&&"size.shortRoomsDisplayName"!==e.type?0:-1),t.R7$(),t.vxM("size.roomsDisplayName"===e.type&&(a.getDetailsWidth(i)>=345||!a.fieldExists("size.shortRoomsDisplayName"))?1:-1),t.R7$(),t.vxM("size.shortRoomsDisplayName"===e.type&&(a.getDetailsWidth(i)<345||!a.fieldExists("size.roomsDisplayName"))?2:-1)}}function ai(n,o){1&n&&t.nVh(0,ni,3,3),2&n&&t.vxM(o.$implicit.values?0:-1)}function si(n,o){if(1&n&&t.Z7z(0,ai,1,1,null,null,t.fX1),2&n){const e=t.XpG(2);t.Dyx(e.marketObjektListDataFields)}}function oi(n,o){if(1&n&&(t.j41(0,"div",21)(1,"div",24),t.EFF(2),t.k0s(),t.j41(3,"div",25),t.EFF(4),t.nI1(5,"translate"),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.SpI(" ",e.marketObject.size.roomsDisplayName," "),t.R7$(2),t.SpI(" ",t.bMT(5,2,"SIZEAREA")," ")}}function ri(n,o){if(1&n&&(t.j41(0,"div",21)(1,"div",26),t.EFF(2),t.k0s(),t.j41(3,"div",27),t.EFF(4),t.nI1(5,"translate"),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.SpI(" ",e.marketObject.size.shortRoomsDisplayName," "),t.R7$(2),t.SpI(" ",t.bMT(5,2,"SIZEAREA")," ")}}function li(n,o){if(1&n&&(t.j41(0,"div",21)(1,"div",28),t.EFF(2),t.k0s(),t.j41(3,"div",29),t.EFF(4),t.nI1(5,"translate"),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.SpI(" ",e.marketObject.size.area," "),t.R7$(2),t.SpI(" ",t.bMT(5,2,"KVM")," ")}}function ci(n,o){if(1&n&&(t.j41(0,"div",21)(1,"div",30),t.EFF(2),t.k0s(),t.j41(3,"div",31),t.EFF(4),t.nI1(5,"translate"),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.SpI(" ",null==e.marketObject||null==e.marketObject.pricing||null==e.marketObject.pricing.price?null:e.marketObject.pricing.price.toFixed()," "),t.R7$(2),t.SpI(" ",t.bMT(5,2,"SEKPERMONTH")," ")}}function mi(n,o){if(1&n&&(t.j41(0,"div",21)(1,"div",32),t.EFF(2),t.k0s(),t.j41(3,"div",33),t.EFF(4),t.nI1(5,"translate"),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.SpI(" ",e.formatavailableFromDate(null==e.marketObject||null==e.marketObject.availability?null:e.marketObject.availability.availableFrom)," "),t.R7$(2),t.SpI(" ",t.bMT(5,2,"AVAILABLEFROM")," ")}}function di(n,o){if(1&n&&(t.nVh(0,oi,6,4,"div",21),t.nVh(1,ri,6,4,"div",21),t.nVh(2,li,6,4,"div",21),t.nVh(3,ci,6,4,"div",21),t.nVh(4,mi,6,4,"div",21)),2&n){t.XpG();const e=t.sdS(21),i=t.XpG();t.vxM(null!=i.marketObject.size&&i.marketObject.size.roomsDisplayName&&i.getDetailsWidth(e)>=345?0:-1),t.R7$(),t.vxM(null!=i.marketObject.size&&i.marketObject.size.shortRoomsDisplayName&&i.getDetailsWidth(e)<345?1:-1),t.R7$(),t.vxM(null!=i.marketObject.size&&i.marketObject.size.area?2:-1),t.R7$(),t.vxM(null!=i.marketObject&&null!=i.marketObject.pricing&&i.marketObject.pricing.price?3:-1),t.R7$(),t.vxM(null!=i.marketObject&&null!=i.marketObject.availability&&i.marketObject.availability.availableFrom?4:-1)}}function pi(n,o){if(1&n&&(t.j41(0,"div",19)(1,"div"),t.nrm(2,"taiga-markdown",34),t.k0s()()),2&n){const e=t.XpG(2);t.R7$(2),t.Y8G("markdown",e.marketObject.description)}}function ui(n,o){if(1&n){const e=t.RV6();t.j41(0,"mat-card",2),t.bIt("click",function(){r.eBV(e);const a=t.XpG();
1return r.Njj(a.marketObjectClick(a.marketObject.id))})("mouseenter",function(a){r.eBV(e);const s=t.XpG();return r.Njj(s.addClass(a))})("mouseleave",function(a){r.eBV(e);const s=t.XpG();return r.Njj(s.removeClass(a))}),t.j41(1,"mat-card-content")(2,"div",3)(3,"div",4),t.nVh(4,Ye,1,2,"img",5),t.nVh(5,Qe,4,3,"div",6),t.k0s()(),t.j41(6,"div",7)(7,"div",8)(8,"div",9)(9,"div",10)(10,"button",11),t.bIt("click",function(){r.eBV(e);const a=t.XpG();return r.Njj(a.marketObjectClick(a.marketObject.id))}),t.j41(11,"div",12),t.EFF(12),t.k0s()(),t.j41(13,"div",13),t.nVh(14,He,2,6,"taiga-pill-badge",14),t.nVh(15,Je,1,1,"taiga-pill-badge",15),t.k0s()(),t.j41(16,"mat-card-subtitle")(17,"div",16),t.nVh(18,qe,2,1,"span",17),t.nVh(19,Ke,3,0,"span"),t.k0s()()(),t.j41(20,"div",18,0),t.nVh(22,si,2,0),t.nVh(23,di,5,5),t.k0s(),t.nVh(24,pi,3,1,"div",19),t.k0s()()()()}if(2&n){const e=t.XpG();t.Y8G("id",t.mNQ(e.marketObject.id)),t.R7$(),t.AVh("is-mobile",e.mediaQueryService.isMobile())("is-desktop",!e.mediaQueryService.isMobile()),t.R7$(),t.AVh("image-container-mobile",e.mediaQueryService.isMobile())("image-container",!e.mediaQueryService.isMobile()),t.R7$(2),t.vxM(null!=e.marketObject.thumbnail&&e.marketObject.thumbnail.exists?4:-1),t.R7$(),t.vxM(null!=e.marketObject.thumbnail&&e.marketObject.thumbnail.exists?-1:5),t.R7$(),t.AVh("info-container-mobile",e.mediaQueryService.isMobile())("info-container",!e.mediaQueryService.isMobile()),t.R7$(2),t.AVh("header-desktop",!e.mediaQueryService.isMobile()),t.R7$(4),t.SpI(" ",e.marketObject.displayName," "),t.R7$(2),t.vxM(e.placeSorted?14:-1),t.R7$(),t.vxM(e.statusDisplayName?15:-1),t.R7$(3),t.vxM(e.areaUseGeographicRentalArea?-1:18),t.R7$(),t.vxM(e.areaUseGeographicRentalArea?19:-1),t.R7$(),t.AVh("details-item-margin-right",(null==e.marketObjektListDataFields?null:e.marketObjektListDataFields.length)>5),t.R7$(2),t.vxM((null==e.marketObjektListDataFields?null:e.marketObjektListDataFields.length)>0?22:-1),t.R7$(),t.vxM((null==e.marketObjektListDataFields?null:e.marketObjektListDataFields.length)>0?-1:23),t.R7$(),t.vxM(null!=e.marketObject&&e.marketObject.description?24:-1)}}let Et=(()=>{class n{set dataFields(e){e&&(this.marketObjektListDataFields=JSON.parse(JSON.stringify(e)))}constructor(e,i,a,s){this.mediaQueryService=e,this.marketService=i,this.cdr=a,this.translate=s,this.marketObjectClicked=new t.bkB}ngOnInit(){if(this.marketObjektListDataFields?.length>0)for(const e of this.marketObjektListDataFields){const i=e.type.split(".");let a;if(a=i[1]?this.marketObject[i[0]]?.[i[1]]:this.marketObject[i[0]],a)switch(e.type){case"pricing.price":case"pricing.priceInclVAT":e.values=a.toFixed();break;case"availability.availableFrom":e.values=this.formatavailableFromDate(a);break;case"application.openFrom":case"publishing.publishedFrom":case"publishing.publishedTo":case"availability.earlyAvailabilityPossibleFrom":e.values=this.formatDate(a);break;case"application.openTo":e.values=this.formatOpenToDate(a);break;case"location.address":e.values=a?.completeAdress;break;case"included":for(const s of a)e.values=e.values?`${e.values} \n ${s.displayName}`:s.displayName;break;case"attributes":e.values=a;break;case"location.area.displayName":e.values=a?.displayName;break;default:e.values="boolean"==typeof a?this.translate.instant(a?"YES":"NO"):a}}this.marketObject?.location?.areaPath?.reverse()?.splice(2)}formatDate(e){return f()(e).format("YYYY-MM-DD")}formatavailableFromDate(e){return f()(e).isAfter(Date.now())?f()(e).format("YYYY-MM-DD"):this.translate.instant("AVAILABLENOW")}formatOpenToDate(e){const i=f()(f()(e).format("HH:mm"),"HH:mm"),a=f()("23:59","HH:mm");return i.isBefore(a)?f()(e).format("YYYY-MM-DD HH:mm"):f()(e).format("YYYY-MM-DD")}marketObjectClick(e){this.marketObjectClicked.emit(e)}addClass(e){e.currentTarget.classList.add("mat-elevation-z2")}removeClass(e){e.currentTarget.classList.remove("mat-elevation-z2")}getMarketObjectThumbnail(e,i){return this.marketService.getMarketObjectThumbnail(e,i)}getDetailsWidth(e){return e&&e.offsetWidth!=this.lastDetailsWidth&&(this.lastDetailsWidth=e.offsetWidth,this.cdr.detectChanges(),this.cdr.detach(),setTimeout(()=>{this.cdr.reattach()},100)),this.lastDetailsWidth}fieldExists(e){return this.marketObjektListDataFields.find(i=>i.type===e)}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(T.M),t.rXU(S),t.rXU(y.gRc),t.rXU(b.c$))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-object-card"]],inputs:{marketObject:"marketObject",statusDisplayName:"statusDisplayName",areaUseGeographicRentalArea:"areaUseGeographicRentalArea",placeSorted:"placeSorted",dataFields:"dataFields"},outputs:{marketObjectClicked:"marketObjectClicked"},standalone:!1,decls:1,vars:1,consts:[["details",""],[1,"object-card",3,"id"],[1,"object-card",3,"click","mouseenter","mouseleave","id"],[2,"padding","10px"],[1,"image-content"],["data-mom-test","Market_ObjectCard_Thumbnail",1,"image",3,"alt","src"],[1,"n
1o-image"],["data-mom-test","MyPages_AvailableObjects_Listing"],[1,"info-content"],[1,"header"],[1,"address"],["mat-button","","data-mom-test","Market_ObjectCard_OpenButton",1,"market-object-button",3,"click"],["data-mom-test","MyPages_MySearchApplication_ListingTitle",1,"mat-font-title-lg"],[1,"pill-badge-container"],["data-mom-test","Market_ObjectCard_QueuePlace",1,"badge-info-2","pill-badge",3,"text"],["data-mom-test","MyPages_MySearchApplication_ListingStatus",1,"badge-info","pill-badge",3,"text"],[1,"location"],["data-mom-test","Market_ObjectCard_LocationArea"],[1,"details"],[1,"text","truncate"],["color","primary","data-mom-test","Market_ObjectCard_NoImageIcon"],[1,"details-item"],[1,"details-item-value"],[1,"details-item-label"],["data-mom-test","Market_ObjectCard_DetailValue_RoomsDisplayName",1,"details-item-value"],["data-mom-test","Market_ObjectCard_DetailLabel_RoomsDisplayName",1,"details-item-label"],["data-mom-test","Market_ObjectCard_DetailValue_ShortRoomsDisplayName",1,"details-item-value"],["data-mom-test","Market_ObjectCard_DetailLabel_ShortRoomsDisplayName",1,"details-item-label"],["data-mom-test","Market_ObjectCard_DetailValue_Area",1,"details-item-value"],["data-mom-test","Market_ObjectCard_DetailLabel_Area",1,"details-item-label"],["data-mom-test","Market_ObjectCard_DetailValue_Price",1,"details-item-value"],["data-mom-test","Market_ObjectCard_DetailLabel_Price",1,"details-item-label"],["data-mom-test","Market_ObjectCard_DetailValue_AvailableFrom",1,"details-item-value"],["data-mom-test","Market_ObjectCard_DetailLabel_AvailableFrom",1,"details-item-label"],["data-mom-test","Market_ObjectCard_Description",3,"markdown"]],template:function(i,a){1&i&&t.nVh(0,ui,25,28,"mat-card",1),2&i&&t.vxM(a.marketObject?0:-1)},dependencies:[Le.Y,G.An,I.$z,M.RN,M.m2,M.Lc,w.N,b.D9],styles:["mat-card-content[_ngcontent-%COMP%]{display:flex}.is-mobile[_ngcontent-%COMP%]{flex-direction:column}.is-desktop[_ngcontent-%COMP%]{flex-direction:row}.image-container[_ngcontent-%COMP%]{width:37%}.info-container[_ngcontent-%COMP%]{width:63%}.image[_ngcontent-%COMP%]{width:100%;height:208px;object-fit:cover;display:flex;border-radius:6px}.object-card[_ngcontent-%COMP%]{cursor:pointer}mat-card[_ngcontent-%COMP%]{padding:0;overflow:hidden}.info-content[_ngcontent-%COMP%]{margin:5px 15px 10px}.mat-h2[_ngcontent-%COMP%]{margin-bottom:0}.address[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap-reverse}.details[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;text-align:center;flex-wrap:wrap}.details-item-value[_ngcontent-%COMP%]{font-size:1.125rem}.details-item-label[_ngcontent-%COMP%]{font-size:.75rem}.truncate[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}.icon[_ngcontent-%COMP%]{display:flex;justify-content:center}.broken-image-icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-width:120px;min-height:120px;font-size:6.25rem;border:solid;border-radius:50%;margin-bottom:8px}.divider[_ngcontent-%COMP%]{margin-top:15px;margin-bottom:15px}.application-open-to-container[_ngcontent-%COMP%]{margin-bottom:5px}.market-object-button[_ngcontent-%COMP%]{margin-left:-13px}.pill-badge-container[_ngcontent-%COMP%]{align-self:center;margin-left:auto}.pill-badge[_ngcontent-%COMP%]{margin-left:8px}.no-border-bottom-radius[_nghost-%COMP%]   mat-card[_ngcontent-%COMP%], .no-border-bottom-radius   [_nghost-%COMP%]   mat-card[_ngcontent-%COMP%]{border-bottom-left-radius:0;border-bottom-right-radius:0}.no-border-top-radius[_nghost-%COMP%]   mat-card[_ngcontent-%COMP%], .no-border-top-radius   [_nghost-%COMP%]   mat-card[_ngcontent-%COMP%]{border-top-left-radius:0;border-top-right-radius:0}.location[_ngcontent-%COMP%]{margin-bottom:16px}.no-image[_ngcontent-%COMP%]{height:208px;display:flex;justify-content:center;align-items:center;background-color:rgb(var(--palette-background-background));border-radius:6px}.no-image[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:2.5rem;width:40px;height:40px}.details-item[_ngcontent-%COMP%]{margin-bottom:15px}.details-item-margin-right[_ngcontent-%COMP%]   .details-item[_ngcontent-%COMP%]{margin-right:20px}.details-item-label[_ngcontent-%COMP%]{margin-top:-4px}mat-card[_ngcontent-%COMP%]:hover{background:var(--mat-sys-surface-container-high)}"]})}}return n})();const _i=()=>[1,5,10,25,100];function hi(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",1)(1,"taiga-market-object-card",3),t.bIt("marketObjectClicked",function(a){r.eBV(e);const s=t.XpG();
1return r.Njj(s.goToMarketObject(a))}),t.k0s()()}if(2&n){const e=o.$implicit,i=t.XpG();t.R7$(),t.Y8G("areaUseGeographicRentalArea",i.areaUseGeographicRentalArea)("marketObject",e)("dataFields",i.marketObjektListDataFields)}}let fi=(()=>{class n{set data(e){this.marketObjects=e,this.slicedMarketObjects=this.marketObjects?.items,this.marketObjectsCount=this.marketObjects?.count}constructor(e,i,a,s,l,c){this.mediaQueryService=e,this.marketService=i,this.translate=a,this.route=s,this.router=l,this.clientConfigurationService=c,this.clientConfigurationService.getClientConfigurationFeatures().subscribe(m=>{this.areaUseGeographicRentalArea=m?.areaUseGeographicRentalArea?.enabled})}ngAfterViewInit(){document.getElementById("paginator").getElementsByTagName("mat-select")[0]?.setAttribute("aria-label",this.translate.instant("SELECTNUMBEROFMARKETOBJECTSPERPAGE"))}ngOnInit(){this.paginator._intl.itemsPerPageLabel=null,this.paginator._intl.nextPageLabel=this.translate.instant("NEXTPAGE"),this.paginator._intl.previousPageLabel=this.translate.instant("PREVIOUSPAGE"),this.paginator._intl.getRangeLabel=(e,i,a)=>{if(0===a||0===i)return`0 ${this.translate.instant("OF")} ${a}`;const s=e*i;return`${s+1} \u2013 ${s<(a=Math.max(a,0))?Math.min(s+i,a):s+i} ${this.translate.instant("OF")} ${a}`},window.scrollTo(0,this.marketService.getPageYOffset())}addClass(e){e.currentTarget.classList.add("mat-elevation-z10")}removeClass(e){e.currentTarget.classList.remove("mat-elevation-z10")}onPageChange(e){let a=e.pageIndex*e.pageSize+e.pageSize;a>this.marketObjects.items.length&&(a=this.marketObjects.items.length),window.scroll(0,0),this.pageSize=e.pageSize,this.page=e.pageIndex+1,this.router.navigate([],{relativeTo:this.route,queryParams:{pageSize:this.pageSize,page:this.page},queryParamsHandling:"merge"})}formatDate(e){return f()(e).format("YYYY-MM-DD")}goToMarketObject(e){const i=`/market/${this.marketObjectsTypeId}/${e}`;this.marketService.setPageYOffset(window.pageYOffset),this.router.navigateByUrl(i)}getMarketObjectThumbnail(e,i){return this.marketService.getMarketObjectThumbnail(e,i)}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(T.M),t.rXU(S),t.rXU(b.c$),t.rXU(F.nX),t.rXU(F.Ix),t.rXU(W.t))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-objects-list"]],viewQuery:function(i,a){if(1&i&&t.GBs(kt.iy,7),2&i){let s;t.mGM(s=t.lsd())&&(a.paginator=s.first)}},inputs:{data:"data",pageSize:"pageSize",page:"page",marketObjectsTypeId:"marketObjectsTypeId",marketObjektListDataFields:"marketObjektListDataFields"},standalone:!1,decls:4,vars:5,consts:[[1,"divider"],[1,"object-card"],["id","paginator","data-mom-test","MyPages_AvailableObjects_Pagination",3,"page","length","pageIndex","pageSize","pageSizeOptions"],[3,"marketObjectClicked","areaUseGeographicRentalArea","marketObject","dataFields"]],template:function(i,a){1&i&&(t.nrm(0,"div",0),t.Z7z(1,hi,2,3,"div",1,t.fX1),t.j41(3,"mat-paginator",2),t.bIt("page",function(l){return a.onPageChange(l)}),t.k0s()),2&i&&(t.R7$(),t.Dyx(a.slicedMarketObjects),t.R7$(2),t.Y8G("length",a.marketObjectsCount)("pageIndex",a.page-1)("pageSize",a.pageSize)("pageSizeOptions",t.lJ4(4,_i)))},dependencies:[kt.iy,Et],styles:[".divider[_ngcontent-%COMP%]{margin-top:15px;margin-bottom:15px}.object-card[_ngcontent-%COMP%]{margin-bottom:16px}"]})}}return n})();const gi=n=>({maxNumberOfApplications:n});function bi(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",15),t.nI1(1,"translate"),t.bIt("click",function(){r.eBV(e);const a=t.XpG();return r.Njj(a.openFilter(!1))}),t.EFF(2),t.nI1(3,"translate"),t.j41(4,"mat-icon"),t.EFF(5,"filter_alt"),t.k0s()()}if(2&n){const e=t.XpG();t.AVh("filter-button-mobile",e.mediaQueryService.isMobile())("filter-button-desktop",!e.mediaQueryService.isMobile()),t.Y8G("matBadge",e.filtersCount)("matBadgeHidden",0===e.filtersCount),t.BMQ("aria-label",t.bMT(1,8,"OPENSEARCHFILTER")),t.R7$(2),t.SpI(" ",t.bMT(3,10,"SEARCHFILTER")," ")}}function Mi(n,o){if(1&n&&(t.j41(0,"div")(1,"div",3),t.nrm(2,"taiga-medium-header",16),t.k0s()()),2&n){const e=t.XpG();t.R7$(2),t.Y8G("text",e.title)}}function ki(n,o){if(1&n&&t.eu8(0,2),2&n){t.XpG();const e=t.sdS(1);t.Y8G("ngTemplateOutlet",e)}}function Ci(n,o){if(1&n&&(t.j41(0,"div",3),t.nrm(1,"taiga-medium-header",17),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("text",e.title)}}function vi(n,o){if(1&n&&(t.j41(0,"div",6),t.nrm(1,"taiga-markdown",18),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("markdown",e.description)}}function xi(n,o){if(1&n&&(t.j41(0,"div",19),t.EFF(1),t.nI1(2,"translate"),t.nI1(3,"lowercase"),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Lme(" ",e.marketObjectsCount," ",t.bMT(3,4,t.bMT(2,2,"MARKETOBJECT"))," ")}}function Ri(n,o){if(1&n&&(t.j41(0,"div",20),t.EFF(1),t.nI1(2,"translate"),t.nI1(3,"lowercase"),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Lme(" ",e.marketObjectsCount," ",t.bMT(3,4,t.bMT(2,2,"MARKETOBJECTS"))," ")}}function yi(n,o){if(1&n&&t.nVh(0,xi,4,6,"div",19)(1,Ri,4,6,"div",20),2&n){let e;const i=t.XpG();t.vxM(1===(e=i.marketObjectsCount)?0:1)}}function ji(n,o){if(1&n&&(t.j41(0,"div",7),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.SpI(" ",t.i5U(2,1,"MAXNUMBEROFAPPLICATIONS",t.eq3(4,gi,e.maxNumberOfApplications))," ")}}function Ti(n,o){if(1&n){const e=t.RV6();t.j41(0,"mat-option",21),t.bIt("click",function(){r.eBV(e);const a=t.XpG();
1return r.Njj(a.changeOrder(a.selectedOrder))}),t.EFF(1),t.k0s()}if(2&n){const e=o.$implicit;t.Y8G("value",e.value),t.BMQ("data-mom-test","Market_SortOption_"+e.value),t.R7$(),t.SpI(" ",e.displayName," ")}}function Ii(n,o){if(1&n&&t.nrm(0,"taiga-market-objects-list",14),2&n){const e=t.XpG();t.Y8G("data",e.marketObjects)("pageSize",e.pageSize)("page",e.page)("marketObjectsTypeId",e.marketObjectsTypeId)("marketObjektListDataFields",e.marketObjektListDataFields)}}let Fi=(()=>{class n{constructor(e,i,a,s,l,c,m,h,_,p){this.mediaQueryService=e,this.rightSheet=i,this.route=a,this.router=s,this.marketService=l,this.changeDetectorRef=c,this.translate=m,this.clientConfigurationService=h,this.pageCardsService=_,this.titleService=p,this.prevScrollpos=window.pageYOffset,this.hasPageCards=!1,this.pageSize=25,this.orders=[{displayName:this.translate.instant("PUBLISHFROM"),value:"publishFrom"},{displayName:this.translate.instant("PRICE"),value:"price"},{displayName:this.translate.instant("AVAILABLEFROM"),value:"availableFrom"},{displayName:this.translate.instant("SIZESQM"),value:"sizeArea"},{displayName:this.translate.instant("LOCATIONADDRESS"),value:"locationAddress"}]}ngOnInit(){this.pageCardsService.hasCardsForCurrentPage().subscribe(e=>this.hasPageCards=e),(0,L.p)([this.clientConfigurationService.getClientConfigurationMarket(),this.clientConfigurationService.getClientConfigurationFeatures(),this.clientConfigurationService.getClientConfigurationApp()]).pipe((0,x.H)(e=>(this.clientConfigurationMarket=e[0],this.areaUseGeographicRentalArea=e[1]?.areaUseGeographicRentalArea?.enabled,this.appName=e[2]?.name,(0,Xe.z)([this.route.params,this.route.queryParams])))).subscribe(([e,i])=>{if(this.marketObjectsTypeId!==e.objectType||0!==Object.keys(i)?.length){this.marketObjectsTypeId=e.objectType,this.title=this.clientConfigurationMarket?.types?.find(c=>c.id===this.marketObjectsTypeId)?.displayName,this.titleService.setTitle(`${this.title} - ${this.appName}`),this.description=this.clientConfigurationMarket?.types?.find(c=>c.id===this.marketObjectsTypeId)?.description,this.clientConfigurationService.getMaxNumberOfApplications(this.marketObjectsTypeId).subscribe(c=>{this.maxNumberOfApplications=c}),this.filtersCount=0;const a=this.marketService.getMarketObjectsFilterSettings(this.marketObjectsTypeId);null!=i.sizeRoomsMin||null!=i.sizeRoomsMax||null!=a.sizeRoomsMin||null!=a.sizeRoomsMax?this.filtersCount+=1:this.filtersCount=this.filtersCount,null!=i.locationAreaMin||null!=i.locationAreaMax||null!=a.locationAreaMin||null!=a.locationAreaMax?this.filtersCount+=1:this.filtersCount=this.filtersCount,null!=i.priceMin||null!=i.priceMax||null!=a.priceMin||null!=a.priceMax?this.filtersCount+=1:this.filtersCount=this.filtersCount,null!=i.areas||a.areas?.length>0?this.filtersCount+=1:this.filtersCount=this.filtersCount,null!=i.includes||a.includes?.length>0?this.filtersCount+=1:this.filtersCount=this.filtersCount,i.attributes?this.filtersCount+=Object.keys(JSON.parse(i.attributes))?.length:a.attributes&&(this.filtersCount+=Object.keys(JSON.parse(a.attributes))?.length),this.sizeRoomsMin=i.sizeRoomsMin?this.route.snapshot.queryParams.sizeRoomsMin:a.sizeRoomsMin,this.sizeRoomsMax=i.sizeRoomsMax?this.route.snapshot.queryParams.sizeRoomsMax:a.sizeRoomsMax,this.locationAreaMin=i.locationAreaMin?this.route.snapshot.queryParams.locationAreaMin:a.locationAreaMin,this.locationAreaMax=i.locationAreaMax?this.route.snapshot.queryParams.locationAreaMax:a.locationAreaMax,this.priceMin=i.priceMin?this.route.snapshot.queryParams.priceMin:a.priceMin,this.priceMax=i.priceMax?this.route.snapshot.queryParams.priceMax:a.priceMax,this.pageSize=i.pageSize??this.pageSize,this.page=this.route.snapshot.queryParams.page??1;const s=this.pageSize*this.page-this.pageSize;this.areas=this.route.snapshot.queryParams.areas?this.route.snapshot.queryParams.areas.split(","):a.areas,this.includes=this.route.snapshot.queryParams.includes?this.route.snapshot.queryParams.includes.split(","):a.includes;let l=this.route.snapshot.queryParams.attributes??a.attributes;this.attributesString=[],l&&(this.attributesString=[],l=JSON.parse(l),Object.keys(l).forEach(c=>{console.log(c),this.attributesString.push(c+";"+l[c].values)})),this.selectedOrder=i.order,this.orderReverse="true"===i.orderReverse,this.sortAriaLabel=this.translate.instant(this.orderReverse?"SORTDESCENDING":"SORTASCENDING"),(0,L.p)([this.marketService.getMarketObjects(this.marketObjectsTypeId,this.sizeRoomsMin,this.sizeRoomsMax,this.locationAreaMin,this.locationAreaMax,this.priceMin,this.priceMax,this.pageSize,0===s?null:s,this.selectedOrder,this.orderReverse,this.areaUseGeographicRentalArea?this.areas:null,this.includes,this.areaUseGeographicRentalArea?null:this.areas,this.attributesString),this.marketService.getMarketObjectsTypesItem(this.marketObjectsTypeId)]).subscribe(c=>{this.marketObjektListDataFields=c[1]?.marketObjektListDataFields,this.marketObjektListDataFields=this.marketObjektListDataFields?.filter(m=>{if("thumbnail"!==m.type&&"info"!==m.type&&"withdrawal.description"!==m.type&&"location.areaPath"!==m.type&&"files"!==m.type&&"description"!==m.type&&"displayName"!==m.type&&"location.area.displayName"!==m.type&&"queueType"!==m.type&&"sortOrder"!==m.type)return!0}),this.marketObjects=c[0],this.marketObjectsCount=this.marketObjects.count,this.changeDetectorRef.detectChanges(),window.scrollTo(0,this.marketService.getPageYOffset()),this.marketService.setPageYOffset(null)})}sessionStorage.getItem("SUBSCRIPTION_TO_SAVE")&&JSON.parse(sessionStorage.getItem("SUBSCRIPTION_TO_SAVE"))?.marketObjectType===this.marketObjectsTypeId&&this.openFilter(!0)}),window.onscroll=this.showHideFilterButton,this.marketService.getPageYOffset()||(document.getElementById("filter-button-container").style.top="56px")}showHideFilterButton(){const e=window.pageYOffset;document.getElementById("filter-button-container").style.top=e<168||this.prevScrollpos>e?"56px":"0",this.prevScrollpos=e}ngOnDestroy(){window.onscroll=null}openFilter(e){this.rightSheet.open(we,{panelClass:"custom-rightsheet",scrollStrategy:new A.t0,data:{marketObjectsTypeId:this.marketObjectsTypeId,saveSubscriptionFromSessionStorage:e},ariaLabel:this.translate.instant("SEARCHFILTER"),autoFocus:!1})}changeOrder(e){this.selectedOrder=e,this.setQueryParams({order:e})}toggleOrderReverse(){this.orderReverse=!this.orderReverse,this.setQueryParams({orderReverse:this.orderReverse}),this.sortAriaLabel=this.translate.instant(this.orderReverse?"SORTDESCENDING":"SORTASCENDING")}setQueryParams(e){this.router.navigate([],{relativeTo:this.route,queryParams:e,queryParamsHandling:"merge"}),this.marketService.setPageYOffset(null)}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(T.M),t.rXU(it.c9),t.rXU(F.nX),t.rXU(F.Ix),t.rXU(S),t.rXU(y.gRc),t.rXU(b.c$),t.rXU(W.t),t.rXU(Be.W),t.rXU(Mt.hE))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market"]],standalone:!1,decls:27,vars:28,consts:[["filterButton",""],["id","filter-button-container",1,"filter-button-container",2,"top","0"],[3,"ngTemplateOutlet"],[1,"large-header","header-text"],[3,"actions"],[2,"margin-top","11px","margin-bottom","11px","margin-right","8px"],["data-mom-test","Market_Description",1,"description"],["data-mom-test","Market_MaxApplicationsText"],[1,"sort-card"],["data-mom-test","Market_SortLabel"],["data-mom-test","Market_SortSelect",3,"ngModelChange","ngModel","aria-label"],[3,"value"],["mat-icon-button","",1,"icon-button",3,"click"],["color","primary","data-mom-test","Market_SortReverseIcon",1,"icon-display"],["data-mom-test","Market_ObjectsList",3,"data","pageSize","page","marketObjectsTypeId","marketObjektListDataFields"],["matButton","filled","color","primary","matBadgeColor","warn","data-mom-test","Market_FilterButton",1,"filter-button",3,"click","matBadge","matBadgeHidden"],["data-mom-test","Market_Title_Desktop",3,"text"],["data-mom-test","Market_Title_Mobile",3,"text"],["data-mom-test","Market_DescriptionMarkdown",3,"markdown"],["data-mom-test","Market_ObjectsCount_Singular"],["data-mom-test","Market_ObjectsCount_Plural"],[3,"click","value"]],template:function(i,a){if(1&i){const s=t.RV6();t.DNE(0,bi,6,12,"ng-template",null,0,t.C5r),t.j41(2,"div",1),t.nVh(3,Mi,3,1,"div"),t.nVh(4,ki,1,1,"ng-container",2),t.k0s(),t.j41(5,"div"),t.nVh(6,Ci,2,1,"div",3),t.nrm(7,"taiga-page-cards",4),t.j41(8,"div")(9,"div",5),t.nVh(10,vi,2,1,"div",6),t.nVh(11,yi,2,1),t.nVh(12,ji,3,6,"div",7),t.k0s(),t.j41(13,"div",8)(14,"div")(15,"mat-form-field")(16,"mat-label",9),t.EFF(17),t.nI1(18,"translate"),t.k0s(),t.j41(19,"mat-select",10),t.nI1(20,"translate"),t.mxI("ngModelChange",function(c){return r.eBV(s),t.DH7(a.selectedOrder,c)||(a.selectedOrder=c),r.Njj(c)}),t.Z7z(21,Ti,2,3,"mat-option",11,t.fX1),t.k0s()(),t.j41(23,"button",12),t.bIt("click",function(){return r.eBV(s),r.Njj(a.toggleOrderReverse())}),t.j41(24,"mat-icon",13),t.EFF(25,"keyboard_arrow_down"),t.k0s()()()()(),t.nVh(26,Ii,1,5,"taiga-market-objects-list",14),t.k0s()}if(2&i){const s=t.sdS(1);t.R7$(2),t.AVh("filter-button-container-mobile",a.mediaQueryService.isMobile()),t.R7$(),t.vxM(a.mediaQueryService.isMobile()?-1:3),t.R7$(),t.vxM(a.mediaQueryService.isMobile()||!a.hasPageCards?4:-1),t.R7$(),t.AVh("is-mobile",a.mediaQueryService.isMobile())("is-desktop",!a.mediaQueryService.isMobile()),t.R7$(),t.vxM(a.mediaQueryService.isMobile()?6:-1),t.R7$(),t.Y8G("actions",a.mediaQueryService.isMobile()?null:s),t.R7$(),t.AVh("flex-container",!a.mediaQueryService.isMobile()),t.R7$(2),t.vxM(a.description?10:-1),t.R7$(),t.vxM(a.marketObjectsCount>=0?11:-1),t.R7$(),t.vxM(a.maxNumberOfApplications&&a.maxNumberOfApplications>0?12:-1),t.R7$(3),t.AVh("width-80",a.mediaQueryService.isMobile()),t.R7$(2),t.JRh(t.bMT(18,24,"SORT")),t.R7$(2),t.R50("ngModel",a.selectedOrder),t.jOp("aria-label",t.bMT(20,26,"SELECTSORT")),t.R7$(2),t.Dyx(a.orders),t.R7$(2),t.BMQ("aria-label",a.sortAriaLabel),t.R7$(),t.AVh("rotate",a.orderReverse),t.R7$(2),t.vxM(a.marketObjects?26:-1)}},dependencies:[$.T3,G.An,I.$z,lt.iY,j.rl,j.nJ,ut.VO,_t.wT,Ue.k,u.BC,u.vS,K.o,w.N,H.K,fi,$.GH,b.D9],styles:[".is-desktop[_ngcontent-%COMP%]{padding-right:16px;padding-bottom:16px;padding-left:16px}.is-mobile[_ngcontent-%COMP%]{padding:56px 16px 16px}.filter-button-container[_ngcontent-%COMP%]{display:flex;box-sizing:border-box;padding:16px 16px 0;flex-direction:row;align-items:center;white-space:nowrap;width:100%;z-index:10;top:56px;transition:top .3s;justify-content:space-between}.filter-button-mobile[_ngcontent-%COMP%]{width:100%}.filter-button-container-mobile[_ngcontent-%COMP%]{padding:8px 16px 0;height:56px;position:fixed;margin-top:calc(0px + env(safe-area-inset-top))}.large-header[_ngcontent-%COMP%]{margin:0 0 10px}.filter-button-container-mobile[_ngcontent-%COMP%]   .large-header[_ngcontent-%COMP%]{display:none}.flex-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start}.icon-display[_ngcontent-%COMP%]{transform:scale(1.5)}.width-80[_ngcontent-%COMP%]{width:80%}.rotate[_ngcontent-%COMP%]{transform:scale(1.5) rotateX(180deg)}.icon-button[_ngcontent-%COMP%]{margin-left:16px;margin-top:8px}
1.sort-card[_ngcontent-%COMP%]{margin-top:16px}.sort-card[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{display:flex}.filter-button-desktop[_ngcontent-%COMP%]{width:270px}.description[_ngcontent-%COMP%]{margin-bottom:10px}.filter-button-container[_ngcontent-%COMP%]{background:rgb(var(--palette-background-background))}"]})}}return n})();var Oi=d(450);const Si=n=>({ids:n});function Ai(n,o){if(1&n&&(t.j41(0,"mat-slide-toggle",10),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const e=t.XpG().$implicit;t.Y8G("formControlName",e.id),t.R7$(),t.JRh(t.bMT(2,2,"IAGREE"))}}function Ei(n,o){if(1&n&&(t.j41(0,"div")(1,"h2",8),t.EFF(2),t.k0s(),t.nrm(3,"p",9),t.nVh(4,Ai,3,4,"mat-slide-toggle",10),t.k0s()),2&n){const e=o.$implicit;t.R7$(2),t.JRh(e.displayName),t.R7$(),t.Y8G("innerText",e.shortText),t.R7$(),t.vxM(e.needAcceptance?4:-1)}}let $i=(()=>{class n{constructor(e,i,a){this.marketConsents=e,this.formBuilder=i,this.dialogRef=a,this.consentsLink=`${D.i.READCONSENTS}`}ngOnInit(){this.consentIds=this.marketConsents.items.map(e=>e.id).toString(),this.consentFormGroup=this.formBuilder.group({});for(const e of this.marketConsents?.items)e.needAcceptance&&this.consentFormGroup.addControl(e.id,new u.hs(null,u.k0.requiredTrue))}accept(){this.dialogRef.close("accept")}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(k.Vh),t.rXU(u.ze),t.rXU(k.CP))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-consent-dialog"]],standalone:!1,decls:17,vars:16,consts:[[1,"mat-h1"],[1,"mat-typography"],[3,"formGroup"],[1,"link-container"],["target","_blank","data-mom-test","MyPages_ConsentDialog_ReadMoreLink",1,"link",3,"routerLink","queryParams"],["align","end"],["mat-raised-button","","mat-dialog-close","","data-mom-test","MyPages_ConsentDialog_CancelButton"],["mat-raised-button","","color","primary","data-mom-test","MyPages_ConsentDialog_AcceptButton",1,"action-button",3,"click","disabled"],[1,"mat-h2","mat-body-strong"],[3,"innerText"],["required","",1,"slide",3,"formControlName"]],template:function(i,a){1&i&&(t.j41(0,"h1",0),t.EFF(1),t.nI1(2,"translate"),t.k0s(),t.j41(3,"mat-dialog-content",1)(4,"form",2),t.Z7z(5,Ei,5,3,"div",null,t.fX1),t.k0s(),t.j41(7,"div",3)(8,"a",4),t.EFF(9),t.nI1(10,"translate"),t.k0s()()(),t.j41(11,"mat-dialog-actions",5)(12,"button",6),t.EFF(13),t.nI1(14,"translate"),t.k0s(),t.j41(15,"button",7),t.bIt("click",function(){return a.accept()}),t.EFF(16," Intresseanm\xe4l "),t.k0s()()),2&i&&(t.R7$(),t.JRh(t.bMT(2,8,"CONSENTS")),t.R7$(3),t.Y8G("formGroup",a.consentFormGroup),t.R7$(),t.Dyx(null==a.marketConsents?null:a.marketConsents.items),t.R7$(3),t.Y8G("routerLink",t.mNQ(a.consentsLink))("queryParams",t.eq3(14,Si,a.consentIds)),t.R7$(),t.JRh(t.bMT(10,10,"READMORE")),t.R7$(4),t.JRh(t.bMT(14,12,"CANCEL")),t.R7$(2),t.Y8G("disabled",!a.consentFormGroup.valid))},dependencies:[U.Wk,I.$z,Oi.sG,k.tx,k.E7,k.Yi,u.qT,u.BC,u.cb,u.YS,u.j4,u.JD,b.D9],styles:[".slide[_ngcontent-%COMP%]{margin-bottom:20px}.link-container[_ngcontent-%COMP%]{margin-top:10px}"]})}}return n})();var Pi=d(1584),Vi=d(8810),Ni=d(6977),z=d(9437),Ct=d(3527),Di=d(1580),ot=d(1997),Gi=d(455),wi=d(7655),$t=d(3999);function Xi(n,o){if(1&n&&(t.j41(0,"div")(1,"a",26)(2,"mat-icon"),t.EFF(3,"picture_as_pdf"),t.k0s(),t.EFF(4),t.k0s()()),2&n){const e=t.XpG().$implicit;t.R7$(),t.Y8G("href",e.address,t.B4B),t.BMQ("data-mom-test","MarketObject_DocumentLink_"+e.displayName),t.R7$(3),t.SpI(" ",e.displayName," ")}}function Bi(n,o){if(1&n&&(t.j41(0,"div")(1,"a",26)(2,"mat-icon"),t.EFF(3,"attachment"),t.k0s(),t.EFF(4),t.k0s()()),2&n){const e=t.XpG().$implicit;t.R7$(),t.Y8G("href",e.address,t.B4B),t.BMQ("data-mom-test","MarketObject_DocumentLink_"+e.displayName),t.R7$(3),t.SpI(" ",e.displayName," ")}}function Ui(n,o){if(1&n&&(t.j41(0,"div",25),t.nVh(1,Xi,5,3,"div")(2,Bi,5,3,"div"),t.k0s()),2&n){let e;const i=o.$implicit;t.R7$(),t.vxM((e=!0)==("application/pdf"===i.mimeType)?1:2)}}function Li(n,o){if(1&n&&(t.j41(0,"div",8),t.Z7z(1,Ui,3,1,"div",25,t.fX1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Dyx(e.documents)}}function zi(n,o){if(1&n&&(t.j41(0,"div",9)(1,"a",27),t.EFF(2),t.nI1(3,"translate"),t.k0s()()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("href",e.getGoogleMapsUrl(e.marketObject.location.address.completeAdress),t.B4B),t.R7$(),t.JRh(t.bMT(3,2,"SHOWONMAP"))}}function Yi(n,o){if(1&n&&(t.j41(0,"span",11),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.JRh(null==e.marketObject.location||null==e.marketObject.location.area?null:e.marketObject.location.area.displayName)}}function Qi(n,o){1&n&&t.EFF(0," , ")}function Hi(n,o){if(1&n&&(t.EFF(0),t.nVh(1,Qi,1,0)),2&n){const e=o.$implicit,i=o.$index,a=t.XpG(3);t.SpI(" ",e.displayName," "),t.R7$(),t.vxM((null==a.marketObject.location?null:a.marketObject.location.areaPath.length)>1&&i!==(null==a.marketObject.location?null:a.marketObject.location.areaPath.length)-1?1:-1)}}function Ji(n,o){if(1&n&&(t.j41(0,"span",11),t.Z7z(1,Hi,2,2,null,null,t.fX1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Dyx(null==e.marketObject.location?null:e.marketObject.location.areaPath)}}function qi(n,o){if(1&n&&(t.j41(0,"span",12),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Lme("",null==e.marketObject.size?null:e.marketObject.size.area," ",t.bMT(2,2,"KVM"))}}function Wi(n,o){1&n&&(t.j41(0,"span"),t.EFF(1,", "),t.k0s())}function Zi(n,o){if(1&n&&(t.j41(0,"div",14),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Lme(" ",e.marketObject.pricing.price.toFixed()," ",t.bMT(2,2,"SEKPERMONTH")," ")}}function Ki(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",28),t.bIt("click",function(){r.eBV(e);const a=t.XpG(2);
1return r.Njj(a.createInterest(a.marketObject.id))}),t.EFF(1),t.k0s()}if(2&n){const e=t.XpG(2);t.AVh("full-width",e.mediaQueryService.isMobile()),t.Y8G("disabled",!e.enableInterest),t.R7$(),t.SpI(" ",null==e.marketObjectStatus||null==e.marketObjectStatus.commands[0]?null:e.marketObjectStatus.commands[0].displayName," ")}}function tn(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",29),t.bIt("click",function(){r.eBV(e);const a=t.XpG(2);return r.Njj(a.goToQueueRegistration(a.marketObject.queueType))}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}if(2&n){const e=t.XpG(2);t.AVh("full-width",e.mediaQueryService.isMobile()),t.R7$(),t.SpI(" ",t.bMT(2,3,"QUEUEREGISTRATION")," ")}}function en(n,o){1&n&&(t.j41(0,"mat-icon",31),t.EFF(1,"info"),t.k0s())}function nn(n,o){if(1&n&&(t.j41(0,"div",20)(1,"div",30),t.nVh(2,en,2,0,"mat-icon",31),t.k0s(),t.nrm(3,"taiga-markdown",32),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(2),t.vxM(null!=e&&e.message?2:-1),t.R7$(),t.Y8G("markdown",null==e?null:e.message)}}function an(n,o){if(1&n&&(t.j41(0,"div"),t.nVh(1,nn,4,2,"div",20),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.vxM(null!=e&&e.passed||"consent"===e.type||"queue"===e.type?-1:1)}}function sn(n,o){if(1&n&&(t.j41(0,"div",20)(1,"div",30)(2,"mat-icon",31),t.EFF(3,"info"),t.k0s()(),t.j41(4,"span",33),t.EFF(5),t.k0s()()),2&n){const e=t.XpG(2);t.R7$(5),t.JRh(null==e.marketObject.withdrawal?null:e.marketObject.withdrawal.description)}}function on(n,o){if(1&n&&(t.j41(0,"div",34),t.nrm(1,"taiga-markdown",32),t.k0s()),2&n){const e=o.$implicit;t.BMQ("data-mom-test","MarketObject_ImportantText_"+o.$index),t.R7$(),t.Y8G("markdown",e.value)}}function rn(n,o){if(1&n&&(t.j41(0,"div",21),t.nrm(1,"mat-divider"),t.Z7z(2,on,2,2,"div",34,t.fX1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(2),t.Dyx(null==e.marketObject.info?null:e.marketObject.info.important)}}function ln(n,o){if(1&n&&(t.j41(0,"div")(1,"h2",35),t.EFF(2),t.k0s(),t.nrm(3,"taiga-markdown",32),t.k0s()),2&n){const e=o.$implicit;t.BMQ("data-mom-test","MarketObject_InfoSection_"+e.displayName),t.R7$(2),t.JRh(e.displayName),t.R7$(),t.Y8G("markdown",e.value)}}function cn(n,o){if(1&n&&(t.j41(0,"div",36)(1,"div",37),t.EFF(2),t.k0s(),t.j41(3,"div",38),t.EFF(4),t.k0s()()),2&n){const e=t.XpG().$implicit;t.BMQ("data-mom-test","MarketObject_Field_"+e.displayName),t.R7$(2),t.JRh(e.displayName),t.R7$(2),t.JRh(e.values)}}function mn(n,o){if(1&n&&(t.j41(0,"mat-icon",41),r.qSk(),t.j41(1,"svg",42),t.nrm(2,"path"),t.k0s()()),2&n){const e=t.XpG().$implicit;t.R7$(2),t.BMQ("d",e.typeIcon.svg)}}function dn(n,o){if(1&n&&t.EFF(0),2&n){const e=t.XpG().$implicit;t.SpI(" : ",e.value," ")}}function pn(n,o){if(1&n&&(t.j41(0,"div",39)(1,"div",40),t.nVh(2,mn,3,1,"mat-icon",41),t.k0s(),t.j41(3,"div"),t.EFF(4),t.nVh(5,dn,1,1),t.k0s()()),2&n){const e=o.$implicit;t.BMQ("data-mom-test","MarketObject_Attribute_"+e.typeDisplayName),t.R7$(2),t.vxM(e.typeIcon?2:-1),t.R7$(2),t.SpI(" ",e.typeDisplayName," "),t.R7$(),t.vxM(e.value?5:-1)}}function un(n,o){if(1&n&&(t.j41(0,"div",36)(1,"div",37),t.EFF(2),t.k0s(),t.j41(3,"div",38),t.Z7z(4,pn,6,4,"div",39,t.fX1),t.k0s()()),2&n){const e=t.XpG().$implicit;t.BMQ("data-mom-test","MarketObject_AttributesField_"+e.displayName),t.R7$(2),t.JRh(e.displayName),t.R7$(2),t.Dyx(e.values)}}function _n(n,o){if(1&n&&(t.nVh(0,cn,5,3,"div",36),t.nVh(1,un,6,2,"div",36)),2&n){const e=o.$implicit;t.vxM("attributes"!==e.type&&e.values?0:-1),t.R7$(),t.vxM("attributes"===e.type&&(null==e.values?null:e.values.length)>0?1:-1)}}function hn(n,o){if(1&n&&t.Z7z(0,_n,2,2,null,null,t.fX1),2&n){const e=t.XpG(2);t.Dyx(e.singleMarketObjektDataFields)}}function fn(n,o){if(1&n&&(t.j41(0,"div",36)(1,"div",37),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",43),t.EFF(5),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.JRh(t.bMT(3,2,"APPLICATIONOPENTO")),t.R7$(3),t.SpI(" ",e.formatOpenToDate(null==e.marketObject.application?null:e.marketObject.application.openTo)," ")}}function gn(n,o){if(1&n&&(t.j41(0,"div",36)(1,"div",37),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",44),t.EFF(5),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.JRh(t.bMT(3,2,"AVAILABLEFROM")),t.R7$(3),t.SpI(" ",e.formatavailableFromDate(null==e.marketObject.availability?null:e.marketObject.availability.availableFrom)," ")}}function bn(n,o){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const e=t.XpG(4);t.R7$(),t.Lme("",null==e.marketObject.size?null:e.marketObject.size.area," ",t.bMT(2,2,"KVM"))}}function Mn(n,o){1&n&&(t.j41(0,"span"),t.EFF(1,", "),t.k0s())}function kn(n,o){if(1&n&&(t.j41(0,"div",36)(1,"div",37),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",45),t.nVh(5,bn,3,4,"span"),t.nVh(6,Mn,2,0,"span"),t.j41(7,"span"),t.EFF(8),t.k0s()()()),2&n){const e=t.XpG(3);t.R7$(2),t.JRh(t.bMT(3,4,"SIZEAREA")),t.R7$(3),t.vxM(null!=e.marketObject.size&&e.marketObject.size.area?5:-1),t.R7$(),t.vxM(null!=e.marketObject.size&&e.marketObject.size.area&&null!=e.marketObject.size&&e.marketObject.size.roomsDisplayName?6:-1),t.R7$(2),t.JRh(null==e.marketObject.size?null:e.marketObject.size.roomsDisplayName)}}function Cn(n,o){if(1&n&&(t.j41(0,"div",36)(1,"div",37),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",46),t.EFF(5),t.nI1(6,"translate"),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.JRh(t.bMT(3,3,"RENT")),t.R7$(3),t.Lme(" ",null==e.marketObject.pricing?null:e.marketObject.pricing.price.toFixed()," ",t.bMT(6,5,"SEKPERMONTH")," ")}}function vn(n,o){if(1&n&&(t.j41(0,"mat-icon",48),t.EFF(1," help "),t.k0s()),2&n){const e=t.XpG(4);t.Y8G("matTooltip",e.marketObject.economy.billingPeriodDescription)}}function xn(n,o){if(1&n&&(t.j41(0,"div",36)(1,"div",37),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",47),t.EFF(5),t.nVh(6,vn,2,1,"mat-icon",48),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.JRh(t.bMT(3,3,"BILLINGPERIOD")),t.R7$(3),t.SpI(" ",null==e.marketObject||null==e.marketObject.economy?null:e.marketObject.economy.billingPeriodDisplayName," "),t.R7$(),t.vxM(null!=e.marketObject&&null!=e.marketObject.economy&&e.marketObject.economy.billingPeriodDescription?6:-1)}}function Rn(n,o){if(1&n&&(t.j41(0,"div",36)(1,"div",37),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",49),t.EFF(5),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.JRh(t.bMT(3,2,"FLOOR")),t.R7$(3),t.SpI(" ",e.marketObject.location.floorDisplayName," ")}}function yn(n,o){if(1&n&&(t.j41(0,"div",36)(1,"div",37),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",50),t.EFF(5),t.k0s()()),2&n){const e=t.XpG(4);t.R7$(2),t.JRh(t.bMT(3,2,"OFFICIALAPARTMENTNUMBER")),t.R7$(3),t.SpI(" ",e.marketObject.location.officialApartmentNumber," ")}}function jn(n,o){if(1&n&&(t.j41(0,"div",36)(1,"div",37),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",51),t.EFF(5),t.k0s()()),2&n){const e=t.XpG(4);t.R7$(2),t.JRh(t.bMT(3,2,"SIGNNUMBER")),t.R7$(3),t.SpI(" ",e.marketObject.location.signNumber," ")}}function Tn(n,o){if(1&n&&(t.nVh(0,yn,6,4,"div",36),t.nVh(1,jn,6,4,"div",36)),2&n){const e=t.XpG(3);t.vxM(null!=e.marketObject&&null!=e.marketObject.location&&e.marketObject.location.officialApartmentNumber?0:-1),t.R7$(),t.vxM(null!=e.marketObject&&null!=e.marketObject.location&&e.marketObject.location.signNumber?1:-1)}}function In(n,o){if(1&n&&(t.j41(0,"div",36)(1,"div",37),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",52),t.EFF(5),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.JRh(t.bMT(3,2,"QUEUE")),t.R7$(3),t.SpI(" ",e.marketObject.queueTypeDisplayName," ")}}function Fn(n,o){if(1&n&&(t.j41(0,"mat-icon",41),r.qSk(),t.j41(1,"svg",42),t.nrm(2,"path"),t.k0s()()),2&n){const e=t.XpG().$implicit;t.R7$(2),t.BMQ("d",e.typeIcon.svg)}}function On(n,o){if(1&n&&t.EFF(0),2&n){const e=t.XpG().$implicit;t.SpI(" : ",e.value," ")}}function Sn(n,o){if(1&n&&(t.j41(0,"div",39)(1,"div",40),t.nVh(2,Fn,3,1,"mat-icon",41),t.k0s(),t.j41(3,"div"),t.EFF(4),t.nVh(5,On,1,1),t.k0s()()),2&n){const e=o.$implicit;t.BMQ("data-mom-test","MarketObject_Attribute_"+e.typeDisplayName),t.R7$(2),t.vxM(e.typeIcon?2:-1),t.R7$(2),t.SpI(" ",e.typeDisplayName," "),t.R7$(),t.vxM(e.value?5:-1)}}function An(n,o){if(1&n&&(t.j41(0,"div",36)(1,"div",37),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",38),t.Z7z(5,Sn,6,4,"div",39,t.fX1),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.JRh(t.bMT(3,1,"MARKETOBJECTATTRIBUTES")),t.R7$(3),t.Dyx(e.marketObject.attributes)}}function En(n,o){if(1&n&&(t.j41(0,"div"),t.EFF(1),t.k0s()),2&n){const e=o.$implicit;t.BMQ("data-mom-test","MarketObject_Amenity_"+e.displayName),t.R7$(),t.SpI(" ",e.displayName," ")}}function $n(n,o){if(1&n&&(t.j41(0,"div",36)(1,"div",37),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",38),t.Z7z(5,En,2,2,"div",null,t.fX1),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.JRh(t.bMT(3,1,"MARKETOBJECTAMENITIES")),t.R7$(3),t.Dyx(e.marketObject.included)}}function Pn(n,o){if(1&n&&(t.nVh(0,fn,6,4,"div",36),t.nVh(1,gn,6,4,"div",36),t.nVh(2,kn,9,6,"div",36),t.nVh(3,Cn,7,7,"div",36),t.nVh(4,xn,7,5,"div",36),t.nVh(5,Rn,6,4,"div",36),t.nVh(6,Tn,2,2),t.nVh(7,In,6,4,"div",36),t.nVh(8,An,7,3,"div",36),t.nVh(9,$n,7,3,"div",36)),2&n){const e=t.XpG(2);t.vxM(null!=e.marketObject.application&&e.marketObject.application.openTo&&!e.isFarIntoFuture(e.marketObject.application.openTo)?0:-1),t.R7$(),t.vxM(null!=e.marketObject.availability&&e.marketObject.availability.availableFrom&&!e.isFarIntoFuture(e.marketObject.availability.availableFrom)?1:-1),t.R7$(),t.vxM(e.marketObject.size?2:-1),t.R7$(),t.vxM(null!=e.marketObject.pricing&&e.marketObject.pricing.price?3:-1),t.R7$(),t.vxM(null!=e.marketObject&&null!=e.marketObject.economy&&e.marketObject.economy.billingPeriodDisplayName?4:-1),t.R7$(),t.vxM(null!=e.marketObject&&null!=e.marketObject.location&&e.marketObject.location.floorDisplayName?5:-1),t.R7$(),t.vxM(e.showOfficiallyNumber?6:-1),t.R7$(),t.vxM(null!=e.marketObject&&e.marketObject.queueTypeDisplayName?7:-1),t.R7$(),t.vxM((null==e.marketObject.attributes?null:e.marketObject.attributes.length)>0?8:-1),t.R7$(),t.vxM((null==e.marketObject.included?null:e.marketObject.included.length)>0?9:-1)}}function Vn(n,o){if(1&n&&(t.j41(0,"div")(1,"mat-card")(2,"mat-card-content")(3,"div",1)(4,"div",2),t.nrm(5,"taiga-image-carousel",3),t.k0s()(),t.j41(6,"div",4)(7,"div")(8,"div",5)(9,"div",6)(10,"h1",7),t.EFF(11),t.k0s()(),t.nVh(12,Li,3,0,"div",8),t.nVh(13,zi,4,4,"div",9),t.j41(14,"mat-card-subtitle")(15,"div",10),t.nVh(16,Yi,2,1,"span",11),t.nVh(17,Ji,3,0,"span",11),t.k0s(),t.j41(18,"div"),t.nVh(19,qi,3,4,"span",12),t.nVh(20,Wi,2,0,"span"),t.j41(21,"span",13),t.EFF(22),t.k0s()(),t.nVh(23,Zi,3,4,"div",14),t.k0s()(),t.j41(24,"div",15)(25,"div",16),t.nVh(26,Ki,2,4,"button",17),t.nVh(27,tn,3,5,"button",18),t.k0s(),t.j41(28,"div",19),t.Z7z(29,an,2,1,"div",null,t.fX1),t.nVh(31,sn,6,1,"div",20),t.k0s()()(),t.nVh(32,rn,4,0,"div",21),t.k0s(),t.nrm(33,"taiga-page-cards"),t.j41(34,"div",22)(35,"div",23),t.nrm(36,"mat-divider"),t.Z7z(37,ln,4,3,"div",null,t.fX1),t.k0s(),t.j41(39,"div",24),t.nrm(40,"mat-divider"),t.nVh(41,hn,2,0),t.nVh(42,Pn,10,10),t.k0s()()()()()),2&n){const e=t.XpG();t.AVh("is-mobile",e.mediaQueryService.isMobile())("is-desktop",!e.mediaQueryService.isMobile()),t.R7$(5),t.Y8G("images",e.images),t.R7$(),t.AVh("header-desktop",!e.mediaQueryService.isMobile()),t.R7$(),t.AVh("flex-box",!e.mediaQueryService.isMobile()),t.R7$(4),t.SpI(" ",e.marketObject.displayName," "),t.R7$(),t.vxM(e.documents&&e.documents.length>0?12:-1),t.R7$(),t.vxM(null!=e.marketObject&&null!=e.marketObject.location&&null!=e.marketObject.location.address&&e.marketObject.location.address.completeAdress?13:-1),t.R7$(3),t.vxM(e.areaUseGeographicRentalArea?-1:16),t.R7$(),t.vxM(e.areaUseGeographicRentalArea?17:-1),t.R7$(2),t.vxM(null!=e.marketObject.size&&e.marketObject.size.area?19:-1),t.R7$(),t.vxM(null!=e.marketObject.size&&e.marketObject.size.area&&null!=e.marketObject.size&&e.marketObject.size.roomsDisplayName?20:-1),t.R7$(2),t.JRh(null==e.marketObject.size?null:e.marketObject.size.roomsDisplayName),t.R7$(),t.vxM(null!=e.marketObject.pricing&&e.marketObject.pricing.price?23:-1),t.R7$(3),t.vxM(e.showCreateInterest()?26:-1),t.R7$(),t.vxM(e.showQueueRegistration()?27:-1),t.R7$(2),t.Dyx(null==e.commandsApply?null:e.commandsApply.checklist),t.R7$(2),t.vxM(null!=e.marketObject&&null!=e.marketObject.withdrawal&&e.marketObject.withdrawal.withdrawn?31:-1),t.R7$(),t.vxM(null!=e.marketObject.info&&e.marketObject.info.important?32:-1),t.R7$(2),t.AVh("info-container-mobile",e.mediaQueryService.isMobile()),t.R7$(),t.AVh("texts-width",!e.mediaQueryService.isMobile()),t.R7$(2),t.Dyx(e.infos),t.R7$(2),t.AVh("details-width",!e.mediaQueryService.isMobile()),t.R7$(2),t.vxM((null==e.singleMarketObjektDataFields?null:e.singleMarketObjektDataFields.length)>0?41:-1),t.R7$(),t.vxM((null==e.singleMarketObjektDataFields?null:e.singleMarketObjektDataFields.length)>0?-1:42)}}function Nn(n,o){1&n&&t.nrm(0,"taiga-page-not-found")}let Dn=(()=>{class n{constructor(e,i,a,s,l,c,m,h,_,p,C,R,P,v){this.mediaQueryService=e,this.route=i,this.marketService=a,this.changeDetectorRef=s,this.signinService=l,this.router=c,this.translate=m,this.dialog=h,this.registrationService=_,this.clientConfigurationService=p,this.snackBarService=C,this.fileService=R,this.menuService=P,this.titleService=v,this.signInLink=`${D.t.SIGN_IN}
1`,this.completeEvent=new Tt.B,this.infos=[],this.images=[],this.imageHeight=this.mediaQueryService.isMobile()?235:555,this.enableInterest=!1,this.documents=[]}ngOnInit(){this.route.data.subscribe(e=>{if(e?.data){if(this.marketObject=e?.data[0],this.singleMarketObjektDataFields=e?.data[1]?.singleMarketObjektDataFields,this.singleMarketObjektDataFields=this.singleMarketObjektDataFields?.filter(i=>{if("thumbnail"!==i.type&&"info"!==i.type&&"withdrawal.description"!==i.type&&"location.areaPath"!==i.type&&"files"!==i.type&&"description"!==i.type&&"displayName"!==i.type&&"location.area.displayName"!==i.type&&"queueType"!==i.type)return!0}),this.singleMarketObjektDataFields?.length>0)for(const i of this.singleMarketObjektDataFields){const a=i.type.split(".");let s;if(s=a[1]?this.marketObject[a[0]]?.[a[1]]:this.marketObject[a[0]],s)switch(i.type){case"pricing.price":case"pricing.priceInclVAT":i.values=`${s.toFixed()} ${this.translate.instant("SEKPERMONTH")}`;break;case"size.area":i.values=`${s} ${this.translate.instant("KVM")}`;break;case"availability.availableFrom":i.values=this.formatavailableFromDate(s);break;case"application.openFrom":case"publishing.publishedFrom":case"publishing.publishedTo":case"availability.earlyAvailabilityPossibleFrom":i.values=this.formatDate(s);break;case"application.openTo":i.values=this.formatOpenToDate(s);break;case"location.address":i.values=s?.completeAdress;break;case"included":for(const l of s)i.values=i.values?`${i.values} \n ${l.displayName}`:l.displayName;break;case"attributes":i.values=s;break;case"location.area.displayName":i.values=s?.displayName;break;default:i.values="boolean"==typeof s?this.translate.instant(s?"YES":"NO"):s}}this.marketObject?.location?.areaPath?.reverse()?.splice(2),this.clientConfigurationService.getClientConfigurationFeatures().subscribe(i=>{this.areaUseGeographicRentalArea=i?.areaUseGeographicRentalArea?.enabled,this.showOfficiallyNumber=i?.showOfficiallyNumber?.enabled;const a=i?.marketobjectfloorplan?.enabled;this.marketObject.files&&Object.keys(this.marketObject.files).length>0&&Object.keys(this.marketObject.files).forEach(s=>{let l=0;if("floorplan"!==s?.toLowerCase()||"floorplan"===s?.toLowerCase()&&a)for(const c of this.marketObject.files[s])if(this.fileService.getValidImageMediaType(c.mimeType))c.address.includes("?")?this.images.push({src:`${c.address}&width=1024&height=1024`,alt:c.displayName}):this.images.push({src:`${c.address}?width=1024&height=1024`,alt:c.displayName});else{let m="";"floorplan"===s&&(m=`${this.translate.instant("FLOORPLAN")} ${0===l?"":l+1}`,l+=1),this.documents.push({displayName:""!==m?m:c.displayName,description:c.description,mimeType:c.mimeType,address:c.address})}})}),this.marketService.getMarketObjectStatus(this.marketObject.id).subscribe(i=>{this.marketObjectStatus=i,this.commandsApply=this.marketObjectStatus?.commands?.find(a=>"apply"===a.command),this.showQueueRegistrationButton=!1===this.commandsApply?.checklist?.find(a=>"queue"===a.type)?.passed&&!1!==this.commandsApply?.checklist?.find(a=>"queueCanRegister"===a.type)?.passed,this.consentRequired=!1===this.commandsApply?.checklist?.find(a=>"consent"===a.type)?.passed,this.enableInterest=!this.signinService.isAuth||this.commandsApply?.checklist?.length>0&&0===this.commandsApply?.checklist?.filter(a=>!1===a.passed&&"consent"!==a.type)?.length,"true"===this.route.snapshot.queryParamMap.get("createInterest")&&(this.showCreateInterest()&&this.enableInterest?this.createInterest(this.marketObject.id):this.showQueueRegistration()?this.goToQueueRegistration(this.marketObject.queueType):sessionStorage.setItem("RETURN_URL",this.router.url))}),this.marketObject.info&&Object.keys(this.marketObject.info).forEach(i=>{if("important"!==i)for(const a of this.marketObject.info[i])this.infos.push(a)}),this.infos.sort((i,a)=>{let s=i.order??i.typeOrder,l=a.order??a.typeOrder;return s<l?-1:s>l?1:0}),this.clientConfigurationService.getClientConfigurationApp().subscribe(i=>{this.titleService.setTitle(`${this.marketObject.displayName??this.translate.instant("MARKETOBJECT")} - ${i?.name}`)})}else this.marketObjectNotFound=!0})}ngAfterViewInit(){this.changeDetectorRef.detectChanges()}formatavailableFromDate(e){return f()(e).isAfter(Date.now())?f()(e).format("YYYY-MM-DD"):this.translate.instant("AVAILABLENOW")}formatDate(e){return f()(e).format("YYYY-MM-DD")}formatOpenToDate(e){const i=f()(f()(e).format("HH:mm"),"HH:mm"),a=f()("23:59","HH:mm");return i.isBefore(a)?f()(e).format("YYYY-MM-DD HH:mm"):f()(e).format("YYYY-MM-DD")}createInterest(e){this.signinService.isAuth?this.consentRequired?this.registrationService.getMarketObjectsConsents([this.marketObject.id]).subscribe(i=>{i&&i.items.length>0&&(i.items=i.items.filter(s=>!s.accepted),this.dialog.open($i,{data:i,maxWidth:"920px",width:"98%",ariaLabel:this.translate.instant("CONSENTS")}).afterClosed().subscribe(s=>{if("accept"===s){const l={consents:[]};for(const c of i?.items)c.needAcceptance&&l.consents.push({id:c.id,versionId:c.versionId,command:{type:"accept"}});this.registrationService.postActor(l).subscribe(()=>{this.postMarketApplication(e)})}}))}):this.postMarketApplication(e):this.router.navigate([this.signInLink],{queryParams:{returnUrl:this.router.url+"?createInterest=true&queuetype="+this.marketObject.queueType}})}postMarketApplication(e){this.marketService.postMarketApplication(e).subscribe(i=>{this.enableInterest=!1;let s=0;(0,Pi.O)(1e3,1e3).pipe((0,x.H)(l=>this.marketService.getMarketApplicationsItem(i?.id[0],!1)),(0,Ni.Q)(this.completeEvent),(0,z.W)(l=>(this.completeEvent.next(!0),(0,Vi.$)(l)))).subscribe(l=>{s+=1,s>6&&(this.snackBarService.success(this.translate.instant("INTERESTSUCCESS")),this.completeEvent.next(!0)),!1===l?.application?.presentation?.executing&&(this.completeEvent.next(!0),"form"===l.application.presentation.type?this.dialog.open(E.w,{data:{heading:this.translate.instant("INTERESTSUCCESS"),text:this.translate.instant("MARKETPROFILEREMINDER"),dialogChoices:V.$.CustomClose,customButtonText:this.translate.instant("APPLICANTPROFILE")},scrollStrategy:new A.t0,ariaLabel:this.translate.instant("INTERESTSUCCESS"),autoFocus:!1}).afterClosed().subscribe(m=>{"custom"===m&&this.router.navigateByUrl(`/market/applications/${l.application.marketObject.type}/${l.application.id}`)}):this.snackBarService.success(this.translate.instant("INTERESTSUCCESS")),this.menuService.refreshMenu())})})}goToQueueRegistration(e){this.router.navigate(["/registration/queue"],{queryParams:{queuetype:e,returnUrl:this.router.url}})}getGoogleMapsUrl(e){return`https://www.google.com/maps/search/?api=1&query=${encodeURI(e)}`}showCreateInterest(){return this.marketObjectStatus&&!this.showQueueRegistrationButton}showQueueRegistration(){return this.marketObjectStatus&&this.showQueueRegistrationButton}isFarIntoFuture(e){return"9999"===f()(e).format("YYYY")}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(T.M),t.rXU(F.nX),t.rXU(S),t.rXU(y.gRc),t.rXU(yt.W),t.rXU(F.Ix),t.rXU(b.c$),t.rXU(k.bZ),t.rXU(Ct.f),t.rXU(W.t),t.rXU(Q.z),t.rXU(Di.E),t.rXU(nt.$),t.rXU(Mt.hE))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-object"]],standalone:!1,decls:2,vars:2,consts:[[3,"is-mobile","is-desktop"],[1,"image-container"],[1,"swiper"],["data-mom-test","MarketObject_ImageCarousel",3,"images"],[1,"header-section"],[1,"header","flex-2"],[1,"address"],["data-mom-test","MyPages_ObjectInfo_Title",1,"mat-h1"],[1,"documents-container"],[1,"link-container"],[1,"location"],["data-mom-test","MarketObject_Location"],["data-mom-test","MarketObject_SizeArea"],["data-mom-test","MarketObject_Rooms"],["data-mom-test","MarketObject_Price"],[1,"flex-1dot5"],[1,"action-button-container"],["matButton","filled","data-mom-test","MyPages_ObjectInfo_InterestedButton",3,"full-width","disabled"],["matButton","filled","data-mom-test","MarketObject_QueueRegistrationButton",3,"full-width"],[1,"commands-messages"],[1,"check-list-message"],["data-mom-test","MarketObject_ImportantInfo",1,"text-item"],[1,"info-container"],[1,"texts"],[1,"details"],[1,"document"],["mat-button","","color","primary","target","_blank",1,"document-button",3,"href"],["target","_blank","data-mom-test","MarketObject_ShowOnMapLink",1,"link",3,"href"],["matButton","filled","data-mom-test","MyPages_ObjectInfo_InterestedButton",3,"click","disabled"],["matButton","filled","data-mom-test","MarketObject_QueueRegistrationButton",3,"click"],[1,"icon-wrapper"],[1,"icon","mat-text-primary"],[3,"markdown"],["data-mom-test","MarketObject_WithdrawalDescription"],[1,"text-item-value"],[1,"text-item-label"],[1,"detail-item"],[1,"detail-item-label"],[1,"detail-item-value"],[1,"attributes"],[1,"attribute-icons"],[1,"mat-text-primary"],["height","24","width","24"],["data-mom-test","MarketObject_ApplicationOpenTo",1,"detail-item-value"],["data-mom-test","MarketObject_AvailableFrom",1,"detail-item-value"],["data-mom-test","MarketObject_SizeAreaDetail",1,"detail-item-value"],["data-mom-test","MarketObject_RentValue",1,"detail-item-value"],["data-mom-test","MarketObject_BillingPeriod",1,"detail-item-value",2,"display","flex","align-items","center"],["tabindex","0",1,"mat-text-primary",2,"margin-left","8px",3,"matTooltip"],["data-mom-test","MarketObject_Floor",1,"detail-item-value"],["data-mom-test","MarketObject_OfficialApartmentNumber",1,"detail-item-value"],["data-mom-test","MarketObject_SignNumber",1,"detail-item-value"],["data-mom-test","MarketObject_QueueType",1,"detail-item-value"]],template:function(i,a){1&i&&(t.nVh(0,Vn,43,30,"div",0),t.nVh(1,Nn,1,0,"taiga-page-not-found")),2&i&&(t.vxM(a.marketObject?0:-1),t.R7$(),t.vxM(a.marketObjectNotFound?1:-1))},dependencies:[ot.q,G.An,I.$z,M.RN,M.m2,M.Lc,Gi.oV,wi.H,w.N,$t.Q,H.K,b.D9],styles:[".is-desktop[_ngcontent-%COMP%], .is-mobile[_ngcontent-%COMP%]{padding:16px}.image-content[_ngcontent-%COMP%]{align-items:center;display:flex}.image-content-desktop[_ngcontent-%COMP%]{height:555px}.image-content-mobile[_ngcontent-%COMP%]{height:235px}.image[_ngcontent-%COMP%]{width:100%;object-fit:cover;display:flex}.image-desktop[_ngcontent-%COMP%]{max-height:555px}.image-mobile[_ngcontent-%COMP%]{max-height:235px}mat-card[_ngcontent-%COMP%]{padding:0;overflow:hidden}.mat-h2[_ngcontent-%COMP%]{margin-bottom:0}.header-section[_ngcontent-%COMP%]{margin-top:10px;margin-left:15px;margin-right:15px}.address[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.info-container[_ngcontent-%COMP%]{margin-left:15px;margin-right:15px;
1display:flex}.texts-width[_ngcontent-%COMP%]{flex:2}.details-width[_ngcontent-%COMP%]{flex:1.5;margin-left:32px}.detail-item[_ngcontent-%COMP%]{display:flex;margin-bottom:10px}.detail-item-label[_ngcontent-%COMP%], .detail-item-value[_ngcontent-%COMP%]{flex:1}.text-item[_ngcontent-%COMP%]{margin-bottom:10px}.info-container-mobile[_ngcontent-%COMP%]{flex-direction:column-reverse}.mat-divider[_ngcontent-%COMP%]{padding-bottom:15px}.text-item-value[_ngcontent-%COMP%]{margin-bottom:10px}.text-item-label[_ngcontent-%COMP%], .detail-item-label[_ngcontent-%COMP%]{margin-bottom:0;margin-top:0;font-size:.875rem}.full-width[_ngcontent-%COMP%]{width:100%}.action-button-container[_ngcontent-%COMP%]{margin-bottom:10px;display:flex;justify-content:flex-end}.check-list-message[_ngcontent-%COMP%]{margin-bottom:10px;display:flex;align-items:center}.flex-box[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.is-mobile[_ngcontent-%COMP%]   .swiper[_ngcontent-%COMP%]{height:208px}.is-desktop[_ngcontent-%COMP%]   .swiper[_ngcontent-%COMP%]{height:613px}.link-container[_ngcontent-%COMP%]{margin-bottom:5px}.icon[_ngcontent-%COMP%]{margin-right:10px}.mat-h1[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500;margin:0}.document-button[_ngcontent-%COMP%]{padding-left:0}.flex-1[_ngcontent-%COMP%]{flex:1}.flex-1dot5[_ngcontent-%COMP%]{flex:1.5;margin-left:30px}.flex-2[_ngcontent-%COMP%]{flex:2}.icon-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:10px}.attributes[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:8px}.attribute-icons[_ngcontent-%COMP%]{display:flex;align-items:center}.attributes[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{margin-left:-30px}mat-card-subtitle[_ngcontent-%COMP%]{margin-bottom:10px}.swiper[_ngcontent-%COMP%]{padding:15px}.detail-item-label[_ngcontent-%COMP%], .text-item-label[_ngcontent-%COMP%]{color:var(--mat-sys-primary);font-weight:700}"]})}}return n})();var tt=d(7673),ct=d(6380);let Gn=(()=>{class n{constructor(e,i,a,s){this.marketService=e,this.errorService=i,this.userMessageService=a,this.router=s}resolve(e){const i=e.paramMap.get("id"),a=e.paramMap.get("objectType");return(0,L.p)([this.marketService.getMarketObject(i),this.marketService.getMarketObjectsTypesItem(a)]).pipe((0,z.W)(s=>{const l=this.errorService.parseError(s);if("NotFound"===l?.subCode)return(0,tt.of)(null);this.userMessageService.errorWithHeader(l.message,"",l.displayErrorReportNumber?l.errorReportNumber:""),this.router.navigateByUrl("/")}))}static{this.\u0275fac=function(i){return new(i||n)(r.KVO(S),r.KVO(ct.I),r.KVO(Q.z),r.KVO(F.Ix))}}static{this.\u0275prov=r.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Pt=d(226),vt=d(9454),Vt=d(5571),wn=d(1517),Xn=d(7403),Nt=d(5951),xt=d(1301);const Bn=n=>({answerBefore:n}),Un=n=>({invalidChars:n});function Ln(n,o){if(1&n&&(t.j41(0,"div"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.SpI(" ",t.i5U(2,1,"ANSWERBEFORE",t.eq3(4,Bn,e.formatDate(null==e.item.presentation.data?null:e.item.presentation.data.answerBefore)))," ")}}function zn(n,o){if(1&n&&(t.j41(0,"mat-radio-button",7),t.EFF(1),t.k0s()),2&n){const e=o.$implicit;t.Y8G("value",e.command),t.R7$(),t.JRh(e.displayName)}}function Yn(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.JRh(t.bMT(2,1,"INPUTREQUIRED")))}function Qn(n,o){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){let e;t.XpG(2);const i=t.sdS(16);t.R7$(),t.JRh(t.i5U(2,1,"INVALIDCHARACTERS",t.eq3(4,Un,null==i.controls.answerReason||null==(e=i.controls.answerReason.getError("allowedCharacters"))?null:e.invalidChars)))}}function Hn(n,o){if(1&n&&(t.j41(0,"mat-form-field",8)(1,"mat-label"),t.EFF(2),t.k0s(),t.nrm(3,"textarea",12),t.DNE(4,Yn,3,3,"mat-error",13)(5,Qn,3,6,"mat-error",13),t.k0s()),2&n){const e=t.XpG(),i=t.sdS(16);t.R7$(2),t.JRh(e.item.presentation.data.responseReasonQuestion),t.R7$(),t.Y8G("required",e.item.presentation.data.responseReasonQuestionNoMandatory&&e.item.presentation.data.responseReasonQuestionYesMandatory||"no"===e.answerValue&&e.item.presentation.data.responseReasonQuestionNoMandatory||"yes"===e.answerValue&&e.item.presentation.data.responseReasonQuestionYesMandatory),t.R7$(),t.Y8G("ngIf",null==i.controls.answerReason?null:i.controls.answerReason.hasError("required")),t.R7$(),t.Y8G("ngIf",null==i.controls.answerReason?null:i.controls.answerReason.hasError("allowedCharacters"))}}function Jn(n,o){1&n&&(t.j41(0,"div",9),t.nrm(1,"taiga-markdown",14),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.Y8G("markdown",t.bMT(2,1,"CONFIRMAPPLICATIONANSWER")))}function qn(n,o){if(1&n){const e=t.RV6();t.j41(0,"taiga-loading-button",15),t.nI1(1,"translate"),t.bIt("clicked",function(){r.eBV(e);const a=t.XpG(),s=t.sdS(16);
1return r.Njj(a.answerClick(a.answerValue,s))}),t.k0s()}if(2&n){const e=t.XpG();t.Y8G("disabled",e.disableButton)("spin",e.disableButton)("text",t.bMT(1,3,"SAVE"))}}let Wn=(()=>{class n{constructor(e){this.mediaQueryService=e,this.answerClicked=new t.bkB}formatDate(e){const i=f()(f()(e).format("HH:mm"),"HH:mm"),a=f()("23:59","HH:mm");return i.isBefore(a)?f()(e).format("YYYY-MM-DD HH:mm"):f()(e).format("YYYY-MM-DD")}answerClick(e,i){i.invalid?i.controls.answerReason.markAsTouched():this.answerClicked.emit({type:e,reason:i?.controls?.answerReason?.value})}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(T.M))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-application-question"]],inputs:{item:"item",disableButton:"disableButton"},outputs:{answerClicked:"answerClicked"},standalone:!1,decls:21,vars:11,consts:[["form","ngForm"],[1,"flex-container"],[1,"flex-item"],[1,"mat-h2","status-header"],[1,"mat-body-strong"],[1,"radio-button-container"],[3,"ngModelChange","ngModel"],["data-mom-test","MyPages_MySearchApplication_Question_Choice",3,"value"],[1,"form-field"],[1,"answer-info"],["align","end",2,"margin-top","16px"],["mat-raised-button","","color","primary","data-mom-test","MyPages_MySearchApplication_Question_Save",3,"disabled","spin","text"],["type","text","matInput","","maxlength","256","cdkTextareaAutosize","","ngModel","","name","answerReason","data-mom-test","MyPages_MySearchApplication_Question_Reason","autocomplete","off",3,"required"],[4,"ngIf"],[3,"markdown"],["mat-raised-button","","color","primary","data-mom-test","MyPages_MySearchApplication_Question_Save",3,"clicked","disabled","spin","text"]],template:function(i,a){if(1&i){const s=t.RV6();t.j41(0,"div")(1,"div",1)(2,"div",2)(3,"div")(4,"h2",3),t.EFF(5),t.k0s(),t.nVh(6,Ln,3,6,"div"),t.k0s()(),t.j41(7,"div",2)(8,"div")(9,"div",4),t.EFF(10),t.k0s(),t.j41(11,"div",5)(12,"mat-radio-group",6),t.mxI("ngModelChange",function(c){return r.eBV(s),t.DH7(a.answerValue,c)||(a.answerValue=c),r.Njj(c)}),t.Z7z(13,zn,2,2,"mat-radio-button",7,t.fX1),t.k0s()(),t.j41(15,"form",null,0),t.nVh(17,Hn,6,4,"mat-form-field",8),t.k0s(),t.nVh(18,Jn,3,3,"div",9),t.j41(19,"div",10),t.nVh(20,qn,2,5,"taiga-loading-button",11),t.k0s()()()()()}2&i&&(t.AVh("is-mobile",a.mediaQueryService.isMobile())("is-desktop",!a.mediaQueryService.isMobile()),t.R7$(5),t.JRh(a.item.statusDisplayName),t.R7$(),t.vxM(null!=a.item.presentation&&a.item.presentation.data?6:-1),t.R7$(4),t.SpI(" ",a.item.presentation.data.question," "),t.R7$(2),t.R50("ngModel",a.answerValue),t.R7$(),t.Dyx(a.item.commands),t.R7$(4),t.vxM(!a.answerValue||(null==a.item.presentation.data.responseReasonQuestionType?null:a.item.presentation.data.responseReasonQuestionType.toString())!==a.answerValue&&"both"!==(null==a.item.presentation.data.responseReasonQuestionType?null:a.item.presentation.data.responseReasonQuestionType.toString())?-1:17),t.R7$(),t.vxM(a.answerValue?18:-1),t.R7$(2),t.vxM(a.answerValue?20:-1))},dependencies:[$.bT,at.fg,j.rl,j.nJ,j.TL,Xn.xb,Nt.VT,Nt._g,u.qT,u.me,u.BC,u.cb,u.YS,u.tU,u.vS,u.cV,xt.A,w.N,b.D9],styles:[".is-desktop[_ngcontent-%COMP%]   .flex-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.is-desktop[_ngcontent-%COMP%]   .flex-item[_ngcontent-%COMP%]{width:50%}.is-desktop[_ngcontent-%COMP%]   .flex-item[_ngcontent-%COMP%]:first-of-type{padding-right:15px}.mat-mdc-radio-button[_ngcontent-%COMP%] ~ .mat-radio-button[_ngcontent-%COMP%]{margin-left:16px}.radio-button-container[_ngcontent-%COMP%]{margin-top:10px;height:38px;align-items:center;display:flex;justify-content:space-between}.is-mobile[_ngcontent-%COMP%]   .flex-item[_ngcontent-%COMP%] ~ .flex-item[_ngcontent-%COMP%]{margin-top:15px}.answer-info[_ngcontent-%COMP%]{font-weight:700;margin-top:10px}.form-field[_ngcontent-%COMP%]{width:100%;margin-top:8px}"]})}}return n})();function Zn(n,o){if(1&n&&(t.j41(0,"div",6),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit,i=t.XpG();t.R7$(),t.Lme(" ",null==e||null==e.presentation||null==e.presentation.data?null:e.presentation.data.question,": ",i.translateAnswer(null==e||null==e.presentation||null==e.presentation.data?null:e.presentation.data.answer)," ")}}function Kn(n,o){if(1&n&&(t.j41(0,"div"),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.JRh(null==e||null==e.presentation||null==e.presentation.data?null:e.presentation.data.description)}}function ta(n,o){if(1&n&&(t.j41(0,"li",3)(1,"div",4)(2,"div"),t.EFF(3),t.k0s(),t.j41(4,"div"),t.EFF(5),t.k0s()(),t.j41(6,"div",5),t.EFF(7),t.k0s(),t.nVh(8,Zn,2,2,"div",6),t.nVh(9,Kn,2,1,"div"),t.k0s()),2&n){const e=o.$implicit,i=t.XpG();t.R7$(3),t.JRh(i.formatDate(e.occurred)),t.R7$(2),t.JRh(i.formatTime(e.occurred)),t.R7$(2),t.SpI(" ",e.statusDisplayName," "),t.R7$(),t.vxM(null!=e&&null!=e.presentation&&null!=e.presentation.data&&e.presentation.data.answer?8:-1),t.R7$(),t.vxM(null!=e&&null!=e.presentation&&null!=e.presentation.data&&e.presentation.data.description?9:-1)}}function ea(n,o){if(1&n&&(t.j41(0,"li",3)(1,"div",7)(2,"div"),t.EFF(3),t.k0s(),t.j41(4,"div"),t.EFF(5),t.k0s()(),t.j41(6,"div",8),t.EFF(7),t.nI1(8,"translate"),t.k0s()()),2&n){const e=t.XpG();t.R7$(3),t.JRh(e.formatDate(e.created)),t.R7$(2),t.JRh(e.formatTime(e.created)),t.R7$(2),t.JRh(t.bMT(8,3,"REGIST
1ERED"))}}let ia=(()=>{class n{constructor(e,i){this.mediaQueryService=e,this.translate=i,this.steps?.reverse()}formatDate(e){return f()(e).utc(!0).format("YYYY-MM-DD")}formatTime(e){return f()(e).utc(!0).format("HH:mm")}translateAnswer(e){return this.translate.instant(e?.toUpperCase())}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(T.M),t.rXU(b.c$))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-application-history"]],inputs:{steps:"steps",created:"created"},standalone:!1,decls:6,vars:5,consts:[[1,"mat-bg-surface-container-low"],[1,"timeline-wrapper"],[1,"StepProgress","mat-small"],[1,"StepProgress-item"],["data-mom-test","MyPages_MySearchApplication_History_Date",1,"time","mat-font-body-sm"],["data-mom-test","MyPages_MySearchApplication_History_Step",1,"mat-font-title-sm"],["data-mom-test","MyPages_MySearchApplication_History_Question",1,"mat-font-body-sm"],[1,"time","mat-font-body-sm"],[1,"mat-font-title-sm"]],template:function(i,a){1&i&&(t.j41(0,"div",0)(1,"div",1)(2,"ul",2),t.Z7z(3,ta,10,5,"li",3,t.fX1),t.nVh(5,ea,9,5,"li",3),t.k0s()()()),2&i&&(t.AVh("is-mobile",a.mediaQueryService.isMobile())("is-desktop",!a.mediaQueryService.isMobile()),t.R7$(3),t.Dyx(a.steps),t.R7$(2),t.vxM(a.created?5:-1))},dependencies:[b.D9],styles:['.bold[_ngcontent-%COMP%]{font-weight:700}.time[_ngcontent-%COMP%]{position:absolute;left:-110px;margin-top:3px}.timeline-wrapper[_ngcontent-%COMP%]{padding-left:55px;font-size:.875rem}.StepProgress[_ngcontent-%COMP%]{position:relative;padding-left:50px;list-style:none}.StepProgress-item[_ngcontent-%COMP%]{position:relative;counter-increment:list}.StepProgress-item[_ngcontent-%COMP%]:not(:last-child){padding-bottom:30px}.StepProgress-item[_ngcontent-%COMP%]:not(:last-child):before{display:inline-block;content:"";position:absolute;top:3px;left:-20px;width:10px;height:100%;border-left:2px solid #ccc}.StepProgress-item[_ngcontent-%COMP%]:after{content:"";display:inline-block;position:absolute;top:3px;left:-27px;width:12px;height:12px;border:2px solid #ccc;border-radius:50%;background-color:#fff}.StepProgress-item.is-done[_ngcontent-%COMP%]:before{border-left:2px solid green}.StepProgress-item.is-done[_ngcontent-%COMP%]:after{font-size:.625rem;color:#fff;text-align:center;border:2px solid green;background-color:green}.StepProgress[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{display:block}li[_ngcontent-%COMP%]{margin-bottom:0}']})}}return n})();const na=n=>["/signings",n];function aa(n,o){if(1&n&&(t.j41(0,"div",4)(1,"button",5),t.EFF(2," Signera "),t.k0s()()),2&n){const e=t.XpG();t.R7$(),t.Y8G("routerLink",t.eq3(1,na,e.item.presentation.data.signingId))}}let sa=(()=>{class n{constructor(e){this.mediaQueryService=e}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(T.M))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-application-signing"]],inputs:{item:"item"},standalone:!1,decls:11,vars:9,consts:[[1,"flex-container"],[1,"flex-item"],[1,"mat-h2","status-header"],[1,"flex-item","align-items-end"],[1,"signing-button-container"],["mat-raised-button","","color","primary","data-mom-test","MyPages_ApplicationSigning_SignButton",3,"routerLink"]],template:function(i,a){1&i&&(t.j41(0,"div")(1,"div",0)(2,"div",1)(3,"div")(4,"h2",2),t.EFF(5),t.k0s(),t.j41(6,"div"),t.EFF(7),t.nI1(8,"translate"),t.k0s()()(),t.j41(9,"div",3),t.nVh(10,aa,3,3,"div",4),t.k0s()()()),2&i&&(t.AVh("is-mobile",a.mediaQueryService.isMobile())("is-desktop",!a.mediaQueryService.isMobile()),t.R7$(5),t.JRh(a.item.statusDisplayName),t.R7$(2),t.SpI(" ",t.bMT(8,7,"SIGNTEXT")," "),t.R7$(3),t.vxM(null!=a.item&&null!=a.item.presentation&&null!=a.item.presentation.data&&a.item.presentation.data.signingId?10:-1))},dependencies:[U.Wk,I.$z,b.D9],styles:[".is-desktop[_ngcontent-%COMP%]   .flex-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.is-desktop[_ngcontent-%COMP%]   .flex-item[_ngcontent-%COMP%]{width:50%}.is-mobile[_ngcontent-%COMP%]   .flex-item[_ngcontent-%COMP%] ~ .flex-item[_ngcontent-%COMP%]{margin-top:15px}.align-items-end[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end}"]})}}return n})();function oa(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",6)(1,"mat-checkbox",10),t.mxI("ngModelChange",function(a){r.eBV(e);const s=t.XpG();return t.DH7(s.checked,a)||(s.checked=a),r.Njj(a)}),t.EFF(2),t.k0s()()}if(2&n){const e=t.XpG();t.R7$(),t.R50("ngModel",e.checked),t.R7$(),t.JRh(e.item.commands[0].displayName)}}function ra(n,o){1&n&&(t.j41(0,"div",7),t.nrm(1,"taiga-markdown",3),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.Y8G("markdown",t.bMT(2,1,"CONFIRMAPPLICATIONANSWER")))}function la(n,o){if(1&n){const e=t.RV6();t.j41(0,"taiga-loading-button",11),t.nI1(1,"translate"),t.bIt("clicked",function(){r.eBV(e);const a=t.XpG();
1return r.Njj(a.answerClick(a.item.commands[0].command))}),t.k0s()}if(2&n){const e=t.XpG();t.Y8G("disabled",e.disableButton)("spin",e.disableButton)("text",t.bMT(1,3,"SAVE"))}}let ca=(()=>{class n{constructor(e){this.mediaQueryService=e,this.answerClicked=new t.bkB}answerClick(e){this.answerClicked.emit({type:e,reason:void 0})}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(T.M))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-application-viewing-info"]],inputs:{item:"item",disableButton:"disableButton"},outputs:{answerClicked:"answerClicked"},standalone:!1,decls:17,vars:11,consts:[[1,"flex-container"],[1,"flex-item"],[1,"mat-h2","status-header"],[3,"markdown"],[3,"innerText"],[1,"mat-body-strong"],[1,"checkbox-container"],[1,"answer-info"],["align","end",2,"margin-top","16px"],["mat-raised-button","","color","primary","data-mom-test","MyPages_MySearchApplication_Question_Save",3,"disabled","spin","text"],["color","primary","data-mom-test","MyPages_ApplicationViewingInfo_Checkbox",3,"ngModelChange","ngModel"],["mat-raised-button","","color","primary","data-mom-test","MyPages_MySearchApplication_Question_Save",3,"clicked","disabled","spin","text"]],template:function(i,a){1&i&&(t.j41(0,"div")(1,"div",0)(2,"div",1)(3,"div")(4,"h2",2),t.EFF(5),t.k0s(),t.j41(6,"div"),t.nrm(7,"taiga-markdown",3),t.k0s(),t.nrm(8,"div",4),t.k0s()(),t.j41(9,"div",1)(10,"div")(11,"div",5),t.EFF(12),t.k0s(),t.nVh(13,oa,3,2,"div",6),t.nVh(14,ra,3,3,"div",7),t.j41(15,"div",8),t.nVh(16,la,2,5,"taiga-loading-button",9),t.k0s()()()()()),2&i&&(t.AVh("is-mobile",a.mediaQueryService.isMobile())("is-desktop",!a.mediaQueryService.isMobile()),t.R7$(5),t.JRh(null==a.item?null:a.item.statusDisplayName),t.R7$(2),t.Y8G("markdown",null==a.item||null==a.item.presentation||null==a.item.presentation.data?null:a.item.presentation.data.notes),t.R7$(),t.Y8G("innerText",null==a.item||null==a.item.presentation||null==a.item.presentation.data?null:a.item.presentation.data.text),t.R7$(4),t.SpI(" ",a.item.presentation.data.question," "),t.R7$(),t.vxM((null==a.item.commands?null:a.item.commands.length)>0?13:-1),t.R7$(),t.vxM(a.checked?14:-1),t.R7$(2),t.vxM(a.checked?16:-1))},dependencies:[ht.So,u.BC,u.vS,xt.A,w.N,b.D9],styles:[".is-desktop[_ngcontent-%COMP%]   .flex-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.is-desktop[_ngcontent-%COMP%]   .flex-item[_ngcontent-%COMP%]{width:50%}.is-desktop[_ngcontent-%COMP%]   .flex-item[_ngcontent-%COMP%]:first-of-type{padding-right:15px}.checkbox-container[_ngcontent-%COMP%]{margin-top:10px;height:38px;align-items:center;display:flex;justify-content:space-between}.is-mobile[_ngcontent-%COMP%]   .flex-item[_ngcontent-%COMP%] ~ .flex-item[_ngcontent-%COMP%]{margin-top:15px}.answer-info[_ngcontent-%COMP%]{font-weight:700;margin-top:10px}.bold[_ngcontent-%COMP%]{font-weight:700}"]})}}return n})();const ma=n=>({answerBefore:n});function da(n,o){if(1&n&&(t.j41(0,"div",3),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.SpI(" ",t.i5U(2,1,"UPDATEBEFORE",t.eq3(4,ma,e.formatDate(null==e.item.presentation.data?null:e.item.presentation.data.answerBefore)))," ")}}let pa=(()=>{class n{constructor(e){this.mediaQueryService=e}formatDate(e){const i=f()(f()(e).format("HH:mm"),"HH:mm"),a=f()("23:59","HH:mm");return i.isBefore(a)?f()(e).format("YYYY-MM-DD HH:mm"):f()(e).format("YYYY-MM-DD")}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(T.M))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-application-form"]],inputs:{item:"item"},standalone:!1,decls:14,vars:11,consts:[[1,"flex-container"],[1,"flex-item"],[1,"mat-h2","status-header"],["data-mom-test","MyPages_MySearchApplication_UpdateApplicantProfileLastDate"],[1,"flex-item","update-button-container"],["matButton","filled","data-mom-test","MyPages_MySearchApplication_UpdateApplicantProfileButton",3,"routerLink"]],template:function(i,a){1&i&&(t.j41(0,"div")(1,"div",0)(2,"div",1)(3,"div")(4,"h2",2),t.EFF(5),t.k0s(),t.j41(6,"p"),t.EFF(7),t.k0s(),t.nVh(8,da,3,6,"div",3),t.k0s()(),t.j41(9,"div",4)(10,"div")(11,"button",5),t.EFF(12),t.nI1(13,"translate"),t.k0s()()()()()),2&i&&(t.AVh("is-mobile",a.mediaQueryService.isMobile())("is-desktop",!a.mediaQueryService.isMobile()),t.R7$(5),t.JRh(null==a.item?null:a.item.statusDisplayName),t.R7$(2),t.SpI(" ",null==a.item||null==a.item.presentation||null==a.item.presentation.data?null:a.item.presentation.data.message," "),t.R7$(),t.vxM(null!=a.item.presentation&&a.item.presentation.data?8:-1),t.R7$(3),t.Y8G("routerLink",a.item.id),t.R7$(),t.SpI(" ",t.bMT(13,9,"UPDATEYOURAPPLICANTPROFILE")," "))},dependencies:[U.Wk,I.$z,b.D9],styles:[".is-desktop[_ngcontent-%COMP%]   .flex-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.is-desktop[_ngcontent-%COMP%]   .flex-item[_ngcontent-%COMP%]{width:50%}.is-mobile[_ngcontent-%COMP%]   .flex-item[_ngcontent-%COMP%] ~ .flex-item[_ngcontent-%COMP%]{margin-top:15px}.update-button-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end}"]})}}return n})();function ua(n,o){if(1&n&&t.nrm(0,"taiga-medium-header",4),2&n){const e=t.XpG();t.Y8G("text",e.getQueueInfoTitleText())("subText",e.getQueueInfoSubText())}}function _a(n,o){if(1&n&&(t.j41(0,"div",14),t.nrm(1,"taiga-markdown",15),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("markdown",e.marketApplicantStatusQueue.description)}}function ha(n,o){if(1&n&&t.nVh(0,_a,2,1,"div",14),2&n){const e=t.XpG();t.vxM(e.marketApplicantStatusQueue.description?0:-1)}}function fa(n,o){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Lme("",t.bMT(2,2,"BLOCKUNTIL")," ",e.formatDate(e.marketApplications.block.blockedUntilDate,!0),".\xa0")}}function ga(n,o){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.JRh(e.marketApplications.block.displayDescription)}}function ba(n,o){if(1&n&&(t.j41(0,"div",5)(1,"mat-icon",16),t.EFF(2,"info"),t.k0s(),t.EFF(3,"\xa0 "),t.j41(4,"span",17),t.EFF(5),t.k0s(),t.nVh(6,fa,3,4,"span"),t.nVh(7,ga,2,1,"span"),t.k0s()),2&n){const e=t.XpG();t.R7$(5),t.SpI("",e.marketApplications.block.displayName,"\xa0"),t.R7$(),t.vxM(e.marketApplications.block.blockedUntilDate?6:-1),t.R7$(),t.vxM(e.marketApplications.block.displayDescription?7:-1)}}function Ma(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",6)(1,"button",18),t.bIt("click",function(){r.eBV(e);const a=t.XpG();
1return r.Njj(a.goToQueueRegistration())}),t.EFF(2),t.nI1(3,"translate"),t.k0s()()}2&n&&(t.R7$(2),t.SpI(" ",t.bMT(3,1,"QUEUEREGISTRATION")," "))}function ka(n,o){1&n&&(t.j41(0,"div",13),t.nrm(1,"taiga-spinner",19),t.k0s())}function Ca(n,o){1&n&&(t.EFF(0),t.nI1(1,"translate")),2&n&&t.SpI(" ",t.bMT(1,1,"NOACTIVEAPPLICATIONS")," ")}function va(n,o){1&n&&(t.EFF(0),t.nI1(1,"translate")),2&n&&t.SpI(" ",t.bMT(1,1,"NOCLOSEDAPPLICATIONS")," ")}function xa(n,o){1&n&&(t.EFF(0),t.nI1(1,"translate")),2&n&&t.SpI(" ",t.bMT(1,1,"NOALLAPPLICATIONS")," ")}function Ra(n,o){if(1&n&&(t.nVh(0,Ca,2,3),t.nVh(1,va,2,3),t.nVh(2,xa,2,3)),2&n){const e=t.XpG(),i=t.sdS(11);t.vxM("active"===i.value&&0===(null==e.marketApplicationsActive?null:e.marketApplicationsActive.length)?0:-1),t.R7$(),t.vxM("closed"===i.value&&0===(null==e.marketApplicationsClosed?null:e.marketApplicationsClosed.length)?1:-1),t.R7$(),t.vxM("all"===i.value&&0===(null==e.marketApplications||null==e.marketApplications.items?null:e.marketApplications.items.length)?2:-1)}}function ya(n,o){if(1&n){const e=t.RV6();t.j41(0,"taiga-application-question",27,1),t.bIt("answerClicked",function(a){r.eBV(e);const s=t.sdS(1),l=t.XpG(3).$implicit,c=t.XpG(2);return r.Njj(c.postMarketApplicationsItemPost(a,l.marketObject.id,l.id,l.etag,s))}),t.k0s()}if(2&n){const e=t.XpG(3).$implicit;t.Y8G("item",e)}}function ja(n,o){if(1&n&&t.nrm(0,"taiga-application-signing",26),2&n){const e=t.XpG(3).$implicit;t.Y8G("item",e)}}function Ta(n,o){if(1&n){const e=t.RV6();t.j41(0,"taiga-application-viewing-info",27,2),t.bIt("answerClicked",function(a){r.eBV(e);const s=t.sdS(1),l=t.XpG(3).$implicit,c=t.XpG(2);return r.Njj(c.postMarketApplicationsItemPost(a,l.marketObject.id,l.id,l.etag,s))}),t.k0s()}if(2&n){const e=t.XpG(3).$implicit;t.Y8G("item",e)}}function Ia(n,o){if(1&n&&t.nrm(0,"taiga-application-form",26),2&n){const e=t.XpG(3).$implicit;t.Y8G("item",e)}}function Fa(n,o){if(1&n&&(t.j41(0,"mat-card",22)(1,"mat-card-content"),t.nVh(2,ya,2,1,"taiga-application-question",26)(3,ja,1,1,"taiga-application-signing",26)(4,Ta,2,1,"taiga-application-viewing-info",26)(5,Ia,1,1,"taiga-application-form",26),t.k0s()()),2&n){let e;const i=t.XpG(2).$implicit;t.R7$(2),t.vxM("questionYesNo"===(e=null==i.presentation?null:i.presentation.type)?2:"signing"===e?3:"viewingInfo"===e?4:"form"===e?5:-1)}}function Oa(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",32)(1,"button",33),t.nI1(2,"translate"),t.bIt("click",function(){r.eBV(e);const a=t.XpG(3).$implicit,s=t.XpG(2);return r.Njj(s.removeApplication(a.marketObject.id,a.id,a.etag))}),t.j41(3,"mat-icon",34),t.EFF(4,"delete_forever"),t.k0s()()()}2&n&&(t.R7$(),t.BMQ("aria-label",t.bMT(2,1,"DELETEAPPLICATION")))}function Sa(n,o){if(1&n&&(t.j41(0,"mat-card",24)(1,"div",28)(2,"div",29)(3,"div",30),t.EFF(4),t.k0s(),t.j41(5,"div",31),t.EFF(6),t.nI1(7,"translate"),t.k0s()(),t.nVh(8,Oa,5,3,"div",32),t.k0s()()),2&n){const e=t.XpG(2).$implicit,i=t.XpG(2);t.R7$(4),t.JRh(i.formatDate(e.created)),t.R7$(2),t.JRh(t.bMT(7,3,"REGISTERED")),t.R7$(2),t.vxM(i.showRemove(null==e?null:e.commands)?8:-1)}}function Aa(n,o){if(1&n&&(t.j41(0,"div",29)(1,"div")(2,"span",30),t.EFF(3),t.k0s()(),t.j41(4,"div",39)(5,"div",37),t.EFF(6),t.k0s()()()),2&n){const e=t.XpG(3).$implicit,i=t.XpG(2);t.R7$(3),t.JRh(i.formatDate(null==e.history||null==e.history.steps[0]?null:e.history.steps[0].occurred)),t.R7$(3),t.JRh(null==e.history||null==e.history.steps[0]?null:e.history.steps[0].statusDisplayName)}}function Ea(n,o){1&n&&(t.j41(0,"div",37),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"HISTORY")," "))}function $a(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",32)(1,"button",33),t.nI1(2,"translate"),t.bIt("click",function(){r.eBV(e),t.XpG();const a=t.sdS(1),s=t.XpG(2).$implicit;return t.XpG(2).removeApplication(s.marketObject.id,s.id,s.etag),r.Njj(a.expanded=!a.expanded)}),t.j41(3,"mat-icon",34),t.EFF(4,"delete_forever"),t.k0s()()()}2&n&&(t.R7$(),t.BMQ("aria-label",t.bMT(2,1,"DELETEAPPLICATION")))}function Pa(n,o){if(1&n&&(t.j41(0,"mat-expansion-panel",25,3)(2,"mat-expansion-panel-header",35)(3,"mat-panel-title")(4,"div",36),t.nVh(5,Aa,7,2,"div",29),t.nVh(6,Ea,3,3,"div",37),t.nVh(7,$a,5,3,"div",32),t.k0s()()(),t.nrm(8,"taiga-application-history",38),t.k0s()),2&n){const e=t.sdS(1),i=t.XpG(2).$implicit,a=t.XpG(2);t.R7$(5),t.vxM(e.expanded?-1:5),t.R7$(),t.vxM(e.expanded?6:-1),t.R7$(),t.vxM(a.showRemove(null==i?null:i.commands)?7:-1),t.R7$(),t.Y8G("steps",null==i.history?null:i.history.steps)("created",i.created)}}function Va(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",21),t.nVh(1,Fa,6,1,"mat-card",22),t.j41(2,"taiga-market-object-card",23),t.bIt("marketObjectClicked",function(a){r.eBV(e);const s=t.XpG().$implicit,l=t.XpG(2);
1return r.Njj(l.goToMarketObject(a,null==s.marketObject?null:s.marketObject.type))}),t.k0s(),t.nVh(3,Sa,9,5,"mat-card",24),t.nVh(4,Pa,9,5,"mat-expansion-panel",25),t.k0s()}if(2&n){const e=t.XpG().$implicit,i=t.XpG(2);t.Y8G("id",e.id),t.R7$(),t.vxM(e.active?1:-1),t.R7$(),t.AVh("no-border-top-radius",e.active||i.showRemove(null==e?null:e.commands)),t.Y8G("dataFields",null==i.marketObjectsTypesItemDictionary||null==i.marketObjectsTypesItemDictionary[null==e.marketObject?null:e.marketObject.type]?null:i.marketObjectsTypesItemDictionary[null==e.marketObject?null:e.marketObject.type].marketObjektListDataFields)("areaUseGeographicRentalArea",i.areaUseGeographicRentalArea)("marketObject",e.marketObject)("statusDisplayName",e.active?"":e.statusDisplayName)("placeSorted",e.placeSorted),t.R7$(),t.vxM((null==e.history||null==e.history.steps?null:e.history.steps.length)>0?-1:3),t.R7$(),t.vxM((null==e.history||null==e.history.steps?null:e.history.steps.length)>0?4:-1)}}function Na(n,o){if(1&n&&(t.qex(0,20),t.nVh(1,Va,5,11,"div",21),t.bVm()),2&n){const e=o.$implicit;t.R7$(),t.vxM(e.marketObject?1:-1)}}function Da(n,o){if(1&n&&t.Z7z(0,Na,2,1,"ng-container",20,t.fX1),2&n){const e=t.XpG();t.Dyx(e.marketApplicationsActive)}}function Ga(n,o){if(1&n){const e=t.RV6();t.j41(0,"taiga-application-question",27,1),t.bIt("answerClicked",function(a){r.eBV(e);const s=t.sdS(1),l=t.XpG(3).$implicit,c=t.XpG(2);return r.Njj(c.postMarketApplicationsItemPost(a,l.marketObject.id,l.id,l.etag,s))}),t.k0s()}if(2&n){const e=t.XpG(3).$implicit;t.Y8G("item",e)}}function wa(n,o){if(1&n&&t.nrm(0,"taiga-application-signing",26),2&n){const e=t.XpG(3).$implicit;t.Y8G("item",e)}}function Xa(n,o){if(1&n){const e=t.RV6();t.j41(0,"taiga-application-viewing-info",27,2),t.bIt("answerClicked",function(a){r.eBV(e);const s=t.sdS(1),l=t.XpG(3).$implicit,c=t.XpG(2);return r.Njj(c.postMarketApplicationsItemPost(a,l.marketObject.id,l.id,l.etag,s))}),t.k0s()}if(2&n){const e=t.XpG(3).$implicit;t.Y8G("item",e)}}function Ba(n,o){if(1&n&&t.nrm(0,"taiga-application-form",26),2&n){const e=t.XpG(3).$implicit;t.Y8G("item",e)}}function Ua(n,o){if(1&n&&(t.j41(0,"mat-card",22)(1,"mat-card-content"),t.nVh(2,Ga,2,1,"taiga-application-question",26)(3,wa,1,1,"taiga-application-signing",26)(4,Xa,2,1,"taiga-application-viewing-info",26)(5,Ba,1,1,"taiga-application-form",26),t.k0s()()),2&n){let e;const i=t.XpG(2).$implicit;t.R7$(2),t.vxM("questionYesNo"===(e=null==i.presentation?null:i.presentation.type)?2:"signing"===e?3:"viewingInfo"===e?4:"form"===e?5:-1)}}function La(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",32)(1,"button",33),t.nI1(2,"translate"),t.bIt("click",function(){r.eBV(e);const a=t.XpG(3).$implicit,s=t.XpG(2);return r.Njj(s.removeApplication(a.marketObject.id,a.id,a.etag))}),t.j41(3,"mat-icon",34),t.EFF(4,"delete_forever"),t.k0s()()()}2&n&&(t.R7$(),t.BMQ("aria-label",t.bMT(2,1,"DELETEAPPLICATION")))}function za(n,o){if(1&n&&(t.j41(0,"mat-card",24)(1,"div",28)(2,"div",29)(3,"div",30),t.EFF(4),t.k0s(),t.j41(5,"div",31),t.EFF(6),t.nI1(7,"translate"),t.k0s()(),t.nVh(8,La,5,3,"div",32),t.k0s()()),2&n){const e=t.XpG(2).$implicit,i=t.XpG(2);t.R7$(4),t.JRh(i.formatDate(e.created)),t.R7$(2),t.JRh(t.bMT(7,3,"REGISTERED")),t.R7$(2),t.vxM(i.showRemove(null==e?null:e.commands)?8:-1)}}function Ya(n,o){if(1&n&&(t.j41(0,"div",29)(1,"div")(2,"span",30),t.EFF(3),t.k0s()(),t.j41(4,"div",39)(5,"div",37),t.EFF(6),t.k0s()()()),2&n){const e=t.XpG(3).$implicit,i=t.XpG(2);t.R7$(3),t.JRh(i.formatDate(null==e.history||null==e.history.steps[0]?null:e.history.steps[0].occurred)),t.R7$(3),t.JRh(null==e.history||null==e.history.steps[0]?null:e.history.steps[0].statusDisplayName)}}function Qa(n,o){1&n&&(t.j41(0,"div",37),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"HISTORY")," "))}function Ha(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",32)(1,"button",33),t.nI1(2,"translate"),t.bIt("click",function(){r.eBV(e),t.XpG();const a=t.sdS(1),s=t.XpG(2).$implicit;return t.XpG(2).removeApplication(s.marketObject.id,s.id,s.etag),r.Njj(a.expanded=!a.expanded)}),t.j41(3,"mat-icon",34),t.EFF(4,"delete_forever"),t.k0s()()()}
12&n&&(t.R7$(),t.BMQ("aria-label",t.bMT(2,1,"DELETEAPPLICATION")))}function Ja(n,o){if(1&n&&(t.j41(0,"mat-expansion-panel",25,3)(2,"mat-expansion-panel-header",35)(3,"mat-panel-title")(4,"div",36),t.nVh(5,Ya,7,2,"div",29),t.nVh(6,Qa,3,3,"div",37),t.nVh(7,Ha,5,3,"div",32),t.k0s()()(),t.nrm(8,"taiga-application-history",38),t.k0s()),2&n){const e=t.sdS(1),i=t.XpG(2).$implicit,a=t.XpG(2);t.R7$(5),t.vxM(e.expanded?-1:5),t.R7$(),t.vxM(e.expanded?6:-1),t.R7$(),t.vxM(a.showRemove(null==i?null:i.commands)?7:-1),t.R7$(),t.Y8G("steps",null==i.history?null:i.history.steps)("created",i.created)}}function qa(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",21),t.nVh(1,Ua,6,1,"mat-card",22),t.j41(2,"taiga-market-object-card",23),t.bIt("marketObjectClicked",function(a){r.eBV(e);const s=t.XpG().$implicit,l=t.XpG(2);return r.Njj(l.goToMarketObject(a,null==s.marketObject?null:s.marketObject.type))}),t.k0s(),t.nVh(3,za,9,5,"mat-card",24),t.nVh(4,Ja,9,5,"mat-expansion-panel",25),t.k0s()}if(2&n){const e=t.XpG().$implicit,i=t.XpG(2);t.Y8G("id",e.id),t.R7$(),t.vxM(e.active?1:-1),t.R7$(),t.AVh("no-border-top-radius",e.active||i.showRemove(null==e?null:e.commands)),t.Y8G("dataFields",null==i.marketObjectsTypesItemDictionary||null==i.marketObjectsTypesItemDictionary[e.marketObject.type]?null:i.marketObjectsTypesItemDictionary[e.marketObject.type].marketObjektListDataFields)("areaUseGeographicRentalArea",i.areaUseGeographicRentalArea)("marketObject",e.marketObject)("statusDisplayName",e.active?"":e.statusDisplayName)("placeSorted",e.placeSorted),t.R7$(),t.vxM((null==e.history||null==e.history.steps?null:e.history.steps.length)>0?-1:3),t.R7$(),t.vxM((null==e.history||null==e.history.steps?null:e.history.steps.length)>0?4:-1)}}function Wa(n,o){if(1&n&&(t.qex(0,20),t.nVh(1,qa,5,11,"div",21),t.bVm()),2&n){const e=o.$implicit;t.R7$(),t.vxM(e.marketObject?1:-1)}}function Za(n,o){if(1&n&&t.Z7z(0,Wa,2,1,"ng-container",20,t.fX1),2&n){const e=t.XpG();t.Dyx(e.marketApplicationsClosed)}}let Dt=(()=>{class n{constructor(e,i,a,s,l,c,m,h,_,p,C,R,P,v){this.marketService=e,this.mediaQueryService=i,this.router=a,this.route=s,this.snackBarService=l,this.registrationService=c,this.translate=m,this.dialog=h,this.menuService=_,this.errorService=p,this.snackbarService=C,this.loadingService=R,this.clientConfigurationService=P,this.titleService=v,this.queueRegistrationLink=D.t.QUEUEREGISTRATION,this.clientConfigurationService.getClientConfigurationFeatures().subscribe(q=>{this.areaUseGeographicRentalArea=q?.areaUseGeographicRentalArea?.enabled})}ngOnInit(){this.route.paramMap.subscribe(e=>{this.marketApplications=null,this.marketApplicationsActive=null,this.marketApplicationsClosed=null,this.queuetype=e.get("queue"),this.getData(),this.registrationService.getMarketApplicantStatus().subscribe(i=>{this.marketApplicantStatusQueue=i?.queues?.find(a=>a.id===this.queuetype),this.marketApplicantStatus=i,this.joined=!!this.marketApplicantStatusQueue?.joined,this.clientConfigurationService.getClientConfigurationApp().subscribe(a=>{this.titleService.setTitle(`${this.marketApplicantStatusQueue?.displayName} - ${a?.name}`)})})})}getData(){this.showSpinner=!0,this.marketService.getMarketApplications(this.queuetype).pipe((0,z.W)(e=>{throw this.showSpinner=!1,e}),(0,x.H)(e=>{this.marketApplications=e,this.marketApplications?.items.sort((a,s)=>a.active===s.active?0:a.active?-1:s.active?1:void 0),this.marketApplicationsActive=this.marketApplications.items.filter(a=>!a.closed&&!a.removed),this.marketApplicationsClosed=this.marketApplications.items.filter(a=>a.closed||a.removed);const i=[...new Set(e.items.map(a=>a.marketObject?.type))];if(i.length>0){const a={};for(const s of i)a[s]=this.marketService.getMarketObjectsTypesItem(s);return(0,L.p)(a)}return(0,tt.of)(null)})).subscribe(e=>{e&&Object.keys(e).forEach(i=>{i&&(e[i].marketObjektListDataFields=e[i].marketObjektListDataFields?.filter(a=>{if("thumbnail"!==a.type&&"info"!==a.type&&"withdrawal.description"!==a.type&&"location.areaPath"!==a.type&&"files"!==a.type&&"description"!==a.type&&"displayName"!==a.type&&"location.area.displayName"!==a.type&&"queueType"!==a.type&&"sortOrder"!==a.type)return!0}))}),this.marketObjectsTypesItemDictionary=e,this.showSpinner=!1})}goToMarketObject(e,i){const a=`/market/${i}/${e}`;this.marketService.setPageYOffset(window.pageYOffset),this.router.navigateByUrl(a)}postMarketApplicationsItemPost(e,i,a,s,l){l&&(l.disableButton=!0),this.marketService.postMarketApplicationsItemPost(i,a,e,s).pipe((0,z.W)(c=>{if(l&&(l.disableButton=!1),"conflict"===c?.error?.error?.subcode?.toLowerCase()){this.getData(),this.menuService.refreshMenu(1500);const m=this.errorService.parseError(c);return this.snackbarService.errorWithHeader(m.stack,"",""),(0,tt.of)(null)}throw c})).subscribe(()=>{let c;switch(e.type){case"remove":this.snackBarService.success("Intresseanm\xe4lan borttagen"),this.getData();break;case"yes":case"no":case"done":c=N.Q.generateUniqueId(),this.loadingService.open(c),setTimeout(()=>{this.snackBarService.success("Du har nu svarat"),this.loadingService.close(c),this.getData(),this.menuService.refreshMenu(5e3)},2e3)}})}formatDate(e,i){return i?f()(e).utc(!0).format("YYYY-MM-DD"):f()(e).utc(!0).format("YYYY-MM-DD HH:mm")}getQueueInfoTitleText(){return this.marketApplicantStatusQueue?.value?`${this.marketApplicantStatusQueue?.displayName} ${this.marketApplicantStatusQueue?.value}  ${this.marketApplicantStatusQueue?.valueUnitDisplayName?.toLocaleLowerCase()}`:this.marketApplicantStatusQueue?.displayName}getQueueInfoSubText(){if(!this.marketApplicantStatusQueue.isMember)return this.translate.instant("NOTINQUEUE");let e=" ";if(this.marketApplicantStatusQueue?.joined&&(e=`${this.translate.instant("QUEUESINCE")} ${this.formatDate(this.marketApplicantStatusQueue?.joined,!0)}.`),this.marketApplicantStatus?.expirationPeriodMonths&&this.marketApplicantStatus?.expires){const i=f()(this.marketApplicantStatus?.expires).utc(!0).format("YYYY-MM-DD");e+=" "+this.translate.instant("EXPIRATIONINFO").replace("%applicantExpirationPeriodMonths%",this.marketApplicantStatus.expirationPeriodMonths.toString()).replace("%applicantExpires%",i)}return e}translateAnswer(e){return this.translate.instant(e?.toUpperCase())}
1showRemove(e){return!!e?.filter(i=>"remove"===i.command).length}removeApplication(e,i,a){this.dialog.open(E.w,{data:{heading:null,text:this.translate.instant("CONFIRMREMOVEAPPLICATION"),dialogChoices:V.$.YesNo},scrollStrategy:new A.t0,ariaLabel:this.translate.instant("CONFIRMREMOVEAPPLICATION"),autoFocus:!1}).afterClosed().subscribe(l=>{"yes"===l&&this.postMarketApplicationsItemPost({type:"remove",reason:void 0},e,i,a)})}goToQueueRegistration(){this.router.navigate([this.queueRegistrationLink],{queryParams:{queuetype:this.queuetype}})}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(S),t.rXU(T.M),t.rXU(F.Ix),t.rXU(F.nX),t.rXU(Q.z),t.rXU(Ct.f),t.rXU(b.c$),t.rXU(k.bZ),t.rXU(nt.$),t.rXU(ct.I),t.rXU(Q.z),t.rXU(Pt.U),t.rXU(W.t),t.rXU(Mt.hE))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-applications"]],standalone:!1,decls:25,vars:29,consts:[["group","matButtonToggleGroup"],["applicationQuestion",""],["applicationViewingInfo",""],["expansion",""],["data-mom-test","MyPages_MySearchApplication_PageTitle",3,"text","subText"],[1,"block-container"],[1,"queue-registration-button-container"],[3,"text","subText"],[1,"toggle-wrapper"],["value","active",1,"slim-toggle"],["value","active"],["value","closed"],["value","all"],[1,"spinner"],[1,"queue-description"],[3,"markdown"],["color","primary"],[1,"block-display-name"],["matButton","filled","data-mom-test","MyPages_MySearchApplication_QueueRegistrationButton",3,"click"],["aria-label","Progress spinner"],[1,"application-container"],["data-mom-test","MyPages_MySearchApplication_ListingCard",1,"application-container",3,"id"],[1,"application-status"],[1,"no-border-bottom-radius",3,"marketObjectClicked","dataFields","areaUseGeographicRentalArea","marketObject","statusDisplayName","placeSorted"],[1,"application-history",2,"padding-left","24px","padding-right","16px"],["togglePosition","before",1,"application-history"],[3,"item"],[3,"answerClicked","item"],[1,"status-container"],[1,"created-container"],[1,"mat-font-body-sm"],[1,"mat-body-strong","step-container"],[1,"remove-button-container"],["mat-icon-button","","color","accent","data-mom-test","MyPages_MarketApplications_RemoveButton",1,"remove-button",3,"click"],[1,"icon-display"],[1,"panel-header"],["data-mom-test","MyPages_MySearchApplication_History_Section",1,"status-container"],[1,"mat-font-title-sm"],[3,"steps","created"],[1,"step-container"]],template:function(i,a){if(1&i&&(t.j41(0,"div"),t.nVh(1,ua,1,2,"taiga-medium-header",4),t.nrm(2,"taiga-page-cards"),t.nVh(3,ha,1,1),t.nVh(4,ba,8,3,"div",5),t.nVh(5,Ma,4,3,"div",6),t.nrm(6,"taiga-medium-header",7),t.nI1(7,"translate"),t.nI1(8,"translate"),t.j41(9,"div",8)(10,"mat-button-toggle-group",9,0)(12,"mat-button-toggle",10),t.EFF(13),t.nI1(14,"translate"),t.k0s(),t.j41(15,"mat-button-toggle",11),t.EFF(16),t.nI1(17,"translate"),t.k0s(),t.j41(18,"mat-button-toggle",12),t.EFF(19),t.nI1(20,"translate"),t.k0s()()(),t.nVh(21,ka,2,0,"div",13),t.nVh(22,Ra,3,3),t.nVh(23,Da,2,0),t.nVh(24,Za,2,0),t.k0s()),2&i){const s=t.sdS(11);t.AVh("is-mobile",a.mediaQueryService.isMobile())("is-desktop",!a.mediaQueryService.isMobile()),t.R7$(),t.vxM(a.marketApplicantStatusQueue?1:-1),t.R7$(2),t.vxM(a.marketApplicantStatusQueue?3:-1),t.R7$(),t.vxM(null!=a.marketApplications&&a.marketApplications.block?4:-1),t.R7$(),t.vxM(a.marketApplicantStatusQueue&&!a.marketApplicantStatusQueue.isMember?5:-1),t.R7$(),t.Y8G("text",t.mNQ(t.bMT(7,19,"MYINTEREST")))("subText",t.mNQ(t.bMT(8,21,"MYINTERESTINFO"))),t.R7$(7),t.JRh(t.bMT(14,23,"ACTIVE")),t.R7$(3),t.JRh(t.bMT(17,25,"COMPLETED")),t.R7$(3),t.JRh(t.bMT(20,27,"ALL")),t.R7$(2),t.vxM(a.showSpinner?21:-1),t.R7$(),t.vxM(a.showSpinner?-1:22),t.R7$(),t.vxM("active"!==s.value&&"all"!==s.value||a.showSpinner?-1:23),t.R7$(),t.vxM("closed"!==s.value&&"all"!==s.value||a.showSpinner?-1:24)}},dependencies:[G.An,I.$z,lt.iY,M.RN,M.m2,vt.GK,vt.Z2,vt.WN,Vt.ec,Vt.pc,K.o,wn.t,w.N,H.K,Et,Wn,ia,sa,ca,pa,b.D9],styles:[".is-desktop[_ngcontent-%COMP%], .is-mobile[_ngcontent-%COMP%]{padding:16px}.application-status[_ngcontent-%COMP%]{margin-bottom:1px;border-bottom-left-radius:0;border-bottom-right-radius:0}.application-container[_ngcontent-%COMP%]{margin-bottom:15px}.application-history[_ngcontent-%COMP%]{margin-top:1px;border-top-left-radius:0;border-top-right-radius:0;padding-top:0;padding-bottom:0}.status-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;
1height:48px;width:100%}.step-container[_ngcontent-%COMP%]{margin-left:15px}.remove-button-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.icon-display[_ngcontent-%COMP%]{transform:scale(1.2)}.created-container[_ngcontent-%COMP%]{display:flex;align-items:center}.queue-registration-button-container[_ngcontent-%COMP%], .block-container[_ngcontent-%COMP%]{margin-bottom:16px}.block-display-name[_ngcontent-%COMP%]{font-weight:700}.block-container[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap}.panel-header[_ngcontent-%COMP%]{padding-right:0}.queue-description[_ngcontent-%COMP%], .toggle-wrapper[_ngcontent-%COMP%]{margin-bottom:16px}.spinner[_ngcontent-%COMP%]{display:flex;justify-content:center}"]})}}return n})();var Ka=d(7303);function ts(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",5),t.bIt("click",function(){r.eBV(e);const a=t.XpG().$implicit,s=t.XpG(2);return r.Njj(s.goToApplication(a.id,a._queueType))}),t.EFF(1),t.k0s()}if(2&n){const e=t.XpG().$implicit,i=t.XpG(2);t.AVh("full-width",i.mediaQueryService.isMobile()),t.R7$(),t.SpI(" ",e.marketObject.displayName," ")}}function es(n,o){if(1&n&&(t.j41(0,"div"),t.DNE(1,ts,2,3,"button",4),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.Y8G("ngIf",e.active&&"form"===e.presentation.type)}}function is(n,o){if(1&n&&(t.j41(0,"div"),t.DNE(1,es,2,1,"div",1),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.Y8G("ngForOf",null==e?null:e.items)}}let ns=(()=>{class n{constructor(e,i,a,s,l){this.marketApplications=e,this.router=i,this.dialogRef=a,this.location=s,this.mediaQueryService=l}goToApplication(e,i){this.dialogRef.close(),this.router.navigateByUrl(`market/applications/${i}/${e}`)}goBack(){this.location.back()}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(k.Vh),t.rXU(F.Ix),t.rXU(k.CP),t.rXU(Ka.aZ),t.rXU(T.M))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-ongoing-active-applications-dialog"]],standalone:!1,decls:12,vars:12,consts:[["mat-dialog-title",""],[4,"ngFor","ngForOf"],["align","end"],["mat-button","","data-mom-test","MyPages_MarketApplications_UpdateProfileCloseButton",3,"click"],["color","primary","mat-raised-button","","data-mom-test","MyPages_MarketApplications_UpdateProfileButton",3,"full-width","click",4,"ngIf"],["color","primary","mat-raised-button","","data-mom-test","MyPages_MarketApplications_UpdateProfileButton",3,"click"]],template:function(i,a){1&i&&(t.j41(0,"h2",0),t.EFF(1),t.nI1(2,"translate"),t.k0s(),t.j41(3,"mat-dialog-content")(4,"p"),t.EFF(5),t.nI1(6,"translate"),t.k0s(),t.DNE(7,is,2,1,"div",1),t.k0s(),t.j41(8,"mat-dialog-actions",2)(9,"button",3),t.bIt("click",function(){return a.goBack()}),t.EFF(10),t.nI1(11,"translate"),t.k0s()()),2&i&&(t.R7$(),t.JRh(t.bMT(2,6,"UPDATEAPPLICANTPROFILE")),t.R7$(4),t.JRh(t.bMT(6,8,"APPLICANTPROFILEUPDATEEXPIRED")),t.R7$(2),t.Y8G("ngForOf",a.marketApplications),t.R7$(2),t.AVh("full-width",a.mediaQueryService.isMobile()),t.R7$(),t.SpI(" ",t.bMT(11,10,"CLOSE")," "))},dependencies:[$.Sq,$.bT,I.$z,k.BI,k.E7,k.Yi,b.D9],styles:["button[_ngcontent-%COMP%]{margin-top:16px}.full-width[_ngcontent-%COMP%]{width:100%}"]})}}return n})();var Gt=d(9330),wt=d(4317),Y=d(1585);const J=n=>({invalidChars:n});function as(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INPUTREQUIRED")," "))}function ss(n,o){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){let e;const i=t.XpG(2).$implicit,a=t.XpG(2);t.R7$(),t.SpI(" ",t.i5U(2,1,"INVALIDCHARACTERS",t.eq3(4,J,null==(e=a.incomeFormGroup.controls[i.id].getError("allowedCharacters"))?null:e.invalidChars))," ")}}function os(n,o){if(1&n&&(t.j41(0,"div",7)(1,"mat-form-field",13)(2,"mat-label",14),t.EFF(3),t.k0s(),t.nrm(4,"input",15),t.j41(5,"mat-hint",16),t.EFF(6),t.k0s(),t.DNE(7,as,3,3,"mat-error",17)(8,ss,3,6,"mat-error",17),t.k0s()()),2&n){const e=t.XpG().$implicit,i=t.XpG(2);t.R7$(3),t.JRh(null==e.generic||null==e.generic.text?null:e.generic.text.label),t.R7$(),t.Y8G("formControlName",e.id)("maxlength",null==e.generic||null==e.generic.text?null:e.generic.text.maxLength)("required",null==e.generic||null==e.generic.text?null:e.generic.text.required),t.R7$(2),t.JRh(null==e.generic||null==e.generic.text?null:e.generic.text.description),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id].hasError("required")),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id].hasError("allowedCharacters"))}}function rs(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INPUTREQUIRED")," "))}function ls(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INVA
1LIDINCOME")," "))}function cs(n,o){if(1&n&&(t.j41(0,"div",8)(1,"mat-form-field",13)(2,"mat-label",18),t.EFF(3),t.k0s(),t.nrm(4,"input",19),t.j41(5,"mat-hint",16),t.EFF(6),t.k0s(),t.nVh(7,rs,3,3,"mat-error"),t.nVh(8,ls,3,3,"mat-error"),t.k0s()()),2&n){const e=t.XpG().$implicit,i=t.XpG(2);t.R7$(3),t.JRh(null==e.generic||null==e.generic.marketIncomeMonthly?null:e.generic.marketIncomeMonthly.label),t.R7$(),t.Y8G("formControlName",e.id)("maxlength",null==e.generic||null==e.generic.marketIncomeMonthly?null:e.generic.marketIncomeMonthly.maxLength)("required",null==e.generic||null==e.generic.marketIncomeMonthly?null:e.generic.marketIncomeMonthly.required),t.R7$(2),t.JRh(null==e.generic||null==e.generic.marketIncomeMonthly?null:e.generic.marketIncomeMonthly.description),t.R7$(),t.vxM(i.incomeFormGroup.controls[e.id].hasError("required")?7:-1),t.R7$(),t.vxM(i.incomeFormGroup.controls[e.id].hasError("required")?-1:8)}}function ms(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",9)(1,"mat-form-field",20),t.bIt("click",function(){r.eBV(e);const a=t.sdS(7);return r.Njj(a.open())}),t.j41(2,"mat-label",21),t.EFF(3),t.k0s(),t.nrm(4,"input",22)(5,"mat-datepicker-toggle",23)(6,"mat-datepicker",null,0),t.j41(8,"mat-hint",16),t.EFF(9),t.k0s(),t.j41(10,"mat-error"),t.EFF(11),t.nI1(12,"translate"),t.k0s()()()}if(2&n){const e=t.sdS(7),i=t.XpG().$implicit;t.R7$(3),t.JRh(null==i.generic||null==i.generic.date?null:i.generic.date.label),t.R7$(),t.Y8G("matDatepicker",e)("formControlName",i.id)("required",null==i.generic||null==i.generic.date?null:i.generic.date.required),t.R7$(),t.Y8G("for",e),t.R7$(4),t.JRh(null==i.generic||null==i.generic.date?null:i.generic.date.description),t.R7$(2),t.SpI(" ",t.bMT(12,7,"INPUTREQUIRED")," ")}}function ds(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INPUTREQUIRED")," "))}function ps(n,o){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){let e;const i=t.XpG(2).$implicit,a=t.XpG(2);t.R7$(),t.SpI(" ",t.i5U(2,1,"INVALIDCHARACTERS",t.eq3(4,J,null==(e=a.incomeFormGroup.controls[i.id+"-name"].getError("allowedCharacters"))?null:e.invalidChars))," ")}}function us(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INPUTREQUIRED")," "))}function _s(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INVALIDEMAIL")," "))}function hs(n,o){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){let e;const i=t.XpG(2).$implicit,a=t.XpG(2);t.R7$(),t.SpI(" ",t.i5U(2,1,"INVALIDCHARACTERS",t.eq3(4,J,null==(e=a.incomeFormGroup.controls[i.id+"-emailAddress"].getError("allowedCharacters"))?null:e.invalidChars))," ")}}function fs(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INPUTREQUIRED")," "))}function gs(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INVALIDPHONENUMBER")," "))}function bs(n,o){if(1&n&&(t.j41(0,"div",10)(1,"div"),t.EFF(2),t.k0s(),t.j41(3,"mat-hint",24),t.EFF(4),t.k0s(),t.j41(5,"div",25)(6,"mat-form-field",13)(7,"mat-label",26),t.EFF(8),t.nI1(9,"translate"),t.k0s(),t.nrm(10,"input",27),t.DNE(11,ds,3,3,"mat-error",17)(12,ps,3,6,"mat-error",17),t.k0s(),t.j41(13,"mat-form-field",13)(14,"mat-label"),t.EFF(15),t.nI1(16,"translate"),t.k0s(),t.nrm(17,"input",28),t.nVh(18,us,3,3,"mat-error"),t.nVh(19,_s,3,3,"mat-error"),t.DNE(20,hs,3,6,"mat-error",17),t.k0s(),t.j41(21,"mat-form-field",13)(22,"mat-label"),t.EFF(23),t.nI1(24,"translate"),t.k0s(),t.nrm(25,"input",27),t.nVh(26,fs,3,3,"mat-error"),t.nVh(27,gs,3,3,"mat-error"),t.k0s()()()),2&n){const e=t.XpG().$implicit,i=t.XpG(2);t.R7$(2),t.JRh(null==e.generic||null==e.generic.contactDetails?null:e.generic.contactDetails.heading),t.R7$(2),t.JRh(null==e.generic||null==e.generic.contactDetails?null:e.generic.contactDetails.description),t.R7$(4),t.JRh(t.bMT(9,18,"NAME")),t.R7$(2),t.Y8G("formControlName",e.id+"-name")("required",null==e.generic||null==e.generic.contactDetails?null:e.generic.contactDetails.required),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-name"].hasError("required")),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-name"].hasError("allowedCharacters")),t.R7$(3),t.JRh(t.bMT(16,20,"EMAILADDRESS")),t.R7$(2),t.Y8G("formControlName",e.id+"-emailAddress")("required",null==e.generic||null==e.generic.contactDetails?null:e.generic.contactDetails.required),t.R7$(),t.vxM(i.incomeFormGroup.controls[e.id+"-emailAddress"].hasError("required")?18:-1),t.R7$(),t.vxM(i.incomeFormGroup.controls[e.id+"-emailAddress"].hasError("required")?-1:19),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-emailAddress"].hasError("allowedCharacters")),t.R7$(3),t.JRh(t.bMT(24,22,"PHONENUMBER")),t.R7$(2),t.Y8G("formControlName",e.id+"-telephoneNumber")("required",null==e.generic||null==e.generic.contactDetails?null:e.generic.contactDetails.required),t.R7$(),t.vxM(i.incomeFormGroup.controls[e.id+"-telephoneNumber"].hasError("required")?26:-1),t.R7$(),t.vxM(i.incomeFormGroup.controls[e.id+"-telephoneNumber"].hasError("required")?-1:27)}}function Ms(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INPUTREQUIRED")," "))}function ks(n,o){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){let e;const i=t.XpG(2).$implicit,a=t.XpG(2);
1t.R7$(),t.SpI(" ",t.i5U(2,1,"INVALIDCHARACTERS",t.eq3(4,J,null==(e=a.incomeFormGroup.controls[i.id+"-address"].getError("allowedCharacters"))?null:e.invalidChars))," ")}}function Cs(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INPUTREQUIRED")," "))}function vs(n,o){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){let e;const i=t.XpG(2).$implicit,a=t.XpG(2);t.R7$(),t.SpI(" ",t.i5U(2,1,"INVALIDCHARACTERS",t.eq3(4,J,null==(e=a.incomeFormGroup.controls[i.id+"-postcode"].getError("allowedCharacters"))?null:e.invalidChars))," ")}}function xs(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INPUTREQUIRED")," "))}function Rs(n,o){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){let e;const i=t.XpG(2).$implicit,a=t.XpG(2);t.R7$(),t.SpI(" ",t.i5U(2,1,"INVALIDCHARACTERS",t.eq3(4,J,null==(e=a.incomeFormGroup.controls[i.id+"-city"].getError("allowedCharacters"))?null:e.invalidChars))," ")}}function ys(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INPUTREQUIRED")," "))}function js(n,o){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){let e;const i=t.XpG(2).$implicit,a=t.XpG(2);t.R7$(),t.SpI(" ",t.i5U(2,1,"INVALIDCHARACTERS",t.eq3(4,J,null==(e=a.incomeFormGroup.controls[i.id+"-country"].getError("allowedCharacters"))?null:e.invalidChars))," ")}}function Ts(n,o){if(1&n&&(t.j41(0,"div",11)(1,"div"),t.EFF(2),t.k0s(),t.j41(3,"mat-hint",24),t.EFF(4),t.k0s(),t.j41(5,"div",29)(6,"mat-form-field",13)(7,"mat-label"),t.EFF(8),t.nI1(9,"translate"),t.k0s(),t.nrm(10,"input",27),t.DNE(11,Ms,3,3,"mat-error",17)(12,ks,3,6,"mat-error",17),t.k0s(),t.j41(13,"mat-form-field",13)(14,"mat-label"),t.EFF(15),t.nI1(16,"translate"),t.k0s(),t.nrm(17,"input",27),t.DNE(18,Cs,3,3,"mat-error",17)(19,vs,3,6,"mat-error",17),t.k0s(),t.j41(20,"mat-form-field",13)(21,"mat-label"),t.EFF(22),t.nI1(23,"translate"),t.k0s(),t.nrm(24,"input",27),t.DNE(25,xs,3,3,"mat-error",17)(26,Rs,3,6,"mat-error",17),t.k0s(),t.j41(27,"mat-form-field",13)(28,"mat-label"),t.EFF(29),t.nI1(30,"translate"),t.k0s(),t.nrm(31,"input",27),t.DNE(32,ys,3,3,"mat-error",17)(33,js,3,6,"mat-error",17),t.k0s()()()),2&n){const e=t.XpG().$implicit,i=t.XpG(2);t.R7$(2),t.JRh(null==e.generic||null==e.generic.address?null:e.generic.address.label),t.R7$(2),t.JRh(null==e.generic||null==e.generic.address?null:e.generic.address.description),t.R7$(4),t.JRh(t.bMT(9,22,"ADDRESS")),t.R7$(2),t.Y8G("formControlName",e.id+"-address")("required",null==e.generic||null==e.generic.address?null:e.generic.address.required),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-address"].hasError("required")),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-address"].hasError("allowedCharacters")),t.R7$(3),t.JRh(t.bMT(16,24,"POSTALCODE")),t.R7$(2),t.Y8G("formControlName",e.id+"-postcode")("required",null==e.generic||null==e.generic.address?null:e.generic.address.required),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-postcode"].hasError("required")),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-postcode"].hasError("allowedCharacters")),t.R7$(3),t.JRh(t.bMT(23,26,"CITY")),t.R7$(2),t.Y8G("formControlName",e.id+"-city")("required",null==e.generic||null==e.generic.address?null:e.generic.address.required),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-city"].hasError("required")),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-city"].hasError("allowedCharacters")),t.R7$(3),t.JRh(t.bMT(30,28,"COUNTRY")),t.R7$(2),t.Y8G("formControlName",e.id+"-country")("required",null==e.generic||null==e.generic.address?null:e.generic.address.required),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-country"].hasError("required")),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-country"].hasError("allowedCharacters"))}}function Is(n,o){if(1&n&&(t.j41(0,"div")(1,"mat-form-field",13)(2,"mat-label"),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.nrm(5,"input",30),t.j41(6,"mat-error"),t.EFF(7),t.nI1(8,"translate"),t.k0s()(),t.j41(9,"mat-form-field",13)(10,"mat-label"),t.EFF(11),t.nI1(12,"translate"),t.k0s(),t.nrm(13,"input",31),t.j41(14,"mat-error"),t.EFF(15),t.nI1(16,"translate"),t.k0s()()()),2&n){const e=t.XpG().$implicit;t.R7$(3),t.JRh(t.bMT(4,8,"NUMBEROFADULTS")),t.R7$(2),t.Y8G("formControlName",e.id+"-numberOfAdults")("required",null==e.generic||null==e.generic.marketHousehold?null:e.generic.marketHousehold.required),t.R7$(2),t.SpI(" ",t.bMT(8,10,"INPUTREQUIRED")," "),t.R7$(4),t.JRh(t.bMT(12,12,"NUMBEROFCHILDREN")),t.R7$(2),t.Y8G("formControlName",e.id+"-numberOfChildren")("required",null==e.generic||null==e.generic.marketHousehold?null:e.generic.marketHousehold.required),t.R7$(2),t.SpI(" ",t.bMT(16,14,"INPUTREQUIRED")," ")}}function Fs(n,o){1&n&&t.EFF(0," * ")}function Os(n,o){if(1&n&&(t.j41(0,"mat-label",37),t.EFF(1),t.nVh(2,Fs,1,0),t.k0s()),2&n){t.XpG();const e=t.sdS(4),i=t.XpG().$implicit,a=t.XpG(2);t.AVh("warn",(null==i||null==i.generic||null==i.generic.file?null:i.generic.file.required)&&0===(null==e||null==e.anyFiles?null:e.anyFiles.length)&&a.saveFormOrDeleteFileIsClicked),t.R7$(),t.SpI(" ",null==i.generic||null==i.generic.file?null:i.generic.file.label," "),t.R7$(),t.vxM(null!=i.generic&&null!=i.generic.file&&i.generic.file.required?2:-1)}}function Ss(n,o){if(1&n&&(t.j41(0,"mat-hint",35),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2).$implicit;t.R7$(),t.JRh(null==e.generic||null==e.generic.file?null:e.generic.file.description)}}function As(n,o){1&n&&(t.j41(0,"mat-error",36),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INPUTREQUIRED")," "))}function Es(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",12),t.nVh(1,Os,3,4,"mat-label",32),t.nrm(2,"mat-divider",33),t.j41(3,"taiga-file-upload",34,1),t.nI1(5,"translate"),t.bIt("fileLoaded",function(a){r.eBV(e);const s=t.sdS(4),l=t.XpG().$implicit,c=t.XpG(2);
1return r.Njj(c.uploadFile(l.id,s,a))})("fileDeleted",function(a){r.eBV(e);const s=t.XpG().$implicit,l=t.XpG(2);return r.Njj(l.deleteFile(s.id,a))}),t.k0s(),t.nrm(6,"mat-divider"),t.nVh(7,Ss,2,1,"mat-hint",35),t.nVh(8,As,3,3,"mat-error",36),t.k0s()}if(2&n){const e=t.sdS(4),i=t.XpG().$implicit,a=t.XpG(2);t.R7$(),t.vxM(e?1:-1),t.R7$(2),t.Y8G("inputAnyFiles",a.getAnyFilesValue(i.id,null==i.generic?null:i.generic.type))("controlName",i.id)("text",t.bMT(5,9,"ADDFILE"))("required",(null==i.generic||null==i.generic.file?null:i.generic.file.required)&&(!((null==a.data||null==a.data.marketIncome||null==a.data.marketIncome.values[i.id]||null==a.data.marketIncome.values[i.id].generic||null==a.data.marketIncome.values[i.id].generic.file||null==a.data.marketIncome.values[i.id].generic.file.items?null:a.data.marketIncome.values[i.id].generic.file.items.length)>0)||a.cantDeletePatches(i.id))),t.R7$(3),t.AVh("divider-warn",(null==i.generic||null==i.generic.file?null:i.generic.file.required)&&0===(null==e.anyFiles?null:e.anyFiles.length)&&a.saveFormOrDeleteFileIsClicked),t.R7$(),t.vxM(a.incomeFormGroup.controls[i.id].touched&&a.incomeFormGroup.controls[i.id].hasError("required")?-1:7),t.R7$(),t.vxM(a.incomeFormGroup.controls[i.id].touched&&a.incomeFormGroup.controls[i.id].hasError("required")?8:-1)}}function $s(n,o){if(1&n&&t.nVh(0,os,9,7,"div",7)(1,cs,9,7,"div",8)(2,ms,13,9,"div",9)(3,bs,28,24,"div",10)(4,Ts,34,30,"div",11)(5,Is,17,16,"div")(6,Es,9,11,"div",12),2&n){let e;const i=o.$implicit;t.vxM("text"===(e=null==i.generic?null:i.generic.type)?0:"marketIncomeMonthly"===e?1:"date"===e?2:"contactDetails"===e?3:"address"===e?4:"marketHousehold"===e?5:"file"===e?6:-1)}}function Ps(n,o){if(1&n){const e=t.RV6();t.j41(0,"form",3)(1,"mat-dialog-content"),t.Z7z(2,$s,7,1,null,null,t.fX1),t.k0s(),t.j41(4,"mat-dialog-actions",4)(5,"button",5),t.bIt("click",function(){r.eBV(e);const a=t.XpG();return r.Njj(a.close())}),t.EFF(6),t.nI1(7,"translate"),t.k0s(),t.j41(8,"button",6),t.bIt("click",function(){r.eBV(e);const a=t.XpG();return a.save(),r.Njj(a.incomeFormGroup.markAllAsTouched())}),t.EFF(9),t.nI1(10,"translate"),t.k0s()()()}if(2&n){const e=t.XpG();t.Y8G("formGroup",e.incomeFormGroup),t.R7$(2),t.Dyx(e.data.fields.fields),t.R7$(4),t.JRh(t.bMT(7,4,"CANCEL")),t.R7$(2),t.Y8G("disabled",e.disableSaveButton),t.R7$(),t.SpI(" ",t.bMT(10,6,"SAVE")," ")}}let Rt=(()=>{class n{get i(){return this.incomeFormGroup.controls}constructor(e,i,a,s,l){this.data=e,this.dialogRef=i,this.formBuilder=a,this.adapter=s,this.marketService=l,this.filePatches=[],this.patchFields=[],this.adapter.setLocale("sv")}ngOnInit(){this.createFormGroup()}createFormGroup(){this.incomeFormGroup=this.formBuilder.group({});for(const e of this.data.fields?.fields)if("contactDetails"===e.generic?.type)this.incomeFormGroup.addControl(`${e.id}-name`,new u.hs(this.getValue(e.id,e.generic?.type,"name"),[(0,Y.f)()])),this.incomeFormGroup.addControl(`${e.id}-emailAddress`,new u.hs(this.getValue(e.id,e.generic?.type,"emailAddress"),[u.k0.email,(0,Y.f)()])),this.incomeFormGroup.addControl(`${e.id}-telephoneNumber`,new u.hs(this.getValue(e.id,e.generic?.type,"telephoneNumber"),[u.k0.pattern("^[0-9]*$")]));else if("address"===e.generic?.type)this.incomeFormGroup.addControl(`${e.id}-address`,new u.hs(this.getValue(e.id,e.generic?.type,"address"),[(0,Y.f)()])),this.incomeFormGroup.addControl(`${e.id}-postcode`,new u.hs(this.getValue(e.id,e.generic?.type,"postcode"),[(0,Y.f)()])),this.incomeFormGroup.addControl(`${e.id}-city`,new u.hs(this.getValue(e.id,e.generic?.type,"city"),[(0,Y.f)()])),this.incomeFormGroup.addControl(`${e.id}-country`,new u.hs(this.getValue(e.id,e.generic?.type,"country"),[(0,Y.f)()]));else if("marketHousehold"===e.generic?.type){const i=this.getValue(e.id,"numberOfAdults",null),a=this.getValue(e.id,"numberOfChildren",null);this.incomeFormGroup.addControl(`${e.id}-numberOfAdults`,new u.hs(i>0?i:null)),this.incomeFormGroup.addControl(`${e.id}-numberOfChildren`,new u.hs(a>0?a:null))}else"file"===e.generic?.type?(this.incomeFormGroup.addControl(e.id,new u.hs),this.incomeFormGroup.addControl(`${e.id}-textarea`,new u.hs(this.getValue(e.id,e.generic?.type,"comment"),[(0,Y.f)()]))):this.incomeFormGroup.addControl(e.id,new u.hs(this.getValue(e.id,e.generic?.type),this.getValidators(e.generic?.type)))}getValue(e,i,a="content"){let s=null;return s=a?this.data?.marketIncome?.values[e]?.generic?.[i][a]:this.data?.marketIncome?.values[e]?.generic?.[i],s&&"date"===i&&(s=this.formatDate(s)),s??null}getAnyFilesValue(e,i){const a=this.data?.marketIncome?.values[e]?.generic?.[i]?.items;if(a){let s=[];for(const l of a){const c={src:null,file:new File([""],l.fileName),disableNote:!0,uploaded:l.uploaded};s.push(c)}return s}}getValidators(e){return"marketIncomeMonthly"===e?[u.k0.pattern("^[0-9]*$")
1]:"text"===e?[(0,Y.f)()]:null}formatDate(e){return f()(e).format("YYYY-MM-DD")}save(){if(this.saveFormOrDeleteFileIsClicked=!0,this.incomeFormGroup.valid){for(const[e,i]of Object.entries(this.incomeFormGroup.value)){const a=e.split("-").shift(),s=this.data.fields.fields.find(l=>l.id===a)?.generic?.type;if("file"===s){a!=e&&this.patchFields.push({id:a,type:s,comment:this.incomeFormGroup.controls[e]?.value??""});const l=this.filePatches.filter(c=>c.fieldId===e);for(const c of l)c?.fileId&&this.patchFields.push({id:e,value:c.fileId,type:s,fileName:c.anyFile?.file?.name?.normalize()})}else this.patchFields.push({id:e,value:i,type:s})}this.dialogRef.close({data:{fields:this.patchFields}})}}disableEnableControls(e,i,a){e.checked?(i.disable(),a.enable(),a.value=i.value):(a.disable(),i.enable(),i.value=a.value)}uploadFile(e,i,a){this.disableSaveButton=!0,i.showProgressBar=!0,this.postSystemFilesItem=this.marketService.postSystemFilesItem(a.file).pipe((0,z.W)(s=>{throw this.disableSaveButton=!1,i.showProgressBar=!1,i.progressBarPercentDone=0,i.anyFiles=[],this.incomeFormGroup.controls[e].reset(),s})).subscribe(s=>{if(s.type===Gt.hv.Response&&(i.progressBarPercentDone=100,setTimeout(()=>{i.showProgressBar=!1,i.progressBarPercentDone=0},500),this.disableSaveButton=!1,this.filePatches.push({fieldId:e,fileId:s?.body,anyFile:a})),s.type===Gt.hv.UploadProgress){const l=Math.round(100*s.loaded/s.total);i.progressBarPercentDone=l<99?l:99}})}deleteFile(e,i){const a=this.data?.marketIncome?.values[e]?.generic?.file?.items?.find(l=>l.fileName===i.file.name);a&&this.patchFields.push({id:e,value:"remove",type:"file",fileId:a.id});const s=this.filePatches.indexOf(this.filePatches.find(l=>l.fieldId===e&&l.anyFile===i));s>-1&&this.filePatches.splice(s,1),0===this.filePatches?.length&&(this.incomeFormGroup.controls[e].reset(),this.incomeFormGroup.controls[e].markAsTouched()),this.saveFormOrDeleteFileIsClicked=!0,this.postSystemFilesItem?.unsubscribe()}close(){this.postSystemFilesItem?.unsubscribe(),this.dialogRef.close()}cantDeletePatches(e){return this.data?.marketIncome?.values[e]?.generic?.file?.items?.length===this.patchFields.filter(i=>i.id===e&&"file"===i.type&&"remove"===i.value)?.length}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(k.Vh),t.rXU(k.CP),t.rXU(u.ze),t.rXU(pt.MJ),t.rXU(S))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-manage-market-income"]],viewQuery:function(i,a){if(1&i&&t.GBs(wt.P,5),2&i){let s;t.mGM(s=t.lsd())&&(a.fileUpload=s)}},standalone:!1,decls:3,vars:2,consts:[["datePicker",""],["fileUpload",""],["mat-dialog-title",""],[3,"formGroup"],["align","end"],["matButton","tonal",1,"close-button",3,"click"],["matButton","filled","data-mom-test","MyPages_ApplicantProfile_Save",3,"click","disabled"],["data-mom-test","MyPages_ApplicantProfile_Edit_TextGroup"],["data-mom-test","MyPages_ApplicantProfile_Edit_IncomeGroup"],["data-mom-test","MyPages_ApplicantProfile_Edit_DateGroup"],["data-mom-test","MyPages_ApplicantProfile_Edit_ContactInfoGroup"],["data-mom-test","MyPages_ApplicantProfile_Edit_AddressFieldGroup"],["data-mom-test","MyPages_ApplicantProfile_Edit_FileGroup",2,"margin-bottom","15px"],[1,"form-field"],["data-mom-test","MyPages_ApplicantProfile_Edit_TextLabel"],["matInput","","data-mom-test","MyPages_ApplicantProfile_Edit_TextField","autocomplete","off",3,"formControlName","maxlength","required"],[1,"hint"],[4,"ngIf"],["data-mom-test","MyPages_ApplicantProfile_Edit_IncomeLabel"],["matInput","","data-mom-test","MyPages_ApplicantProfile_Edit_IncomeField","autocomplete","off",3,"formControlName","maxlength","required"],[1,"form-field","pointer",3,"click"],["data-mom-test","MyPages_ApplicantProfile_Edit_DateLabel"],["matInput","","readonly","true","data-mom-test","MyPages_ApplicantProfile_Edit_DateField","autocomplete","off",1,"pointer",3,"matDatepicker","formControlName","required"],["matSuffix","",3,"for"],[2,"font-size","0.75rem"],[2,"margin-top","10px"],["data-mom-test","MyPages_ApplicantProfile_Edit_ContactInfoLabel"],["matInput","","autocomplete","off",3,"formControlName","required"],["matInput","","type","email","autocomplete","off",3,"formControlName","required"],[2,"margin-left","15px","margin-top","10px"],["matInput","","type","number","max","20","min","0","data-mom-test","MyPages_ApplicantProfile_Household_Add_NumberOfAdults","autocomplete","off",3,"formControlName","required"],["matInput","","type","number","max","20","min","0","data-mom-test","MyPages_ApplicantProfile_Household_Add_NumberOfChildren","autocomplete","off",3,"formControlName","required"],["data-mom-test","MyPages_ApplicantProfile_Edit_FileLabel",3,"warn"],[2,"margin-top","8px"],["accept",".pdf, .jpeg, .jpg, .png, .bmp, .gif","data-mom-test","MyPages_ApplicantProfile_Edit_FileField",3,"fileLoaded","fileDeleted","inputAnyFiles","controlName","text","required"],[1,"hint","hint-file-upload"],[1,"error-file-upload"],["data-mom-test","MyPages_ApplicantProfile_Edit_FileLabel"]],template:function(i,a){1&i&&(t.j41(0,"h1",2),t.EFF(1),t.k0s(),t.nVh(2,Ps,11,8,"form",3)),2&i&&(t.R7$(),t.JRh(a.data.fields.displayName),t.R7$(),t.vxM(a.incomeFormGroup?2:-1))},dependencies:[$.bT,ot.q,I.$z,at.fg,j.rl,j.nJ,j.MV,j.TL,j.yw,B.Vh,B.bZ,B.bU,k.BI,k.E7,k.Yi,u.qT,u.me,u.Q0,u.BC,u.cb,u.YS,u.tU,u.VZ,u.zX,u.j4,u.JD,wt.P,b.D9],styles:[".form-field[_ngcontent-%COMP%]{width:100%;margin-bottom:25px}.pointer[_ngcontent-%COMP%]{cursor:pointer}.checkbox-label[_ngcontent-%COMP%]{white-space:initial}.checkbox-container[_ngcontent-%COMP%]{margin-top:-15px}.hint-file-upload[_ngcontent-%COMP%], .error-file-upload[_ngcontent-%COMP%]{font-size:.75rem}.close-button[_ngcontent-%COMP%]{margin-left:5px}.save-button-container[_ngcontent-%COMP%]{margin-top:20px}.error-file-upload[_ngcontent-%COMP%]{color:var(--palette-warn-500)}"]})}}return n})();const Vs=n=>({date:n});function Ns(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",7),t.bIt("click",function(){const a=r.eBV(e).$implicit,s=t.XpG(3);
1return r.Njj(s.createSource(s.fields.id,a.id))}),t.EFF(1),t.k0s()}if(2&n){const e=o.$implicit,i=t.XpG(3);t.AVh("full-width",i.mediaQueryService.isMobile()),t.R7$(),t.SpI(" ",e.displayName," ")}}function Ds(n,o){if(1&n&&(t.j41(0,"div",14)(1,"div",15),t.EFF(2),t.k0s(),t.j41(3,"div",16),t.EFF(4),t.k0s()()),2&n){const e=t.XpG().$implicit,i=t.XpG().$implicit,a=t.XpG(3);t.R7$(2),t.SpI(" ",null==e.generic||null==e.generic.text?null:e.generic.text.label," "),t.R7$(2),t.SpI(" ",a.getValue(i,e.id,null==e||null==e.generic?null:e.generic.type)," ")}}function Gs(n,o){if(1&n&&(t.j41(0,"div",14)(1,"div",17),t.EFF(2),t.k0s(),t.j41(3,"div",18),t.EFF(4),t.k0s()()),2&n){const e=t.XpG().$implicit,i=t.XpG().$implicit,a=t.XpG(3);t.R7$(2),t.SpI(" ",null==e.generic||null==e.generic.marketIncomeMonthly?null:e.generic.marketIncomeMonthly.label," "),t.R7$(2),t.SpI(" ",a.getValue(i,e.id,null==e||null==e.generic?null:e.generic.type)," ")}}function ws(n,o){if(1&n&&(t.j41(0,"div",14)(1,"div",19),t.EFF(2),t.k0s(),t.j41(3,"div",20),t.EFF(4),t.k0s()()),2&n){const e=t.XpG().$implicit,i=t.XpG().$implicit,a=t.XpG(3);t.R7$(2),t.SpI(" ",null==e.generic||null==e.generic.date?null:e.generic.date.label," "),t.R7$(2),t.SpI(" ",a.getDateValue(i,e.id,null==e||null==e.generic?null:e.generic.type)," ")}}function Xs(n,o){if(1&n&&(t.j41(0,"div",14)(1,"div",21),t.EFF(2),t.k0s(),t.nrm(3,"div",22),t.k0s()),2&n){const e=t.XpG().$implicit,i=t.XpG().$implicit,a=t.XpG(3);t.R7$(2),t.SpI(" ",null==e.generic||null==e.generic.contactDetails?null:e.generic.contactDetails.heading," "),t.R7$(),t.Y8G("innerText",a.getContactDetailsValues(i,e.id,null==e||null==e.generic?null:e.generic.type))}}function Bs(n,o){if(1&n&&(t.j41(0,"div",24)(1,"div",25),t.EFF(2),t.k0s(),t.j41(3,"div",26),t.EFF(4),t.k0s()()),2&n){const e=o.$implicit,i=t.XpG(6);t.R7$(2),t.JRh(e.fileName),t.R7$(2),t.SpI(" ",i.formatDate(e.uploaded)," ")}}function Us(n,o){if(1&n&&(t.j41(0,"div",14)(1,"div",23),t.EFF(2),t.k0s(),t.Z7z(3,Bs,5,2,"div",24,t.fX1),t.k0s()),2&n){const e=t.XpG().$implicit,i=t.XpG().$implicit,a=t.XpG(3);t.R7$(2),t.SpI(" ",null==e.generic||null==e.generic.file?null:e.generic.file.label," "),t.R7$(),t.Dyx(a.getFileItems(i,e.id,null==e||null==e.generic?null:e.generic.type))}}function Ls(n,o){if(1&n&&t.nVh(0,Ds,5,2,"div",14)(1,Gs,5,2,"div",14)(2,ws,5,2,"div",14)(3,Xs,4,2,"div",14)(4,Us,5,1,"div",14),2&n){let e;const i=o.$implicit;t.vxM("text"===(e=null==i.generic?null:i.generic.type)?0:"marketIncomeMonthly"===e?1:"date"===e?2:"contactDetails"===e?3:"file"===e?4:-1)}}function zs(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",6)(1,"div",8),t.nrm(2,"mat-divider"),t.k0s(),t.j41(3,"div",9)(4,"div",10),t.EFF(5),t.k0s()(),t.Z7z(6,Ls,5,1,null,null,t.fX1),t.j41(8,"mat-card-actions",11)(9,"button",12),t.nI1(10,"translate"),t.bIt("click",function(){const a=r.eBV(e).$implicit,s=t.XpG(3);return r.Njj(s.removeSource(s.fields.id,a.id))}),t.j41(11,"mat-icon"),t.EFF(12,"delete_forever"),t.k0s(),t.EFF(13),t.nI1(14,"translate"),t.k0s(),t.j41(15,"button",13),t.nI1(16,"translate"),t.bIt("click",function(){const a=r.eBV(e).$implicit,s=t.XpG(3);return r.Njj(s.openManageMarketIncome(a))}),t.j41(17,"mat-icon"),t.EFF(18,"edit"),t.k0s(),t.EFF(19),t.nI1(20,"translate"),t.k0s()()()}if(2&n){const e=o.$implicit,i=t.XpG(3);t.R7$(5),t.SpI(" ",i.getDisplayName(e.source)," "),t.R7$(),t.Dyx(i.getFields(e.source)),t.R7$(3),t.BMQ("aria-label",t.bMT(10,5,"DELETEINCOME")),t.R7$(4),t.SpI(" ",t.bMT(14,7,"DELETE")," "),t.R7$(2),t.BMQ("aria-label",t.bMT(16,9,"EDITINCOME")),t.R7$(4),t.SpI(" ",t.bMT(20,11,"EDIT")," ")}}function Ys(n,o){if(1&n&&(t.j41(0,"div")(1,"div",4),t.Z7z(2,Ns,2,3,"button",5,t.fX1),t.k0s(),t.Z7z(4,zs,21,13,"div",6,t.fX1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(2),t.Dyx(e.fields.generic.marketIncome.sources),t.R7$(2),t.Dyx(null==e.marketIncome?null:e.marketIncome.sources)}}function Qs(n,o){if(1&n&&(t.j41(0,"div",3),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.SpI(" ",t.i5U(2,1,"LASTUPDATED",t.eq3(4,Vs,e.formatDateAndTime(e.lastUpdated)))," ")}}function Hs(n,o){if(1&n&&(t.j41(0,"mat-card",0)(1,"mat-card-header")(2,"mat-card-title",1),t.EFF(3),t.k0s(),t.j41(4,"mat-card-subtitle"),t.nrm(5,"taiga-markdown",2),t.nI1(6,"translate"),t.k0s()(),t.j41(7,"mat-card-content"),t.nVh(8,Ys,6,0,"div"),t.k0s(),t.nVh(9,Qs,3,6,"div",3),t.k0s()),2&n){const e=t.XpG();t.Y8G("ngClass",e.cssClass),t.R7$(3),t.SpI(" ",e.fields.generic.marketIncome.heading," "),t.R7$(2),t.Y8G("markdown",t.bMT(6,5,"APPLICANTPROFILEINCOMEHELP")),t.R7$(3),t.vxM(e.fields.generic.marketIncome.sources?8:-1),t.R7$(),t.vxM(e.lastUpdated?9:-1)}}let Js=(()=>{class n{constructor(e,i,a,s){this.marketService=e,this.dialog=i,this.mediaQueryService=a,this.translate=s,this.update=new t.bkB,this.selectedChips=[],this.patchObject={generics:{}}}getFields(e){return this.fields.generic.marketIncome.sources.find(i=>i.id===e)?.fields}getDisplayName(e){return this.fields.generic.marketIncome.sources.find(i=>i.id===e)?.displayName}getValue(e,i,a){return e.values[i]?.generic?.[a]?.content??"-"}getDateValue(e,i,a){const s=e.values[i]?.generic?.[a]?.content;return s?this.formatDate(s):"-"}getContactDetailsValues(e,i,a){const s=e.values[i]?.generic?.[a],l=s.name??null,c=s.emailAddress??null,m=s.telep
1honeNumber??null;if(!l&&!c&&!m)return"-";{let h="";return l&&(h=`${l}\n`),c&&(h+=`${c}\n`),m&&(h+=`${m}`),h}}getFileItems(e,i,a){return e.values[i]?.generic?.[a]?.items}getFileNoteValue(e,i,a){return e.values[i]?.generic?.[a]?.comment?e.values[i]?.generic?.[a]?.comment:"-"}createSource(e,i){const a=N.Q.generateUniqueId();this.patchObject.generics={...this.patchObject.generics,...this.patchObject.generics={[e]:{marketIncome:{sources:{[a]:{source:i}}}}}},this.openManageMarketIncome({id:a,source:i,values:{}},!0)}removeSource(e,i){this.dialog.open(E.w,{data:{heading:null,text:this.translate.instant("CONFIRMDELETEINCOME"),dialogChoices:V.$.YesNo},scrollStrategy:new A.t0,ariaLabel:this.translate.instant("CONFIRMDELETEINCOME"),autoFocus:!1}).afterClosed().subscribe(s=>{"yes"===s&&(this.patchObject.generics={...this.patchObject.generics,...this.patchObject.generics={[e]:{marketIncome:{sources:{[i]:{remove:!0}}}}}},this.patch())})}setContent(e){for(const i of e){let a,s,l;if("contactDetails"===i.type){let c=i.fieldId.split("-");s=`${i.id}-${i.source}-${c[0]}`,l=i.value,a={[s]:{[i.type]:{[c[1]]:l}}}}else s=`${i.id}-${i.source}-${i.fieldId}`,l="date"===i.type?this.formatDate(i.value):i.value,a="file"===i.type?"remove"===i.value?{[s]:{[i.type]:{items:[{id:i.fileId,remove:!0}]}}}:typeof i.comment<"u"?{[s]:{[i.type]:{comment:i.comment}}}:{[s]:{[i.type]:{items:[{id:N.Q.generateUniqueId(),content:l,fileName:i.fileName}],comment:i.comment}}}:{[s]:{[i.type]:{content:l}}};this.patchObject.generics[s]?.hasOwnProperty("contactDetails")?this.patchObject.generics[s].contactDetails={...this.patchObject.generics[s].contactDetails,...this.patchObject.generics[s].contactDetails=a[s][i.type]}:this.patchObject.generics[s]?.hasOwnProperty("file")?this.patchObject.generics[s].file.items&&a[s][i.type]?.items?this.patchObject.generics[s].file.items=this.patchObject.generics[s].file.items.concat(a[s][i.type]?.items):this.patchObject.generics[s].file={...this.patchObject.generics[s].file,...this.patchObject.generics[s].file=a[s][i.type]}:this.patchObject.generics={...this.patchObject.generics,...this.patchObject.generics=a}}this.patch()}openManageMarketIncome(e,i=!1){i||(this.patchObject.generics={...this.patchObject.generics,"-":{marketApplicant:{values:{[this.fields.id]:{confirm:!0}}}}});const a=this.fields.generic.marketIncome.sources.find(l=>l.id===e.source);this.dialog.open(Rt,{data:{fields:a,marketIncome:e},width:"600px",autoFocus:!1,maxWidth:"95vw",maxHeight:"95vh",ariaLabel:this.translate.instant("MANAGEINCOME")}).afterClosed().subscribe(l=>{if(l?.data?.fields){const c=[];for(const m of l?.data?.fields)c.push({id:this.fields.id,source:e.id,fieldId:m.id,value:m.value,type:m.type,fileName:m.fileName,comment:m.comment,fileId:m.fileId});this.setContent(c)}else this.patchObject={generics:{}}})}formatDate(e){return f()(e).format("YYYY-MM-DD")}formatDateAndTime(e){return N.Q.formatDateAndTime(e)}patch(){this.marketService.patchMarketApplicantProfile(this.patchObject).subscribe(()=>{this.update.emit()}),this.patchObject={generics:{}}}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(S),t.rXU(k.bZ),t.rXU(T.M),t.rXU(b.c$))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-income-field"]],inputs:{fields:"fields",marketIncome:"marketIncome",lastUpdated:"lastUpdated",cssClass:"cssClass"},outputs:{update:"update"},standalone:!1,decls:1,vars:1,consts:[[3,"ngClass"],["data-mom-test","MyPages_ApplicantProfile_Income_Title"],[3,"markdown"],["data-mom-test","MyPages_ApplicantProfile_Income_LastUpdated",1,"last-updated"],[1,"add-buttons-container"],["matButton","tonal","data-mom-test","MyPages_ApplicantProfile_Income_IncomeSourceButton",3,"full-width"],["data-mom-test","MyPages_ApplicantProfile_Income_IncomeSource_View_IncomeGroup"],["matButton","tonal","data-mom-test","MyPages_ApplicantProfile_Income_IncomeSourceButton",3,"click"],[1,"divider"],[1,"header"],[1,"display-name-container"],["align","end"],["matButton","tonal","data-mom-test","MyPages_ApplicantProfile_Income_IncomeSource_RemoveButton",1,"mat-elevation-z2",2,"margin-right","8px",3,"click"],["matButton","tonal","data-mom-test","MyPages_ApplicantProfile_Income_IncomeSource_EditButton",1,"mat-elevation-z2",3,"click"],[1,"field-container"],["data-mom-test","MyPages_ApplicantProfile_View_TextLabel",1,"label"],["data-mom-test","MyPages_ApplicantProfile_View_TextField"],["data-mom-test","MyPages_ApplicantProfile_View_IncomeLabel",1,"label"],["data-mom-test","MyPages_ApplicantProfile_View_IncomeField"],["data-mom-test","MyPages_ApplicantProfile_View_DateLabel",1,"label"],["data-mom-test","MyPages_ApplicantProfile_View_DateField"],["data-mom-test","MyPages_ApplicantProfile_View_ContactInfoLabel",1,"label"],["data-mom-test","MyPages_ApplicantProfile_View_ContactInfoField",3,"innerText"],["data-mom-test","MyPages_ApplicantProfile_View_FileLabel",1,"label"],[1,"file-list-container"],["data-mom-test","MyPages_ApplicantProfile_View_FileNameField"],["data-mom-test","MyPages_ApplicantProfile_View_FileDateField"]],template:function(i,a){1&i&&t.nVh(0,Hs,10,7,"mat-card",0),2&i&&t.vxM(a.fields.generic.marketIncome?0:-1)},dependencies:[$.YU,ot.q,G.An,I.$z,M.RN,M.YY,M.m2,M.MM,M.Lc,M.dh,w.N,b.D9],styles:[".add-buttons-container[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin-right:10px;margin-top:10px}.header[_ngcontent-%COMP%]{margin-top:20px;margin-bottom:16px;font-size:1.125rem;font-weight:500;display:flex;align-items:center;justify-content:space-between}.display-name-container[_ngcontent-%COMP%]{display:flex;align-items:center}.field-container[_ngcontent-%COMP%]{margin-bottom:16px}.label[_ngcontent-%COMP%]{font-weight:500}.full-width[_ngcontent-%COMP%]{width:100%}.divider[_ngcontent-%COMP%]{margin-top:18px}.padding-left-right-0[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.file-list-container[_ngcontent-%COMP%]{margin-bottom:8px}.last-updated[_ngcontent-%COMP%]{padding:0 16px 16px;margin-top:8px}"]})}}return n})();var Xt=d(6471);const qs=n=>({date:n});function Ws(n,o){if(1&n){const e=t.RV6();t.j41(0,"mat-chip-option",6),t.bIt("click",function(){const a=r.eBV(e).$implicit,s=t.XpG(3);
1return r.Njj(a.id!==s.marketAccommodation.type&&s.createType(s.fields.id,a.id))}),t.EFF(1),t.k0s()}if(2&n){const e=o.$implicit,i=t.XpG(3);t.AVh("full-width",i.mediaQueryService.isMobile()),t.Y8G("selected",e.id===i.marketAccommodation.type),t.R7$(),t.SpI(" ",e.displayName," ")}}function Zs(n,o){if(1&n&&(t.j41(0,"div",15)(1,"div",16),t.EFF(2),t.k0s(),t.j41(3,"div",17),t.EFF(4),t.k0s()()),2&n){const e=t.XpG().$implicit,i=t.XpG(4);t.R7$(2),t.JRh(null==e.generic||null==e.generic.text?null:e.generic.text.label),t.R7$(2),t.SpI(" ",i.getValue(i.marketAccommodation,e.id,null==e||null==e.generic?null:e.generic.type)," ")}}function Ks(n,o){if(1&n&&(t.j41(0,"div",15)(1,"div",16),t.EFF(2),t.k0s(),t.j41(3,"div"),t.EFF(4),t.k0s()()),2&n){const e=t.XpG().$implicit,i=t.XpG(4);t.R7$(2),t.JRh(null==e.generic||null==e.generic.date?null:e.generic.date.label),t.R7$(2),t.JRh(i.getDateValue(i.marketAccommodation,e.id,null==e||null==e.generic?null:e.generic.type))}}function to(n,o){if(1&n&&(t.j41(0,"div",15)(1,"div",16),t.EFF(2),t.k0s(),t.nrm(3,"div",18),t.k0s()),2&n){const e=t.XpG().$implicit,i=t.XpG(4);t.R7$(2),t.JRh(null==e.generic||null==e.generic.contactDetails?null:e.generic.contactDetails.heading),t.R7$(),t.Y8G("innerText",i.getContactDetailsValues(i.marketAccommodation,e.id,null==e||null==e.generic?null:e.generic.type))}}function eo(n,o){if(1&n&&(t.j41(0,"div",15)(1,"div",16),t.EFF(2),t.k0s(),t.nrm(3,"div",18),t.k0s()),2&n){const e=t.XpG().$implicit,i=t.XpG(4);t.R7$(2),t.JRh(null==e.generic||null==e.generic.address?null:e.generic.address.label),t.R7$(),t.Y8G("innerText",i.getContactAddressValues(i.marketAccommodation,e.id,null==e||null==e.generic?null:e.generic.type))}}function io(n,o){if(1&n&&(t.j41(0,"div",20)(1,"div",21),t.EFF(2),t.k0s(),t.j41(3,"div",22),t.EFF(4),t.k0s()()),2&n){const e=o.$implicit,i=t.XpG(6);t.R7$(2),t.JRh(e.fileName),t.R7$(2),t.SpI(" ",i.formatDate(e.uploaded)," ")}}function no(n,o){if(1&n&&(t.j41(0,"div",15)(1,"div",19),t.EFF(2),t.k0s(),t.Z7z(3,io,5,2,"div",20,t.fX1),t.k0s()),2&n){const e=t.XpG().$implicit,i=t.XpG(4);t.R7$(2),t.SpI(" ",null==e.generic||null==e.generic.file?null:e.generic.file.label," "),t.R7$(),t.Dyx(i.getFileItems(i.marketAccommodation,e.id,null==e||null==e.generic?null:e.generic.type))}}function ao(n,o){if(1&n&&t.nVh(0,Zs,5,2,"div",15)(1,Ks,5,2,"div",15)(2,to,4,2,"div",15)(3,eo,4,2,"div",15)(4,no,5,1,"div",15),2&n){let e;const i=o.$implicit;t.vxM("text"===(e=null==i.generic?null:i.generic.type)?0:"date"===e?1:"contactDetails"===e?2:"address"===e?3:"file"===e?4:-1)}}function so(n,o){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"div",7),t.nrm(2,"mat-divider"),t.k0s(),t.j41(3,"div",8)(4,"div",9),t.EFF(5),t.k0s()(),t.Z7z(6,ao,5,1,null,null,t.fX1),t.j41(8,"mat-card-actions",10)(9,"button",11),t.nI1(10,"translate"),t.bIt("click",function(){r.eBV(e);const a=t.XpG(3);return r.Njj(a.removeAccommodation(a.fields.id))}),t.j41(11,"mat-icon",12),t.EFF(12,"delete_forever"),t.k0s(),t.EFF(13),t.nI1(14,"translate"),t.k0s(),t.j41(15,"button",13),t.nI1(16,"translate"),t.bIt("click",function(){r.eBV(e);const a=t.XpG(3);return r.Njj(a.openManageMarketIncome(a.marketAccommodation))}),t.j41(17,"mat-icon",14),t.EFF(18,"edit"),t.k0s(),t.EFF(19),t.nI1(20,"translate"),t.k0s()()()}if(2&n){const e=t.XpG(3);t.R7$(5),t.SpI(" ",e.getDisplayName(e.marketAccommodation.type)," "),t.R7$(),t.Dyx(e.getFields(e.marketAccommodation.type)),t.R7$(3),t.BMQ("aria-label",t.bMT(10,5,"DELETEACCOMMODATION")),t.R7$(4),t.SpI(" ",t.bMT(14,7,"DELETE")," "),t.R7$(2),t.BMQ("aria-label",t.bMT(16,9,"EDITACCOMMODATION")),t.R7$(4),t.SpI(" ",t.bMT(20,11,"EDIT")," ")}}function oo(n,o){if(1&n&&(t.j41(0,"div")(1,"div",3)(2,"mat-chip-listbox",4),t.nI1(3,"translate"),t.Z7z(4,Ws,2,4,"mat-chip-option",5,t.fX1),t.k0s()(),t.nVh(6,so,21,13,"div"),t.k0s()),2&n){const e=t.XpG(2);t.R7$(2),t.BMQ("aria-label",t.bMT(3,2,"SELECTACCOMMODATION")),t.R7$(2),t.Dyx(e.fields.generic.marketAccommodation.types),t.R7$(2),t.vxM(null!=e.marketAccommodation&&e.marketAccommodation.type&&"accommodationUnspecified"!==e.marketAccommodation.type?6:-1)}}function ro(n,o){if(1&n&&(t.j41(0,"div",2),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.SpI(" ",t.i5U(2,1,"LASTUPDATED",t.eq3(4,qs,e.formatDateAndTime(e.lastUpdated)))," ")}}function lo(n,o){if(1&n&&(t.j41(0,"mat-card",0)(1,"mat-card-header")(2,"mat-card-title"),t.EFF(3),t.k0s(),t.j41(4,"mat-card-subtitle"),t.nrm(5,"taiga-markdown",1),t.nI1(6,"translate"),t.k0s()(),t.j41(7,"mat-card-content"),t.nVh(8,oo,7,4,"div"),t.k0s(),t.nVh(9,ro,3,6,"div",2),t.k0s()),2&n){const e=t.XpG();t.Y8G("ngClass",e.cssClass),t.R7$(3),t.SpI(" ",e.fields.generic.marketAccommodation.heading," "),t.R7$(2),t.Y8G("markdown",t.bMT(6,5,"APPLICANTPROFILEACCOMMODATIONHELP")),t.R7$(3),t.vxM(e.fields.generic.marketAccommodation.types?8:-1),t.R7$(),t.vxM(e.lastUpdated?9:-1)}}let co=(()=>{class n{constructor(e,i,a,s){this.marketService=e,this.dialog=i,this.mediaQueryService=a,this.translate=s,this.update=new t.bkB,this.selectedChips=[],this.patchObject={generics:{}}}getFields(e){return this.fields.generic.marketAccommodation.types.find(i=>i.id===e)?.fields}getDisplayName(e){return this.fields.generic.marketAccommodation.types.find(i=>i.id===e)?.displayName}getValue(e,i,a){return e.values[i]?.generic?.[a]?.content??"-"}getDateValue(e,i,a){const s=e.values[i]?.generic?.[a]?.content;return s?this.formatDate(s):"-"}getContactDetailsValues(e,i,a){const s=e.values[i]?.generic?.[a],l=s.name??null,c=s.emailAddress??null,m=s.telep
1honeNumber??null;if(!l&&!c&&!m)return"-";{let h="";return l&&(h=`${l}\n`),c&&(h+=`${c}\n`),m&&(h+=`${m}`),h}}getContactAddressValues(e,i,a){const s=e.values[i]?.generic?.[a],l=s.address??null,c=s.postcode??null,m=s.city??null,h=s.country??null;if(!(l||c||m||h))return"-";{let _="";return l&&(_=`${l}\n`),c&&(_+=`${c}\n`),m&&(_+=`${m}\n`),h&&(_+=`${h}`),_}}getFileItems(e,i,a){return e.values[i]?.generic?.[a]?.items}createType(e,i){this.patchObject.generics={...this.patchObject.generics,...this.patchObject.generics={[e]:{marketAccommodation:{type:i}}}},this.openManageMarketIncome({id:e,type:i,values:{}},!0)}removeAccommodation(e){this.dialog.open(E.w,{data:{heading:null,text:this.translate.instant("CONFIRMDELETEACCOMMODATION"),dialogChoices:V.$.YesNo},scrollStrategy:new A.t0,ariaLabel:this.translate.instant("CONFIRMDELETEACCOMMODATION"),autoFocus:!1}).afterClosed().subscribe(a=>{"yes"===a&&(this.patchObject.generics={...this.patchObject.generics,...this.patchObject.generics={[e]:{marketAccommodation:{type:null}}}},this.patch())})}setContent(e){for(const i of e){let a,s,l;if("contactDetails"===i.type||"address"===i.type){let c=i.fieldId.split("-");s=`${i.id}-${c[0]}`,l=i.value,a={[s]:{[i.type]:{[c[1]]:l}}}}else s=`${i.id}-${i.fieldId}`,l="date"===i.type?this.formatDate(i.value):i.value,a="file"===i.type?"remove"===i.value?{[s]:{[i.type]:{items:[{id:i.fileId,remove:!0}]}}}:typeof i.comment<"u"?{[s]:{[i.type]:{comment:i.comment}}}:{[s]:{[i.type]:{items:[{id:N.Q.generateUniqueId(),content:l,fileName:i.fileName}],comment:i.comment}}}:{[s]:{[i.type]:{content:l}}};this.patchObject.generics[s]?.hasOwnProperty("contactDetails")?this.patchObject.generics[s].contactDetails={...this.patchObject.generics[s].contactDetails,...this.patchObject.generics[s].contactDetails=a[s][i.type]}:this.patchObject.generics[s]?.hasOwnProperty("address")?this.patchObject.generics[s].address={...this.patchObject.generics[s].address,...this.patchObject.generics[s].address=a[s][i.type]}:this.patchObject.generics[s]?.hasOwnProperty("file")?this.patchObject.generics[s].file.items&&a[s][i.type]?.items?this.patchObject.generics[s].file.items=this.patchObject.generics[s].file.items.concat(a[s][i.type]?.items):this.patchObject.generics[s].file={...this.patchObject.generics[s].file,...this.patchObject.generics[s].file=a[s][i.type]}:this.patchObject.generics={...this.patchObject.generics,...this.patchObject.generics=a}}this.patch()}openManageMarketIncome(e,i=!1){i||(this.patchObject.generics={...this.patchObject.generics,"-":{marketApplicant:{values:{[this.fields.id]:{confirm:!0}}}}});const a=this.fields.generic.marketAccommodation.types.find(l=>l.id===e.type);this.dialog.open(Rt,{data:{fields:a,marketIncome:e},width:"600px",autoFocus:!1,maxWidth:"95vw",maxHeight:"95vh",ariaLabel:this.translate.instant("MANAGEACCOMMODATION")}).afterClosed().subscribe(l=>{if(l?.data?.fields){const c=[];for(const m of l?.data?.fields)c.push({id:this.fields.id,fieldId:m.id,value:m.value,type:m.type,fileName:m.fileName,comment:m.comment,fileId:m.fileId});this.setContent(c)}else this.patchObject={generics:{}}})}formatDate(e){return f()(e).format("YYYY-MM-DD")}formatDateAndTime(e){return N.Q.formatDateAndTime(e)}patch(){this.marketService.patchMarketApplicantProfile(this.patchObject).subscribe(()=>{this.update.emit()}),this.patchObject={generics:{}}}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(S),t.rXU(k.bZ),t.rXU(T.M),t.rXU(b.c$))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-accommodation-field"]],inputs:{fields:"fields",marketAccommodation:"marketAccommodation",lastUpdated:"lastUpdated",cssClass:"cssClass"},outputs:{update:"update"},standalone:!1,decls:1,vars:1,consts:[[3,"ngClass"],[3,"markdown"],["data-mom-test","MyPages_ApplicantProfile_Housing_LastUpdated",1,"last-updated"],[1,"chip-list-container"],["data-mom-test","MyPages_ApplicantProfile_Housing_HousingTypes"],["color","primary",1,"chip",3,"full-width","selected"],["color","primary",1,"chip",3,"click","selected"],[1,"divider"],[1,"header"],[1,"display-name-container"],["align","end",2,"padding","0px"],["matButton","tonal","data-mom-test","MyPages_ApplicantProfile_Housing_Remove",1,"mat-elevation-z2",2,"margin-right","8px",3,"click"],["color","accent"],["matButton","tonal","data-mom-test","MyPages_ApplicantProfile_Housing_Edit",1,"mat-elevation-z2",3,"click"],["color","primary"],[1,"field-container"],[1,"label"],["data-mom-test","MyPages_ApplicantProfile_Housing_Value"],[3,"innerText"],["data-mom-test","MyPages_ApplicantProfile_View_FileLabel",1,"label"],[1,"file-list-container"],["data-mom-test","MyPages_ApplicantProfile_View_FileNameField"],["data-mom-test","MyPages_ApplicantProfile_View_FileDateField"]],template:function(i,a){1&i&&t.nVh(0,lo,10,7,"mat-card",0),2&i&&t.vxM(a.fields.generic.marketAccommodation?0:-1)},dependencies:[$.YU,ot.q,G.An,I.$z,M.RN,M.YY,M.m2,M.MM,M.Lc,M.dh,Xt.uI,Xt.gq,w.N,b.D9],styles:[".chip-list-container[_ngcontent-%COMP%]{margin-top:18px}.header[_ngcontent-%COMP%]{margin-top:20px;margin-bottom:16px;font-size:1.125rem;font-weight:500;display:flex;align-items:center;justify-content:space-between}.display-name-container[_ngcontent-%COMP%]{display:flex;align-items:center}.field-container[_ngcontent-%COMP%]{margin-bottom:16px}.label[_ngcontent-%COMP%]{font-weight:500}.full-width[_ngcontent-%COMP%]{width:100%}.chip[_ngcontent-%COMP%]{cursor:pointer}.divider[_ngcontent-%COMP%]{margin-top:18px}.padding-left-right-0[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.file-list-container[_ngcontent-%COMP%]{margin-bottom:8px}.last-updated[_ngcontent-%COMP%]{padding:0 16px 16px;margin-top:8px}"]})}}return n})();const mo=n=>({date:n});function po(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",3)(1,"button",6),t.bIt("click",function(){r.eBV(e);const a=t.XpG(2);
1return r.Njj(a.createHouseholdMember())}),t.EFF(2),t.nI1(3,"translate"),t.k0s()()}if(2&n){const e=t.XpG(2);t.R7$(),t.AVh("full-width",e.mediaQueryService.isMobile()),t.R7$(),t.SpI(" ",t.bMT(3,3,"ADD")," ")}}function uo(n,o){if(1&n&&(t.j41(0,"div")(1,"div",7),t.nrm(2,"mat-divider"),t.k0s(),t.j41(3,"div",8)(4,"div",9),t.EFF(5),t.nI1(6,"translate"),t.k0s()(),t.j41(7,"div",10)(8,"div",11),t.EFF(9),t.nI1(10,"translate"),t.k0s(),t.j41(11,"div",12),t.EFF(12),t.k0s()(),t.j41(13,"div",10)(14,"div",11),t.EFF(15),t.nI1(16,"translate"),t.k0s(),t.j41(17,"div",13),t.EFF(18),t.k0s()()()),2&n){const e=t.XpG(2);t.R7$(5),t.SpI(" ",t.bMT(6,5,"HOUSEHOLDMEMBERS")," "),t.R7$(4),t.JRh(t.bMT(10,7,"NUMBEROFADULTS")),t.R7$(3),t.SpI(" ",e.marketHousehold.numberOfAdults>0?e.marketHousehold.numberOfAdults:"-"," "),t.R7$(3),t.JRh(t.bMT(16,9,"NUMBEROFCHILDREN")),t.R7$(3),t.SpI(" ",e.marketHousehold.numberOfChildren>0?e.marketHousehold.numberOfChildren:"-"," ")}}function _o(n,o){if(1&n){const e=t.RV6();t.j41(0,"mat-card-actions",4)(1,"button",14),t.nI1(2,"translate"),t.bIt("click",function(){r.eBV(e);const a=t.XpG(2);return r.Njj(a.openManageMarketIncome(a.marketHousehold))}),t.j41(3,"mat-icon",15),t.EFF(4,"edit"),t.k0s(),t.EFF(5),t.nI1(6,"translate"),t.k0s()()}2&n&&(t.R7$(),t.BMQ("aria-label",t.bMT(2,2,"EDITHOUSEHOLDMEMBERS")),t.R7$(4),t.SpI(" ",t.bMT(6,4,"EDIT")," "))}function ho(n,o){if(1&n&&(t.j41(0,"div",5),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.SpI(" ",t.i5U(2,1,"LASTUPDATED",t.eq3(4,mo,e.formatDateAndTime(e.lastUpdated)))," ")}}function fo(n,o){if(1&n&&(t.j41(0,"mat-card",0)(1,"mat-card-header")(2,"mat-card-title",1),t.EFF(3),t.k0s(),t.j41(4,"mat-card-subtitle"),t.nrm(5,"taiga-markdown",2),t.nI1(6,"translate"),t.k0s()(),t.j41(7,"mat-card-content")(8,"div"),t.nVh(9,po,4,5,"div",3),t.nVh(10,uo,19,11,"div"),t.k0s()(),t.nVh(11,_o,7,6,"mat-card-actions",4),t.nVh(12,ho,3,6,"div",5),t.k0s()),2&n){const e=t.XpG();t.Y8G("ngClass",e.cssClass),t.R7$(3),t.SpI(" ",e.fields.generic.marketHousehold.heading," "),t.R7$(2),t.Y8G("markdown",t.bMT(6,7,"APPLICANTPROFILEHOUSEHOLDHELP")),t.R7$(4),t.vxM(e.marketHousehold?-1:9),t.R7$(),t.vxM(e.marketHousehold?10:-1),t.R7$(),t.vxM(e.marketHousehold?11:-1),t.R7$(),t.vxM(e.lastUpdated?12:-1)}}let go=(()=>{class n{constructor(e,i,a,s){this.marketService=e,this.dialog=i,this.mediaQueryService=a,this.translate=s,this.update=new t.bkB,this.selectedChips=[],this.patchObject={generics:{}}}getFields(e){return this.fields.generic.marketHousehold.sources.find(i=>i.id===e)?.fields}getDisplayName(e){return this.fields.generic.marketHousehold.sources.find(i=>i.id===e)?.displayName}getValue(e,i,a){return e.values[i]?.generic?.[a]?.content??"-"}getDateValue(e,i,a){const s=e.values[i]?.generic?.[a]?.content;return s?this.formatDate(s):"-"}getContactDetailsValues(e,i,a){const s=e.values[i]?.generic?.[a],l=s.name??null,c=s.emailAddress??null,m=s.telephoneNumber??null;if(!l&&!c&&!m)return"-";{let h="";return l&&(h=`${l}\n`),c&&(h+=`${c}\n`),m&&(h+=`${m}`),h}}createHouseholdMember(){const e=N.Q.generateUniqueId();this.openManageMarketIncome({id:e,source:null,values:{}},!0)}removeHouseholdMember(){this.dialog.open(E.w,{data:{heading:null,text:this.translate.instant("CONFIRMDELETEHOUSEHOLDMEMBERS"),dialogChoices:V.$.YesNo},scrollStrategy:new A.t0,ariaLabel:this.translate.instant("CONFIRMDELETEHOUSEHOLDMEMBERS"),autoFocus:!1}).afterClosed().subscribe(i=>{"yes"===i&&(this.patchObject.generics={...this.patchObject.generics,...this.patchObject.generics={household:{marketHousehold:{numberOfAdults:0,numberOfChildren:0}}}},this.patch())})}setContent(e){this.patchObject.generics={...this.patchObject.generics,...this.patchObject.generics={[this.fields.id]:{marketHousehold:{}}}};for(const a of e){let s,l,c=a.fieldId.split("-");l=a.value,s={[c[1]]:l??0},this.patchObject.generics[this.fields.id].marketHousehold={...this.patchObject.generics[this.fields.id].marketHousehold,...this.patchObject.generics[this.fields.id].marketHousehold=s}}this.patch()}openManageMarketIncome(e,i=!1){i||(this.patchObject.generics={...this.patchObject.generics,"-":{marketApplicant:{values:{[this.fields.id]:{confirm:!0}}}}});
1const a={displayName:this.translate.instant("HOUSEHOLDMEMBERS"),fields:[{id:this.fields.id,generic:this.fields.generic}]};this.dialog.open(Rt,{data:{fields:a,marketIncome:{values:{[this.fields.id]:{generic:e}}}},width:"600px",autoFocus:!1,maxWidth:"95vw",maxHeight:"95vh",ariaLabel:this.translate.instant("HOUSEHOLDMEMBERS")}).afterClosed().subscribe(l=>{if(l?.data?.fields){const c=[];for(const m of l?.data?.fields)c.push({id:this.fields.id,householdMemberId:e.id,fieldId:m.id,value:m.value,type:m.type});this.setContent(c)}else this.patchObject={generics:{}}})}formatDate(e){return f()(e).format("YYYY-MM-DD")}formatDateAndTime(e){return N.Q.formatDateAndTime(e)}patch(){this.marketService.patchMarketApplicantProfile(this.patchObject).subscribe(()=>{this.update.emit()}),this.patchObject={generics:{}}}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(S),t.rXU(k.bZ),t.rXU(T.M),t.rXU(b.c$))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-household-field"]],inputs:{fields:"fields",marketHousehold:"marketHousehold",lastUpdated:"lastUpdated",cssClass:"cssClass"},outputs:{update:"update"},standalone:!1,decls:1,vars:1,consts:[[3,"ngClass"],["data-mom-test","MyPages_ApplicantProfile_Household_Title"],[3,"markdown"],[1,"add-button-container"],["align","end"],["data-mom-test","MyPages_ApplicantProfile_Household_LastUpdated",1,"last-updated"],["mat-raised-button","","color","primary","data-mom-test","MyPages_ApplicantProfile_Household_Add",3,"click"],[1,"divider"],[1,"header"],[1,"display-name-container"],[1,"field-container"],[1,"label"],["data-mom-test","MyPages_ApplicantProfile_HouseholdMember_NumberOfAdults"],["data-mom-test","MyPages_ApplicantProfile_HouseholdMember_NumberOfChildren"],["matButton","tonal","data-mom-test","MyPages_ApplicantProfile_Household_Edit",1,"mat-elevation-z2",3,"click"],["color","primary"]],template:function(i,a){1&i&&t.nVh(0,fo,13,9,"mat-card",0),2&i&&t.vxM(a.fields.generic.marketHousehold?0:-1)},dependencies:[$.YU,ot.q,G.An,I.$z,M.RN,M.YY,M.m2,M.MM,M.Lc,M.dh,w.N,b.D9],styles:[".add-button-container[_ngcontent-%COMP%]{margin-top:18px}.header[_ngcontent-%COMP%]{margin-top:20px;margin-bottom:16px;font-size:1.125rem;font-weight:500;display:flex;align-items:center;justify-content:space-between}.display-name-container[_ngcontent-%COMP%]{display:flex;align-items:center}.field-container[_ngcontent-%COMP%]{margin-bottom:16px}.label[_ngcontent-%COMP%]{font-weight:500}.full-width[_ngcontent-%COMP%]{width:100%}.chip[_ngcontent-%COMP%]{cursor:pointer}.divider[_ngcontent-%COMP%]{margin-top:18px}.padding-left-right-0[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.last-updated[_ngcontent-%COMP%]{padding:0 16px 16px;margin-top:8px}"]})}}return n})();function bo(n,o){1&n&&t.nrm(0,"div")}function Mo(n,o){1&n&&t.nrm(0,"div")}function ko(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",0)(1,"taiga-market-income-field",1),t.bIt("update",function(){r.eBV(e);const a=t.XpG(2);return r.Njj(a.update.emit())}),t.k0s()()}if(2&n){const e=t.XpG(2);t.R7$(),t.Y8G("cssClass",e.cssClass)("fields",e.fields)("marketIncome",null==e.values||null==e.values.generic?null:e.values.generic.marketIncome)("lastUpdated",null==e.values||null==e.values.status?null:e.values.status.changed)}}function Co(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",0)(1,"taiga-market-accommodation-field",2),t.bIt("update",function(){r.eBV(e);const a=t.XpG(2);return r.Njj(a.update.emit())}),t.k0s()()}if(2&n){const e=t.XpG(2);t.R7$(),t.Y8G("cssClass",e.cssClass)("fields",e.fields)("marketAccommodation",null==e.values||null==e.values.generic?null:e.values.generic.marketAccommodation)("lastUpdated",null==e.values||null==e.values.status?null:e.values.status.changed)}}function vo(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",0)(1,"taiga-market-household-field",3),t.bIt("update",function(){r.eBV(e);const a=t.XpG(2);return r.Njj(a.update.emit())}),t.k0s()()}if(2&n){const e=t.XpG(2);t.R7$(),t.Y8G("cssClass",e.cssClass)("fields",e.fields)("marketHousehold",null==e.values||null==e.values.generic?null:e.values.generic.marketHousehold)("lastUpdated",null==e.values||null==e.values.status?null:e.values.status.changed)}}function xo(n,o){if(1&n&&t.nVh(0,bo,1,0,"div")(1,Mo,1,0,"div")(2,ko,2,4,"div",0)(3,Co,2,4,"div",0)(4,vo,2,4,"div",0),2&n){let e;const i=t.XpG();
1t.vxM("text"===(e=i.fields.generic.type)?0:"bool"===e?1:"marketIncome"===e?2:"marketAccommodation"===e?3:"marketHousehold"===e?4:-1)}}let Bt=(()=>{class n{constructor(){this.update=new t.bkB}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-generic-field"]],inputs:{fields:"fields",values:"values",cssClass:"cssClass"},outputs:{update:"update"},standalone:!1,decls:1,vars:1,consts:[[1,"field-container"],[3,"update","cssClass","fields","marketIncome","lastUpdated"],[3,"update","cssClass","fields","marketAccommodation","lastUpdated"],[3,"update","cssClass","fields","marketHousehold","lastUpdated"]],template:function(i,a){1&i&&t.nVh(0,xo,5,1),2&i&&t.vxM(a.fields?0:-1)},dependencies:[Js,co,go],styles:[".field-container[_ngcontent-%COMP%]{margin-bottom:15px}"]})}}return n})();function Ro(n,o){if(1&n){const e=t.RV6();t.j41(0,"taiga-market-generic-field",2),t.bIt("update",function(){r.eBV(e);const a=t.XpG(3);return r.Njj(a.getData())}),t.k0s()}if(2&n){const e=t.XpG().$implicit,i=t.XpG(2);t.Y8G("fields",e)("values",i.marketApplicantValue.values[e.id])}}function yo(n,o){if(1&n&&(t.j41(0,"div"),t.nVh(1,Ro,1,2,"taiga-market-generic-field",1),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.vxM(e.generic?1:-1)}}function jo(n,o){if(1&n&&(t.j41(0,"div"),t.Z7z(1,yo,2,1,"div",null,t.fX1),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Dyx(e.marketApplicantField.fields)}}let To=(()=>{class n{constructor(e,i,a,s,l,c){this.marketService=e,this.mediaQueryService=i,this.route=a,this.registrationService=s,this.dialog=l,this.router=c,this.registrationService.getMarketApplicantStatus().subscribe(m=>{const h=m?.queues?.filter(_=>_.active);if(h?.length>0){let _=[];for(let p of h)_.push(this.marketService.getMarketApplications(p.id).pipe((0,dt.T)(C=>{for(let R of C.items)R._queueType=p.id;return C})));(0,L.p)(_).subscribe(p=>{const C=p.map(R=>R.items.find(P=>P.active&&"form"===P.presentation.type)??null);if(h.length>1&&C?.filter(R=>null!=R)?.length>1)this.dialog.open(ns,{disableClose:!0,data:p});else{const R=C.find(P=>"form"===P?.presentation?.type);R&&this.router.navigateByUrl(`market/applications/${R._queueType}/${R.id}`)}})}})}ngOnInit(){this.route.data.subscribe(e=>{this.marketApplicantField=e?.data?.marketApplicantField,this.marketApplicantValue=e?.data?.marketApplicantValue})}getData(){this.marketService.getMarketApplicantProfileOptions().subscribe(e=>{this.marketApplicantField=e}),this.marketService.getMarketApplicantProfile().subscribe(e=>{this.marketApplicantValue=e})}unsorted(){return 0}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(S),t.rXU(T.M),t.rXU(F.nX),t.rXU(Ct.f),t.rXU(k.bZ),t.rXU(F.Ix))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-applicant-profile"]],standalone:!1,decls:6,vars:11,consts:[[3,"text","subText"],[3,"fields","values"],[3,"update","fields","values"]],template:function(i,a){1&i&&(t.j41(0,"div"),t.nrm(1,"taiga-medium-header",0),t.nI1(2,"translate"),t.nI1(3,"translate"),t.nrm(4,"taiga-page-cards"),t.nVh(5,jo,3,0,"div"),t.k0s()),2&i&&(t.AVh("is-mobile",a.mediaQueryService.isMobile())("is-desktop",!a.mediaQueryService.isMobile()),t.R7$(),t.Y8G("text",t.bMT(2,7,"APPLICANTPROFILE"))("subText",t.bMT(3,9,"APPLICANTPROFILEHELP")),t.R7$(4),t.vxM(a.marketApplicantField&&a.marketApplicantValue?5:-1))},dependencies:[K.o,H.K,Bt,b.D9],styles:[".is-desktop[_ngcontent-%COMP%], .is-mobile[_ngcontent-%COMP%]{padding:16px}"]})}}return n})();var et=d(1336),Io=d(9496);let Fo=(()=>{class n{constructor(e,i,a,s){this.marketService=e,this.userMessageService=i,this.errorService=a,this.router=s}resolve(){const e=this.marketService.getMarketApplicantProfileOptions(),i=this.marketService.getMarketApplicantProfile();return(0,L.p)({marketApplicantField:e,marketApplicantValue:i}).pipe((0,z.W)(a=>{const s=this.errorService.parseError(a);return this.userMessageService.errorWithHeader(s.message,"",s.displayErrorReportNumber?s.errorReportNumber:""),this.router.navigateByUrl("/"),(0,tt.of)(null)}))}static{this.\u0275fac=function(i){return new(i||n)(r.KVO(S),r.KVO(Q.z),r.KVO(ct.I),r.KVO(F.Ix))}}static{this.\u0275prov=r.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();const Oo=n=>({invalidChars:n}),So=n=>({item:n});function Ao(n,o){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Lme(": ",e.sizeRoomsMin," - ",e.sizeRoomsMax)}}function Eo(n,o){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"fieldset")(2,"legend"),t.EFF(3),t.nI1(4,"translate"),t.nVh(5,Ao,2,2,"span"),t.k0s(),t.j41(6,"div",13)(7,"label",14),t.EFF(8,"Min"),t.k0s(),t.j41(9,"label",15),t.EFF(10,"Max"),t.k0s()(),t.j41(11,"mat-slider",16)(12,"input",17),t.mxI("ngModelChange",function(a){r.eBV(e);const s=t.XpG();return t.DH7(s.sizeRoomsMin,a)||(s.sizeRoomsMin=a),r.Njj(a)}),t.k0s(),t.j41(13,"input",18),t.mxI("ngModelChange",function(a){r.eBV(e);const s=t.XpG();return t.DH7(s.sizeRoomsMax,a)||(s.sizeRoomsMax=a),r.Njj(a)}),t.k0s()()()()}if(2&n){const e=t.XpG();t.R7$(3),t.SpI(" ",t.bMT(4,6,"NUMBEROFROOMS")," "),t.R7$(2),t.vxM(e.sizeRoomsMax||e.sizeRoomsMin?5:-1),t.R7$(6),t.Y8G("min",null==e.data||null==e.data.type?null:e.data.type.minNumberOfRooms)("max",null==e.data||null==e.data.type?null:e.data.type.maxNumberOfRooms),t.R7$(),t.R50("ngModel",e.sizeRoomsMin),t.R7$(),t.R50("ngModel",e.sizeRoomsMax)}}function $o(n,o){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Lme(": ",e.sizeAreaMin," - ",e.sizeAreaMax," kvm")}}function Po(n,o){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"fieldset")(2,"legend"),t.EFF(3),t.nI1(4,"translate"),t.nVh(5,$o,2,2,"span"),t.k0s(),t.j41(6,"div",13)(7,"label",19),t.EFF(8,"Min"),t.k0s(),t.j41(9,"label",20),t.EFF(10,"Max"),t.k0s()(),t.j41(11,"mat-slider",21)(12,"input",22),t.mxI("ngModelChange",function(a){r.eBV(e);const s=t.XpG();return t.DH7(s.sizeAreaMin,a)||(s.sizeAreaMin=a),r.Njj(a)}),t.k0s(),t.j41(13,"input",23),t.mxI("ngModelChange",function(a){r.eBV(e);const s=t.XpG();return t.DH7(s.sizeAreaMax,a)||(s.sizeAreaMax=a),r.Njj(a)}),t.k0s()()()()}if(2&n){const e=t.XpG();t.R7$(3),t.SpI(" ",t.bMT(4,7,"SIZESQM")," "),t.R7$(2),t.vxM(e.sizeAreaMin||e.sizeAreaMax?5:-1),t.R7$(6),t.Y8G("step",10)("min",null==e.data||null==e.data.type?null:e.data.type.minSize)("max",null==e.data||null==e.data.type?null:e.data.type.maxSize),t.R7$(),t.R50("ngModel",e.sizeAreaMin),t.R7$(),t.R50("ngModel",e.sizeAreaMax)}}function Vo(n,o){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Lme(": ",e.priceMin," - ",e.priceMax,":-")}}function No(n,o){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"fieldset")(2,"legend"),t.EFF(3),t.nI1(4,"translate"),t.nVh(5,Vo,2,2,"span"),t.k0s(),t.j41(6,"div",13)(7,"label",24),t.EFF(8,"Min"),t.k0s(),t.j41(9,"label",25),t.EFF(10,"Max"),t.k0s()(),t.j41(11,"mat-slider",21)(12,"input",26),t.mxI("ngModelChange",function(a){r.eBV(e);const s=t.XpG();return t.DH7(s.priceMin,a)||(s.priceMin=a),r.Njj(a)}),t.k0s(),t.j41(13,"input",27),t.mxI("ngModelChange",function(a){r.eBV(e);const s=t.XpG();return t.DH7(s.priceMax,a)||(s.priceMax=a),r.Njj(a)}),t.k0s()()()()}if(2&n){const e=t.XpG();t.R7$(3),t.SpI(" ",t.bMT(4,7,"PRICE")," "),t.R7$(2),t.vxM(e.priceMin||e.priceMax?5:-1),t.R7$(6),t.Y8G("step",(null==e.data||null==e.data.type?null:e.data.type.maxPrice)>2e3?1e3:100)("min",null==e.data||null==e.data.type?null:e.data.type.minPrice)("max",null==e.data||null==e.data.type?null:e.data.type.maxPrice),t.R7$(),t.R50("ngModel",e.priceMin),t.R7$(),t.R50("ngModel",e.priceMax)}}function Do(n,o){if(1&n&&(t.j41(0,"mat-option",29),t.EFF(1),t.k0s()),2&n){const e=o.$implicit;t.Y8G("value",e.id),t.R7$(),t.SpI(" ",e.displayName," ")}}function Go(n,o){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"mat-form-field")(2,"mat-label"),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"mat-select",28),t.mxI("ngModelChange",function(a){r.eBV(e);const s=t.XpG();return t.DH7(s.areas,a)||(s.areas=a),r.Njj(a)}),t.Z7z(6,Do,2,2,"mat-option",29,t.fX1),t.k0s()()()}if(2&n){const e=t.XpG();t.R7$(3),t.JRh(t.bMT(4,2,"DISTRICT")),t.R7$(2),t.R50("ngModel",e.areas),t.R7$(),t.Dyx(null==e.data||null==e.data.areas?null:e.data.areas.items)}}function wo(n,o){if(1&n&&(t.j41(0,"mat-option",32),t.EFF(1),t.k0s()),2&n){const e=o.$implicit;t.Y8G("value",e.id),t.R7$(),t.SpI(" ",e.displayName," ")}}function Xo(n,o){if(1&n){const e=t.RV6();t.j41(0,"mat-form-field",30)(1,"mat-label"),t.EFF(2),t.k0s(),t.j41(3,"mat-select",31),t.mxI("ngModelChange",function(a){const s=r.eBV(e).$implicit,l=t.XpG(2);return t.DH7(l.data.attributesModels[s.type].values,a)||(l.data.attributesModels[s.type].values=a),r.Njj(a)}),t.Z7z(4,wo,2,2,"mat-option",32,t.fX1),t.k0s()()}if(2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(2),t.JRh(e.typeDisplayName),t.R7$(),t.R50("ngModel",i.data.attributesModels[e.type].values),t.Y8G("name",e.type),t.R7$(),t.Dyx(e.alternatives)}}function Bo(n,o){if(1&n&&(t.j41(0,"div"),t.Z7z(1,Xo,6,3,"mat-form-field",30,t.fX1),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Dyx(e.data.attributesAlternatives)}}function Uo(n,o){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"mat-form-field")(2,"mat-label"),t.EFF(3),t.k0s(),t.j41(4,"input",33,1),t.mxI("ngModelChange",function(a){const s=r.eBV(e).$implicit,l=t.XpG(2);return t.DH7(l.data.attributesModels[s.type].value,a)||(l.data.attributesModels[s.type].value=a),r.Njj(a)}),t.k0s(),t.j41(6,"mat-error"),t.EFF(7),t.nI1(8,"translate"),t.k0s()()()}if(2&n){const e=o.$implicit,i=t.sdS(5),a=t.XpG(2);t.R7$(3),t.JRh(e.typeDisplayName),t.R7$(),t.R50("ngModel",a.data.attributesModels[e.type].value),t.Y8G("name",e.type),t.R7$(3),t.JRh(t.i5U(8,4,"INVALIDCHARACTERS",t.eq3(7,Oo,null==i.errors||null==i.errors.allowedCharacters?null:i.errors.allowedCharacters.invalidChars)))}}function Lo(n,o){if(1&n&&(t.j41(0,"div",6),t.Z7z(1,Uo,9,9,"div",null,t.fX1),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Dyx(e.data.attributesTexts)}}function zo(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",34)(1,"mat-label"),t.EFF(2),t.k0s()(),t.j41(3,"div")(4,"mat-form-field")(5,"mat-label"),t.EFF(6,"Min"),t.k0s(),t.j41(7,"input",35),t.mxI("ngModelChange",function(a){const s=r.eBV(e).$implicit,l=t.XpG(2);return t.DH7(l.data.attributesModels[s.type].minValue,a)||(l.data.attributesModels[s.type].minValue=a),r.Njj(a)}),t.k0s(),t.j41(8,"mat-error"),t.EFF(9),t.nI1(10,"translate"),t.k0s()(),t.j41(11,"span",36),t.EFF(12,"-"),t.k0s(),t.j41(13,"mat-form-field")(14,"mat-label"),t.EFF(15,"Max"),t.k0s(),t.j41(16,"input",37),t.mxI("ngModelChange",function(a){const s=r.eBV(e).$implicit,l=t.XpG(2);return t.DH7(l.data.attributesModels[s.type].maxValue,a)||(l.data.attributesModels[s.type].maxValue=a),r.Njj(a)}),t.k0s(),t.j41(17,"mat-error"),t.EFF(18),t.nI1(19,"translate"),t.k0s()()()}if(2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(2),t.JRh(e.typeDisplayName),t.R7$(5),t.Y8G("max",i.data.attributesModels[e.type].maxValue),t.R50("ngModel",i.data.attributesModels[e.type].minValue),t.Y8G("name",e.type+"Min"),t.R7$(2),t.JRh(t.bMT(10,9,"CANNOTBEMORETHANMAX")),t.R7$(7),t.Y8G("min",i.data.attributesModels[e.type].minValue??1),t.R50("ngModel",i.data.attributesModels[e.type].maxValue),t.Y8G("name",e.type+"Max"),t.R7$(2),t.JRh(t.bMT(19,11,"CANNOTBELESSTHANMIN"))}}function Yo(n,o){if(1&n&&(t.j41(0,"div",7),t.Z7z(1,zo,20,13,null,null,t.fX1),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Dyx(e.data.attributesNumbers)}}function Qo(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",43),t.nI1(1,"translate"),t.bIt("click",function(){r.eBV(e);const a=t.XpG().$implicit,s=t.XpG(2);return s.data.attributesModels[a.type].minValue="",r.Njj(s.data.attributesModels[a.type].maxValue="")}
1),t.j41(2,"mat-icon"),t.EFF(3,"cancel"),t.k0s()()}if(2&n){const e=t.XpG().$implicit;t.BMQ("aria-label",t.i5U(1,1,"RESETITEM",t.eq3(4,So,e.typeDisplayName)))}}function Ho(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",34)(1,"mat-label"),t.EFF(2),t.k0s(),t.nVh(3,Qo,4,6,"button",38),t.k0s(),t.j41(4,"div")(5,"mat-form-field",39),t.bIt("click",function(){r.eBV(e);const a=t.sdS(12);return r.Njj(a.open())}),t.j41(6,"mat-label"),t.EFF(7),t.nI1(8,"translate"),t.k0s(),t.j41(9,"input",40),t.mxI("ngModelChange",function(a){const s=r.eBV(e).$implicit,l=t.XpG(2);return t.DH7(l.data.attributesModels[s.type].minValue,a)||(l.data.attributesModels[s.type].minValue=a),r.Njj(a)}),t.k0s(),t.nrm(10,"mat-datepicker-toggle",41)(11,"mat-datepicker",null,2),t.k0s(),t.j41(13,"span",36),t.EFF(14,"-"),t.k0s(),t.j41(15,"mat-form-field",39),t.bIt("click",function(){r.eBV(e);const a=t.sdS(22);return r.Njj(a.open())}),t.j41(16,"mat-label"),t.EFF(17),t.nI1(18,"translate"),t.k0s(),t.j41(19,"input",42),t.mxI("ngModelChange",function(a){const s=r.eBV(e).$implicit,l=t.XpG(2);return t.DH7(l.data.attributesModels[s.type].maxValue,a)||(l.data.attributesModels[s.type].maxValue=a),r.Njj(a)}),t.k0s(),t.nrm(20,"mat-datepicker-toggle",41)(21,"mat-datepicker",null,3),t.k0s()()}if(2&n){const e=o.$implicit,i=t.sdS(12),a=t.sdS(22),s=t.XpG(2);t.R7$(2),t.JRh(e.typeDisplayName),t.R7$(),t.vxM(s.data.attributesModels[e.type].minValue||s.data.attributesModels[e.type].maxValue?3:-1),t.R7$(4),t.JRh(t.bMT(8,14,"FROM")),t.R7$(2),t.Y8G("matDatepicker",i),t.R50("ngModel",s.data.attributesModels[e.type].minValue),t.Y8G("name",e.type+"Min")("max",s.data.attributesModels[e.type].maxValue),t.R7$(),t.Y8G("for",i),t.R7$(7),t.JRh(t.bMT(18,16,"TO")),t.R7$(2),t.Y8G("matDatepicker",a),t.R50("ngModel",s.data.attributesModels[e.type].maxValue),t.Y8G("name",e.type+"Max")("min",s.data.attributesModels[e.type].minValue??1),t.R7$(),t.Y8G("for",a)}}function Jo(n,o){if(1&n&&(t.j41(0,"div",8),t.Z7z(1,Ho,23,18,null,null,t.fX1),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Dyx(e.data.attributesDates)}}function qo(n,o){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"mat-checkbox",44),t.mxI("ngModelChange",function(a){const s=r.eBV(e).$implicit,l=t.XpG(2);return t.DH7(l.data.attributesModels[s.type].value,a)||(l.data.attributesModels[s.type].value=a),r.Njj(a)}),t.EFF(2),t.k0s()()}if(2&n){const e=o.$implicit,i=t.XpG(2);t.R7$(),t.R50("ngModel",i.data.attributesModels[e.type].value),t.Y8G("name",e.type),t.R7$(),t.SpI(" ",e.typeDisplayName," ")}}function Wo(n,o){if(1&n&&(t.j41(0,"div",9),t.Z7z(1,qo,3,3,"div",null,t.fX1),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Dyx(e.data.attributesBools)}}let Zo=(()=>{class n{constructor(e,i,a){this.data=e,this.dialogRef=i,this.adapter=a,this.areas=[],this.marketSubscriptionsPutAttributes=[],this.adapter.setLocale("sv"),this.setValues()}formatLabel(e){return e>=1e3?Math.round(e/1e3)+"k":e}setValues(){if(this.sizeRoomsMin=this.data.marketSubscriptionsListItem?.sizeRoomsMin,this.sizeRoomsMax=this.data.marketSubscriptionsListItem?.sizeRoomsMax,this.sizeAreaMin=this.data.marketSubscriptionsListItem?.sizeAreaMin,this.sizeAreaMax=this.data.marketSubscriptionsListItem?.sizeAreaMax,this.priceMin=this.data.marketSubscriptionsListItem?.priceMin,this.priceMax=this.data.marketSubscriptionsListItem?.priceMax,this.data?.marketSubscriptionsListItem?.areas.length>0)for(const e of this.data.marketSubscriptionsListItem.areas)this.areas.push(e.id);if(this.data.marketSubscriptionsListItem?.attributes?.length>0){console.log(this.data.marketSubscriptionsListItem.attributes);for(const e of this.data.marketSubscriptionsListItem.attributes){if(e.isAlternative){const i=[];for(const a of e.alternatives)i.push(a.type);this.data.attributesModels[e.type].values=i}if(e.isBool&&(this.data.attributesModels[e.type].value="True"===e.value),e.isDate){const i=e.value.split(";"),a=i[0]?new Date(i[0]):null,s=i[1]?new Date(i[1]):null;this.data.attributesModels[e.type].minValue=a,this.data.attributesModels[e.type].maxValue=s}if(e.IsText&&(this.data.attributesModels[e.type].value=e.value),e.isNumber&&e.value){const i=e.value.split(";"),s=i[1]?+i[1]:null;this.data.attributesModels[e.type].minValue=i[0]?+i[0]:null,this.data.attributesModels[e.type].maxValue=s}}}this.sizeRoomsMin=this.sizeRoomsMin?this.sizeRoomsMin:this.data?.type?.minNumberOfRooms?+this.data.type.minNumberOfRooms:0,this.sizeRoomsMax=this.sizeRoomsMax?this.sizeRoomsMax:+this.data?.type?.maxNumberOfRooms,this.sizeAreaMin=this.sizeAreaMin?this.sizeAreaMin:this.data?.type?.minSize?+this.data.type.minSize:0,this.sizeAreaMax=this.sizeAreaMax?this.sizeAreaMax:+this.data?.type?.maxSize,this.priceMin=this.priceMin?this.priceMin:this.data?.type?.minPrice?+this.data.type.minPrice:0,this.priceMax=this.priceMax?this.priceMax:+this.data?.type?.maxPrice}
1save(){Object.keys(this.data.attributesModels).forEach(m=>{switch(this.data.attributesModels[m].type){case"isAlternative":this.data.attributesModels[m].values?.length>0&&this.marketSubscriptionsPutAttributes.push({type:m,isNumber:!1,isText:!1,isDate:!1,isBool:!1,isAlternative:!0,value:this.data.attributesModels[m].values.join(";")});break;case"isBool":!0===this.data.attributesModels[m].value&&this.marketSubscriptionsPutAttributes.push({type:m,isNumber:!1,isText:!1,isDate:!1,isBool:!0,isAlternative:!1,value:this.data.attributesModels[m].value.toString().toLowerCase()});break;case"isDate":if("object"==typeof this.data.attributesModels[m].minValue||"object"==typeof this.data.attributesModels[m].maxValue){const h=this.data.attributesModels[m].minValue?f()(this.data.attributesModels[m].minValue).format("YYYY-MM-DD"):null,_=this.data.attributesModels[m].maxValue?f()(this.data.attributesModels[m].maxValue).format("YYYY-MM-DD"):null;this.marketSubscriptionsPutAttributes.push({type:m,isNumber:!1,isText:!1,isDate:!0,isBool:!1,isAlternative:!1,value:h+";"+_})}break;case"isNumber":"number"!=typeof this.data.attributesModels[m].minValue&&"number"!=typeof this.data.attributesModels[m].maxValue||this.marketSubscriptionsPutAttributes.push({type:m,isNumber:!0,isText:!1,isDate:!1,isBool:!1,isAlternative:!1,value:(this.data.attributesModels[m].minValue?this.data.attributesModels[m].minValue:null)+";"+(this.data.attributesModels[m].maxValue?this.data.attributesModels[m].maxValue:null)});break;case"isText":this.data.attributesModels[m].value&&""!==this.data.attributesModels[m].value&&this.marketSubscriptionsPutAttributes.push({type:m,isNumber:!1,isText:!0,isDate:!1,isBool:!1,isAlternative:!1,value:this.data.attributesModels[m].value})}});const e=this.sizeRoomsMin&&+this.sizeRoomsMin!=+this.data?.type?.minNumberOfRooms?+this.sizeRoomsMin:void 0,i=this.sizeRoomsMax&&+this.sizeRoomsMax!=+this.data?.type?.maxNumberOfRooms?+this.sizeRoomsMax:void 0,a=this.sizeAreaMin&&+this.sizeAreaMin!=+this.data?.type?.minSize?+this.sizeAreaMin:void 0,s=this.sizeAreaMax&&+this.sizeAreaMax!=+this.data?.type?.maxSize?+this.sizeAreaMax:void 0,l=this.priceMin&&+this.priceMin!=+this.data?.type?.minPrice?+this.priceMin:void 0,c=this.priceMax&&+this.priceMax!=+this.data?.type?.maxPrice?+this.priceMax:void 0;this.dialogRef.close({id:this.data.marketSubscriptionsListItem?.id,sizeRoomsMin:e,sizeRoomsMax:i,sizeAreaMin:a,sizeAreaMax:s,priceMin:l,priceMax:c,areas:this.areas??void 0,marketSubscriptionsPutAttributes:this.marketSubscriptionsPutAttributes?.length>0?this.marketSubscriptionsPutAttributes:null})}close(){this.dialogRef.close()}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(k.Vh),t.rXU(k.CP),t.rXU(pt.MJ))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-manage-market-subscription"]],standalone:!1,decls:23,vars:17,consts:[["form","ngForm"],["attrModel","ngModel"],["fomPicker",""],["tomPicker",""],["mat-dialog-title",""],[1,"selects"],[1,"inputs"],[1,"input-ranges"],[1,"dates"],[1,"checkboxes"],["align","end"],["matButton","tonal",1,"close-button",3,"click"],["matButton","filled","color","primary","data-mom-test","MyPages_MySearchApplication_Subscriptions_NewSubscription_Save",1,"close-button",3,"click","disabled"],[1,"group-labels-container"],["for","sizeRoomsMin"],["for","sizeRoomsMax"],["color","primary","ngDefaultControl","",3,"min","max"],["id","sizeRoomsMin","matSliderStartThumb","","name","sizeRoomsMin","autocomplete","off","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_SizeRoomsMin",3,"ngModelChange","ngModel"],["id","sizeRoomsMax","matSliderEndThumb","","name","sizeRoomsMax","autocomplete","off","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_SizeRoomsMax",3,"ngModelChange","ngModel"],["for","sizeAreaMin"],["for","sizeAreaMax"],["color","primary","ngDefaultControl","",3,"step","min","max"],["id","sizeAreaMin","matSliderStartThumb","","name","sizeAreaMin","autocomplete","off","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_SizeAreaMin",3,"ngModelChange","ngModel"],["id","sizeAreaMax","matSliderEndThumb","","name","sizeAreaMax","autocomplete","off","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_SizeAreaMax",3,"ngModelChange","ngModel"],["for","priceMin"],["for","priceMax"],["id","priceMin","matSliderStartThumb","","name","priceMin","autocomplete","off","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_PriceMin",3,"ngModelChange","ngModel"],["id","priceMax","matSliderEndThumb","","name","priceMax","autocomplete","off","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_PriceMax",3,"ngModelChange","ngModel"],["multiple","","name","areas","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_Area",3,"ngModelChange","ngModel"],["data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_AreaAlternative",3,"value"],["ngDefaultControl",""],["multiple","","ngDefaultControl","","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_PropertyAlternativeType",3,"ngModelChange","ngModel","name"],["data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_PropertyAlternativeTypeAlternative",3,"value"],["matInput","","taigaAllowedCharacters","","autocomplete","off","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_PropertyTextType",3,"ngModelChange","ngModel","name"],[2,"display","flex","justify-content","space-between","height","40px"],["matInput","","type","number","min","1","autocomplete","off","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_PropertyNumberMinType",3,"ngModelChange","max","ngModel","name"],[1,"hyphen"],["matInput","","type","number","autocomplete","off","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_PropertyNumberMaxType",3,"ngModelChange","min","ngModel","name"],["mat-icon-button","","color","primary"],[3,"click"],["matInput","","readonly","true","min","1","autocomplete","off","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_PropertyDateMinType",3,"ngModelChange","matDatepicker","ngModel","name","max"],["matIconSuffix","",3,"for"],["matInput","","readonly","true","autocomplete","off","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_PropertyDateMaxType",3,"ngModelChange","matDatepicker","ngModel","name","min"],["mat-icon-button","","color","primary",3,"click"],["color","primary","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_PropertyBoolType",1,"checkbox",3,"ngModelChange","ngModel","name"]],template:function(i,a){if(1&i){const s=t.RV6();t.j41(0,"h2",4),t.EFF(1),t.k0s(),t.j41(2,"form",null,0)(4,"mat-dialog-content")(5,"div"),t.nVh(6,Eo,14,8,"div"),t.nVh(7,Po,14,9,"div"),t.nVh(8,No,14,9,"div"),t.j41(9,"div",5),t.nVh(10,Go,8,4,"div"),t.nVh(11,Bo,3,0,"div"),t.k0s(),t.nVh(12,Lo,3,0,"div",6),t.k0s(),t.nVh(13,Yo,3,0,"div",7),t.nVh(14,Jo,3,0,"div",8),t.nVh(15,Wo,3,0,"div",9),t.k0s(),t.j41(16,"mat-dialog-actions",10)(17,"button",11),t.bIt("click",function(){return r.eBV(s),r.Njj(a.close())}),t.EFF(18),t.nI1(19,"translate"),t.k0s(),t.j41(20,"button",12),t.bIt("click",function(){return r.eBV(s),r.Njj(a.save())}),t.EFF(21),t.nI1(22,"translate"),t.k0s()()()}if(2&i){const s=t.sdS(3);t.R7$(),t.JRh(null==a.data||null==a.data.item?null:a.data.item.displayName),t.R7$(5),t.vxM(null!=a.data&&null!=a.data.settings&&a.data.settings.numberOfRoomsMin?6:-1),t.R7$(),t.vxM(null!=a.data&&null!=a.data.settings&&a.data.settings.areaMin?7:-1),t.R7$(),t.vxM(null!=a.data&&null!=a.data.settings&&a.data.settings.priceMax?8:-1),t.R7$(2),t.vxM(null!=a.data&&null!=a.data.settings&&a.data.settings.areas&&(null==a.data||null==a.data.areas||null==a.data.areas.items?null:a.data.areas.items.length)>0?10:-1),t.R7$(),t.vxM((null==a.data||null==a.data.attributesAlternatives?null:a.data.attributesAlternatives.length)>0?11:-1),t.R7$(),t.vxM((null==a.data||null==a.data.attributesTexts?null:a.data.attributesTexts.length)>0?12:-1),t.R7$(),t.vxM((null==a.data||null==a.data.attributesNumbers?null:a.data.attributesNumbers.length)>0?13:-1),t.R7$(),t.vxM((null==a.data||null==a.data.attributesDates?null:a.data.attributesDates.length)>0?14:-1),t.R7$(),t.vxM((null==a.data||null==a.data.attributesBools?null:a.data.attributesBools.length)>0?15:-1),t.R7$(3),t.JRh(t.bMT(19,13,"CANCEL")),t.R7$(2),t.Y8G("disabled",!(null!=s&&s.valid)),t.R7$(),t.SpI(" ",t.bMT(22,15,"SAVE")," ")}},dependencies:[G.An,I.$z,lt.iY,at.fg,j.rl,j.nJ,j.TL,j.yw,B.Vh,B.bZ,B.bU,ut.VO,_t.wT,ht.So,k.BI,k.E7,k.Yi,u.qT,u.me,u.Q0,u.BC,u.cb,u.VZ,u.zX,u.vS,u.cV,jt.S,St,bt,b.D9],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%}mat-slider[_ngcontent-%COMP%]{width:94%}.close-button[_ngcontent-%COMP%]{margin-left:8px}.dates[_ngcontent-%COMP%]   div[_ngcontent-%COMP%], .input-ranges[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.hyphen[_ngcontent-%COMP%]{margin-left:15px;margin-right:15px;margin-bottom:10px}.dates[_ngcontent-%COMP%]   mat-form-field[_ngcontent-%COMP%], .input-ranges[_ngcontent-%COMP%]   mat-form-field[_ngcontent-%COMP%]{margin-bottom:8px}fieldset[_ngcontent-%COMP%]{border:none;padding:0}legend[_ngcontent-%COMP%]{padding:0}.group-labels-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-top:8px}.checkboxes[_ngcontent-%COMP%]{margin-bottom:8px}"],changeDetection:0})}}return n})();function Ko(n,o){if(1&n){const e=t.RV6();t.j41(0,"button",4),t.bIt("click",function(){const a=r.eBV(e).$implicit,s=t.XpG();
1return r.Njj(s.openManageMarketSubscription(a.id))}),t.EFF(1),t.k0s()}if(2&n){const e=o.$implicit,i=t.XpG();t.AVh("full-width",i.mediaQueryService.isMobile()),t.R7$(),t.SpI(" ",null==e?null:e.displayName," ")}}function tr(n,o){1&n&&(t.j41(0,"div",14),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"NUMBEROFROOMS")," "))}function er(n,o){if(1&n&&(t.j41(0,"ng-contaienr",16),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2).$implicit;t.R7$(),t.SpI("min ",null==e?null:e.sizeRoomsMin," ")}}function ir(n,o){if(1&n&&(t.j41(0,"ng-contaienr",17),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2).$implicit;t.R7$(),t.SpI("max ",null==e?null:e.sizeRoomsMax)}}function nr(n,o){if(1&n&&(t.j41(0,"ng-contaienr",18),t.EFF(1),t.k0s()),2&n){const e=t.XpG(3).$implicit;t.R7$(),t.SpI("min ",null==e?null:e.sizeAreaMin," ")}}function ar(n,o){if(1&n&&(t.j41(0,"ng-contaienr",19),t.EFF(1),t.k0s()),2&n){const e=t.XpG(3).$implicit;t.R7$(),t.SpI("max ",null==e?null:e.sizeAreaMax)}}function sr(n,o){if(1&n&&(t.j41(0,"div",13)(1,"div",14),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",15),t.nVh(5,nr,2,1,"ng-contaienr",18),t.nVh(6,ar,2,1,"ng-contaienr",19),t.k0s()()),2&n){const e=t.XpG(2).$implicit;t.R7$(2),t.SpI(" ",t.bMT(3,3,"SIZESQM")," "),t.R7$(3),t.vxM(null!=e&&e.sizeAreaMin?5:-1),t.R7$(),t.vxM(null!=e&&e.sizeAreaMax?6:-1)}}function or(n,o){if(1&n&&(t.j41(0,"ng-contaienr",20),t.EFF(1),t.k0s()),2&n){const e=t.XpG(3).$implicit;t.R7$(),t.SpI("min ",null==e?null:e.priceMin," ")}}function rr(n,o){if(1&n&&(t.j41(0,"ng-contaienr",21),t.EFF(1),t.k0s()),2&n){const e=t.XpG(3).$implicit;t.R7$(),t.SpI("max ",null==e?null:e.priceMax)}}function lr(n,o){if(1&n&&(t.j41(0,"div",13)(1,"div",14),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",15),t.nVh(5,or,2,1,"ng-contaienr",20),t.nVh(6,rr,2,1,"ng-contaienr",21),t.k0s()()),2&n){const e=t.XpG(2).$implicit;t.R7$(2),t.SpI(" ",t.bMT(3,3,"PRICE")," "),t.R7$(3),t.vxM(null!=e&&e.priceMin?5:-1),t.R7$(),t.vxM(null!=e&&e.priceMax?6:-1)}}function cr(n,o){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.SpI(", ",e.parentDisplayName)}}function mr(n,o){if(1&n&&(t.j41(0,"div",22),t.EFF(1),t.nVh(2,cr,2,1,"span"),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.SpI(" ",e.displayName," "),t.R7$(),t.vxM(e.parentDisplayName?2:-1)}}function dr(n,o){if(1&n&&(t.j41(0,"div",13)(1,"div",14),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",15),t.Z7z(5,mr,3,2,"div",22,t.fX1),t.k0s()()),2&n){const e=t.XpG(2).$implicit;t.R7$(2),t.SpI(" ",t.bMT(3,1,"DISTRICT")," "),t.R7$(3),t.Dyx(e.areas)}}function pr(n,o){1&n&&(t.EFF(0),t.nI1(1,"translate")),2&n&&t.SpI(" ",t.bMT(1,1,"YES")," ")}function ur(n,o){1&n&&(t.EFF(0),t.nI1(1,"translate")),2&n&&t.SpI(" ",t.bMT(1,1,"NO")," ")}function _r(n,o){if(1&n&&(t.j41(0,"span",23),t.nVh(1,pr,2,3),t.nVh(2,ur,2,3),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.vxM("true"===(null==e.value?null:e.value.toLowerCase())?1:-1),t.R7$(),t.vxM("false"===(null==e.value?null:e.value.toLowerCase())?2:-1)}}function hr(n,o){if(1&n&&(t.j41(0,"div",24),t.EFF(1),t.k0s()),2&n){const e=o.$implicit;t.R7$(),t.SpI(" ",e.value," ")}}function fr(n,o){if(1&n&&(t.j41(0,"div",25),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit,i=t.XpG(3);t.R7$(),t.SpI(" ",i.formatAttributeDateString(e.value)," ")}}function gr(n,o){if(1&n&&(t.j41(0,"div",26),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit,i=t.XpG(3);t.R7$(),t.SpI(" ",i.formatAttributeNumberString(e.value)," ")}}function br(n,o){if(1&n&&(t.j41(0,"div",27),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.SpI(" ",e.value," ")}}function Mr(n,o){if(1&n&&(t.j41(0,"div",13)(1,"div",14),t.EFF(2),t.k0s(),t.j41(3,"div",15),t.nVh(4,_r,3,2,"span",23),t.Z7z(5,hr,2,1,"div",24,t.fX1),t.nVh(7,fr,2,1,"div",25),t.nVh(8,gr,2,1,"div",26),t.nVh(9,br,2,1,"div",27),t.k0s()()),2&n){const e=o.$implicit;t.R7$(2),t.SpI(" ",e.displayName," "),t.R7$(2),t.vxM(e.isBool?4:-1),t.R7$(),t.Dyx(e.alternatives),t.R7$(2),t.vxM(e.isDate?7:-1),t.R7$(),t.vxM(e.isNumber?8:-1),t.R7$(),t.vxM(e.IsText?9:-1)}}function kr(n,o){if(1&n&&(t.j41(0,"div",7)(1,"div",13),t.nVh(2,tr,3,3,"div",14),t.j41(3,"div",15),t.nVh(4,er,2,1,"ng-contaienr",16),t.nVh(5,ir,2,1,"ng-contaienr",17),t.k0s()(),t.nVh(6,sr,7,5,"div",13),t.nVh(7,lr,7,5,"div",13),t.nVh(8,dr,7,3,"div",13),t.Z7z(9,Mr,10,5,"div",13,t.fX1),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(2),t.vxM(null!=e&&e.sizeRoomsMin||null!=e&&e.sizeRoomsMax?2:-1),t.R7$(2),t.vxM(null!=e&&e.sizeRoomsMin?4:-1),t.R7$(),t.vxM(null!=e&&e.sizeRoomsMax?5:-1),t.R7$(),t.vxM(null!=e&&e.sizeAreaMin||null!=e&&e.sizeAreaMax?6:-1),t.R7$(),t.vxM(null!=e&&e.priceMax||null!=e&&e.priceMin?7:-1),t.R7$(),t.vxM((null==e||null==e.areas?null:e.areas.length)>0?8:-1),t.R7$(),t.Dyx(e.attributes)}}function Cr(n,o){1&n&&(t.j41(0,"div"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"MARKETSUBSCRIBEALL")," "))}function vr(n,o){if(1&n){const e=t.RV6();t.j41(0,"mat-card",1)(1,"mat-card-content"),t.qex(2),t.j41(3,"div",5)(4,"div",6),t.EFF(5),t.k0s()(),t.nVh(6,kr,11,6,"div",7),t.nVh(7,Cr,3,3,"div"),t.bVm(),t.k0s(),t.j41(8,"mat-card-actions",8)(9,"button",9),t.nI1(10,"translate"),t.bIt("click",function(){const a=r.eBV(e).$implicit,s=t.XpG();
1return r.Njj(s.deleteMarketSubscriptions(a.id))}),t.j41(11,"mat-icon",10),t.EFF(12,"delete_forever"),t.k0s(),t.EFF(13),t.nI1(14,"translate"),t.k0s(),t.j41(15,"button",11),t.nI1(16,"translate"),t.bIt("click",function(){const a=r.eBV(e).$implicit,s=t.XpG();return r.Njj(s.openManageMarketSubscription(a.marketObjectType,a))}),t.j41(17,"mat-icon",12),t.EFF(18,"edit"),t.k0s(),t.EFF(19),t.nI1(20,"translate"),t.k0s()()()}if(2&n){const e=o.$implicit,i=t.XpG();t.R7$(5),t.SpI(" ",i.getMarketSubscriptionDisplayName(e.marketObjectType)," "),t.R7$(),t.vxM(i.hasSubscriptionDetails(e)?6:-1),t.R7$(),t.vxM(i.hasSubscriptionDetails(e)?-1:7),t.R7$(2),t.BMQ("aria-label",t.bMT(10,7,"DELETEMARKETSUBSCRIPTION")),t.R7$(4),t.SpI(" ",t.bMT(14,9,"DELETE")," "),t.R7$(2),t.BMQ("aria-label",t.bMT(16,11,"EDITMARKETSUBSCRIPTION")),t.R7$(4),t.SpI(" ",t.bMT(20,13,"EDIT")," ")}}let xr=(()=>{class n{constructor(e,i,a,s,l){this.mediaQueryService=e,this.marketService=i,this.clientConfigurationService=a,this.dialog=s,this.translate=l,this.attributesModels={}}ngOnInit(){this.getMarketSubscriptions(),this.getMarketSubscriptionsMarketObjectsTypes()}getMarketSubscriptions(){this.marketService.getMarketSubscriptions().subscribe(e=>{this.marketSubscriptions=e})}deleteMarketSubscriptions(e){this.dialog.open(E.w,{data:{heading:null,text:this.translate.instant("CONFIRMDELETEMARKETSUBSCRIPTION"),dialogChoices:V.$.YesNo},scrollStrategy:new A.t0,ariaLabel:this.translate.instant("CONFIRMDELETEMARKETSUBSCRIPTION"),autoFocus:!1}).afterClosed().subscribe(a=>{"yes"===a&&this.marketService.deleteMarketSubscriptions(e).subscribe(()=>{this.getMarketSubscriptions()})})}openManageMarketSubscription(e,i){const a=this.marketSubscriptionsMarketObjectsTypes.items.find(s=>s.id===e);this.marketSubscriptionsMarketObjectsTypes.items.find(s=>s.id===a.id),this.attributesAlternatives=null,this.attributesBools=null,this.attributesDates=null,this.attributesNumbers=null,this.attributesTexts=null,this.attributesModels={},this.clientConfigurationService.getClientConfigurationFeatures().pipe((0,x.H)(s=>(0,L.p)([this.marketService.getMarketObjectsTypesItemSubscriptionsSetting(a.id),s?.areaUseGeographicRentalArea?.enabled?this.marketService.getMarketObjectsTypesAreas(a.id):this.marketService.getMarketObjectsAreas(),this.marketService.getMarketObjectsTypesItem(a.id)]))).subscribe(s=>{const l=s[0],c=s[1],m=s[2],h=s[2]?.attributes?.filter(p=>p.canHaveFilter);h?.length>0&&(this.attributesAlternatives=h.filter(p=>p.isAlternative&&p.alternatives.filter(C=>C.id)?.length>0),this.buildAttributeModels(this.attributesAlternatives,"isAlternative"),this.attributesBools=h.filter(p=>p.isBool),this.buildAttributeModels(this.attributesBools,"isBool"),this.attributesDates=h.filter(p=>p.isDate),this.buildAttributeModels(this.attributesDates,"isDate"),this.attributesNumbers=h.filter(p=>p.isNumber),this.buildAttributeModels(this.attributesNumbers,"isNumber"),this.attributesTexts=h.filter(p=>p.isText),this.buildAttributeModels(this.attributesTexts,"isText"),this.setAttributeModelsValues()),this.dialog.open(Zo,{data:{type:m,item:a,settings:l,areas:c,attributesAlternatives:this.attributesAlternatives,attributesBools:this.attributesBools,attributesDates:this.attributesDates,attributesNumbers:this.attributesNumbers,attributesTexts:this.attributesTexts,attributesModels:this.attributesModels,marketSubscriptionsListItem:i},width:"400px",autoFocus:!1,maxWidth:"95vw",ariaLabel:this.translate.instant("NEWMARKETSUBSCRIPTIONDIALOG"),maxHeight:"95vh",scrollStrategy:new A.t0}).afterClosed().subscribe(p=>{if(p){const C={id:p.id,marketObjectType:a.id,priceMin:p.priceMin,priceMax:p.priceMax,sizeRoomsMin:p.sizeRoomsMin,sizeRoomsMax:p.sizeRoomsMax,sizeAreaMin:p.sizeAreaMin,sizeAreaMax:p.sizeAreaMax,areas:p.areas?.toString(),attributes:p?.marketSubscriptionsPutAttributes};this.marketService.putMarketSubscriptions(C).subscribe(()=>{this.getMarketSubscriptions()})}})})}getMarketSubscriptionDisplayName(e){return this.marketSubscriptionsMarketObjectsTypes?.items?.find(i=>i.id===e)?.displayName??this.translate.instant("ALLMARKETTYPES")}getMarketSubscriptionsMarketObjectsTypes(){this.marketService.getMarketSubscriptionsMarketObjectsTypes().subscribe(e=>{this.marketSubscriptionsMarketObjectsTypes=e})}
1hasSubscriptionDetails(e){let i=Object.values(e);for(let a=0;a<i.length;a++){const s=Object.keys(e)[a];if("marketObjectType"!==s&&"id"!==s&&(i[a].constructor!==Array||i[a]?.length>0))return!0}return!1}buildAttributeModels(e,i){if(e)for(const a of e)this.attributesModels[a.type]={type:i}}setAttributeModelsValues(){if(this.attributesString){const e=JSON.parse(this.attributesString);Object.keys(e).forEach(i=>{switch(this.attributesModels[i]?.type){case"isAlternative":this.attributesModels[i].values=e[i].values.split(":");break;case"isBool":case"isText":this.attributesModels[i].value=e[i].values;break;case"isDate":this.attributesModels[i].minValue="null"!==e[i].values.split(":")[0]?new Date(e[i].values.split(":")[0]):null,this.attributesModels[i].maxValue="null"!==e[i].values.split(":")[1]?new Date(e[i].values.split(":")[1]):null;break;case"isNumber":const a=e[i].values.split(":")[0],s=e[i].values.split(":")[1];this.attributesModels[i].minValue=a?+a:null,this.attributesModels[i].maxValue=s?+s:null}})}}formatAttributeDateString(e){const i=e.split(";");return`${i[0]?`${this.translate.instant("FROM").toLowerCase()} ${i[0]?.split(" ")[0]}`:""} ${i[1]?`${this.translate.instant("TO").toLowerCase()} ${i[1]?.split(" ")[0]?.replace("9999-12-31","")}`:""}`}formatAttributeNumberString(e){const i=e.split(";");return`${i[0]?`min ${i[0]?.split(",")[0]}`:""} ${i[1]?`max ${i[1]?.split(",")[0]}`:""}`}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(T.M),t.rXU(S),t.rXU(W.t),t.rXU(k.bZ),t.rXU(b.c$))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-subscriptions"]],standalone:!1,decls:16,vars:13,consts:[["data-mom-test","MyPages_MyMarket_Subscriptions_Title",3,"text","subText"],[1,"card"],[1,"add-buttons-container"],["matButton","tonal","data-mom-test","MyPages_MySearchApplication_Subscriptions_NewSubscription_ListingType",3,"full-width"],["matButton","tonal","data-mom-test","MyPages_MySearchApplication_Subscriptions_NewSubscription_ListingType",3,"click"],[1,"item-header"],[1,"display-name"],[1,"list"],["align","end"],["matButton","tonal","data-mom-test","MyPages_MySearchApplication_Subscriptions_RemoveSubscription",1,"mat-elevation-z2",2,"margin-right","8px",3,"click"],["color","accent"],["matButton","tonal","data-mom-test","MyPages_MySearchApplication_Subscriptions_EditSubscription",1,"mat-elevation-z2",3,"click"],["color","primary"],[1,"list-item"],[1,"label"],[1,"value"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_SizeRoomsMin"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_SizeRoomsMax"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_SizeAreaMin"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_SizeAreaMax"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_PriceMin"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_PriceMax"],["data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_Area"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_PropertyBoolType"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_PropertyAlternativeType"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_PropertyDateType"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_PropertyNumberType"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_PropertyTextType"]],template:function(i,a){1&i&&(t.j41(0,"div"),t.nrm(1,"taiga-medium-header",0),t.nI1(2,"translate"),t.nI1(3,"translate"),t.nrm(4,"taiga-page-cards"),t.j41(5,"mat-card",1)(6,"mat-card-header")(7,"mat-card-title"),t.EFF(8),t.nI1(9,"translate"),t.k0s()(),t.j41(10,"mat-card-content")(11,"div",2),t.Z7z(12,Ko,2,3,"button",3,t.fX1),t.k0s()()(),t.Z7z(14,vr,21,15,"mat-card",1,t.fX1),t.k0s()),2&i&&(t.AVh("is-mobile",a.mediaQueryService.isMobile())("is-desktop",!a.mediaQueryService.isMobile()),t.R7$(),t.Y8G("text",t.bMT(2,7,"MARKETSUBSCRIPTIONS"))("subText",t.bMT(3,9,"MARKETSUBSCRIPTIONSHELP")),t.R7$(7),t.SpI(" ",t.bMT(9,11,"NEWMARKETSUBSCRIPTION")," "),t.R7$(4),t.Dyx(null==a.marketSubscriptionsMarketObjectsTypes?null:a.marketSubscriptionsMarketObjectsTypes.items),t.R7$(2),t.Dyx(null==a.marketSubscriptions?null:a.marketSubscriptions.items))},dependencies:[G.An,I.$z,M.RN,M.YY,M.m2,M.MM,M.dh,K.o,H.K,b.D9],styles:[".is-desktop[_ngcontent-%COMP%], .is-mobile[_ngcontent-%COMP%]{padding:16px}.divider[_ngcontent-%COMP%]{margin-top:18px;margin-bottom:18px}.item-header[_ngcontent-%COMP%]{margin-bottom:16px;font-size:1.125rem;font-weight:500;display:flex;align-items:center;justify-content:space-between}.list-item[_ngcontent-%COMP%]{margin-bottom:16px}.label[_ngcontent-%COMP%]{font-weight:500}.full-width[_ngcontent-%COMP%]{width:100%}.add-buttons-container[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin-right:10px;margin-top:10px}.card[_ngcontent-%COMP%]{margin-bottom:16px}
1.display-name[_ngcontent-%COMP%]{display:flex;align-items:center}"]})}}return n})(),Rr=(()=>{class n{resolve(){return(0,tt.of)(!0)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=r.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var yr=d(9783);function jr(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INPUTREQUIRED")," "))}function Tr(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INVALIDOFFICIALNUMBER")," "))}let Ir=(()=>{class n{get f(){return this.formGroup.controls}constructor(e,i){this.dialogRef=e,this.formBuilder=i}ngOnInit(){this.formGroup=this.formBuilder.group({officialNumber:["",[u.k0.required,yr.e.officialNumber("officialNumber")]]})}onSave(e){this.dialogRef.close(e)}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(k.CP),t.rXU(u.ze))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-co-applicants-create-dialog"]],standalone:!1,decls:23,vars:19,consts:[["applicantIdentifier",""],["mat-dialog-title",""],[3,"formGroup"],[3,"markdown"],[1,"form-field"],["matInput","","formControlName","officialNumber","autocomplete","off","data-mom-test","MyPages_MySearchApplication_CoApplicants_NewCoApplicantPersonalNumber"],["align","end"],["matButton","tonal",3,"click"],["matButton","filled","data-mom-test","MyPages_MySearchApplication_CoApplicants_NewCoApplicantSend",3,"click","disabled"]],template:function(i,a){if(1&i){const s=t.RV6();t.j41(0,"h2",1),t.EFF(1),t.nI1(2,"translate"),t.k0s(),t.j41(3,"form",2)(4,"mat-dialog-content"),t.nrm(5,"taiga-markdown",3),t.nI1(6,"translate"),t.j41(7,"div")(8,"mat-form-field",4)(9,"mat-label"),t.EFF(10),t.nI1(11,"translate"),t.k0s(),t.nrm(12,"input",5,0),t.nVh(14,jr,3,3,"mat-error"),t.nVh(15,Tr,3,3,"mat-error"),t.k0s()()(),t.j41(16,"mat-dialog-actions",6)(17,"button",7),t.bIt("click",function(){return r.eBV(s),r.Njj(a.dialogRef.close())}),t.EFF(18),t.nI1(19,"translate"),t.k0s(),t.j41(20,"button",8),t.bIt("click",function(){r.eBV(s);const c=t.sdS(13);return r.Njj(a.onSave(null==c?null:c.value))}),t.EFF(21),t.nI1(22,"translate"),t.k0s()()()}2&i&&(t.R7$(),t.JRh(t.bMT(2,9,"COAPPLICANTREQUEST")),t.R7$(2),t.Y8G("formGroup",a.formGroup),t.R7$(2),t.Y8G("markdown",t.bMT(6,11,"COAPPLICANTREQUESTHELP")),t.R7$(5),t.JRh(t.bMT(11,13,"OFFICIALNUMBER")),t.R7$(4),t.vxM(a.f.officialNumber.invalid&&a.f.officialNumber.errors.required?14:-1),t.R7$(),t.vxM(a.f.officialNumber.invalid&&!a.f.officialNumber.errors.required?15:-1),t.R7$(3),t.JRh(t.bMT(19,15,"CANCEL")),t.R7$(2),t.Y8G("disabled",!a.formGroup.valid),t.R7$(),t.SpI(" ",t.bMT(22,17,"SEND")," "))},dependencies:[I.$z,at.fg,j.rl,j.nJ,j.TL,k.BI,k.E7,k.Yi,u.qT,u.me,u.BC,u.cb,u.j4,u.JD,w.N,b.D9],styles:[".form-field[_ngcontent-%COMP%]{width:100%}"]})}}return n})();function Fr(n,o){if(1&n&&(t.j41(0,"div",2),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.Lme("",e.name," ",e.lastName)}}function Or(n,o){if(1&n&&(t.j41(0,"div"),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.SpI(" ",e.viaIdentifier," ")}}function Sr(n,o){1&n&&(t.j41(0,"div"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"COAPPLICANTREQUEST")," "))}function Ar(n,o){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"button",8),t.nI1(2,"translate"),t.bIt("click",function(){r.eBV(e);const a=t.XpG().$implicit,s=t.XpG();return r.Njj(s.delete(a.id))}),t.j41(3,"mat-icon"),t.EFF(4,"delete_forever"),t.k0s(),t.EFF(5),t.nI1(6,"translate"),t.k0s()()}2&n&&(t.R7$(),t.BMQ("aria-label",t.bMT(2,2,"DELETECOAPPLICANT")),t.R7$(4),t.SpI(" ",t.bMT(6,4,"DELETE")," "))}function Er(n,o){1&n&&(t.j41(0,"div",5),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"STATUS")," "))}function $r(n,o){1&n&&(t.j41(0,"div",5),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"OFFICIALNUMBER")," "))}function Pr(n,o){if(1&n&&(t.j41(0,"div",4)(1,"div",5),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",6),t.EFF(5),t.k0s()()),2&n){const e=t.XpG().$implicit,i=t.XpG();t.R7$(2),t.SpI(" ",t.bMT(3,2,"DATEOFBIRTH")," "),t.R7$(3),t.SpI(" ",i.formatDate(null==e?null:e.dateOfBirth)," ")}}function Vr(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",7)(1,"button",9),t.bIt("click",function(){r.eBV(e);const a=t.XpG().$implicit,s=t.XpG();
1return r.Njj(s._accept(a.id,!1))}),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"button",10),t.bIt("click",function(){r.eBV(e);const a=t.XpG().$implicit,s=t.XpG();return r.Njj(s._accept(a.id,!0))}),t.EFF(5),t.nI1(6,"translate"),t.k0s()()}2&n&&(t.R7$(2),t.JRh(t.bMT(3,2,"DENY")),t.R7$(3),t.SpI(" ",t.bMT(6,4,"ACCEPT")," "))}function Nr(n,o){if(1&n&&(t.nrm(0,"div",0),t.j41(1,"div",1),t.nVh(2,Fr,2,2,"div",2)(3,Or,2,1,"div")(4,Sr,3,3,"div"),t.nVh(5,Ar,7,6,"div"),t.k0s(),t.j41(6,"div",3)(7,"div",4),t.nVh(8,Er,3,3,"div",5),t.j41(9,"div",6),t.EFF(10),t.k0s()(),t.j41(11,"div",4),t.nVh(12,$r,3,3,"div",5),t.j41(13,"div",6),t.EFF(14),t.k0s()(),t.nVh(15,Pr,6,4,"div",4),t.k0s(),t.nVh(16,Vr,7,6,"div",7)),2&n){let e;const i=o.$implicit;t.R7$(2),t.vxM((e=!0)==(!!i.name||!!i.lastName)?2:e===!!i.viaIdentifier?3:4),t.R7$(3),t.vxM(i.status.draft?-1:5),t.R7$(3),t.vxM(null!=i&&null!=i.status&&i.status.displayName?8:-1),t.R7$(2),t.SpI(" ",null==i||null==i.status?null:i.status.displayName," "),t.R7$(2),t.vxM(null!=i&&i.officialNumber?12:-1),t.R7$(2),t.SpI(" ",null==i?null:i.officialNumber," "),t.R7$(),t.vxM(null!=i&&i.dateOfBirth?15:-1),t.R7$(),t.vxM(i.status.draft?16:-1)}}let Dr=(()=>{class n{constructor(){this.acceptClicked=new t.bkB,this.deleteClicked=new t.bkB}ngOnInit(){console.log(this.marketCoApplicants)}formatDate(e){return f()(e).format("YYYY-MM-DD")}_accept(e,i){this.acceptClicked.emit({id:e,accept:i})}delete(e){this.deleteClicked.emit(e)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-co-applicants-list"]],inputs:{marketCoApplicants:"marketCoApplicants",title:"title"},outputs:{acceptClicked:"acceptClicked",deleteClicked:"deleteClicked"},standalone:!1,decls:7,vars:1,consts:[[1,"divider"],[1,"item-header"],[1,"display-name"],[1,"list"],[1,"list-item"],[1,"label"],[1,"value"],["align","end",1,"accept-buttons"],["matButton","tonal","data-mom-test","MyPages_MySearchApplication_CoApplicants_RemoveCoApplicant",3,"click"],["matButton","tonal",3,"click"],["matButton","filled","data-mom-test","MyPages_MySearchApplication_CoApplicants_NewCoApplicantAccept",3,"click"]],template:function(i,a){1&i&&(t.j41(0,"mat-card")(1,"mat-card-header")(2,"mat-card-title"),t.EFF(3),t.k0s()(),t.j41(4,"mat-card-content"),t.Z7z(5,Nr,17,8,null,null,t.fX1),t.k0s()()),2&i&&(t.R7$(3),t.SpI(" ",a.title," "),t.R7$(2),t.Dyx(null==a.marketCoApplicants?null:a.marketCoApplicants.items))},dependencies:[G.An,I.$z,M.RN,M.m2,M.MM,M.dh,b.D9],styles:[".divider[_ngcontent-%COMP%]{margin-top:18px!important;margin-bottom:18px}.item-header[_ngcontent-%COMP%]{margin-bottom:16px;font-size:1.125rem;font-weight:500;display:flex;align-items:center;justify-content:space-between}.label[_ngcontent-%COMP%]{font-weight:500}.list-item[_ngcontent-%COMP%]{margin-bottom:16px}.accept-buttons[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin-right:5px}"]})}}return n})();function Gr(n,o){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"button",3),t.bIt("click",function(){r.eBV(e);const a=t.XpG();return r.Njj(a.openCreateDialog())}),t.EFF(2),t.nI1(3,"translate"),t.k0s()()}2&n&&(t.R7$(2),t.SpI(" ",t.bMT(3,1,"NEWCOAPPLICANT")," "))}function wr(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",1)(1,"taiga-market-co-applicants-list",4),t.nI1(2,"translate"),t.bIt("acceptClicked",function(a){r.eBV(e);const s=t.XpG();return r.Njj(s.accept(a))}),t.k0s()()}if(2&n){const e=t.XpG();t.R7$(),t.Y8G("title",t.bMT(2,2,"COAPPLICANTREQUEST"))("marketCoApplicants",e.marketCoApplicantsUnaccepted)}}function Xr(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",2)(1,"taiga-market-co-applicants-list",5),t.nI1(2,"translate"),t.bIt("deleteClicked",function(a){r.eBV(e);const s=t.XpG();return r.Njj(s.delete(a))}),t.k0s()()}if(2&n){const e=t.XpG();t.R7$(),t.Y8G("title",t.bMT(2,2,"MYCOAPPLICANTS"))("marketCoApplicants",e.marketCoApplicantsAccepted)}}let Br=(()=>{class n{constructor(e,i,a,s,l){this.mediaQueryService=e,this.marketService=i,this.menuService=a,this.dialog=s,this.translate=l}ngOnInit(){this.getMarketCoApplicants()}getMarketCoApplicants(){this.marketService.getMarketCoApplicants().subscribe(e=>{e&&(this.marketCoApplicantsAccepted={count:e.items?.filter(i=>!1===i.status.draft)?.length,items:e.items?.filter(i=>!1===i.status.draft)},this.marketCoApplicantsUnaccepted={count:e.items?.filter(i=>!0===i.status.draft)?.length,items:e.items?.filter(i=>!0===i.status.draft)})})}accept(e){this.marketService.patchMarketApplicantCoApplicantsItem(e.id,e.accept).subscribe(()=>{this.getMarketCoApplicants(),this.menuService.refreshMenu(1500)})}delete(e){this.dialog.open(E.w,{data:{heading:this.translate.instant("CONFIRMDELETECOAPP
1LICANT"),text:this.translate.instant("DELETECOAPPLICANTHELP"),dialogChoices:V.$.YesNo},scrollStrategy:new A.t0,ariaLabel:this.translate.instant("CONFIRMDELETECOAPPLICANT"),autoFocus:!1}).afterClosed().subscribe(a=>{"yes"===a&&this.marketService.deleteMarketApplicantCoApplicantsItem(e).subscribe(()=>{this.getMarketCoApplicants()})})}openCreateDialog(){this.dialog.open(Ir,{width:"400px",autoFocus:!1,maxWidth:"95vw",scrollStrategy:new A.t0,ariaLabel:this.translate.instant("COAPPLICANTREQUEST")}).afterClosed().subscribe(i=>{i&&this.sendRequest(i)})}sendRequest(e){this.marketService.putMarketApplicantCoApplicantsItem(e).subscribe(()=>{this.getMarketCoApplicants(),this.dialog.open(E.w,{data:{heading:null,text:this.translate.instant("CONFIRMCOAPPLICANTREQUEST"),dialogChoices:V.$.Custom,customButtonText:this.translate.instant("OK")},scrollStrategy:new A.t0,ariaLabel:this.translate.instant("CONFIRMCOAPPLICANTREQUEST"),autoFocus:!1})})}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(T.M),t.rXU(S),t.rXU(nt.$),t.rXU(k.bZ),t.rXU(b.c$))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-co-applicants"]],standalone:!1,decls:8,vars:13,consts:[[3,"text","subText"],[1,"unaccepted-container"],[1,"accepted-container"],["matButton","filled","data-mom-test","MyPages_MySearchApplication_CoApplicants_NewCoApplicant",3,"click"],[3,"acceptClicked","title","marketCoApplicants"],["data-mom-test","MyPages_MySearchApplication_CoApplicants_MyCoApplicantsTitle",3,"deleteClicked","title","marketCoApplicants"]],template:function(i,a){1&i&&(t.j41(0,"div"),t.nrm(1,"taiga-medium-header",0),t.nI1(2,"translate"),t.nI1(3,"translate"),t.nrm(4,"taiga-page-cards"),t.nVh(5,Gr,4,3,"div"),t.nVh(6,wr,3,4,"div",1),t.nVh(7,Xr,3,4,"div",2),t.k0s()),2&i&&(t.AVh("is-mobile",a.mediaQueryService.isMobile())("is-desktop",!a.mediaQueryService.isMobile()),t.R7$(),t.Y8G("text",t.bMT(2,9,"COAPPLICANTS"))("subText",t.bMT(3,11,"COAPPLICANTSHELP")),t.R7$(4),t.vxM(0===(null==a.marketCoApplicantsUnaccepted?null:a.marketCoApplicantsUnaccepted.count)&&0===(null==a.marketCoApplicantsAccepted?null:a.marketCoApplicantsAccepted.count)?5:-1),t.R7$(),t.vxM((null==a.marketCoApplicantsUnaccepted?null:a.marketCoApplicantsUnaccepted.count)>0?6:-1),t.R7$(),t.vxM((null==a.marketCoApplicantsAccepted?null:a.marketCoApplicantsAccepted.count)>0?7:-1))},dependencies:[I.$z,K.o,H.K,Dr,b.D9],styles:[".is-desktop[_ngcontent-%COMP%], .is-mobile[_ngcontent-%COMP%]{padding:16px}.unaccepted-container[_ngcontent-%COMP%]{margin-bottom:15px}"]})}}return n})();var rt=d(6233);function Ur(n,o){if(1&n&&t.EFF(0),2&n){const e=t.XpG().$implicit;t.JRh(e.section.title)}}function Lr(n,o){if(1&n&&(t.j41(0,"div",10),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.JRh(e.heading.title)}}function zr(n,o){if(1&n&&(t.j41(0,"p"),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.JRh(e.text.content)}}function Yr(n,o){1&n&&(t.j41(0,"span",12),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.JRh(t.bMT(2,1,"MUSTBESPECIFIED")))}function Qr(n,o){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"div")(2,"taiga-market-generic-field",11),t.bIt("update",function(){r.eBV(e);const a=t.XpG(4);return r.Njj(a.getData())}),t.k0s(),t.nVh(3,Yr,3,3,"span",12),t.nrm(4,"div",13),t.k0s()()}if(2&n){const e=t.XpG().$implicit;t.XpG();const i=t.sdS(1),a=t.XpG(2);t.R7$(2),t.Y8G("fields",a.getField(e.input.field))("values",a.marketApplicantValue.values[e.input.field]),t.R7$(),t.vxM(!i.completed&&i.interacted&&null!=e.input&&null!=e.input.options&&e.input.options.required?3:-1),t.R7$(),t.AVh("divider-warn",!i.completed&&i.interacted&&(null==e.input||null==e.input.options?null:e.input.options.required))}}function Hr(n,o){if(1&n&&t.nVh(0,Lr,2,1,"div",10)(1,zr,2,1,"p")(2,Qr,5,5,"div"),2&n){let e;t.vxM("heading"===(e=o.$implicit.type)?0:"text"===e?1:"input"===e?2:-1)}}function Jr(n,o){1&n&&(t.j41(0,"button",7),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"BACK")," "))}function qr(n,o){1&n&&(t.j41(0,"button",8)(1,"div"),t.EFF(2),t.nI1(3,"translate"),t.k0s()()),2&n&&(t.R7$(2),t.JRh(t.bMT(3,1,"NEXT")))}function Wr(n,o){if(1&n){const e=t.RV6();t.j41(0,"taiga-loading-button",14),t.nI1(1,"translate"),t.bIt("clicked",function(){r.eBV(e);const a=t.XpG().$implicit,s=t.XpG(2);
1return r.Njj(s.postMarketApplicationsItemPost(a))}),t.k0s()}if(2&n){const e=t.XpG(3);t.Y8G("disabled",e.disableButton)("spin",e.disableButton)("text",t.bMT(1,3,"FINISHED"))}}function Zr(n,o){if(1&n&&(t.j41(0,"mat-step",5,1),t.DNE(2,Ur,1,1,"ng-template",6),t.Z7z(3,Hr,3,1,null,null,t.fX1),t.nVh(5,Jr,3,3,"button",7),t.nVh(6,qr,4,3,"button",8),t.nVh(7,Wr,2,5,"taiga-loading-button",9),t.k0s()),2&n){const e=o.$implicit,i=o.$index,a=t.XpG(2);t.Y8G("completed",a.checkCompleted(e)),t.R7$(3),t.Dyx(null==e.section?null:e.section.elements),t.R7$(2),t.vxM(0!==i?5:-1),t.R7$(),t.vxM((null==a.marketApplicationsItem||null==a.marketApplicationsItem.application||null==a.marketApplicationsItem.application.presentation||null==a.marketApplicationsItem.application.presentation.data||null==a.marketApplicationsItem.application.presentation.data.form||null==a.marketApplicationsItem.application.presentation.data.form.elements?null:a.marketApplicationsItem.application.presentation.data.form.elements.length)-1!==i?6:-1),t.R7$(),t.vxM((null==a.marketApplicationsItem||null==a.marketApplicationsItem.application||null==a.marketApplicationsItem.application.presentation||null==a.marketApplicationsItem.application.presentation.data||null==a.marketApplicationsItem.application.presentation.data.form||null==a.marketApplicationsItem.application.presentation.data.form.elements?null:a.marketApplicationsItem.application.presentation.data.form.elements.length)-1===i?7:-1)}}function Kr(n,o){if(1&n&&(t.j41(0,"div",3)(1,"mat-stepper",4,0),t.Z7z(3,Zr,8,4,"mat-step",5,t.fX1),t.k0s()()),2&n){const e=t.XpG();t.R7$(),t.Y8G("linear",!0),t.R7$(2),t.Dyx(null==e.marketApplicationsItem||null==e.marketApplicationsItem.application||null==e.marketApplicationsItem.application.presentation||null==e.marketApplicationsItem.application.presentation.data||null==e.marketApplicationsItem.application.presentation.data.form?null:e.marketApplicationsItem.application.presentation.data.form.elements)}}const il=[{path:"applications",component:Dt,canActivate:[et.q]},{path:"subscriptions",component:xr,canActivate:[et.q],resolve:{data:Rr},title:"MARKETSUBSCRIPTIONS"},{path:"applicant/co-applicants",component:Br,canActivate:[et.q],title:"COAPPLICANTS"},{path:"applications/:queue",component:Dt,canActivate:[et.q],title:"HANDLE-IN-COMPONENT"},{path:"applications/:queue/:id",component:(()=>{class n{constructor(e,i,a,s,l,c){this.route=e,this.marketService=i,this.mediaQueryService=a,this.router=s,this.menuService=l,this.loadingService=c,this.marketApplicationsLink=`${D.t.MARKETAPPLICATIONS}`}ngAfterViewInit(){this.addTabRoles()}ngOnInit(){this.route.data.subscribe(e=>{this.marketApplicationsItem=e.data}),this.getData(),this.route.paramMap.subscribe(e=>{this.queueType=e.get("queue")})}getData(){this.marketService.getMarketApplicantProfileOptions().subscribe(e=>{this.marketApplicantField=e}),this.marketService.getMarketApplicantProfile().subscribe(e=>{this.marketApplicantValue=e})}getField(e){return this.marketApplicantField.fields.find(i=>i.id===e)}postMarketApplicationsItemPost(e){if(this.checkCompleted(e)){let i={generics:{"-":{marketApplicant:{values:{}}}}};for(let s of this.marketApplicationsItem?.application?.presentation?.data.form.elements)for(let l of s.section.elements)l?.input?.field&&(i.generics["-"].marketApplicant.values={...i.generics["-"].marketApplicant.values,[l.input.field]:{confirm:!0}});let a=N.Q.generateUniqueId();this.loadingService.open(a),this.disableButton=!0,this.marketService.patchMarketApplicantProfile(i).pipe((0,x.H)(()=>this.marketService.postMarketApplicationsItemPost(this.marketApplicationsItem.application.marketObject.id,this.marketApplicationsItem.application.id,{type:"done",reason:void 0},this.marketApplicationsItem.application.etag)),(0,z.W)(s=>{throw this.loadingService.close(a),this.disableButton=!1,s})).subscribe(()=>{setTimeout(()=>{this.loadingService.close(a),this.menuService.refreshMenu(),this.router.navigateByUrl(`${this.marketApplicationsLink}/${this.queueType}`)},2e3)})}}checkCompleted(e){const i=e.section?.elements?.filter(a=>a.input?.options?.required);
1for(let a of i)switch(this.getField(a.input.field).generic.type){case"marketIncome":return this.marketApplicantValue.values[a.input.field].generic.marketIncome.sources?.length>0;case"marketAccommodation":return Object?.keys(this.marketApplicantValue.values[a.input.field].generic.marketAccommodation?.values??{})?.length>0;case"marketHousehold":return Object?.keys(this.marketApplicantValue.values[a.input.field].generic.marketHousehold??{})?.length>0}return!0}addTabRoles(){const e=document.getElementsByClassName("mat-vertical-content-container");for(let i of Array.from(e))i.setAttribute("role","tab")}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(F.nX),t.rXU(S),t.rXU(T.M),t.rXU(F.Ix),t.rXU(nt.$),t.rXU(Pt.U))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-application"]],standalone:!1,decls:5,vars:8,consts:[["stepper",""],["step",""],["data-mom-test","MyPages_MySearchApplication_ApplicantProfile_Title",3,"text"],[1,"stepper"],["orientation","vertical","data-mom-test","MyPages_MySearchApplication_ApplicantProfile_Step",3,"linear"],[3,"completed"],["matStepLabel",""],["color","primary","matButton","tonal","matStepperPrevious","","data-mom-test","MyPages_MySearchApplication_ApplicantProfile_Back",1,"step-button"],["color","primary","matButton","filled","matStepperNext","","data-mom-test","MyPages_MySearchApplication_ApplicantProfile_Next",1,"step-button"],["color","primary","mat-raised-button","","matStepperNext","","data-mom-test","MyPages_MySearchApplication_ApplicantProfile_Done",1,"step-button",3,"disabled","spin","text"],[1,"mat-body-strong"],["cssClass","mat-elevation-z0 padding-left-right-0",3,"update","fields","values"],[1,"warn"],[1,"divider"],["color","primary","mat-raised-button","","matStepperNext","","data-mom-test","MyPages_MySearchApplication_ApplicantProfile_Done",1,"step-button",3,"clicked","disabled","spin","text"]],template:function(i,a){1&i&&(t.j41(0,"div"),t.nrm(1,"taiga-medium-header",2),t.nI1(2,"translate"),t.nrm(3,"taiga-page-cards"),t.nVh(4,Kr,5,1,"div",3),t.k0s()),2&i&&(t.AVh("is-mobile",a.mediaQueryService.isMobile())("is-desktop",!a.mediaQueryService.isMobile()),t.R7$(),t.Y8G("text",t.bMT(2,6,"APPLICANTPROFILE")),t.R7$(3),t.vxM(a.marketApplicantField&&a.marketApplicantValue?4:-1))},dependencies:[I.$z,rt.V5,rt.Ti,rt.M6,rt.F7,rt.FR,K.o,xt.A,H.K,Bt,b.D9],styles:[".is-desktop[_ngcontent-%COMP%], .is-mobile[_ngcontent-%COMP%]{padding:16px}.step-button[_ngcontent-%COMP%]{margin-right:10px}.divider[_ngcontent-%COMP%]{margin-top:20px;margin-bottom:20px}.stepper[_ngcontent-%COMP%]{margin-top:10px}"]})}}return n})(),canActivate:[et.q],resolve:{data:(()=>{class n{constructor(e,i,a,s){this.marketService=e,this.errorService=i,this.userMessageService=a,this.router=s}resolve(e){const i=e.paramMap.get("id");return this.marketService.getMarketApplicationsItem(i,!1).pipe((0,z.W)(a=>{const s=this.errorService.parseError(a);return this.userMessageService.errorWithHeader(s.message,"",s.displayErrorReportNumber?s.errorReportNumber:""),this.router.navigateByUrl("/"),(0,tt.of)(null)}))}static{this.\u0275fac=function(i){return new(i||n)(r.KVO(S),r.KVO(ct.I),r.KVO(Q.z),r.KVO(F.Ix))}}static{this.\u0275prov=r.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})()}},{path:"applicant/profile",component:To,canActivate:[et.q,Io.u],resolve:{data:Fo},title:"APPLICANTPROFILE"},{path:":objectType",component:Fi,title:"HANDLE-IN-COMPONENT"},{path:":objectType/:id",component:Dn,resolve:{data:Gn},title:"HANDLE-IN-COMPONENT"},{path:"**",component:$t.Q}];let nl=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=t.$C({type:n})}static{this.\u0275inj=r.G2t({imports:[U.iI.forChild(il),U.iI]})}}return n})();var al=d(9963);let sl=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=t.$C({type:n})}static{this.\u0275inj=r.G2t({imports:[$.MD,nl,al.G,pe,kt.Ou]})}}return n})()},1580(Ut,mt,d){d.d(mt,{E:()=>it});var $=d(2615),U=d(5850);let it=(()=>{class D{constructor(x){this.requestService=x}saveBlob(x,X){const f=new Blob([x],{type:X});if(window.navigator&&window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(f);else{const E=window.URL.createObjectURL(f);window.open(E,"_blank"),setTimeout(()=>{window.URL.revokeObjectURL(E)},100)}}saveBlobWithFilename(x,X){const f=X.split(".").pop(),E=this.getMimeType(f),V=new Blob([x],{type:E});if(window.navigator&&window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(V,X);else{const A=window.URL.createObjectURL(V),t=document.createElement("a");typeof t.download>"u"?window.open(A,"_blank"):(t.href=A,t.download=X,document.body.appendChild(t),t.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}))),setTimeout(()=>{window.URL.revokeObjectURL(A),t&&t.remove()},100)}}getMimeType(x){switch(x=x.replace(".","")){case"3g2":return"video/3gpp2";case"3gp":return"video/3gpp";case"au":return"audio/basic";case"avi":return"video/x-msvideo";case"bmp":return"image/bmp";case"doc":return"application/msword";case"docx":return"application/vnd.openxmlformats-officedocument.wordprocessingml.document";case"eps":case"ps":return"application/postscript";case"gif":return"image/gif";case"h264":return"video/h264";case"htm":case"html":return"text/html";case"ico":return"image/x-icon";case"jpe":case"jpeg":case"jpg":return"image/jpeg";case"m4v":return"video/x-m4v";case"mkv":return"video/x-matroska";case"mov":case"qt":return"video/quicktime";case"mp3":case"mpga":return"audio/mpeg";case"mp4":case"mpg4":return"video/mp4";case"mpe":case"mpeg":case"mpg":return"video/mpeg";case"ogg":return"application/ogg";case"pdf":return"application/pdf";case"png":return"image/png";case"ppt":return"application/vnd.ms-powerpoint";case"ra":case"ram":return"audio/x-pn-realaudio";case"rm":return"application/vnd.rn-realmedia";case"rtf":return"text/rtf";case"rtx":return"text/richtext";case"svg":return"image/svg+xml";case"swf":return"application/x-shockwave-flash";case"tif":case"tiff":return"image/tiff";case"txt":return"text/plain";case"wav":return"audio/x-wav";case"wbmp":return"image/vnd.wap.wbmp";case"wmv":return"video/x-ms-wmv";case"xhtml":return"application/xhtml+xml";case"xls":return"application/vnd.ms-excel";case"xlsx":return"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";case"xml":return"application/xml";default:return""}}getValidMediaType(x){switch(x){case"application/pdf":case"image/jpeg":case"image/png":case"image/bmp":case"image/gif":return!0;default:return!1}}getValidImageMediaType(x){switch(x){case"image/jpeg":case"image/png":case"image/bmp":case"image/gif":return!0;default:return!1}}getBlobFromUrl(x){return this.requestService.getBlobFromUrl(x)}static{this.\u0275fac=function(X){return new(X||D)($.KVO(U.B))}}static{this.\u0275prov=$.jDH({token:D,factory:D.\u0275fac,providedIn:"root"})}}return D})()}}]);

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.