ngx-mat-calendar
Version:
A datepicker with nepali and english calendar support
16 lines • 80.9 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/forms"),require("@angular/material/menu"),require("moment"),require("rxjs"),require("@angular/cdk/coercion"),require("@angular/material/snack-bar"),require("@angular/common"),require("@angular/material/button"),require("@angular/material/card"),require("@angular/material/dialog"),require("@angular/material/form-field"),require("@angular/material/grid-list"),require("@angular/material/icon"),require("@angular/material/input"),require("@angular/material/slider"),require("@angular/material/toolbar"),require("@angular/material/tooltip"),require("angular2-text-mask")):"function"==typeof define&&define.amd?define("ngx-mat-calendar",["exports","@angular/core","@angular/forms","@angular/material/menu","moment","rxjs","@angular/cdk/coercion","@angular/material/snack-bar","@angular/common","@angular/material/button","@angular/material/card","@angular/material/dialog","@angular/material/form-field","@angular/material/grid-list","@angular/material/icon","@angular/material/input","@angular/material/slider","@angular/material/toolbar","@angular/material/tooltip","angular2-text-mask"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["ngx-mat-calendar"]={},t.ng.core,t.ng.forms,t.ng.material.menu,t.moment_,t.rxjs,t.ng.cdk.coercion,t.ng.material.snackBar,t.ng.common,t.ng.material.button,t.ng.material.card,t.ng.material.dialog,t.ng.material.formField,t.ng.material.gridList,t.ng.material.icon,t.ng.material.input,t.ng.material.slider,t.ng.material.toolbar,t.ng.material.tooltip,t.angular2TextMask)}(this,(function(t,e,a,r,i,n,M,o,s,d,h,l,u,c,p,D,m,y,g,T){"use strict";function f(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(a){if("default"!==a){var r=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,r.get?r:{enumerable:!0,get:function(){return t[a]}})}})),e.default=t,Object.freeze(e)}var S=f(i);
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */Object.create;function Y(t,e){var a="function"==typeof Symbol&&t[Symbol.iterator];if(!a)return t;var r,i,n=a.call(t),M=[];try{for(;(void 0===e||e-- >0)&&!(r=n.next()).done;)M.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(a=n.return)&&a.call(n)}finally{if(i)throw i.error}}return M}function N(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Y(arguments[e]));return t}var b,v,w,C,B;Object.create;(b=t.DateFormat||(t.DateFormat={})).ddMMyyyy="ddMMyyyy",b.MMddyyyy="MMddyyyy",b.yyyyMMdd="yyyyMMdd",b.yyyyddMM="yyyyddMM",(v=t.DateType||(t.DateType={}))[v.AD=1]="AD",v[v.BS=2]="BS",(w=t.Language||(t.Language={}))[w.English=0]="English",w[w.Nepali=1]="Nepali",(C=t.CalendarViewType||(t.CalendarViewType={}))[C.Both=1]="Both",C[C.Year=2]="Year",C[C.Month=3]="Month",(B=t.EFrequencyIn||(t.EFrequencyIn={}))[B.InDays=1]="InDays",B[B.InMonth=2]="InMonth",B[B.InWeek=3]="InWeek";var x=function(){},F=function(){},E=[{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:1970},{M1:31,M2:31,M3:32,M4:31,M5:32,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:1971},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:30,NYear:1972},{M1:30,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:30,M11:29,M12:31,NYear:1973},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:1974},{M1:31,M2:31,M3:32,M4:32,M5:31,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:1975},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:31,NYear:1976},{M1:30,M2:32,M3:31,M4:32,M5:31,M6:31,M7:29,M8:30,M9:29,M10:30,M11:29,M12:31,NYear:1977},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:1978},{M1:31,M2:31,M3:32,M4:32,M5:31,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:1979},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:31,NYear:1980},{M1:31,M2:31,M3:31,M4:32,M5:31,M6:31,M7:29,M8:30,M9:30,M10:29,M11:30,M12:30,NYear:1981},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:1982},{M1:31,M2:31,M3:32,M4:32,M5:31,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:1983},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:31,NYear:1984},{M1:31,M2:31,M3:31,M4:32,M5:31,M6:31,M7:29,M8:30,M9:30,M10:29,M11:30,M12:30,NYear:1985},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:1986},{M1:31,M2:32,M3:32,M4:32,M5:31,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:1987},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:31,NYear:1988},{M1:31,M2:31,M3:31,M4:32,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:1989},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:1990},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:30,NYear:1991},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:30,M11:29,M12:31,NYear:1992},{M1:31,M2:31,M3:31,M4:32,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:1993},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:1994},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:30,NYear:1995},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:30,M11:29,M12:31,NYear:1996},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:1997},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:1998},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:31,NYear:1999},{M1:30,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:30,M11:29,M12:31,NYear:2e3},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2001},{M1:31,M2:31,M3:32,M4:32,M5:31,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2002},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:31,NYear:2003},{M1:30,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:30,M11:29,M12:31,NYear:2004},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2005},{M1:31,M2:31,M3:32,M4:32,M5:31,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2006},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:31,NYear:2007},{M1:31,M2:31,M3:31,M4:32,M5:31,M6:31,M7:29,M8:30,M9:30,M10:29,M11:29,M12:31,NYear:2008},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2009},{M1:31,M2:31,M3:32,M4:32,M5:31,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2010},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:31,NYear:2011},{M1:31,M2:31,M3:31,M4:32,M5:31,M6:31,M7:29,M8:30,M9:30,M10:29,M11:30,M12:30,NYear:2012},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2013},{M1:31,M2:31,M3:32,M4:32,M5:31,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2014},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:31,NYear:2015},{M1:31,M2:31,M3:31,M4:32,M5:31,M6:31,M7:29,M8:30,M9:30,M10:29,M11:30,M12:30,NYear:2016},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2017},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2018},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:30,M11:29,M12:31,NYear:2019},{M1:31,M2:31,M3:31,M4:32,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2020},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2021},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:30,NYear:2022},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:30,M11:29,M12:31,NYear:2023},{M1:31,M2:31,M3:31,M4:32,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2024},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2025},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:31,NYear:2026},{M1:30,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:30,M11:29,M12:31,NYear:2027},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2028},{M1:31,M2:31,M3:32,M4:31,M5:32,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2029},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:31,NYear:2030},{M1:30,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:30,M11:29,M12:31,NYear:2031},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2032},{M1:31,M2:31,M3:32,M4:32,M5:31,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2033},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:31,NYear:2034},{M1:30,M2:32,M3:31,M4:32,M5:31,M6:31,M7:29,M8:30,M9:30,M10:29,M11:29,M12:31,NYear:2035},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2036},{M1:31,M2:31,M3:32,M4:32,M5:31,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2037},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:31,NYear:2038},{M1:31,M2:31,M3:31,M4:32,M5:31,M6:31,M7:29,M8:30,M9:30,M10:29,M11:30,M12:30,NYear:2039},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2040},{M1:31,M2:31,M3:32,M4:32,M5:31,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2041},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:31,NYear:2042},{M1:31,M2:31,M3:31,M4:32,M5:31,M6:31,M7:29,M8:30,M9:30,M10:29,M11:30,M12:30,NYear:2043},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2044},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2045},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:31,NYear:2046},{M1:31,M2:31,M3:31,M4:32,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2047},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2048},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:30,NYear:2049},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:30,M11:29,M12:31,NYear:2050},{M1:31,M2:31,M3:31,M4:32,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2051},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2052},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:30,NYear:2053},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:30,M11:29,M12:31,NYear:2054},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2055},{M1:31,M2:31,M3:32,M4:31,M5:32,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2056},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:31,NYear:2057},{M1:30,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:30,M11:29,M12:31,NYear:2058},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2059},{M1:31,M2:31,M3:32,M4:32,M5:31,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2060},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:31,NYear:2061},{M1:30,M2:32,M3:31,M4:32,M5:31,M6:31,M7:29,M8:30,M9:29,M10:30,M11:29,M12:31,NYear:2062},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2063},{M1:31,M2:31,M3:32,M4:32,M5:31,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2064},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:31,NYear:2065},{M1:31,M2:31,M3:31,M4:32,M5:31,M6:31,M7:29,M8:30,M9:30,M10:29,M11:29,M12:31,NYear:2066},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2067},{M1:31,M2:31,M3:32,M4:32,M5:31,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2068},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:31,NYear:2069},{M1:31,M2:31,M3:31,M4:32,M5:31,M6:31,M7:29,M8:30,M9:30,M10:29,M11:30,M12:30,NYear:2070},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2071},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2072},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:31,NYear:2073},{M1:31,M2:31,M3:31,M4:32,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2074},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2075},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:30,NYear:2076},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:30,M11:29,M12:31,NYear:2077},{M1:31,M2:31,M3:31,M4:32,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2078},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2079},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:30,NYear:2080},{M1:31,M2:31,M3:32,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:30,M11:30,M12:30,NYear:2081},{M1:30,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:30,M11:30,M12:30,NYear:2082},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:30,M7:30,M8:30,M9:29,M10:30,M11:30,M12:30,NYear:2083},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:30,M7:30,M8:30,M9:29,M10:30,M11:30,M12:30,NYear:2084},{M1:31,M2:32,M3:31,M4:32,M5:30,M6:31,M7:30,M8:30,M9:29,M10:30,M11:30,M12:30,NYear:2085},{M1:30,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:30,M11:30,M12:30,NYear:2086},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:30,M9:29,M10:30,M11:30,M12:30,NYear:2087},{M1:30,M2:31,M3:32,M4:32,M5:30,M6:31,M7:30,M8:30,M9:29,M10:30,M11:30,M12:30,NYear:2088},{M1:30,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:30,M11:30,M12:30,NYear:2089},{M1:30,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:30,M11:30,M12:30,NYear:2090},{M1:31,M2:31,M3:32,M4:32,M5:31,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2091},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:31,NYear:2092},{M1:31,M2:31,M3:31,M4:32,M5:31,M6:31,M7:29,M8:30,M9:30,M10:29,M11:29,M12:31,NYear:2093},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2094},{M1:31,M2:31,M3:32,M4:32,M5:31,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2095},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:31,NYear:2096},{M1:31,M2:31,M3:31,M4:32,M5:31,M6:31,M7:29,M8:30,M9:30,M10:29,M11:30,M12:30,NYear:2097},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2098},{M1:31,M2:31,M3:32,M4:32,M5:31,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2099},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:31,NYear:2100},{M1:31,M2:31,M3:31,M4:32,M5:31,M6:31,M7:29,M8:30,M9:30,M10:29,M11:30,M12:30,NYear:2101},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2102},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2103},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:30,M11:29,M12:31,NYear:2104},{M1:31,M2:31,M3:31,M4:32,M5:31,M6:32,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2105},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2106},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:29,M11:30,M12:30,NYear:2107},{M1:31,M2:32,M3:31,M4:32,M5:31,M6:30,M7:30,M8:30,M9:29,M10:30,M11:29,M12:31,NYear:2108},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2109},{M1:31,M2:31,M3:32,M4:31,M5:31,M6:31,M7:30,M8:29,M9:30,M10:29,M11:30,M12:30,NYear:2110},{M1:30,M2:31,M3:30,M4:32,M5:30,M6:30,M7:32,M8:30,M9:30,M10:30,M11:30,M12:30,NYear:2111}],A=[{NYear:1970,StartDate:"1913-04-13T00:00:00",EndDate:"1914-04-12T00:00:00"},{NYear:1971,StartDate:"1914-04-13T00:00:00",EndDate:"1915-04-12T00:00:00"},{NYear:1972,StartDate:"1915-04-13T00:00:00",EndDate:"1916-04-11T00:00:00"},{NYear:1973,StartDate:"1916-04-12T00:00:00",EndDate:"1917-04-11T00:00:00"},{NYear:1974,StartDate:"1917-04-12T00:00:00",EndDate:"1918-04-11T00:00:00"},{NYear:1975,StartDate:"1918-04-12T00:00:00",EndDate:"1919-04-11T00:00:00"},{NYear:1976,StartDate:"1919-04-12T00:00:00",EndDate:"1920-04-11T00:00:00"},{NYear:1977,StartDate:"1920-04-12T00:00:00",EndDate:"1921-04-11T00:00:00"},{NYear:1978,StartDate:"1921-04-12T00:00:00",EndDate:"1922-04-11T00:00:00"},{NYear:1979,StartDate:"1922-04-12T00:00:00",EndDate:"1923-04-11T00:00:00"},{NYear:1980,StartDate:"1923-04-12T00:00:00",EndDate:"1924-04-11T00:00:00"},{NYear:1981,StartDate:"1924-04-12T00:00:00",EndDate:"1925-04-11T00:00:00"},{NYear:1982,StartDate:"1925-04-12T00:00:00",EndDate:"1926-04-11T00:00:00"},{NYear:1983,StartDate:"1926-04-12T00:00:00",EndDate:"1927-04-11T00:00:00"},{NYear:1984,StartDate:"1927-04-12T00:00:00",EndDate:"1928-04-11T00:00:00"},{NYear:1985,StartDate:"1928-04-12T00:00:00",EndDate:"1929-04-11T00:00:00"},{NYear:1986,StartDate:"1929-04-12T00:00:00",EndDate:"1930-04-11T00:00:00"},{NYear:1987,StartDate:"1930-04-12T00:00:00",EndDate:"1931-04-12T00:00:00"},{NYear:1988,StartDate:"1931-04-13T00:00:00",EndDate:"1932-04-12T00:00:00"},{NYear:1989,StartDate:"1932-04-13T00:00:00",EndDate:"1933-04-12T00:00:00"},{NYear:1990,StartDate:"1933-04-13T00:00:00",EndDate:"1934-04-12T00:00:00"},{NYear:1991,StartDate:"1934-04-13T00:00:00",EndDate:"1935-04-12T00:00:00"},{NYear:1992,StartDate:"1935-04-13T00:00:00",EndDate:"1936-04-12T00:00:00"},{NYear:1993,StartDate:"1936-04-13T00:00:00",EndDate:"1937-04-12T00:00:00"},{NYear:1994,StartDate:"1937-04-13T00:00:00",EndDate:"1938-04-12T00:00:00"},{NYear:1995,StartDate:"1938-04-13T00:00:00",EndDate:"1939-04-12T00:00:00"},{NYear:1996,StartDate:"1939-04-13T00:00:00",EndDate:"1940-04-12T00:00:00"},{NYear:1997,StartDate:"1940-04-13T00:00:00",EndDate:"1941-04-12T00:00:00"},{NYear:1998,StartDate:"1941-04-13T00:00:00",EndDate:"1942-04-12T00:00:00"},{NYear:1999,StartDate:"1942-04-13T00:00:00",EndDate:"1943-04-13T00:00:00"},{NYear:2e3,StartDate:"1943-04-14T00:00:00",EndDate:"1944-04-12T00:00:00"},{NYear:2001,StartDate:"1944-04-13T00:00:00",EndDate:"1945-04-12T00:00:00"},{NYear:2002,StartDate:"1945-04-13T00:00:00",EndDate:"1946-04-12T00:00:00"},{NYear:2003,StartDate:"1946-04-13T00:00:00",EndDate:"1947-04-13T00:00:00"},{NYear:2004,StartDate:"1947-04-14T00:00:00",EndDate:"1948-04-12T00:00:00"},{NYear:2005,StartDate:"1948-04-13T00:00:00",EndDate:"1949-04-12T00:00:00"},{NYear:2006,StartDate:"1949-04-13T00:00:00",EndDate:"1950-04-12T00:00:00"},{NYear:2007,StartDate:"1950-04-13T00:00:00",EndDate:"1951-04-13T00:00:00"},{NYear:2008,StartDate:"1951-04-14T00:00:00",EndDate:"1952-04-12T00:00:00"},{NYear:2009,StartDate:"1952-04-13T00:00:00",EndDate:"1953-04-12T00:00:00"},{NYear:2010,StartDate:"1953-04-13T00:00:00",EndDate:"1954-04-12T00:00:00"},{NYear:2011,StartDate:"1954-04-13T00:00:00",EndDate:"1955-04-13T00:00:00"},{NYear:2012,StartDate:"1955-04-14T00:00:00",EndDate:"1956-04-12T00:00:00"},{NYear:2013,StartDate:"1956-04-13T00:00:00",EndDate:"1957-04-12T00:00:00"},{NYear:2014,StartDate:"1957-04-13T00:00:00",EndDate:"1958-04-12T00:00:00"},{NYear:2015,StartDate:"1958-04-13T00:00:00",EndDate:"1959-04-13T00:00:00"},{NYear:2016,StartDate:"1959-04-14T00:00:00",EndDate:"1960-04-12T00:00:00"},{NYear:2017,StartDate:"1960-04-13T00:00:00",EndDate:"1961-04-12T00:00:00"},{NYear:2018,StartDate:"1961-04-13T00:00:00",EndDate:"1962-04-12T00:00:00"},{NYear:2019,StartDate:"1962-04-13T00:00:00",EndDate:"1963-04-13T00:00:00"},{NYear:2020,StartDate:"1963-04-14T00:00:00",EndDate:"1964-04-12T00:00:00"},{NYear:2021,StartDate:"1964-04-13T00:00:00",EndDate:"1965-04-12T00:00:00"},{NYear:2022,StartDate:"1965-04-13T00:00:00",EndDate:"1966-04-12T00:00:00"},{NYear:2023,StartDate:"1966-04-13T00:00:00",EndDate:"1967-04-13T00:00:00"},{NYear:2024,StartDate:"1967-04-14T00:00:00",EndDate:"1968-04-12T00:00:00"},{NYear:2025,StartDate:"1968-04-13T00:00:00",EndDate:"1969-04-12T00:00:00"},{NYear:2026,StartDate:"1969-04-13T00:00:00",EndDate:"1970-04-13T00:00:00"},{NYear:2027,StartDate:"1970-04-14T00:00:00",EndDate:"1971-04-13T00:00:00"},{NYear:2028,StartDate:"1971-04-14T00:00:00",EndDate:"1972-04-12T00:00:00"},{NYear:2029,StartDate:"1972-04-13T00:00:00",EndDate:"1973-04-12T00:00:00"},{NYear:2030,StartDate:"1973-04-13T00:00:00",EndDate:"1974-04-13T00:00:00"},{NYear:2031,StartDate:"1974-04-14T00:00:00",EndDate:"1975-04-13T00:00:00"},{NYear:2032,StartDate:"1975-04-14T00:00:00",EndDate:"1976-04-12T00:00:00"},{NYear:2033,StartDate:"1976-04-13T00:00:00",EndDate:"1977-04-12T00:00:00"},{NYear:2034,StartDate:"1977-04-13T00:00:00",EndDate:"1978-04-13T00:00:00"},{NYear:2035,StartDate:"1978-04-14T00:00:00",EndDate:"1979-04-13T00:00:00"},{NYear:2036,StartDate:"1979-04-14T00:00:00",EndDate:"1980-04-12T00:00:00"},{NYear:2037,StartDate:"1980-04-13T00:00:00",EndDate:"1981-04-12T00:00:00"},{NYear:2038,StartDate:"1981-04-13T00:00:00",EndDate:"1982-04-13T00:00:00"},{NYear:2039,StartDate:"1982-04-14T00:00:00",EndDate:"1983-04-13T00:00:00"},{NYear:2040,StartDate:"1983-04-14T00:00:00",EndDate:"1984-04-12T00:00:00"},{NYear:2041,StartDate:"1984-04-13T00:00:00",EndDate:"1985-04-12T00:00:00"},{NYear:2042,StartDate:"1985-04-13T00:00:00",EndDate:"1986-04-13T00:00:00"},{NYear:2043,StartDate:"1986-04-14T00:00:00",EndDate:"1987-04-13T00:00:00"},{NYear:2044,StartDate:"1987-04-14T00:00:00",EndDate:"1988-04-12T00:00:00"},{NYear:2045,StartDate:"1988-04-13T00:00:00",EndDate:"1989-04-12T00:00:00"},{NYear:2046,StartDate:"1989-04-13T00:00:00",EndDate:"1990-04-13T00:00:00"},{NYear:2047,StartDate:"1990-04-14T00:00:00",EndDate:"1991-04-13T00:00:00"},{NYear:2048,StartDate:"1991-04-14T00:00:00",EndDate:"1992-04-12T00:00:00"},{NYear:2049,StartDate:"1992-04-13T00:00:00",EndDate:"1993-04-12T00:00:00"},{NYear:2050,StartDate:"1993-04-13T00:00:00",EndDate:"1994-04-13T00:00:00"},{NYear:2051,StartDate:"1994-04-14T00:00:00",EndDate:"1995-04-13T00:00:00"},{NYear:2052,StartDate:"1995-04-14T00:00:00",EndDate:"1996-04-12T00:00:00"},{NYear:2053,StartDate:"1996-04-13T00:00:00",EndDate:"1997-04-12T00:00:00"},{NYear:2054,StartDate:"1997-04-13T00:00:00",EndDate:"1998-04-13T00:00:00"},{NYear:2055,StartDate:"1998-04-14T00:00:00",EndDate:"1999-04-13T00:00:00"},{NYear:2056,StartDate:"1999-04-14T00:00:00",EndDate:"2000-04-12T00:00:00"},{NYear:2057,StartDate:"2000-04-13T00:00:00",EndDate:"2001-04-13T00:00:00"},{NYear:2058,StartDate:"2001-04-14T00:00:00",EndDate:"2002-04-13T00:00:00"},{NYear:2059,StartDate:"2002-04-14T00:00:00",EndDate:"2003-04-13T00:00:00"},{NYear:2060,StartDate:"2003-04-14T00:00:00",EndDate:"2004-04-12T00:00:00"},{NYear:2061,StartDate:"2004-04-13T00:00:00",EndDate:"2005-04-13T00:00:00"},{NYear:2062,StartDate:"2005-04-14T00:00:00",EndDate:"2006-04-13T00:00:00"},{NYear:2063,StartDate:"2006-04-14T00:00:00",EndDate:"2007-04-13T00:00:00"},{NYear:2064,StartDate:"2007-04-14T00:00:00",EndDate:"2008-04-12T00:00:00"},{NYear:2065,StartDate:"2008-04-13T00:00:00",EndDate:"2009-04-13T00:00:00"},{NYear:2066,StartDate:"2009-04-14T00:00:00",EndDate:"2010-04-13T00:00:00"},{NYear:2067,StartDate:"2010-04-14T00:00:00",EndDate:"2011-04-13T00:00:00"},{NYear:2068,StartDate:"2011-04-14T00:00:00",EndDate:"2012-04-12T00:00:00"},{NYear:2069,StartDate:"2012-04-13T00:00:00",EndDate:"2013-04-13T00:00:00"},{NYear:2070,StartDate:"2013-04-14T00:00:00",EndDate:"2014-04-13T00:00:00"},{NYear:2071,StartDate:"2014-04-14T00:00:00",EndDate:"2015-04-13T00:00:00"},{NYear:2072,StartDate:"2015-04-14T00:00:00",EndDate:"2016-04-12T00:00:00"},{NYear:2073,StartDate:"2016-04-13T00:00:00",EndDate:"2017-04-13T00:00:00"},{NYear:2074,StartDate:"2017-04-14T00:00:00",EndDate:"2018-04-13T00:00:00"},{NYear:2075,StartDate:"2018-04-14T00:00:00",EndDate:"2019-04-13T00:00:00"},{NYear:2076,StartDate:"2019-04-14T00:00:00",EndDate:"2020-04-12T00:00:00"},{NYear:2077,StartDate:"2020-04-13T00:00:00",EndDate:"2021-04-13T00:00:00"},{NYear:2078,StartDate:"2021-04-14T00:00:00",EndDate:"2022-04-13T00:00:00"},{NYear:2079,StartDate:"2022-04-14T00:00:00",EndDate:"2023-04-13T00:00:00"},{NYear:2080,StartDate:"2023-04-14T00:00:00",EndDate:"2024-04-12T00:00:00"},{NYear:2081,StartDate:"2024-04-13T00:00:00",EndDate:"2025-04-13T00:00:00"},{NYear:2082,StartDate:"2025-04-14T00:00:00",EndDate:"2026-04-13T00:00:00"},{NYear:2083,StartDate:"2026-04-14T00:00:00",EndDate:"2027-04-13T00:00:00"},{NYear:2084,StartDate:"2027-04-14T00:00:00",EndDate:"2028-04-12T00:00:00"},{NYear:2085,StartDate:"2028-04-13T00:00:00",EndDate:"2029-04-13T00:00:00"},{NYear:2086,StartDate:"2029-04-14T00:00:00",EndDate:"2030-04-13T00:00:00"},{NYear:2087,StartDate:"2030-04-14T00:00:00",EndDate:"2031-04-14T00:00:00"},{NYear:2088,StartDate:"2031-04-15T00:00:00",EndDate:"2032-04-13T00:00:00"},{NYear:2089,StartDate:"2032-04-14T00:00:00",EndDate:"2033-04-13T00:00:00"},{NYear:2090,StartDate:"2033-04-14T00:00:00",EndDate:"2034-04-13T00:00:00"},{NYear:2091,StartDate:"2034-04-14T00:00:00",EndDate:"2035-04-13T00:00:00"},{NYear:2092,StartDate:"2035-04-14T00:00:00",EndDate:"2036-04-13T00:00:00"},{NYear:2093,StartDate:"2036-04-14T00:00:00",EndDate:"2037-04-13T00:00:00"},{NYear:2094,StartDate:"2037-04-14T00:00:00",EndDate:"2038-04-13T00:00:00"},{NYear:2095,StartDate:"2038-04-14T00:00:00",EndDate:"2039-04-13T00:00:00"},{NYear:2096,StartDate:"2039-04-14T00:00:00",EndDate:"2040-04-13T00:00:00"},{NYear:2097,StartDate:"2040-04-14T00:00:00",EndDate:"2041-04-13T00:00:00"},{NYear:2098,StartDate:"2041-04-14T00:00:00",EndDate:"2042-04-13T00:00:00"},{NYear:2099,StartDate:"2042-04-14T00:00:00",EndDate:"2043-04-13T00:00:00"},{NYear:2100,StartDate:"2043-04-14T00:00:00",EndDate:"2044-04-13T00:00:00"},{NYear:2101,StartDate:"2044-04-14T00:00:00",EndDate:"2045-04-13T00:00:00"},{NYear:2102,StartDate:"2045-04-14T00:00:00",EndDate:"2046-04-13T00:00:00"},{NYear:2103,StartDate:"2046-04-14T00:00:00",EndDate:"2047-04-13T00:00:00"},{NYear:2104,StartDate:"2047-04-14T00:00:00",EndDate:"2048-04-13T00:00:00"},{NYear:2105,StartDate:"2048-04-14T00:00:00",EndDate:"2049-04-14T00:00:00"},{NYear:2106,StartDate:"2049-04-15T00:00:00",EndDate:"2050-04-14T00:00:00"},{NYear:2107,StartDate:"2050-04-15T00:00:00",EndDate:"2051-04-14T00:00:00"},{NYear:2108,StartDate:"2051-04-15T00:00:00",EndDate:"2052-04-14T00:00:00"},{NYear:2109,StartDate:"2052-04-15T00:00:00",EndDate:"2053-04-14T00:00:00"},{NYear:2110,StartDate:"2053-04-15T00:00:00",EndDate:"2054-04-14T00:00:00"},{NYear:2111,StartDate:"2054-04-15T00:00:00",EndDate:"2055-04-14T00:00:00"}],G=function(){function e(){}return e.prototype.GetBSMonthList=function(){return[{month:"बैशाख",id:1},{month:"जेष्ठ",id:2},{month:"असार",id:3},{month:"श्रावण",id:4},{month:"भाद्र",id:5},{month:"आश्विन",id:6},{month:"कार्तिक",id:7},{month:"मंसीर",id:8},{month:"पुष",id:9},{month:"माघ",id:10},{month:"फाल्गुन",id:11},{month:"चैत्र",id:12}]},e.prototype.getFiscalYear=function(e){var a=this.GetDateBS(e,t.DateFormat.MMddyyyy),r=this.GetBSMonth(a,t.DateFormat.MMddyyyy),i=this.GetBSYear(a,t.DateFormat.MMddyyyy);return r<=3?(i-1).toString().substring(2)+"।"+i.toString().substring(2):i.toString().substring(2)+"।"+(i+1).toString().substring(2)},e.prototype.GetADMonthList=function(){return[{month:"January",id:1},{month:"February",id:2},{month:"March",id:3},{month:"April",id:4},{month:"May",id:5},{month:"June",id:6},{month:"July",id:7},{month:"August",id:8},{month:"September",id:9},{month:"October",id:10},{month:"November",id:11},{month:"December",id:12}]},e.prototype.GetBSMonthName=function(t){var e=this.GetBSMonthList().filter((function(e){return e.id===t}));return e.length>0?e[0].month:null},e.prototype.GetADMonthName=function(t){var e=this.GetADMonthList().filter((function(e){return e.id===t}));return e.length>0?e[0].month:null},e.prototype.GetWeekDayName=function(t){var e=this.GetWeekDayNameList().filter((function(e){return e.id===t}));return e.length>0?e[0].day:null},e.prototype.GetWeekDayNameList=function(){return[{day:"Sunday",nepaliDay:"आइतबार",id:1,prefix:"Sun"},{day:"Monday",nepaliDay:"साेमबार",id:2,prefix:"Mon"},{day:"Tuesday",nepaliDay:"मंगलबार",id:3,prefix:"Tue"},{day:"Wednesday",nepaliDay:"बुधबार",id:4,prefix:"Wed"},{day:"Thursday",nepaliDay:"बिहिबार",id:5,prefix:"Thu"},{day:"Friday",nepaliDay:"शुक्रबार",id:6,prefix:"Fri"},{day:"Saturday",nepaliDay:"शनिबार",id:7,prefix:"Sat"}]},e.prototype.GetWeekDayPrefixList=function(){return[{day:"Su",nepaliDay:"आ.",id:1,prefix:"Sun"},{day:"Mo",nepaliDay:"साे.",id:2,prefix:"Mon"},{day:"Tu",nepaliDay:"मं.",id:3,prefix:"Tue"},{day:"We",nepaliDay:"बु.",id:4,prefix:"Wed"},{day:"Th",nepaliDay:"बि.",id:5,prefix:"Thu"},{day:"Fr",nepaliDay:"शु.",id:6,prefix:"Fri"},{day:"Sa",nepaliDay:"श.",id:7,prefix:"Sat"}]},e.prototype.GetBSYearCal=function(t){var e=[],a=E.filter((function(e){return e.NYear===t}))[0],r=0;return r+=a.M1,e.push({Month:1,Days:r}),r+=a.M2,e.push({Month:2,Days:r}),r+=a.M3,e.push({Month:3,Days:r}),r+=a.M4,e.push({Month:4,Days:r}),r+=a.M5,e.push({Month:5,Days:r}),r+=a.M6,e.push({Month:6,Days:r}),r+=a.M7,e.push({Month:7,Days:r}),r+=a.M8,e.push({Month:8,Days:r}),r+=a.M9,e.push({Month:9,Days:r}),r+=a.M10,e.push({Month:10,Days:r}),r+=a.M11,e.push({Month:11,Days:r}),r+=a.M12,e.push({Month:12,Days:r}),e},e.prototype.GetBSDay=function(t,e){var a,r=t.split("-");switch(e){case"ddMMyyyy":a=Number(r[0]);break;case"MMddyyyy":case"yyyyddMM":a=Number(r[1]);break;case"yyyyMMdd":a=Number(r[2])}return a},e.prototype.GetBSMonth=function(t,e){var a,r=t.split("-");switch(e){case"ddMMyyyy":a=Number(r[1]);break;case"MMddyyyy":a=Number(r[0]);break;case"yyyyddMM":a=Number(r[2]);break;case"yyyyMMdd":a=Number(r[1])}return a},e.prototype.GetBSYear=function(t,e){var a,r=t.split("-");switch(e){case"ddMMyyyy":case"MMddyyyy":a=Number(r[2]);break;case"yyyyddMM":case"yyyyMMdd":a=Number(r[0])}return a},e.prototype.GetMaxYear=function(){return Math.max.apply(Math,A.map((function(t){return t.NYear})))},e.prototype.GetMinYear=function(){return Math.min.apply(Math,A.map((function(t){return t.NYear})))},e.prototype.GetDateBS=function(t,e){if(!t)return null;var a,r,i,n;t=new Date(t),t=new Date(t.getFullYear(),t.getMonth(),t.getDate());try{a=new Date(A.filter((function(e){return new Date(e.EndDate)>=t&&new Date(e.StartDate)<=t}))[0].StartDate),r=A.filter((function(e){return new Date(e.EndDate)>=t&&new Date(e.StartDate)<=t}))[0].NYear;var M=this.GetDateDiff(t,a)+1;i=this.GetBSYearCal(r).filter((function(t){return t.Days>=M}))[0].Month;var o=this.GetBSYearCal(r).filter((function(t){return t.Days<M})).reverse()[0];o&&(n=o.Days),n=M-(void 0===n?0:n)}catch(t){return null}return this.GetFormatedDateBS(r,i,n,e)},e.prototype.GetDateAD=function(t,e,a){var r=new Date,i=0;if(0===E.filter((function(e){return e.NYear===t})).length)return null;if(e<1||e>12)return null;if(this.GetDaysInMonthBS(t,e)<a)return null;r=new Date(A.filter((function(e){return e.NYear===t}))[0].StartDate);var n=this.GetBSYearCal(t).filter((function(t){return t.Month<e}));return i=24*(i=(i=(i=n.length>0?n.reverse()[0].Days:0)||0)+a-1)*3600*1e3,i+=r.getTime(),r.setTime(i),r},e.prototype.GetDateADByDateBS=function(t,e){var a,r=0,i=this.GetBSYear(t,e),n=this.GetBSYear(t,e),M=this.GetBSYear(t,e);return 0===E.filter((function(t){return t.NYear})).length&&n<1&&n>12&&this.GetDaysInMonthBS(i,n)<M?null:(a=new Date(A.filter((function(t){return t.NYear===i}))[0].StartDate),r=24*(r=(r=this.GetBSYearCal(i).filter((function(t){return t.Month===n}))[0].Days)+M-1)*3600*1e3,r+=a.getTime(),a.setTime(r),a)},e.prototype.GetDateADOfMonthStartEnd=function(t,e,a){var r=this.GetBSYear(t,a),i=this.GetBSMonth(t,a),n=this.GetBSDay(t,a),M=0,o=new Date;return e?o=this.GetDateAD(n,i,1):(M=this.GetDaysInMonthBS(r,i),o=this.GetDateAD(r,i,M)),o},e.prototype.GetDaysInMonthBS=function(t,e){switch(e){case 1:return E.filter((function(e){return e.NYear===t}))[0].M1;case 2:return E.filter((function(e){return e.NYear===t}))[0].M2;case 3:return E.filter((function(e){return e.NYear===t}))[0].M3;case 4:return E.filter((function(e){return e.NYear===t}))[0].M4;case 5:return E.filter((function(e){return e.NYear===t}))[0].M5;case 6:return E.filter((function(e){return e.NYear===t}))[0].M6;case 7:return E.filter((function(e){return e.NYear===t}))[0].M7;case 8:return E.filter((function(e){return e.NYear===t}))[0].M8;case 9:return E.filter((function(e){return e.NYear===t}))[0].M9;case 10:return E.filter((function(e){return e.NYear===t}))[0].M10;case 11:return E.filter((function(e){return e.NYear===t}))[0].M11;case 12:return E.filter((function(e){return e.NYear===t}))[0].M12;default:return 0}},e.prototype.GetDaysInMonthAD=function(t,e){var a=new Date(t,e,1),r=a;r.setDate(1-r.getDate());var i=a;return i.setDate(1-i.getDate()),1+this.GetDateAdd(i,a)-this.GetDateAdd(r,a)},e.prototype.getFormatedDate=function(e,a){return a.userSelectedFormat&&(1===a.userSelectedFormat?a.dtFormat=t.DateFormat.ddMMyyyy:2===a.userSelectedFormat?a.dtFormat=t.DateFormat.MMddyyyy:3===a.userSelectedFormat?a.dtFormat=t.DateFormat.yyyyMMdd:4===a.userSelectedFormat&&(a.dtFormat=t.DateFormat.yyyyddMM)),a.dtFormat||(a.dtFormat=t.DateFormat.ddMMyyyy),a.dateType||(a.dateType=t.DateType.AD),e?a.dateType===t.DateType.AD?this.GetFormatedDateAD(e,a.dtFormat):this.GetDateBS(e,a.dtFormat):"undefined"},e.prototype.GetFormatedDateAD=function(t,e){var a=(t=new Date(t)).getFullYear().toString(),r=t.getMonth()+1<10?"0"+(t.getMonth()+1).toString():(t.getMonth()+1).toString(),i=t.getDate()<10?"0"+t.getDate().toString():t.getDate().toString();switch(e){case"ddMMyyyy":return i+"-"+r+"-"+a;case"MMddyyyy":return r+"-"+i+"-"+a;case"yyyyddMM":return a+"-"+i+"-"+r;case"yyyyMMdd":return a+"-"+r+"-"+i;default:return i+"-"+r+"-"+a}},e.prototype.GetFormatedDateBS=function(t,e,a,r){var i=t.toString(),n=e<10?"0"+e:e.toString(),M=a<10?"0"+a:a.toString();switch(r){case"ddMMyyyy":return M+"-"+n+"-"+i;case"MMddyyyy":return n+"-"+M+"-"+i;case"yyyyddMM":return i+"-"+M+"-"+n;case"yyyyMMdd":return i+"-"+n+"-"+M;default:return M+"-"+n+"-"+i}},e.prototype.getFormatedDateLong=function(e,a,r){if(e&&10==e.length){e=e.substr(0,10);var i=this.GetBSYear(e,a),n=this.GetBSMonth(e,a),M=this.GetBSDay(e,a),o="";if(r===t.DateType.BS)o=this.GetBSMonthList()[n-1].month;else o=this.GetADMonthList()[n-1].month;return M+" "+o+" "+i}return"Calendar not found!"},e.prototype.getLongDateString=function(t){var e=new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds());return this.GetWeekDayPrefixList()[e.getDay()].prefix+", "+this.GetADMonthList()[e.getMonth()].month+" "+e.getDate()+" "+e.getFullYear()},e.prototype.GetDaysInYear=function(t){var e=0;return E.filter((function(e){return e.NYear<t})).forEach((function(t){e+=t.M1+t.M2+t.M3+t.M4+t.M5+t.M6,e+=t.M7+t.M8+t.M9+t.M10+t.M11+t.M12})),e},e.prototype.GetDateAdd=function(t,e){var a=e.getTime()+t.getTime();return Math.ceil(Math.abs(a/864e5))},e.prototype.GetDateDiff=function(t,e){var a=e.getTime()-t.getTime();return Math.ceil(Math.abs(a/864e5))},e.prototype.addYearInBS=function(t,e,a){var r=this.GetBSYear(t,a),i=this.GetBSMonth(t,a),n=this.GetBSDay(t,a),M=this.GetDaysInMonthBS(r,i);return r+=e,1===n?(1===i?(i=12,r-=1):i-=1,n=this.GetDaysInMonthBS(r,i)):(M===n||(n-=1)>=this.GetDaysInMonthBS(r,i))&&(n=this.GetDaysInMonthBS(r,i)-1),this.GetDateAD(r,i,n)},e}();G.decorators=[{type:e.Injectable}],G.ctorParameters=function(){return[]};var k=function(){function t(){}return t.prototype.isErrorState=function(t,e){if(t.value&&t.value.toString().includes("_"))return!0;var a=e&&e.submitted;return!!(t&&t.invalid&&(t.dirty||t.touched||a))},t}(),O={BSCalendar:["BS Calendar","नेपाली क्यालेन्डर"],ADCalendar:["AD Calendar","अङ्ग्रेजी क्यालेन्डर"],BSDate:["BS Date","गते"],ADDate:["AD Date","मिति"],AD:["AD","मिति"],BS:["BS","गते"],switchToAD:["Click to get AD Date","मिति हेर्न थिचनुहाेस"],switchToBS:["Click to get BS Date","गते हेर्न थिच्नुहाेस"],showBSCalendar:["Click to get Nepali Calendar","नेपाली क्यालेन्डर हेर्न थिच्नुहाेस"],showADCalendar:["Click to get AD Calendar","अङ्ग्रेजी क्यालेन्डर हेर्न थिच्नुहाेस"],clearTooltip:["Clear This data","मेट्नुहाेस"],dateRequiredLabel:[" is required"," अावस्यक छ।"],invalidMessage:["Invalid date!","गते/मिति मिलेन!"],startingBSDateError:["BS Calendar not match for starting date!","शुरू गते नेपाली क्यालेनडरमा मिलेन"],endingBSDateError:["BS Calendar not match for end date!","अन्तिम गते नेपाली क्यालेनडरमा मिलेन"],fromDateToDateNotMatch:["End date cannot be less than starting date!","अन्तिम गते शुरू गते भन्दा कम हुनु भएन।"]},V=S,_=function(){function r(r,i,M){var o=this;this.dpService=r,this.snackbar=i,this.controlDir=M,this.onDateChanged=new e.EventEmitter,this.matcher=new k,this.dateFormat=t.DateFormat.ddMMyyyy,this.datemask=[/\d/,/\d/,"-",/\d/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],this.stateChanges=new n.Subject,this.changeDateTooltip="Toggle Date Type",this.showCalendarTooltip="Show Calendar",this.clearTooltip="Clear date",this.errorMessage="",this.isPickerVisible=!1,this.dateObject=[],this._withTime=!1,this._placeholder="Date",this._readonly=!1,this._closeOnClick=!0,this._isRange=!1,this._language=0,this._required=!1,this.lastEmitted=null,this.manualChanged=!0,this._param={dateType:t.DateType.AD,dateFormatAD:t.DateFormat.ddMMyyyy,dateFormatBS:t.DateFormat.yyyyMMdd},this.propagateChange=function(t){},this.onTouched=function(){},this.onBlur=function(t){(""===t.target.value||t.target.value.toString().includes("_"))&&o.setDateValueByString(t.target.value,o.dateFormat,o._param.dateType)},this.formControl=new a.FormControl,M.valueAccessor=this,this.caption=O}return Object.defineProperty(r.prototype,"param",{get:function(){return this._param},set:function(e){this._param=JSON.parse(e),this.changeDateFormat(this._param.dateType,this._param.dateType===t.DateType.AD?this._param.dateFormatAD:this._param.dateFormatBS),this.setValue(!1,!1)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"required",{get:function(){return this._required},set:function(t){this._required=M.coerceBooleanProperty(t)},enumerable:!1,configurable:!0}),r.prototype.pushTimeMask=function(t){return t.push(" "),t.push(/\d/),t.push(/\d/),t.push(":"),t.push(/\d/),t.push(/\d/),t},r.prototype.changeDateFormat=function(e,a){var r;if(a||(a=e===t.DateType.AD?this._param.dateFormatAD:this._param.dateFormatBS),r=(t.DateType.AD,a===t.DateFormat.MMddyyyy||a===t.DateFormat.ddMMyyyy?[/\d/,/\d/,"-",/\d/,/\d/,"-",/\d/,/\d/,/\d/,/\d/]:[/\d/,/\d/,/\d/,/\d/,"-",/\d/,/\d/,"-",/\d/,/\d/]),this.withTime&&(r=this.pushTimeMask(r)),this.isRange){var i=N(r),n=N(r);this.datemask=N(i,[" ","|"," "],n)}else this.datemask=N(r);this.dateFormat=a},Object.defineProperty(r.prototype,"withTime",{get:function(){return this._withTime},set:function(t){this._withTime=M.coerceBooleanProperty(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"placeholder",{get:function(){return this._placeholder},set:function(t){this._placeholder=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"readonly",{get:function(){return this._readonly},set:function(t){this._readonly=M.coerceBooleanProperty(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"closeOnClick",{get:function(){return this._closeOnClick},set:function(t){this._closeOnClick=M.coerceBooleanProperty(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"disabled",{get:function(){return this.formControl.disabled},set:function(t){this.setDisabledState(M.coerceBooleanProperty(t))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isRange",{get:function(){return this._isRange},set:function(t){this._isRange=M.coerceBooleanProperty(t),this.changeDateFormat(this._param.dateType)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"language",{get:function(){return this._language},set:function(t){this._language=t},enumerable:!1,configurable:!0}),r.prototype.registerOnChange=function(t){this.propagateChange=t},r.prototype.writeValue=function(t){this.dateObject=[],this.manualChanged=!0,this.setDateValueByDate(t),this.formControl.markAsUntouched()},r.prototype.registerOnTouched=function(t){this.onTouched=t},r.prototype.setDisabledState=function(t){t?this.formControl.disable():this.formControl.enable()},r.prototype.setDateValueByDate=function(t){if(t){var e,a,r="",i=V.defaultFormat;if(this.changeDateFormat(this._param.dateType),this.isRange){var n="",M="",o="",s="";if(t&&t.start){var d=V(t.start,i),h=V(t.end,i);d.isValid()&&(r=(e=d.hour())>9?e+":":"0"+e+":",r+=(a=d.minute())>9?""+a:"0"+a,n=this.dpService.GetFormatedDateAD(t.start,this._param.dateFormatAD),M=this.dpService.GetDateBS(t.start,this._param.dateFormatBS),this.withTime&&(n=n+" "+r,M=M+" "+r)),h.isValid()&&(r=(e=h.hour())>9?e+":":"0"+e+":",r+=(a=h.minute())>9?""+a:"0"+a,o=this.dpService.GetFormatedDateAD(t.end,this._param.dateFormatAD),s=this.dpService.GetDateBS(t.end,this._param.dateFormatBS),this.withTime&&(o=n+" "+r,s=M+" "+r)),this.setDateObject(0,t.start,M,n,this._param.dateType),this.setDateObject(1,t.end,s,o,this._param.dateType)}}else{var l=V(t,i);if(l.isValid()){r=(e=l.hour())>9?e+":":"0"+e+":",r+=(a=l.minute())>9?""+a:"0"+a;var u=this.withTime?this.dpService.GetFormatedDateAD(t,this._param.dateFormatAD)+" "+r:""+this.dpService.GetFormatedDateAD(t,this._param.dateFormatAD),c=this.withTime?this.dpService.GetDateBS(t,this._param.dateFormatBS)+" "+r:""+this.dpService.GetDateBS(t,this._param.dateFormatBS);this.setDateObject(0,t,c,u,this._param.dateType)}}this.setValue(!0,!0)}else this.setValue(!0,!0)},r.prototype.setDateValueByString=function(e,a,r){var i=this;if(e.toString().includes("_")||""===e.toString())return this.dateObject=[],void this.execPropagateChange(null);var n=e.split(" | "),M=0;n.forEach((function(e){var n,o,s,d=e.split(" "),h=d[0].split("-"),l="",u=0,c=0;if(a===t.DateFormat.MMddyyyy?(n=+h[2],o=+h[0],s=+h[1]):a===t.DateFormat.ddMMyyyy?(n=+h[2],o=+h[1],s=+h[0]):a===t.DateFormat.yyyyddMM?(n=+h[0],o=+h[2],s=+h[1]):a===t.DateFormat.yyyyMMdd&&(n=+h[0],o=+h[1],s=+h[2]),o<=0||o>12)i.execPropagateChange(null);else if(s<=0||s>32)i.execPropagateChange(null);else{if(d.length>1){var p=d[1].split(":");if(u=+p[0],c=+p[1],u>23||c>59)return i.execPropagateChange(null),u>23&&(i.errorMessage="Hour is invalid."),void(c>59&&(i.errorMessage="Minute is invalid."));l=" "+(u<10?"0"+u:u.toString())+":"+(c<10?"0"+c:c.toString())}if(r===t.DateType.AD){var D=new Date(n,o-1,s,u,c),m=""+i.dpService.GetFormatedDateAD(D,i._param.dateFormatAD)+l,y=i.dpService.GetDateBS(D,i._param.dateFormatBS);i.setDateObject(M,D,y?""+y+l:"",m,r)}else{if(null===(D=i.dpService.GetDateAD(n,o,s)))return i.execPropagateChange(null),void(i.errorMessage=0===i.language?"BS Calendar not match!":"नेपाली क्यालेन्डर अनुसार गते मिलेन।");m=""+i.dpService.GetFormatedDateAD(D,i._param.dateFormatAD)+l,y=""+i.dpService.GetDateBS(D,i._param.dateFormatBS);D=new Date(D.getFullYear(),D.getMonth(),D.getDate(),u,c),i.setDateObject(M,D,y?""+y+l:"",m,r)}M++}})),this.dateObject&&this.dateObject.length>=1?this.isRange?this.execPropagateChange({start:this.dateObject[0].date,end:this.dateObject[1].date}):this.execPropagateChange(this.dateObject[0].date):this.execPropagateChange(null)},r.prototype.setDateObject=function(t,e,a,r,i){0===t&&(this.dateObject=[]),this.dateObject.push({date:e,dateAD:r,dateBS:a,selectedDateType:i})},r.prototype.onManualChange=function(e){var a;"change"===e.type||"paste"===e.type?(a="change"===e.type?e.target.value:e.clipboardData.getData("Text"),this.setDateValueByString(a,this.dateFormat,this._param.dateType)):"keyup"===e.type?(""===e.target.value.toString().trim()||e.target.value.toString().includes("_")?this.execPropagateChange(null):this.setDateValueByString(e.target.value,this.dateFormat,this._param.dateType),(e.keyCode>=48&&e.keyCode<=57||8===e.keyCode||46===e.keyCode||32===e.keyCode)&&(a=e.target.value,this.controlDir.control.valid&&this.dateObject.length>0&&(this.isRange?a!==(this._param.dateType===t.DateType.AD?this.dateObject[0].dateAD+" | "+this.dateObject[1].dateAD:this.dateObject[0].dateBS+" | "+this.dateObject[1].dateBS)&&this.setDateValueByString(a,this.dateFormat,this._param.dateType):a!==(this._param.dateType===t.DateType.AD?this.dateObject[0].dateAD:this.dateObject[0].dateBS)&&this.setDateValueByString(a,this.dateFormat,this._param.dateType)))):"keydown"===e.type&&"Space"===e.code&&(e.stopPropagation(),e.preventDefault(),this.showPicker())},r.prototype.emitChange=function(t){if(this.formControl.value!==this.lastEmitted){var e=null;e=this.dateObject.length>0?this.isRange?{start:this.dateObject[0],end:this.dateObject[1]}:this.dateObject[0]:null,this.setTooltip(),!1===this.manualChanged&&t?this.elTooltip&&this.elTooltip.show():this.manualChanged=!1,this.onDateChanged.emit(e),this.lastEmitted=this.formControl.value}},r.prototype.execPropagateChange=function(e,a,r){void 0===a&&(a=!1),void 0===r&&(r=!0),null===e&&(this.dateObject=[]),this.lastChanged!==e?(this.propagateChange(e),this.emitChange(r)):a&&this.emitChange(r),this.lastChanged=e,this.controlDir.errors?(this.controlDir.errors["date-maximum"]&&(this.errorMessage="Maximum date is invalid."),this.controlDir.errors["date-minimum"]&&(this.errorMessage="Minimum date is invalid."),this.controlDir.errors["date-between"]&&(this._param.dateType===t.DateType.BS?this.errorMessage="Date must between \n "+this.dpService.GetDateBS(this.controlDir.control.minDate,this._param.dateFormatBS)+" \n and\n "+this.dpService.GetDateBS(this.controlDir.control.maxDate,this._param.dateFormatBS)+" \n ":this.errorMessage="Date must between "+this.controlDir.errors["date-between"]["date-minimum"]+" and "+this.controlDir.errors["date-between"]["date-maximum"]),this.controlDir.errors.required&&(""===this.formControl.value?this.errorMessage="Date is required":this.errorMessage="Date is Invalid"),this.errorMessage&&this.formControl.setErrors(this.controlDir.errors)):this.formControl.setErrors(null)},r.prototype.ngOnInit=function(){},r.prototype.ngOnDestroy=function(){this.stateChanges.complete()},r.prototype.clearText=function(){this.formControl.setValue(""),this.dateObject=[],this.execPropagateChange(null)},r.prototype.setValue=function(e,a){if(this.dateObject.length>0){var r=this._param.dateType===t.DateType.AD?""+this.dateObject[0].dateAD:""+this.dateObject[0].dateBS,i="";this.dateObject[0].selectedDateType=this._param.dateType,this.isRange?(this.dateObject.length>1&&(i=this._param.dateType===t.DateType.AD?""+this.dateObject[1].dateAD:""+this.dateObject[1].dateBS,this.dateObject[1].selectedDateType=this._param.dateType),this.formControl.setValue(r+" | "+i)):this.formControl.setValue(r)}else this.formControl.setValue("");this.dateObject&&this.dateObject.length>=1?this.isRange?this.execPropagateChange({start:this.dateObject[0].date,end:this.dateObject[1].date},!0,a):this.execPropagateChange(this.dateObject[0].date,!0,a):(e&&this.formControl.setValue(""),this.execPropagateChange(null))},r.prototype.changeDateType=function(){this._param.dateType===t.DateType.AD?this._param.dateType=t.DateType.BS:this._param.dateType=t.DateType.AD,this.changeDateFormat(this._param.dateType,this._param.dateType===t.DateType.AD?this._param.dateFormatAD:this._param.dateFormatBS),this.setValue(!1,!1)},r.prototype.showPicker=function(){if(!this.isPickerVisible){this.isPickerVisible=!0;var t=this.dateObject.length>0?this.dateObject[0].date:new Date;this.withTime&&(this.closeOnClick=!1),this.calPopUp.dateRange=this.isRange,this.calPopUp.showCalendar(this._param.dateType,this._param.dateFormatAD,this._param.dateFormatBS,this.withTime,this.controlDir.control.minDate,this.controlDir.control.maxDate,this.closeOnClick,t,this.language),this.menuTrigger.openMenu()}},r.prototype.setTooltip=function(){var e="";if(this.dateObject&&this.dateObject.length>0)if(this.isRange){var a="AD: "+this.dpService.getFormatedDateLong(this.dateObject[0].dateAD,this._param.dateFormatAD,t.DateType.AD)+" to "+this.dpService.getFormatedDateLong(this.dateObject[1].dateAD,this._param.dateFormatAD,t.DateType.AD)+" \n",r="BS: "+this.dpService.getFormatedDateLong(this.dateObject[0].dateBS,this._param.dateFormatBS,t.DateType.BS)+" to "+this.dpService.getFormatedDateLong(this.dateObject[1].dateBS,this._param.dateFormatBS,t.DateType.BS)+" \n";e=this._param.dateType===t.DateType.AD?a+" "+r:r+" "+a}else{a="AD: "+this.dpService.getFormatedDateLong(this.dateObject[0].dateAD,this._param.dateFormatAD,t.DateType.AD)+" \n",r="BS: "+this.dpService.getFormatedDateLong(this.dateObject[0].dateBS,this._param.dateFormatBS,t.DateType.BS)+" \n";var i=new Date(this.dateObject[0].date).toString().replace("00:00:00","");e=this._param.dateType===t.DateType.AD?a+" "+r+" \n Date: "+i:r+" "+a+" \n Date: "+i}else e=(e="Display Type: "+(this._param.dateType===t.DateType.AD?this.caption.AD[this.language]+", ":this.caption.BS[this.language]))+" \n Format: "+this.dateFormat;this.tooltipText=e},r.prototype.dateChangedFromPopUp=function(e){var a=this;if(this.menuTrigger.closeMenu(),this.isPickerVisible=!1,this.disabled||this.readonly)this.snackbar.open("Date Is Readonly!","Cancel",{duration:3e3});else if(void 0!==e&&-1!==e&&e.length>=1){this._param.dateType!==e[0].selectedDateType&&(this._param.dateType=e[0].selectedDateType,this.changeDateFormat(this._param.dateType));var r=0;this.isRange?this._param.dateType===t.DateType.AD?this.formControl.setValue(e[0].dateAD+" | "+e[1].dateAD):this.formControl.setValue(e[0].dateBS+" | "+e[1].dateBS):this._param.dateType===t.DateType.AD?this.formControl.setValue(e[0].dateAD):this.formControl.setValue(e[0].dateBS),e.forEach((function(t){a.setDateObject(r,t.date,t.dateBS,t.dateAD,t.selectedDateType),r++})),this.isRange?this.execPropagateChange({start:this.dateObject[0].date,end:this.dateObject[1].date}):this.execPropagateChange(this.dateObject[0].date),this.dateInput.nativeElement.focus()}},r.prototype.onMenuClosed=function(){this.isPickerVisible=!1,this.dateInput.nativeElement.focus()},r}();_.decorators=[{type:e.Component,args:[{selector:"ngx-date",template:'<mat-form-field class="full-width" style="max-width: fit-content;">\r\n <input matInput #dateInput [textMask]="{mask: datemask}" [formControl]="formControl" [placeholder]="placeholder"\r\n [matTooltip]="tooltipText" matTooltipPosition="above" matTooltipClass="date-tooltip" #tooltip="matTooltip"\r\n (change)="onManualChange($event)" (paste)="onManualChange($event)" (keyup)="onManualChange($event)"\r\n (keydown)="onManualChange($event)" (blur)="onBlur($event)"\r\n (focus)="(!isPickerVisible && readonly)? tooltip.hide():tooltip.show()" [errorStateMatcher]="matcher"\r\n [required]="required" autocomplete="off" [readonly]="readonly">\r\n\r\n <button *ngIf="!readonly && formControl.value" mat-button type="button" [matTooltip]="clearTooltip" tabindex="-1"\r\n matSuffix mat-icon-button aria-label="Clear" (click)="clearText()">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n <div *ngIf="readonly || !formControl.value" class="icon-placement" matSuffix>\r\n\r\n </div>\r\n\r\n <button mat-button [matTooltip]="changeDateTooltip" type="button" matTooltipPosition="above" matSuffix\r\n mat-icon-button aria-label="Calendar" tabindex="-1" (click)="changeDateType()">\r\n <mat-icon>repeat</mat-icon>\r\n </button>\r\n <button mat-button [matTooltip]="showCalendarTooltip" tabindex="-1" type="button" matSuffix mat-icon-button\r\n aria-label="Calendar" (click)="$event.stopPropagation();$event.preventDefault(); showPicker()">\r\n <mat-icon>date_range</mat-icon>\r\n </button>\r\n\r\n <div [matMenuTriggerFor]="calendarPopUp" #menu style="background-color: transparent; width: 0px; "></div>\r\n\r\n <mat-hint>\r\n {{param.dateType===1? caption.AD[language]+\', \': caption.BS[language] +\', \'}}\r\n Format: {{dateFormat}} {{withTime==true? \'hh:mm\':\'\'}}\r\n </mat-hint>\r\n <mat-error>\r\n {{errorMessage}} </mat-error>\r\n</mat-form-field>\r\n\r\n\r\n<mat-menu #calendarPopUp="matMenu" class="popup" x-position="before" yPosition="below" [overlapTrigger]="false"\r\n (close)="onMenuClosed()">\r\n <div (click)="$event.stopPropagation()">\r\n <app-calendar-popup #calPopUp [dateRange]="false" (DateTimeChanged)="dateChangedFromPopUp($event)">\r\n </app-calendar-popup>\r\n </div>\r\n</mat-menu>\r\n\r\n\x3c!-- <div class="date-tooltip" style="width: 500px; height: 100px;"></div> --\x3e',encapsulation:e.ViewEncapsulation.None,styles:[".date-tooltip{background:#f0eec9;border-bottom:3px solid #a9a6a6;border-left:2px solid #726c6c;color:navy!important;font-size:14px;line-height:20px;max-width:250px!important;min-width:150px!important;text-align:center;white-space:pre-line}.mat-menu-content:not(:empty){padding-bottom:0!important;padding-top:0!important}.full-width{width:100%}.icon-placement{border-right:21px solid transparent;display:inline}"]}]}],_.ctorParameters=function(){return[{type:G},{type:o.MatSnackBar},{type:a.NgControl,decorators:[{type:e.Self},{type:e.Optional}]}]},_.propDecorators={calPopUp:[{type:e.ViewChild,args:["calPopUp",{static:!1}]}],menuTrigger:[{type:e.ViewChild,args:[r.MatMenuTrigger,{static:!1}]}],dateInput:[{type:e.ViewChild,args:["dateInput",{static:!0}]}],elTooltip:[{type:e.ViewChild,args:["tooltip"]}],onDateChanged:[{type:e.Output}],param:[{type:e.Input}],required:[{type:e.Input}],withTime:[{type:e.Input}],placeholder:[{type:e.Input}],readonly:[{type:e.Input}],closeOnClick:[{type:e.Input}],disabled:[{type:e.Input}],isRange:[{type:e.Input}],language:[{type:e.Input}]};var j=function(){function a(a){this.dpService=a,this.DateTimeChanged=new e.EventEmitter,this.day=1,this.currentView=t.CalendarViewType.Both,this.errorInBS=!1,this.lang=0,this.dateTypeTitle="",this.withTime=!1,this.todayColor="cornflowerblue",this.selectedColor="rgb(239, 175, 175)",this.backgroundColor="#efebeb",this.dayNameBackgroundColor="indianred",this.hourMax=23,this.hourMin=0,this.showTicks=!0,this.hourStep=1,this.thumbLabel=!0,this.hourValue=0,this.minuteMax=59,this.minuteMin=0,this.minuteStep=1,this.minuteValue=0,this.cols=7,this.rowHeight="35px",this.defaultSelectedDate=null,this.dateType=t.DateType.AD,this.dateFormatAD=t.DateFormat.ddMMyyyy,this.dateFormatBS=t.DateFormat.yyyyMMdd,this.minDate=new Date(1913,3,13),this.maxDate=new Date((new Date).getFullYear()+100,(new Date).getMonth(),(new Date).getDate()),this.closeOnClick=!0,this.defaultDateRange=!0,this.currentDate=new Date}return Object.defineProperty(a.prototype,"content",{set:function(t){this.yearMonth=t},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"dateRange",{get:function(){return this.defaultDateRange},set:function(t){this.defaultDateRange=t},enumerable:!1,configurable:!0}),a.prototype.showCalendar=function(t,e,a,r,i,n,M,o,s){var d=this;this.dateType=t,this.dateFormatAD=e,this.dateFormatBS=a,this.withTime=r,this.minDate=i,this.maxDate=n,this.closeOnClick=M,this.currentDate=o||new Date,this.lang=s,0===this.lang?1===this.dateType?this.dateTypeTitle="AD":this.dateTypeTitle="BS":1===this.dateType?this.dateTypeTitle="मिति":this.dateTypeTitle="गते",this.setInitialCalendar(this.currentDate),setTimeout((function(){d.yearMonth.focus()}),100)},a.prototype.setInitialCalendar=function(e){if(this.dateType===t.DateType.AD){var a=new Date(e);this.year=a.getFullYear(),this.month=a.getMonth()+1,this.day=a.getDate(),this.title=this.dpService.GetADMonthName(+this.month)+", "+this.year.toString(),this.setCalendarDay(+this.year,+this.month,+this.day,this.dateType,this.maxDate,this.minDate)}else{var r=this.dpService.GetDateBS(e,this.dateFormatBS);this.year=this.dpService.GetBSYear(r,this.dateFormatBS),this.month=this.dpService.GetBSMonth(r,this.dateFormatBS),this.day=this.dpService.GetBSDay(r,this.dateFormatBS),this.title=this.dpService.GetBSMonthName(+this.month)+", "+this.year,this.setCalendarDay(+this.year,+this.month,+this.day,this.dateType,this.maxDate,this.minDate)}this.withTime&&(this.hourValue=e.getHours(),this.minuteValue=e.getMinutes())},a.prototype.dateTypeToggle=function(){this.dateType===t.DateType.AD?this.dateType=t.DateType.BS:this.dateType=t.DateType.AD,0===this.lang?1===this.dateType?this.dateTypeTitle="AD":this.dateTypeTitle="BS":1===this.dateType?this.dateTypeTitle="मिति":this.dateTypeTitle="गते",this.setCalender()},Object.defineProperty(a.prototype,"selectedDate",{get:function(){return null===this.defaultSelectedDate&&this.setDate(),this.defaultSelectedDate},enumerable:!1,configurable:!0}),a.prototype.setCalender=function(){if(this.dateType===t.DateType.AD){var e=new Date(this.currentDate);this.year=e.getFullYear(),this.month=e.getMonth()+1,this.day=e.getDate(),this.setCalendarDay(this.year,this.month,this.day,t.DateType.AD,this.maxDate,this.minDate)}else{var a=this.dpService.GetDateBS(this.currentDate,this.dateFormatBS);this.year=this.dpService.GetBSYear(a,this.dateFormatBS),this.month=this.dpService.GetBSMonth(a,this.dateFormatBS),this.day=this.dpService.GetBSDay(a,this.dateFormatBS),this.setCalendarDay(this.year,this.month,this.day,t.DateType.BS,this.maxDate,this.minDate)}this.setDate(),this.settime()},a.prototype.setCalendarDay=function(e,a,r,i,n,M){var o=new Date((new Date).toDateString()),s=this.dpService.GetWeekDayPrefixList();this.cols=7,this.rowHeight="35px",this.currentView=t.CalendarViewType.Both,this.datas=[],this.titles=[],this.month=a,this.year=e;for(var d=0;d<s.length;d++)0===this.lang?this.titles.push({text:s[d].day,rows:1,cols:1,color:this.dayNameBackgroundColor}):this.titles.push({text:s[d].nepaliDay,rows:1,cols:1,color:this.dayNameBackgroundColor});if(i===t.DateType.AD){this.title=this.dpService.GetADMonthName(a)+", "+e;var h=new Date(e,a-1,1).getDay(),l=new Date(e,a,0).getDate();if(h>0)for(var u=0;u<h;u++)this.datas.push({text:"",id:0,rows:1,cols:1,color:this.backgroundColor});var c=void 0,p="false",D=new Date(this.currentDate),m=new Date(D.getFullYear(),D.getMonth(),D.getDate());for(u=1;u<=l;u++)p=(c=new Date(e,a-1,u))<M||c>n?"true":"false",c.getTime()===o.getTime()?this.datas.push({text:u,id:u,rows:1,cols:1,color:this.todayColor,disable:p}):c.getTime()===m.getTime()?this.datas.push({text:u,id:u,rows:1,cols:1,color:this.selectedColor,disable:p}):this.datas.push({text:u,id:u,rows:1,cols:1,color:this.backgroundColor,disable:p});for(u=this.datas.length;u<=41;u++)this.datas.push({text:"",id:0,rows:1,cols:1,color:this.backgroundColor})}else{h=new Date(e,a-1,1).getDay();this.title=this.dpService.GetBSMonthName(a)+", "+e;try{h=this.dpService.GetDateAD(+e,+a,1).getDay()}catch(t){return void(this.errorInBS=!0)}l=this.dpService.GetDaysInMonthBS(+e,+a),p="false",D=new Date(this.currentDate),m=new Date(D.getFullYear(),D.getMonth(),D.getDate());if(h>0)for(u=0;u<h;u++)this.datas.push({text:"",id:0,rows:1,cols:1,color:this.backgroundColor});for(u=1;u<=l;u++){p=(c=this.dpService.GetDateAD(+e,+a,u))<M||c>n?"true":"false",c.getTime()===o.getTime()?this.datas.push({text:u,id:u,rows:1,cols:1,color:this.todayColor,disable:p}):c.getTime()===m.getTime()?this.datas.push({text:u,id:u,rows:1,cols:1,color:this.selectedColor,disable:p}):this.datas.push({text:u,id:u,rows:1,cols:1,color:this.backgroundColor,disable:p})}for(u=this.datas.length;u<=41;u++)this.datas.push({text:"",id:0,rows:1,cols:1,color:this.backgroundColor})}this.setDisplayDate()},a.prototype.setDisplayDate=function(){var e=new Date(this.selectedDate.date.getFullYear(),this.selectedDate.date.getMonth(),this.selectedDate.date.getDate()),a=this.selectedDate.date.getFullYear(),r=this.selectedDate.date.getMonth()+1,i=this.selectedDate.date.getDate(),n="";if(this.dateType===t.DateType.AD){var M=this.dpService.GetDateBS(e,this.dateFormatBS);if(null===M)return this.errorInBS=!0,void(this.displayDate="BS Calendar Not Found!");a=this.dpService.GetBSYear(M,this.dateFormatBS),r=this.dpService.GetBSMonth(M,this.dateFormatBS),i=this.dpService.GetBSDay(M,this.dateFormatBS),n=this.dpService.GetBSMonthName(r)}else n=this.dpService.GetADMonthName(r);this.displayDate=this.dateType===t.DateType.AD?"BS: ":"AD: ",this.displayDate=this.displayDate+i+" "+n+" "+a},a.prototype.setCalendarMonth=function(e,a){var r="false";this.cols=3,this.rowHeight=this.withTime?"70px":"60px",this.datas=[],this.currentView=t.CalendarViewType.Month;var i,n=this.minDate?this.minDate.getFullYear().toString():void 0,M=this.maxDate?this.maxDate.getFullYear().toString():void 0;if(n&&(n+=this.minDate.getMonth()<10?"0"+this.minDate.getMonth().toString():this.minDate.getMonth().toString()),M&&(M+=this.maxDate.getMonth()<10?"0"+this.maxDate.getMonth().toString():this.maxDate.getMonth().toString()),this.dateType===t.DateType.BS){var o,s=this.dpService.GetDateBS(this.minDate,this.dateFormatBS);if(null===s)n=this.dpService.GetMinYear().toString()+"00";else n=this.dpService.GetBSYear(s,this.dateFormatBS).toString(),n+=+(o=(this.dpService.GetBSMonth(s,this.dateFormatBS)-1).toString())<10?"0"+o.toString():o.toString();if(null===(s=this.dpService.GetDateBS(this.maxDate,this.dateFormatBS)))M=this.dpService.GetMaxYear().toString()+"11";else M=this.dpService.GetBSYear(s,this.dateFormatBS).toString(),M+=+(o=(this.dpService.GetBSMonth(s,this.dateFormatBS)-1).toString())<10?"0"+o.toString():o.toString()}i=a===t.DateType.AD?this.dpService.GetADMonthList():this.dpService.GetBSMonthList();for(var d="",h=0;h<i.length;h++)r=(d=e.toString()+(h<10?"0"+h.toString():h.toString()))<n||d>M?"true":"false",this.datas.push({text:i[h].month,id:h+1,rows:1,cols:1,color:this.backgroundColor,disable:r});this.settime()},a.prototype.setCalendarYear=function(e,a){var r="false";this.cols=3,this.rowHeight=this.withTime?"70px":"60px",this.datas=[],this.currentView=t.CalendarViewType.Year;var i=this.minDate?this.minDate.getFullYear():void 0,n=this.maxDate?this.maxDate.getFullYear():void 0;if(this.dateType===t.DateType.BS){var M=this.dpService.GetDateBS(this.minDate,this.dateFormatBS);i=null===M?this.dpService.GetMinYear():this.dpService.GetBSYear(M,this.dateFormatBS),n=null===(M=this.dpService.GetDateBS(this.maxDate,this.dateFormatBS))?this.dpService.GetMaxYear():this.dpService.GetBSYear(M,this.dateFormatBS)}for(var o=e-1;o<=a+1;o++)r=o<i||o>n?"true":"false",this.datas.push({text:o,id:o,rows:1,cols:1,color:this.backgroundColor,disable:r});this.settime()},a.prototype.settime=function(){this.withTime&&(this.currentDate?(this.hourValue=this.currentDate.getHours(),this.minuteValue=this.currentDate.getMinutes()):(this.hourValue=0,this.minuteValue=0))},a.prototype.titleClick=function(){if(this.currentView===t.CalendarViewType.Both)this.currentView=t.CalendarViewType.Month,this.title=this.year.toString(),this.setCalendarMonth(this.year,this.dateType);else if(this.currentView===t.CalendarViewType.Month){this.currentView=t.CalendarViewType.Year;var e=this.year.toString().substring(0,3)+"0";this.fromYear=+e,e=this.year.toString().substring(0,3)+"9",this.toYear=+e,this.title=this.fromYear.toString()+"-"+this.toYear.toString(),this.setCalendarYear(this.fromYear,this.toYear)}},a.prototype.upDown=function(e){"+"===e?this.currentView===t.CalendarViewType.Month?(this.year=this.year-1,this.title=this.year.toString(),this.setCalendarMonth(this.year,this.dateType)):this.currentView===t.CalendarViewType.Year?(this.fromYear=this.fromYear-10,this.toYear=this.toYear-10,this.title=this.fromYear.toString()+"-"+this.toYear.toString(),this.setCalendarYear(this.fromYear,this.toYear)):this.currentView===t.CalendarViewType.Both&&(1===this.month?(this.month=12,this.year=this.year-1):this.month=this.month-1,this.dateType===t.DateType.BS?this.monthName=this.dpService.GetBSMonthName(this.month):this.monthName=this.dpService.GetADMonthName(this.month),this.title=this.monthName+", "+this.year,this.setCalendarDay(this.year,this.month,this.day,this.dateType,this.maxDate,this.minDate)):this.currentView===t.CalendarViewType.Month?(this.year=this.year+1,this.title=this.year.toString(),this.setCalendarMonth(this.year,this.dateType)):this.currentView===t.CalendarViewType.Year?(this.fromYear=this.fromYear+10,this.toYear=this.toYear+10,this.title=this.fromYear.toString()+"-"+this.toYear.toString(),this.setCalendarYear(this.fromYear,this.toYear)):this.currentView===t.CalendarViewType.Both&&(12===this.month?(this.month=1,this.year=this.year+1):this.month=this.month+1,this.dateType===t.DateType.BS?this.monthName=this.dpService.GetBSMonthName(this.month):this.monthName=this.dpService.GetADMonthName(this.month),this.title=this.monthName+", "+this.year,this.setCalendarDay(this.year,this.month,this.day,this.dateType,this.maxDate,this.minDate))},a.prototype.ItemClicked=function(e){if(this.currentView===t.CalendarViewType.Both){this.day=+e;var a=new Date((new Date).toDateString()),r=new Date(this.year,this.month,1),i=this.datas.findIndex((function(t){return t.id===e}));if(this.dateType===t.DateType.AD)for(var n=0;n<this.datas.length;n++)r=new Date(this.year,this.month-1,+this.datas[n].text),a.getTime()===r.getTime()?this.datas[n].color=this.todayColor:this.datas[n].color=n!==i?this.backgroundColor:this.selectedColor;else for(n=0;n<this.datas.length;n++)r=this.dpService.GetDateAD(this.year,this.month,+this.datas[n].text),a.getTime()===r.getTime()?this.datas[n].color=this.todayColor:this.datas[n].color=n!==i?this.backgroundColor:this.selectedColor;this.returnDate()}else this.currentView===t.CalendarViewType.Year?(this.currentView=t.CalendarViewType.Month,this.year=e,this.dateType===t.DateType.AD?this.monthName=this.dpService.GetADMonthName(this.month):this.monthName=this.dpService.GetBSMonthName(this.month),this.title=this.year.toString(),this.setCalendarMonth(this.year,this.dateType)):this.currentView===t.CalendarViewType.Month&&(this.month=e,this.dateType===t.DateType.AD?this.monthName=this.dpService.GetADMonthName(this.month):this.monthName=this.dpService.GetBSMonthName(this.month),this.title=this.monthName+", "+this.year,this.currentView=t.CalendarViewType.Both,this.setCalendarDay(this.year,this.month,1,this.dateType,this.maxDate,this.minDate))},a.prototype.setDate=function(){var e;e=this.dateType===t.DateType.AD?new Date(+this.year,+this.month-1,+this.day):this.dpService.GetDateAD(+this.year,+this.month,+this.day);var a=this.dpService.GetFormatedDateAD(e,this.dateFormatAD),r=null;try{r=this.dpService.GetDateBS(e,this.dateFormatBS)}catch(t){r=""}if(this.withTime){var i=+this.hourValue<10?"0"+this.hourValue.toString():this.hourValue.toString(),n=+this.minuteValue<10?"0"+this.minuteValue.toString():this.minuteValue.toString();e=new Date(e.getFullYear(),e.getMonth(),e.getDate(),+this.hourValue,+this.minuteValue),a=a+" "+i.toString()+":"+n.toString(),r=r?r+" "+i.toString()+":"+n.toString():""}this.defaultSelectedDate={dateAD:a,dateBS:r,date:e,selectedDateType:this.dateType},this.currentDate=e},a.prototype.returnDate=function(){this.setDate(),this.setDisplayDate(),this.DateTimeChanged.emit(this.defaultSelectedDate)},a.prototype.onInputChange=function(t,e){"m"===e?this.minuteValue=t.value:this.hourValue=t.value,this.returnDate()},a}();j.decorators=[{type:e.Component,args:[{selector:"dp-calendar",template:'<div class="fx-column">\r\n <div class="dp-title">\r\n <div>\r\n <button #yearmonth mat-button color="primary" (click)="titleClick()">\r\n {{title}}\r\n </button>\r\n </div>\r\n <button mat-button mat-icon-button class="button-size" color="primary" (click)="dateTypeToggle()"\r\n [disabled]="errorInBS">\r\n {{dateTypeTitle}}\r\n </button>\r\n\r\n <div class="year-month">\r\n <button mat-button mat-icon-button color="primary" (click)="upDown(\'+\')" class="button-size">\r\n <mat-icon class="mat-14">arrow_drop_up</mat-icon>\r\n </button>\r\n <button mat-button mat-icon-button color="primary" (click)="upDown(\'-\')" class="button-size">\r\n <mat-icon>arrow_drop_down</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n \x3c!-- Calendar Body --\x3e\r\n <div class="fx-column">\r\n <div style="padding-bottom:1px">\r\n <mat-grid-list *ngIf="currentView==1" [cols]="cols" rowHeight="25px">\r\n <mat-grid-tile *ngFor="let data of titles" [colspan]="data.cols" [rowspan]="data.rows"\r\n [style.background]="data.color" style="color:white;">\r\n <span class="text-label">{{data.text}}</span>\r\n </mat-grid-tile>\r\n </mat-grid-list>\r\n </div>\r\n <mat-grid-list *ngIf="currentView==1" [cols]="cols" [rowHeight]="rowHeight">\r\n <mat-grid-tile *ngFor="let data of datas" [colspan]="data.cols" [rowspan]="data.rows" [style.background]="data.color">\r\n <button *ngIf="data.id!=0" mat-fab-button mat-icon-button mat-raised-button [disabled]="data.disable"\r\n color="" [style.width]="\'25px\'" [style.height]="\'25px\'"\r\n [style.line-height]="\'25px\'" (click)="ItemClicked(data.id)">\r\n {{data.text}}\r\n </button>\r\n </mat-grid-tile>\r\n </mat-grid-list>\r\n <mat-grid-list *ngIf="currentView!=1" [cols]="cols" [rowHeight]="rowHeight">\r\n <mat-grid-tile *ngFor="let data of datas" [colspan]="data.cols" [rowspan]="data.rows" [style.background]="data.color">\r\n <button *ngIf="data.id!=0" mat-button [disabled]="data.disable" color="" (click)="ItemClicked(data.id)">\r\n {{data.text}}\r\n </button>\r\n </mat-grid-tile>\r\n </mat-grid-list>\r\n </div>\r\n \x3c!-- Time body --\x3e\r\n <div class="fx-row" *ngIf="withTime && currentView==1" >\r\n <div class="fx-column-time">\r\n <mat-slider thumbLabel [max]="hourMax" [min]="hourMin" [step]="hourStep" color="primary"\r\n tick-interval="1" [(ngModel)]="hourValue" [value]="hourValue" (input)="onInputChange($event,\'h\')">\r\n </mat-slider>\r\n <div class="fx-row-m15">\r\n <span class="text-label">Hour:</span>\r\n <span class="text-label">{{hourValue}}</span>\r\n </div>\r\n </div>\r\n <div class="fx-column-time">\r\n <mat-slider thumbLabel [max]="minuteMax" [min]="minuteMin" [step]="minuteStep" \r\n tick-interval="1" color="primary" [(ngModel)]="minuteValue" [value]="minuteValue" (input)="onInputChange($event,\'m\')">\r\n </mat-slider>\r\n <div class="fx-row-m15">\r\n <span class="text-label">Minute:</span>\r\n <span class="text-label">{{minuteValue}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n</div>',styles:[".dp-title,:host{display:flex}.dp-title{align-items:center;box-sizing:border-box;flex-direction:row;min-width:275px;place-content:center space-between}.button-size{height:30px;line-height:30px;width:30px}.fx-column,.fx-column-time{box-sizing:border-box;display:flex;flex-direction:column}.fx-column-time{align-items:center}.fx-row{background-color:#ebefec;margin-top:1px;padding-left:10px}.fx-row,.fx-row-m15{box-sizing:border-box;display:flex;flex-direction:row}.fx-row-m15{margin-top:-15px}.text-bold,.text-label{font-family:Roboto,Helvetica Neue,sans-serif;font-size:14px}.text-bold{font-weight:700}.mat-menu-content{padding:0!important}"]}]}],j.ctorParameters=function(){return[{type:G}]},j.propDecorators={content:[{type:e.ViewChild,args:["yearmonth",{static:!1}]}],DateTimeChanged:[{type:e.Output}],dateRange:[{type:e.Input}]};var P=function(){function a(){this.DateTimeChanged=new e.EventEmitter,this.fromToTitle="From Date",this.isFront=!0,this.className="",this.withTime=!1,this.dateType=t.DateType.AD,this.dateFormatAD=t.DateFormat.ddMMyyyy,this.dateFormatBS=t.DateFormat.yyyyMMdd,this.minDate=new Date(1913,3,13),this.maxDate=new Date((new Date).getFullYear()+100,(new Date).getMonth(),(new Date).getDate()),this.closeOnClick=!0,this.defaultDateRange=!0,this.lang=0,this.currentDate=new Date}return Object.defineProperty(a.prototype,"dateRange",{get:function(){return this.defaultDateRange},set:function(t){this.defaultDateRange=t},enumerable:!1,configurable:!0}),a.prototype.showCalendar=function(t,e,a,r,i,n,M,o,s){this.isFront=!0,this.dateType=t,this.dateFormatAD=e,this.dateFormatBS=a,this.withTime=r,this.minDate=i,this.maxDate=n,this.closeOnClick=M,this.currentDate=o||new Date,this.lang=s,0===this.lang?this.fromToTitle="From Date":this.fromToTitle="देखि",this.selectedToDate=null,this.cal1.showCalendar(this.dateType,this.dateFormatAD,this.dateFormatBS,this.withTime,this.minDate,this.maxDate,this.closeOnClick,this.currentDate,this.lang),this.withTime?this.dateRange?this.className="container with-range-with-time":this.className="container without-range-with-time":this.dateRange?this.className="container with-range":this.className="container without-range"},a.prototype.ngOnInit=function(){},a.prototype.revert=function(){this.DateTimeChanged.emit(void 0)},a.prototype.submit=function(){var t;!1===this.dateRange?(t=[this.cal1.selectedDate],this.DateTimeChanged.emit(t)):!0===this.isFront?this.nextPanel():(t=[this.cal1.selectedDate,this.cal2.selectedDate],this.DateTimeChanged.emit(t))},a.prototype.datetimeChangedFrom=function(t){if(this.selectedFromDate={date:t.date,dateAD:t.dateAD,dateBS:t.dateBS,selectedDateType:t.selectedDateType},!1===this.dateRange){if(!0===this.closeOnClick){var e=[this.selectedFromDate];return void this.DateTimeChanged.emit(e)}}else!0===this.closeOnClick&&this.nextPanel()},a.prototype.datetimeChangedTo=function(t){if(this.selectedToDate={date:t.date,dateAD:t.dateAD,dateBS:t.dateBS,selectedDateType:t.selectedDateType},!0===this.closeOnClick){var e=[this.selectedFromDate,this.selectedToDate];this.DateTimeChanged.emit(e)}},a.prototype.nextPanel=function(){0===this.lang?this.fromToTitle="To Date":this.fromToTitle="सम्म",null==this.selectedFromDate&&(this.selectedFromDate=this.cal1.selectedDate);var t=new Date(this.selectedFromDate.date.toDateString());this.cal2.showCalendar(this.selectedFromDate.selectedDateType,this.dateFormatAD,this.dateFormatBS,this.withTime,t,this.maxDate,this.closeOnClick,t,this.lang),this.isFront=!this.isFront},a.prototype.previousPanel=function(){0===this.lang?this.fromToTitle="From Date":this.fromToTitle="देखि",this.selectedToDate=null,this.isFront=!this.isFront},a}();P.decorators=[{type:e.Component,args:[{selector:"app-calendar-popup",template:'<section [class]="className">\r\n <div *ngIf="dateRange==true" class="range-heading">\r\n <button *ngIf="isFront==false" mat-button mat-icon-button color="primary" tabindex="-1"\r\n (click)="previousPanel()">\r\n <mat-icon class="mat-14">chevron_left</mat-icon>\r\n </button>\r\n <div style="padding-left:16px; padding-right:16px;">\r\n <label class="text-bold">{{fromToTitle}}</label>\r\n </div>\r\n <button *ngIf="isFront==true" mat-button mat-icon-button color="primary" tabindex="-1"\r\n (click)="nextPanel()">\r\n <mat-icon class="mat-14">chevron_right</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <div #card class="card" [ngClass]="isFront===true? \'card\' : \'card flipped\'">\r\n <div class="front">\r\n <dp-calendar [ngClass]="isFront===true? \'active\' : \'none-active\'" #cal1 [dateRange]="dateRange"\r\n (DateTimeChanged)="datetimeChangedFrom($event)">\r\n </dp-calendar>\r\n </div>\r\n <div class="back">\r\n <dp-calendar [ngClass]="isFront===true? \'none-active\' : \'active\'" #cal2 [dateRange]="dateRange"\r\n (DateTimeChanged)="datetimeChangedTo($event)">\r\n </dp-calendar>\r\n </div>\r\n\r\n </div>\r\n <div *ngIf="withTime===true" class="footer-with-time" style.padding="20px">\r\n <div class="button-container">\r\n <button mat-button (click)="revert()">{{lang==0?\'Cancel\':\'रद्द\'}}</button>\r\n <button mat-button (click)="submit()">{{lang==0?\'Ok\':\'ठिक\'}}</button>\r\n </div>\r\n </div>\r\n</section>',styles:[".with-range{height:318px}.with-range-with-time{height:405px}.without-range{height:277px}.without-range-with-time{height:365px}.footer-with-time{background:#fff;display:flex;place-content:flex-end;position:relative;top:327px;width:100%}.button-container{align-self:flex-end}.button-container>*{min-width:100px}.container{border:1px solid #ccc;overflow:hidden;width:275px}.card,.container{position:relative}.card{-transform-origin:50% 50%;transform-style:preserve-3d;transition:transform .25s;width:100%}.card div{-webkit-backface-visibility:hidden;backface-visibility:hidden;display:block;height:100%;position:absolute;text-align:center;width:100%}.card .front{background:#ccc}.card .back{transform:rotateY(180deg)}.active{background-color:#fff}.none-active{background-color:silver;display:none}.card.flipped{transform:rotateY(180deg)}.range-heading{align-items:center;display:flex;justify-content:space-between}"]}]}],P.ctorParameters=function(){return[]},P.propDecorators={DateTimeChanged:[{type:e.Output}],cal1:[{type:e.ViewChild,args:["cal1",{static:!1}]}],cal2:[{type:e.ViewChild,args:["cal2",{static:!1}]}],card:[{type:e.ViewChild,args:["card",{static:!1}]}],dateRange:[{type:e.Input}]};var I=function(){};I.decorators=[{type:e.NgModule,args:[{declarations:[_,j,P],imports:[s.CommonModule,D.MatInputModule,l.MatDialogModule,y.MatToolbarModule,p.MatIconModule,h.MatCardModule,o.MatSnackBarModule,c.MatGridListModule,u.MatFormFieldModule,d.MatButtonModule,m.MatSliderModule,r.MatMenuModule,g.MatTooltipModule,a.FormsModule,a.ReactiveFormsModule,T.TextMaskModule],exports:[_],providers:[G]}]}];var R=S,q=function(){function t(){}return t.dateMinimum=function(t){return function(e){if(e.minDate=t,null==e.value)return null;var a="YYYY-MM-DD",r=R(e.value,a);if(!r.isValid())return null;var i=R(t,a);return r.isSameOrAfter(i,"day")?null:{"date-minimum":{"date-minimum":i.format(a),actual:r.format(a)}}}},t.dateMaximum=function(t){return function(e){if(e.maxDate=t,null==e.value)return null;var a="YYYY-MM-DD",r=R(e.value,a);if(!r.isValid())return null;var i=R(t,a);return r.isSameOrBefore(i,"day")?null:{"date-maximum":{"date-maximum":i.format(a),actual:r.format(a)}}}},t.dateBetween=function(t,e){return function(a){a.maxDate=e,a.minDate=t;var r="YYYY-MM-DD";if(null==a.value)return null;var i=R(t,r),n=R(e,r);if(!a.value.start){var M=R(a.value,r);return M.isValid()?(d=M.isSame(i,"day"))||M.isSame(n,"day")||M.isBetween(i,n)?null:{"date-between":{"date-minimum":i.format(r),"date-maximum":n.format(r),actual:M.format(r)}}:null}var o=R(a.value.start,r),s=R(a.value.end,r);if(!o.isValid())return null;if(!s.isValid())return null;if(!o.isSame(s,"day")){var d=o.isSameOrAfter(i,"day")&&o.isSameOrBefore(n,"day");if(s.isSameOrAfter(i,"day")&&s.isSameOrBefore(n,"day")&&d)return null;var h=o.isBetween(i,n),l=s.isBetween(i,n);return h&&l?null:{"date-between":{"date-minimum":i.format(r),"date-maximum":n.format(r),"actual ":"Start: "+o.format(r)+" End: "+s.format(r)}}}var u=o.isSameOrAfter(i,"day"),c=o.isSameOrBefore(n,"day");return u&&c?void 0:{"date-between":{"date-minimum":i.format(r),"date-maximum":n.format(r),"actual ":"Start: "+o.format(r)+" End: "+s.format(r)}}}},t}();t.CalendarService=G,t.DateComponent=_,t.DateValidators=q,t.Day=F,t.Month=x,t.NgxMatCalendarModule=I,t.ɵa=j,t.ɵb=P,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=ngx-mat-calendar.umd.min.js.map