PageSourceSearch

https://emiratesvisa.com/103.4879607ce6f86a9e.js

js emiratesvisa.com collected 2026-10-04 13:32:31 UTC 349,155 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkemirates_visa=self.webpackChunkemirates_visa||[]).push([[103],{6103:(se,U,m)=>{m.r(U),m.d(U,{ApplyModule:()=>fo});var h=m(6895),w=m(6995),E=m(8184),V=m(4080),e=m(4650),O=m(3353),g=m(3238);const F=["mat-button",""],ie=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],D=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],K=["mat-icon-button",""],le=["*"],Te=[{selector:"mat-button",mdcClasses:["mdc-button","mat-mdc-button"]},{selector:"mat-flat-button",mdcClasses:["mdc-button","mdc-button--unelevated","mat-mdc-unelevated-button"]},{selector:"mat-raised-button",mdcClasses:["mdc-button","mdc-button--raised","mat-mdc-raised-button"]},{selector:"mat-stroked-button",mdcClasses:["mdc-button","mdc-button--outlined","mat-mdc-outlined-button"]},{selector:"mat-fab",mdcClasses:["mdc-fab","mat-mdc-fab"]},{selector:"mat-mini-fab",mdcClasses:["mdc-fab","mdc-fab--mini","mat-mdc-mini-fab"]},{selector:"mat-icon-button",mdcClasses:["mdc-icon-button","mat-mdc-icon-button"]}],N=(0,g.pj)((0,g.Id)((0,g.Kr)(class{constructor(a){this._elementRef=a}})));let it=(()=>{class a extends N{constructor(t,i,n,o){super(t),this._platform=i,this._ngZone=n,this._animationMode=o,this._focusMonitor=(0,e.inject)(w.tE),this._isFab=!1;const s=t.nativeElement.classList;for(const l of Te)this._hasHostAttributes(l.selector)&&l.mdcClasses.forEach(p=>{s.add(p)})}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}focus(t="program",i){t?this._focusMonitor.focusVia(this._elementRef.nativeElement,t,i):this._elementRef.nativeElement.focus(i)}_hasHostAttributes(...t){return t.some(i=>this._elementRef.nativeElement.hasAttribute(i))}_isRippleDisabled(){return this.disableRipple||this.disabled}}return a.\u0275fac=function(t){e.\u0275\u0275invalidFactory()},a.\u0275dir=e.\u0275\u0275defineDirective({type:a,viewQuery:function(t,i){if(1&t&&e.\u0275\u0275viewQuery(g.wG,5),2&t){let n;e.\u0275\u0275queryRefresh(n=e.\u0275\u0275loadQuery())&&(i.ripple=n.first)}},features:[e.\u0275\u0275InheritDefinitionFeature]}),a})(),nt=(()=>{class a extends it{constructor(t,i,n,o){super(t,i,n,o)}}return a.\u0275fac=function(t){return new(t||a)(e.\u0275\u0275directiveInject(e.ElementRef),e.\u0275\u0275directiveInject(O.t4),e.\u0275\u0275directiveInject(e.NgZone),e.\u0275\u0275directiveInject(e.ANIMATION_MODULE_TYPE,8))},a.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""]],hostVars:7,hostBindings:function(t,i){2&t&&(e.\u0275\u0275attribute("disabled",i.disabled||null),e.\u0275\u0275classProp("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-unthemed",!i.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[e.\u0275\u0275InheritDefinitionFeature],attrs:F,ngContentSelectors:D,decls:8,vars:6,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(t,i){1&t&&(e.\u0275\u0275projectionDef(ie),e.\u0275\u0275element(0,"span",0),e.\u0275\u0275projection(1),e.\u0275\u0275elementStart(2,"span",1),e.\u0275\u0275projection(3,1),e.\u0275\u0275elementEnd(),e.\u0275\u0275projection(4,2),e.\u0275\u0275element(5,"span",2)(6,"span",3)(7,"span",4)),2&t&&(e.\u0275\u0275classProp("mdc-button__ripple",!i._isFab)("mdc-fab__ripple",i._isFab),e.\u0275\u0275advance(6),e.\u0275\u0275property("matRippleDisabled",i._isRippleDisabled())("matRippleTrigger",i._elementRef.nativeElement))},dependencies:[g.wG],styles:['.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0)}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__progress-indicator{font-size:0;position:absolute;transform:translate(-50%, -50%);top:50%;left:50%;line-height:initial}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);
1height:calc(\n      100% + 4px\n    );width:calc(\n      100% + 4px\n    );display:none}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring{border-color:CanvasText}}.mdc-button .mdc-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring::after{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{display:block}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button{height:var(--mdc-text-button-container-height, 36px);border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, inherit)}.mat-mdc-button:disabled{color:var(--mdc-text-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button{height:var(--mdc-filled-button-container-height, 36px);border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button:not(:disabled){background-color:var(--mdc-filled-button-container-color, transparent)}.mat-mdc-unelevated-button:disabled{background-color:var(--mdc-filled-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, inherit)}.mat-mdc-unelevated-button:disabled{color:var(--mdc-filled-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button{height:var(--mdc-protected-button-container-height, 36px);border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px));box-shadow:var(--mdc-protected-button-container-elevation, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){background-color:var(--mdc-protected-button-container-color, transparent)}.mat-mdc-raised-button:disabled{background-color:var(--mdc-protected-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, inherit)}.mat-mdc-raised-button:disabled{color:var(--mdc-protected-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button.mdc-ripple-upgraded--background-focused,.mat-mdc-raised-button:not(.mdc-ripple-upgraded):focus{box-shadow:var(--mdc-protected-button-focus-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled):active{box-shadow:var(--mdc-protected-button-pressed-container-elevation, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button{height:var(--mdc-outlined-button-container-height, 36px);border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px));padding:0 15px 0 15px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, inherit)}.mat-mdc-outlined-button:disabled{color:var(--mdc-outlined-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-outlined-button .mdc-button__ripple{border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-outlined-button:not(:disabled){border-color:var(--mdc-outlined-button-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button:disabled{border-color:var(--mdc-outlined-button-disabled-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button.mdc-button--icon-trailing{padding:0 11px 0 15px}.mat-mdc-outlined-button.mdc-button--icon-leading{padding:0 15px 0 11px}.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button .mdc-button__touch{left:calc(-1 * var(--mdc-outlined-button-outline-width, 1px));width:calc(100% + 2 * var(--mdc-outlined-button-outline-width, 1px))}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-button .mat-ripple-element,.mat-mdc-unelevated-button .mat-ripple-element,.mat-mdc-raised-button .mat-ripple-element,.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-button .mdc-button__label,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-outlined-button .mdc-button__label{z-index:1}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button[disabled],.mat-mdc-unelevated-button[disabled],.mat-mdc-raised-button[disabled],.mat-mdc-outlined-button[disabled]{cursor:default;pointer-events:none}.mat-mdc-button .mat-mdc-button-touch-target,.mat-mdc-unelevated-button .mat-mdc-button-touch-target,.mat-mdc-raised-button .mat-mdc-button-touch-target,.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}[dir=rtl] .mat-mdc-button>.mat-icon,.mat-mdc-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}.mat-mdc-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon,.mat-mdc-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem;margin-left:-4px;margin-right:8px}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:-4px}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon,.mat-mdc-raised-button .mdc-button__label+.mat-icon,.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:-4px}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon,.mat-mdc-unelevated-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-raised-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-outlined-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:-4px;margin-right:8px}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px) * -1)}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0}),a})(),Bt=(()=>{class a extends it{constructor(t,i,n,o){super(t,i,n,o)}}return a.\u0275fac=function(t){return new(t||a)(e.\u0275\u0275directiveInject(e.ElementRef),e.\u0275\u0275directiveInject(O.t4),e.\u0275\u0275directiveInject(e.NgZone),e.\u0275\u0275directiveInject(e.ANIMATION_MODULE_TYPE,8))},a.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(t,i){2&t&&(e.\u0275\u0275attribute("disabled",i.disabled||null),e.\u0275\u0275classProp("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-unthemed",!i.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[e.\u0275\u0275InheritDefinitionFeature],attrs:K,ngContentSelectors:le,decls:5,vars:3,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(t,i){1&t&&(e.\u0275\u0275projectionDef(),e.\u0275\u0275element(0,"span",0),e.\u0275\u0275projection(1),e.\u0275\u0275element(2,"span",1)(3,"span",2)(4,"span",3)),2&t&&(e.\u0275\u0275advance(3),e.\u0275\u0275property("matRippleDisabled",i._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",i._elementRef.nativeElement))},dependencies:[g.wG],styles:['.mdc-icon-button{font-size:24px;width:48px;height:48px;padding:12px}.mdc-icon-button .mdc-icon-button__focus-ring{max-height:48px;max-width:48px}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:40px;height:40px;margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:40px;max-width:40px}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button svg,.mdc-icon-button img{width:24px;height:24px}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{display:block}}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button[hidden]{display:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);
1height:100%;width:100%;display:none}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring{border-color:CanvasText}}.mdc-icon-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring::after{border-color:CanvasText}}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}.mat-mdc-icon-button{height:var(--mdc-icon-button-state-layer-size, 48px);width:var(--mdc-icon-button-state-layer-size, 48px);color:var(--mdc-icon-button-icon-color, inherit);border-radius:50%;flex-shrink:0;text-align:center;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mdc-button__icon{font-size:var(--mdc-icon-button-icon-size, 24px)}.mat-mdc-icon-button svg,.mat-mdc-icon-button img{width:var(--mdc-icon-button-icon-size, 24px);height:var(--mdc-icon-button-icon-size, 24px)}.mat-mdc-icon-button:disabled{opacity:var(--mdc-icon-button-disabled-icon-opacity, 0.38)}.mat-mdc-icon-button:disabled{color:var(--mdc-icon-button-disabled-icon-color, #000)}.mat-mdc-icon-button svg{vertical-align:baseline}.mat-mdc-icon-button[disabled]{cursor:default;pointer-events:none;opacity:1}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-icon-button .mdc-button__label{z-index:1}.mat-mdc-icon-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0}),a})(),jt=(()=>{class a{}return a.\u0275fac=function(t){return new(t||a)},a.\u0275mod=e.\u0275\u0275defineNgModule({type:a}),a.\u0275inj=e.\u0275\u0275defineInjector({imports:[g.BQ,g.si,g.BQ]}),a})();var at=m(4883),L=m(7579),R=m(727),zt=m(6451),f=m(9521),Se=m(445),Re=m(5698),Pe=m(8675),Ut=m(9300),q=m(1281),M=m(7340),d=m(433);const Kt=new e.InjectionToken("MatFormField"),qt=new e.InjectionToken("MAT_INPUT_VALUE_ACCESSOR"),Xt=["mat-calendar-body",""];function Zt(a,r){if(1&a&&(e.\u0275\u0275elementStart(0,"tr",3)(1,"td",4),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd()()),2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275styleProp("padding-top",t._cellPadding)("padding-bottom",t._cellPadding),e.\u0275\u0275attribute("colspan",t.numCols),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",t.label," ")}}function Jt(a,r){if(1&a&&(e.\u0275\u0275elementStart(0,"td",4),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275styleProp("padding-top",t._cellPadding)("padding-bottom",t._cellPadding),e.\u0275\u0275attribute("colspan",t._firstRowOffset),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",t._firstRowOffset>=t.labelMinRequiredCells?t.label:""," ")}}function ei(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"td",8)(1,"button",9),e.\u0275\u0275listener("click",function(n){const s=e.\u0275\u0275restoreView(t).$implicit,l=e.\u0275\u0275nextContext(2);
1return e.\u0275\u0275resetView(l._cellClicked(s,n))})("focus",function(n){const s=e.\u0275\u0275restoreView(t).$implicit,l=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(l._emitActiveDateChange(s,n))}),e.\u0275\u0275elementStart(2,"span",10),e.\u0275\u0275text(3),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(4,"span",11),e.\u0275\u0275elementEnd()()}if(2&a){const t=r.$implicit,i=r.index,n=e.\u0275\u0275nextContext().index,o=e.\u0275\u0275nextContext();e.\u0275\u0275styleProp("width",o._cellWidth)("padding-top",o._cellPadding)("padding-bottom",o._cellPadding),e.\u0275\u0275attribute("data-mat-row",n)("data-mat-col",i),e.\u0275\u0275advance(1),e.\u0275\u0275classProp("mat-calendar-body-disabled",!t.enabled)("mat-calendar-body-active",o._isActiveCell(n,i))("mat-calendar-body-range-start",o._isRangeStart(t.compareValue))("mat-calendar-body-range-end",o._isRangeEnd(t.compareValue))("mat-calendar-body-in-range",o._isInRange(t.compareValue))("mat-calendar-body-comparison-bridge-start",o._isComparisonBridgeStart(t.compareValue,n,i))("mat-calendar-body-comparison-bridge-end",o._isComparisonBridgeEnd(t.compareValue,n,i))("mat-calendar-body-comparison-start",o._isComparisonStart(t.compareValue))("mat-calendar-body-comparison-end",o._isComparisonEnd(t.compareValue))("mat-calendar-body-in-comparison-range",o._isInComparisonRange(t.compareValue))("mat-calendar-body-preview-start",o._isPreviewStart(t.compareValue))("mat-calendar-body-preview-end",o._isPreviewEnd(t.compareValue))("mat-calendar-body-in-preview",o._isInPreview(t.compareValue)),e.\u0275\u0275property("ngClass",t.cssClasses)("tabindex",o._isActiveCell(n,i)?0:-1),e.\u0275\u0275attribute("aria-label",t.ariaLabel)("aria-disabled",!t.enabled||null)("aria-pressed",o._isSelected(t.compareValue))("aria-current",o.todayValue===t.compareValue?"date":null)("aria-describedby",o._getDescribedby(t.compareValue)),e.\u0275\u0275advance(1),e.\u0275\u0275classProp("mat-calendar-body-selected",o._isSelected(t.compareValue))("mat-calendar-body-comparison-identical",o._isComparisonIdentical(t.compareValue))("mat-calendar-body-today",o.todayValue===t.compareValue),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",t.displayValue," ")}}function ti(a,r){if(1&a&&(e.\u0275\u0275elementStart(0,"tr",5),e.\u0275\u0275template(1,Jt,2,6,"td",6),e.\u0275\u0275template(2,ei,5,48,"td",7),e.\u0275\u0275elementEnd()),2&a){const t=r.$implicit,i=r.index,n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",0===i&&n._firstRowOffset),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",t)}}function ii(a,r){if(1&a&&(e.\u0275\u0275elementStart(0,"th",5)(1,"span",6),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"span",7),e.\u0275\u0275text(4),e.\u0275\u0275elementEnd()()),2&a){const t=r.$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(t.long),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(t.narrow)}}const ni=["*"];function ai(a,r){}function ri(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"mat-month-view",5),e.\u0275\u0275listener("activeDateChange",function(n){e.\u0275\u0275restoreView(t);const o=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(o.activeDate=n)})("_userSelection",function(n){e.\u0275\u0275restoreView(t);const o=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(o._dateSelected(n))})("dragStarted",function(n){e.\u0275\u0275restoreView(t);const o=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(o._dragStarted(n))})("dragEnded",function(n){e.\u0275\u0275restoreView(t);const o=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(o._dragEnded(n))}),e.\u0275\u0275elementEnd()}if(2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275property("activeDate",t.activeDate)("selected",t.selected)("dateFilter",t.dateFilter)("maxDate",t.maxDate)("minDate",t.minDate)("dateClass",t.dateClass)("comparisonStart",t.comparisonStart)("comparisonEnd",t.comparisonEnd)("startDateAccessibleName",t.startDateAccessibleName)("endDateAccessibleName",t.endDateAccessibleName)("activeDrag",t._activeDrag)}}function oi(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"mat-year-view",6),e.\u0275\u0275listener("activeDateChange",function(n){e.\u0275\u0275restoreView(t);const o=e.\u0275\u0275nextContext();
1return e.\u0275\u0275resetView(o.activeDate=n)})("monthSelected",function(n){e.\u0275\u0275restoreView(t);const o=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(o._monthSelectedInYearView(n))})("selectedChange",function(n){e.\u0275\u0275restoreView(t);const o=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(o._goToDateInView(n,"month"))}),e.\u0275\u0275elementEnd()}if(2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275property("activeDate",t.activeDate)("selected",t.selected)("dateFilter",t.dateFilter)("maxDate",t.maxDate)("minDate",t.minDate)("dateClass",t.dateClass)}}function si(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"mat-multi-year-view",7),e.\u0275\u0275listener("activeDateChange",function(n){e.\u0275\u0275restoreView(t);const o=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(o.activeDate=n)})("yearSelected",function(n){e.\u0275\u0275restoreView(t);const o=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(o._yearSelectedInMultiYearView(n))})("selectedChange",function(n){e.\u0275\u0275restoreView(t);const o=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(o._goToDateInView(n,"year"))}),e.\u0275\u0275elementEnd()}if(2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275property("activeDate",t.activeDate)("selected",t.selected)("dateFilter",t.dateFilter)("maxDate",t.maxDate)("minDate",t.minDate)("dateClass",t.dateClass)}}function li(a,r){}let Ce=(()=>{class a{constructor(){this.changes=new L.x,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.closeCalendarLabel="Close calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 24 years",this.nextMultiYearLabel="Next 24 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year",this.startDateLabel="Start date",this.endDateLabel="End date"}formatYearRange(t,i){return`${t} \u2013 ${i}`}formatYearRangeLabel(t,i){return`${t} to ${i}`}}return a.\u0275fac=function(t){return new(t||a)},a.\u0275prov=e.\u0275\u0275defineInjectable({token:a,factory:a.\u0275fac,providedIn:"root"}),a})();class Oe{constructor(r,t,i,n,o={},s=r,l){this.value=r,this.displayValue=t,this.ariaLabel=i,this.enabled=n,this.cssClasses=o,this.compareValue=s,this.rawValue=l}}let ci=1,ce=(()=>{class a{ngAfterViewChecked(){this._focusActiveCellAfterViewChecked&&(this._focusActiveCell(),this._focusActiveCellAfterViewChecked=!1)}constructor(t,i){this._elementRef=t,this._ngZone=i,this._platform=(0,e.inject)(O.t4),this._focusActiveCellAfterViewChecked=!1,this.numCols=7,this.activeCell=0,this.isRange=!1,this.cellAspectRatio=1,this.previewStart=null,this.previewEnd=null,this.selectedValueChange=new e.EventEmitter,this.previewChange=new e.EventEmitter,this.activeDateChange=new e.EventEmitter,this.dragStarted=new e.EventEmitter,this.dragEnded=new e.EventEmitter,this._didDragSinceMouseDown=!1,this._enterHandler=n=>{if(this._skipNextFocus&&"focus"===n.type)this._skipNextFocus=!1;else if(n.target&&this.isRange){const o=this._getCellFromElement(n.target);o&&this._ngZone.run(()=>this.previewChange.emit({value:o.enabled?o:null,event:n}))}},this._touchmoveHandler=n=>{if(!this.isRange)return;const o=rt(n),s=o?this._getCellFromElement(o):null;o!==n.target&&(this._didDragSinceMouseDown=!0),Ne(n.target)&&n.preventDefault(),this._ngZone.run(()=>this.previewChange.emit({value:s?.enabled?s:null,event:n}))},this._leaveHandler=n=>{null!==this.previewEnd&&this.isRange&&("blur"!==n.type&&(this._didDragSinceMouseDown=!0),n.target&&this._getCellFromElement(n.target)&&(!n.relatedTarget||!this._getCellFromElement(n.relatedTarget))&&this._ngZone.run(()=>this.previewChange.emit({value:null,event:n})))},this._mousedownHandler=n=>{if(!this.isRange)return;this._didDragSinceMouseDown=!1;const o=n.target&&this._getCellFromElement(n.target);!o||!this._isInRange(o.rawValue)||this._ngZone.run(()=>{this.dragStarted.emit({value:o.rawValue,event:n})})},this._mouseupHandler=n=>{if(!this.isRange)return;const o=Ne(n.target);o?o.closest(".mat-calendar-body")===this._elementRef.nativeElement&&this._ngZone.run(()=>{const s=this._getCellFromElement(o);this.dragEnded.emit({value:s?.rawValue??null,event:n})}):this._ngZone.run(()=>{this.dragEnded.emit({value:null,event:n})})},this._touchendHandler=n=>{const o=rt(n);o&&this._mouseupHandler({target:o})},this._id="mat-calendar-body-"+ci++,this._startDateLabelId=`${this._id}-start-date`,this._endDateLabelId=`${this._id}-end-date`,i.runOutsideAngular(()=>{const n=t.nativeElement;n.addEventListener("mouseenter",this._enterHandler,!0),n.addEventListener("touchmove",this._touchmoveHandler,!0),n.addEventListener("focus",this._enterHandler,!0),n.addEventListener("mouseleave",this._leaveHandler,!0),n.addEventListener("blur",this._leaveHandler,!0),n.addEventListener("mousedown",this._mousedownHandler),n.addEventListener("touchstart",this._mousedownHandler),this._platform.isBrowser&&(window.addEventListener("mouseup",this._mouseupHandler),window.addEventListener("touchend",this._touchendHandler))})}
1_cellClicked(t,i){this._didDragSinceMouseDown||t.enabled&&this.selectedValueChange.emit({value:t.value,event:i})}_emitActiveDateChange(t,i){t.enabled&&this.activeDateChange.emit({value:t.value,event:i})}_isSelected(t){return this.startValue===t||this.endValue===t}ngOnChanges(t){const i=t.numCols,{rows:n,numCols:o}=this;(t.rows||i)&&(this._firstRowOffset=n&&n.length&&n[0].length?o-n[0].length:0),(t.cellAspectRatio||i||!this._cellPadding)&&(this._cellPadding=50*this.cellAspectRatio/o+"%"),(i||!this._cellWidth)&&(this._cellWidth=100/o+"%")}ngOnDestroy(){const t=this._elementRef.nativeElement;t.removeEventListener("mouseenter",this._enterHandler,!0),t.removeEventListener("touchmove",this._touchmoveHandler,!0),t.removeEventListener("focus",this._enterHandler,!0),t.removeEventListener("mouseleave",this._leaveHandler,!0),t.removeEventListener("blur",this._leaveHandler,!0),t.removeEventListener("mousedown",this._mousedownHandler),t.removeEventListener("touchstart",this._mousedownHandler),this._platform.isBrowser&&(window.removeEventListener("mouseup",this._mouseupHandler),window.removeEventListener("touchend",this._touchendHandler))}_isActiveCell(t,i){let n=t*this.numCols+i;return t&&(n-=this._firstRowOffset),n==this.activeCell}_focusActiveCell(t=!0){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe((0,Re.q)(1)).subscribe(()=>{setTimeout(()=>{const i=this._elementRef.nativeElement.querySelector(".mat-calendar-body-active");i&&(t||(this._skipNextFocus=!0),i.focus())})})})}_scheduleFocusActiveCellAfterViewChecked(){this._focusActiveCellAfterViewChecked=!0}_isRangeStart(t){return Le(t,this.startValue,this.endValue)}_isRangeEnd(t){return Be(t,this.startValue,this.endValue)}_isInRange(t){return je(t,this.startValue,this.endValue,this.isRange)}_isComparisonStart(t){return Le(t,this.comparisonStart,this.comparisonEnd)}_isComparisonBridgeStart(t,i,n){if(!this._isComparisonStart(t)||this._isRangeStart(t)||!this._isInRange(t))return!1;let o=this.rows[i][n-1];if(!o){const s=this.rows[i-1];o=s&&s[s.length-1]}return o&&!this._isRangeEnd(o.compareValue)}_isComparisonBridgeEnd(t,i,n){if(!this._isComparisonEnd(t)||this._isRangeEnd(t)||!this._isInRange(t))return!1;let o=this.rows[i][n+1];if(!o){const s=this.rows[i+1];o=s&&s[0]}return o&&!this._isRangeStart(o.compareValue)}_isComparisonEnd(t){return Be(t,this.comparisonStart,this.comparisonEnd)}_isInComparisonRange(t){return je(t,this.comparisonStart,this.comparisonEnd,this.isRange)}_isComparisonIdentical(t){return this.comparisonStart===this.comparisonEnd&&t===this.comparisonStart}_isPreviewStart(t){return Le(t,this.previewStart,this.previewEnd)}_isPreviewEnd(t){return Be(t,this.previewStart,this.previewEnd)}_isInPreview(t){return je(t,this.previewStart,this.previewEnd,this.isRange)}_getDescribedby(t){return this.isRange?this.startValue===t&&this.endValue===t?`${this._startDateLabelId} ${this._endDateLabelId}`:this.startValue===t?this._startDateLabelId:this.endValue===t?this._endDateLabelId:null:null}_getCellFromElement(t){const i=Ne(t);if(i){const n=i.getAttribute("data-mat-row"),o=i.getAttribute("data-mat-col");if(n&&o)return this.rows[parseInt(n)][parseInt(o)]}return null}}return a.\u0275fac=function(t){return new(t||a)(e.\u0275\u0275directiveInject(e.ElementRef),e.\u0275\u0275directiveInject(e.NgZone))},a.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["","mat-calendar-body",""]],hostAttrs:[1,"mat-calendar-body"],inputs:{label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",previewStart:"previewStart",previewEnd:"previewEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange",activeDateChange:"activeDateChange",dragStarted:"dragStarted",dragEnded:"dragEnded"},exportAs:["matCalendarBody"],features:[e.\u0275\u0275NgOnChangesFeature],attrs:Xt,decls:6,vars:6,consts:[["aria-hidden","true",4,"ngIf"],["role","row",4,"ngFor","ngForOf"],[1,"mat-calendar-body-hidden-label",3,"id"],["aria-hidden","true"],[1,"mat-calendar-body-label"],["role","row"],["class","mat-calendar-body-label",3,"paddingTop","paddingBottom",4,"ngIf"],["role","gridcell","class","mat-calendar-body-cell-container",3,"width","paddingTop","paddingBottom",4,"ngFor","ngForOf"],["role","gridcell",1,"mat-calendar-body-cell-container"],["type","button",1,"mat-calendar-body-cell",3,"ngClass","tabindex","click","focus"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],["aria-hidden","true",1,"mat-calendar-body-cell-preview"]],template:function(t,i){1&t&&(e.\u0275\u0275template(0,Zt,3,6,"tr",0),e.\u0275\u0275template(1,ti,3,2,"tr",1),e.\u0275\u0275elementStart(2,"label",2),e.\u0275\u0275text(3),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"label",2),e.\u0275\u0275text(5),e.\u0275\u0275elementEnd()),2&t&&(e.\u0275\u0275property("ngIf",i._firstRowOffset<i.labelMinRequiredCells),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",i.rows),e.\u0275\u0275advance(1),e.\u0275\u0275property("id",i._startDateLabelId),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",i.startDateAccessibleName,"\n"),e.\u0275\u0275advance(1),e.\u0275\u0275property("id",i._endDateLabelId),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",i.endDateAccessibleName,"\n"))}
1,dependencies:[h.mk,h.sg,h.O5],styles:['.mat-calendar-body{min-width:224px}.mat-calendar-body-label{height:0;line-height:0;text-align:left;padding-left:4.7142857143%;padding-right:4.7142857143%}.mat-calendar-body-hidden-label{display:none}.mat-calendar-body-cell-container{position:relative;height:0;line-height:0}.mat-calendar-body-cell{-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);position:absolute;top:0;left:0;width:100%;height:100%;background:none;text-align:center;outline:none;font-family:inherit;margin:0}.mat-calendar-body-cell::-moz-focus-inner{border:0}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-cell-preview{content:"";position:absolute;top:5%;left:0;z-index:0;box-sizing:border-box;display:block;height:90%;width:100%}.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-start::after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,.mat-calendar-body-comparison-start::after,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:5%;width:95%;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,[dir=rtl] .mat-calendar-body-comparison-start::after,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:0;border-radius:0;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,.mat-calendar-body-comparison-end::after,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,[dir=rtl] .mat-calendar-body-comparison-end::after,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{left:5%;border-radius:0;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start::after{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end.mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start::after{width:90%}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:dashed 1px}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:0;border-left:dashed 1px}.mat-calendar-body-disabled{cursor:default}.cdk-high-contrast-active .mat-calendar-body-disabled{opacity:.5}.mat-calendar-body-cell-content{top:5%;left:5%;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}.cdk-high-contrast-active .mat-calendar-body-cell-content{border:none}.cdk-high-contrast-active .mat-datepicker-popup:not(:empty),.cdk-high-contrast-active .mat-calendar-body-cell:not(.mat-calendar-body-in-range) .mat-calendar-body-selected{outline:solid 1px}.cdk-high-contrast-active .mat-calendar-body-today{outline:dotted 1px}.cdk-high-contrast-active .mat-calendar-body-cell::before,.cdk-high-contrast-active .mat-calendar-body-cell::after,.cdk-high-contrast-active .mat-calendar-body-selected{background:none}.cdk-high-contrast-active .mat-calendar-body-in-range::before,.cdk-high-contrast-active .mat-calendar-body-comparison-bridge-start::before,.cdk-high-contrast-active .mat-calendar-body-comparison-bridge-end::before{border-top:solid 1px;border-bottom:solid 1px}.cdk-high-contrast-active .mat-calendar-body-range-start::before{border-left:solid 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-range-start::before{border-left:0;border-right:solid 1px}.cdk-high-contrast-active .mat-calendar-body-range-end::before{border-right:solid 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-range-end::before{border-right:0;border-left:solid 1px}.cdk-high-contrast-active .mat-calendar-body-in-comparison-range::before{border-top:dashed 1px;border-bottom:dashed 1px}.cdk-high-contrast-active .mat-calendar-body-comparison-start::before{border-left:dashed 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-comparison-start::before{border-left:0;border-right:dashed 1px}
1.cdk-high-contrast-active .mat-calendar-body-comparison-end::before{border-right:dashed 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-comparison-end::before{border-right:0;border-left:dashed 1px}[dir=rtl] .mat-calendar-body-label{text-align:right}'],encapsulation:2,changeDetection:0}),a})();function Ve(a){return"TD"===a?.nodeName}function Ne(a){let r;return Ve(a)?r=a:Ve(a.parentNode)?r=a.parentNode:Ve(a.parentNode?.parentNode)&&(r=a.parentNode.parentNode),null!=r?.getAttribute("data-mat-row")?r:null}function Le(a,r,t){return null!==t&&r!==t&&a<t&&a===r}function Be(a,r,t){return null!==r&&r!==t&&a>=r&&a===t}function je(a,r,t,i){return i&&null!==r&&null!==t&&r!==t&&a>=r&&a<=t}function rt(a){const r=a.changedTouches[0];return document.elementFromPoint(r.clientX,r.clientY)}class j{constructor(r,t){this.start=r,this.end=t}}let J=(()=>{class a{constructor(t,i){this.selection=t,this._adapter=i,this._selectionChanged=new L.x,this.selectionChanged=this._selectionChanged,this.selection=t}updateSelection(t,i){const n=this.selection;this.selection=t,this._selectionChanged.next({selection:t,source:i,oldValue:n})}ngOnDestroy(){this._selectionChanged.complete()}_isValidDateInstance(t){return this._adapter.isDateInstance(t)&&this._adapter.isValid(t)}}return a.\u0275fac=function(t){e.\u0275\u0275invalidFactory()},a.\u0275prov=e.\u0275\u0275defineInjectable({token:a,factory:a.\u0275fac}),a})(),di=(()=>{class a extends J{constructor(t){super(null,t)}add(t){super.updateSelection(t,this)}isValid(){return null!=this.selection&&this._isValidDateInstance(this.selection)}isComplete(){return null!=this.selection}clone(){const t=new a(this._adapter);return t.updateSelection(this.selection,this),t}}return a.\u0275fac=function(t){return new(t||a)(e.\u0275\u0275inject(g._A))},a.\u0275prov=e.\u0275\u0275defineInjectable({token:a,factory:a.\u0275fac}),a})();const ot={provide:J,deps:[[new e.Optional,new e.SkipSelf,J],g._A],useFactory:function mi(a,r){return a||new di(r)}},De=new e.InjectionToken("MAT_DATE_RANGE_SELECTION_STRATEGY");let st=(()=>{class a{get activeDate(){return this._activeDate}set activeDate(t){const i=this._activeDate,n=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(n,this.minDate,this.maxDate),this._hasSameMonthAndYear(i,this._activeDate)||this._init()}get selected(){return this._selected}set selected(t){this._selected=t instanceof j?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setRanges(this._selected)}get minDate(){return this._minDate}set minDate(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}constructor(t,i,n,o,s){this._changeDetectorRef=t,this._dateFormats=i,this._dateAdapter=n,this._dir=o,this._rangeStrategy=s,this._rerenderSubscription=R.w0.EMPTY,this.activeDrag=null,this.selectedChange=new e.EventEmitter,this._userSelection=new e.EventEmitter,this.dragStarted=new e.EventEmitter,this.dragEnded=new e.EventEmitter,this.activeDateChange=new e.EventEmitter,this._activeDate=this._dateAdapter.today()}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe((0,Pe.O)(null)).subscribe(()=>this._init())}ngOnChanges(t){const i=t.comparisonStart||t.comparisonEnd;i&&!i.firstChange&&this._setRanges(this.selected),t.activeDrag&&!this.activeDrag&&this._clearPreview()}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_dateSelected(t){const i=t.value,n=this._getDateFromDayOfMonth(i);let o,s;this._selected instanceof j?(o=this._getDateInCurrentMonth(this._selected.start),s=this._getDateInCurrentMonth(this._selected.end)):o=s=this._getDateInCurrentMonth(this._selected),(o!==i||s!==i)&&this.selectedChange.emit(n),this._userSelection.emit({value:n,event:t.event}),this._clearPreview(),this._changeDetectorRef.markForCheck()}_updateActiveDate(t){const n=this._activeDate;this.activeDate=this._getDateFromDayOfMonth(t.value),this._dateAdapter.compareDate(n,this.activeDate)&&this.activeDateChange.emit(this._activeDate)}_handleCalendarBodyKeydown(t){const i=this._activeDate,n=this._isRtl();switch(t.keyCode){case f.oh:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,n?1:-1);break;case f.SV:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,n?-1:1);break;case f.LH:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case f.JH:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case f.Sd:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case f.uR:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case f.Ku:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case f.VM:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case f.K5:case f.L_:return this._selectionKeyPressed=!0,void(this._canSelect(this._activeDate)&&t.preventDefault());case f.hY:return void(null!=this._previewEnd&&!(0,f.Vb)(t)&&(this._clearPreview(),this.activeDrag?this.dragEnded.emit({value:null,event:t}):(this.selectedChange.emit(null),this._userSelection.emit({value:null,event:t})),t.preventDefault(),t.stopPropagation()));default:return}this._dateAdapter.compareDate(i,this.activeDate)&&(this.activeDateChange.emit(this.activeDate),this._focusActiveCellAfterViewChecked()),t.preventDefault()}_handleCalendarBodyKeyup(t){(t.keyCode===f.L_||t.keyCode===f.K5)&&(this._selectionKeyPressed&&this._canSelect(this._activeDate)&&this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:t}),this._selectionKeyPressed=!1)}_init(){this._setRanges(this.selected),this._todayDate=this._getCellCompareValue(this._dateAdapter.today()),this._monthLabel=this._dateFormats.display.monthLabel?this._dateAdapter.format(this.activeDate,this._dateFormats.display.monthLabel):this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();let t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(7+this._dateAdapter.getDayOfWeek(t)-this._dateAdapter.getFirstDayOfWeek())%7,this._initWeek
1days(),this._createWeekCells(),this._changeDetectorRef.markForCheck()}_focusActiveCell(t){this._matCalendarBody._focusActiveCell(t)}_focusActiveCellAfterViewChecked(){this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked()}_previewChanged({event:t,value:i}){if(this._rangeStrategy){const n=i?i.rawValue:null,o=this._rangeStrategy.createPreview(n,this.selected,t);if(this._previewStart=this._getCellCompareValue(o.start),this._previewEnd=this._getCellCompareValue(o.end),this.activeDrag&&n){const s=this._rangeStrategy.createDrag?.(this.activeDrag.value,this.selected,n,t);s&&(this._previewStart=this._getCellCompareValue(s.start),this._previewEnd=this._getCellCompareValue(s.end))}this._changeDetectorRef.detectChanges()}}_dragEnded(t){if(this.activeDrag)if(t.value){const i=this._rangeStrategy?.createDrag?.(this.activeDrag.value,this.selected,t.value,t.event);this.dragEnded.emit({value:i??null,event:t.event})}else this.dragEnded.emit({value:null,event:t.event})}_getDateFromDayOfMonth(t){return this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),t)}_initWeekdays(){const t=this._dateAdapter.getFirstDayOfWeek(),i=this._dateAdapter.getDayOfWeekNames("narrow");let o=this._dateAdapter.getDayOfWeekNames("long").map((s,l)=>({long:s,narrow:i[l]}));this._weekdays=o.slice(t).concat(o.slice(0,t))}_createWeekCells(){const t=this._dateAdapter.getNumDaysInMonth(this.activeDate),i=this._dateAdapter.getDateNames();this._weeks=[[]];for(let n=0,o=this._firstWeekOffset;n<t;n++,o++){7==o&&(this._weeks.push([]),o=0);const s=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),n+1),l=this._shouldEnableDate(s),p=this._dateAdapter.format(s,this._dateFormats.display.dateA11yLabel),c=this.dateClass?this.dateClass(s,"month"):void 0;this._weeks[this._weeks.length-1].push(new Oe(n+1,i[n],p,l,c,this._getCellCompareValue(s),s))}}_shouldEnableDate(t){return!!t&&(!this.minDate||this._dateAdapter.compareDate(t,this.minDate)>=0)&&(!this.maxDate||this._dateAdapter.compareDate(t,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(t))}_getDateInCurrentMonth(t){return t&&this._hasSameMonthAndYear(t,this.activeDate)?this._dateAdapter.getDate(t):null}_hasSameMonthAndYear(t,i){return!(!t||!i||this._dateAdapter.getMonth(t)!=this._dateAdapter.getMonth(i)||this._dateAdapter.getYear(t)!=this._dateAdapter.getYear(i))}_getCellCompareValue(t){if(t){const i=this._dateAdapter.getYear(t),n=this._dateAdapter.getMonth(t),o=this._dateAdapter.getDate(t);return new Date(i,n,o).getTime()}return null}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setRanges(t){t instanceof j?(this._rangeStart=this._getCellCompareValue(t.start),this._rangeEnd=this._getCellCompareValue(t.end),this._isRange=!0):(this._rangeStart=this._rangeEnd=this._getCellCompareValue(t),this._isRange=!1),this._comparisonRangeStart=this._getCellCompareValue(this.comparisonStart),this._comparisonRangeEnd=this._getCellCompareValue(this.comparisonEnd)}_canSelect(t){return!this.dateFilter||this.dateFilter(t)}_clearPreview(){this._previewStart=this._previewEnd=null}}return a.\u0275fac=function(t){return new(t||a)(e.\u0275\u0275directiveInject(e.ChangeDetectorRef),e.\u0275\u0275directiveInject(g.sG,8),e.\u0275\u0275directiveInject(g._A,8),e.\u0275\u0275directiveInject(Se.Is,8),e.\u0275\u0275directiveInject(De,8))},a.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["mat-month-view"]],viewQuery:function(t,i){if(1&t&&e.\u0275\u0275viewQuery(ce,5),2&t){let n;e.\u0275\u0275queryRefresh(n=e.\u0275\u0275loadQuery())&&(i._matCalendarBody=n.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName",activeDrag:"activeDrag"},outputs:{selectedChange:"selectedChange",_userSelection:"_userSelection",dragStarted:"dragStarted",dragEnded:"dragEnded",activeDateChange:"activeDateChange"},exportAs:["matMonthView"],features:[e.\u0275\u0275NgOnChangesFeature],decls:7,vars:15,consts:[["role","grid",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["scope","col",4,"ngFor","ngForOf"],["aria-hidden","true","colspan","7",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","comparisonStart","comparisonEnd","previewStart","previewEnd","isRange","labelMinRequiredCells","activeCell","startDateAccessibleName","endDateAccessibleName","selectedValueChange","activeDateChange","previewChange","dragStarted","dragEnded","keyup","keydown"],["scope","col"],[1,"cdk-visually-hidden"],["aria-hidden","true"]],template:function(t,i){1&t&&(e.\u0275\u0275elementStart(0,"table",0)(1,"thead",1)(2,"tr"),e.\u0275\u0275template(3,ii,5,2,"th",2),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"tr"),e.\u0275\u0275element(5,"th",3),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(6,"tbody",4),e.\u0275\u0275listener("selectedValueChange",function(o){return i._dateSelected(o)})("activeDateChange",function(o){return i._updateActiveDate(o)})("previewChange",function(o){return i._previewChanged(o)})("dragStarted",function(o){return i.dragStarted.emit(o)})("dragEnded",function(o){return i._dragEnded(o)})("keyup",function(o){return i._handleCalendarBodyKeyup(o)})("keydown",function(o){return i._handleCalendarBodyKeydown(o)}),e.\u0275\u0275elementEnd()()),2&t&&(e.\u0275\u0275advance(3),e.\u0275\u0275property("ngForOf",i._weekdays),e.\u0275\u0275advance(3),e.\u0275\u0275property("label",i._monthLabel)("rows",i._weeks)("todayValue",i._todayDate)("startValue",i._rangeStart)("endValue",i._rangeEnd)("comparisonStart",i._comparisonRangeStart)("comparisonEnd",i._comparisonRangeEnd)("previewStart",i._previewStart)("previewEnd",i._previewEnd)("isRange",i._isRange)("labelMinRequiredCells",3)("activeCell",i._dateAdapter.getDate(i.activeDate)-1)("startDateAccessibleName",i.startDateAccessibleName)("endDateAccessibleName",i.endDateAccessibleName))},dependencies:[h.sg,ce],encapsulation:2,changeDetection:0}),a})();const $=24;let lt=(()=>{class a{get activeDate(){return this._activeDate}set activeDate(t){let i=this._activeDate;const n=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(n,this.minDate,this.maxDate),ct(this._dateAdapter,i,this._activeDate,this.minDate,this.maxDate)||this._init()}get selected(){return this._selected}set selected(t){this._selected=t instanceof j?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setSelectedYear(t)}
1get minDate(){return this._minDate}set minDate(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}constructor(t,i,n){this._changeDetectorRef=t,this._dateAdapter=i,this._dir=n,this._rerenderSubscription=R.w0.EMPTY,this.selectedChange=new e.EventEmitter,this.yearSelected=new e.EventEmitter,this.activeDateChange=new e.EventEmitter,this._activeDate=this._dateAdapter.today()}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe((0,Pe.O)(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_init(){this._todayYear=this._dateAdapter.getYear(this._dateAdapter.today());const i=this._dateAdapter.getYear(this._activeDate)-he(this._dateAdapter,this.activeDate,this.minDate,this.maxDate);this._years=[];for(let n=0,o=[];n<$;n++)o.push(i+n),4==o.length&&(this._years.push(o.map(s=>this._createCellForYear(s))),o=[]);this._changeDetectorRef.markForCheck()}_yearSelected(t){const i=t.value,n=this._dateAdapter.createDate(i,0,1),o=this._getDateFromYear(i);this.yearSelected.emit(n),this.selectedChange.emit(o)}_updateActiveDate(t){const n=this._activeDate;this.activeDate=this._getDateFromYear(t.value),this._dateAdapter.compareDate(n,this.activeDate)&&this.activeDateChange.emit(this.activeDate)}_handleCalendarBodyKeydown(t){const i=this._activeDate,n=this._isRtl();switch(t.keyCode){case f.oh:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,n?1:-1);break;case f.SV:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,n?-1:1);break;case f.LH:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-4);break;case f.JH:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,4);break;case f.Sd:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-he(this._dateAdapter,this.activeDate,this.minDate,this.maxDate));break;case f.uR:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,$-he(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)-1);break;case f.Ku:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?10*-$:-$);break;case f.VM:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?10*$:$);break;case f.K5:case f.L_:this._selectionKeyPressed=!0;break;default:return}this._dateAdapter.compareDate(i,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCellAfterViewChecked(),t.preventDefault()}_handleCalendarBodyKeyup(t){(t.keyCode===f.L_||t.keyCode===f.K5)&&(this._selectionKeyPressed&&this._yearSelected({value:this._dateAdapter.getYear(this._activeDate),event:t}),this._selectionKeyPressed=!1)}_getActiveCell(){return he(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_focusActiveCellAfterViewChecked(){this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked()}_getDateFromYear(t){const i=this._dateAdapter.getMonth(this.activeDate),n=this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(t,i,1));return this._dateAdapter.createDate(t,i,Math.min(this._dateAdapter.getDate(this.activeDate),n))}_createCellForYear(t){const i=this._dateAdapter.createDate(t,0,1),n=this._dateAdapter.getYearName(i),o=this.dateClass?this.dateClass(i,"multi-year"):void 0;return new Oe(t,n,n,this._shouldEnableYear(t),o)}_shouldEnableYear(t){if(null==t||this.maxDate&&t>this._dateAdapter.getYear(this.maxDate)||this.minDate&&t<this._dateAdapter.getYear(this.minDate))return!1;if(!this.dateFilter)return!0;for(let n=this._dateAdapter.createDate(t,0,1);this._dateAdapter.getYear(n)==t;n=this._dateAdapter.addCalendarDays(n,1))if(this.dateFilter(n))return!0;return!1}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setSelectedYear(t){if(this._selectedYear=null,t instanceof j){const i=t.start||t.end;i&&(this._selectedYear=this._dateAdapter.getYear(i))}else t&&(this._selectedYear=this._dateAdapter.getYear(t))}}return a.\u0275fac=function(t){return new(t||a)(e.\u0275\u0275directiveInject(e.ChangeDetectorRef),e.\u0275\u0275directiveInject(g._A,8),e.\u0275\u0275directiveInject(Se.Is,8))},a.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["mat-multi-year-view"]],viewQuery:function(t,i){if(1&t&&e.\u0275\u0275viewQuery(ce,5),2&t){let n;e.\u0275\u0275queryRefresh(n=e.\u0275\u0275loadQuery())&&(i._matCalendarBody=n.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",activeDateChange:"activeDateChange"},exportAs:["matMultiYearView"],decls:5,vars:7,consts:[["role","grid",1,"mat-calendar-table"],["aria-hidden","true",1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"rows","todayValue","startValue","endValue","numCols","cellAspectRatio","activeCell","selectedValueChange","activeDateChange","keyup","keydown"]],template:function(t,i){1&t&&(e.\u0275\u0275elementStart(0,"table",0)(1,"thead",1)(2,"tr"),e.\u0275\u0275element(3,"th",2),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(4,"tbody",3),e.\u0275\u0275listener("selectedValueChange",function(o){return i._yearSelected(o)})("activeDateChange",function(o){return i._updateActiveDate(o)})("keyup",function(o){return i._handleCalendarBodyKeyup(o)})("keydown",function(o){return i._handleCalendarBodyKeydown(o)}),e.\u0275\u0275elementEnd()()),2&t&&(e.\u0275\u0275advance(4),e.\u0275\u0275property("rows",i._years)("todayValue",i._todayYear)("startValue",i._selectedYear)("endValue",i._selectedYear)("numCols",4)("cellAspectRatio",4/7)("activeCell",i._getActiveCell()))},dependencies:[ce],encapsulation:2,changeDetection:0}),a})();function ct(a,r,t,i,n){const o=a.getYear(r),s=a.getYear(t),l=dt(a,i,n);return Math.floor((o-l)/$)===Math.floor((s-l)/$)}function he(a,r,t,i){return function gi(a,r){return(a%r+r)%r}(a.getYear(r)-dt(a,t,i),$)}function dt(a,r,t){let i=0;return t?i=a.getYear(t)-$+1:r&&(i=a.getYear(r)),i}let pt=(()=>{class a{get activeDate(){return this._activeDate}set activeDate(t){let i=this._activeDate;const n=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(n,this.minDate,this.maxDate),this._dateAdapter.getYear(i)!==this._dateAdapter.getYear(this._activeDate)&&this._init()}get selected(){return this._selected}set selected(t){this._selected=t instanceof j?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setSelectedMonth(t)}
1get minDate(){return this._minDate}set minDate(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}constructor(t,i,n,o){this._changeDetectorRef=t,this._dateFormats=i,this._dateAdapter=n,this._dir=o,this._rerenderSubscription=R.w0.EMPTY,this.selectedChange=new e.EventEmitter,this.monthSelected=new e.EventEmitter,this.activeDateChange=new e.EventEmitter,this._activeDate=this._dateAdapter.today()}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe((0,Pe.O)(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_monthSelected(t){const i=t.value,n=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),i,1);this.monthSelected.emit(n);const o=this._getDateFromMonth(i);this.selectedChange.emit(o)}_updateActiveDate(t){const n=this._activeDate;this.activeDate=this._getDateFromMonth(t.value),this._dateAdapter.compareDate(n,this.activeDate)&&this.activeDateChange.emit(this.activeDate)}_handleCalendarBodyKeydown(t){const i=this._activeDate,n=this._isRtl();switch(t.keyCode){case f.oh:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,n?1:-1);break;case f.SV:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,n?-1:1);break;case f.LH:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-4);break;case f.JH:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,4);break;case f.Sd:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-this._dateAdapter.getMonth(this._activeDate));break;case f.uR:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,11-this._dateAdapter.getMonth(this._activeDate));break;case f.Ku:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?-10:-1);break;case f.VM:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?10:1);break;case f.K5:case f.L_:this._selectionKeyPressed=!0;break;default:return}this._dateAdapter.compareDate(i,this.activeDate)&&(this.activeDateChange.emit(this.activeDate),this._focusActiveCellAfterViewChecked()),t.preventDefault()}_handleCalendarBodyKeyup(t){(t.keyCode===f.L_||t.keyCode===f.K5)&&(this._selectionKeyPressed&&this._monthSelected({value:this._dateAdapter.getMonth(this._activeDate),event:t}),this._selectionKeyPressed=!1)}_init(){this._setSelectedMonth(this.selected),this._todayMonth=this._getMonthInCurrentYear(this._dateAdapter.today()),this._yearLabel=this._dateAdapter.getYearName(this.activeDate);let t=this._dateAdapter.getMonthNames("short");this._months=[[0,1,2,3],[4,5,6,7],[8,9,10,11]].map(i=>i.map(n=>this._createCellForMonth(n,t[n]))),this._changeDetectorRef.markForCheck()}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_focusActiveCellAfterViewChecked(){this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked()}_getMonthInCurrentYear(t){return t&&this._dateAdapter.getYear(t)==this._dateAdapter.getYear(this.activeDate)?this._dateAdapter.getMonth(t):null}_getDateFromMonth(t){const i=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),t,1),n=this._dateAdapter.getNumDaysInMonth(i);return this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),t,Math.min(this._dateAdapter.getDate(this.activeDate),n))}_createCellForMonth(t,i){const n=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),t,1),o=this._dateAdapter.format(n,this._dateFormats.display.monthYearA11yLabel),s=this.dateClass?this.dateClass(n,"year"):void 0;return new Oe(t,i.toLocaleUpperCase(),o,this._shouldEnableMonth(t),s)}_shouldEnableMonth(t){const i=this._dateAdapter.getYear(this.activeDate);if(null==t||this._isYearAndMonthAfterMaxDate(i,t)||this._isYearAndMonthBeforeMinDate(i,t))return!1;if(!this.dateFilter)return!0;for(let o=this._dateAdapter.createDate(i,t,1);this._dateAdapter.getMonth(o)==t;o=this._dateAdapter.addCalendarDays(o,1))if(this.dateFilter(o))return!0;return!1}_isYearAndMonthAfterMaxDate(t,i){if(this.maxDate){const n=this._dateAdapter.getYear(this.maxDate),o=this._dateAdapter.getMonth(this.maxDate);return t>n||t===n&&i>o}return!1}_isYearAndMonthBeforeMinDate(t,i){if(this.minDate){const n=this._dateAdapter.getYear(this.minDate),o=this._dateAdapter.getMonth(this.minDate);return t<n||t===n&&i<o}return!1}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setSelectedMonth(t){this._selectedMonth=t instanceof j?this._getMonthInCurrentYear(t.start)||this._getMonthInCurrentYear(t.end):this._getMonthInCurrentYear(t)}}return a.\u0275fac=function(t){return new(t||a)(e.\u0275\u0275directiveInject(e.ChangeDetectorRef),e.\u0275\u0275directiveInject(g.sG,8),e.\u0275\u0275directiveInject(g._A,8),e.\u0275\u0275directiveInject(Se.Is,8))},a.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["mat-year-view"]],viewQuery:function(t,i){if(1&t&&e.\u0275\u0275viewQuery(ce,5),2&t){let n;e.\u0275\u0275queryRefresh(n=e.\u0275\u0275loadQuery())&&(i._matCalendarBody=n.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",monthSelected:"monthSelected",activeDateChange:"activeDateChange"},exportAs:["matYearView"],decls:5,vars:9,consts:[["role","grid",1,"mat-calendar-table"],["aria-hidden","true",1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","labelMinRequiredCells","numCols","cellAspectRatio","activeCell","selectedValueChange","activeDateChange","keyup","keydown"]],template:function(t,i){1&t&&(e.\u0275\u0275elementStart(0,"table",0)(1,"thead",1)(2,"tr"),e.\u0275\u0275element(3,"th",2),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(4,"tbody",3),e.\u0275\u0275listener("selectedValueChange",function(o){return i._monthSelected(o)})("activeDateChange",function(o){return i._updateActiveDate(o)})("keyup",function(o){return i._handleCalendarBodyKeyup(o)})("keydown",function(o){return i._handleCalendarBodyKeydown(o)}),e.\u0275\u0275elementEnd()()),2&t&&(e.\u0275\u0275advance(4),e.\u0275\u0275property("label",i._yearLabel)("rows",i._months)("todayValue",i._todayMonth)("startValue",i._selectedMonth)("endValue",i._selectedMonth)("labelMinRequiredCells",2)("numCols",4)("cellAspectRatio",4/7)("activeCell",i._dateAdapter.getMonth(i.activeDate)))},dependencies:[ce],encapsulation:2,changeDetection:0}),a})(),_i=1,vi=(()=>{class a{constructor(t,i,n,o,s){this._intl=t,this.calendar=i,this._dateAdapter=n,this._dateFormats=o,this._id="mat-calendar-header-"+_i++,this._periodButtonLabelId=`${this._id}-period-label`,this.calendar.stateChanges.subscribe(()=>s.markForCheck())}get periodButtonText(){return"month"==this.calendar.currentView?this._dateAdapter.format(this.calendar.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase():"year"==this.calendar.currentView?this._dateAdapter.getYearName(this.calendar.activeDate):this._intl.formatYearRange(...this._formatMinAndMaxYearLabels())}get periodButtonDescription(){return"month"==this.calendar.currentView?this._dateAdapter.format(this.calendar.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase():"year"==this.calendar.currentView?this._dateAdapter.getYearName(this.calendar.activeDate):this._intl.formatYearRangeLabel(...this._formatMinAndMaxYearLabels())}get periodButtonLabel(){return"month"==this.calendar.currentView?this._intl.switchToMultiYearViewLabel:this._intl.switchToMonthViewLabel}get prevButtonLabel(){return{month:this._intl.prevMonthLabel,year:this._intl.prevYearLabel,"multi-year":this._intl.prevMultiYearLabel}[this.calendar.currentView]}get nextButtonLabel(){return{month:this._intl.nextMonthLabel,year:this._intl.nextYearLabel,"multi-year":this._intl.nextMultiYearLabel}[this.calendar.currentView]}currentPeriodClicked(){this.calendar.currentView="month"==this.calendar.currentView?"multi-year":"month"}previousClicked(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,-1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?-1:-$)}nextClicked(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?1:$)}previousEnabled(){return!this.calendar.minDate||!this.calendar.minDate||!this._isSameView(this.calendar.activeDate,this.calendar.minDate)}nextEnabled(){return!this.calendar.maxDate||!this._isSameView(this.calendar.activeDate,this.calendar.maxDate)}_isSameView(t,i){return"month"==this.calendar.currentView?this._dateAdapter.getYear(t)==this._dateAdapter.getYear(i)&&this._dateAdapter.getMonth(t)==this._dateAdapter.getMonth(i):"year"==this.calendar.currentView?this._dateAdapter.getYear(t)==this._dateAdapter.getYear(i):ct(this._dateAdapter,t,i,this.calendar.minDate,this.calendar.maxDate)}_formatMinAndMaxYearLabels(){const i=this._dateAdapter.getYear(this.calendar.activeDate)-he(this._dateAdapter,this.calendar.activeDate,this.calendar.minDate,this.calendar.maxDate),n=i+$-1;return[this._dateAdapter.getYearName(this._dateAdapter.createDate(i,0,1)),this._dateAdapter.getYearName(this._dateAdapter.createDate(n,0,1))]}}return a.\u0275fac=function(t){return new(t||a)(e.\u0275\u0275directiveInject(Ce),e.\u0275\u0275directiveInject((0,e.forwardRef)(()=>Ye)),e.\u0275\u0275directiveInject(g._A,8),e.\u0275\u0275directiveInject(g.sG,8),e.\u0275\u0275directiveInject(e.ChangeDetectorRef))},a.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["mat-calendar-header"]],exportAs:["matCalendarHeader"],ngContentSelectors:ni,decls:13,vars:11,consts:[[1,"mat-calendar-header"],[1,"mat-calendar-control
1s"],["mat-button","","type","button","aria-live","polite",1,"mat-calendar-period-button",3,"click"],["aria-hidden","true"],["viewBox","0 0 10 5","focusable","false","aria-hidden","true",1,"mat-calendar-arrow"],["points","0,0 5,5 10,0"],[1,"mat-calendar-spacer"],["mat-icon-button","","type","button",1,"mat-calendar-previous-button",3,"disabled","click"],["mat-icon-button","","type","button",1,"mat-calendar-next-button",3,"disabled","click"],[1,"mat-calendar-hidden-label",3,"id"]],template:function(t,i){1&t&&(e.\u0275\u0275projectionDef(),e.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"button",2),e.\u0275\u0275listener("click",function(){return i.currentPeriodClicked()}),e.\u0275\u0275elementStart(3,"span",3),e.\u0275\u0275text(4),e.\u0275\u0275elementEnd(),e.\u0275\u0275namespaceSVG(),e.\u0275\u0275elementStart(5,"svg",4),e.\u0275\u0275element(6,"polygon",5),e.\u0275\u0275elementEnd()(),e.\u0275\u0275namespaceHTML(),e.\u0275\u0275element(7,"div",6),e.\u0275\u0275projection(8),e.\u0275\u0275elementStart(9,"button",7),e.\u0275\u0275listener("click",function(){return i.previousClicked()}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(10,"button",8),e.\u0275\u0275listener("click",function(){return i.nextClicked()}),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(11,"label",9),e.\u0275\u0275text(12),e.\u0275\u0275elementEnd()),2&t&&(e.\u0275\u0275advance(2),e.\u0275\u0275attribute("aria-label",i.periodButtonLabel)("aria-describedby",i._periodButtonLabelId),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(i.periodButtonText),e.\u0275\u0275advance(1),e.\u0275\u0275classProp("mat-calendar-invert","month"!==i.calendar.currentView),e.\u0275\u0275advance(4),e.\u0275\u0275property("disabled",!i.previousEnabled()),e.\u0275\u0275attribute("aria-label",i.prevButtonLabel),e.\u0275\u0275advance(1),e.\u0275\u0275property("disabled",!i.nextEnabled()),e.\u0275\u0275attribute("aria-label",i.nextButtonLabel),e.\u0275\u0275advance(1),e.\u0275\u0275property("id",i._periodButtonLabelId),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(i.periodButtonDescription))},dependencies:[nt,Bt],encapsulation:2,changeDetection:0}),a})(),Ye=(()=>{class a{get startAt(){return this._startAt}set startAt(t){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get selected(){return this._selected}set selected(t){this._selected=t instanceof j?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get minDate(){return this._minDate}set minDate(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get activeDate(){return this._clampedActiveDate}set activeDate(t){this._clampedActiveDate=this._dateAdapter.clampDate(t,this.minDate,this.maxDate),this.stateChanges.next(),this._changeDetectorRef.markForCheck()}get currentView(){return this._currentView}set currentView(t){const i=this._currentView!==t?t:null;this._currentView=t,this._moveFocusOnNextTick=!0,this._changeDetectorRef.markForCheck(),i&&this.viewChanged.emit(i)}constructor(t,i,n,o){this._dateAdapter=i,this._dateFormats=n,this._changeDetectorRef=o,this._moveFocusOnNextTick=!1,this.startView="month",this.selectedChange=new e.EventEmitter,this.yearSelected=new e.EventEmitter,this.monthSelected=new e.EventEmitter,this.viewChanged=new e.EventEmitter(!0),this._userSelection=new e.EventEmitter,this._userDragDrop=new e.EventEmitter,this._activeDrag=null,this.stateChanges=new L.x,this._intlChanges=t.changes.subscribe(()=>{o.markForCheck(),this.stateChanges.next()})}ngAfterContentInit(){this._calendarHeaderPortal=new V.C5(this.headerComponent||vi),this.activeDate=this.startAt||this._dateAdapter.today(),this._currentView=this.startView}ngAfterViewChecked(){this._moveFocusOnNextTick&&(this._moveFocusOnNextTick=!1,this.focusActiveCell())}ngOnDestroy(){this._intlChanges.unsubscribe(),this.stateChanges.complete()}ngOnChanges(t){const i=t.minDate&&!this._dateAdapter.sameDate(t.minDate.previousValue,t.minDate.currentValue)?t.minDate:void 0,n=t.maxDate&&!this._dateAdapter.sameDate(t.maxDate.previousValue,t.maxDate.currentValue)?t.maxDate:void 0,o=i||n||t.dateFilter;if(o&&!o.firstChange){const s=this._getCurrentViewComponent();s&&(this._changeDetectorRef.detectChanges(),s._init())}this.stateChanges.next()}focusActiveCell(){this._getCurrentViewComponent()._focusActiveCell(!1)}updateTodaysDate(){this._getCurrentViewComponent()._init()}_dateSelected(t){const i=t.value;(this.selected instanceof j||i&&!this._dateAdapter.sameDate(i,this.selected))&&this.selectedChange.emit(i),this._userSelection.emit(t)}_yearSelectedInMultiYearView(t){this.yearSelected.emit(t)}_monthSelectedInYearView(t){this.monthSelected.emit(t)}_goToDateInView(t,i){this.activeDate=t,this.currentView=i}_dragStarted(t){this._activeDrag=t}_dragEnded(t){this._activeDrag&&(t.value&&this._userDragDrop.emit(t),this._activeDrag=null)}_getCurrentViewComponent(){return this.monthView||this.yearView||this.multiYearView}}return a.\u0275fac=function(t){return new(t||a)(e.\u0275\u0275directiveInject(Ce),e.\u0275\u0275directiveInject(g._A,8),e.\u0275\u0275directiveInject(g.sG,8),e.\u0275\u0275directiveInject(e.ChangeDetectorRef))},a.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["mat-calendar"]],viewQuery:function(t,i){if(1&t&&(e.\u0275\u0275viewQuery(st,5),e.\u0275\u0275viewQuery(pt,5),e.\u0275\u0275viewQuery(lt,5)),2&t){let n;e.\u0275\u0275queryRefresh(n=e.\u0275\u0275loadQuery())&&(i.monthView=n.first),e.\u0275\u0275queryRefresh(n=e.\u0275\u0275loadQuery())&&(i.yearView=n.first),e.\u0275\u0275queryRefresh(n=e.\u0275\u0275loadQuery())&&(i.multiYearView=n.first)}},hostAttrs:[1,"mat-calendar"],inputs:{headerComponent:"headerComponent",startAt:"startAt",startView:"startView",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",_userSelection:"_userSelection",_userDragDrop:"_userDragDrop"},exportAs:["matCalendar"],features:[e.\u0275\u0275ProvidersFeature([ot]),e.\u0275\u0275NgOnChangesFeature],decls:5,vars:5,consts:[[3,"cdkPortalOutlet"],["cdkMonitorSubtreeFocus","","tabindex","-1",1,"mat-calendar-content",3,"ngSwitch"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","startDateAccessibleName","endDateAccessibleName","activeDrag","activeDateChange","_userSelection","dragStarted","dragEnded",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","monthSelected","selectedChange",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","yearSelected","selectedChange",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","startDateAccessibleName","endDateAccessibleName","activeDrag","activeDateChange","_userSelection","dragStarted","dragEnded"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","monthSelected","selectedChange"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","yearSelected","selectedChange"]],template:function(t,i){1&t&&(e.\u0275\u0275template(0,ai,0,0,"ng-template",0),e.\u0275\u0275elementStart(1,"div",1),e.\u0275\u0275template(2,ri,1,11,"mat-month-view",2),e.\u0275\u0275template(3,oi,1,6,"mat-year-view",3),e.\u0275\u0275template(4,si,1,6,"mat-multi-year-view",4),e.\u0275\u0275elementEnd()),2&t&&(e.\u0275\u0275property("cdkPortalOutlet",i._calendarHeaderPortal),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngSwitch",i.currentView),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngSwitchCase","month"),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngSwitchCase","year"),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngSwitchCase","multi-year"))},dependencies:[h.RF,h.n9,w.kH,V.Pl,st,pt,lt],styles:['.mat-calendar{display:block}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}
1.mat-calendar-controls{display:flex;align-items:center;margin:5% calc(4.7142857143% - 16px)}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0;margin:0 8px}.mat-calendar-arrow{display:inline-block;width:10px;height:5px;margin:0 0 0 5px;vertical-align:middle}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.cdk-high-contrast-active .mat-calendar-arrow{fill:CanvasText}.mat-calendar-previous-button,.mat-calendar-next-button{position:relative}.mat-calendar-previous-button::after,.mat-calendar-next-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:"";margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:"";position:absolute;top:0;left:-8px;right:-8px;height:1px}.mat-calendar-body-cell-content::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px) * -1)}.mat-calendar-body-cell:focus .mat-focus-indicator::before{content:""}.mat-calendar-hidden-label{display:none}'],encapsulation:2,changeDetection:0}),a})();const mt={transformPanel:(0,M.X$)("transformPanel",[(0,M.eR)("void => enter-dropdown",(0,M.jt)("120ms cubic-bezier(0, 0, 0.2, 1)",(0,M.F4)([(0,M.oB)({opacity:0,transform:"scale(1, 0.8)"}),(0,M.oB)({opacity:1,transform:"scale(1, 1)"})]))),(0,M.eR)("void => enter-dialog",(0,M.jt)("150ms cubic-bezier(0, 0, 0.2, 1)",(0,M.F4)([(0,M.oB)({opacity:0,transform:"scale(0.7)"}),(0,M.oB)({transform:"none",opacity:1})]))),(0,M.eR)("* => void",(0,M.jt)("100ms linear",(0,M.oB)({opacity:0})))]),fadeInCalendar:(0,M.X$)("fadeInCalendar",[(0,M.SB)("void",(0,M.oB)({opacity:0})),(0,M.SB)("enter",(0,M.oB)({opacity:1})),(0,M.eR)("void => *",(0,M.jt)("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])};let bi=0;const ut=new e.InjectionToken("mat-datepicker-scroll-strategy"),yi={provide:ut,deps:[E.aV],useFactory:function xi(a){return()=>a.scrollStrategies.reposition()}},Si=(0,g.pj)(class{constructor(a){this._elementRef=a}});let Ci=(()=>{class a extends Si{constructor(t,i,n,o,s,l){super(t),this._changeDetectorRef=i,this._globalModel=n,this._dateAdapter=o,this._rangeSelectionStrategy=s,this._subscriptions=new R.w0,this._animationDone=new L.x,this._isAnimating=!1,this._actionsPortal=null,this._closeButtonText=l.closeCalendarLabel}ngOnInit(){this._animationState=this.datepicker.touchUi?"enter-dialog":"enter-dropdown"}ngAfterViewInit(){this._subscriptions.add(this.datepicker.stateChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})),this._calendar.focusActiveCell()}ngOnDestroy(){this._subscriptions.unsubscribe(),this._animationDone.complete()}_handleUserSelection(t){const i=this._model.selection,n=t.value,o=i instanceof j;if(o&&this._rangeSelectionStrategy){const s=this._rangeSelectionStrategy.selectionFinished(n,i,t.event);this._model.updateSelection(s,this)}else n&&(o||!this._dateAdapter.sameDate(n,i))&&this._model.add(n);(!this._model||this._model.isComplete())&&!this._actionsPortal&&this.datepicker.close()}_handleUserDragDrop(t){this._model.updateSelection(t.value,this)}_startExitAnimation(){this._animationState="void",this._changeDetectorRef.markForCheck()}_handleAnimationEvent(t){this._isAnimating="start"===t.phaseName,this._isAnimating||this._animationDone.next()}_getSelected(){return this._model.selection}_applyPendingSelection(){this._model!==this._globalModel&&this._globalModel.updateSelection(this._model.selection,this)}_assignActions(t,i){this._model=t?this._globalModel.clone():this._globalModel,this._actionsPortal=t,i&&this._changeDetectorRef.detectChanges()}}return a.\u0275fac=function(t){return new(t||a)(e.\u0275\u0275directiveInject(e.ElementRef),e.\u0275\u0275directiveInject(e.ChangeDetectorRef),e.\u0275\u0275directiveInject(J),e.\u0275\u0275directiveInject(g._A),e.\u0275\u0275directiveInject(De,8),e.\u0275\u0275directiveInject(Ce))},a.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["mat-datepicker-content"]],viewQuery:function(t,i){if(1&t&&e.\u0275\u0275viewQuery(Ye,5),2&t){let n;e.\u0275\u0275queryRefresh(n=e.\u0275\u0275loadQuery())&&(i._calendar=n.first)}},hostAttrs:[1,"mat-datepicker-content"],hostVars:3,hostBindings:function(t,i){1&t&&e.\u0275\u0275syntheticHostListener("@transformPanel.start",function(o){return i._handleAnimationEvent(o)})("@transformPanel.done",function(o){return i._handleAnimationEvent(o)}),2&t&&(e.\u0275\u0275syntheticHostProperty("@transformPanel",i._animationState),e.\u0275\u0275classProp("mat-datepicker-content-touch",i.datepicker.touchUi))},inputs:{color:"color"},exportAs:["matDatepickerContent"],features:[e.\u0275\u0275InheritDefinitionFeature],decls:5,vars:26,consts:[["cdkTrapFocus","","role","dialog",1,"mat-datepicker-content-container"],[3,"id","ngClass","startAt","startView","minDate","maxDate","dateFilter","headerComponent","selected","dateClass","comparisonStart","comparisonEnd","startDateAccessibleName","endDateAccessibleName","yearSelected","monthSelected","viewChanged","_userSelection","_userDragDrop"],[3,"cdkPortalOutlet"],["type","button","mat-raised-button","",1,"mat-datepicker-close-button",3,"color","focus","blur","click"]],template:function(t,i){if(1&t&&(e.\u0275\u0275elementStart(0,"div",0)(1,"mat-calendar",1),e.\u0275\u0275listener("yearSelected",function(o){return i.datepicker._selectYear(o)})("monthSelected",function(o){return i.datepicker._selectMonth(o)})("viewChanged",function(o){return i.datepicker._viewChanged(o)})("_userSelection",function(o){return i._handleUserSelection(o)})("_userDragDrop",function(o){return i._handleUserDragDrop(o)}),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(2,li,0,0,"ng-template",2),e.\u0275\u0275elementStart(3,"button",3),e.\u0275\u0275listener("focus",function(){return i._closeButtonF
1ocused=!0})("blur",function(){return i._closeButtonFocused=!1})("click",function(){return i.datepicker.close()}),e.\u0275\u0275text(4),e.\u0275\u0275elementEnd()()),2&t){let n;e.\u0275\u0275classProp("mat-datepicker-content-container-with-custom-header",i.datepicker.calendarHeaderComponent)("mat-datepicker-content-container-with-actions",i._actionsPortal),e.\u0275\u0275attribute("aria-modal",!0)("aria-labelledby",null!==(n=i._dialogLabelId)&&void 0!==n?n:void 0),e.\u0275\u0275advance(1),e.\u0275\u0275property("id",i.datepicker.id)("ngClass",i.datepicker.panelClass)("startAt",i.datepicker.startAt)("startView",i.datepicker.startView)("minDate",i.datepicker._getMinDate())("maxDate",i.datepicker._getMaxDate())("dateFilter",i.datepicker._getDateFilter())("headerComponent",i.datepicker.calendarHeaderComponent)("selected",i._getSelected())("dateClass",i.datepicker.dateClass)("comparisonStart",i.comparisonStart)("comparisonEnd",i.comparisonEnd)("@fadeInCalendar","enter")("startDateAccessibleName",i.startDateAccessibleName)("endDateAccessibleName",i.endDateAccessibleName),e.\u0275\u0275advance(1),e.\u0275\u0275property("cdkPortalOutlet",i._actionsPortal),e.\u0275\u0275advance(1),e.\u0275\u0275classProp("cdk-visually-hidden",!i._closeButtonFocused),e.\u0275\u0275property("color",i.color||"primary"),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(i._closeButtonText)}},dependencies:[h.mk,nt,w.mK,V.Pl,Ye],styles:[".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-content-container-with-custom-header .mat-calendar{height:auto}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.ng-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.mat-datepicker-content-touch{display:block;max-height:80vh;position:relative;overflow:visible}.mat-datepicker-content-touch .mat-datepicker-content-container{min-height:312px;max-height:788px;min-width:250px;max-width:750px}.mat-datepicker-content-touch .mat-calendar{width:100%;height:auto}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-datepicker-content-container{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-datepicker-content-container{width:80vw;height:100vw}.mat-datepicker-content-touch .mat-datepicker-content-container-with-actions{height:115vw}}"],encapsulation:2,data:{animation:[mt.transformPanel,mt.fadeInCalendar]},changeDetection:0}),a})(),ht=(()=>{class a{get startAt(){return this._startAt||(this.datepickerInput?this.datepickerInput.getStartValue():null)}set startAt(t){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get color(){return this._color||(this.datepickerInput?this.datepickerInput.getThemePalette():void 0)}set color(t){this._color=t}get touchUi(){return this._touchUi}set touchUi(t){this._touchUi=(0,q.Ig)(t)}get disabled(){return void 0===this._disabled&&this.datepickerInput?this.datepickerInput.disabled:!!this._disabled}set disabled(t){const i=(0,q.Ig)(t);i!==this._disabled&&(this._disabled=i,this.stateChanges.next(void 0))}get restoreFocus(){return this._restoreFocus}set restoreFocus(t){this._restoreFocus=(0,q.Ig)(t)}get panelClass(){return this._panelClass}set panelClass(t){this._panelClass=(0,q.du)(t)}get opened(){return this._opened}set opened(t){(0,q.Ig)(t)?this.open():this.close()}_getMinDate(){return this.datepickerInput&&this.datepickerInput.min}_getMaxDate(){return this.datepickerInput&&this.datepickerInput.max}_getDateFilter(){return this.datepickerInput&&this.datepickerInput.dateFilter}constructor(t,i,n,o,s,l,p){this._overlay=t,this._ngZone=i,this._viewContainerRef=n,this._dateAdapter=s,this._dir=l,this._model=p,this._inputStateChanges=R.w0.EMPTY,this._document=(0,e.inject)(h.K0),this.startView="month",this._touchUi=!1,this.xPosition="start",this.yPosition="below",this._restoreFocus=!0,this.yearSelected=new e.EventEmitter,this.monthSelected=new e.EventEmitter,this.viewChanged=new e.EventEmitter(!0),this.openedStream
1=new e.EventEmitter,this.closedStream=new e.EventEmitter,this._opened=!1,this.id="mat-datepicker-"+bi++,this._focusedElementBeforeOpen=null,this._backdropHarnessClass=`${this.id}-backdrop`,this.stateChanges=new L.x,this._scrollStrategy=o}ngOnChanges(t){const i=t.xPosition||t.yPosition;if(i&&!i.firstChange&&this._overlayRef){const n=this._overlayRef.getConfig().positionStrategy;n instanceof E._G&&(this._setConnectedPositions(n),this.opened&&this._overlayRef.updatePosition())}this.stateChanges.next(void 0)}ngOnDestroy(){this._destroyOverlay(),this.close(),this._inputStateChanges.unsubscribe(),this.stateChanges.complete()}select(t){this._model.add(t)}_selectYear(t){this.yearSelected.emit(t)}_selectMonth(t){this.monthSelected.emit(t)}_viewChanged(t){this.viewChanged.emit(t)}registerInput(t){return this._inputStateChanges.unsubscribe(),this.datepickerInput=t,this._inputStateChanges=t.stateChanges.subscribe(()=>this.stateChanges.next(void 0)),this._model}registerActions(t){this._actionsPortal=t,this._componentRef?.instance._assignActions(t,!0)}removeActions(t){t===this._actionsPortal&&(this._actionsPortal=null,this._componentRef?.instance._assignActions(null,!0))}open(){this._opened||this.disabled||this._componentRef?.instance._isAnimating||(this._focusedElementBeforeOpen=(0,O.ht)(),this._openOverlay(),this._opened=!0,this.openedStream.emit())}close(){if(!this._opened||this._componentRef?.instance._isAnimating)return;const t=this._restoreFocus&&this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus,i=()=>{this._opened&&(this._opened=!1,this.closedStream.emit())};if(this._componentRef){const{instance:n,location:o}=this._componentRef;n._startExitAnimation(),n._animationDone.pipe((0,Re.q)(1)).subscribe(()=>{const s=this._document.activeElement;t&&(!s||s===this._document.activeElement||o.nativeElement.contains(s))&&this._focusedElementBeforeOpen.focus(),this._focusedElementBeforeOpen=null,this._destroyOverlay()})}t?setTimeout(i):i()}_applyPendingSelection(){this._componentRef?.instance?._applyPendingSelection()}_forwardContentValues(t){t.datepicker=this,t.color=this.color,t._dialogLabelId=this.datepickerInput.getOverlayLabelId(),t._assignActions(this._actionsPortal,!1)}_openOverlay(){this._destroyOverlay();const t=this.touchUi,i=new V.C5(Ci,this._viewContainerRef),n=this._overlayRef=this._overlay.create(new E.X_({positionStrategy:t?this._getDialogStrategy():this._getDropdownStrategy(),hasBackdrop:!0,backdropClass:[t?"cdk-overlay-dark-backdrop":"mat-overlay-transparent-backdrop",this._backdropHarnessClass],direction:this._dir,scrollStrategy:t?this._overlay.scrollStrategies.block():this._scrollStrategy(),panelClass:"mat-datepicker-"+(t?"dialog":"popup")}));this._getCloseStream(n).subscribe(o=>{o&&o.preventDefault(),this.close()}),n.keydownEvents().subscribe(o=>{const s=o.keyCode;(s===f.LH||s===f.JH||s===f.oh||s===f.SV||s===f.Ku||s===f.VM)&&o.preventDefault()}),this._componentRef=n.attach(i),this._forwardContentValues(this._componentRef.instance),t||this._ngZone.onStable.pipe((0,Re.q)(1)).subscribe(()=>n.updatePosition())}_destroyOverlay(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=this._componentRef=null)}_getDialogStrategy(){return this._overlay.position().global().centerHorizontally().centerVertically()}_getDropdownStrategy(){const t=this._overlay.position().flexibleConnectedTo(this.datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition();return this._setConnectedPositions(t)}_setConnectedPositions(t){const i="end"===this.xPosition?"end":"start",n="start"===i?"end":"start",o="above"===this.yPosition?"bottom":"top",s="top"===o?"bottom":"top";return t.withPositions([{originX:i,originY:s,overlayX:i,overlayY:o},{originX:i,originY:o,overlayX:i,overlayY:s},{originX:n,originY:s,overlayX:n,overlayY:o},{originX:n,originY:o,overlayX:n,overlayY:s}])}_getCloseStream(t){const i=["ctrlKey","shiftKey","metaKey"];return(0,zt.T)(t.backdropClick(),t.detachments(),t.keydownEvents().pipe((0,Ut.h)(n=>n.keyCode===f.hY&&!(0,f.Vb)(n)||this.datepickerInput&&(0,f.Vb)(n,"altKey")&&n.keyCode===f.LH&&i.every(o=>!(0,f.Vb)(n,o)))))}}return a.\u0275fac=function(t){return new(t||a)(e.\u0275\u0275directiveInject(E.aV),e.\u0275\u0275directiveInject(e.NgZone),e.\u0275\u0275directiveInject(e.ViewContainerRef),e.\u0275\u0275directiveInject(ut),e.\u0275\u0275directiveInject(g._A,8),e.\u0275\u0275directiveInject(Se.Is,8),e.\u0275\u0275directiveInject(J))},a.\u0275dir=e.\u0275\u0275defineDirective({type:a,inputs:{calendarHeaderComponent:"
1calendarHeaderComponent",startAt:"startAt",startView:"startView",color:"color",touchUi:"touchUi",disabled:"disabled",xPosition:"xPosition",yPosition:"yPosition",restoreFocus:"restoreFocus",dateClass:"dateClass",panelClass:"panelClass",opened:"opened"},outputs:{yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",openedStream:"opened",closedStream:"closed"},features:[e.\u0275\u0275NgOnChangesFeature]}),a})(),ft=(()=>{class a extends ht{}return a.\u0275fac=function(){let r;return function(i){return(r||(r=e.\u0275\u0275getInheritedFactory(a)))(i||a)}}(),a.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["mat-datepicker"]],exportAs:["matDatepicker"],features:[e.\u0275\u0275ProvidersFeature([ot,{provide:ht,useExisting:a}]),e.\u0275\u0275InheritDefinitionFeature],decls:0,vars:0,template:function(t,i){},encapsulation:2,changeDetection:0}),a})();class we{constructor(r,t){this.target=r,this.targetElement=t,this.value=this.target.value}}let Di=(()=>{class a{get value(){return this._model?this._getValueFromModel(this._model.selection):this._pendingValue}set value(t){this._assignValueProgrammatically(t)}get disabled(){return!!this._disabled||this._parentDisabled()}set disabled(t){const i=(0,q.Ig)(t),n=this._elementRef.nativeElement;this._disabled!==i&&(this._disabled=i,this.stateChanges.next(void 0)),i&&this._isInitialized&&n.blur&&n.blur()}_getValidators(){return[this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]}_registerModel(t){this._model=t,this._valueChangesSubscription.unsubscribe(),this._pendingValue&&this._assignValue(this._pendingValue),this._valueChangesSubscription=this._model.selectionChanged.subscribe(i=>{if(this._shouldHandleChangeEvent(i)){const n=this._getValueFromModel(i.selection);this._lastValueValid=this._isValidValue(n),this._cvaOnChange(n),this._onTouched(),this._formatValue(n),this.dateInput.emit(new we(this,this._elementRef.nativeElement)),this.dateChange.emit(new we(this,this._elementRef.nativeElement))}})}constructor(t,i,n){this._elementRef=t,this._dateAdapter=i,this._dateFormats=n,this.dateChange=new e.EventEmitter,this.dateInput=new e.EventEmitter,this.stateChanges=new L.x,this._onTouched=()=>{},this._validatorOnChange=()=>{},this._cvaOnChange=()=>{},this._valueChangesSubscription=R.w0.EMPTY,this._localeSubscription=R.w0.EMPTY,this._parseValidator=()=>this._lastValueValid?null:{matDatepickerParse:{text:this._elementRef.nativeElement.value}},this._filterValidator=o=>{const s=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(o.value));return!s||this._matchesFilter(s)?null:{matDatepickerFilter:!0}},this._minValidator=o=>{const s=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(o.value)),l=this._getMinDate();return!l||!s||this._dateAdapter.compareDate(l,s)<=0?null:{matDatepickerMin:{min:l,actual:s}}},this._maxValidator=o=>{const s=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(o.value)),l=this._getMaxDate();return!l||!s||this._dateAdapter.compareDate(l,s)>=0?null:{matDatepickerMax:{max:l,actual:s}}},this._lastValueValid=!1,this._localeSubscription=i.localeChanges.subscribe(()=>{this._assignValueProgrammatically(this.value)})}ngAfterViewInit(){this._isInitialized=!0}ngOnChanges(t){(function wi(a,r){const t=Object.keys(a);for(let i of t){const{previousValue:n,currentValue:o}=a[i];if(!r.isDateInstance(n)||!r.isDateInstance(o))return!0;if(!r.sameDate(n,o))return!0}return!1})(t,this._dateAdapter)&&this.stateChanges.next(void 0)}ngOnDestroy(){this._valueChangesSubscription.unsubscribe(),this._localeSubscription.unsubscribe(),this.stateChanges.complete()}registerOnValidatorChange(t){this._validatorOnChange=t}validate(t){return this._validator?this._validator(t):null}writeValue(t){this._assignValueProgrammatically(t)}registerOnChange(t){this._cvaOnChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_onKeydown(t){(0,f.Vb)(t,"altKey")&&t.keyCode===f.JH&&["ctrlKey","shiftKey","metaKey"].every(o=>!(0,f.Vb)(t,o))&&!this._elementRef.nativeElement.readOnly&&(this._openPopup(),t.preventDefault())}_onInput(t){const i=this._lastValueValid;let n=this._dateAdapter.parse(t,this._dateFormats.parse.dateInput);this._lastValueValid=this._isValidValue(n),n=this._dateAdapter.getValidDateOrNull(n);const o=!this._dateAdapter.sameDate(n,this.value);!n||o?this._cvaOnChange(n):(t&&!this.value&&this._cvaOnChange(n),i!==this._lastValueValid&&this._val
1idatorOnChange()),o&&(this._assignValue(n),this.dateInput.emit(new we(this,this._elementRef.nativeElement)))}_onChange(){this.dateChange.emit(new we(this,this._elementRef.nativeElement))}_onBlur(){this.value&&this._formatValue(this.value),this._onTouched()}_formatValue(t){this._elementRef.nativeElement.value=null!=t?this._dateAdapter.format(t,this._dateFormats.display.dateInput):""}_assignValue(t){this._model?(this._assignValueToModel(t),this._pendingValue=null):this._pendingValue=t}_isValidValue(t){return!t||this._dateAdapter.isValid(t)}_parentDisabled(){return!1}_assignValueProgrammatically(t){t=this._dateAdapter.deserialize(t),this._lastValueValid=this._isValidValue(t),t=this._dateAdapter.getValidDateOrNull(t),this._assignValue(t),this._formatValue(t)}_matchesFilter(t){const i=this._getDateFilter();return!i||i(t)}}return a.\u0275fac=function(t){return new(t||a)(e.\u0275\u0275directiveInject(e.ElementRef),e.\u0275\u0275directiveInject(g._A,8),e.\u0275\u0275directiveInject(g.sG,8))},a.\u0275dir=e.\u0275\u0275defineDirective({type:a,inputs:{value:"value",disabled:"disabled"},outputs:{dateChange:"dateChange",dateInput:"dateInput"},features:[e.\u0275\u0275NgOnChangesFeature]}),a})();const Ei={provide:d.NG_VALUE_ACCESSOR,useExisting:(0,e.forwardRef)(()=>Ee),multi:!0},ki={provide:d.NG_VALIDATORS,useExisting:(0,e.forwardRef)(()=>Ee),multi:!0};let Ee=(()=>{class a extends Di{set matDatepicker(t){t&&(this._datepicker=t,this._closedSubscription=t.closedStream.subscribe(()=>this._onTouched()),this._registerModel(t.registerInput(this)))}get min(){return this._min}set min(t){const i=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t));this._dateAdapter.sameDate(i,this._min)||(this._min=i,this._validatorOnChange())}get max(){return this._max}set max(t){const i=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t));this._dateAdapter.sameDate(i,this._max)||(this._max=i,this._validatorOnChange())}get dateFilter(){return this._dateFilter}set dateFilter(t){const i=this._matchesFilter(this.value);this._dateFilter=t,this._matchesFilter(this.value)!==i&&this._validatorOnChange()}constructor(t,i,n,o){super(t,i,n),this._formField=o,this._closedSubscription=R.w0.EMPTY,this._validator=d.Validators.compose(super._getValidators())}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}getOverlayLabelId(){return this._formField?this._formField.getLabelId():this._elementRef.nativeElement.getAttribute("aria-labelledby")}getThemePalette(){return this._formField?this._formField.color:void 0}getStartValue(){return this.value}ngOnDestroy(){super.ngOnDestroy(),this._closedSubscription.unsubscribe()}_openPopup(){this._datepicker&&this._datepicker.open()}_getValueFromModel(t){return t}_assignValueToModel(t){this._model&&this._model.updateSelection(t,this)}_getMinDate(){return this._min}_getMaxDate(){return this._max}_getDateFilter(){return this._dateFilter}_shouldHandleChangeEvent(t){return t.source!==this}}return a.\u0275fac=function(t){return new(t||a)(e.\u0275\u0275directiveInject(e.ElementRef),e.\u0275\u0275directiveInject(g._A,8),e.\u0275\u0275directiveInject(g.sG,8),e.\u0275\u0275directiveInject(Kt,8))},a.\u0275dir=e.\u0275\u0275defineDirective({type:a,selectors:[["input","matDatepicker",""]],hostAttrs:[1,"mat-datepicker-input"],hostVars:6,hostBindings:function(t,i){1&t&&e.\u0275\u0275listener("input",function(o){return i._onInput(o.target.value)})("change",function(){return i._onChange()})("blur",function(){return i._onBlur()})("keydown",function(o){return i._onKeydown(o)}),2&t&&(e.\u0275\u0275hostProperty("disabled",i.disabled),e.\u0275\u0275attribute("aria-haspopup",i._datepicker?"dialog":null)("aria-owns",(null==i._datepicker?null:i._datepicker.opened)&&i._datepicker.id||null)("min",i.min?i._dateAdapter.toIso8601(i.min):null)("max",i.max?i._dateAdapter.toIso8601(i.max):null)("data-mat-calendar",i._datepicker?i._datepicker.id:null))},inputs:{matDatepicker:"matDatepicker",min:"min",max:"max",dateFilter:["matDatepickerFilter","dateFilter"]},exportAs:["matDatepickerInput"],features:[e.\u0275\u0275ProvidersFeature([Ei,ki,{provide:qt,useExisting:a}]),e.\u0275\u0275InheritDefinitionFeature]}),a})(),_t=(()=>{class a{}return a.\u0275fac=function(t){return new(t||a)},a.\u0275mod=e.\u0275\u0275defineNgModule({type:a}),a.\u0275inj=e.\u0275\u0275defineInjector({providers:[Ce,yi],imports:[h.ez,jt,E.U8,w.rt,V.eL,g.BQ,at.ZD]}),a})(),vt=(()=>{class a{static#e=this.\u0275fac=function(i){return new(i||a)};static#t=this.\u0275mod=e.\u0275\u0275defineNgModule({type:a});static#i=this.\u0275inj=e.\u0275\u0275defineInjector({imports:[h.ez,_t,g.XK,_t,g.XK]})}return a})();var fe=m(5349);let Ii=(()=>{class a{static#e=this.\u0275fac=function(i){return new(i||a)};static#t=this.\u0275mod=e.\u0275\u0275defineNgModule({type:a});static#i=this.\u0275inj=e.\u0275\u0275defineInjector({imports:[fe.m,vt]})}return a})();var He=m(150),ge=m(5185);class Ai{constructor(r,t,i,n,o,s,l,p,c,u,_,x,T){this.firstName=r,this.lastName=t,this.nationality=i,this.country=n,this.ipLocation=o,this.phone=s,this.email=l,this.passportNumber=p,this.profession=c,this.travelDate=u,this.travelPurpose=_,this.visitedUA
1E=x,this.ip=T}}var ne=m(3765),ae=m(9426),bt=m(6135);const We=["*"],xt=function(a,r,t,i,n,o,s){return{vertical:a,horizontal:r,small:t,"large-filled":i,"large-filled-symbols":n,"large-empty":o,"large-empty-symbols":s}};function Ti(a,r){if(1&a&&e.\u0275\u0275element(0,"aw-wizard-navigation-bar",2),2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275property("direction",t.navBarDirection)("ngClass",e.\u0275\u0275pureFunction7(2,xt,"left"==t.navBarLocation,"top"==t.navBarLocation,"small"==t.navBarLayout,"large-filled"==t.navBarLayout,"large-filled-symbols"==t.navBarLayout,"large-empty"==t.navBarLayout,"large-empty-symbols"==t.navBarLayout))}}function Ri(a,r){if(1&a&&e.\u0275\u0275element(0,"aw-wizard-navigation-bar",2),2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275property("direction",t.navBarDirection)("ngClass",e.\u0275\u0275pureFunction7(2,xt,"right"==t.navBarLocation,"bottom"==t.navBarLocation,"small"==t.navBarLayout,"large-filled"==t.navBarLayout,"large-filled-symbols"==t.navBarLayout,"large-empty"==t.navBarLayout,"large-empty-symbols"==t.navBarLayout))}}const Pi=function(a,r){return{"wizard-steps":!0,vertical:a,horizontal:r}};function Oi(a,r){if(1&a&&e.\u0275\u0275elementContainer(0,7),2&a){const t=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275property("ngTemplateOutlet",t.stepTitleTemplate.templateRef)}}function Vi(a,r){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275text(1),e.\u0275\u0275elementContainerEnd()),2&a){const t=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(t.stepTitle)}}function Ni(a,r){if(1&a&&e.\u0275\u0275elementContainer(0,7),2&a){const t=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275property("ngTemplateOutlet",t.stepSymbolTemplate.templateRef)}}function Li(a,r){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275text(1),e.\u0275\u0275elementContainerEnd()),2&a){const t=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(t.navigationSymbol.symbol)}}const Bi=function(a,r,t,i,n,o){return{current:a,editing:r,done:t,optional:i,completed:n,navigable:o}},ji=function(a){return{"font-family":a}};function zi(a,r){if(1&a&&(e.\u0275\u0275elementStart(0,"li",1)(1,"a",2)(2,"div",3),e.\u0275\u0275template(3,Oi,1,1,"ng-container",4),e.\u0275\u0275template(4,Vi,2,1,"ng-container",5),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"div",6),e.\u0275\u0275template(6,Ni,1,1,"ng-container",4),e.\u0275\u0275template(7,Li,2,1,"ng-container",5),e.\u0275\u0275elementEnd()()()),2&a){const t=r.$implicit,i=e.\u0275\u0275nextContext();e.\u0275\u0275property("ngClass",e.\u0275\u0275pureFunction6(8,Bi,i.isCurrent(t),i.isEditing(t),i.isDone(t),i.isOptional(t),i.isCompleted(t),i.isNavigable(t))),e.\u0275\u0275attribute("id",t.stepId),e.\u0275\u0275advance(1),e.\u0275\u0275property("awGoToStep",t),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",t.stepTitleTemplate),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!t.stepTitleTemplate),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngStyle",e.\u0275\u0275pureFunction1(15,ji,t.stepSymbolTemplate?"":t.navigationSymbol.fontFamily)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",t.stepSymbolTemplate),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!t.stepSymbolTemplate)}}let Ui=(()=>{class a{constructor(t){this.templateRef=t}}return a.\u0275fac=function(t){return new(t||a)(e.\u0275\u0275directiveInject(e.TemplateRef))},a.\u0275dir=e.\u0275\u0275defineDirective({type:a,selectors:[["ng-template","awStepSymbol",""],["ng-template","awWizardStepSymbol",""]]}),a})(),Yi=(()=>{class a{constructor(t){this.templateRef=t}}return a.\u0275fac=function(t){return new(t||a)(e.\u0275\u0275directiveInject(e.TemplateRef))},a.\u0275dir=e.\u0275\u0275defineDirective({type:a,selectors:[["ng-template","awStepTitle",""],["ng-template","awWizardStepTitle",""]]}),a})(),Y=(()=>{class a{constructor(){this.navigationSymbol={symbol:""},this.selected=!1,this.completed=!1,this.initiallyCompleted=!1,this.editing=!1,this.defaultSelected=!1,this.optional=!1,this.canEnter=!0,this.canExit=!0,this.stepEnter=new e.EventEmitter,this.stepExit=new e.EventEmitter}get hidden(){return!this.selected}static canTransitionStep(t,i){return"boolean"==typeof t?Promise.resolve(t):t instanceof Function?Promise.resolve(t(i)):Promise.reject(new Error(`Input value '${t}' is neither a boolean nor a function`))}enter(t){this.stepEnter.emit(t)}exit(t){this.stepExit.emit(t)}canEnterStep(t){return a.canTransitionStep(this.canEnter,t)}canExitStep(t){return a.canTransitionStep(this.canExit,t)}}return a.\u0275fac=function(t){return new(t||a)},a.\u0275dir=e.\u0275\u0275defineDirective({type:a,contentQueries:function(t,i,n){if(1&t&&(e.\u0275\u0275contentQuery(n,Yi,5),e.\u0275\u0275contentQuery(n,Ui,5)),2&t){let o;e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(i.stepTitleTemplate=o.first),e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(i.stepSymbolTemplate=o.first)}},hostVars:1,hostBindings:function(t,i){2&t&&e.\u0275\u0275hostProperty("hidden",i.hidden)},inputs:{navigationSymbol:"navigationSymbol",canEnter:"canEnter",canExit:"canExit",stepId:"stepId",stepTitle:"stepTitle"},outputs:{stepEnter:"stepEnter",stepExit:"stepExit"}}),a})(),ee=(()=>{class a extends Y{constructor(){super(...arguments),this.stepExit=new e.EventEmitter,this.canExit=!1}enter(t){this.completed=!0,this.stepEnter.emit(t)}exit(t){this.completed=this.initiallyCompleted,this.stepExit.emit(t)}}return a.\u0275fac=function(){let r;
1return function(i){return(r||(r=e.\u0275\u0275getInheritedFactory(a)))(i||a)}}(),a.\u0275dir=e.\u0275\u0275defineDirective({type:a,features:[e.\u0275\u0275InheritDefinitionFeature]}),a})();const H={Forwards:0,Backwards:1,Stay:2};H[H.Forwards]="Forwards",H[H.Backwards]="Backwards",H[H.Stay]="Stay";class $i{canGoToStep(r,t){const i=r.hasStep(t),n=r.getMovingDirection(t);return Promise.resolve(i).then(p=>p&&this.canTransitionToStep(r,t)).then(p=>p&&r.currentStep.canExitStep(n)).then(p=>p&&r.getStepAtIndex(t).canEnterStep(n))}canTransitionToStep(r,t){return this.isNavigable(r,t)}goToStep(r,t,i,n){this.canGoToStep(r,t).then(o=>{if(o){const s=r.getMovingDirection(t);i&&i.emit(),r.currentStep.completed=!0,r.currentStep.exit(s),r.currentStep.editing=!1,r.currentStep.selected=!1,this.transition(r,t);const l=r.completed||r.currentStep.completed;r.currentStep.enter(s),r.currentStep.selected=!0,l&&(r.currentStep.editing=!0),n&&n.emit()}else r.currentStep.exit(H.Stay),r.currentStep.enter(H.Stay)})}transition(r,t){r.currentStepIndex=t}reset(r){this.ensureCanReset(r),r.wizardSteps.forEach(t=>{t.completed=t.initiallyCompleted,t.selected=!1,t.editing=!1}),r.currentStepIndex=r.defaultStepIndex,r.currentStep.selected=!0,r.currentStep.enter(H.Forwards)}
1ensureCanReset(r){if(!r.hasStep(r.defaultStepIndex))throw new Error(`The wizard doesn't contain a step with index ${r.defaultStepIndex}`)}}class yt extends $i{constructor(r=null,t=null){super(),this.navigateBackward=r,this.navigateForward=t,this.navigateBackward=this.navigateBackward||"allow",this.navigateForward=this.navigateForward||"deny"}canTransitionToStep(r,t){return!!this.isNavigable(r,t)||r.wizardSteps.filter((i,n)=>n<t&&n!==r.currentStepIndex).every(i=>i.completed||i.optional)}transition(r,t){"deny"===this.navigateForward&&r.wizardSteps.filter((i,n)=>r.currentStepIndex>t&&n>t).forEach(i=>i.completed=!1),super.transition(r,t)}isNavigable(r,t){const i=r.getStepAtIndex(t);if(i instanceof ee&&!r.wizardSteps.filter((o,s)=>s<t).every(o=>o.completed||o.optional||o.selected))return!1;if(t<r.currentStepIndex)switch(this.navigateBackward){case"allow":return!0;case"deny":return!1;default:throw new Error(`Invalid value for navigateBackward: ${this.navigateBackward}`)}else{if(!(t>r.currentStepIndex))return!1;switch(this.navigateForward){case"allow":return!0;case"deny":return!1;case"visited":return i.completed;default:throw new Error(`Invalid value for navigateForward: ${this.navigateForward}`)}}}ensureCanReset(r){if(super.ensureCanReset(r),r.getStepAtIndex(r.defaultStepIndex)instanceof ee&&1!==r.wizardSteps.length)throw new Error(`The default step index ${r.defaultStepIndex} references a completion step`)}}let re=(()=>{class a{constructor(){this.navBarLocation="top",this.navBarLayout="small",this.navBarDirection="left-to-right",this._defaultStepIndex=0,this.disableNavigationBar=!1,this._navigation=new yt,this._wizardSteps=[],this.currentStepIndex=-1}get defaultStepIndex(){const t=this.wizardSteps.find(i=>i.defaultSelected);return t?this.getIndexOfStep(t):this._defaultStepIndex}set defaultStepIndex(t){this._defaultStepIndex=t}get horizontalOrientation(){return"top"===this.navBarLocation||"bottom"===this.navBarLocation}get verticalOrientation(){return"left"===this.navBarLocation||"right"===this.navBarLocation}ngAfterContentInit(){this.wizardStepsQueryList.changes.subscribe(t=>{this.updateWizardSteps(t.toArray())}),this.updateWizardSteps(this.wizardStepsQueryList.toArray()),this.reset()}get currentStep(){return this.hasStep(this.currentStepIndex)?this.wizardSteps[this.currentStepIndex]:null}get completed(){return this.wizardSteps.every(t=>t.completed||t.optional)}get wizardSteps(){return this._wizardSteps}updateWizardSteps(t){this.wizardSteps.length>0&&this.currentStepIndex>-1&&(this.currentStepIndex=t.indexOf(this.wizardSteps[this.currentStepIndex])),this._wizardSteps=t}get navigation(){return this._navigation}set navigation(t){this._navigation=t}hasStep(t){return this.wizardSteps.length>0&&0<=t&&t<this.wizardSteps.length}hasPreviousStep(){return this.hasStep(this.currentStepIndex-1)}hasNextStep(){return this.hasStep(this.currentStepIndex+1)}isLastStep(){return this.wizardSteps.length>0&&this.currentStepIndex===this.wizardSteps.length-1}getStepAtIndex(t){if(!this.hasStep(t))throw new Error(`Expected a known step, but got stepIndex: ${t}.`);return this.wizardSteps[t]}getIndexOfStepWithId(t){return this.wizardSteps.findIndex(i=>i.stepId===t)}getIndexOfStep(t){return this.wizardSteps.indexOf(t)}getMovingDirection(t){let i;return i=t>this.currentStepIndex?H.Forwards:t<this.currentStepIndex?H.Backwards:H.Stay,i}canGoToStep(t){return this.navigation.canGoToStep(this,t)}goToStep(t,i,n){return this.navigation.goToStep(this,t,i,n)}goToPreviousStep(t,i){return this.navigation.goToStep(this,this.currentStepIndex-1,t,i)}goToNextStep(t,i){return this.navigation.goToStep(this,this.currentStepIndex+1,t,i)}isNavigable(t){return this.navigation.isNavigable(this,t)}reset(){this.navigation.reset(this)}}return a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["aw-wizard"]],contentQueries:function(t,i,n){if(1&t&&e.\u0275\u0275contentQuery(n,Y,4),2&t){let o;e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(i.wizardStepsQueryList=o)}},hostVars:4,hostBindings:function(t,i){2&t&&e.\u0275\u0275classProp("horizontal",i.horizontalOrientation)("vertical",i.verticalOrientation)},inputs:{navBarLocation:"navBarLocation",navBarLayout:"navBarLayout",navBarDirection:"navBarDirection",disableNavigationBar:"disableNavigationBar",defaultStepIndex:"defaultStepIndex"},ngContentSelectors:We,decls:4,vars:6,consts:[[3,"direction","ngClass",4,"ngIf"],[3,"ngClass"],[3,"direction","ngClass"]],template:function(t,i){1&t&&(e.\u0275\u0275projectionDef(),e.\u0275\u0275template(0,Ti,1,10,"aw-wizard-navigation-bar",0),e.\u0275\u0275elementStart(1,"div",1),e.\u0275\u0275projection(2),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(3,Ri,1,10,"aw-wizard-navigation-bar",0)),2&t&&(e.\u0275\u0275property("ngIf","top"==i.navBarLocation||"left"==i.navBarLocation),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngClass",e.\u0275\u0275pureFunction2(3,Pi,"left"==i.navBarLocation||"right"==i.navBarLocation,"top"==i.navBarLocation||"bottom"==i.navBarLocation)),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf","bottom"==i.navBarLocation||"right"==i.navBarLocation))},dependencies:function(){return[h.mk,h.O5,Hi]},encapsulation:2}),a})(),Hi=(()=>{class a{constructor(t){this.wizard=t,this.direction="left-to-right"}get wizardSteps(){return"right-to-left"===this.direction?this.wizard.wizardSteps.slice().reverse():this.wizard.wizardSteps}get numberOfWizardSteps(){return this.wizard.wizardSteps.length}isCurrent(t){return t.selected}isEditing(t){return t.editing}isDone(t){return t.completed}isOptional(t){return t.optional}isCompleted(t){return t instanceof ee&&this.wizard.completed}isNavigable(t){return!t.selected&&!this.wizard.disableNavigationBar&&this.wizard.isNavigable(this.wizard.getIndexOfStep(t))}}return a.\u0275fac=function(t){return new(t||a)(e.\u0275\u0275directiveInject(re))},a.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["aw-wizard-navigation-bar"]],inputs:{direction:"direction"},decls:2,vars:4,consts:[[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[3,"awGoToStep"],[1,"label"],[3,"ngTemplateOutlet",4,"ngIf"],[4,"ngIf"],[1,"step-indicator",3,"ngStyle"],[3,"ngTemplateOutlet"]],template:function(t,i){1&t&&(e.\u0275\u0275elementStart(0,"ul"),e.\u0275\u0275template(1,zi,8,17,"li",0),e.\u0275\u0275elementEnd()),2&t&&(e.\u0275\u0275classMapInterpolate1("steps-indicator steps-",i.numberOfWizardSteps,""),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",i.wizardSteps))},dependencies:function(){return[h.mk,h.sg,h.O5,h.tP,h.PC,qi]},encapsulation:2}),a})(),Wi=(()=>{class a extends Y{}return a.\u0275fac=function(){let r;
1return function(i){return(r||(r=e.\u0275\u0275getInheritedFactory(a)))(i||a)}}(),a.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["aw-wizard-step"]],features:[e.\u0275\u0275ProvidersFeature([{provide:Y,useExisting:(0,e.forwardRef)(()=>a)}]),e.\u0275\u0275InheritDefinitionFeature],ngContentSelectors:We,decls:1,vars:0,template:function(t,i){1&t&&(e.\u0275\u0275projectionDef(),e.\u0275\u0275projection(0))},encapsulation:2}),a})(),qi=(()=>{class a{constructor(t,i){this.wizard=t,this.wizardStep=i,this.preFinalize=new e.EventEmitter,this.postFinalize=new e.EventEmitter}get finalize(){return this.preFinalize}set finalize(t){this.preFinalize=t}get destinationStep(){let t;if(function Gi(a){return a.hasOwnProperty("stepIndex")}(this.targetStep))t=this.targetStep.stepIndex;else if(function Qi(a){return a.hasOwnProperty("stepId")&&!(a instanceof Y)}(this.targetStep))t=this.wizard.getIndexOfStepWithId(this.targetStep.stepId);else if(function Ki(a){return a.hasOwnProperty("stepOffset")}(this.targetStep)&&null!==this.wizardStep)t=this.wizard.getIndexOfStep(this.wizardStep)+this.targetStep.stepOffset;else{if(!(this.targetStep instanceof Y))throw new Error("Input 'targetStep' is neither a WizardStep, StepOffset, StepIndex or StepId");t=this.wizard.getIndexOfStep(this.targetStep)}return t}onClick(t){this.wizard.goToStep(this.destinationStep,this.preFinalize,this.postFinalize)}}return a.\u0275fac=function(t){return new(t||a)(e.\u0275\u0275directiveInject(re),e.\u0275\u0275directiveInject(Y,8))},a.\u0275dir=e.\u0275\u0275defineDirective({type:a,selectors:[["","awGoToStep",""]],hostBindings:function(t,i){1&t&&e.\u0275\u0275listener("click",function(o){return i.onClick(o)})},inputs:{targetStep:["awGoToStep","targetStep"]},outputs:{preFinalize:"preFinalize",postFinalize:"postFinalize",finalize:"finalize"}}),a})(),Qe=(()=>{class a{constructor(t){this.wizard=t,this.preFinalize=new e.EventEmitter,this.postFinalize=new e.EventEmitter}get finalize(){return this.preFinalize}set finalize(t){this.preFinalize=t}onClick(t){this.wizard.goToNextStep(this.preFinalize,this.postFinalize)}}return a.\u0275fac=function(t){return new(t||a)(e.\u0275\u0275directiveInject(re))},a.\u0275dir=e.\u0275\u0275defineDirective({type:a,selectors:[["","awNextStep",""]],hostBindings:function(t,i){1&t&&e.\u0275\u0275listener("click",function(o){return i.onClick(o)})},outputs:{preFinalize:"preFinalize",postFinalize:"postFinalize",finalize:"finalize"}}),a})(),St=(()=>{class a{constructor(t){this.wizard=t,this.preFinalize=new e.EventEmitter,this.postFinalize=new e.EventEmitter}get finalize(){return this.preFinalize}set finalize(t){this.preFinalize=t}onClick(t){this.wizard.goToPreviousStep(this.preFinalize,this.postFinalize)}}return a.\u0275fac=function(t){return new(t||a)(e.\u0275\u0275directiveInject(re))},a.\u0275dir=e.\u0275\u0275defineDirective({type:a,selectors:[["","awPreviousStep",""]],hostBindings:function(t,i){1&t&&e.\u0275\u0275listener("click",function(o){return i.onClick(o)})},outputs:{preFinalize:"preFinalize",postFinalize:"postFinalize",finalize:"finalize"}}),a})(),Xi=(()=>{class a{constructor(t){this.wizard=t}ngOnChanges(t){this.wizard.navigation=this.getNavigationMode()}getNavigationMode(){return this.awNavigationMode?this.awNavigationMode:new yt(this.navigateBackward,this.navigateForward)}}return a.\u0275fac=function(t){return new(t||a)(e.\u0275\u0275directiveInject(re))},a.\u0275dir=e.\u0275\u0275defineDirective({type:a,selectors:[["","awNavigationMode",""]],inputs:{awNavigationMode:"awNavigationMode",navigateBackward:"navigateBackward",navigateForward:"navigateForward"},features:[e.\u0275\u0275NgOnChangesFeature]}),a})(),Zi=(()=>{class a{static forRoot(){return{ngModule:a,providers:[]}}}return a.\u0275fac=function(t){return new(t||a)},a.\u0275mod=e.\u0275\u0275defineNgModule({type:a}),a.\u0275inj=e.\u0275\u0275defineInjector({imports:[h.ez]}),a})();var b=m(4766),Ct=m(6221);class Ji{constructor(r,t,i,n,o,s,l,p,c,u){this.name=r,this.size=t,this.downloadLink=i,this.fileType=n,this.storagePath=o,this.uploadedFileName=s,this.folderName=l,this.whatHasBeenUploaded=p,this.isFileUploaded=c,this.blobUrl=u}}var en=m(8746),tn=m(8445);let ke=(()=>{class a{constructor(t,i){this._afStorage=t,this._authService=i,this.passUploadedFiles=new L.x,this.uploadedFileDetails=new L.x,this.uploadedFileDetailsEdit=new L.x,this.uploadPercentage=new L.x}prepareUpload(t,i,n,o){this.folderName=`applicant-${n}`,this.whereToUpload=`applicant-${n}/${i}`,this.uploadToFirestorage(t,i,o)}uploadToFirestorage(t,i,n){for(let o=0;o<t.length;o++){const s=t.item(o)?.size,l=t.item(o)?.name;console.log("userID:",this._authService.getUserId());const p=`${b.N.firestorageRef}/${this._authService.getUserId()}/${this.whereToUpload}/${(new Date).getTime()}_${l}`;this.uploadTask=this._afStorage.upload(p,t.item(o)),this.uploadTask.percentageChanges().subscribe(c=>{this.uploadPercentage.next(c)}),this.uploadTask.snapshotChanges().pipe((0,en.x)(()=>{this.downloadURL=this._afStorage.ref(p).getDownloadURL(),this.fileMetaData=this._afStorage.ref(p).getMetadata().subscribe(c=>{const u=c.size,_=c.fullPath,x=c.contentType,T=c.name;this.isFileUploaded=s===u,this.downloadURL.subscribe(C=>{this.uploadedFile=new Ji(l,u,C,x,_,T,this.folderName,i,this.isFileUploaded,this.bloburl)},C=>{},()=>
1{"new"===n?this.uploadedFileDetails.next(this.uploadedFile):this.uploadedFileDetailsEdit.next(this.uploadedFile)})})})).subscribe()}}static#e=this.\u0275fac=function(i){return new(i||a)(e.\u0275\u0275inject(tn.Q1),e.\u0275\u0275inject(Ct.e))};static#t=this.\u0275prov=e.\u0275\u0275defineInjectable({token:a,factory:a.\u0275fac,providedIn:"root"})}return a})();var _e=m(3485),ve=m(8028),Dt=m(1794),de=m(1411);class Ge{constructor(r,t){this.overlay=r,this.data=t}close(){setTimeout(()=>{this.overlay.dispose()},300)}}let Ke=(()=>{class a{constructor(){this.initialSelectedDate=new L.x,this.previousSelectedDate=new L.x,this.dateSelected=new L.x,this.expressServiceCost=new L.x,this.emergencyServiceCost=new L.x,this.isTodayDate=new L.x,this.isTomorrowtDate=new L.x}checkIfTodayOrTomorrow(t){const i=new Date(t[0].travelDate),n=new Date;i.toDateString()===n.toDateString()?this.dateSelected.next({selectedDate:"today"}):(n.setDate(n.getDate()+1),i.toDateString()===n.toDateString()?this.dateSelected.next({selectedDate:"tomorrow"}):this.dateSelected.next({selectedDate:"normal"}))}static#e=this.\u0275fac=function(i){return new(i||a)};static#t=this.\u0275prov=e.\u0275\u0275defineInjectable({token:a,factory:a.\u0275fac,providedIn:"root"})}return a})();const nn=["loadingBar"];function an(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",3)(2,"div",4),e.\u0275\u0275text(3,"Cancel Visa Application?"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(4,"div",5)(5,"div",11),e.\u0275\u0275text(6,"Your visa application and all its data will be permanently deleted."),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(7,"div",12)(8,"button",13),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(n.onNo())}),e.\u0275\u0275text(9,"no"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(10,"button",14),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(n.onYes())}),e.\u0275\u0275text(11,"yes"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementContainerEnd()}}function rn(a,r){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",3)(2,"div",4),e.\u0275\u0275text(3),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(4,"div",5),e.\u0275\u0275namespaceSVG(),e.\u0275\u0275elementStart(5,"svg",15),e.\u0275\u0275element(6,"circle",16),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementContainerEnd()),2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(t.actionMessage)}}function on(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",3)(2,"div",4),e.\u0275\u0275text(3,"Payment Failed"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(4,"div",5)(5,"div",11),e.\u0275\u0275text(6),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(7,"div",12)(8,"button",17),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(n.onNo())}),e.\u0275\u0275text(9,"ok"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementContainerEnd()}if(2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate(t.actionMessage)}}function sn(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",3)(2,"div",4),e.\u0275\u0275text(3,"Are you sure?"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(4,"div",5)(5,"div",11),e.\u0275\u0275text(6,"If you select the Express Service, the dates for all the applicants will be changed accordingly, and the calculated price for the Express Service will be added."),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(7,"div",12)(8,"button",13),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext();
1return e.\u0275\u0275resetView(n.onNo())}),e.\u0275\u0275text(9,"no"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(10,"button",14),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(n.onConfrimExpress())}),e.\u0275\u0275text(11,"yes"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementContainerEnd()}}function ln(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",3)(2,"div",4),e.\u0275\u0275text(3,"Are you sure?"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(4,"div",5)(5,"div",11),e.\u0275\u0275text(6,"If you select the Emergency Service, the dates for all the applicants will be changed accordingly, and the calculated price for the Emergency Service will be added."),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(7,"div",12)(8,"button",13),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(n.onNo())}),e.\u0275\u0275text(9,"no"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(10,"button",14),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(n.onConfrimEmergency())}),e.\u0275\u0275text(11,"yes"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementContainerEnd()}}const cn=function(a){return{transform:a}};let dn=(()=>{class a{constructor(t,i,n,o,s,l,p,c,u){this._actionRef=t,this._applyService=i,this._renderer=n,this._uploadService=o,this._applicationService=s,this._productService=l,this.expressEmergencyService=p,this.orderService=c,this._incompleteOrderService=u,this.cardStyle="",this.uploadPercentage=0}ngOnInit(){this.cardStyle="translateY(0px)",this.actionType=this._actionRef.data.data.actionType,this._actionRef.data.data.actionMessage&&(this.actionMessage=this._actionRef.data.data.actionMessage),this._applyService.closeActionModal.subscribe(()=>{this.onNo()}),this._uploadService.uploadPercentage.subscribe(t=>{this._renderer.setStyle(this.loadingBar.nativeElement,"stroke-dashoffset",-(2*t-10)),this.uploadPercentage=t})}onNo(){this.cardStyle="translateY(100%)",this._actionRef.close()}onYes(){this.orderService.visaRefFromOrderService.next(""),this.orderService.changeIsAlreadyFetchingPaymentDetails(!1),this.orderService.visaRefFromOrderService.unsubscribe(),this._applyService.unloadedModule.next(null),this._renderer.removeClass(document.querySelector("body"),"no-scroll"),this._applicationService.resetApplicationStorage(),this._productService.resetAllProductsStorage(),this._incompleteOrderService.updateSingleField("recentActionTaken","user cancelled visa application"),this._incompleteOrderService.updateSingleField("orderStatus","cancelled"),this.onNo()}onConfrimExpress(){this.expressEmergencyService.previousSelectedDate.next(this._applicationService.getApplicationStorage()[0].travelDate),this._applicationService.updateTravelDateOfAllApplicants(new Date((new Date).setDate((new Date).getDate()+1)).toDateString()),this._renderer.removeClass(document.getElementById("emergency-service"),"on"),this._renderer.removeClass(document.getElementById("emergency-service-icon"),"express-on"),this.expressEmergencyService.emergencyServiceCost.next(0),this._productService.extraServices.emergencyService=!1,this.expressEmergencyService.isTodayDate.next(!1),this._renderer.addClass(document.getElementById("express-service"),"on"),this._renderer.addClass(document.getElementById("express-service-icon"),"express-on"),this.expressEmergencyService.expressServiceCost.next(b.N.extraServices.expressService),this._productService.extraServices.expressService=!0,this.expressEmergencyService.isTomorrowtDate.next(!0),this.onNo()}onConfrimEmergency(){this.expressEmergencyService.previousSelectedDate.next(this._applicationService.getApplicationStorage()[0].travelDate),this._applicationService.updateTravelDateOfAllApplicants(new Date((new Date).setDate((new Date).getDate())).toDateString()),this._renderer.removeClass(document.getElementById("express-service"),"on"),this._renderer.removeClass(document.getElementById("express-service-icon"),"express-on"),this.expressEmergencyService.expressServiceCost.next(0),this._productService.extraServices.expressService=!1,this.expressEmergencyService.isTomorrowtDate.next(!1),this._renderer.addClass(document.getElementById("emergency-service"),"on"),this._renderer.addClass(document.getElementById("emergency-service-icon"),"express-on"),this.expressEmergencyService.emergencyServiceCost.next(b.N.extraServices.emerygencyService),this._productService.extraServices.emergencyService=!0,this.expressEmergencyService.isTodayDate.next(!0),this.onNo()}static#e=this.\u0275fac=function(i){return new(i||a)(e.\u0275\u0275directiveInject(Ge),e.\u0275\u0275directiveInject(ae.g),e.\u0275\u0275directiveInject(e.Renderer2),e.\u0275\u0275directiveInject(ke),e.\u0275\u0275directiveInject(ne.I),e.\u0275\u0275directiveInject(ve.M),e.\u0275\u0275directiveInject(Ke),e.\u0275\u0275directiveInject(Dt.p),e.\u0275\u0275directiveInject(de.G))};static#t=this.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["app-action"]],viewQuery:function(i,n){if(1&i&&e.\u0275\u0275viewQuery(nn,7),2&i){let o;e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.loadingBar=o.first)}},decls:18,vars:14,consts:[[1,"action-modal",3,"ngStyle"],[4,"ngIf"],[2,"width","100%",3,"hidden"],[1,"action-modal-header"],[1,"modal-header-sm"],[1,"action-modal-body"],["width","60px","height","60px","viewBox","0 0 66 66","xmlns","http://www.w3.org/2000/svg"],["cx","33","cy","33","r","30","fill","transparent","stroke-dasharray","565.48","stroke-dashoffset","0",1,"percentage"],["cx","33","cy","33","r","30","fill","transparent","stroke-dasharray","565.48","stroke-dashoffset","0",1,"bar"],["loadingBar",""],[1,"percentage-text"],[2,"text-align","center"],[1,"action-modal-footer"],["tabindex","0","cdkTrapFocusAutoCapture","","cdkTrapFocus","",1,"bp-btn-sm","bp-btn-sm-no",3,"click"],["tabindex","1",1,"bp-btn-sm","bp-btn-sm-yes",3,"click"],["width","60px","height","60px","viewBox","0 0 66 66","xmlns","http://www.w3.org/2000/svg",1,"spinner"],["fill","none","stroke-width","4","stroke-linecap","round","cx","33","cy","33","r","30",1,"path"],["tabindex","1","autofocus","",1,"bp-btn-sm","bp-btn-sm-no",3,"click"]],template:function(i,n){1&i&&(e.\u0275\u0275elementStart(0,"div",0),e.\u0275\u0275template(1,an,12,0,"ng-container",1),e.\u0275\u0275elementStart(2,"div",2)(3,"div",3)(4,"div",4),e.\u0275\u0275text(5),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(6,"div",5),e.\u0275\u0275namespaceSVG(),e.\u0275\u0275elementStart(7,"svg",6),e.\u0275\u0275element(8,"circle",7)(9,"circle",8,9),e.\u0275\u0275elementEnd(),e.\u0275\u0275namespaceHTML(),e.\u0275\u0275elementStart(11,"div",10),e.\u0275\u0275text(12),e.\u0275\u0275pipe(13,"number"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275template(14,rn,7,1,"ng-container",1),e.\u0275\u0275template(15,on,10,1,"ng-container",1),e.\u0275\u0275template(16,sn,12,0,"ng-container",1),e.\u0275\u0275template(17,ln,12,0,"ng-container",1),e.\u0275\u0275elementEnd()),2&i&&(e.\u0275\u0275property("ngStyle",e.\u0275\u0275pureFunction1(12,cn,n.cardStyle)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","cancel"===n.actionType),e.\u0275\u0275advance(1),e.\u0275\u0275property("hidden","uploading"!==n.actionType),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1("Uploading ",n.actionMessage,""),e.\u0275\u0275advance(7),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind2(13,9,n.uploadPercentage,"1.0-0"),"% "),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf","o
1peration"===n.actionType),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","payment"===n.actionType),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","confirmExpress"===n.actionType),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","confirmEmergency"===n.actionType))},dependencies:[h.O5,h.PC,w.mK,h.JJ],styles:[".percentage[_ngcontent-%COMP%]{stroke-dashoffset:0;transition:stroke-dashoffset 1s linear;stroke:#e90000;stroke-width:4px}.bar[_ngcontent-%COMP%]{stroke:#c5c5c5;stroke-width:4px;stroke-dashoffset:0;transition:stroke-dashoffset 1s linear}.percentage-text[_ngcontent-%COMP%]{position:absolute;color:#000}"]})}return a})(),pe=(()=>{class a{constructor(t,i){this.overlay=t,this.injector=i}open(t){const i=this.overlay.create(this.getOverlayConfig()),n=new Ge(i,t),o=this.createInjector(n,this.injector);return i.attach(new V.C5(dn,null,o)),n}getOverlayConfig(){return new E.X_({hasBackdrop:!0,positionStrategy:this.getOverlayPosition()})}getOverlayPosition(){return this.overlay.position().global().bottom("0")}createInjector(t,i){const n=new WeakMap([[Ge,t]]);return new V.nK(i,n)}static#e=this.\u0275fac=function(i){return new(i||a)(e.\u0275\u0275inject(E.aV),e.\u0275\u0275inject(e.Injector))};static#t=this.\u0275prov=e.\u0275\u0275defineInjectable({token:a,factory:a.\u0275fac,providedIn:fe.m})}return a})();var W=m(5938);let pn=(()=>{class a{constructor(t){this.dialogRef=t}onClose(){this.dialogRef.close()}static#e=this.\u0275fac=function(i){return new(i||a)(e.\u0275\u0275directiveInject(W.so))};static#t=this.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["app-photo-guidelines"]],decls:10,vars:0,consts:[["mat-dialog-title","",1,"deal-details-header"],[1,""],[1,"m-0"],["mat-dialog-content","",1,"dialog-content"],[1,"container-fluid"],["src","../../../assets/images/photo-guidelines.jpeg","alt","Photo Guidelines",1,"guideline-image"],["mat-dialog-actions","","align","end",1,"m-3"],["mat-button","",1,"custom-black-btn",3,"click"]],template:function(i,n){1&i&&(e.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"h3",2),e.\u0275\u0275text(3," Photo Guidelines "),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(4,"div",3)(5,"div",4),e.\u0275\u0275element(6,"img",5),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(7,"div",6)(8,"button",7),e.\u0275\u0275listener("click",function(){return n.onClose()}),e.\u0275\u0275text(9,"Okay"),e.\u0275\u0275elementEnd()())},styles:[".deal-details-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;border-bottom:2px solid rgba(0,0,0,.2);align-items:center;padding:10px}.custom-black-btn[_ngcontent-%COMP%]{background-color:#000;color:#fff;padding:5px 30px}.dialog-content[_ngcontent-%COMP%]{overflow-y:auto;max-height:calc(90vh - 120px);padding:0 10px}.guideline-image[_ngcontent-%COMP%]{width:100%;height:auto;display:block}"]})}return a})(),qe=(()=>{class a{transform(t,i,n){return t.length>i?t.substr(0,i)+n:t}static#e=this.\u0275fac=function(i){return new(i||a)};static#t=this.\u0275pipe=e.\u0275\u0275definePipe({name:"shortenText",type:a,pure:!0})}return a})();const mn=["passportUploadRef"],un=["photoUploadRef"],hn=["idUploadRef"],fn=["photoUrl"],gn=["rftRef"],_n=["hrRef"];function vn(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",37),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext();const n=e.\u0275\u0275reference(23);return e.\u0275\u0275resetView(n.click())}),e.\u0275\u0275elementEnd()}}function bn(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",39)(1,"div"),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"shortenText"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div",40),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext(),o=n.$implicit,s=n.index,l=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(l.onDeleteFile(o,s,"passport"))}),e.\u0275\u0275elementEnd()()}if(2&a){const t=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind3(3,1,t.name,20,"..."))}}function xn(a,r){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,bn,5,5,"div",38),e.\u0275\u0275elementContainerEnd()),2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",t.filesController.passport.fileUploaded)}}function yn(a,r){if(1&a&&(e.\u0275\u0275elementStart(0,"div",42),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",t.filesController.passport.message," ")}}function Sn(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",21)(1,"div"),e.\u0275\u0275template(2,yn,2,1,"div",22),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"div",41),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext();const n=e.\u0275\u0275reference(23);
1return e.\u0275\u0275resetView(n.click())}),e.\u0275\u0275elementEnd()()}if(2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",t.filesController.passport.show)}}function Cn(a,r){if(1&a&&(e.\u0275\u0275elementStart(0,"div",42),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",t.filesController.photo.message,"")}}function Dn(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",41),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext();const n=e.\u0275\u0275reference(31);return e.\u0275\u0275resetView(n.click())}),e.\u0275\u0275elementEnd()}}function wn(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",40),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(n.onDeleteFile(null,null,"photo"))}),e.\u0275\u0275elementEnd()}}function En(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",43),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext();const n=e.\u0275\u0275reference(43);return e.\u0275\u0275resetView(n.click())}),e.\u0275\u0275elementEnd()}}function kn(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",39)(1,"div"),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"shortenText"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div",40),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext(),o=n.$implicit,s=n.index,l=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(l.onDeleteFile(o,s,"id"))}),e.\u0275\u0275elementEnd()()}if(2&a){const t=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind3(3,1,t.name,20,"..."))}}function Mn(a,r){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,kn,5,5,"div",38),e.\u0275\u0275elementContainerEnd()),2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",t.filesController.id.fileUploaded)}}function Fn(a,r){if(1&a&&(e.\u0275\u0275elementStart(0,"div",42),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1("",t.filesController.id.message," ")}}function In(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",21)(1,"div"),e.\u0275\u0275template(2,Fn,2,1,"div",22),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"div",41),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext();const n=e.\u0275\u0275reference(43);return e.\u0275\u0275resetView(n.click())}),e.\u0275\u0275elementEnd()()}if(2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",t.filesController.id.show)}}function An(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",44),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext();const n=e.\u0275\u0275reference(51);return e.\u0275\u0275resetView(n.click())}),e.\u0275\u0275elementEnd()}}function Tn(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",39)(1,"div"),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"shortenText"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div",40),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext(),o=n.$implicit,s=n.index,l=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(l.onDeleteFile(o,s,"rft"))}),e.\u0275\u0275elementEnd()()}if(2&a){const t=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind3(3,1,t.name,20,"..."))}}function Rn(a,r){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,Tn,5,5,"div",38),e.\u0275\u0275elementContainerEnd()),2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",t.filesController.returnFlightTicket.fileUploaded)}}function Pn(a,r){if(1&a&&(e.\u0275\u0275elementStart(0,"div",42),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1("",t.filesController.returnFlightTicket.message," ")}}function On(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",21)(1,"div"),e.\u0275\u0275template(2,Pn,2,1,"div",22),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"div",41),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext();const n=e.\u0275\u0275reference(51);
1return e.\u0275\u0275resetView(n.click())}),e.\u0275\u0275elementEnd()()}if(2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",t.filesController.returnFlightTicket.show)}}function Vn(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",45),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext();const n=e.\u0275\u0275reference(59);return e.\u0275\u0275resetView(n.click())}),e.\u0275\u0275elementEnd()}}function Nn(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",39)(1,"div"),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"shortenText"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div",40),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext(),o=n.$implicit,s=n.index,l=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(l.onDeleteFile(o,s,"hotelRes"))}),e.\u0275\u0275elementEnd()()}if(2&a){const t=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind3(3,1,t.name,20,"..."))}}function Ln(a,r){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,Nn,5,5,"div",38),e.\u0275\u0275elementContainerEnd()),2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",t.filesController.hotelReservation.fileUploaded)}}function Bn(a,r){if(1&a&&(e.\u0275\u0275elementStart(0,"div",42),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1("",t.filesController.hotelReservation.message," ")}}function jn(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",21)(1,"div"),e.\u0275\u0275template(2,Bn,2,1,"div",22),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"div",41),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext();const n=e.\u0275\u0275reference(59);return e.\u0275\u0275resetView(n.click())}),e.\u0275\u0275elementEnd()()}if(2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",t.filesController.hotelReservation.show)}}let zn=(()=>{class a{constructor(t,i,n,o,s,l,p,c,u,_){this._actionService=t,this._applyService=i,this._applicationService=n,this._productService=o,this._currencyService=s,this._uploadService=l,this._renderer=p,this._dbService=c,this._incompleteOrderService=u,this.dialog=_,this.addNewApplicantSub=new R.w0,this.uploadedFiledDetailsSub=new R.w0,this.applicationStorage=[],this.applicantsCounter=[],this.applicantID=0,this.filesController={passport:{show:!1,message:"",fileUploaded:!1},photo:{show:!1,message:"",fileUploaded:!1},id:{show:!1,message:"",fileUploaded:!1},returnFlightTicket:{show:!1,message:"",fileUploaded:!1},hotelReservation:{show:!1,message:"",fileUploaded:!1}},this.uploadedFiles={passport:[],photo:[],id:[],returnFlightTicket:[],hotelReservation:[]},this.isNewApplication=!0}ngOnInit(){this._applicationService.setApplicantID(this.applicantID),this._productService.productChanged.subscribe(()=>{this.productStorage=this._productService.getSingleProductStorage()}),this.addNewApplicantSub=this._applyService.addNewApplicant.subscribe(()=>{this.applicantID=(new Date).getTime(),this._applicationService.setApplicantID(this.applicantID),this.uploadedFiles.photo=[],this.uploadedFiles.id=[],this.uploadedFiles.passport=[],this.uploadedFiles.returnFlightTicket=[],this.uploadedFiles.hotelReservation=[],this.resetUploadFields(),this._renderer.setStyle(this.photoUrl.nativeElement,"background-image","url(../../assets/images/person.svg)")}),this.applicationStorage=this._applicationService.getApplicationStorage(),this.productStorage=this._productService.getSingleProductStorage(),this.currencyStorage=this._currencyService.getSelectedCurrencyStorage(),this.applicantsCounter=this._applicationService.applicantsCounter,this.uploadedFiledDetailsSub=this._uploadService.uploadedFileDetails.subscribe(t=>{switch(this._applyService.closeActionModal.next(null),t.whatHasBeenUploaded){case"photo":this.filesController.photo.show=!1,this.filesController.photo.fileUploaded=!0,this.uploadedFiles.photo.push(t),this._renderer.setStyle(this.photoUrl.nativeElement,"background-image",`url(${this.photoSource})`);break;case"passport":this.filesController.passport.show=!1,this.filesController.passport.fileUploaded=!0,this.uploadedFiles.passport.push(t);break;case"id":this.filesController.id.show=!1,this.filesController.id.fileUploaded=!0,this.uploadedFiles.id.push(t);break;case"rft":this.filesController.returnFlightTicket.show=!1,this.filesController.returnFlightTicket.fileUploaded=!0,this.uploadedFiles.returnFlightTicket.push(t);break;case"hotelRes":this.filesController.hotelReservation.show=!1,this.filesController.hotelReservation.fileUploaded=!0,this.uploadedFiles.hotelReservation.push(t)}})}onCancel(){this._applicationService.getApplicationStorage().length>0?(this._applyService.cancelAdditionalApplicant.next(null),this._applyService.scrollToTop.next(null),this.uploadedFiles.photo=[],this.uploadedFiles.id=[],this.uploadedFiles.passport=[],this.uploadedFiles.returnFlightTicket=[],this.uploadedFiles.hotelReservation=[],this._incompleteOrderService.updateSingleField("recentActionTaken","cancelled add another applicant")):this._actionService.open({data:{actionType:"cancel"}})}startUpload(t,i){if(b.N.production||console.log(t),t.length>2)switch(i){case"passport":this.filesController.passport={show:!0,message:"Please upload 2 files maximum",fileUploaded:!1};break;case"id":this.filesController.id={show:!0,message:"Please upload 2 files maximum",fileUploaded:!1};break;case"rft":this.filesController.returnFlightTicket={show:!0,message:"Please upload 2 files maximum",fileUploaded:!1};break;case"hotelRes":this.filesController.hotelReservation={show:!0,message:"Please upload 2 files maximum",fileUploaded:!1}}else 0!==t.length&&this.checkFiles(t,i)}resetUploadFields(){this.photoUploadRef.nativeElement.value="",this.passportUploadRef.nativeElement.value="",this.idUploadRef.nativeElement.value="",this.rftRef.nativeElement.value="",this.hrRef.nativeElement.value=""}onDeleteFile(t,i,n){switch(this.resetUploadFields(),n){case"photo":this.whatToDeleteFileType="Deleting Photograph";break;case"passport":this.whatToDeleteFileType="Deleting Passport";break;case"id":this.whatToDeleteFileType="Deleting National ID";break;case"rft":this.whatToDeleteFileType="Deleting Return Flight Ticket";break;case"hotelRes":this.whatToDeleteFileType="Deleting Hotel Reservation"}switch(this._actionService.open({data:{actionType:"operation",actionMessage:this.whatToDeleteFileType}}),n){case"photo":this._dbService.deleteUplaodFile(this.uploadedFiles.photo[0].folderName,this.uploadedFiles.photo[0].whatHasBeenUploaded,this.uploadedFiles.photo[0].uploadedFileName).then(()=>{this._applyService.closeActionModal.next(null),this.uploadedFiles.photo.splice(i,1),this._renderer.setStyle(this.photoUrl.nativeElement,"background-image","url(../../assets/images/person.svg)")}).catch(()=>{alert("Unable to delete file, please try again.")});break;case"id":this._dbService.deleteUplaodFile(t.folderName,t.whatHasBeenUploaded,t.uploadedFileName).then(()=>{this._applyService.closeActionModal.next(null),this.uploadedFiles.id.splice(i,1)}).catch(()=>{alert("Unable to delete file, please try again.")});break;case"passport":this._dbService.deleteUplaodFile(t.folderName,t.whatHasBeenUploaded,t.uploadedFileName).then(()=>{this._applyService.closeActionModal.next(null),this.uploadedFiles.passport.splice(i,1)}).catch(()=>{alert("Unable to delete file, please try again.")});break;case"rft":this._dbService.deleteUplaodFile(t.folderName,t.whatHasBeenUploaded,t.uploadedFileName).then(()=>{this._applyService.closeActionModal.next(null),this.uploadedFiles.returnFlightTicket.splice(i,1)}).catch(()=>{alert("Unable to delete file, please try again.")});break;case"hotelRes":this._dbService.deleteUplaodFile(t.folderName,t.whatHasBeenUploaded,t.uploadedFileName).then(()=>{this._applyService.closeActionModal.next(null),this.uploadedFiles.hotelReservation.splice(i,1)}).catch(()=>{alert("Unable to delete file, please try again.")})}}checkFiles(t,i){switch(i){case"photo":this.whatToUploadFileType="Photograph";break;case"passport":this.whatToUploadFileType="Passport";break;case"id":this.whatToUploadFileType="National ID";break;case"rft":this.whatToUploadFileType="Return Flight Ticket";break;case"hotelRes":this.whatToUploadFileType="Hotel Reservation"}for(let n=0;n<t.item.length;n++){const o=t.item(n);if(o.size>b.N.allowedFileSise){switch(i){case"photo":this.filesController.photo.show=!0,this.filesController.photo.message="File size too large";break;case"passport":this.filesController.passport.show=!0,this.filesController.passport.message="File size too large";break;case"id":this.filesController.id.show=!0,this.filesController.id.message="File size too large";break;case"rft":this.filesController.returnFlightTicket.show=!0,this.filesController.returnFlightTicket.message="File size too large";break;case"hotelRes":this.filesController.hotelReservation.show=!0,this.filesController.hotelReservation.message="File size too large"}return}if("application/pdf"===o.type||"image"===o.type.split("/")[n])switch(this._actionService.open({data:{actionType:"uploading",actionMessage:this.whatToUploadFileType}}),i){case"photo":const s=t.item(0);this.photoSource=window.URL.createObjectURL(s),this._uploadService.bloburl=this.photoSource,this._uploadService.prepareUpload(t,"photo",0===this.applicantID?0:this.applicantID,"new");break;case"passport":this._uploadService.bloburl="n/a",this._uploadService.prepareUpload(t,"passport",0===this.applicantID?0:this.applicantID,"new");break;case"id":this._uploadService.bloburl="n/a",this._uploadService.prepareUpload(t,"id",0===this.applicantID?0:this.applicantID,"new");break;case"rft":this._uploadService.bloburl="n/a",this._uploadService.prepareUpload(t,"rft",0===this.applicantID?0:this.applicantID,"new");break;case"hotelRes":this._uploadService.bloburl="n/a",this._uploadService.prepareUpload(t,"hotelRes",0===this.applicantID?0:this.applicantID,"new")}else switch(i){case"photo":this.filesController.photo.show=!0,this.filesController.photo.message="Invalid file format.";break;case"passport":this.filesController.passport.show=!0,this.filesController.passport.message="Invalid file format.";break;case"id":this.filesController.id.show=!0,this.filesController.id.message="Invalid file format.";break;case"rft":this.filesController.returnFlightTicket.show=!0,this.filesController.returnFlightTicket.message="Invalid file format.";break;case"hotelRes":this.filesController.hotelReservation.show=!0,this.filesController.hotelReservation.message="Invalid file format."}}}
1onDetails(){this._uploadService.passUploadedFiles.next(this.uploadedFiles),this._incompleteOrderService.updateSingleField("currentStep","details"),this._incompleteOrderService.updateSingleField("lastStep","documents"),this._incompleteOrderService.updateSingleField("recentActionTaken","moved to details tab"),this._applyService.scrollToTop.next(null)}onPhotoGuidelines(){this.dialog.open(pn,{width:"800px",maxWidth:"95vw",height:"90vh",panelClass:"photo-guidelines-dialog"})}static#e=this.\u0275fac=function(i){return new(i||a)(e.\u0275\u0275directiveInject(pe),e.\u0275\u0275directiveInject(ae.g),e.\u0275\u0275directiveInject(ne.I),e.\u0275\u0275directiveInject(ve.M),e.\u0275\u0275directiveInject(_e.i),e.\u0275\u0275directiveInject(ke),e.\u0275\u0275directiveInject(e.Renderer2),e.\u0275\u0275directiveInject(ge.M),e.\u0275\u0275directiveInject(de.G),e.\u0275\u0275directiveInject(W.uw))};static#t=this.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["app-documents"]],viewQuery:function(i,n){if(1&i&&(e.\u0275\u0275viewQuery(mn,7),e.\u0275\u0275viewQuery(un,7),e.\u0275\u0275viewQuery(hn,7),e.\u0275\u0275viewQuery(fn,7),e.\u0275\u0275viewQuery(gn,7),e.\u0275\u0275viewQuery(_n,7)),2&i){let o;e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.passportUploadRef=o.first),e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.photoUploadRef=o.first),e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.idUploadRef=o.first),e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.photoUrl=o.first),e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.rftRef=o.first),e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.hrRef=o.first)}},decls:75,vars:23,consts:[[1,"app-modal-body-wr","app-modal-upload-wr"],[1,"app-modal-body-header"],[1,"modal-applicant-header"],[1,"header-left"],[1,"order-total"],[1,"app-modal-body"],[1,"bp-h1"],[1,"app-modal-info"],[1,"red-text"],[1,"app-modal-card-wr"],["type","file","hidden","","accept",".jpg,.png,.jpeg,.pdf",3,"change"],["passportUploadRef",""],[1,"app-card","w-inline-block"],["class","card-icon-modal",3,"click",4,"ngIf"],[1,"card-header"],[4,"ngFor","ngForOf"],["class","app-card-footer",4,"ngIf"],["type","file","hidden","","accept",".jpg,.png,.jpeg",3,"disabled","change"],["photoUploadRef",""],[1,"card-icon-modal","person",3,"click"],["photoUrl",""],[1,"app-card-footer"],["class","error-text upload-file-error",4,"ngIf"],["class","file-control-icon",3,"click",4,"ngIf"],["class","file-control-icon delete-file",3,"click",4,"ngIf"],["idUploadRef",""],["class","card-icon-modal national-id",3,"click",4,"ngIf"],["rftRef",""],["class","card-icon-modal return-flight-ticket",3,"click",4,"ngIf"],["hrRef",""],["class","card-icon-modal hotel-reservation",3,"click",4,"ngIf"],[1,"app-modal-footer"],[1,"app-modal-footer-left"],[1,"app-modal-footer-right"],[1,"bp-btn","btn-photo-guidelines","w-button",3,"click"],[1,"bp-btn","bp-modal-cancel","w-button",3,"click"],["awNextStep","",1,"bp-btn","btn-modal-next","w-button",3,"disabled","click"],[1,"card-icon-modal",3,"click"],["class","uploaded-file-wr",4,"ngIf"],[1,"uploaded-file-wr"],[1,"file-control-icon","delete-file",3,"click"],[1,"file-control-icon",3,"click"],[1,"error-text","upload-file-error"],[1,"card-icon-modal","national-id",3,"click"],[1,"card-icon-modal","return-flight-ticket",3,"click"],[1,"card-icon-modal","hotel-reservation",3,"click"]],template:function(i,n){if(1&i){const o=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"h1",2),e.\u0275\u0275text(3),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"h1",3),e.\u0275\u0275text(5,"Order Total: "),e.\u0275\u0275elementStart(6,"span",4),e.\u0275\u0275text(7),e.\u0275\u0275pipe(8,"number"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(9,"div",5)(10,"h1",6),e.\u0275\u0275text(11,"Please Upload the Following Documents"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(12,"div",7)(13,"div"),e.\u0275\u0275text(14,"Accepted Formats: "),e.\u0275\u0275elementStart(15,"span",8),e.\u0275\u0275text(16,"PDF, JPG or PNG"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(17,"div"),e.\u0275\u0275text(18,"Maximum File Size: "),e.\u0275\u0275elementStart(19,"span",8),e.\u0275\u0275text(20,"4 MB per upload"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(21,"div",9)(22,"input",10,11),e.\u0275\u0275listener("change",function(l){return n.startUpload(l.target.files,"passport")}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(24,"a",12),e.\u0275\u0275template(25,vn,1,0,"div",13),e.\u0275\u0275elementStart(26,"h1",14),e.\u0275\u0275text(27,"Passport"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(28,xn,2,1,"ng-container",15),e.\u0275\u0275template(29,Sn,4,1,"div",16),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(30,"input",17,18),e.\u0275\u0275listener("change",function(l){return n.startUpload(l.target.files,"photo")}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(32,"a",12)(33,"div",19,20),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(o);const l=e.\u0275\u0275reference(31);
1return e.\u0275\u0275resetView(l.click())}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(35,"h1",14),e.\u0275\u0275text(36,"Photograph"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(37,"div",21)(38,"div"),e.\u0275\u0275template(39,Cn,2,1,"div",22),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(40,Dn,1,0,"div",23),e.\u0275\u0275template(41,wn,1,0,"div",24),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(42,"input",10,25),e.\u0275\u0275listener("change",function(l){return n.startUpload(l.target.files,"id")}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(44,"a",12),e.\u0275\u0275template(45,En,1,0,"div",26),e.\u0275\u0275elementStart(46,"h1",14),e.\u0275\u0275text(47,"National ID"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(48,Mn,2,1,"ng-container",15),e.\u0275\u0275template(49,In,4,1,"div",16),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(50,"input",10,27),e.\u0275\u0275listener("change",function(l){return n.startUpload(l.target.files,"rft")}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(52,"a",12),e.\u0275\u0275template(53,An,1,0,"div",28),e.\u0275\u0275elementStart(54,"h1",14),e.\u0275\u0275text(55,"Return Flight Ticket"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(56,Rn,2,1,"ng-container",15),e.\u0275\u0275template(57,On,4,1,"div",16),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(58,"input",10,29),e.\u0275\u0275listener("change",function(l){return n.startUpload(l.target.files,"hotelRes")}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(60,"a",12),e.\u0275\u0275template(61,Vn,1,0,"div",30),e.\u0275\u0275elementStart(62,"h1",14),e.\u0275\u0275text(63,"Hotel Reservation"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(64,Ln,2,1,"ng-container",15),e.\u0275\u0275template(65,jn,4,1,"div",16),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(66,"div",31),e.\u0275\u0275element(67,"div",32),e.\u0275\u0275elementStart(68,"div",33)(69,"button",34),e.\u0275\u0275listener("click",function(){return n.onPhotoGuidelines()}),e.\u0275\u0275text(70,"Photo Guidelines"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(71,"button",35),e.\u0275\u0275listener("click",function(){return n.onCancel()}),e.\u0275\u0275text(72,"cancel"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(73,"button",36),e.\u0275\u0275listener("click",function(){return n.onDetails()}),e.\u0275\u0275text(74,"details"),e.\u0275\u0275elementEnd()()()()}2&i&&(e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(n.applicantsCounter[n.applicationStorage.length]),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate2(" ",e.\u0275\u0275pipeBind2(8,20,n.productStorage.cost*n.currencyStorage.currencyConverter*(n.applicationStorage.length+1),"1.0-0")," ",n.currencyStorage.currencyCode," "),e.\u0275\u0275advance(18),e.\u0275\u0275property("ngIf",0===n.uploadedFiles.passport.length),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngForOf",n.uploadedFiles.passport),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.uploadedFiles.passport.length<2),e.\u0275\u0275advance(1),e.\u0275\u0275property("disabled",1===n.uploadedFiles.photo.length),e.\u0275\u0275advance(9),e.\u0275\u0275property("ngIf",n.filesController.photo.show),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",0===n.uploadedFiles.photo.length),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",1===n.uploadedFiles.photo.length),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",0===n.uploadedFiles.id.length),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngForOf",n.uploadedFiles.id),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.uploadedFiles.id.length<2),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",0===n.uploadedFiles.returnFlightTicket.length),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngForOf",n.uploadedFiles.returnFlightTicket),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.uploadedFiles.returnFlightTicket.length<2),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",0===n.uploadedFiles.hotelReservation.length),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngForOf",n.uploadedFiles.hotelReservation),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.uploadedFiles.hotelReservation.length<2),e.\u0275\u0275advance(8),e.\u0275\u0275property("disabled",0===n.uploadedFiles.passport.length||0===n.uploadedFiles.photo.length||0===n.uploadedFiles.id.length||0===n.uploadedFiles.returnFlightTicket.length||0===n.uploadedFiles.hotelReservation.length))},dependencies:[h.sg,h.O5,Qe,h.JJ,qe],styles:["@media only screen and (min-width: 768px){.app-modal-body[_ngcontent-%COMP%]{height:410px}}.card-header[_ngcontent-%COMP%]{color:#333!important}"]})}return a})();class wt{constructor(r,t,i,n,o,s,l,p,c,u,_,x,T,C){this.isMainApplicant=r,this.firstName=t,this.lastName=i,this.nationality=n,this.country=o,this.phone=s,this.email=l,this.files=p,this.passportNumber=c,this.profession=u,this.travelDate=_,this.travelPurpose=x,this.visitedUA
1E=T,this.id=C}}class Et{constructor(r,t,i,n,o){this.photo=r,this.passport=t,this.id=i,this.returnFlightTicket=n,this.hotelReservation=o}}var kt=m(7732),Un=m(7509);function Yn(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",38),e.\u0275\u0275text(1," Contact number is required "),e.\u0275\u0275elementEnd())}function $n(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",38),e.\u0275\u0275text(1," Contact number should be at least 10 digits "),e.\u0275\u0275elementEnd())}function Hn(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",38),e.\u0275\u0275text(1," Contact number is invalid (e.g. +971111111111) "),e.\u0275\u0275elementEnd())}function Wn(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",38),e.\u0275\u0275text(1," Please enter a valid email address "),e.\u0275\u0275elementEnd())}function Qn(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",38),e.\u0275\u0275text(1," First name is required "),e.\u0275\u0275elementEnd())}function Gn(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",38),e.\u0275\u0275text(1," First name should be at least 2 characters "),e.\u0275\u0275elementEnd())}function Kn(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",38),e.\u0275\u0275text(1," Last name is required "),e.\u0275\u0275elementEnd())}function qn(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",38),e.\u0275\u0275text(1," Last name should be at least 2 characters "),e.\u0275\u0275elementEnd())}function Xn(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",38),e.\u0275\u0275text(1," Please enter your passport number "),e.\u0275\u0275elementEnd())}function Zn(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",38),e.\u0275\u0275text(1," Passport number should be at least 6 characters "),e.\u0275\u0275elementEnd())}function Jn(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",38),e.\u0275\u0275text(1," Profession is required "),e.\u0275\u0275elementEnd())}function ea(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",38),e.\u0275\u0275text(1," Profession should be at least 3 characters "),e.\u0275\u0275elementEnd())}function ta(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",38),e.\u0275\u0275text(1," Purpose of Travel is required "),e.\u0275\u0275elementEnd())}function ia(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",38),e.\u0275\u0275text(1," Travel purpose should be at least 3 characters "),e.\u0275\u0275elementEnd())}function na(a,r){if(1&a&&(e.\u0275\u0275elementStart(0,"span"),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",t.applicantFirstName," have visited the UAE before ")}}function aa(a,r){1&a&&(e.\u0275\u0275elementStart(0,"span"),e.\u0275\u0275text(1," I have Visited the UAE before "),e.\u0275\u0275elementEnd())}function ra(a,r){if(1&a&&(e.\u0275\u0275elementStart(0,"div",39),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" Note: ",t.expressEmergencyNotePara," ")}}let oa=(()=>{class a{constructor(t,i,n,o,s,l,p,c,u){this._actionService=t,this._applyService=i,this._applicationService=n,this._geoService=o,this._currencyService=s,this._productService=l,this._uploadService=p,this.dateAdapter=c,this._incompleteOrderService=u,this.applicantsCounter=[],this.applicantFirstName="",this.dateMask={mask:[/\d/,/\d/,"/",/\d/,/\d/,"/",/\d/,/\d/]},this.minDate=new Date((new Date).setDate((new Date).getDate())),this.isShowExpressEmegencyNote=!1,this.expressEmergencyNotePara="",this.dateAdapter.setLocale("en-GB")}ngOnInit(){this._productService.productChanged.subscribe(()=>{this.productStorage=this._productService.getSingleProductStorage()}),this._uploadService.passUploadedFiles.subscribe(t=>{console.log("files on Details:",t),this.files=t,this.applicantID=this._applicationService.getApplicantID()}),this.initDetailsForm(),this.productStorage=this._productService.getSingleProductStorage(),this.currencyStorage=this._currencyService.getSelectedCurrencyStorage(),this.applicants=this._applicationService.getApplicationStorage(),this.applicantsCounter=this._applicationService.applicantsCounter,this._applyService.addNewApplicant.subscribe(()=>{this._applicationService.getApplicationStorage().length>0&&(console.log("New applicant is began to add in detail component"),this.detailsForm.get("travelDate")?.setValue(new Date(this._applicationService.getApplicationStorage()[0].travelDate)),this.detailsForm.get("travelDate")?.disable({onlySelf:!1,emitEvent:!1}),this.detailsForm.get("travelPurpose")?.setValue(this._applicationService.getApplicationStorage()[0].travelPurpose),this.detailsForm.get("travelPurpose")?.disable({onlySelf:!1,emitEvent:!1}))}),this.detailsForm.get("travelDate")?.valueChanges.subscribe(t=>{console.log("travel date on value changes>>>>>>>>>>"),console.log(t),this.checkIfTodayOrTomorrow(t)})}onCancel(){this._applicationService.getApplicationStorage().length>0?(this._applyService.cancelAdditionalApplicant.next(null),this._applyService.scrollToTop.next(null)):this._actionService.open({data:{actionType:"cancel"}})}initDetailsForm(){this.detailsForm=new d.UntypedFormGroup({phone:new d.UntypedFormControl(null,{validators:[d.Validators.required,d.Validators.minLength(10),d.Validators.pattern("^\\+\\d+$")]}),email:new d.UntypedFormControl(null,{validators:[d.Validators.required]}),firstName:new d.UntypedFormControl(null,{validators:[d.Validators.required,d.Validators.minLength(2)]}),lastName:new d.UntypedFormControl(null,{validators:[d.Validators.required,d.Validators.minLength(2)]}),nationality:new d.UntypedFormControl({value:this._applyService.getNationality().name,disabled:!0},d.Validators.required),country:new d.UntypedFormControl({value:this._applyService.getCountry(),disabled:!0},d.Validators.required),passport:new d.UntypedFormControl(null,{validators:[d.Validators.required,d.Validators.minLength(6)]}),profession:new d.UntypedFormControl(null,{validators:[d.Validators.required,d.Validators.minLength(3)]}),travelDate:new d.UntypedFormControl(null,{validators:[d.Validators.required]}),travelPurpose:new d.UntypedFormControl(null,{validators:[d.Validators.required,d.Validators.minLength(3)]}
1),visitedUAE:new d.UntypedFormControl(null)})}onReview(){const t=new wt(this.isMainApplicant=0===this.applicantID,this._applyService.toTitleCase(this.detailsForm.get("firstName")?.value),this._applyService.toTitleCase(this.detailsForm.get("lastName")?.value),this._applyService.getNationality().name,this._applyService.toTitleCase(this.detailsForm.get("country")?.value),this.detailsForm.get("phone")?.value,this.detailsForm.get("email")?.value.toLowerCase(),new Et(this.files.photo,this.files.passport,this.files.id,this.files.returnFlightTicket,this.files.hotelReservation),this.detailsForm.get("passport")?.value.toUpperCase(),this._applyService.toTitleCase(this.detailsForm.get("profession")?.value),new Date(this.detailsForm.get("travelDate")?.value).toDateString(),this._applyService.toTitleCase(this.detailsForm.get("travelPurpose")?.value),this.detailsForm.get("visitedUAE")?.value,this.applicantID);this._applicationService.addApplicant(t),b.N.production||console.log(this._applicationService.getApplicationStorage()),this.resetFields(),this._incompleteOrderService.addOrUpdateApplicants(),this._incompleteOrderService.updateSingleField("currentStep","review"),this._incompleteOrderService.updateSingleField("lastStep","details"),this._incompleteOrderService.updateSingleField("recentActionTaken","moved to review tab"),this._applyService.scrollToTop.next(null)}resetFields(){this.detailsForm.get("firstName")?.reset(),this.detailsForm.get("lastName")?.reset(),this.detailsForm.get("passport")?.reset(),this.detailsForm.get("travelDate")?.reset(),this.detailsForm.get("travelPurpose")?.reset(),this.detailsForm.get("visitedUAE")?.reset(),this.detailsForm.get("profession")?.reset()}onDocuments(){this._incompleteOrderService.updateSingleField("recentActionTaken","back to documents tab"),this._applyService.scrollToTop.next(null)}checkIfTodayOrTomorrow(t){const i=new Date(t),n=new Date;i.toDateString()===n.toDateString()?(this.isShowExpressEmegencyNote=!0,this.expressEmergencyNotePara="Emergency Service charges "+(b.N.extraServices.emerygencyService*this.currencyStorage.currencyConverter).toFixed(0)+" "+this.currencyStorage.currencyCode+" per applicant will be applied"):(n.setDate(n.getDate()+1),i.toDateString()===n.toDateString()?(this.isShowExpressEmegencyNote=!0,this.expressEmergencyNotePara="Express Service charges "+(b.N.extraServices.expressService*this.currencyStorage.currencyConverter).toFixed(0)+" "+this.currencyStorage.currencyCode+" per applicant will be applied"):(this.isShowExpressEmegencyNote=!1,this.expressEmergencyNotePara=""))}static#e=this.\u0275fac=function(i){return new(i||a)(e.\u0275\u0275directiveInject(pe),e.\u0275\u0275directiveInject(ae.g),e.\u0275\u0275directiveInject(ne.I),e.\u0275\u0275directiveInject(He.p),e.\u0275\u0275directiveInject(_e.i),e.\u0275\u0275directiveInject(ve.M),e.\u0275\u0275directiveInject(ke),e.\u0275\u0275directiveInject(g._A),e.\u0275\u0275directiveInject(de.G))};static#t=this.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["app-details"]],decls:80,vars:28,consts:[[1,"app-modal-body-header"],[1,"modal-applicant-header"],[1,"header-left"],[1,"order-total"],[1,"app-modal-body"],[1,"bp-h1"],[1,"app-modal-form-wr"],[1,"w-form"],[3,"formGroup"],[1,"input-group"],[1,"input-container"],["type","text","autofocus","","maxlength","30","formControlName","phone","placeholder","Contact Number including country code (e.g. +971111111111)","autocomplete","no","inputmode","tel",1,"input-field","input-contact","w-input"],[1,"error-text-wr"],["class","error-text",4,"ngIf"],[1,"input-container-right"],["formControlName","email","type","text","autocomplete","no","inputmode","email","maxlength","50","placeholder","Email Address","pattern","[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$",1,"input-field","input-email","w-input"],["appLettersOnly","","type","text","autocomplete","no","maxlength","50","formControlName","firstName","placeholder","First Name or any middle names",1,"input-field","input-person","w-input",3,"ngModel","ngModelChange"],["appLettersOnly","","type","text","autocomplete","no","maxlength","50","formControlName","lastName","placeholder","Last Name",1,"input-field","input-person","w-input"],["formControlName","nationality","type","text","autocomplete","no","maxlength","100","placeholder","Nationality",1,"input-field","input-nationality","w-input"],["type","text","appLettersOnl
1y","","autocomplete","no","maxlength","100","formControlName","country","placeholder","Country of Residence",1,"input-field","input-country","w-input"],["appCharactersOnly","","maxlength","30","type","text","autocomplete","no","formControlName","passport","placeholder","Passport No",1,"input-field","input-passport","w-input"],["appLettersOnly","","type","text","autocomplete","no","maxlength","30","formControlName","profession","placeholder","Profession",1,"input-field","input-work","w-input"],["formControlName","travelDate","required","","placeholder","Travel Date","readonly","",1,"input-field","input-calendar","w-input",2,"cursor","pointer",3,"matDatepicker","min","click"],["touchUi",""],["picker",""],["appLettersOnly","","type","text","autocomplete","no","maxlength","20","formControlName","travelPurpose","placeholder","Purpose of Travel",1,"input-field","input-bag","w-input"],[1,"input-group",2,"padding-bottom","10px"],[1,"checkbox-container"],["formControlName","visitedUAE","type","checkbox","id","visited-uae"],["for","visited-uae"],[4,"ngIf"],["class","express-emergency-note-div",4,"ngIf"],[1,"app-modal-footer"],[1,"app-modal-footer-left"],["awPreviousStep","",1,"bp-btn","btn-modal-previous","w-button",3,"click"],[1,"app-modal-footer-right"],[1,"bp-btn","bp-modal-cancel","w-button",3,"click"],["awNextStep","",1,"bp-btn","btn-modal-next","w-button",3,"disabled","click"],[1,"error-text"],[1,"express-emergency-note-div"]],template:function(i,n){if(1&i){const o=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",0)(1,"h1",1),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"h1",2),e.\u0275\u0275text(4,"Order Total: "),e.\u0275\u0275elementStart(5,"span",3),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"number"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(8,"div",4)(9,"h1",5),e.\u0275\u0275text(10,"Please Provide The Following Details"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(11,"div",6)(12,"div",7)(13,"form",8)(14,"div",9)(15,"div",10),e.\u0275\u0275element(16,"input",11),e.\u0275\u0275elementStart(17,"div",12),e.\u0275\u0275template(18,Yn,2,0,"div",13),e.\u0275\u0275template(19,$n,2,0,"div",13),e.\u0275\u0275template(20,Hn,2,0,"div",13),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(21,"div",14),e.\u0275\u0275element(22,"input",15),e.\u0275\u0275elementStart(23,"div",12),e.\u0275\u0275template(24,Wn,2,0,"div",13),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(25,"div",9)(26,"div",10)(27,"input",16),e.\u0275\u0275listener("ngModelChange",function(l){return n.applicantFirstName=l}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(28,"div",12),e.\u0275\u0275template(29,Qn,2,0,"div",13),e.\u0275\u0275template(30,Gn,2,0,"div",13),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(31,"div",14),e.\u0275\u0275element(32,"input",17),e.\u0275\u0275elementStart(33,"div",12),e.\u0275\u0275template(34,Kn,2,0,"div",13),e.\u0275\u0275template(35,qn,2,0,"div",13),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(36,"div",9)(37,"div",10),e.\u0275\u0275element(38,"input",18)(39,"div",12),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(40,"div",14),e.\u0275\u0275element(41,"input",19)(42,"div",12),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(43,"div",9)(44,"div",10),e.\u0275\u0275element(45,"input",20),e.\u0275\u0275elementStart(46,"div",12),e.\u0275\u0275template(47,Xn,2,0,"div",13),e.\u0275\u0275template(48,Zn,2,0,"div",13),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(49,"div",14),e.\u0275\u0275element(50,"input",21),e.\u0275\u0275elementStart(51,"div",12),e.\u0275\u0275template(52,Jn,2,0,"div",13),e.\u0275\u0275template(53,ea,2,0,"div",13),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(54,"div",9)(55,"div",10)(56,"input",22),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(o);const l=e.\u0275\u0275reference(58);return e.\u0275\u0275resetView(l.open())}),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(57,"mat-datepicker",23,24),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(59,"div",14),e.\u0275\u0275element(60,"input",25),e.\u0275\u0275elementStart(61,"div",12),e.\u0275\u0275template(62,ta,2,0,"div",13),e.\u0275\u0275template(63,ia,2,0,"div",13),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(64,"div",26)(65,"div",27),e.\u0275\u0275element(66,"input",28),e.\u0275\u0275elementStart(67,"label",29),e.\u0275\u0275template(68,na,2,1,"span",30),e.\u0275\u0275template(69,aa,2,0,"span",30),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275template(70,ra,2,1,"div",31),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(71,"div",32)(72,"div",33)(73,"a",34),e.\u0275\u0275listener("click",function(){return n.onDocuments()}),e.\u0275\u0275text(74,"documents"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(75,"div",35)(76,"button",36),e.\u0275\u0275listener("click",function(){return n.onCancel()}),e.\u0275\u0275text(77,"cancel"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(78,"button",37),e.\u0275\u0275listener("click",function(){return n.onReview()}),e.\u0275\u0275text(79,"review"),e.\u0275\u0275elementEnd()()()}if(2&i){const o=e.\u0275\u0275reference(58);e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(n.applicantsCounter[n.applicants.length]),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate2(" ",e.\u0275\u0275pipeBind2(7,25,n.productStorage.cost*n.currencyStorage.currencyConverter*(n.applicants.length+1),"1.0-0")," ",n.currencyStorage.currencyCode," "),e.\u0275\u0275advance(7),e.\u0275\u0275property("formGroup",n.detailsForm),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngIf",n.detailsForm.get("phone").invalid&&n.detailsForm.get("phone").touched&&!n.detailsForm.get("phone").hasError("minlength")&&!n.detailsForm.get("phone").hasError("pattern")),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.detailsForm.get("phone").touched&&n.detailsForm.get("phone").hasError("minlength")),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.detailsForm.get("phone").touched&&!n.detailsForm.get("phone").hasError("minlength")&&n.detailsForm.get("phone").hasError("pattern")),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",n.detailsForm.get("email").invalid&&n.detailsForm.get("email").touched),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngModel",n.applicantFirstName),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",n.detailsForm.get("firstName").invalid&&n.detailsForm.get("firstName").touched&&!n.detailsForm.get("firstName").hasError("minlength")),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.detailsForm.get("firstName").hasError("minlength")),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",n.detailsForm.get("lastName").invalid&&n.detailsForm.get("lastName").touched&&!n.detailsForm.get("lastName").hasError("minlength")),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.detailsForm.get("lastName").hasError("minlength")),e.\u0275\u0275advance(12),e.\u0275\u0275property("ngIf",n.detailsForm.get("passport").invalid&&n.detailsForm.get("passport").touched&&!n.detailsForm.get("passport").hasError("minlength")),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.detailsForm.get("passport").hasError("minlength")),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",n.detailsForm.get("profession").invalid&&n.detailsForm.get("profession").touched&&!n.detailsForm.get("profession").hasError("minlength")),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.detailsForm.get("profession").hasError("minlength")),e.\u0275\u0275advance(3),e.\u0275\u0275property("matDatepicker",o)("min",n.minDate),e.\u0275\u0275advance(6),e.\u0275\u0275property("ngIf",n.detailsForm.get("travelPurpose").invalid&&n.detailsForm.get("travelPurpose").touched&&!n.detailsForm.get("travelPurpose").hasError("minlength")),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.detailsForm.get("travelPurpose").hasError("minlength")),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngIf",0!==n.applicantID),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",0===n.applicantID),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.isShowExpressEmegencyNote),e.\u0275\u0275advance(8),e.\u0275\u0275property("disabled",n.detailsForm.invali
1d)}},dependencies:[h.O5,d.\u0275NgNoValidate,d.DefaultValueAccessor,d.CheckboxControlValueAccessor,d.NgControlStatus,d.NgControlStatusGroup,d.RequiredValidator,d.MaxLengthValidator,d.PatternValidator,d.FormGroupDirective,d.FormControlName,kt.x,Un.P,Qe,St,ft,Ee,h.JJ],styles:[".express-emergency-note-div[_ngcontent-%COMP%]{color:#e90000;font-size:16px;font-weight:600}"]})}return a})();class Xe{constructor(r,t){this.overlay=r,this.data=t}close(){this.overlay.dispose()}}var sa=m(2613);const la=["detailsTabRef"],ca=["docsTabRef"],da=["detailsLinkRef"],pa=["docsLinkRef"];function ma(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",20),e.\u0275\u0275text(1," Contact number is required "),e.\u0275\u0275elementEnd())}function ua(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",20),e.\u0275\u0275text(1," Contact number should be at least 10 digits "),e.\u0275\u0275elementEnd())}function ha(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",20),e.\u0275\u0275text(1," Please enter a valid email address "),e.\u0275\u0275elementEnd())}function fa(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",20),e.\u0275\u0275text(1," First name is required "),e.\u0275\u0275elementEnd())}function ga(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",20),e.\u0275\u0275text(1," First name should be at least 2 characters "),e.\u0275\u0275elementEnd())}function _a(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",20),e.\u0275\u0275text(1," Last name is required "),e.\u0275\u0275elementEnd())}function va(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",20),e.\u0275\u0275text(1," Last name should be at least 2 characters "),e.\u0275\u0275elementEnd())}function ba(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",20),e.\u0275\u0275text(1," Country of residence is required "),e.\u0275\u0275elementEnd())}function xa(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",20),e.\u0275\u0275text(1," Country of residence should be at least 2 characters "),e.\u0275\u0275elementEnd())}function ya(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",20),e.\u0275\u0275text(1," Please enter your passport number "),e.\u0275\u0275elementEnd())}function Sa(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",20),e.\u0275\u0275text(1," Passport number should be at least 6 characters "),e.\u0275\u0275elementEnd())}function Ca(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",20),e.\u0275\u0275text(1," Profession is required "),e.\u0275\u0275elementEnd())}function Da(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",20),e.\u0275\u0275text(1," Profession should be at least 3 characters "),e.\u0275\u0275elementEnd())}function wa(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",20),e.\u0275\u0275text(1," Purpose of Travel is required "),e.\u0275\u0275elementEnd())}function Ea(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",20),e.\u0275\u0275text(1," Travel purpose should be at least 3 characters "),e.\u0275\u0275elementEnd())}function ka(a,r){if(1&a&&(e.\u0275\u0275elementStart(0,"div",22)(1,"div",67),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd()()),2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" Note: ",t.expressEmergencyNotePara," ")}}function Ma(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",68),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext();const n=e.\u0275\u0275reference(87);return e.\u0275\u0275resetView(n.click())}),e.\u0275\u0275elementEnd()}}function Fa(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",70)(1,"div"),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"shortenText"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div",71),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext(),o=n.$implicit,s=n.index,l=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(l.onDeleteFile(o,s,"passport"))}),e.\u0275\u0275elementEnd()()}if(2&a){const t=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind3(3,1,t.name,20,"..."))}}function Ia(a,r){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,Fa,5,5,"div",69),e.\u0275\u0275elementContainerEnd()),2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",t.filesController.passport.fileUploaded)}}function Aa(a,r){if(1&a&&(e.\u0275\u0275elementStart(0,"div",73),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",t.filesController.passport.message," ")}}function Ta(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",51)(1,"div"),e.\u0275\u0275template(2,Aa,2,1,"div",52),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"div",72),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext();const n=e.\u0275\u0275reference(87);
1return e.\u0275\u0275resetView(n.click())}),e.\u0275\u0275elementEnd()()}if(2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",t.filesController.passport.show)}}function Ra(a,r){if(1&a&&(e.\u0275\u0275elementStart(0,"div",73),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",t.filesController.photo.message,"")}}function Pa(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",72),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext();const n=e.\u0275\u0275reference(95);return e.\u0275\u0275resetView(n.click())}),e.\u0275\u0275elementEnd()}}function Oa(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",71),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(n.onDeleteFile(null,null,"photo"))}),e.\u0275\u0275elementEnd()}}function Va(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",74),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext();const n=e.\u0275\u0275reference(106);return e.\u0275\u0275resetView(n.click())}),e.\u0275\u0275elementEnd()}}function Na(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",70)(1,"div"),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"shortenText"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div",71),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext(),o=n.$implicit,s=n.index,l=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(l.onDeleteFile(o,s,"id"))}),e.\u0275\u0275elementEnd()()}if(2&a){const t=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind3(3,1,t.name,20,"..."))}}function La(a,r){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,Na,5,5,"div",69),e.\u0275\u0275elementContainerEnd()),2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",t.filesController.id.fileUploaded)}}function Ba(a,r){if(1&a&&(e.\u0275\u0275elementStart(0,"div",73),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",t.filesController.id.message," ")}}function ja(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",51)(1,"div"),e.\u0275\u0275template(2,Ba,2,1,"div",52),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"div",72),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext();const n=e.\u0275\u0275reference(106);return e.\u0275\u0275resetView(n.click())}),e.\u0275\u0275elementEnd()()}if(2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",t.filesController.id.show)}}function za(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",75),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext();const n=e.\u0275\u0275reference(115);return e.\u0275\u0275resetView(n.click())}),e.\u0275\u0275elementEnd()}}function Ua(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",70)(1,"div"),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"shortenText"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div",71),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext(),o=n.$implicit,s=n.index,l=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(l.onDeleteFile(o,s,"rft"))}),e.\u0275\u0275elementEnd()()}if(2&a){const t=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind3(3,1,t.name,20,"..."))}}function Ya(a,r){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,Ua,5,5,"div",69),e.\u0275\u0275elementContainerEnd()),2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",t.filesController.returnFlightTicket.fileUploaded)}}function $a(a,r){if(1&a&&(e.\u0275\u0275elementStart(0,"div",73),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",t.filesController.returnFlightTicket.message," ")}}function Ha(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",51)(1,"div"),e.\u0275\u0275template(2,$a,2,1,"div",52),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"div",72),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext();const n=e.\u0275\u0275reference(115);
1return e.\u0275\u0275resetView(n.click())}),e.\u0275\u0275elementEnd()()}if(2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",t.filesController.returnFlightTicket.show)}}function Wa(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",76),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext();const n=e.\u0275\u0275reference(123);return e.\u0275\u0275resetView(n.click())}),e.\u0275\u0275elementEnd()}}function Qa(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",70)(1,"div"),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"shortenText"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div",71),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext(),o=n.$implicit,s=n.index,l=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(l.onDeleteFile(o,s,"hotelRes"))}),e.\u0275\u0275elementEnd()()}if(2&a){const t=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind3(3,1,t.name,20,"..."))}}function Ga(a,r){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,Qa,5,5,"div",69),e.\u0275\u0275elementContainerEnd()),2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",t.filesController.hotelReservation.fileUploaded)}}function Ka(a,r){if(1&a&&(e.\u0275\u0275elementStart(0,"div",73),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",t.filesController.hotelReservation.message," ")}}function qa(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",51)(1,"div"),e.\u0275\u0275template(2,Ka,2,1,"div",52),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"div",72),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext();const n=e.\u0275\u0275reference(123);return e.\u0275\u0275resetView(n.click())}),e.\u0275\u0275elementEnd()()}if(2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",t.filesController.hotelReservation.show)}}function Xa(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",77),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(n.onDelete())}),e.\u0275\u0275text(1,"delete"),e.\u0275\u0275elementEnd()}}const Za=function(a){return{transform:a}},Ja=function(a){return{"background-image":a}};let er=(()=>{class a{constructor(t,i,n,o,s,l,p,c,u){this._editApplicationRef=t,this._actionService=i,this._applicationService=n,this._applyService=o,this._renderer=s,this._uploadService=l,this._dbService=p,this._currencyService=c,this._incompleteOrderService=u,this.cardStyle="",this.minDate=new Date((new Date).setDate((new Date).getDate())),this.uploadedFileDetailsEditSub=new R.w0,this.dateMask={mask:[/\d/,/\d/,"/",/\d/,/\d/,"/",/\d/,/\d/]},this.filesController={passport:{show:!1,message:"",fileUploaded:!0},photo:{show:!1,message:"",fileUploaded:!0},id:{show:!1,message:"",fileUploaded:!0},returnFlightTicket:{show:!1,message:"",fileUploaded:!0},hotelReservation:{show:!1,message:"",fileUploaded:!0}},this.isShowExpressEmegencyNote=!1,this.expressEmergencyNotePara=""}ngOnInit(){this.currencyStorage=this._currencyService.getSelectedCurrencyStorage(),this.cardStyle="scale(1)",this.applicant=this._editApplicationRef.data.data.applicantToEdit,this.applicantFirstName=this.applicant.firstName,this.applicantIndex=this._editApplicationRef.data.data.id,this.uploadedFiles=this.applicant.files,this.applicantID=this.applicant.id,this.initEditForm(),this.photoSource=this.applicant.files.photo[0].blobUrl,this.uploadedFileDetailsEditSub=this._uploadService.uploadedFileDetailsEdit.subscribe(t=>{switch(console.log("uploadedFileDetails:",t),this._applyService.closeActionModal.next(null),t.whatHasBeenUploaded){case"photo":this.filesController.photo.show=!1,this.filesController.photo.fileUploaded=!0,this.uploadedFiles.photo.push(t);break;case"passport":this.filesController.passport.show=!1,this.filesController.passport.fileUploaded=!0,this.uploadedFiles.passport.push(t);break;case"id":this.filesController.id.show=!1,this.filesController.id.fileUploaded=!0,this.uploadedFiles.id.push(t);break;case"rft":this.filesController.returnFlightTicket.show=!1,this.filesController.returnFlightTicket.fileUploaded=!0,this.uploadedFiles.returnFlightTicket.push(t);break;case"hotelRes":this.filesController.hotelReservation.show=!1,this.filesController.hotelReservation.fileUploaded=!0,this.uploadedFiles.hotelReservation.push(t)}}),this.checkIfTodayOrTomorrow(this.editApplicantForm.get("travelDateEdit")?.value),this.editApplicantForm.get("travelDateEdit")?.valueChanges.subscribe(t=>{console.log("travel date on value changes>>>>>>>>>>"),console.log(t),this.checkIfTodayOrTomorrow(t)})}initEditForm(){this.editApplicantForm=new d.UntypedFormGroup({phoneEdit:new d.UntypedFormControl(this.applicant.phone,{validators:[d.Validators.required,d.Validators.minLength(10)]}),emailEdit:new d.UntypedFormControl(this.applicant.email,d.Validators.required),firstNameEdit:new d.UntypedFormControl(this.applicant.firstName,{validators:[d.Validators.required,d.Validators.minLength(2)]}),lastNameEdit:new d.UntypedFormControl(this.applicant.lastName,{validators:[d.Validators.required,d.Validators.minLength(2)]}),nationalityEdit:new d.UntypedFormControl({value:this.applicant.nationality,disabled:!0},d.Validators.required),countryEdit:new d.UntypedFormControl(this.applicant.country,{validators:[d.Validators.required,d.Validators.minLength(2)]}),passportEdit:new d.UntypedFormControl(this.applicant.passportNumber,{validators:[d.Validators.required,d.Validators.minLength(6)]}),professionEdit:new d.UntypedFormControl(this.applicant.profession,{validators:[d.Validators.required,d.Validators.minLength(3)]}),travelDateEdit:new d.UntypedFormControl(new Date(this.applicant.travelDate),d.Validators.required),travelPurposeEdit:new d.UntypedFormControl(this.applicant.travelPurpose,{validators:[d.Validators.required,d.Validators.minLength(3)]}),visitedUaeEdit:new d.UntypedFormControl(this.applicant.visitedUA
1E)})}onDetailsTab(){this._renderer.addClass(this.detailsTabRef.nativeElement,"w--tab-active"),this._renderer.addClass(this.detailsLinkRef.nativeElement,"w--current"),this._renderer.removeClass(this.docsTabRef.nativeElement,"w--tab-active"),this._renderer.removeClass(this.docsLinkRef.nativeElement,"w--current")}onDocsTab(){this._renderer.addClass(this.docsTabRef.nativeElement,"w--tab-active"),this._renderer.addClass(this.docsLinkRef.nativeElement,"w--current"),this._renderer.removeClass(this.detailsTabRef.nativeElement,"w--tab-active"),this._renderer.removeClass(this.detailsLinkRef.nativeElement,"w--current")}onUpdate(){const t=new wt(0===this.applicant.id,this._applyService.toTitleCase(this.editApplicantForm.get("firstNameEdit")?.value),this._applyService.toTitleCase(this.editApplicantForm.get("lastNameEdit")?.value),this._applyService.getNationality().name,this._applyService.toTitleCase(this.editApplicantForm.get("countryEdit")?.value),this.editApplicantForm.get("phoneEdit")?.value,this.editApplicantForm.get("emailEdit")?.value,new Et(this.uploadedFiles.photo,this.uploadedFiles.passport,this.uploadedFiles.id,this.uploadedFiles.returnFlightTicket,this.uploadedFiles.hotelReservation),this.editApplicantForm.get("passportEdit")?.value.toUpperCase(),this._applyService.toTitleCase(this.editApplicantForm.get("professionEdit")?.value),new Date(this.editApplicantForm.get("travelDateEdit")?.value).toDateString(),this._applyService.toTitleCase(this.editApplicantForm.get("travelPurposeEdit")?.value),this.editApplicantForm.get("visitedUaeEdit")?.value,this.applicant.id);this._applicationService.updateApplicant(this.applicantIndex,t),this._applicationService.updateTravelDateOfAllApplicants(new Date(this.editApplicantForm.get("travelDateEdit")?.value).toDateString()),this._applicationService.updateTravelPurposeOfAllApplicants(this.editApplicantForm.get("travelPurposeEdit")?.value),this._incompleteOrderService.addOrUpdateApplicants(),this._incompleteOrderService.updateSingleField("recentActionTaken","update an applicant"),this.onCancel()}onDelete(){this._applicationService.deleteApplicant(this.applicantIndex),this._incompleteOrderService.addOrUpdateApplicants(),this.onCancel()}onCancel(){this.cardStyle="scale(0.9)",this._editApplicationRef.close(),this._applyService.blobUrlAvailability.next(!0)}startUpload(t,i){t.length>2?this.filesController.passport={show:!0,message:"Please upload 2 files maximum",fileUploaded:!1}:0!==t.length&&this.checkFiles(t,i)}checkFiles(t,i){switch(i){case"photo":this.whatToUploadFileType="Photograph";break;case"passport":this.whatToUploadFileType="Passport";break;case"id":this.whatToUploadFileType="National ID";break;case"rft":this.whatToUploadFileType="Return Flight Ticket";break;case"hotelRes":this.whatToUploadFileType="Hotel Reservation"}for(let n=0;n<t.item.length;n++){const o=t.item(n);if(o.size>b.N.allowedFileSise){switch(i){case"photo":this.filesController.photo.show=!0,this.filesController.photo.message="File size too large";break;case"passport":this.filesController.passport.show=!0,this.filesController.passport.message="File size too large";break;case"id":this.filesController.id.show=!0,this.filesController.id.message="File size too large";break;case"rft":this.filesController.returnFlightTicket.show=!0,this.filesController.returnFlightTicket.message="File size too large";break;case"hotelRes":this.filesController.hotelReservation.show=!0,this.filesController.hotelReservation.message="File size too large"}return}if("application/pdf"===o?.type||"image"===o?.type.split("/")[n])switch(this._actionService.open({data:{actionType:"uploading",actionMessage:this.whatToUploadFileType}}),i){case"photo":const s=t.item(0);this.photoSource=window.URL.createObjectURL(s),this._uploadService.bloburl=this.photoSource,this._uploadService.prepareUpload(t,"photo",this.applicantID,"edit");break;case"passport":this._uploadService.prepareUpload(t,"passport",this.applicantID,"edit");break;case"id":this._uploadService.prepareUpload(t,"id",this.applicantID,"edit");break;case"rft":this._uploadService.bloburl="n/a",this._uploadService.prepareUpload(t,"rft",this.applicantID,"edit");break;case"hotelRes":this._uploadService.bloburl="n/a",this._uploadService.prepareUpload(t,"hotelRes",this.applicantID,"edit")}else switch(i){case"photo":this.filesController.photo.show=!0,this.filesController.photo.message="Invalid file format.";break;case"passport":this.filesController.passport.show=!0,this.filesController.passport.message="Invalid file format.";break;case"id":this.filesController.id.show=!0,this.filesController.id.message="Invalid file format.";break;case"rft":this.filesController.returnFlightTicket.show=!0,this.filesController.returnFlightTicket.message="Invalid file format.";break;case"hotelRes":this.filesController.hotelReservation.show=!0,this.filesController.hotelReservation.message="Invalid file format."}}}onDeleteFile(t,i,n){switch(n){case"photo":this.whatToDeleteFileType="Deleting Photograph";break;case"passport":this.whatToDeleteFileType="Deleting Passport";break;case"id":this.whatToDeleteFileType="Deleting National ID";break;case"rft":this.whatToDeleteFileType="Deleting Return Flight Ticket";break;case"hotelRes":this.whatToDeleteFileType="Deleting Hotel Reservation"}switch(this._actionService.open({data:{actionType:"operation",actionMessage:this.whatToDeleteFileType}}),n){case"photo":this._dbService.deleteUplaodFile(this.uploadedFiles.photo[0].folderName,this.uploadedFiles.photo[0].whatHasBeenUploaded,this.uploadedFiles.photo[0].uploadedFileName).then(()=>{this._applyService.closeActionModal.next(null),this.uploadedFiles.photo.splice(i,1),this.photoSource="../../assets/images/person.svg",this._applyService.blobUrlAvailability.next(!1)}).catch(()=>{alert("Unable to delete file, please try again."),this._applyService.closeActionModal.next(null)});break;case"id":this._dbService.deleteUplaodFile(t.folderName,t.whatHasBeenUploaded,t.uploadedFileName).then(()=>{this._applyService.closeActionModal.next(null),this.uploadedFiles.id.splice(i,1)}).catch(()=>{alert("Unable to delete file, please try again."),this._applyService.closeActionModal.next(null)});break;case"passport":this._dbService.deleteUplaodFile(t.folderName,t.whatHasBeenUploaded,t.uploadedFileName).then(()=>{this._applyService.closeActionModal.next(null),this.uploadedFiles.passport.splice(i,1)}).catch(()=>{alert("Unable to delete file, please try again."),this._applyService.closeActionModal.next(null)});break;case"rft":this._dbService.deleteUplaodFile(t.folderName,t.whatHasBeenUploaded,t.uploadedFileName).then(()=>{this._applyService.closeActionModal.next(null),this.uploadedFiles.returnFlightTicket.splice(i,1)}).catch(()=>{alert("Unable to delete file, please try again.")});break;case"hotelRes":this._dbService.deleteUplaodFile(t.folderName,t.whatHasBeenUploaded,t.uploadedFileName).then(()=>{this._applyService.closeActionModal.next(null),this.uploadedFiles.hotelReservation.splice(i,1)}).catch(()=>{alert("Unable to delete file, please try again.")})}}ngOnDestroy(){this.uploadedFileDetailsEditSub.unsubscribe()}checkIfTodayOrTomorrow(t){const i=new Date(t),n=new Date;i.toDateString()===n.toDateString()?(this.isShowExpressEmegencyNote=!0,this.expressEmergencyNotePara="Emergency Service charges "+(b.N.extraServices.emerygencyService*this.currencyStorage.currencyConverter).toFixed(0)+" "+this.currencyStorage.currencyCode+" per applicant will be applied"):(n.setDate(n.getDate()+1),i.toDateString()===n.toDateString()?(this.isShowExpressEmegencyNote=!0,this.expressEmergencyNotePara="Express Service charges "+(b.N.extraServices.expressService*this.currencyStorage.currencyConverter).toFixed(0)+" "+this.currencyStorage.currencyCode+" per applicant will be applied"):(this.isShowExpressEmegencyNote=!1,this.expressEmergencyNotePara=""))}static#e=this.\u0275fac=function(i){return new(i||a)(e.\u0275\u0275directiveInject(Xe),e.\u0275\u0275directiveInject(pe),e.\u0275\u0275directiveInject(ne.I),e.\u0275\u0275directiveInject(ae.g),e.\u0275\u0275directiveInject(e.Renderer2),e.\u0275\u0275directiveInject(ke),e.\u0275\u0275directiveInject(ge.M),e.\u0275\u0275directiveInject(_e.i),e.\u0275\u0275directiveInject(de.G))};static#t=this.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["app-edit-application"]],viewQuery:function(i,n){if(1&i&&(e.\u0275\u0275viewQuery(la,7),e.\u0275\u0275viewQuery(ca,7),e.\u0275\u0275viewQuery(da,7),e.\u0275\u0275viewQuery(pa,7)),2&i){let o;e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.detailsTabRef=o.first),e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.docsTabRef=o.first),e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.detailsLinkRef=o.first),e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.docsLinkRef=o.first)}},decls:138,vars:58,consts:[[1,"app-modal-wr","edit",3,"ngStyle"],[1,"app-modal-header-wr"],[1,"app-modal-body-wr"],[1,"tabs","w-tabs"],[1,"tabs-menu","w-tab-menu"],[1,"tab-link","w-inline-block","w-tab-link","w--current",3,"click"],["detailsLinkRef",""],[1,"tab-link","w-inline-block","w-tab-link",3,"click"],["docsLinkRef",""],[1,"tabs-content","w-tab-content"],[1,"tab-pane","w-tab-pane","w--tab-active"],["detailsTabRef",""],[1,"app-modal-body","app-modal-body-edit"],[1,"app-modal-form-wr","app-modal-forrm-edit"],[1,"w-form"],[3,"formGroup"],[1,"input-group"],[1,"input-container"],["appNumbersOnly","","maxlength","30","autocomplete","no","inputmode","tel","formControlName","phone
1Edit","placeholder","Contact Number",1,"input-field","input-contact","w-input"],[1,"error-text-wr"],[1,"error-text"],["class","error-text",4,"ngIf"],[1,"input-container-right"],["type","text","autocomplete","no","inputmode","email","maxlength","100","pattern","[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$","formControlName","emailEdit","placeholder","Email Address",1,"input-field","input-email","w-input"],["appLettersOnly","","type","text","autocomplete","no","maxlength","50","formControlName","firstNameEdit","placeholder","First Name or any middle names",1,"input-field","input-person","w-input",3,"ngModel","ngModelChange"],["type","text","appLettersOnly","","autocomplete","no","maxlength","50","formControlName","lastNameEdit","placeholder","Last Name",1,"input-field","input-person","w-input"],["type","text","formControlName","nationalityEdit","placeholder","Nationality",1,"input-field","input-nationality","w-input"],["appLettersOnly","","autocomplete","no","maxlength","100","type","text","formControlName","countryEdit","placeholder","Country of Residence",1,"input-field","input-country","w-input"],["appCharacters","","maxlength","50","autocomplete","no","type","text","formControlName","passportEdit","placeholder","Passport No",1,"input-field","input-passport","w-input"],["appLettersOnly","","autocomplete","no","maxlength","50","type","text","formControlName","professionEdit","placeholder","Profession",1,"input-field","input-work","w-input"],["formControlName","travelDateEdit","required","","placeholder","Travel Date","readonly","",1,"input-field","input-calendar","w-input",2,"cursor","pointer",3,"matDatepicker","min","click","focus"],["touchUi",""],["picker",""],["appLettersOnly","","type","text","autocomplete","no","maxlength","20","formControlName","travelPurposeEdit","placeholder","Purpose of Travel",1,"input-field","input-bag","w-input"],[1,"checkbox-container"],["type","checkbox","formControlName","visitedUaeEdit",3,"id"],[3,"for"],["class","input-container-right",4,"ngIf"],[1,"tab-pane","w-tab-pane"],["docsTabRef",""],[1,"app-modal-card-wr","edit"],["type","file","hidden","","accept",".jpg,.png,.jpeg,.pdf",3,"change"],["passportEditUploadRef",""],[1,"app-card","w-inline-block"],["class","card-icon-modal",3,"click",4,"ngIf"],[1,"card-header"],[4,"ngFor","ngForOf"],["class","app-card-footer",4,"ngIf"],["type","file","hidden","","accept",".jpg,.png,.jpeg",3,"disabled","change"],["photoUploadEdit",""],[1,"card-icon-modal","person",3,"ngStyle","click"],[1,"app-card-footer"],["class","error-text upload-file-error",4,"ngIf"],["class","file-control-icon",3,"click",4,"ngIf"],["class","file-control-icon delete-file",3,"click",4,"ngIf"],["idUploadEditRef",""],["class","card-icon-modal national-id",3,"click",4,"ngIf"],["rftEditRef",""],["class","card-icon-modal return-flight-ticket",3,"click",4,"ngIf"],["hrEditRef",""],["class","card-icon-modal hotel-reservation",3,"click",4,"ngIf"],[1,"app-modal-footer","app-modal-footer-edit"],[1,"app-modal-footer-left"],["class","bp-btn bp-modal-delete w-button",3,"click",4,"ngIf"],[1,"app-modal-footer-right"],["tabindex","0","cdkTrapFocus","",1,"bp-btn","bp-modal-cancel","w-button",3,"disabled","click"],["tabindex","1",1,"bp-btn","btn-modal-next","w-button",3,"disabled","click"],[1,"express-emergency-note-div"],[1,"card-icon-modal",3,"click"],["class","uploaded-file-wr",4,"ngIf"],[1,"uploaded-file-wr"],[1,"file-control-icon","delete-file",3,"click"],[1,"file-control-icon",3,"click"],[1,"error-text","upload-file-error"],[1,"card-icon-modal","national-id",3,"click"],[1,"card-icon-modal","return-flight-ticket",3,"click"],[1,"card-icon-modal","hotel-reservation",3,"click"],[1,"bp-btn","bp-modal-delete","w-button",3,"click"]],template:function(i,n){if(1&i){const o=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"div"),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"shortenText"),e.\u0275\u0275pipe(5,"shortenText"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(6,"div",2)(7,"div",3)(8,"div",4)(9,"a",5,6),e.\u0275\u0275listener("click",function(){return n.onDetailsTab()}),e.\u0275\u0275elementStart(11,"div"),e.\u0275\u0275text(12,"Details"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(13,"a",7,8),e.\u0275\u0275listener("click",function(){return n.onDocsTab()}),e.\u0275\u0275elementStart(15,"div"),e.\u0275\u0275text(16,"Documents"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(17,"div",9)(18,"div",10,11)(20,"div",12)(21,"div",13)(22,"div",14)(23,"form",15)(24,"div",16)(25,"div",17),e.\u0275\u0275element(26,"input",18),e.\u0275\u0275elementStart(27,"div",19)(28,"div",20),e.\u0275\u0275template(29,ma,2,0,"div",21),e.\u0275\u0275template(30,ua,2,0,"div",21),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(31,"div",22),e.\u0275\u0275element(32,"input",23),e.\u0275\u0275elementStart(33,"div",19),e.\u0275\u0275template(34,ha,2,0,"div",21),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(35,"div",16)(36,"div",17)(37,"input",24),e.\u0275\u0275listener("ngModelChange",function(l){return n.applicantFirstName=l}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(38,"div",19),e.\u0275\u0275template(39,fa,2,0,"div",21),e.\u0275\u0275template(40,ga,2,0,"div",21),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(41,"div",22),e.\u0275\u0275element(42,"
1input",25),e.\u0275\u0275elementStart(43,"div",19),e.\u0275\u0275template(44,_a,2,0,"div",21),e.\u0275\u0275template(45,va,2,0,"div",21),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(46,"div",16)(47,"div",17),e.\u0275\u0275element(48,"input",26)(49,"div",19),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(50,"div",22),e.\u0275\u0275element(51,"input",27),e.\u0275\u0275elementStart(52,"div",19),e.\u0275\u0275template(53,ba,2,0,"div",21),e.\u0275\u0275template(54,xa,2,0,"div",21),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(55,"div",16)(56,"div",17),e.\u0275\u0275element(57,"input",28),e.\u0275\u0275elementStart(58,"div",19),e.\u0275\u0275template(59,ya,2,0,"div",21),e.\u0275\u0275template(60,Sa,2,0,"div",21),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(61,"div",22),e.\u0275\u0275element(62,"input",29),e.\u0275\u0275elementStart(63,"div",19),e.\u0275\u0275template(64,Ca,2,0,"div",21),e.\u0275\u0275template(65,Da,2,0,"div",21),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(66,"div",16)(67,"div",17)(68,"input",30),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(o);const l=e.\u0275\u0275reference(70);return e.\u0275\u0275resetView(l.open())})("focus",function(){e.\u0275\u0275restoreView(o);const l=e.\u0275\u0275reference(70);return e.\u0275\u0275resetView(l.open())}),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(69,"mat-datepicker",31,32),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(71,"div",22),e.\u0275\u0275element(72,"input",33),e.\u0275\u0275elementStart(73,"div",19),e.\u0275\u0275template(74,wa,2,0,"div",21),e.\u0275\u0275template(75,Ea,2,0,"div",21),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(76,"div",16)(77,"div",17)(78,"div",34),e.\u0275\u0275element(79,"input",35),e.\u0275\u0275elementStart(80,"label",36),e.\u0275\u0275text(81),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275template(82,ka,3,1,"div",37),e.\u0275\u0275elementEnd()()()()()(),e.\u0275\u0275elementStart(83,"div",38,39)(85,"div",40)(86,"input",41,42),e.\u0275\u0275listener("change",function(l){return n.startUpload(l.target.files,"passport")}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(88,"a",43),e.\u0275\u0275template(89,Ma,1,0,"div",44),e.\u0275\u0275elementStart(90,"h1",45),e.\u0275\u0275text(91,"Passport"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(92,Ia,2,1,"ng-container",46),e.\u0275\u0275template(93,Ta,4,1,"div",47),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(94,"input",48,49),e.\u0275\u0275listener("change",function(l){return n.startUpload(l.target.files,"photo")}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(96,"a",43)(97,"div",50),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(o);const l=e.\u0275\u0275reference(95);return e.\u0275\u0275resetView(l.click())}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(98,"h1",45),e.\u0275\u0275text(99,"Photograph"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(100,"div",51)(101,"div"),e.\u0275\u0275template(102,Ra,2,1,"div",52),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(103,Pa,1,0,"div",53),e.\u0275\u0275template(104,Oa,1,0,"div",54),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(105,"input",41,55),e.\u0275\u0275listener("change",function(l){return n.startUpload(l.target.files,"id")}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(107,"a",43),e.\u0275\u0275template(108,Va,1,0,"div",56),e.\u0275\u0275elementStart(109,"h1",45),e.\u0275\u0275text(110,"National ID"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(111,La,2,1,"ng-container",46),e.\u0275\u0275template(112,ja,4,1,"div",47),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(113,"div",40)(114,"input",41,57),e.\u0275\u0275listener("change",function(l){return n.startUpload(l.target.files,"rft")}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(116,"a",43),e.\u0275\u0275template(117,za,1,0,"div",58),e.\u0275\u0275elementStart(118,"h1",45),e.\u0275\u0275text(119,"Return Flight Ticket"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(120,Ya,2,1,"ng-container",46),e.\u0275\u0275template(121,Ha,4,1,"div",47),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(122,"input",41,59),e.\u0275\u0275listener("change",function(l){return n.startUpload(l.target.files,"hotelRes")}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(124,"a",43),e.\u0275\u0275template(125,Wa,1,0,"div",60),e.\u0275\u0275elementStart(126,"h1",45),e.\u0275\u0275text(127,"Hotel Reservation"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(128,Ga,2,1,"ng-container",46),e.\u0275\u0275template(129,qa,4,1,"div",47),e.\u0275\u0275elementEnd()()()()(),e.\u0275\u0275elementStart(130,"div",61)(131,"div",62),e.\u0275\u0275template(132,Xa,2,0,"button",63),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(133,"div",64)(134,"button",65),e.\u0275\u0275listener("click",function(){return n.onCancel()}),e.\u0275\u0275text(135,"cancel "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(136,"button",66),e.\u0275\u0275listener("click",function(){return n.onUpdate()}),e.\u0275\u0275text(137,"update "),e.\u0275\u0275elementEnd()()()()()}if(2&i){const o=e.\u0275\u0275reference(70);e.\u0275\u0275property("ngStyle",e.\u0275\u0275pureFunction1(54,Za,n.cardStyle)),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate2("Edit ",e.\u0275\u0275pipeBind3(4,46,n.applicant.firstName,10,".")," ",e.\u0275\u0275pipeBind3(5,50,null==n.applicant?null:n.applicant.lastName,10,".")," Application "),e.\u0275\u0275advance(20),e.\u0275\u0275property("formGroup",n.editApplicantForm),e.\u0275\u0275advance(6),e.\u0275\u0275property("ngIf",n.editApplicantForm.get("phoneEdit").invalid&&n.editApplicantForm.get("phoneEdit").touched&&!n.editApplicantForm.get("phoneEdit").hasError("minlength")),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.editApplicantForm.get("phoneEdit").touched&&n.editApplicantForm.get("phoneEdit").hasError("minlength")),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",n.editApplicantForm.get("emailEdit").invalid&&n.editApplicantForm.get("emailEdit").touched),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngModel",n.applicantFirstName),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",n.editApplicantForm.get("firstNameEdit").invalid&&n.editApplicantForm.get("firstNameEdit").touched&&!n.editApplicantForm.get("firstNameEdit").hasError("minlength")),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.editApplicantForm.get("firstNameEdit").hasError("minlength")),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",n.editApplicantForm.get("lastNameEdit").invalid&&n.editApplicantForm.get("lastNameEdit").touched&&!n.editApplicantForm.get("lastNameEdit").hasError("minlength")),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.editApplicantForm.get("lastNameEdit").hasError("minlength")),e.\u0275\u0275advance(8),e.\u0275\u0275property("ngIf",n.editApplicantForm.get("countryEdit").invalid&&n.editApplicantForm.get("countryEdit").touched&&!n.editApplicantForm.get("countryEdit").hasError("minlength")),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.editApplicantForm.get("countryEdit").hasError("minlength")),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngIf",n.editApplicantForm.get("passportEdit").invalid&&n.editApplicantForm.get("passportEdit").touched&&!n.editApplicantForm.get("passportEdit").hasError("minlength")),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.editApplicantForm.get("passportEdit").hasError("minlength")),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",n.editApplicantForm.get("professionEdit").invalid&&n.editApplicantForm.get("professionEdit").touched&&!n.editApplicantForm.get("professionEdit").hasError("minlength")),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.editApplicantForm.get("professionEdit").hasError("minlength")),e.\u0275\u0275advance(3),e.\u0275\u0275property("matDatepicker",o)("min",n.minDate),e.\u0275\u0275advance(6),e.\u0275\u0275property("ngIf",n.editApplicantForm.get("travelPurposeEdit").invalid&&n.editApplicantForm.get("travelPurposeEdit").touched&&!n.editApplicantForm.get("travelPurposeEdit").hasError("minlength")),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.editApplicantForm.get("travelPurposeEdit").hasError("minlength")),e.\u0275\u0275advance(4),e.\u0275\u0275propertyInterpolate1("id","visited-uae-edit-",n.applicantIndex,""),e.\u0275\u0275advance(1),e.\u0275\u0275propertyInterpolate1("for","visited-uae-edit-",n.applicantIndex,""),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",n.applicantFirstName," have visited the UAE before "),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.isShowExpressEmegencyNote),e.\u0275\u0275advance(7),e.\u0275\u0275property("ngIf",0===n.uploadedFiles.passport.length),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngForOf",n.uploadedFiles.passport),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.uploadedFiles.passport.length<2),e.\u0275\u0275advance(1),e.\u0275\u0275property("disabled",1===n.uploadedFiles.photo.length),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngStyle",e.\u0275\u0275pureFunction1(56,Ja,"url("+n.photoSource+")")),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngIf",n.filesController.photo.show),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",0===n.uploadedFiles.photo.length),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",1===n.uploadedFiles.photo.length),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",0===n.uploadedFiles.id.length),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngForOf",n.uploadedFiles.id),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.uploadedFiles.id.length<2),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngIf",0===n.uploadedFiles.returnFlightTicket.length),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngForOf",n.uploadedFiles.returnFlightTicket),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.uploadedFiles.returnFlightTicket.length<2),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",0===n.uploadedFiles.hotelReservation.length),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngForOf",n.uploadedFiles.hotelReservation),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.uploadedFiles.hotelReservation.length<2),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",!n.applicant.isMainApplicant),e.\u0275\u0275advance(2),e.\u0275\u0275property("disabled",0===n.uploadedFiles.passport.length||0===n.uploadedFiles.photo.length||0===n.uploadedFiles.id.length||0===n.uploadedFiles.returnFlightTicket.length||0===n.uploadedFiles.hotelReservation.length||n.editApplicantForm.invali
1d),e.\u0275\u0275advance(2),e.\u0275\u0275property("disabled",0===n.uploadedFiles.passport.length||0===n.uploadedFiles.photo.length||0===n.uploadedFiles.id.length||0===n.uploadedFiles.returnFlightTicket.length||0===n.uploadedFiles.hotelReservation.length||n.editApplicantForm.invalid)}},dependencies:[h.sg,h.O5,h.PC,d.\u0275NgNoValidate,d.DefaultValueAccessor,d.CheckboxControlValueAccessor,d.NgControlStatus,d.NgControlStatusGroup,d.RequiredValidator,d.MaxLengthValidator,d.PatternValidator,d.FormGroupDirective,d.FormControlName,sa.I,kt.x,w.mK,ft,Ee,qe],styles:[".app-modal-wr.edit[_ngcontent-%COMP%]{overflow:visible;width:100%;height:655px;max-width:1000px;flex:0 0 auto;box-shadow:1px 8px 6px -7px #000}.app-modal-body.app-modal-body-edit[_ngcontent-%COMP%]{height:450px;padding-top:0;padding-right:0;padding-left:0;flex-wrap:wrap;flex:0 0 auto}.app-modal-form-wr.app-modal-forrm-edit[_ngcontent-%COMP%]{height:auto;padding-top:20px;flex:0 0 auto}.app-modal-wr.edit[_ngcontent-%COMP%]{overflow:visible;transform:scale(.9);width:850px;height:650px;flex:0 0 auto;box-shadow:1px 8px 6px -7px #000;transition:all .4s ease}.app-modal-card-wr.edit[_ngcontent-%COMP%]{width:100%;height:225px;padding:0 30px;justify-content:center;flex:1}.app-card.app-edit[_ngcontent-%COMP%]{height:170px;padding-top:15px;justify-content:space-between;border-radius:0}.app-card.app-edit[_ngcontent-%COMP%]:hover{transform:none}.card-header.card-header-edit[_ngcontent-%COMP%]{margin-bottom:10px;font-size:14px;line-height:14px}.app-modal-footer.app-modal-footer-edit[_ngcontent-%COMP%]{padding-top:20px;padding-bottom:20px;flex:0 0 auto;background-color:#fff}.tabs-content[_ngcontent-%COMP%]{width:100%;height:450px}.tabs[_ngcontent-%COMP%]{width:100%;padding-top:20px;padding-right:20px;padding-left:20px}.tabs-menu[_ngcontent-%COMP%]{display:flex;border-bottom:2px solid #e90000}.tab-link[_ngcontent-%COMP%]{margin-right:0}.tab-link.w--current[_ngcontent-%COMP%]{background-color:#fff}@media (max-width: 991px){.app-modal-wr.edit[_ngcontent-%COMP%]{height:auto;width:100vw}.tabs-content[_ngcontent-%COMP%], .app-modal-body.app-modal-body-edit[_ngcontent-%COMP%]{height:auto}.app-modal-card-wr.edit[_ngcontent-%COMP%]{height:auto;padding-top:20px;padding-bottom:20px}}.express-emergency-note-div[_ngcontent-%COMP%]{color:#e90000;font-size:16px;font-weight:600}"]})}return a})(),tr=(()=>{class a{constructor(t,i){this.overlay=t,this.injector=i}open(t){const i=this.overlay.create(this.getOverlayConfig()),n=new Xe(i,t),o=this.createInjector(n,this.injector);return i.attach(new V.C5(er,null,o)),n}getOverlayConfig(){return new E.X_({hasBackdrop:!0,positionStrategy:this.getOverlayPosition(),scrollStrategy:this.overlay.scrollStrategies.block(),panelClass:"application-panel"})}getOverlayPosition(){return this.overlay.position().global().centerVertically().centerHorizontally()}createInjector(t,i){const n=new WeakMap([[Xe,t]]);return new V.nK(i,n)}static#e=this.\u0275fac=function(i){return new(i||a)(e.\u0275\u0275inject(E.aV),e.\u0275\u0275inject(e.Injector))};static#t=this.\u0275prov=e.\u0275\u0275defineInjectable({token:a,factory:a.\u0275fac,providedIn:fe.m})}return a})();var Mt=m(8466),ir=m(3323);const nr=["selectedVisaType"],ar=["visaTypeNav"];function rr(a,r){1&a&&(e.\u0275\u0275elementStart(0,"div",29),e.\u0275\u0275text(1,"Change Visa Type?"),e.\u0275\u0275elementEnd())}function or(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"a",30),e.\u0275\u0275listener("click",function(){const o=e.\u0275\u0275restoreView(t).$implicit,s=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(s.onVisaTypeList(o))}),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"number"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd()}if(2&a){const t=r.$implicit,i=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate4(" ",t.lang[i.lang].fields.name," - ","single"===t.visaType?"Single Visa Entry":"Multiple Visa Entry"," - ",i.currencyStorage.currencyCode," ",e.\u0275\u0275pipeBind2(3,4,t.cost*i.currencyStorage.currencyConverter,"1.0-0"),"")}}function sr(a,r){if(1&a&&(e.\u0275\u0275elementStart(0,"div",31),e.\u0275\u0275text(1,"You may add "),e.\u0275\u0275elementStart(2,"span",32),e.\u0275\u0275text(3),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(4,"br"),e.\u0275\u0275text(5),e.\u0275\u0275elementEnd()),2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",t.maxAllowedApplicants-t.applicants.length,""),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1("more applicant",t.applicants.length===t.maxAllowedApplicants-1?"":"s"," ")}}function lr(a,r){1&a&&e.\u0275\u0275element(0,"div",33)}function cr(a,r){1&a&&e.\u0275\u0275element(0,"div",34)}function dr(a,r){1&a&&(e.\u0275\u0275elementStart(0,"span")(1,"h1",35),e.\u0275\u0275text(2,"Add Another"),e.\u0275\u0275element(3,"br"),e.\u0275\u0275text(4,"Applicant?"),e.\u0275\u0275elementEnd()())}function pr(a,r){1&a&&(e.\u0275\u0275elementStart(0,"span")(1,"h1",36),e.\u0275\u0275text(2,"You have reached the maximum allowed number of applicants"),e.\u0275\u0275elementEnd()())}const mr=function(a){return{"background-image":a}};function ur(a,r){if(1&a&&e.\u0275\u0275element(0,"div",40),2&a){const t=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275property("ngStyle",e.\u0275\u0275pureFunction1(1,mr,"url("+t.files.photo[0].blobUrl+")"))}}function hr(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"a",37),e.\u0275\u0275listener("click",function(){const n=e.\u0275\u0275restoreView(t),o=n.$implicit,s=n.index,l=e.\u0275\u0275nextContext();
1return e.\u0275\u0275resetView(l.onEditApplicant(o,s))}),e.\u0275\u0275template(1,ur,1,3,"div",38),e.\u0275\u0275elementStart(2,"h1",39),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"shortenText"),e.\u0275\u0275element(5,"br"),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"shortenText"),e.\u0275\u0275elementEnd()()}if(2&a){const t=r.$implicit,i=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",i.isAvatarBlobUrlAvailable),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1("",e.\u0275\u0275pipeBind3(4,3,t.firstName,10,".")," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind3(7,7,t.lastName,1,"."),"")}}let fr=(()=>{class a{constructor(t,i,n,o,s,l,p,c,u,_){this._actionService=t,this._editApplicationService=i,this._applyService=n,this._applicationService=o,this._renderer=s,this._currencyService=l,this._productService=p,this._languageService=c,this.expressEmergencyService=u,this._incompleteOrderService=_,this.productChangedSub=new R.w0,this.blobUrlAvailabilitySub=new R.w0,this.isAvatarBlobUrlAvailable=!0,this.specialNationalityCost=0}ngOnInit(){this.lang=this._languageService.getLanguageStorage().code,this.productType=this._productService.getProductTypeStorage(),this.blobUrlAvailabilitySub=this._applyService.blobUrlAvailability.subscribe(t=>{this.isAvatarBlobUrlAvailable=t}),this._productService.productChanged.subscribe(()=>{this.productStorage=this._productService.getSingleProductStorage(),this._incompleteOrderService.updateSingleField("product",this.productStorage),this._incompleteOrderService.updateSingleField("recentActionTaken","changed a product on review tab")}),this.products=this._productService.getAllProductsStorage(),this.maxAllowedApplicants=b.N.maxAllowedApplicants,this.productStorage=this._productService.getSingleProductStorage(),this.currencyStorage=this._currencyService.getSelectedCurrencyStorage(),this.applicants=this._applicationService.getApplicationStorage()}onEditApplicant(t,i){this._editApplicationService.open({data:{id:i,applicantToEdit:t}})}onAddApplicant(){this._applyService.addNewApplicant.next(null),this._incompleteOrderService.updateSingleField("recentActionTaken","clicked on add another applicant"),this._applyService.scrollToTop.next(null)}onCancel(){this._actionService.open({data:{actionType:"cancel"}})}onVisaTypeList(t){this.selectedVisaType.nativeElement.innerText=`${t.lang[this.lang].fields.name} - ${"single"===t.visaType?"Single Visa Entry":"Multiple Visa Entry"} - ${this.currencyStorage.currencyCode} ${Math.round(t.cost*this.currencyStorage.currencyConverter).toLocaleString()}`,this._productService.setSingleProductStorage(t),this._productService.productChanged.next(null),this._renderer.removeClass(this.visaTypeNav.nativeElement,"w--open")}onCheckout(){this.expressEmergencyService.previousSelectedDate.next(""),this.expressEmergencyService.initialSelectedDate.next(this.applicants[0].travelDate),this.expressEmergencyService.checkIfTodayOrTomorrow(this.applicants),this._incompleteOrderService.updateSingleField("currentStep","checkout"),this._incompleteOrderService.updateSingleField("lastStep","review"),this._incompleteOrderService.updateSingleField("recentActionTaken","moved to checkout tab"),this._applyService.scrollToTop.next(null)}static#e=this.\u0275fac=function(i){return new(i||a)(e.\u0275\u0275directiveInject(pe),e.\u0275\u0275directiveInject(tr),e.\u0275\u0275directiveInject(ae.g),e.\u0275\u0275directiveInject(ne.I),e.\u0275\u0275directiveInject(e.Renderer2),e.\u0275\u0275directiveInject(_e.i),e.\u0275\u0275directiveInject(ve.M),e.\u0275\u0275directiveInject(Mt.T),e.\u0275\u0275directiveInject(Ke),e.\u0275\u0275directiveInject(de.G))};static#t=this.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["app-review"]],viewQuery:function(i,n){if(1&i&&(e.\u0275\u0275viewQuery(nr,7),e.\u0275\u0275viewQuery(ar,7)),2&i){let o;e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.selectedVisaType=o.first),e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.visaTypeNav=o.first)}},decls:43,vars:23,consts:[[1,"app-modal-body-header"],[1,"modal-applicant-header"],[1,"header-left"],[1,"order-total"],[1,"app-modal-body"],[1,"app-modal-column-group"],[1,"app-modal-column"],["class","app-column-header justified-left",4,"ngIf"],[2,"width","100%",3,"hidden"],[1,"select-visa-dropdown","w-dropdown"],["appDropdown","","classNameToToggle","w--open",1,"select-visa-toggle","w-dropdown-toggle"],[1,"w-icon-dropdown-toggle"],["selectedVisaType",""],[1,"select-visa-list","w-dropdown-list"],["visaTypeNav",""],[4,"ngFor","ngForOf"],["class","card-header card-header-big",4,"ngIf"],[1,"app-card","app-add-applicant","w-inline-block",3,"disabled","click"],["class","card-icon-modal add-applicant",4,"ngIf"],["class","card-icon-modal info",4,"ngIf"],[4,"ngIf"],[1,"app-column-header"],[1,"applicants-avatars"],["class","edit-applicant-card w-inline-block",3,"click",4,"ngFor","ngForOf"],[1,"app-modal-footer"],[1,"app-modal-footer-left"],[1,"app-modal-footer-right"],[1,"bp-btn","bp-modal-cancel","w-button",3,"click"],["awNextStep","",1,"bp-btn","btn-modal-next","w-button",3,"click"],[1,"app-column-header","justified-left"],[1,"select-visa-link","w-dropdown-link",3,"click"],[1,"card-header","card-header-big"],[1,"red-text-large"],[1,"card-icon-modal","add-applicant"],[1,"card-icon-modal","info"],[1,"card-header"],[1,"card-header",2,"font-size","14px"],[1,"edit-applicant-card","w-inline-block",3,"click"],["class","applicant-avatar",3,"ngStyle",4,"ngIf"],[1,"applicant-avatar-name"],[1,"applicant-avatar",3,"ngStyle"]],template:function(i,n){1&i&&(e.\u0275\u0275elementStart(0,"div",0)(1,"h1",1),e.\u0275\u0275text(2,"confirm or edit your order"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"h1",2),e.\u0275\u0275text(4,"Order Total: "),e.\u0275\u0275elementStart(5,"span",3),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"number"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(8,"div",4)(9,"div",5)(10,"div",6),e.\u0275\u0275template(11,rr,2,0,"div",7),e.\u0275\u0275elementStart(12,"div",8)(13,"div",9)(14,"div",10),e.\u0275\u0275element(15,"div",11),e.\u0275\u0275elementStart(16,"div",null,12),e.\u0275\u0275text(18),e.\u0275\u0275pipe(19,"number"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(20,"nav",13,14)(22,"ng-scrollbar")(23,"div"),e.\u0275\u0275template(24,or,4,7,"ng-container",15),e.\u0275\u0275elementEnd()()()()(),e.\u0275\u0275template(25,sr,6,2,"div",16),e.\u0275\u0275elementStart(26,"button",17),e.\u0275\u0275listener("click",function(){return n.onAddApplicant()}),e.\u0275\u0275template(27,lr,1,0,"div",18),e.\u0275\u0275template(28,cr,1,0,"div",19),e.\u0275\u0275template(29,dr,5,0,"span",20),e.\u0275\u0275template(30,pr,3,0,"span",20),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(31,"div",6)(32,"div",21),e.\u0275\u0275text(33),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(34,"div",22),e.\u0275\u0275template(35,hr,8,11,"a",23),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275elementStart(36,"div",24),e.\u0275\u0275element(37,"div",25),e.\u0275\u0275elementStart(38,"div",26)(39,"button",27),e.\u0275\u0275listener("click",function(){return n.onCancel()}),e.\u0275\u0275text(40,"cancel"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(41,"button",28),e.\u0275\u0275listener("click",function(){return n.onCheckout()}),e.\u0275\u0275text(42,"checkout"),e.\u0275\u0275elementEnd()()()),2&i&&(e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate2(" ",e.\u0275\u0275pipeBind2(7,17,n.productStorage.cost*n.currencyStorage.currencyConverter*n.applicants.length,"1.0-0")," ",n.currencyStorage.currencyCode," "),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngIf","free"!==n.productType),e.\u0275\u0275advance(1),e.\u0275\u0275property("hidden","free"===n.productType),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate4(" ",n.productStorage.lang[n.lang].fields.name," - ","single"===n.productStorage.visaType?"Single Visa Entry":"Multiple Visa Entry"," - ",n.currencyStorage.currencyCode," ",e.\u0275\u0275pipeBind2(19,20,n.productStorage.cost*n.currencyStorage.currencyConverter,"1.0-0")," "),e.\u0275\u0275advance(6),e.\u0275\u0275property("ngForOf",n.products),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.applicants.length<n.maxAllowedApplicants),e.\u0275\u0275advance(1),e.\u0275\u0275property("disabled",n.applicants.length===n.maxAllowedApplicants),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.applicants.length<n.maxAllowedApplicants),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.applicants.length===n.maxAllowedApplicants),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.applicants.length<n.maxAllowedApplicants),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.applicants.length===n.maxAllowedApplicants),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1("Review or edit ",1==n.applicants.length?"your":"the applicants"," details?"),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngForOf",n.applicants))},dependencies:[h.sg,h.O5,h.PC,bt.KC,Qe,ir.w,h.JJ,qe]})}return a})();var z=m(5861),Ft=m(9919);
1class gr{constructor(r,t,i,n,o,s,l,p){this.value=r,this.code=t,this.isUsed=i,this.usedByUserID=n,this.usedByEmail=o,this.usedByName=s,this.created=l,this.updated=p}}m(1135);const te=/(\d{1,4})/g,Ze=[{type:"maestro",patterns:[5018,502,503,506,56,58,639,6220,67],format:te,length:[12,13,14,15,16,17,18,19],cvvLength:[3],luhn:!0},{type:"forbrugsforeningen",patterns:[600],format:te,length:[16],cvvLength:[3],luhn:!0},{type:"dankort",patterns:[5019],format:te,length:[16],cvvLength:[3],luhn:!0},{type:"visa",patterns:[4],format:te,length:[13,16,19],cvvLength:[3],luhn:!0},{type:"mastercard",patterns:[51,52,53,54,55,22,23,24,25,26,27],format:te,length:[16],cvvLength:[3],luhn:!0},{type:"amex",patterns:[34,37],format:/(\d{1,4})(\d{1,6})?(\d{1,5})?/,length:[15],cvvLength:[3,4],luhn:!0},{type:"dinersclub",patterns:[30,36,38,39],format:/(\d{1,4})(\d{1,6})?(\d{1,4})?/,length:[14],cvvLength:[3],luhn:!0},{type:"discover",patterns:[60,64,65,622],format:te,length:[16],cvvLength:[3],luhn:!0},{type:"unionpay",patterns:[62,88],format:te,length:[16,17,18,19],cvvLength:[3],luhn:!1}
1,{type:"jcb",patterns:[35],format:te,length:[16,19],cvvLength:[3],luhn:!0}];class P{static cards(){return Ze}static cardFromNumber(r){r=(r+"").replace(/\D/g,"");for(let t=0,i=Ze.length;t<i;t++){const n=Ze[t],o=n.patterns;for(let s=0,l=o.length;s<l;s++){const c=o[s]+"";if(r.substr(0,c.length)===c)return n}}}static restrictNumeric(r){if(r.metaKey||r.ctrlKey)return!0;if(32===r.which)return!1;if(0===r.which||r.which<33)return!0;const t=String.fromCharCode(r.which);return!!/[\d\s]/.test(t)}static hasTextSelected(r){return null!==r.selectionStart&&r.selectionStart!==r.selectionEnd}static cardType(r){if(!r)return r;const t=this.cardFromNumber(r);return null!==t&&typeof t<"u"?t.type:null}static formatCardNumber(r){r=r.replace(/\D/g,"");const t=this.cardFromNumber(r);if(!t)return r;if(r=r.slice(0,t.length[t.length.length-1]),!t.format.global){const n=t.format.exec(r);return null==n?void 0:(n.shift(),n.filter(Boolean).join(" "))}{const n=r.match(t.format);if(null!=n)return n.join(" ")}}static safeVal(r,t,i){let n=null;const o=t.value;let s=null;try{n=t.selectionStart}catch{}if(i(r),null!==n&&t===document.activeElement){if(n===o.length&&(n=r.length),o!==r){const l=o.slice(n-1,+n+1||9e9),p=r.slice(n-1,+n+1||9e9),c=r[n];/\d/.test(c)&&l===`${c} `&&p===` ${c}`&&(n+=1)}s=n}return s}static isCardNumber(r,t){const i=String.fromCharCode(r);if(!/^\d+$/.test(i))return!1;if(P.hasTextSelected(t))return!0;const n=(t.value+i).replace(/\D/g,""),o=P.cardFromNumber(n);return o?n.length<=o.length[o.length.length-1]:n.length<=16}static restrictExpiry(r,t){const i=String.fromCharCode(r);return!(!/^\d+$/.test(i)||this.hasTextSelected(t))&&`${t.value}${i}`.replace(/\D/g,"").length>6}static replaceFullWidthChars(r){null===r&&(r="");let n="";const o=r.split("");for(let s=0;s<o.length;s++){let l=o[s];const p="\uff10\uff11\uff12\uff13\uff14\uff15\uff16\uff17\uff18\uff19".indexOf(l);p>-1&&(l="0123456789"[p]),n+=l}return n}static formatExpiry(r){const t=r.match(/^\D*(\d{1,2})(\D+)?(\d{1,4})?/);if(!t)return"";let i=t[1]||"",n=t[2]||"";const o=t[3]||"";return o.length>0?n=" / ":" /"===n?(i=i.substring(0,1),n=""):2===i.length||n.length>0?n=" / ":1===i.length&&"0"!==i&&"1"!==i&&(i=`0${i}`,n=" / "),`${i}${n}${o}`}static restrictCvc(r,t){const i=String.fromCharCode(r);return!(!/^\d+$/.test(i)||this.hasTextSelected(t))&&`${t.value}${i}`.length<=4}static luhnCheck(r){const t=r.split("").reverse();let i=!0,n=0;for(let o=0;o<t.length;o++){let s=parseInt(t[o],10);(i=!i)&&(s*=2),s>9&&(s-=9),n+=s}return n%10==0}}class It{static validateCCNumber(r){if(void 0!==d.Validators.required(r)&&null!==d.Validators.required(r))return{ccNumber:!0};const t=r.value.toString().replace(/\s+|-/g,"");if(!/^\d+$/.test(t))return{ccNumber:!0};const i=P.cardFromNumber(t);if(!i)return{ccNumber:!0};if(i.length.includes(t.length)&&(!1===i.luhn||P.luhnCheck(t)))return null;const n=i.length[i.length.length-1];if(t.length>n){const o=t.substring(0,n);if(P.luhnCheck(o))return null}return{ccNumber:!0}}static validateExpDate(r){if(void 0!==d.Validators.required(r)&&null!==d.Validators.required(r))return{expDate:!0};if(typeof r.value<"u"&&r.value.length>=5){let[t,i]=r.value.split(/[\s\/]+/,2);if(2===i?.length&&/^\d+$/.test(i)&&(i=(new Date).getFullYear().toString().slice(0,2)+i),t=parseInt(t,10).toString(),i=parseInt(i,10).toString(),/^\d+$/.test(t)&&/^\d+$/.test(i)&&t>=1&&t<=12){const n=new Date(i,t),o=new Date;if(n.setMonth(n.getMonth()-1),n.setMonth(n.getMonth()+1,1),n>o)return null}}return{expDate:!0}}}let vr=(()=>{class a{}return a.\u0275fac=function(t){return new(t||a)},a.\u0275mod=e.\u0275\u0275defineNgModule({type:a}),a.\u0275inj=e.\u0275\u0275defineInjector({}),a})();const br=new e.InjectionToken("mat-progress-spinner-default-options",{providedIn:"root",factory:function xr(){return{diameter:yr}}}),yr=100;function Sr(a,r){if(1&a&&(e.\u0275\u0275namespaceSVG(),e.\u0275\u0275element(0,"circle",4)),2&a){const t=e.\u0275\u0275nextContext(),i=e.\u0275\u0275reference(1);e.\u0275\u0275styleProp("animation-name","mat-progress-spinner-stroke-rotate-"+t._spinnerAnimationLabel)("stroke-dashoffset",t._getStrokeDashOffset(),"px")("stroke-dasharray",t._getStrokeCircumference(),"px")("stroke-width",t._getCircleStrokeWidth(),"%")("transform-origin",t._getCircleTransformOrigin(i)),e.\u0275\u0275attribute("r",t._getCircleRadius())}}function Cr(a,r){if(1&a&&(e.\u0275\u0275namespaceSVG(),e.\u0275\u0275element(0,"circle",4)),2&a){const t=e.\u0275\u0275nextContext(),i=e.\u0275\u0275reference(1);
1e.\u0275\u0275styleProp("stroke-dashoffset",t._getStrokeDashOffset(),"px")("stroke-dasharray",t._getStrokeCircumference(),"px")("stroke-width",t._getCircleStrokeWidth(),"%")("transform-origin",t._getCircleTransformOrigin(i)),e.\u0275\u0275attribute("r",t._getCircleRadius())}}const wr=(0,g.pj)(class{constructor(a){this._elementRef=a}},"primary");class X extends wr{get diameter(){return this._diameter}set diameter(r){this._diameter=(0,q.su)(r),this._spinnerAnimationLabel=this._getSpinnerAnimationLabel(),this._styleRoot&&this._attachStyleNode()}get strokeWidth(){return this._strokeWidth||this.diameter/10}set strokeWidth(r){this._strokeWidth=(0,q.su)(r)}get value(){return"determinate"===this.mode?this._value:0}set value(r){this._value=Math.max(0,Math.min(100,(0,q.su)(r)))}constructor(r,t,i,n,o,s,l,p){super(r),this._document=i,this._diameter=100,this._value=0,this._resizeSubscription=R.w0.EMPTY,this.mode="determinate";const c=X._diameters;this._spinnerAnimationLabel=this._getSpinnerAnimationLabel(),c.has(i.head)||c.set(i.head,new Set([100])),this._noopAnimations="NoopAnimations"===n&&!!o&&!o._forceAnimations,"mat-spinner"===r.nativeElement.nodeName.toLowerCase()&&(this.mode="indeterminate"),o&&(o.color&&(this.color=this.defaultColor=o.color),o.diameter&&(this.diameter=o.diameter),o.strokeWidth&&(this.strokeWidth=o.strokeWidth)),t.isBrowser&&t.SAFARI&&l&&s&&p&&(this._resizeSubscription=l.change(150).subscribe(()=>{"indeterminate"===this.mode&&p.run(()=>s.markForCheck())}))}ngOnInit(){const r=this._elementRef.nativeElement;this._styleRoot=(0,O.kV)(r)||this._document.head,this._attachStyleNode(),r.classList.add("mat-progress-spinner-indeterminate-animation")}ngOnDestroy(){this._resizeSubscription.unsubscribe()}_getCircleRadius(){return(this.diameter-10)/2}_getViewBox(){const r=2*this._getCircleRadius()+this.strokeWidth;return`0 0 ${r} ${r}`}_getStrokeCircumference(){return 2*Math.PI*this._getCircleRadius()}_getStrokeDashOffset(){return"determinate"===this.mode?this._getStrokeCircumference()*(100-this._value)/100:null}_getCircleStrokeWidth(){return this.strokeWidth/this.diameter*100}_getCircleTransformOrigin(r){const t=50*(r.currentScale??1);return`${t}% ${t}%`}_attachStyleNode(){const r=this._styleRoot,t=this._diameter,i=X._diameters;let n=i.get(r);if(!n||!n.has(t)){const o=this._document.createElement("style");o.setAttribute("mat-spinner-animation",this._spinnerAnimationLabel),o.textContent=this._getAnimationText(),r.appendChild(o),n||(n=new Set,i.set(r,n)),n.add(t)}}_getAnimationText(){const r=this._getStrokeCircumference();return"\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n    0%      { stroke-dashoffset: START_VALUE;  transform: rotate(0); }\n    12.5%   { stroke-dashoffset: END_VALUE;    transform: rotate(0); }\n    12.5001%  { stroke-dashoffset: END_VALUE;    transform: rotateX(180deg) rotate(72.5deg); }\n    25%     { stroke-dashoffset: START_VALUE;  transform: rotateX(180deg) rotate(72.5deg); }\n\n    25.0001%   { stroke-dashoffset: START_VALUE;  transform: rotate(270deg); }\n    37.5%   { stroke-dashoffset: END_VALUE;    transform: rotate(270deg); }\n    37.5001%  { stroke-dashoffset: END_VALUE;    transform: rotateX(180deg) rotate(161.5deg); }\n    50%     { stroke-dashoffset: START_VALUE;  transform: rotateX(180deg) rotate(161.5deg); }\n\n    50.0001%  { stroke-dashoffset: START_VALUE;  transform: rotate(180deg); }\n    62.5%   { stroke-dashoffset: END_VALUE;    transform: rotate(180deg); }\n    62.5001%  { stroke-dashoffset: END_VALUE;    transform: rotateX(180deg) rotate(251.5deg); }\n    75%     { stroke-dashoffset: START_VALUE;  transform: rotateX(180deg) rotate(251.5deg); }\n\n    75.0001%  { stroke-dashoffset: START_VALUE;  transform: rotate(90deg); }\n    87.5%   { stroke-dashoffset: END_VALUE;    transform: rotate(90deg); }\n    87.5001%  { stroke-dashoffset: END_VALUE;    transform: rotateX(180deg) rotate(341.5deg); }\n    100%    { stroke-dashoffset: START_VALUE;  transform: rotateX(180deg) rotate(341.5deg); }\n  }\n".replace(/START_VALUE/g,""+.95*r).replace(/END_VALUE/g,""+.2*r).replace(/DIAMET
1ER/g,`${this._spinnerAnimationLabel}`)}_getSpinnerAnimationLabel(){return this.diameter.toString().replace(".","_")}}X._diameters=new WeakMap,X.\u0275fac=function(r){return new(r||X)(e.\u0275\u0275directiveInject(e.ElementRef),e.\u0275\u0275directiveInject(O.t4),e.\u0275\u0275directiveInject(h.K0,8),e.\u0275\u0275directiveInject(e.ANIMATION_MODULE_TYPE,8),e.\u0275\u0275directiveInject(br),e.\u0275\u0275directiveInject(e.ChangeDetectorRef),e.\u0275\u0275directiveInject(at.rL),e.\u0275\u0275directiveInject(e.NgZone))},X.\u0275cmp=e.\u0275\u0275defineComponent({type:X,selectors:[["mat-progress-spinner"],["mat-spinner"]],hostAttrs:["role","progressbar","tabindex","-1",1,"mat-progress-spinner","mat-spinner"],hostVars:10,hostBindings:function(r,t){2&r&&(e.\u0275\u0275attribute("aria-valuemin","determinate"===t.mode?0:null)("aria-valuemax","determinate"===t.mode?100:null)("aria-valuenow","determinate"===t.mode?t.value:null)("mode",t.mode),e.\u0275\u0275styleProp("width",t.diameter,"px")("height",t.diameter,"px"),e.\u0275\u0275classProp("_mat-animation-noopable",t._noopAnimations))},inputs:{color:"color",diameter:"diameter",strokeWidth:"strokeWidth",mode:"mode",value:"value"},exportAs:["matProgressSpinner"],features:[e.\u0275\u0275InheritDefinitionFeature],decls:4,vars:8,consts:[["preserveAspectRatio","xMidYMid meet","focusable","false","aria-hidden","true",3,"ngSwitch"],["svg",""],["cx","50%","cy","50%",3,"animation-name","stroke-dashoffset","stroke-dasharray","stroke-width","transform-origin",4,"ngSwitchCase"],["cx","50%","cy","50%",3,"stroke-dashoffset","stroke-dasharray","stroke-width","transform-origin",4,"ngSwitchCase"],["cx","50%","cy","50%"]],template:function(r,t){1&r&&(e.\u0275\u0275namespaceSVG(),e.\u0275\u0275elementStart(0,"svg",0,1),e.\u0275\u0275template(2,Sr,1,11,"circle",2),e.\u0275\u0275template(3,Cr,1,9,"circle",3),e.\u0275\u0275elementEnd()),2&r&&(e.\u0275\u0275styleProp("width",t.diameter,"px")("height",t.diameter,"px"),e.\u0275\u0275property("ngSwitch","indeterminate"===t.mode),e.\u0275\u0275attribute("viewBox",t._getViewBox()),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngSwitchCase",!0),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngSwitchCase",!1))},dependencies:[h.RF,h.n9],styles:[".mat-progress-spinner{display:block;position:relative;overflow:hidden}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:rgba(0,0,0,0);transition:stroke-dashoffset 225ms linear}.cdk-high-contrast-active .mat-progress-spinner circle{stroke:CanvasText}.mat-progress-spinner[mode=indeterminate] svg{animation:mat-progress-spinner-linear-rotate 2000ms linear infinite}.mat-progress-spinner[mode=indeterminate] circle{transition-property:stroke;animation-duration:4000ms;animation-timing-function:cubic-bezier(0.35, 0, 0.25, 1);animation-iteration-count:infinite}.mat-progress-spinner._mat-animation-noopable svg,.mat-progress-spinner._mat-animation-noopable circle{animation:none;transition:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.606171575px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.606171575px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.606171575px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.606171575px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(341.5deg)}}"],encapsulation:2,changeDetection:0});let Tt=(()=>{class a{}return a.\u0275fac=function(t){return new(t||a)},a.\u0275mod=e.\u0275\u0275defineNgModule({type:a}),a.\u0275inj=e.\u0275\u0275defineInjector({imports:[g.BQ,h.ez,g.BQ]}),a})();const kr=["secureForm"],Mr=["cReq"],Fr=["secureFrame"];function Ir(a,r){1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",15)(2,"div",16),e.\u0275\u0275text(3,"Processing....Please wait!"),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(4,"mat-spinner",17),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd())}let Ar=(()=>{class a{constructor(t,i,n,o,s){this.secureCardsData=t,this.matDialogRef=i,this.renderer=n,this.networkService=o,this._actionService=s,this.listenToNetworkFeedbackSub=new R.w0,this.listenToShowSpinnerSub=new R.w0,this.showSpinner=!1}ngOnInit(){this.renderer.setAttribute(this.secureForm.nativeElement,"action",this.secureCardsData.acsURL),this.renderer.setAttribute(this.cReq.nativeElement,"value",this.secureCardsData.cReq),this.secureForm.nativeElement.submit()}ngAfterViewInit(){this.listenToNetworkFeedback(),this.listenToShowSpinner()}ngOnDestroy(){this.listenToNetworkFeedbackSub.unsubscribe(),this.listenToShowSpinnerSub.unsubscribe()}listenToShowSpinner(){this.listenToShowSpinnerSub=this.networkService.listenToNetworkFeedback(this.secureCardsData.threeDSServerTransID).subscribe(t=>{void 0!==t.showSpinner&&(this.showSpinner=!0)})}listenToNetworkFeedback(){this.listenToNetworkFeedbackSub=this.networkService.listenToNetworkFeedback(this.secureCardsData.threeDSServerTransID).subscribe(t=>{!0===t.hide3dSecureModal&&(this.onCancel(),this._actionService.open({data:{actionType:"operation",actionMessage:"Contacting your bank..."}}))})}onCancel(){this.matDialogRef.close()}static#e=this.\u0275fac=function(i){return new(i||a)(e.\u0275\u0275directiveInject(W.WI),e.\u0275\u0275directiveInject(W.so),e.\u0275\u0275directiveInject(e.Renderer2),e.\u0275\u0275directiveInject(Ft.S),e.\u0275\u0275directiveInject(pe))};static#t=this.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["app-secure-cards"]],viewQuery:function(i,n){if(1&i&&(e.\u0275\u0275viewQuery(kr,7),e.\u0275\u0275viewQuery(Mr,7),e.\u0275\u0275viewQuery(Fr,7)),2&i){let o;e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.secureForm=o.first),e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.cReq=o.first),e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.secureFrame=o.first)}},decls:20,vars:1,consts:[[1,"app-modal-wr","secure","position-relative"],[1,"app-modal-header-wr"],[1,"app-modal-body-wr"],[4,"ngIf"],[2,"width","100%","height","510px"],["action","","target","secureFrame","method","post","hidden","hidden"],["secureForm",""],["type","hidden","name","creq","value",""],["cReq",""],["type","button"],["name","secureFrame","frameborder","0","width","100%","height","100%",2,"padding","20px"],["secureFrame",""],[1,"app-modal-footer","app-modal-footer-secure"],[1,"app-modal-footer-right"],["tabindex","0","cdkTrapFocus","",1,"bp-btn","bp-modal-cancel","w-button",3,"click"],[1,"position-absolute","w-100","h-100","z-1","bg-white","spinner-overlay"],[1,"text-center","mb-30","text-large"],["diameter","30"]],template:function(i,n){1&i&&(e.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"div"),e.\u0275\u0275text(3,"3D Secure Authentication"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(4,"div",2),e.\u0275\u0275template(5,Ir,5,0,"ng-container",3),e.\u0275\u0275elementStart(6,"div",4)(7,"form",5,6),e.\u0275\u0275text(9,' enctype="application/x-www-form-urlencoded"> '),e.\u0275\u0275element(10,"input",7,8)(12,"br")(13,"input",9),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(14,"iframe",10,11),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(16,"div",12)(17,"div",13)(18,"button",14),e.\u0275\u0275listener("click",function(){return n.onCancel()}),e.\u0275\u0275text(19,"cancel "),e.\u0275\u0275elementEnd()()()()()),2&i&&(e.\u0275\u0275advance(5),e.\u0275\u0275property("ngIf",n.showSpinner))},dependencies:[h.O5,d.\u0275NgNoValidate,d.NgControlStatusGroup,w.mK,d.NgForm,X],styles:[".app-modal-wr.secure[_ngcontent-%COMP%]{overflow:visible;width:100%;
1height:655px;max-width:1000px;flex:0 0 auto;box-shadow:1px 8px 6px -7px #000}.app-modal-body.app-modal-body-secure[_ngcontent-%COMP%]{height:450px;padding-top:0;padding-right:0;padding-left:0;flex-wrap:wrap;flex:0 0 auto}.app-modal-form-wr.app-modal-forrm-secure[_ngcontent-%COMP%]{height:auto;padding-top:20px;flex:0 0 auto}.app-modal-wr.secure[_ngcontent-%COMP%]{overflow:visible;transform:scale(.9);width:850px;height:650px;flex:0 0 auto;box-shadow:1px 8px 6px -7px #000;transition:all .4s ease}.app-modal-card-wr.secure[_ngcontent-%COMP%]{width:100%;height:450px;padding:0 30px;justify-content:space-between;flex:1}.app-card.app-secure[_ngcontent-%COMP%]{height:170px;padding-top:15px;justify-content:space-between;border-radius:0}.app-card.app-secure[_ngcontent-%COMP%]:hover{transform:none}.spinner-overlay[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center}.card-header.card-header-secure[_ngcontent-%COMP%]{margin-bottom:10px;font-size:14px;line-height:14px}.app-modal-footer.app-modal-footer-secure[_ngcontent-%COMP%]{padding-top:20px;padding-bottom:20px;flex:0 0 auto;background-color:#fff}@media (max-width: 991px){.app-modal-wr.secure[_ngcontent-%COMP%]{height:auto;width:100vw}.app-modal-body.app-modal-body-secure[_ngcontent-%COMP%]{height:auto}.app-modal-card-wr.secure[_ngcontent-%COMP%]{height:auto;padding-top:20px;padding-bottom:20px}}"]})}return a})();var Je=m(8179),me=m(529);let Tr=(()=>{class a{constructor(t,i){this.http=t,this.dbService=i}sendPaymentFailedEmail({emailSendTo:t,firstName:i,orderID:n,orderAmount:o,productSold:s,noOfApplications:l,totalProductCost:p,covidInsuranceNumber:c,covidInsurance:u,expressServiceNumber:_,expressService:x,airportPickupNumber:T,airportPickup:C,subTotal:k,cashBackRedeemed:y}){var be=this;this.http.get(`${b.N.fnSendPaymentFailedEmailURL}?emailSendTo=${t}&firstName=${i}&orderID=${n}&orderAmount=${o}&productSold=${s}&noOfApplications=${l}&totalProductCost=${p}&covidInsuranceNumber=${c}&covidInsurance=${u}&expressServiceNumber=${_}&expressService=${x}&airportPickupNumber=${T}&airportPickup=${C}&subTotal=${k}&cashBackRedeemed=${y}`,{responseType:"text"}).subscribe(function(){var ye=(0,z.Z)(function*(oe){console.log(`res from sendPaymentFailedEmail>>>>>>>>>> ${oe}`);try{const B=JSON.parse(oe);console.log("jsonData:",B);var ue=B.status;console.log("status from jsonData:",ue),!0===ue&&(console.log("paymentStatus from jsonData:",B.paymentStatus),be.dbService.saveEmail({paymentStatus:B.paymentStatus,emailSentTo:B.emailSentTo,orderID:B.orderID,subject:B.subject,body:B.body,emailType:"order"}))}catch(B){console.error("Error parsing JSON:",B)}});return function(oe){return ye.apply(this,arguments)}}())}sendPaymentSuccessEmail({emailSendTo:t,firstName:i,orderID:n,orderTime:o,orderDate:s,orderAmount:l,productSold:p,noOfApplications:c,totalProductCost:u,covidInsuranceNumber:_,covidInsurance:x,expressServiceNumber:T,expressService:C,airportPickupNumber:k,airportPickup:y,subTotal:be,cashBackRedeemed:xe}){var ye=this;this.http.get(`${b.N.fnSendPaymentSuccessEmailURL}?emailSendTo=${t}&firstName=${i}&orderID=${n}&orderTime=${o}&orderDate=${s}&orderAmount=${l}&productSold=${p}&noOfApplications=${c}&totalProductCost=${u}&covidInsuranceNumber=${_}&covidInsurance=${x}&expressServiceNumber=${T}&expressService=${C}&airportPickupNumber=${k}&airportPickup=${y}&subTotal=${be}&cashBackRedeemed=${xe}`,{responseType:"text"}).subscribe(function(){var ue=(0,z.Z)(function*(B){console.log(`res from sendPaymentSuccessEmail>>>>>>>>>> ${B}`);try{const Q=JSON.parse(B);console.log("jsonData:",Q);var Me=Q.status;console.log("status from jsonData:",Me),!0===Me&&(console.log("paymentStatus from jsonData:",Q.paymentStatus),ye.dbService.saveEmail({paymentStatus:Q.paymentStatus,emailSentTo:Q.emailSentTo,orderID:Q.orderID,subject:Q.subject,body:Q.body,emailType:"order"}))}catch(Q){console.error("Error parsing JSON:",Q)}});return function(B){return ue.apply(this,arguments)}}())}sendCustomEmail({emailSendTo:t,emailSubject:i,emailBody:n,emailType:o,orderID:s,paymentStatus:l}){var p=this;return(0,z.Z)(function*(){const c=b.N.fnSendCustomEmail;try{var u=yield p.http.post(c,{sendToEmail:t,emailSubject:i,emailBody:n},{responseType:"text"}).toPromise();console.log(`res from sendCustomEmail>>>>>>>>>> ${u}`);const x=JSON.parse(u);console.log("jsonData:",x);var _=x.status;return console.log("status from jsonData:",_),!0===_&&(console.log("paymentStatus from jsonData:",x.paymentStatus),yield p.dbService.saveEmail({paymentStatus:l,emailSentTo:x.emailSentTo,orderID:s,subject:x.subject,body:x.body,emailType:o}),!0)}catch(x){return console.error("Exception on sendCustomEmail:",x),!1}})()}static#e=this.\u0275fac=function(i){return new(i||a)(e.\u0275\u0275inject(me.eN),e.\u0275\u0275inject(ge.M))};static#t=this.\u0275prov=e.\u0275\u0275defineInjectable({token:a,factory:a.\u0275fac,providedIn:fe.m})}return a})();var Rr=m(3453),Pr=m(5338),Or=m(4455),Vr=m(1085);let Nr=(()=>{class a{constructor(t){this.http=t,this.token="d7wPLEaN6KSCAuyzIH_QcQ"}doesContactExist(t){const i=`https://dubaivisaco.freshsales.io/api/search?q=${t}&f=emails&include=contact`,n=new me.WM({"Content-Type":"application/json",Authorization:`Token token=${this.token}`});return this.http.get(i,{headers:n,observe:"response"})}assignDealToContact(t,i){const n={deal:{name:`${i.firstName} ${i.lastName}`,amount:i.amount,custom_field:{cf_ip_address:i.ip,cf_order_id:i.orderID,cf_order_date:i.orderDate,cf_order_time:i.orderTime,cf_cash_back_earned:i.cashBackEarned,cf_sub_total:i.subTotal,cf_order_currency:i.currency,cf_payment_method:i.paymentMethod,cf_order_payment_status:i.paymentStatus,cf_product_sold:i.productSold,cf_total_products_cost:i.totalProductsCost,cf_number_of_applications:i.numberOfApplications,cf_nationality:i.nationality,cf_photos_copies_links:1===i.photoCopiesUrls.length?i.photoCopiesUrls:i.photoCopiesUrls.join("****"),cf_passports_copies_links:1===i.passportCopiesUrls.length?i.passportCopiesUrls:i.passportCopiesUrls.join("****"),cf_national_ids_links:1===i.nationIdCopiesUrls.length?i.nationIdCopiesUrls:i.nationIdCopiesUrls.join("****"),cf_airport_pickup:i.airportPickup,cf_airport_pickup_number:i.airportPickupNumber,cf_express_service:i.expressService,cf_express_service_number:i.expressServiceNumber,cf_covid_insurance:i.covidInsurance,cf_covid_insurance_number:i.covidInsuranceNumber,cf_discount_code_earned:i.referralCode,cf_cash_back_redeemed:i.cashBackRedeemed,cf_discount_code_used:i.discountCodeUsed,cf_travel_purpose:i.travelPurpose,cf_travel_date:i.travelDate,cf_previous_travel_history:!1===i.visitedUA
1E?"No":"Yes"},contacts_added_list:[t]}};return this.http.post("https://dubaivisaco.freshsales.io/api/deals",n,{headers:new me.WM({"Content-Type":"application/json",Authorization:`Token token=${this.token}`}),observe:"response"}).toPromise().then(()=>{console.log("Deal assigned to contact successfully")}).catch(o=>{console.log(`Unable to assign deal to contact: ${t}`),console.log("Error: ",o)})}createNewContact(t){return this.http.post("https://dubaivisaco.freshsales.io/api/contacts",{contact:{first_name:t.firstName,last_name:t.lastName,emails:t.email,job_title:t.profession,country:t.country,custom_field:{cf_nationality:t.nationality,cf_phone_number:t.phoneNumber,cf_passport_number:t.passportNumber,cf_recent_order_number:t.orderID}}},{headers:new me.WM({"Content-Type":"application/json",Authorization:`Token token=${this.token}`}),observe:"response"}).toPromise().then(n=>{const o=n.body.contact.id;return console.log("New Contact Created Successfully in FreshSales. ID: ",o),this.assignDealToContact(o,t)}).catch(n=>{console.log("Unable to create a new contact in FreshSales",n)})}saveFreshSalesDeal(t,i,n,o){const s=t,l=i,p=n,c=o,u=i[0],_=[],x=[],T=[];for(let k=0;k<l.length;k++)for(let y=0;y<l[k].files.passport.length;y++)_.push(l[k].files.passport[y].downloadLink);for(let k=0;k<l.length;k++)for(let y=0;y<l[k].files.photo.length;y++)x.push(l[k].files.photo[y].downloadLink);for(let k=0;k<l.length;k++)for(let y=0;y<l[k].files.id.length;y++)T.push(l[k].files.id[y].downloadLink);const C={nationality:u.nationality,firstName:u.firstName,lastName:u.lastName,email:u.email,passportNumber:u.passportNumber,phoneNumber:u.phone,profession:u.profession,travelDate:u.travelDate,travelPurpose:u.travelPurpose,visitedUAE:u.visitedUAE,country:u.country,orderID:s.id,orderDate:s.date,orderTime:s.time,orderValue:s.value,referralCode:s.coupon.codeEarned,cashBackEarned:s.coupon.cashBackEarned,cashBackRedeemed:s.coupon.cashBackRedeemed,discountCodeUsed:s.coupon.codeUsed,amount:s.value.inUSD,subTotal:s.value.inUSD+s.coupon.cashBackRedeemed,currency:s.value.currencyUsed,numberOfApplications:s.numberOfApplications,paymentMethod:s.payment.method,paymentStatus:s.payment.status,location:c.location,ip:c.ip,totalProductsCost:p.cost*s.numberOfApplications,productSold:`${p.lang.en.fields.name} - ${p.lang.en.fields.visaTypeDescription}`,passportCopiesUrls:_,nationIdCopiesUrls:T,photoCopiesUrls:x,airportPickup:s.extraServices.airportPickup.totalCostUSD,airportPickupNumber:s.extraServices.airportPickup.totalCostUSD>0?s.numberOfApplications:0,expressService:s.extraServices.expressService.totalCostUSD,expressServiceNumber:s.extraServices.expressService.totalCostUSD>0?s.numberOfApplications:0,covidInsurance:s.extraServices.covidInsurance.totalCostUSD,covidInsuranceNumber:s.extraServices.covidInsurance.totalCostUSD>0?s.numberOfApplications:0};this.doesContactExist(u.email).toPromise().then(k=>{if(0===k.body.length)return this.createNewContact(C);{const y=k.body[0].id;return console.log("Contact exist already. Contact ID: ",y),this.assignDealToContact(y,C)}}).catch(k=>{console.log("Unable to reach FreshSales to look for a contact"),console.log(k)})}static#e=this.\u0275fac=function(i){return new(i||a)(e.\u0275\u0275inject(me.eN))};static#t=this.\u0275prov=e.\u0275\u0275defineInjectable({token:a,factory:a.\u0275fac,providedIn:"root"})}return a})();const Lr=["expressServiceRef"],Br=["airportPickupRef"],jr=["covidInsuranceRef"],zr=["emergencyServiceRef"],Ur=["expressServiceIcon"],Yr=["airportPickupIcon"],$r=["covidInsuranceIcon"],Hr=["checkCouponBtnRef"],Wr=["emergencyServiceIcon"],Qr=["confirmPaymentCheckbox"];function Gr(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",52)(1,"h3",53),e.\u0275\u0275text(2,"Select Payment Method"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"div",4)(4,"div")(5,"input",54),e.\u0275\u0275listener("change",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(n.selectedPaymentMethod="dpo")}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(6,"label",55),e.\u0275\u0275element(7,"img",56),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(8,"div")(9,"input",57),e.\u0275\u0275listener("change",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext();
1return e.\u0275\u0275resetView(n.selectedPaymentMethod="network")}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(10,"label",58),e.\u0275\u0275element(11,"img",59),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(12,"div")(13,"input",60),e.\u0275\u0275listener("change",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(n.selectedPaymentMethod="ccavenue")}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(14,"label",61),e.\u0275\u0275element(15,"img",62),e.\u0275\u0275elementEnd()()()()}if(2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(5),e.\u0275\u0275property("checked","dpo"==t.selectedPaymentMethod),e.\u0275\u0275advance(4),e.\u0275\u0275property("checked","network"==t.selectedPaymentMethod),e.\u0275\u0275advance(4),e.\u0275\u0275property("checked","ccavenue"==t.selectedPaymentMethod)}}const Kr=function(a){return{"disabled-link":a}};function qr(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",63)(1,"div",64)(2,"input",65,66),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(n.onPlaceOrder())}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"label",67),e.\u0275\u0275text(5,"Are you sure you want to proceed with the payment?"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(6,"a",68),e.\u0275\u0275text(7,"place order"),e.\u0275\u0275elementEnd()()}if(2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275property("checked",t.isChecked),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngClass",e.\u0275\u0275pureFunction1(3,Kr,!t.isPlacedOrderEnabled))("href",t.placedOrderLink,e.\u0275\u0275sanitizeUrl)}}function Xr(a,r){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",69),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(n.onPlaceOrder())}),e.\u0275\u0275text(1,"place order"),e.\u0275\u0275elementEnd()}}let Zr=(()=>{class a{constructor(t,i,n,o,s,l,p,c,u,_,x,T,C,k,y,be,xe,ye,oe,ue,B,Me,Q){var Z=this;this._fb=t,this._applicationService=i,this._applyService=n,this._renderer=o,this._currencyService=s,this._productService=l,this._dbService=p,this._router=c,this._dubaiTimeService=u,this._geoService=_,this._couponService=x,this._orderService=T,this._afs=C,this._authService=k,this._actionService=y,this._languageService=be,this.matDialog=xe,this.networkService=ye,this._http=oe,this.expressEmergencyService=ue,this.freshSaleApiService=B,this.emailSendingService=Me,this._incompleteOrderService=Q,this.isChecked=!1,this.selectedPaymentMethod="ccavenue",this.isDpoPaymentFailed=!1,this.productChangedSub=new R.w0,this.newOrderStatusSub=new R.w0,this.validateCouponSub=new R.w0,this.networkSub=new R.w0,this.payWithCardServiceSub=new R.w0,this.hide3dSecureModalSub=new R.w0,this.expressService=b.N.extraServices.expressService,this.airportService=b.N.extraServices.airportPickup,this.covidInsurance=b.N.extraServices.covidInsurance,this.expressServiceCost=0,this.airportServiceCost=0,this.covidInsuranceCost=0,this.emergencyService=b.N.extraServices.emerygencyService,this.emergencyServiceCost=0,this.todayDate=!1,this.tomorrowDate=!1,this.couponValue=0,this.cashBackRedeemed=0,this.couponCodeUsed=null,this.couponCodeFound=!1,this.couponFormPlaceholder="Referral or discount code?",this.selectedDate="",this.previousSelectedTravelDate="",this.initialSelectedTravelDate="",this.browser="",this.isPlacedOrderEnabled=!1,this.placedOrderLink="",this.paymentStatusForSafari="",this.visaRef="",this.paymentStatusSub=new R.w0,this.isEventListenerAdded=!1,this.popupEventListener=function(){var go=(0,z.Z)(function*(et,tt){console.log("inside window event listener"),""!==tt&&et.origin===window.location.origin&&(Z.paymentStatus=et.data,console.log("Received message from Payment Window:",Z.paymentStatus),clearInterval(Z.checkWindowInterval),Z.clearLocalStorageItems(),"1"===Z.paymentStatus?Z.prepConfirmation(tt):(console.log("Condition not matched from message receiving"),yield Z.paymentFailed(),Z.isDpoPaymentFailed=!0,Z.paymentStatus=void 0))});return function(et,tt){return go.apply(this,arguments)}}()}ngOnInit(){var t=this;this.clearLocalStorageItems(),this.lang=this._languageService.getLanguageStorage().code,this.myBrowser(),this._authService.logoutUnsubscribe$.subscribe(()=>{this.productChangedSub.unsubscribe(),this.validateCouponSub.unsubscribe(),this.networkSub.unsubscribe(),this.payWithCardServiceSub.unsubscribe(),this.hide3dSecureModalSub.unsubscribe()}),this._applyService.onCancel3dSecureModal.subscribe(()=>{this.onCancel3dSecureModal()}),this.productChangedSub=this._productService.productChanged.subscribe(()=>{this.productStorage=this._productService.getSingleProductStorage()}),this.newOrderStatusSub=this._orderService.newOrderStatus.subscribe(function(){var i=(0,z.Z)(function*(n){console.log("step 3 orderStatus "),console.log(n),"Safari"!==t.browser&&("saved"===n.status&&(console.log("Inside order saved condition"),t.checkWindowInterval=setInterval(()=>{if(console.log("Checking window is open or not."),void 0!==t.newWindow&&t.newWindow&&t.newWindow.closed&&null==t.paymentStatus){clearInterval(t.checkWindowInterval),console.log("The window was closed. & paymentStatus>>>>>> "+t.paymentStatus);let o=localStorage.getItem("visareference"),s=localStorage.getItem("token"),l=localStorage.getItem("ref");console.log(`visaRefNetworkFromLS: ${o}, tokenFromLS: ${s}, refFromLS: ${l}`);let p=localStorage.getItem("visaReference"),c=localStorage.getItem("transactionToken");console.log(`visaRefDPOFromLS: ${p}, tokenFromLS: ${c}`);let u=localStorage.getItem("visaReference"),_=localStorage.getItem("orderStatus");null!==o&&null!==s&&null!==l?(t.fnNetworkPaymentVerify(o,s,l),t.clearLocalStorageItems()):null!==p&&null!==c?(t.fnDPOPaymentVerify(p,c),t.clearLocalStorageItems()):null!==u&&null!==_?(t.fnCCAPaymentVerify(u,_),t.clearLocalStorageItems()):(t.manuallyClosedNewWindow(),t.clearLocalStorageItems())}}
1,2e3)),"not saved"===n.status&&(console.log("Inside order not saved condition"),yield t.paymentFailed()))});return function(n){return i.apply(this,arguments)}}()),this.initCouponForm(),this.applicants=this._applicationService.getApplicationStorage(),this.productStorage=this._productService.getSingleProductStorage(),this.currencyStorage=this._currencyService.getSelectedCurrencyStorage(),this.expressEmergencyService.initialSelectedDate.subscribe(i=>{this.initialSelectedTravelDate=i}),this.expressEmergencyService.previousSelectedDate.subscribe(i=>{this.previousSelectedTravelDate=i}),this.expressEmergencyService.expressServiceCost.subscribe(i=>{this.expressServiceCost=i}),this.expressEmergencyService.emergencyServiceCost.subscribe(i=>{this.emergencyServiceCost=i}),this.expressEmergencyService.isTodayDate.subscribe(i=>{this.todayDate=i}),this.expressEmergencyService.isTomorrowtDate.subscribe(i=>{this.tomorrowDate=i}),this.expressEmergencyService.dateSelected.subscribe(i=>{this.selectedDate=i.selectedDate,""===this.previousSelectedTravelDate&&("today"===i.selectedDate?(this._renderer.setStyle(this.expressServiceRef.nativeElement,"cursor","not-allowed"),this._renderer.setStyle(this.emergencyServiceRef.nativeElement,"cursor","not-allowed"),this._renderer.addClass(this.emergencyServiceRef.nativeElement,"on"),this._renderer.addClass(this.emergencyServiceIcon.nativeElement,"express-on"),this.expressEmergencyService.emergencyServiceCost.next(b.N.extraServices.emerygencyService),this._productService.extraServices.emergencyService=!0,this._renderer.removeClass(this.expressServiceRef.nativeElement,"on"),this._renderer.removeClass(this.expressServiceIcon.nativeElement,"express-on"),this.expressEmergencyService.expressServiceCost.next(0),this._productService.extraServices.expressService=!1,this.expressEmergencyService.isTodayDate.next(!0),this.expressEmergencyService.isTomorrowtDate.next(!1)):"tomorrow"===i.selectedDate?(this._renderer.setStyle(this.expressServiceRef.nativeElement,"cursor","not-allowed"),this._renderer.setStyle(this.emergencyServiceRef.nativeElement,"cursor","not-allowed"),this._renderer.addClass(this.expressServiceRef.nativeElement,"on"),this._renderer.addClass(this.expressServiceIcon.nativeElement,"express-on"),this.expressEmergencyService.expressServiceCost.next(b.N.extraServices.expressService),this._productService.extraServices.expressService=!0,this._renderer.removeClass(this.emergencyServiceRef.nativeElement,"on"),this._renderer.removeClass(this.emergencyServiceIcon.nativeElement,"express-on"),this.expressEmergencyService.emergencyServiceCost.next(0),this._productService.extraServices.emergencyService=!1,this.expressEmergencyService.isTodayDate.next(!1),this.expressEmergencyService.isTomorrowtDate.next(!0)):"normal"===i.selectedDate&&(this._renderer.setStyle(this.expressServiceRef.nativeElement,"cursor","pointer"),this._renderer.setStyle(this.emergencyServiceRef.nativeElement,"cursor","pointer"),this._renderer.removeClass(this.expressServiceRef.nativeElement,"on"),this._renderer.removeClass(this.expressServiceIcon.nativeElement,"express-on"),this.expressServiceCost=0,this._productService.extraServices.expressService=!1,this._renderer.removeClass(this.emergencyServiceRef.nativeElement,"on"),this._renderer.removeClass(this.emergencyServiceIcon.nativeElement,"express-on"),this.emergencyServiceCost=0,this._productService.extraServices.emergencyService=!1,this.expressEmergencyService.isTodayDate.next(!1),this.expressEmergencyService.isTomorrowtDate.next(!1)))}),this.visaRef=this._orderService.getVisaRef(),"Safari"===this.browser&&(this.paymentStatusSub=this._orderService.paymentStatus.subscribe(function(){var i=(0,z.Z)(function*(n){t.paymentStatusForSafari=n,console.log("this.paymentStatusForSafari >>>>>>>>> "+t.paymentStatusForSafari),"success"===t.paymentStatusForSafari?t.prepConfirmation(t.visaRef):"failed"===t.paymentStatusForSafari?(yield t.paymentFailed(),t.isDpoPaymentFailed=!0,t.placedOrderLink="",t.isPlacedOrderEnabled=!1,t.isChecked=!1):"pending"===t.paymentStatusForSafari&&(t.placedOrderLink="",t.isPlacedOrderEnabled=!1,t.isChecked=!1)});return function(n){return i.apply(this,arguments)}}()))}onCancel3dSecureModal(){b.N.production||console.log("User Canceled the 3D Secure Modal"),this.networkSub.unsubscribe(),this.payWithCardServiceSub.unsubscribe(),this.hide3dSecureModalSub.unsubscribe()}paymentFailed(){var t=this;return(0,z.Z)(function*(){t.networkSub.unsubscribe(),t.payWithCardServiceSub.unsubscribe(),t.hide3dSecureModalSub.unsubscribe();const i=t._applicationService.getApplicationStorage(),n=[];for(let l=0;l<i.length;l++){const p=[],c=[],u=[],_=[],x=[];for(let C=0;C<i[l].files.id.length;C++)p.push({...i[l].files.id[C]});for(let C=0;C<i[l].files.passport.length;C++)c.push({...i[l].files.passport[C]});for(let C=0;C<i[l].files.returnFlightTicket.length;C++)_.push({...i[l].files.returnFlightTicket[C]});for(let C=0;C<i[l].files.hotelReservation.length;C++)x.push({...i[l].files.hotelReservation[C]});u.push({...i[l].files.photo[0]}),n.push({isMainApplicant:0===i[l].id,firstName:i[l].firstName,lastName:i[l].lastName,nationality:i[l].nationality,country:i[l].country,phone:i[l].phone,email:i[l].email,files:{photo:u,passport:c,id:p,returnFlightTicket:_,hotelReservation:x},passportNumber:i[l].passportNumber,profession:i[l].profession,travelDate:i[l].travelDate,travelPurpose:i[l].travelPurpose,visitedUA
1E:null!==i[l].visitedUAE,id:i[l].id})}const o={id:(new Date).getTime().toString(),timestamp:(0,Je.Bt)(),date:t._dubaiTimeService.getDubaiLocalTime().toDateString(),time:t._dubaiTimeService.getDubaiLocalTime().toLocaleTimeString(),meta:{isViewed:!1},value:{inUSD:(t.productStorage.cost+t.airportServiceCost+t.expressServiceCost+t.covidInsuranceCost+t.emergencyServiceCost)*t.applicants.length-t.couponValue,inSecondCurrency:((t.productStorage.cost+t.airportServiceCost+t.expressServiceCost)*(t.applicants.length*t.currencyStorage.currencyConverter)-t.couponValue).toFixed(2),currencyUsed:t._currencyService.getSelectedCurrencyStorage().currencyCode},coupon:{cashBackEarned:0,codeEarned:null,cashBackRedeemed:t.cashBackRedeemed,codeUsed:t.couponCodeUsed},payment:{method:"N/A",status:"Unpaid"},numberOfApplications:t._applicationService.getApplicationStorage().length,extraServices:{airportPickup:{isOrdered:0!==t.airportServiceCost,totalCostUSD:0===t.airportServiceCost?0:t.airportService*t.applicants.length,totalCostSecCurrency:0===t.airportServiceCost?0:t.airportService*t.applicants.length*t.currencyStorage.currencyConverter},expressService:{isOrdered:0!==t.expressServiceCost,totalCostUSD:0===t.expressServiceCost?0:t.expressService*t.applicants.length,totalCostSecCurrency:0===t.expressServiceCost?0:t.expressServiceCost*t.applicants.length*t.currencyStorage.currencyConverter},covidInsurance:{isOrdered:0!==t.covidInsuranceCost,totalCostUSD:0===t.covidInsuranceCost?0:t.covidInsurance*t.applicants.length,totalCostSecCurrency:0===t.covidInsuranceCost?0:t.covidInsuranceCost*t.applicants.length*t.currencyStorage.currencyConverter},EmergencyService:{isOrdered:0!==t.emergencyServiceCost,totalCostUSD:0===t.emergencyServiceCost?0:t.emergencyService*t.applicants.length,totalCostSecCurrency:0===t.emergencyServiceCost?0:t.emergencyServiceCost*t.applicants.length*t.currencyStorage.currencyConverter}},paymentMethod:t.selectedPaymentMethod,visaReference:t.visaRef,browserUsed:t.browser},s={ip:t._geoService.getLocationDetails().ip,location:t._geoService.getLocationDetails().countryName};try{t._orderService.getDeclinedOrderByVisaRefAndPaymentMethod(t.visaRef,t.selectedPaymentMethod).subscribe(function(){var l=(0,z.Z)(function*(p){if(console.log(`getDeclinedOrderByVisaRefAndPaymentMethod>>>>> data.length: ${p.length} & data: ${p}`),0===p.length){console.log("inside if getDeclinedOrderByVisaRefAndPaymentMethod"),yield t._orderService.createDeclinedOrder(o.id,n,t.productStorage,o,s);try{var c=yield t._dbService.getEmailTemplateByType(b.N.emailTypes.unpaid);if(console.log("emailTemplate>>>>>>>>>>",c),null!==c){const _=n[0].email,x=c.subject;var u=c.body;u=u.replace("@name",n[0].firstName).replace("@orderID",o.id).replace("@orderTime",o.time).replace("@orderDate",o.date).replace("@visa",`${t.productStorage.lang.en.fields.name} - ${t.productStorage.lang.en.fields.visaTypeDescription}`).replace("@visaQuantity",t._applicationService.getApplicationStorage().length.toString()).replace("@visaPrice",(t.productStorage.cost*t.applicants.length).toString()).replace("@covidInsQty",0===t.covidInsuranceCost?"0":t.applicants.length.toString()).replace("@covidInsPrice",0===t.covidInsuranceCost?"0":(t.covidInsurance*t.applicants.length).toString()).replace("@exprsSrvcQty",0===t.expressServiceCost?"0":t.applicants.length.toString()).replace("@exprsSrvcPrice",0===t.expressServiceCost?"0":(t.expressService*t.applicants.length).toString()).replace("@arptPkpQty",0===t.airportServiceCost?"0":t.applicants.length.toString()).replace("@arptPkpPrice",0===t.airportServiceCost?"0":(t.airportService*t.applicants.length).toString()).replace("@subtotal",((t.productStorage.cost+t.airportServiceCost+t.expressServiceCost+t.covidInsuranceCost+t.emergencyServiceCost)*t.applicants.length-t.couponValue).toString()).replace("@discount",t.cashBackRedeemed.toString()).replace("@totalAmount",((t.productStorage.cost+t.airportServiceCost+t.expressServiceCost+t.covidInsuranceCost+t.emergencyServiceCost)*t.applicants.length-t.couponValue).toString()).replace("@totalAmount",((t.productStorage.cost+t.airportServiceCost+t.expressServiceCost+t.covidInsuranceCost+t.emergencyServiceCost)*t.applicants.length-t.couponValue).toString()).replace("@totalAmount",((t.productStorage.cost+t.airportServiceCost+t.expressServiceCost+t.covidInsuranceCost+t.emergencyServiceCost)*t.applicants.length-t.couponValue).toString()),console.log(`email>>>> ${_} & hmtlBody>>>>> ${u}`);const T=yield t.emailSendingService.sendCustomEmail({emailSendTo:_,emailSubject:x,emailBody:u,emailType:"order",orderID:o.id,paymentStatus:"failed"});console.log("result>>>>>>>>>>>",T),console.log(!0===T?"Failed Email Sent":"Failed Email Not Sent")}else console.log("Failed Email Template not found")}catch(_){console.log("error on sending payment failed email>>>>>>> ",_)}t._incompleteOrderService.updateSingleField("order",o),t._incompleteOrderService.updateSingleField("orderStatus","failed")}else console.log("inside else getDeclinedOrderByVisaRefAndPaymentMethod"),console.log(`declined-order already exist against ${t.visaRef} & ${t.selectedPaymentMethod}`)});return function(p){return l.apply(this,arguments)}}()),t._applyService.closeActionModal.next(null),t._applyService.close3dSecureModal.next(null),t.newWindow=void 0,t._orderService.paymentStatus.next(void 0),t._actionService.open({data:{actionType:"payment",actionMessage:"Your order 
1cannot be completed. Please try again."}})}catch{console.log("error")}})()}onPlaceOrder_Old(){this._actionService.open({data:{actionType:"operation",actionMessage:"Placing your order..."}}),this.userID=this._authService.getUserId();const t=this.checkoutForm.get("cardNumber")?.value,n=(this.checkoutForm.get("cvc"),this.checkoutForm.get("expiryDate")?.value);this.checkoutForm.get("cardHolder"),n.slice(0,2),n.slice(n.indexOf("/")+2),((this.productStorage.cost+this.airportServiceCost+this.expressServiceCost+this.covidInsuranceCost+this.emergencyServiceCost)*this._currencyService.getAedRate()*this.applicants.length-this.couponValue).toFixed(2),this._geoService.getLocationDetails(),t.replace(/\s/g,"")}presentSecureCards(t){this.matDialog.open(Ar,{autoFocus:!1,disableClose:!0,data:t,panelClass:"bp-mat-dialog-container"}),this._applyService.closeActionModal.next(null)}listenToNetworkResult(){this.payWithCardServiceSub=this.networkService.listenToNetworkFeedback(this.threeDSServerTransID).subscribe(t=>{if(void 0!==t.result)switch(t.result.state){case"FAILED":default:this.paymentFailed();break;case"CAPTURED":this.prepConfirmation(t.result.orderReference)}})}updateButtonState(t,i,n){!1===this.isPlacedOrderEnabled?(this.placedOrderLink=`${window.location.href}/payment?paymentMethod=${n}&res=${t}`,this.isPlacedOrderEnabled=!0):(this.placedOrderLink="",this.isPlacedOrderEnabled=!1)}onPlaceOrder(){if(this._incompleteOrderService.updateSingleField("recentActionTaken","place order button clicked"),this.order={id:this.visaRef,timestamp:(0,Je.Bt)(),date:this._dubaiTimeService.getDubaiLocalTime().toDateString(),time:this._dubaiTimeService.getDubaiLocalTime().toLocaleTimeString(),meta:{isViewed:!1},value:{inUSD:(this.productStorage.cost+this.airportServiceCost+this.expressServiceCost+this.covidInsuranceCost+this.emergencyServiceCost)*this.applicants.length-this.couponValue,inSecondCurrency:((this.productStorage.cost+this.airportServiceCost+this.expressServiceCost)*(this.applicants.length*this.currencyStorage.currencyConverter)-this.couponValue).toFixed(2),currencyUsed:this._currencyService.getSelectedCurrencyStorage().currencyCode},coupon:{cashBackEarned:0,codeEarned:null,cashBackRedeemed:this.cashBackRedeemed,codeUsed:this.couponCodeUsed},payment:{method:null,status:null},numberOfApplications:this._applicationService.getApplicationStorage().length,extraServices:{airportPickup:{isOrdered:0!==this.airportServiceCost,totalCostUSD:0===this.airportServiceCost?0:this.airportService*this.applicants.length,totalCostSecCurrency:0===this.airportServiceCost?0:this.airportService*this.applicants.length*this.currencyStorage.currencyConverter},expressService:{isOrdered:0!==this.expressServiceCost,totalCostUSD:0===this.expressServiceCost?0:this.expressService*this.applicants.length,totalCostSecCurrency:0===this.expressServiceCost?0:this.expressServiceCost*this.applicants.length*this.currencyStorage.currencyConverter},covidInsurance:{isOrdered:0!==this.covidInsuranceCost,totalCostUSD:0===this.covidInsuranceCost?0:this.covidInsurance*this.applicants.length,totalCostSecCurrency:0===this.covidInsuranceCost?0:this.covidInsuranceCost*this.applicants.length*this.currencyStorage.currencyConverter},EmergencyService:{isOrdered:0!==this.emergencyServiceCost,totalCostUSD:0===this.emergencyServiceCost?0:this.emergencyService*this.applicants.length,totalCostSecCurrency:0===this.emergencyServiceCost?0:this.emergencyServiceCost*this.applicants.length*this.currencyStorage.currencyConverter}},paymentMethod:this.selectedPaymentMethod,visaReference:this.visaRef,browserUsed:this.browser},this._incompleteOrderService.updateSingleField("order",this.order),"Safari"===this.browser)if(this.isChecked=!this.isChecked,!1===this.isPlacedOrderEnabled){this._actionService.open({data:{actionType:"operation",actionMessage:"Checking your info"}}),this.userID=this._authService.getUserId(),console.log(`userID>>>>>>>>>>>> ${this.userID}`);const t=((this.productStorage.cost+this.airportServiceCost+this.expressServiceCost+this.covidInsuranceCost+this.emergencyServiceCost)*this._currencyService.getAedRate()*this.applicants.length-this.couponValue).toFixed(2),i=this._geoService.getLocationDetail
1s().ip,n={email:this.applicants[0].email,orderAmount:t,ip:i,userID:this.userID,productionEnvironment:b.N.production};console.log("attemptPurchaseDetails: "+n),this._orderService.attemptPurchase(this.userID,n),this._orderService.fetchPaymentDetails(this.visaRef);const o={amount:t,email:this.applicants[0].email,method:this.selectedPaymentMethod,docID:this.visaRef,status:"processing"};console.log("paymentDetails: "+o),this._orderService.savePaymentDetails(this.visaRef,o),"network"===this.selectedPaymentMethod?this.fnNetworkPayment(t):"dpo"===this.selectedPaymentMethod?this.fnDPOPayment(t):"ccavenue"===this.selectedPaymentMethod&&this.fnCCPayment(t)}else this.placedOrderLink="",this.isPlacedOrderEnabled=!1,this.isChecked=!1,this._orderService.deletePaymentDetails(this.visaRef);else{this._actionService.open({data:{actionType:"operation",actionMessage:"Placing your order..."}}),this.userID=this._authService.getUserId(),console.log(`userID>>>>>>>>>>>> ${this.userID}`);const t=((this.productStorage.cost+this.airportServiceCost+this.expressServiceCost+this.covidInsuranceCost+this.emergencyServiceCost)*this._currencyService.getAedRate()*this.applicants.length-this.couponValue).toFixed(2),i=this._geoService.getLocationDetails().ip,n={email:this.applicants[0].email,orderAmount:t,ip:i,userID:this.userID,productionEnvironment:b.N.production};console.log("attemptPurchaseDetails: "+n),this._orderService.attemptPurchase(this.userID,n),"network"===this.selectedPaymentMethod?this.fnNetworkPayment(t):"dpo"===this.selectedPaymentMethod?this.fnDPOPayment(t):"ccavenue"===this.selectedPaymentMethod&&this.fnCCPayment(t)}}fnCCPayment(t){var i=this;let n=parseFloat(t);console.log(`amount: ${n} & visaReference: ${this.visaRef}`),this._http.get(`${b.N.fnCCPayment}?amount=${n}&visaReferenceNo=${this.visaRef}`,{responseType:"text"}).subscribe(function(){var s=(0,z.Z)(function*(l){if(console.log("Placed Button Tapped"),console.log("data: "+l),""!=l&&null!=l){var p=encodeURIComponent(l);"Safari"===i.browser?(i.placedOrderLink=`${window.location.href}/payment?paymentMethod=${i.selectedPaymentMethod}&res=${p}&visaReferenceForSafari=${i.visaRef}`,i.isPlacedOrderEnabled=!0,i._applyService.closeActionModal.next(null)):i.openPopup(p,i.visaRef,"ccavenue")}else yield i.paymentFailed(),i.isDpoPaymentFailed=!0,i.placedOrderLink="",i.isPlacedOrderEnabled=!1,i.isChecked=!1});return function(l){return s.apply(this,arguments)}}(),s=>{console.log("err: "+s.message),this._applyService.closeActionModal.next(null),this._actionService.open({data:{actionType:"payment",actionMessage:"Your order cannot be completed. Please try again."}})})}fnNetworkPayment(t){var i=this;let n=parseFloat(t);console.log(`amount: ${n} & visaReference: ${this.visaRef}`),this._http.get(`${b.N.fnNetworkPaymentURL}?amount=${n}&visaReferenceNo=${this.visaRef}`,{responseType:"text"}).subscribe(function(){var s=(0,z.Z)(function*(l){if(console.log("Placed Button Tapped"),console.log("data:"+l),""!=l&&null!=l&&null!=l){let p=JSON.parse(l);console.log("jsonResult: "+p),console.log("jsonResult._links.payment.href: ("+p._links.payment.href+")");let c=encodeURIComponent(p._links.payment.href.trim());"Safari"===i.browser?(i.placedOrderLink=`${window.location.href}/payment?paymentMethod=${i.selectedPaymentMethod}&res=${c}&visaReferenceForSafari=${i.visaRef}`,i.isPlacedOrderEnabled=!0,i._applyService.closeActionModal.next(null)):i.openPopup(c,i.visaRef,"network")}else yield i.paymentFailed(),i.isDpoPaymentFailed=!0,i.placedOrderLink="",i.isPlacedOrderEnabled=!1,i.isChecked=!1});return function(l){return s.apply(this,arguments)}}(),s=>{console.log("err: "+s.message),this._applyService.closeActionModal.next(null),this._actionService.open({data:{actionType:"payment",actionMessage:"Your order cannot be completed. Please try again."}})})}fnDPOPayment(t){var i=this;let n=parseFloat(t);console.log(`amount: ${n} & visaReference: ${this.visaRef}`),this._http.get(`${b.N.fnDPOPaymentURL}?amount=${n}&visaReferenceNo=${this.visaRef}`,{responseType:"text"}).subscribe(function(){var s=(0,z.Z)(function*(l){console.log("Placed Button Tapped"),console.log("data:"+l),""!=l&&null!=l?"Safari"===i.browser?(i.placedOrderLink=`${window.location.href}/payment?paymentMethod=${i.selectedPaymentMethod}&res=${l}&visaReferenceForSafari=${i.visaRef}`,i.isPlacedOrderEnabled=!0,i._applyService.closeActionModal.next(null)):i.openPopup(l,i.visaRef,"dpo"):(yield i.paymentFailed(),i.placedOrderLink="",i.isPlacedOrderEnabled=!1,i.isChecked=!1)});return function(l){return s.apply(this,arguments)}}(),s=>{console.log("err: "+s.message),this._applyService.closeActionModal.next(null),this._actionService.open({data:{actionType:"payment",actionMessage:"Your order 
1cannot be completed. Please try again."}})})}openPopup(t,i,n){this.newWindow=window.open(),this.newWindow.location.href=`${window.location.href}/payment?paymentMethod=${n}&res=${t}`,this.newWindow.target="_blank",!1===this.isEventListenerAdded&&(console.log("this.isEventListenerAdded inside openPopup:",this.isEventListenerAdded),this.eventListenerFunction=o=>this.popupEventListener(o,i),window.addEventListener("message",this.eventListenerFunction,!1),this.isEventListenerAdded=!0)}manuallyClosedNewWindow(){this._afs.collection(b.N.firestoreConfig.networkCollectionRef).doc(this.userID).delete().then(()=>{this.paymentStatus=void 0,this._applyService.closeActionModal.next(null),this.newWindow=void 0,this._actionService.open({data:{actionType:"payment",actionMessage:"Your payment process couldn't be completed as the payment procedure window was closed."}})}).catch()}generateRandomVisaReference(t){let i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n="";for(let o=0;o<t;o++){const s=Math.floor(Math.random()*i.length);n+=i.charAt(s)}return n}prepConfirmation(t){var i=this;const n=this.userID.slice(1,8),o=this._applicationService.getApplicationStorage(),s=[];for(let c=0;c<o.length;c++){const u=[],_=[],x=[],T=[],C=[];for(let y=0;y<o[c].files.id.length;y++)u.push({...o[c].files.id[y]});for(let y=0;y<o[c].files.passport.length;y++)_.push({...o[c].files.passport[y]});for(let y=0;y<o[c].files.returnFlightTicket.length;y++)T.push({...o[c].files.returnFlightTicket[y]});for(let y=0;y<o[c].files.hotelReservation.length;y++)C.push({...o[c].files.hotelReservation[y]});x.push({...o[c].files.photo[0]}),s.push({isMainApplicant:0===o[c].id,firstName:o[c].firstName,lastName:o[c].lastName,nationality:o[c].nationality,country:o[c].country,phone:o[c].phone,email:o[c].email,files:{photo:x,passport:_,id:u,returnFlightTicket:T,hotelReservation:C},passportNumber:o[c].passportNumber,profession:o[c].profession,travelDate:o[c].travelDate,travelPurpose:o[c].travelPurpose,visitedUAE:null!==o[c].visitedUAE,id:o[c].id})}const l={id:t.replace(/-+/g,""),timestamp:(0,Je.Bt)(),date:this._dubaiTimeService.getDubaiLocalTime().toDateString(),time:this._dubaiTimeService.getDubaiLocalTime().toLocaleTimeString(),meta:{isViewed:!1},value:{inUSD:(this.productStorage.cost+this.airportServiceCost+this.expressServiceCost+this.covidInsuranceCost+this.emergencyServiceCost)*this.applicants.length-this.couponValue,inSecondCurrency:((this.productStorage.cost+this.airportServiceCost+this.expressServiceCost)*(this.applicants.length*this.currencyStorage.currencyConverter)-this.couponValue).toFixed(2),currencyUsed:this._currencyService.getSelectedCurrencyStorage().currencyCode},coupon:{cashBackEarned:this._productService.getSingleProductStorage().cashBack,codeEarned:this._productService.getSingleProductStorage().cashBack>0?n:null,cashBackRedeemed:this.cashBackRedeemed,codeUsed:this.couponCodeUsed},payment:{method:"Online",status:"Paid"},numberOfApplications:this._applicationService.getApplicationStorage().length,extraServices:{airportPickup:{isOrdered:0!==this.airportServiceCost,totalCostUSD:0===this.airportServiceCost?0:this.airportService*this.applicants.length,totalCostSecCurrency:0===this.airportServiceCost?0:this.airportService*this.applicants.length*this.currencyStorage.currencyConverter},expressService:{isOrdered:0!==this.expressServiceCost,totalCostUSD:0===this.expressServiceCost?0:this.expressService*this.applicants.length,totalCostSecCurrency:0===this.expressServiceCost?0:this.expressServiceCost*this.applicants.length*this.currencyStorage.currencyConverter},covidInsurance:{isOrdered:0!==this.covidInsuranceCost,totalCostUSD:0===this.covidInsuranceCost?0:this.covidInsurance*this.applicants.length,totalCostSecCurrency:0===this.covidInsuranceCost?0:this.covidInsuranceCost*this.applicants.length*this.currencyStorage.currencyConverter},emergencyService:{isOrdered:0!==this.emergencyServiceCost,totalCostUSD:0===this.emergencyServiceCost?0:this.emergencyService*this.applicants.length,totalCostSecCurrency:0===this.emergencyServiceCost?0:this.emergencyServiceCost*this.applicants.length*this.currencyStorage.currencyConverter}},paymentMethod:this.selectedPaymentMethod,browserUsed:this.browser};this._orderService.setOrderStorage(l);
1const p={ip:this._geoService.getLocationDetails().ip,location:this._geoService.getLocationDetails().countryName};if(this._productService.getSingleProductStorage().cashBack>0){const c=new gr(this._productService.getSingleProductStorage().cashBack,n,!1,null,null,null,`${this._dubaiTimeService.getDubaiLocalTime().toDateString()}\n      @ ${this._dubaiTimeService.getDubaiLocalTime().toLocaleTimeString()}`,null);this._couponService.setCouponStorage(c),this._dbService.createCoupon(c,n).then(()=>{b.N.production||console.log("Coupon Created")}).catch(()=>{b.N.production||console.log("Unable to create Coupon")})}this._orderService.createOrder(l.id,s,this.productStorage,l,p).then((0,z.Z)(function*(){i.couponCodeFound&&i._dbService.updateCoupon(i.couponID).then(()=>{}).catch(()=>{});try{var c=yield i._dbService.getEmailTemplateByType(b.N.emailTypes.paid);if(console.log("emailTemplate>>>>>>>>>>",c),null!==c){const _=s[0].email,x=c.subject;var u=c.body;u=u.replace("@name",s[0].firstName).replace("@orderID",l.id).replace("@orderTime",l.time).replace("@orderDate",l.date).replace("@visa",`${i.productStorage.lang.en.fields.name} - ${i.productStorage.lang.en.fields.visaTypeDescription}`).replace("@visaQuantity",i._applicationService.getApplicationStorage().length.toString()).replace("@visaPrice",(i.productStorage.cost*i.applicants.length).toString()).replace("@covidInsQty",0===i.covidInsuranceCost?"0":i.applicants.length.toString()).replace("@covidInsPrice",0===i.covidInsuranceCost?"0":(i.covidInsurance*i.applicants.length).toString()).replace("@exprsSrvcQty",0===i.expressServiceCost?"0":i.applicants.length.toString()).replace("@exprsSrvcPrice",0===i.expressServiceCost?"0":(i.expressService*i.applicants.length).toString()).replace("@arptPkpQty",0===i.airportServiceCost?"0":i.applicants.length.toString()).replace("@arptPkpPrice",0===i.airportServiceCost?"0":(i.airportService*i.applicants.length).toString()).replace("@subtotal",((i.productStorage.cost+i.airportServiceCost+i.expressServiceCost+i.covidInsuranceCost+i.emergencyServiceCost)*i.applicants.length-i.couponValue).toString()).replace("@discount",i.cashBackRedeemed.toString()).replace("@totalAmount",((i.productStorage.cost+i.airportServiceCost+i.expressServiceCost+i.covidInsuranceCost+i.emergencyServiceCost)*i.applicants.length-i.couponValue).toString()),console.log(`email>>>> ${_} & hmtlBody>>>>> ${u}`);const T=yield i.emailSendingService.sendCustomEmail({emailSendTo:_,emailSubject:x,emailBody:u,emailType:"order",orderID:l.id,paymentStatus:"success"});console.log("result>>>>>>>>>>>",T),console.log(!0===T?"Success Email Sent":"Success Email Not Sent")}else console.log("Success Email Template not found")}catch(_){console.log("error on sending payment success email>>>>>>> ",_)}i._incompleteOrderService.updateSingleField("order",l),i._incompleteOrderService.updateSingleField("orderStatus","succeed"),i._applyService.unloadedModule.next(null),i._authService.allowedToViewConfirmationPage=!0,i._applyService.closeActionModal.next(null),"Safari"!==i.browser&&!0===i.isEventListenerAdded&&(window.removeEventListener("message",i.eventListenerFunction),i.isEventListenerAdded=!1),i._orderService.visaRefFromOrderService?.next(""),i._orderService.paymentStatus.next(void 0),i._orderService.changeIsAlreadyFetchingPaymentDetails(!1),i._router.navigateByUrl("/confirmation"),i._renderer.removeClass(document.querySelector("body"),"no-scroll")})).catch(()=>{})}initCheckoutForm(){this.checkoutForm=this._fb.group({cardNumber:["",[It.validateCCNumber]],cardHolder:[null,{validators:[d.Validators.required,d.Validators.minLength(4)]}],expiryDate:["",[It.validateExpDate]],cvc:["",[d.Validators.required,d.Validators.minLength(3),d.Validators.maxLength(4)]]})}initCouponForm(){this.couponForm=this._fb.group({couponCode:[null,[d.Validators.required]]})}checkCoupon(){const t=this.couponForm.get("couponCode");t?.value.length>4&&(this._actionService.open({data:{actionType:"operation",actionMessage:"Validating Coupon"}}),this.validateCouponSub=this._dbService.validateCoupon(t.value).subscribe(i=>
1{i.exists?(this.couponID=i.id,this.couponDetails=i.data(),this._applyService.closeActionModal.next(null),this.couponDetails.isUsed?(this._applyService.closeActionModal.next(null),this.resetCouponForm()):(this.couponValue=this.couponDetails.value,this.couponForm.reset(),this.couponFormPlaceholder="Discount Applied",t?.disable(),this.couponCodeFound=!0,this.cashBackRedeemed=this.couponDetails.value,this.couponCodeUsed=this.couponDetails.code,this._renderer.addClass(this.checkCouponBtnRef.nativeElement,"code-found"),this._couponService.setCouponAmountUsed(this.couponValue))):(this._applyService.closeActionModal.next(null),this.resetCouponForm())}))}resetCouponForm(){this.couponForm.reset(),this.couponFormPlaceholder="Code Not Found"}onExpressService(){"normal"===this.selectedDate&&(this.expressServiceRef.nativeElement.classList.contains("on")?(this._applicationService.updateTravelDateOfAllApplicants(this.initialSelectedTravelDate),this._renderer.removeClass(this.expressServiceRef.nativeElement,"on"),this._renderer.removeClass(this.expressServiceIcon.nativeElement,"express-on"),this.expressEmergencyService.previousSelectedDate.next(""),this.expressEmergencyService.expressServiceCost.next(0),this._productService.extraServices.expressService=!1,this.expressEmergencyService.isTodayDate.next(!1),this.expressEmergencyService.isTomorrowtDate.next(!1)):this.onConfrimExpress(),this._incompleteOrderService.addOrUpdateApplicants())}onEmergencyService(){"normal"===this.selectedDate&&(this.emergencyServiceRef.nativeElement.classList.contains("on")?(this._applicationService.updateTravelDateOfAllApplicants(this.initialSelectedTravelDate),this._renderer.removeClass(this.emergencyServiceRef.nativeElement,"on"),this._renderer.removeClass(this.emergencyServiceIcon.nativeElement,"express-on"),this.expressEmergencyService.previousSelectedDate.next(""),this.expressEmergencyService.emergencyServiceCost.next(0),this._productService.extraServices.emergencyService=!1,this.expressEmergencyService.isTodayDate.next(!1),this.expressEmergencyService.isTomorrowtDate.next(!1)):this.onConfrimEmergency(),this._incompleteOrderService.addOrUpdateApplicants())}onCovidInsurance(){this.covidInsuranceRef.nativeElement.classList.contains("on")?(this._renderer.removeClass(this.covidInsuranceRef.nativeElement,"on"),this._renderer.removeClass(this.covidInsuranceIcon.nativeElement,"covid-insurance-on"),this.covidInsuranceCost=0,this._productService.extraServices.covidInsurance=!1):(this._renderer.addClass(this.covidInsuranceRef.nativeElement,"on"),this._renderer.addClass(this.covidInsuranceIcon.nativeElement,"covid-insurance-on"),this.covidInsuranceCost=b.N.extraServices.covidInsurance,this._productService.extraServices.covidInsurance=!0)}onAirportPickup(){this.airportPickupRef.nativeElement.classList.contains("on")?(this._renderer.removeClass(this.airportPickupRef.nativeElement,"on"),this._renderer.removeClass(this.airportPickupIcon.nativeElement,"chauffeur-on"),this.airportServiceCost=0,this._productService.extraServices.airportPickup=!1):(this._renderer.addClass(this.airportPickupRef.nativeElement,"on"),this._renderer.addClass(this.airportPickupIcon.nativeElement,"chauffeur-on"),this.airportServiceCost=b.N.extraServices.airportPickup,this._productService.extraServices.airportPickup=!0)}onCancel(){this.placedOrderLink="",this.isPlacedOrderEnabled=!1,this.isChecked=!1,""!==this.visaRef&&this._orderService.deletePaymentDetails(this.visaRef),!0===this.isEventListenerAdded&&(window.removeEventListener("message",this.eventListenerFunction),this.isEventListenerAdded=!1),this._actionService.open({data:{actionType:"cancel"}})}onReview(){this._applyService.scrollToTop.next(null),this._incompleteOrderService.updateSingleField("recentActionTaken","back to review tab")}onConfrimExpress(){this.expressEmergencyService.previousSelectedDate.next(this._applicationService.getApplicationStorage()[0].travelDate),this._applicationService.updateTravelDateOfAllApplicants(new Date((new Date).setDate((new Date).getDate()+1)).toDateString()),this._renderer.removeClass(document.getElementById("emergency-service"),"on"),this._renderer.removeClass(document.getElementById("emergency-service-icon"),"express-on"),this.expressEmergencyService.emergencyServiceCost.next(0),this._productService.extraServices.emergencyService=!1,this.expressEmergencyService.isTodayDate.next(!1),this._renderer.addClass(document.getElementById("express-service"),"on"),this._renderer.addClass(document.getElementById("express-service-icon"),"express-on"),this.expressEmergencyService.expressServiceCost.next(b.N.extraServices.expressService),this._productService.extraServices.expressService=!0,this.expressEmergencyService.isTomorrowtDate.next(!0)}onConfrimEmergency(){this.expressEmergencyService.previousSelectedDate.next(this._applicationService.getApplicationStorage()[0].travelDate),this._applicationService.updateTravelDateOfAllApplicants(new Date((new Date).setDate((new Date).getDate())).toDateString()),this._renderer.removeClass(document.getElementById("express-service"),"on"),this._renderer.removeClass(document.getElementById("express-service-icon"),"express-on"),this.expressEmergencyService.expressServiceCost.next(0),this._productService.extraServices.expressService=!1,this.expressEmergencyService.isTomorrowtDate.next(!1),this._renderer.addClass(document.getElementById("emergency-service"),"on"),this._renderer.addClass(document.getElementById("emergency-service-icon"),"express-on"),this.expressEmergencyService.emergencyServiceCost.next(b.N.extraServices.emerygencyService),this._productService.extraServices.emergencyService=!0,this.expressEmergencyService.isTodayDate.next(!0)}myBrowser(){this.browser=-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"unknown"}fnNetworkPaymentVerify(t,i,n){var o=this;this._http.get(`${b.N.fnNetworkPaymentVerifyURL}?token=${i}&visareference=${t}&ref=${n}`,{responseType:"text"}).subscribe(function(){var l=(0,z.Z)(function*(p){console.log("Result from fnNetworkPaymentVerify: "+p),null!=p&&""!=p?"1"===p?o.prepConfirmation(t):(yield o.paymentFailed(),o.isDpoPaymentFailed=!0,o.paymentStatus=void 0):alert("Error in processing payment. Please try again!")});return function(p){return l.apply(this,arguments)}}(),l=>{console.log("err: "+l.message)})}fnDPOPaymentVerify(t,i){var n=this;this._http.get(`${b.N.fnDPOPaymentVerifyURL}?visaReference=${t}&TransactionToken=${i}`,{responseType:"text"}).subscribe(function(){var s=(0,z.Z)(function*(l){console.log("Result from fnDPOPaymentVerify: "+l),null!=l&&""!=l?"1"===l?n.prepConfirmation(t):(yield n.paymentFailed(),n.isDpoPaymentFailed=!0,n.paymentStatus=void 0):alert("Error in processing payment. Please try again!")});return function(l){return s.apply(this,arguments)}}(),s=>{console.log("err: "+s.message)})}fnCCAPaymentVerify(t,i){var n=this;return(0,z.Z)(function*(){"1"===i?n.prepConfirmation(t):(yield n.paymentFailed(),n.isDpoPaymentFailed=!0,n.paymentStatus=void 0)})()}clearLocalStorageItems(){localStorage.removeItem("visareference"),localStorage.removeItem("token"),localStorage.removeItem("ref"),localStorage.removeItem("visaReference"),localStorage.removeItem("transactionToken"),localStorage.removeItem("visaReference"),localStorage.removeItem("orderStatus")}static#e=this.\u0275fac=function(i){return new(i||a)(e.\u0275\u0275directiveInject(d.UntypedFormBuilder),e.\u0275\u0275directiveInject(ne.I),e.\u0275\u0275directiveInject(ae.g),e.\u0275\u0275directiveInject(e.Renderer2),e.\u0275\u0275directiveInject(_e.i),e.\u0275\u0275directiveInject(ve.M),e.\u0275\u0275directiveInject(ge.M),e.\u0275\u0275directiveInject(Rr.F0),e.\u0275\u0275directiveInject(Pr.O),e.\u0275\u0275directiveInject(He.p),e.\u0275\u0275directiveInject(Or.j),e.\u0275\u0275directiveInject(Dt.p),e.\u0275\u0275directiveInject(Vr.ST),e.\u0275\u0275directiveInject(Ct.e),e.\u0275\u0275directiveInject(pe),e.\u0275\u0275directiveInject(Mt.T),e.\u0275\u0275directiveInject(W.uw),e.\u0275\u0275directiveInject(Ft.S),e.\u0275\u0275directiveInject(me.eN),e.\u0275\u0275directiveInject(Ke),e.\u0275\u0275directiveInject(Nr),e.\u0275\u0275directiveInject(Tr),e.\u0275\u0275directiveInject(de.G))};static#t=this.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["app-checkout"]],viewQuery:function(i,n){if(1&i&&(e.\u0275\u0275viewQuery(Lr,7),e.\u0275\u0275viewQuery(Br,7),e.\u0275\u0275viewQuery(jr,7),e.\u0275\u0275viewQuery(zr,7),e.\u0275\u0275viewQuery(Ur,7),e.\u0275\u0275viewQuery(Yr,7),e.\u0275\u0275viewQuery($r,7),e.\u0275\u0275viewQuery(Hr,7),e.\u0275\u0275viewQuery(Wr,7),e.\u0275\u0275viewQuery(Qr,7)),2&i){let o;e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.expressServiceRef=o.first),e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.airportPickupRef=o.first),e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.covidInsuranceRef=o.first),e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.emergencyServiceRef=o.first),e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.expressServiceIcon=o.first),e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.airportPickupIcon=o.first),e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.covidInsuranceIcon=o.first),e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.checkCouponBtnRef=o.first),e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.emergencyServiceIcon=o.first),e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.confirmPaymentCheckbox=o.first)}},decls:126,vars:43,consts:[[1,"app-modal-column-group","app-modal-column-group-checkout"],["id","summary-div",1,"app-modal-column","app-modal-column-checkout","alternative-column"],[1,"app-column-header","no-margin"],[1,"table-container"],[1,"flex-row"],[1,"table-product","table-product-header"],[1,"table-text","table-text-header"],[1,"table-text","table-text-header","table-text-right"],[1,"table-product"],[1,"table-text"],[1,"table-text","table-text-right"],[1,"invoice-line"],[1,"table-header"],[1,"table-header","table-header-right"],[1,"extra-services-wr"],["id","express-service",1,"extra-service-card","w-inline-block",3,"click"],["expressServiceRef",""],[1,"extra-service-card-header"],["id","express-service-icon",1,"card-service-icon","express-off"],["expressServiceIcon",""],[1,"card-header","card-header-service"],[1,"card-para","car-para-sm","card-para-service"],["id","emergency-service",1,"extra-service-card","w-inline-block",3,"click"],["emergencyServiceRef",""],["id","emergency-service-icon",1,"card-service-icon","express-off"],["emergencyServiceIcon",""],[1,"extra-service-card","w-inline-block",3,"click"],["covidInsuranceRef",""],[1,"card-service-icon","covid-insurance-off"],["covidInsuranceIcon",""],["airportPickupRef",""],[1,"card-service-icon","chauffeur-off"],["airportPickupIcon",""],[1,"w-form"],[3,"formGroup"],[1,"input-group-coupon"],[1,"input-container-coupon"],["appCharacters","","formControlName","couponCode","type","text",1,"coupon-code-field","w-input",3,"placeholder"],[1,"apply-code
1-btn","w-button",3,"disabled","click"],["checkCouponBtnRef",""],[1,"table-header","table-header-large"],[1,"table-header","table-header-right","table-header-large"],["awPreviousStep","",1,"bp-btn","btn-checkout-previous","w-button",3,"click"],["id","payment-details-div",1,"app-modal-column","app-modal-column-checkout"],[1,"text-center"],[1,"card-icon-modal","ssl"],[1,"cc-wrapper","cc-checkout"],["id","payment-method-div",4,"ngIf"],["style","text-align: center;",4,"ngIf"],["class","bp-btn btn-checkout w-button","tabindex","0","cdkTrapFocusAutoCapture","","cdkTrapFocus","",3,"click",4,"ngIf"],[1,"bp-btn","btn-cancel-order","w-button",3,"click"],["awPreviousStep","",1,"bp-btn","btn-checkout-previous","btn-mobile-only","w-button",3,"click"],["id","payment-method-div"],[1,"payment-method-heading"],["type","radio","id","dpo","name","payment_method","value","dpo",3,"checked","change"],["for","dpo",1,"payment-methods-labels"],["id","dpo-logo","src","../../../assets/images/dpo.png","width","80","alt","DPO"],["type","radio","id","network","name","payment_method","value","network",3,"checked","change"],["for","network",1,"payment-methods-labels"],["id","network-logo","src","../../../assets/images/networkg.png","width","120","alt","Network"],["type","radio","id","cc","name","payment_method","value","cc",3,"checked","change"],["for","cc",1,"payment-methods-labels"],["id","cc-logo","src","../../../assets/images/ccavenue.png","width","120","alt","Network"],[2,"text-align","center"],[1,"checkbox-container"],["type","checkbox","id","confirm-payment","tabindex","1",3,"checked","click"],["confirmPaymentCheckbox",""],["id","confirm-payment-label","for","confirm-payment"],["id","placed-order-btn","tabindex","0","cdkTrapFocusAutoCapture","","cdkTrapFocus","","target","_blank",1,"bp-btn","btn-checkout","w-button",2,"margin-left","auto","margin-right","auto",3,"ngClass","href"],["tabindex","0","cdkTrapFocusAutoCapture","","cdkTrapFocus","",1,"bp-btn","btn-checkout","w-button",3,"click"]],template:function(i,n){1&i&&(e.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"div",2),e.\u0275\u0275text(3,"ORDER SUMMARY"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div",3)(5,"div",4)(6,"div",5),e.\u0275\u0275text(7,"Visa Type"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(8,"div",6),e.\u0275\u0275text(9,"QTY "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(10,"div",7),e.\u0275\u0275text(11,"Price"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(12,"div",4)(13,"div",8),e.\u0275\u0275text(14),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(15,"div",9),e.\u0275\u0275text(16),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(17,"div",10),e.\u0275\u0275text(18),e.\u0275\u0275pipe(19,"number"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(20,"div",11),e.\u0275\u0275elementStart(21,"div",4)(22,"div",12),e.\u0275\u0275text(23,"Subtotal"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(24,"div",13),e.\u0275\u0275text(25),e.\u0275\u0275pipe(26,"number"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(27,"div"),e.\u0275\u0275text(28,"Add to your order?"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(29,"div",14)(30,"a",15,16),e.\u0275\u0275listener("click",function(){return n.onExpressService()}),e.\u0275\u0275elementStart(32,"div",17),e.\u0275\u0275element(33,"div",18,19),e.\u0275\u0275elementStart(35,"div"),e.\u0275\u0275text(36),e.\u0275\u0275pipe(37,"number"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(38,"h1",20),e.\u0275\u0275text(39,"Express "),e.\u0275\u0275element(40,"br"),e.\u0275\u0275text(41,"Service"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(42,"p",21),e.\u0275\u0275text(43,"Get your order"),e.\u0275\u0275element(44,"br"),e.\u0275\u0275text(45,"in 12 Hours"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(46,"a",22,23),e.\u0275\u0275listener("click",function(){return n.onEmergencyService()}),e.\u0275\u0275elementStart(48,"div",17),e.\u0275\u0275element(49,"div",24,25),e.\u0275\u0275elementStart(51,"div"),e.\u0275\u0275text(52),e.\u0275\u0275pipe(53,"number"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(54,"h1",20),e.\u0275\u0275text(55,"Emergency "),e.\u0275\u0275element(56,"br"),e.\u0275\u0275text(57,"
1Service"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(58,"p",21),e.\u0275\u0275text(59,"Get your order"),e.\u0275\u0275element(60,"br"),e.\u0275\u0275text(61,"on emergency basis"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(62,"a",26,27),e.\u0275\u0275listener("click",function(){return n.onCovidInsurance()}),e.\u0275\u0275elementStart(64,"div",17),e.\u0275\u0275element(65,"div",28,29),e.\u0275\u0275elementStart(67,"div"),e.\u0275\u0275text(68),e.\u0275\u0275pipe(69,"number"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(70,"h1",20),e.\u0275\u0275text(71,"COVID "),e.\u0275\u0275element(72,"br"),e.\u0275\u0275text(73,"Insurance"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(74,"p",21),e.\u0275\u0275text(75,"Get your COVID"),e.\u0275\u0275element(76,"br"),e.\u0275\u0275text(77,"Insurance Policy"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(78,"a",26,30),e.\u0275\u0275listener("click",function(){return n.onAirportPickup()}),e.\u0275\u0275elementStart(80,"div",17),e.\u0275\u0275element(81,"div",31,32),e.\u0275\u0275elementStart(83,"div"),e.\u0275\u0275text(84),e.\u0275\u0275pipe(85,"number"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(86,"h1",20),e.\u0275\u0275text(87,"Airport "),e.\u0275\u0275element(88,"br"),e.\u0275\u0275text(89,"Pickup"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(90,"p",21),e.\u0275\u0275text(91,"Pre-book one way airport transfer from DXB airport to anywhere in Dubai"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(92,"div",33)(93,"form",34)(94,"div",35)(95,"div",36),e.\u0275\u0275element(96,"input",37),e.\u0275\u0275elementStart(97,"button",38,39),e.\u0275\u0275listener("click",function(){return n.checkCoupon()}),e.\u0275\u0275elementEnd()()()()(),e.\u0275\u0275element(99,"div",11),e.\u0275\u0275elementStart(100,"div",4)(101,"div",40),e.\u0275\u0275text(102,"Total"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(103,"div",41),e.\u0275\u0275text(104),e.\u0275\u0275pipe(105,"number"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(106,"button",42),e.\u0275\u0275listener("click",function(){return n.onReview()}),e.\u0275\u0275text(107,"review"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(108,"div",43)(109,"div",2),e.\u0275\u0275text(110,"PAYMENT DETAILS"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(111,"div"),e.\u0275\u0275text(112,"All transactions are secure and encrypted."),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(113,"div"),e.\u0275\u0275text(114,"Do not close tabs in process of payment."),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(115,"div",44),e.\u0275\u0275text(116,"If you do not receive confirmation after payment successful, don't worry just send email to [email protected]."),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(117,"div",45)(118,"div",46),e.\u0275\u0275template(119,Gr,16,3,"div",47),e.\u0275\u0275template(120,qr,8,5,"div",48),e.\u0275\u0275template(121,Xr,2,0,"button",49),e.\u0275\u0275elementStart(122,"button",50),e.\u0275\u0275listener("click",function(){return n.onCancel()}),e.\u0275\u0275text(123,"cancel"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(124,"button",51),e.\u0275\u0275listener("click",function(){return n.onReview()}),e.\u0275\u0275text(125,"review"),e.\u0275\u0275elementEnd()()()),2&i&&(e.\u0275\u0275advance(14),e.\u0275\u0275textInterpolate2("",n.productStorage.lang[n.lang].fields.name," - ",n.productStorage.lang[n.lang].fields.visaTypeDescription,""),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(n.applicants.length),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1("",e.\u0275\u0275pipeBind2(19,22,n.productStorage.cost*n.currencyStorage.currencyConverter,"1.0-0")," "),e.\u0275\u0275advance(7),e.\u0275\u0275textInterpolate2(" ",n.currencyStorage.currencyCode," ",e.\u0275\u0275pipeBind2(26,25,n.productStorage.cost*n.currencyStorage.currencyConverter*n.applicants.length,"1.0-0")," "),e.\u0275\u0275advance(11),e.\u0275\u0275textInterpolate2("",e.\u0275\u0275pipeBind2(37,28,n.expressService*n.currencyStorage.currencyConverter*n.applicants.length,"1.0-0")," ",n.currencyStorage.currencyCode,""),e.\u0275\u0275advance(16),e.\u0275\u0275textInterpolate2("",e.\u0275\u0275pipeBind2(53,31,n.emergencyService*n.currencyStorage.currencyConverter*n.applicants.length,"1.0-0")," ",n.currencyStorage.currencyCode,""),e.\u0275\u0275advance(16),e.\u0275\u0275textInterpolate2("",e.\u0275\u0275pipeBind2(69,34,n.covidInsurance*n.currencyStorage.currencyConverter*n.applicants.length,"1.0-0")," ",n.currencyStorage.currencyCode,""),e.\u0275\u0275advance(16),e.\u0275\u0275textInterpolate2("",e.\u0275\u0275pipeBind2(85,37,n.airportService*n.currencyStorage.currencyConverter*n.applicants.length,"1.0-0")," ",n.currencyStorage.currencyCode,""),e.\u0275\u0275advance(9),e.\u0275\u0275property("formGroup",n.couponForm),e.\u0275\u0275advance(3),e.\u0275\u0275property("placeholder",n.couponFormPlaceholder),e.\u0275\u0275advance(1),e.\u0275\u0275property("disabled",n.couponForm.invali
1d||n.couponCodeFound),e.\u0275\u0275advance(7),e.\u0275\u0275textInterpolate2(" ",n.currencyStorage.currencyCode," ",e.\u0275\u0275pipeBind2(105,40,(n.productStorage.cost+n.airportServiceCost+n.expressServiceCost+n.covidInsuranceCost+n.emergencyServiceCost)*n.currencyStorage.currencyConverter*n.applicants.length-n.couponValue*n.currencyStorage.currencyConverter,"1.0-0")," "),e.\u0275\u0275advance(15),e.\u0275\u0275property("ngIf",n.isDpoPaymentFailed),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","Safari"===n.browser),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","Safari"!==n.browser))},dependencies:[h.mk,h.O5,d.\u0275NgNoValidate,d.DefaultValueAccessor,d.NgControlStatus,d.NgControlStatusGroup,d.FormGroupDirective,d.FormControlName,w.mK,St,h.JJ],styles:[".coupon-code-field.ng-invalid.ng-touched[_ngcontent-%COMP%]{border-width:0px;border-color:none;box-shadow:none}.coupon-code-field[_ngcontent-%COMP%]{height:45px;margin-bottom:0;padding-left:20px;border:0px solid #000;font-size:14px;line-height:14px}.coupon-code-field[_ngcontent-%COMP%]::-ms-input-placeholder{color:#5c5c5c}.coupon-code-field[_ngcontent-%COMP%]:-webkit-input-placeholder{color:#5c5c5c}.coupon-code-field[_ngcontent-%COMP%]::placeholder{color:#5c5c5c}.apply-code-btn[disabled][_ngcontent-%COMP%]:hover{background-color:#fff}.apply-code-btn[_ngcontent-%COMP%]{outline:none}.code-found[_ngcontent-%COMP%]{background-image:url(apply.c94e9012ef03bebd.svg)!important}.extra-service-card.on[_ngcontent-%COMP%]{background-color:#e90000;color:#fff}.card-service-icon.chauffeur-on[_ngcontent-%COMP%]{background-image:url(chauffeur-on.dd95ace54ffeee03.svg)}#payment-method-div[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}.payment-method-heading[_ngcontent-%COMP%]{font-size:20px;font-weight:500;text-align:center;margin-bottom:20px}#payment-method-div[_ngcontent-%COMP%] > .flex-row[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex:1;text-align:center}.payment-methods-labels[_ngcontent-%COMP%]{display:inline-block;margin-left:10px;vertical-align:middle}#summary-div[_ngcontent-%COMP%]{flex:1.5}#payment-details-div[_ngcontent-%COMP%]{flex:1}#network-logo[_ngcontent-%COMP%]{width:120px!important}#dpo-logo[_ngcontent-%COMP%]{width:80px!important}#cc-logo[_ngcontent-%COMP%]{width:120px!important}#confirm-payment-label[_ngcontent-%COMP%]{font-size:18px!important;padding-top:2px!important;font-weight:600!important}.disabled-link[_ngcontent-%COMP%]{background-color:#888!important;color:#333!important;pointer-events:none!important;text-decoration:none!important;cursor:not-allowed!important}"]})}return a})();const Jr=["wizard"],eo=["scrollbar"];let to=(()=>{class a{constructor(t,i,n,o,s){this._applyService=t,this._applicationService=i,this._renderer=n,this._dbService=o,this._geoService=s,this.scrollToTopSub=new R.w0,this.cancelAdditionalApplicantSub=new R.w0}ngOnInit(){this.addNewApplicantSub=this._applyService.addNewApplicant.subscribe(()=>{if(this.wizard.goToStep(0),1===this._applicationService.getApplicationStorage().length){const t=this._applicationService.getApplicationStorage()[0],i=new Ai(t.firstName,t.lastName,t.nationality,t.country,this._geoService.getLocationDetails().countryName,t.phone,t.email,t.passportNumber,t.profession,t.travelDate,t.travelPurpose,null!==t.visitedUAE,this._geoService.getLocationDetails().ip);this._dbService.createLead({...i})}}),this.cancelAdditionalApplicantSub=this._applyService.cancelAdditionalApplicant.subscribe(()=>{this.wizard.goToStep(2)}),this.scrollToTopSub=this._applyService.scrollToTop.subscribe(()=>{this.scrollbar.scrollTo({top:0,duration:0})})}ngAfterViewInit(){this._renderer.addClass(document.querySelector("body"),"no-scroll")}ngOnDestroy(){this.addNewApplicantSub.unsubscribe(),this.scrollToTopSub.unsubscribe(),this.cancelAdditionalApplicantSub.unsubscribe()}static#e=this.\u0275fac=function(i){return new(i||a)(e.\u0275\u0275directiveInject(ae.g),e.\u0275\u0275directiveInject(ne.I),e.\u0275\u0275directiveInject(e.Renderer2),e.\u0275\u0275directiveInject(ge.M),e.\u0275\u0275directiveInject(He.p))};static#t=this.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["app-apply"]],viewQuery:function(i,n){if(1&i&&(e.\u0275\u0275viewQuery(Jr,7),e.\u0275\u0275viewQuery(eo,7)),2&i){let o;e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.wizard=o.first),e.\u0275\u0275queryRefresh(o=e.\u0275\u0275loadQuery())&&(n.scrollbar=o.first)}},decls:14,vars:1,consts:[[1,"bp-overlay-application"],[1,"app-modal-wr"],["scrollbar",""],["navBarLayout","large-empty-symbol
1s","navigateBackward","deny","navigateForward","visited","tabindex","0","cdkTrapFocusAutoCapture","","cdkTrapFocus","",2,"outline","none",3,"disableNavigationBar","awNavigationMode"],["wizard",""],["stepTitle","Documents"],["stepTitle","Details","stepId","application-details"],["stepTitle","Review"],["stepTitle","Checkout"]],template:function(i,n){1&i&&(e.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"ng-scrollbar",null,2)(4,"aw-wizard",3,4)(6,"aw-wizard-step",5),e.\u0275\u0275element(7,"app-documents"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(8,"aw-wizard-step",6),e.\u0275\u0275element(9,"app-details"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(10,"aw-wizard-step",7),e.\u0275\u0275element(11,"app-review"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(12,"aw-wizard-step",8),e.\u0275\u0275element(13,"app-checkout"),e.\u0275\u0275elementEnd()()()()()),2&i&&(e.\u0275\u0275advance(4),e.\u0275\u0275property("disableNavigationBar",!0))},dependencies:[w.mK,bt.KC,re,Wi,Xi,zn,oa,fr,Zr]})}return a})();var io=m(281),no=m(7855);function ao(a,r){}const Rt_params_enterAnimationDuration="150ms",Rt_params_exitAnimationDuration="75ms";class Pt extends W.vA{constructor(){super(...arguments),this.enterAnimationDuration=W._H.params.enterAnimationDuration,this.exitAnimationDuration=W._H.params.exitAnimationDuration}}let ro=(()=>{class a extends W.X2{_onAnimationDone({toState:t,totalTime:i}){"enter"===t?this._openAnimationDone(i):"exit"===t&&this._animationStateChanged.next({state:"closed",totalTime:i})}_onAnimationStart({toState:t,totalTime:i}){"enter"===t?this._animationStateChanged.next({state:"opening",totalTime:i}):("exit"===t||"void"===t)&&this._animationStateChanged.next({state:"closing",totalTime:i})}_startExitAnimation(){this._state="exit",this._changeDetectorRef.markForCheck()}constructor(t,i,n,o,s,l,p,c,u){super(t,i,n,o,s,l,p,u),this._changeDetectorRef=c,this._state="enter"}_getAnimationState(){return{value:this._state,params:{enterAnimationDuration:this._config.enterAnimationDuration||Rt_params_enterAnimationDuration,exitAnimationDuration:this._config.exitAnimationDuration||Rt_params_exitAnimationDuration}}}}return a.\u0275fac=function(t){return new(t||a)(e.\u0275\u0275directiveInject(e.ElementRef),e.\u0275\u0275directiveInject(w.qV),e.\u0275\u0275directiveInject(h.K0,8),e.\u0275\u0275directiveInject(Pt),e.\u0275\u0275directiveInject(w.ic),e.\u0275\u0275directiveInject(e.NgZone),e.\u0275\u0275directiveInject(E.Iu),e.\u0275\u0275directiveInject(e.ChangeDetectorRef),e.\u0275\u0275directiveInject(w.tE))},a.\u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-dialog-container"],hostVars:7,hostBindings:function(t,i){1&t&&e.\u0275\u0275syntheticHostListener("@dialogContainer.start",function(o){return i._onAnimationStart(o)})("@dialogContainer.done",function(o){return i._onAnimationDone(o)}),2&t&&(e.\u0275\u0275hostProperty("id",i._config.id),e.\u0275\u0275attribute("aria-modal",i._config.ariaModal)("role",i._config.role)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledBy)("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null),e.\u0275\u0275syntheticHostProperty("@dialogContainer",i._getAnimationState()))},features:[e.\u0275\u0275InheritDefinitionFeature],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,i){1&t&&e.\u0275\u0275template(0,ao,0,0,"ng-template",0)},dependencies:[V.Pl],styles:[".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;box-sizing:content-box;margin-bottom:-24px}.mat-dialog-actions.mat-dialog-actions-align-center,.mat-dialog-actions[align=center]{justify-content:center}
1.mat-dialog-actions.mat-dialog-actions-align-end,.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}"],encapsulation:2,data:{animation:[W.Nv.dialogContainer]}}),a})();class oo extends W.so{}const so=new e.InjectionToken("MatDialogData"),lo=new e.InjectionToken("mat-dialog-default-options"),Ot=new e.InjectionToken("mat-dialog-scroll-strategy"),po={provide:Ot,deps:[E.aV],useFactory:function co(a){return()=>a.scrollStrategies.block()}};let mo=(()=>{class a extends W.Se{constructor(t,i,n,o,s,l,p,c){super(t,i,o,l,p,s,oo,ro,so,c),this.dialogConfigClass=Pt}}return a.\u0275fac=function(t){return new(t||a)(e.\u0275\u0275inject(E.aV),e.\u0275\u0275inject(e.Injector),e.\u0275\u0275inject(h.Ye,8),e.\u0275\u0275inject(lo,8),e.\u0275\u0275inject(Ot),e.\u0275\u0275inject(a,12),e.\u0275\u0275inject(E.Xj),e.\u0275\u0275inject(e.ANIMATION_MODULE_TYPE,8))},a.\u0275prov=e.\u0275\u0275defineInjectable({token:a,factory:a.\u0275fac}),a})(),Vt=(()=>{class a{}return a.\u0275fac=function(t){return new(t||a)},a.\u0275mod=e.\u0275\u0275defineNgModule({type:a}),a.\u0275inj=e.\u0275\u0275defineInjector({providers:[mo,po],imports:[no.Su,E.U8,V.eL,g.BQ,g.BQ]}),a})(),uo=(()=>{class a{static#e=this.\u0275fac=function(i){return new(i||a)};static#t=this.\u0275mod=e.\u0275\u0275defineNgModule({type:a});static#i=this.\u0275inj=e.\u0275\u0275defineInjector({imports:[h.ez,Vt,Vt]})}return a})(),ho=(()=>{class a{static#e=this.\u0275fac=function(i){return new(i||a)};static#t=this.\u0275mod=e.\u0275\u0275defineNgModule({type:a});static#i=this.\u0275inj=e.\u0275\u0275defineInjector({imports:[h.ez,Tt,Tt]})}return a})(),fo=(()=>{class a{static#e=this.entry=to;static#t=this.\u0275fac=function(i){return new(i||a)};static#i=this.\u0275mod=e.\u0275\u0275defineNgModule({type:a});static#n=this.\u0275inj=e.\u0275\u0275defineInjector({imports:[h.ez,fe.m,Zi,Ii,io.k,vr,uo,ho,vt]})}return a})()},7732:(se,U,m)=>{m.d(U,{x:()=>w});var h=m(4650);let w=(()=>{class E{constructor(e){this._el=e}onInputChange(e){const O=this._el.nativeElement.value;this._el.nativeElement.value=O.replace(/[^A-Za-z ]*/g,""),O!==this._el.nativeElement.value&&e.stopPropagation()}static#e=this.\u0275fac=function(O){return new(O||E)(h.\u0275\u0275directiveInject(h.ElementRef))};static#t=this.\u0275dir=h.\u0275\u0275defineDirective({type:E,selectors:[["","appLettersOnly",""]],hostBindings:function(O,g){1&O&&h.\u0275\u0275listener("input",function(ie){return g.onInputChange(ie)})}})}return E})()},3485:(se,U,m)=>{m.d(U,{i:()=>e});var h=m(7579),w=m(4766),E=m(4650),V=m(529);let e=(()=>{class O{constructor(F){this._http=F,this.baseCurrency=w.N.defaultCurrency.code,this.apiKey=w.N.ipFixerApiKey,this.resetSelectedCurrency=new h.x}httpCurrencyData(){return this._http.get(`https://data.fixer.io/api/latest?access_key=${this.apiKey}&base=${this.baseCurrency}`)}setAedRate(F){this.aedRate=F}getAedRate(){return this.aedRate}setCurrencyStorage(F){this.currencyStorage=F}getCurrencyStorage(){return this.currencyStorage}setSelectedCurrencyStorage(F){this.selectedCurrencyStorage=F}getSelectedCurrencyStorage(){return this.selectedCurrencyStorage}static#e=this.\u0275fac=function(ie){return new(ie||O)(E.\u0275\u0275inject(V.eN))};static#t=this.\u0275prov=E.\u0275\u0275defineInjectable({token:O,factory:O.\u0275fac,providedIn:"root"})}return O})()},150:(se,U,m)=>{m.d(U,{p:()=>V});var h=m(4766),w=m(4650),E=m(529);let V=(()=>{class e{constructor(g){this._http=g,this.apiKey=h.N.geoApiKey}getIpData(){return this._http.get(`https://api.ipdata.co/?api-key=${this.apiKey}`)}getLocationDetails(){return this.locationStorage}setLocationDetails(g){this.locationStorage=g}static#e=this.\u0275fac=function(F){return new(F||e)(w.\u0275\u0275inject(E.eN))};static#t=this.\u0275prov=w.\u0275\u0275defineInjectable({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})()},1411:(se,U,m)=>{m.d(U,{G:()=>D});var h=m(5861),w=m(4766),E=m(8028),V=m(150),e=m(8179),O=m(3765),g=m(1794),F=m(4650),ie=m(1085);let D=(()=>{class I{constructor(v,A,S,K,le){this._afs=v,this._productService=A,this._geoService=S,this._applicationService=K,this._orderService=le,this.IncompleteOrdersCollection=this._afs.collection(w.N.firestoreConfig.incompleteOrders)}setIncompleteOrderID(v){this.incompleteOrderID=v}getIncompleteOrderID(){return this.incompleteOrderID}createIncompleteOrder(v){var A=this;return(0,h.Z)(function*(){var S=yield A.IncompleteOrdersCollection.add({insertedDateTime:(0,e.Bt)(),visaReference:v,orderStatus:"incomplete",currentStep:"documents",lastStep:"start",recentActionTaken:"clicked on start application button",product:A._productService.getSingleProductStorage(),location:{ip:A._geoService.getLocationDetail
1s().ip,location:A._geoService.getLocationDetails().countryName}});console.log("incompleteOrder>>>>>>>>>",S.id),A.setIncompleteOrderID(S.id),console.log("this.incompleteOrderID>>>>>>>>>",A.incompleteOrderID),A.updateSingleField("incompleteOrderID",S.id)})()}updateSingleField(v,A){const S={};S[v]=A,this.IncompleteOrdersCollection.doc(this.incompleteOrderID).update(S).then(K=>{console.log(`${this.incompleteOrderID} updated with the field ${v}`)}).catch(K=>{console.log(`Exception on updating field ${v} on ${this.incompleteOrderID}:`,K)})}addAnotherApplicant(v){this.IncompleteOrdersCollection.doc(this.incompleteOrderID).update({applicants:(0,e.vr)(v)}).then(A=>{console.log("newApplicant Added successfully")}).catch(A=>{console.log("Exception on adding new applicant:",A)})}addOrUpdateApplicants(){const v=this._applicationService.getApplicationStorage(),A=[];for(let S=0;S<v.length;S++){const K=[],le=[],Fe=[],Ie=[],Ae=[];for(let N=0;N<v[S].files.id.length;N++)K.push({...v[S].files.id[N]});for(let N=0;N<v[S].files.passport.length;N++)le.push({...v[S].files.passport[N]});for(let N=0;N<v[S].files.returnFlightTicket.length;N++)Ie.push({...v[S].files.returnFlightTicket[N]});for(let N=0;N<v[S].files.hotelReservation.length;N++)Ae.push({...v[S].files.hotelReservation[N]});Fe.push({...v[S].files.photo[0]}),A.push({isMainApplicant:0===v[S].id,firstName:v[S].firstName,lastName:v[S].lastName,nationality:v[S].nationality,country:v[S].country,phone:v[S].phone,email:v[S].email,files:{photo:Fe,passport:le,id:K,returnFlightTicket:Ie,hotelReservation:Ae},passportNumber:v[S].passportNumber,profession:v[S].profession,travelDate:v[S].travelDate,travelPurpose:v[S].travelPurpose,visitedUAE:null!==v[S].visitedUAE,id:v[S].id})}this.updateSingleField("applicants",A)}static#e=this.\u0275fac=function(A){return new(A||I)(F.\u0275\u0275inject(ie.ST),F.\u0275\u0275inject(E.M),F.\u0275\u0275inject(V.p),F.\u0275\u0275inject(O.I),F.\u0275\u0275inject(g.p))};static#t=this.\u0275prov=F.\u0275\u0275defineInjectable({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})()},1794:(se,U,m)=>{m.d(U,{p:()=>g});var h=m(4766),w=m(7579),E=m(4004),V=m(4650),e=m(1085),O=m(529);let g=(()=>{class F{constructor(D,I){this._afs=D,this.http=I,this.orderStatus=new w.x,this.orderDetails=new w.x,this.newOrderStatus=new w.x,this.paymentStatus=new w.x,this.isAlreadyFetchingPaymentDetails=!1,this.ordersCollection=this._afs.collection(h.N.firestoreConfig.ordersCollectionRef),this.declinedOrdersCollection=this._afs.collection(h.N.firestoreConfig.declinedOrders)}setOrderStorage(D){this.orderStorage=D}getOrderStorage(){return this.orderStorage}createOrder(D,I,G,v,A){return this.ordersCollection.doc(D).set({applicants:I,product:G,order:v,location:A,dealStage:"Paid",dealStageUpdatedDate:new Date,isNew:!0})}createDeclinedOrder(D,I,G,v,A){return this.declinedOrdersCollection.doc(D).set({applicants:I,product:G,order:v,location:A,dealStage:"Unpaid",dealStageUpdatedDate:new Date,isNew:!0})}attemptPurchase_Old(D){return this.http.post(h.N.production?"https://us-central1-emiratesvisa-78889.cloudfunctions.net/onNetworkPaymentProd":"https://us-central1-emiratesvisa-78889.cloudfunctions.net/onNetworkPaymentDev",D)}attemptPurchase(D,I){this._afs.collection(h.N.firestoreConfig.networkCollectionRef).doc(D).set(I).then(()=>{console.log("step1 saved"),this.newOrderStatus.next({status:"saved"})}).catch(()=>{console.log("step2 not saved"),this.newOrderStatus.next({status:"not saved"})})}savePaymentDetails(D,I){this._afs.collection(h.N.firestoreConfig.paymentsCollectionRef).doc(D).set(I).then(()=>{console.log("payment details saved"),this.paymentStatus.next("processing")}).catch(G=>{console.log("payment details not saved"),console.log(G.message)})}fetchPaymentDetails(D){!1===this.isAlreadyFetchingPaymentDetails?(this._afs.collection(h.N.firestoreConfig.paymentsCollectionRef).doc(D).valueChanges().subscribe(I=>{null!=I&&null!=I?(console.log("Document data:",I.status),this.paymentStatus.next(I.status)):(console.log("No payment details found: ",I),this.paymentStatus.next(""))}),this.changeIsAlreadyFetchingPaymentDetails(!0)):console.log("Already Fetching payment details")}deletePaymentDetails(D){this._afs.collection(h.N.firestoreConfig.paymentsCollectionRef).doc(D).delete().then(()=>{this.paymentStatus.next("")})}changeIsAlreadyFetchingPaymentDetails(D){this.isAlreadyFetchingPaymentDetails=D}getVisaRefFromOrderService(){return this.visaRefFromOrderService&&!this.visaRefFromOrderService.closed||(this.visaRefFromOrderService=new w.x),this.visaRefFromOrderService}getDeclinedOrderByVisaRefAndPaymentMethod(D,I){return this._afs.collection(h.N.firestoreConfig.declinedOrders,v=>v.where("order.visaReference","==",D).where("order.paymentMethod","==",I)).get().pipe((0,E.U)(v=>v.docs.map(A=>A.data())))}setVisaRef(D){this.visaRef=D}getVisaRef(){return this.visaRef}static#e=this.\u0275fac=function(I){return new(I||F)(V.\u0275\u0275inject(e.ST),V.\u0275\u0275inject(O.eN))};static#t=this.\u0275prov=V.\u0275\u0275defineInjectable({token:F,factory:F.\u0275fac,providedIn:"root"})}return F})()},8179:(se,U,m)=>{m.d(U,{Bt:()=>h.Bt,vr:()=>h.vr});var h=m(2810)}}]);

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.