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A,EAAA,EAAA,EAAA,GAGT,IAAA,GAAO,EAAA,QAGT,OAAA,UAAY,EAAA,IAAA,MAAA,EAAsB,WAC5B,EAGE,KAGG,oBAAsB,SAAS,EAAA,YAG7B,YAAQ,CACjB,GAAA,GAAO,GAAQ,QACV,GAAA,MAAA,EAAA,cAAA,EAAA,WAAA,EAAA,WAAA,YAAA,EAAA,EAAA,GAAA,EAAA,EAAA,EAAA,YAAA,EAAA,EAAA,WACE,QAAS,SAAA,IAAA,EAAA,MAAA,gDAGX,GAAA,MAAA,SAAA,EAAA,+DAIH,GAAA,MAAA,SAGF,MAGQ,oBAAkB,SAAA,EAAA,MAC1B,YAEO,QAAP,GACK,GAAA,OAAA,YAAA,KAAA,EAAA,GACE,QAAA,SAAkB,IAAO,EAAS,MAAM,sEAG1C,GAAA,MAAA,SAAA,EAAA,KAAA,YAAA,KAAA,EAAA,2IAuBP,EAAI,SAAO,EAAO,WAAK,GAAW,EAAA,WAAA,EAAA,GAC9B”,“file”:“date-parser.min.js”,“sourcesContent”:[“‘use strict’;nnangular.module(‘mgcrea.ngStrap.helpers.dateParser’, [])nn.provider(‘$dateParser’, function($localeProvider) {nn // define a custom ParseDate object to use instead of native Daten // to avoid date values wrapping when setting date component valuesn function ParseDate() {n this.year = 1970;n this.month = 0;n this.day = 1;n this.hours = 0;n this.minutes = 0;n this.seconds = 0;n this.milliseconds = 0;n }nn ParseDate.prototype.setMilliseconds = function(value) { this.milliseconds = value; };n ParseDate.prototype.setSeconds = function(value) { this.seconds = value; };n ParseDate.prototype.setMinutes = function(value) { this.minutes = value; };n ParseDate.prototype.setHours = function(value) { this.hours = value; };n ParseDate.prototype.getHours = function() { return this.hours; };n ParseDate.prototype.setDate = function(value) { this.day = value; };n ParseDate.prototype.setMonth = function(value) { this.month = value; };n ParseDate.prototype.setFullYear = function(value) { this.year = value; };n ParseDate.prototype.fromDate = function(value) {n this.year = value.getFullYear();n this.month = value.getMonth();n this.day = value.getDate();n this.hours = value.getHours();n this.minutes = value.getMinutes();n this.seconds = value.getSeconds();n this.milliseconds = value.getMilliseconds();n return this;n };nn ParseDate.prototype.toDate = function() {n return new Date(this.year, this.month, this.day, this.hours, this.minutes, this.seconds, this.milliseconds);n };nn var proto = ParseDate.prototype;nn function noop() {n }nn function isNumeric(n) {n return !isNaN(parseFloat(n)) && isFinite(n);n }nn function indexOfCaseInsensitive(array, value) {n var len = array.length, str=value.toString().toLowerCase();n for (var i=0; i{3}‘,n ’yy’ : ‘[0-9]{2}’,n ‘y’ : options.strict ? ‘-?(0|[0-9]{0,3})’ : ‘-?0*{1,4}’,n };nn var setFnMap = {n ‘sss’ : proto.setMilliseconds,n ‘ss’ : proto.setSeconds,n ‘s’ : proto.setSeconds,n ‘mm’ : proto.setMinutes,n ‘m’ : proto.setMinutes,n ‘HH’ : proto.setHours,n ‘H’ : proto.setHours,n ‘hh’ : proto.setHours,n ‘h’ : proto.setHours,n ‘EEEE’ : noop,n ‘EEE’ : noop,n ‘dd’ : proto.setDate,n ‘d’ : proto.setDate,n ‘a’ : function(value) { var hours = this.getHours() % 12; return this.setHours(value.match(/pm/i) ? hours + 12 : hours); },n ‘MMMM’ : function(value) { return this.setMonth(indexOfCaseInsensitive($locale.DATETIME_FORMATS.MONTH, value)); },n ‘MMM’ : function(value) { return this.setMonth(indexOfCaseInsensitive($locale.DATETIME_FORMATS.SHORTMONTH, value)); },n ‘MM’ : function(value) { return this.setMonth(1 * value - 1); },n ‘M’ : function(value) { return this.setMonth(1 * value - 1); },n ‘yyyy’ : proto.setFullYear,n ‘yy’ : function(value) { return this.setFullYear(2000 + 1 * value); },n ‘y’ : proto.setFullYearn };nn var regex, setMap;nn $dateParser.init = function() {n $dateParser.$format = $locale.DATETIME_FORMATS || options.format;n regex = regExpForFormat($dateParser.$format);n setMap = setMapForFormat($dateParser.$format);n };nn $dateParser.isValid = function(date) {n if(angular.isDate(date)) return !isNaN(date.getTime());n return regex.test(date);n };nn $dateParser.parse = function(value, baseDate, format) {n // check for date format special namesn if(format) format = $locale.DATETIME_FORMATS || format;n if(angular.isDate(value)) value = dateFilter(value, format || $dateParser.$format);n var formatRegex = format ? regExpForFormat(format) : regex;n var formatSetMap = format ? setMapForFormat(format) : setMap;n var matches = formatRegex.exec(value);n if(!matches) return false;n // use custom ParseDate object to set parsed valuesn var date = baseDate && !isNaN(baseDate.getTime()) ? new ParseDate().fromDate(baseDate) : new ParseDate().fromDate(new Date(1970, 0, 1, 0));n for(var i = 0; i < matches.length - 1; i++) {n formatSetMap && formatSetMap.call(date, matches);n }n // convert back to native Date objectn var newDate = date.toDate();nn // check new native Date object for day values overflown if (parseInt(date.day, 10) !== newDate.getDate()) {n return false;n }nn return newDate;n };nn $dateParser.getDateForAttribute = function(key, value) {n var date;nn if(value === ‘today’) {n var today = new Date();n date = new Date(today.getFullYear(), today.getMonth(), today.getDate() + (key === ‘maxDate’ ? 1 : 0), 0, 0, 0, (key === ‘minDate’ ? 0 : -1));n } else if(angular.isString(value) && value.match(/^".+"$/)) { // Support {{ dateObj }}n date = new Date(value.substr(1, value.length - 2));n } else if(isNumeric(value)) {n date = new Date(parseInt(value, 10));n } else if (angular.isString(value) && 0 === value.length) { // Reset daten date = key === ‘minDate’ ? -Infinity : +Infinity;n } else {n date = new Date(value);n }nn return date;n };nn $dateParser.getTimeForAttribute = function(key, value) {n var time;nn if(value === ‘now’) {n time = new Date().setFullYear(1970, 0, 1);n } else if(angular.isString(value) && value.match(/^".+"$/)) {n time = new Date(value.substr(1, value.length - 2)).setFullYear(1970, 0, 1);n } else if(isNumeric(value)) {n time = new Date(parseInt(value, 10)).setFullYear(1970, 0, 1);n } else if (angular.isString(value) && 0 === value.length) { // Reset timen time = key === ‘minTime’ ? -Infinity : +Infinity;n } else {n time = $dateParser.parse(value, new Date(1970, 0, 1, 0));n }nn return time;n };nn /* Handle switch to/from daylight saving.n * Hours may be non-zero on daylight saving cut-over:n * > 12 when midnight changeover, but then cannot generaten * midnight datetime, so jump to 1AM, otherwise reset.n * @param date (Date) the date to checkn * @return (Date) the corrected daten *n * __ copied from jquery ui datepicker __n */n $dateParser.daylightSavingAdjust = function(date) {n if (!date) {n return null;n }n date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);n return date;n };nn // Private functionsnn function setMapForFormat(format) {n var keys = Object.keys(setFnMap), i;n var map = [], sortedMap = [];n // Map to setFnn var clonedFormat = format;n for(i = 0; i < keys.length; i++) {n if(format.split(keys).length > 1) {n var index = clonedFormat.search(keys);n format = format.split(keys).join(”);n if(setFnMap[keys]) {n map = setFnMap[keys];n }n }n }n // Sort result mapn angular.forEach(map, function(v) {n // conditional required since angular.forEach broke around v1.2.21n // related pr: github.com/angular/angular.js/pull/8525n if(v) sortedMap.push(v);n });n return sortedMap;n }nn function escapeReservedSymbols(text) {n return text.replace(/\//g, ‘[\\/]’).replace(‘/-/g’, ‘[-]’).replace(/\./g, ‘[.]’).replace(/\\s/g, ‘[\\s]’);n }nn function regExpForFormat(format) {n var keys = Object.keys(regExpMap), i;nn var re = format;n // Abstract replaces to avoid collisionsn for(i = 0; i < keys.length; i++) {n re = re.split(keys).join(‘${’ + i + ‘}’);n }n // Replace abstracted valuesn for(i = 0; i < keys.length; i++) {n re = re.split(‘${’ + i + ‘}’).join(‘(’ + regExpMap[keys] + ‘)’);n }n format = escapeReservedSymbols(format);nn return new RegExp(‘^’ + re + ‘$’, [‘i’]);n }nn $dateParser.init();n return $dateParser;nn };nn return DateParserFactory;nn };nn});n”],“sourceRoot”:“/source/”}