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,IAC5B,MAAM,MAAM,GAAM,KAAK,GACvB,MACF,IAAK,OAEH,GAAI,MAAM,MAAM,EAAI,IAClB,MAAM,IAAI,MAAM,mBAAqB,EAAI,GAAK,8CAM5C,MAAM,EAAI,IACZ,MAAM,MAAM,EAAI,IAAM,EAAI,GAG1B,MAAM,MAAM,EAAI,IAAM,SAAS,EAAI,GAAI,IAMjD,OAAO,CACT,EAEA,KAAK,UAAY,WACjB,KAAK,UAAY,SAAU,EAAI,EAAI,GAEjC,GAAI,KAAK,gBAAkB,KAAK,eAAe,UAAW,CAExD,IAAI,EAAW,qBAAqB,GACpC,IAAK,EACH,MAAM,IAAI,MAAM,4BAGlB,KAAK,cAAc,EACrB,CACA,IAAI,EAAI,QAAQ,EAAI,GAChB,GAAO,EAAE,GAET,EAAO,QAAQ,EAAI,EAAG,GAK1B,OAJI,IACF,EAAM,kBAAkB,EAAK,EAAK,KAG7B,CAAE,SAAU,EAAK,OADb,gBAAgB,EAAG,GAEhC,CACF,CACD,GAAE,KAAuB,oBAAX,OAAyB,OAAS","file":"/npm/timezone-js@0.4.13/src/date.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/timezone-js@0.4.13/src/date.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","// -----\n// The `timezoneJS.Date` object gives you full-blown timezone support, independent from the timezone set on the end-user's machine running the browser. It uses the Olson zoneinfo files for its timezone data.\n//\n// The constructor function and setter methods use proxy JavaScript Date objects behind the scenes, so you can use strings like '10/22/2006' with the constructor. You also get the same sensible wraparound behavior with numeric parameters (like setting a value of 14 for the month wraps around to the next March).\n//\n// The other significant difference from the built-in JavaScript Date is that `timezoneJS.Date` also has named properties that store the values of year, month, date, etc., so it can be directly serialized to JSON and used for data transfer.\n\n/*\n * Copyright 2010 Matthew Eernisse (mde@fleegix.org)\n * and Open Source Applications Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the 'License');\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an 'AS IS' BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * Credits: Ideas included from incomplete JS implementation of Olson\n * parser, 'XMLDAte' by Philippe Goetz (philippe.goetz@wanadoo.fr)\n *\n * Contributions:\n * Jan Niehusmann\n * Ricky Romero\n * Preston Hunt (prestonhunt@gmail.com)\n * Dov. B Katz (dov.katz@morganstanley.com)\n * Peter Bergström (pbergstr@mac.com)\n * Long Ho\n */\n\n /*jshint laxcomma:true, laxbreak:true, expr:true*/\n(function () {\n  // Standard initialization stuff to make sure the library is\n  // usable on both client and server (node) side.\n  'use strict';\n  var root = this;\n\n  // Export the timezoneJS object for Node.js, with backwards-compatibility for the old `require()` API\n  var timezoneJS = {};\n  if (typeof define === 'function' && define.amd) { // AMD\n    define(function() {\n     return timezoneJS;\n    });\n  } else if (typeof exports !== 'undefined') {\n    if (typeof module !== 'undefined' && module.exports) {\n      exports = module.exports = timezoneJS;\n    }\n    exports.timezoneJS = timezoneJS;\n  } else {\n    root.timezoneJS = timezoneJS;\n  }\n\n  timezoneJS.VERSION = '0.4.13';\n\n  // Grab the ajax library from global context.\n  // This can be jQuery, Zepto or fleegix.\n  // You can also specify your own transport mechanism by declaring\n  // `timezoneJS.timezone.transport` to a `function`. More details will follow\n  var ajax_lib = root.$ || root.jQuery || root.Zepto\n    , fleegix = root.fleegix\n    // Declare constant list of days and months. Unfortunately this doesn't leave room for i18n due to the Olson data being in English itself\n    , DAYS = timezoneJS.Days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n    , MONTHS = timezoneJS.Months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\n    , SHORT_MONTHS = {}\n    , SHORT_DAYS = {}\n    , EXACT_DATE_TIME = {};\n\n  //`{ 'Jan': 0, 'Feb': 1, 'Mar': 2, 'Apr': 3, 'May': 4, 'Jun': 5, 'Jul': 6, 'Aug': 7, 'Sep': 8, 'Oct': 9, 'Nov': 10, 'Dec': 11 }`\n  for (var i = 0; i < MONTHS.length; i++) {\n    SHORT_MONTHS[MONTHS[i].substr(0, 3)] = i;\n  }\n\n  //`{ 'Sun': 0, 'Mon': 1, 'Tue': 2, 'Wed': 3, 'Thu': 4, 'Fri': 5, 'Sat': 6 }`\n  for (i = 0; i < DAYS.length; i++) {\n    SHORT_DAYS[DAYS[i].substr(0, 3)] = i;\n  }\n\n\n  //Handle array indexOf in IE\n  //From https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/indexOf\n  //Extending Array prototype causes IE to iterate thru extra element\n  var _arrIndexOf = Array.prototype.indexOf || function (el) {\n    if (this === null) {\n      throw new TypeError();\n    }\n    var t = Object(this);\n    var len = t.length >>> 0;\n    if (len === 0) {\n      return -1;\n    }\n    var n = 0;\n    if (arguments.length > 1) {\n      n = Number(arguments[1]);\n      if (n != n) { // shortcut for verifying if it's NaN\n        n = 0;\n      } else if (n !== 0 && n !== Infinity && n !== -Infinity) {\n        n = (n > 0 || -1) * Math.floor(Math.abs(n));\n      }\n    }\n    if (n >= len) {\n      return -1;\n    }\n    var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);\n    for (; k < len; k++) {\n      if (k in t && t[k] === el) {\n        return k;\n      }\n    }\n    return -1;\n  };\n\n  // Format a number to the length = digits. For ex:\n  //\n  // `_fixWidth(2, 2) = '02'`\n  //\n  // `_fixWidth(1998, 2) = '98'`  // year, shorten it to the 2 digit representation\n  //\n  // `_fixWidth(23, 1) = '23'`  // hour, even with 1 digit specified, do not trim\n  //\n  // This is used to pad numbers in converting date to string in ISO standard.\n  var _fixWidth = function (number, digits) {\n    if (typeof number !== 'number') { throw 'not a number: ' + number; }\n    var trim = (number > 1000);   // only trim 'year', as the others don't make sense why anyone would want that\n    var s = number.toString();\n    var s_len = s.length;\n    if (trim && s_len > digits) {\n      return s.substr(s_len - digits, s_len);\n    }\n    s = [s];\n    while (s_len < digits) {\n      s.unshift('0');\n      s_len++;\n    }\n    return s.join('');\n  };\n\n  // Abstraction layer for different transport layers, including fleegix/jQuery/Zepto/Node.js\n  //\n  // Object `opts` include\n  //\n  // - `url`: url to ajax query\n  //\n  // - `async`: true for asynchronous, false otherwise. If false, return value will be response from URL. This is true by default\n  //\n  // - `success`: success callback function\n  //\n  // - `error`: error callback function\n  // Returns response from URL if async is false, otherwise the AJAX request object itself\n  var _transport = function (opts) {\n    if (!opts) return;\n    if (!opts.url) throw new Error ('URL must be specified');\n    if (!('async' in opts)) opts.async = true;\n\n    // Server-side (node)\n    // if node, require the file system module\n    if (typeof window === 'undefined' && typeof require === 'function') {\n      var nodefs = require('fs');\n      if (opts.async) {\n        // No point if there's no success handler\n        if (typeof opts.success !== 'function') return;\n        opts.error = opts.error || console.error;\n        return nodefs.readFile(opts.url, 'utf8', function(err, data) {\n          return err ? opts.error(err) : opts.success(data);\n        });\n      }\n      return nodefs.readFileSync(opts.url, 'utf8');\n    }\n\n    // Client-side\n    if ((!fleegix || typeof fleegix.xhr === 'undefined') && (!ajax_lib || typeof ajax_lib.ajax === 'undefined')) {\n      throw new Error('Please use the Fleegix.js XHR module, jQuery ajax, Zepto ajax, or define your own transport mechanism for downloading zone files.');\n    }\n    if (!opts.async) {\n      return fleegix && fleegix.xhr\n      ? fleegix.xhr.doReq({ url: opts.url, async: false })\n      : ajax_lib.ajax({ url : opts.url, async : false, dataType: 'text' }).responseText;\n    }\n    return fleegix && fleegix.xhr\n    ? fleegix.xhr.send({\n      url : opts.url,\n      method : 'get',\n      handleSuccess : opts.success,\n      handleErr : opts.error\n    })\n    : ajax_lib.ajax({\n      url : opts.url,\n      dataType: 'text',\n      method : 'GET',\n      error : opts.error,\n      success : opts.success\n    });\n  };\n\n  // Constructor, which is similar to that of the native Date object itself\n  timezoneJS.Date = function () {\n    if(this === timezoneJS) {\n      throw 'timezoneJS.Date object must be constructed with \\'new\\'';\n    }\n    var args = Array.prototype.slice.apply(arguments)\n    , dt = null\n    , tz = null\n    , arr = []\n    , valid = false\n    ;\n\n\n    //We support several different constructors, including all the ones from `Date` object\n    // with a timezone string at the end.\n    //\n    //- `[tz]`: Returns object with time in `tz` specified.\n    //\n    // - `utcMillis`, `[tz]`: Return object with UTC time = `utcMillis`, in `tz`.\n    //\n    // - `Date`, `[tz]`: Returns object with UTC time = `Date.getTime()`, in `tz`.\n    //\n    // - `year, month, [date,] [hours,] [minutes,] [seconds,] [millis,] [tz]: Same as `Date` object\n    // with tz.\n    //\n    // - `Array`: Can be any combo of the above.\n    //\n    //If 1st argument is an array, we can use it as a list of arguments itself\n    if (Object.prototype.toString.call(args[0]) === '[object Array]') {\n      args = args[0];\n    }\n    // If the last string argument doesn't parse as a Date, treat it as tz\n    if (typeof args[args.length - 1] === 'string') {\n      valid = Date.parse(args[args.length - 1].replace(/GMT[\\+\\-]\\d+/, ''));\n      if (isNaN(valid) || valid === null) {  // Checking against null is required for compatability with Datejs\n        tz = args.pop();\n      }\n    }\n    var is_dt_local = false;\n    switch (args.length) {\n      case 0:\n        dt = new Date();\n        break;\n      case 1:\n        dt = new Date(args[0]);\n        // Date strings are local if they do not contain 'Z', 'T' or timezone offsets like '+0200'\n        //  - more info below\n        if (typeof args[0] == 'string' && args[0].search(/[+-][0-9]{4}/) == -1\n                && args[0].search(/Z/) == -1 && args[0].search(/T/) == -1) {\n            is_dt_local = true;\n        }\n        break;\n      case 2:\n        dt = new Date(args[0], args[1]);\n        is_dt_local = true;\n        break;\n      default:\n        for (var i = 0; i < 7; i++) {\n          arr[i] = args[i] || 0;\n        }\n        dt = new Date(arr[0], arr[1], arr[2], arr[3], arr[4], arr[5], arr[6]);\n        is_dt_local = true;\n        break;\n    }\n\n    this._useCache = false;\n    this._tzInfo = {};\n    this._day = 0;\n    this.year = 0;\n    this.month = 0;\n    this.date = 0;\n    this.hours = 0;\n    this.minutes = 0;\n    this.seconds = 0;\n    this.milliseconds = 0;\n    this.timezone = tz || null;\n    // Tricky part:\n    // The date is either given as unambiguous UTC date or otherwise the date is assumed\n    // to be a date in timezone `tz` or a locale date if `tz` is not provided. Thus, to\n    // determine how to use `dt` we distinguish between the following cases:\n    //  - UTC   (is_dt_local = false)\n    //    `timezoneJS.Date(millis, [tz])`\n    //    `timezoneJS.Date(Date, [tz])`\n    //    `timezoneJS.Date(dt_str_tz, [tz])`\n    //  - local/timezone `tz`   (is_dt_local = true)\n    //    `timezoneJS.Date(year, mon, day, [hour], [min], [second], [tz])`\n    //    `timezoneJS.Date(dt_str, [tz])`\n    //\n    // `dt_str_tz` is a date string containing timezone information, i.e. containing 'Z', 'T' or\n    // /[+-][0-9]{4}/ (e.g. '+0200'), while `dt_str` is a string which does not contain\n    // timezone information. See: http://dygraphs.com/date-formats.html\n    if (is_dt_local) {\n       this.setFromDateObjProxy(dt);\n    } else {\n       this.setFromTimeProxy(dt.getTime(), tz);\n    }\n  };\n\n  // Implements most of the native Date object\n  timezoneJS.Date.prototype = {\n    getDate: function () { return this.date; },\n    getDay: function () { return this._day; },\n    getFullYear: function () { return this.year; },\n    getMonth: function () { return this.month; },\n    getYear: function () { return this.year - 1900; },\n    getHours: function () { return this.hours; },\n    getMilliseconds: function () { return this.milliseconds; },\n    getMinutes: function () { return this.minutes; },\n    getSeconds: function () { return this.seconds; },\n    getUTCDate: function () { return this.getUTCDateProxy().getUTCDate(); },\n    getUTCDay: function () { return this.getUTCDateProxy().getUTCDay(); },\n    getUTCFullYear: function () { return this.getUTCDateProxy().getUTCFullYear(); },\n    getUTCHours: function () { return this.getUTCDateProxy().getUTCHours(); },\n    getUTCMilliseconds: function () { return this.getUTCDateProxy().getUTCMilliseconds(); },\n    getUTCMinutes: function () { return this.getUTCDateProxy().getUTCMinutes(); },\n    getUTCMonth: function () { return this.getUTCDateProxy().getUTCMonth(); },\n    getUTCSeconds: function () { return this.getUTCDateProxy().getUTCSeconds(); },\n    // Time adjusted to user-specified timezone\n    getTime: function () {\n      return this._timeProxy + (this.getTimezoneOffset() * 60 * 1000);\n    },\n    getTimezone: function () { return this.timezone; },\n    getTimezoneOffset: function () { return this.getTimezoneInfo().tzOffset; },\n    getTimezoneAbbreviation: function () { return this.getTimezoneInfo().tzAbbr; },\n    getTimezoneInfo: function () {\n      if (this._useCache) return this._tzInfo;\n      var res;\n      // If timezone is specified, get the correct timezone info based on the Date given\n      if (this.timezone) {\n        res = this.timezone === 'Etc/UTC' || this.timezone === 'Etc/GMT'\n          ? { tzOffset: 0, tzAbbr: 'UTC' }\n          : timezoneJS.timezone.getTzInfo(this._timeProxy, this.timezone);\n      }\n      // If no timezone was specified, use the local browser offset\n      else {\n        res = { tzOffset: this.getLocalOffset(), tzAbbr: null };\n      }\n      this._tzInfo = res;\n      this._useCache = true;\n      return res;\n    },\n    getUTCDateProxy: function () {\n      var dt = new Date(this._timeProxy);\n      dt.setUTCMinutes(dt.getUTCMinutes() + this.getTimezoneOffset());\n      return dt;\n    },\n    setDate: function (date) {\n      this.setAttribute('date', date);\n      return this.getTime();\n    },\n    setFullYear: function (year, month, date) {\n      if (date !== undefined) { this.setAttribute('date', 1); }\n      this.setAttribute('year', year);\n      if (month !== undefined) { this.setAttribute('month', month); }\n      if (date !== undefined) { this.setAttribute('date', date); }\n      return this.getTime();\n    },\n    setMonth: function (month, date) {\n      this.setAttribute('month', month);\n      if (date !== undefined) { this.setAttribute('date', date); }\n      return this.getTime();\n    },\n    setYear: function (year) {\n      year = Number(year);\n      if (0 <= year && year <= 99) { year += 1900; }\n      this.setUTCAttribute('year', year);\n      return this.getTime();\n    },\n    setHours: function (hours, minutes, seconds, milliseconds) {\n      this.setAttribute('hours', hours);\n      if (minutes !== undefined) { this.setAttribute('minutes', minutes); }\n      if (seconds !== undefined) { this.setAttribute('seconds', seconds); }\n      if (milliseconds !== undefined) { this.setAttribute('milliseconds', milliseconds); }\n      return this.getTime();\n    },\n    setMinutes: function (minutes, seconds, milliseconds) {\n      this.setAttribute('minutes', minutes);\n      if (seconds !== undefined) { this.setAttribute('seconds', seconds); }\n      if (milliseconds !== undefined) { this.setAttribute('milliseconds', milliseconds); }\n      return this.getTime();\n    },\n    setSeconds: function (seconds, milliseconds) {\n      this.setAttribute('seconds', seconds);\n      if (milliseconds !== undefined) { this.setAttribute('milliseconds', milliseconds); }\n      return this.getTime();\n    },\n    setMilliseconds: function (milliseconds) {\n      this.setAttribute('milliseconds', milliseconds);\n      return this.getTime();\n    },\n    setTime: function (n) {\n      if (isNaN(n)) { throw new Error('Units must be a number.'); }\n      this.setFromTimeProxy(n, this.timezone);\n      return this.getTime();\n    },\n    setUTCFullYear: function (year, month, date) {\n      if (date !== undefined) { this.setUTCAttribute('date', 1); }\n      this.setUTCAttribute('year', year);\n      if (month !== undefined) { this.setUTCAttribute('month', month); }\n      if (date !== undefined) { this.setUTCAttribute('date', date); }\n      return this.getTime();\n    },\n    setUTCMonth: function (month, date) {\n      this.setUTCAttribute('month', month);\n      if (date !== undefined) { this.setUTCAttribute('date', date); }\n      return this.getTime();\n    },\n    setUTCDate: function (date) {\n      this.setUTCAttribute('date', date);\n      return this.getTime();\n    },\n    setUTCHours: function (hours, minutes, seconds, milliseconds) {\n      this.setUTCAttribute('hours', hours);\n      if (minutes !== undefined) { this.setUTCAttribute('minutes', minutes); }\n      if (seconds !== undefined) { this.setUTCAttribute('seconds', seconds); }\n      if (milliseconds !== undefined) { this.setUTCAttribute('milliseconds', milliseconds); }\n      return this.getTime();\n    },\n    setUTCMinutes: function (minutes, seconds, milliseconds) {\n      this.setUTCAttribute('minutes', minutes);\n      if (seconds !== undefined) { this.setUTCAttribute('seconds', seconds); }\n      if (milliseconds !== undefined) { this.setUTCAttribute('milliseconds', milliseconds); }\n      return this.getTime();\n    },\n    setUTCSeconds: function (seconds, milliseconds) {\n      this.setUTCAttribute('seconds', seconds);\n      if (milliseconds !== undefined) { this.setUTCAttribute('milliseconds', milliseconds); }\n      return this.getTime();\n    },\n    setUTCMilliseconds: function (milliseconds) {\n      this.setUTCAttribute('milliseconds', milliseconds);\n      return this.getTime();\n    },\n    setFromDateObjProxy: function (dt) {\n      this.year = dt.getFullYear();\n      this.month = dt.getMonth();\n      this.date = dt.getDate();\n      this.hours = dt.getHours();\n      this.minutes = dt.getMinutes();\n      this.seconds = dt.getSeconds();\n      this.milliseconds = dt.getMilliseconds();\n      this._day = dt.getDay();\n      this._dateProxy = dt;\n      this._timeProxy = Date.UTC(this.year, this.month, this.date, this.hours, this.minutes, this.seconds, this.milliseconds);\n      this._useCache = false;\n    },\n    setFromTimeProxy: function (utcMillis, tz) {\n      var dt = new Date(utcMillis);\n      var tzOffset = tz ? timezoneJS.timezone.getTzInfo(utcMillis, tz, true).tzOffset : dt.getTimezoneOffset();\n      dt.setTime(utcMillis + (dt.getTimezoneOffset() - tzOffset) * 60000);\n      this.setFromDateObjProxy(dt);\n    },\n    setAttribute: function (unit, n) {\n      if (isNaN(n)) { throw new Error('Units must be a number.'); }\n      var dt = this._dateProxy;\n      var meth = unit === 'year' ? 'FullYear' : unit.substr(0, 1).toUpperCase() + unit.substr(1);\n      dt['set' + meth](n);\n      this.setFromDateObjProxy(dt);\n    },\n    setUTCAttribute: function (unit, n) {\n      if (isNaN(n)) { throw new Error('Units must be a number.'); }\n      var meth = unit === 'year' ? 'FullYear' : unit.substr(0, 1).toUpperCase() + unit.substr(1);\n      var dt = this.getUTCDateProxy();\n      dt['setUTC' + meth](n);\n      dt.setUTCMinutes(dt.getUTCMinutes() - this.getTimezoneOffset());\n      this.setFromTimeProxy(dt.getTime() + this.getTimezoneOffset() * 60000, this.timezone);\n    },\n    setTimezone: function (tz) {\n      var previousOffset = this.getTimezoneInfo().tzOffset;\n      this.timezone = tz;\n      this._useCache = false;\n      // Set UTC minutes offsets by the delta of the two timezones\n      this.setUTCMinutes(this.getUTCMinutes() - this.getTimezoneInfo().tzOffset + previousOffset);\n    },\n    removeTimezone: function () {\n      this.timezone = null;\n      this._useCache = false;\n    },\n    valueOf: function () { return this.getTime(); },\n    clone: function () {\n      return this.timezone ? new timezoneJS.Date(this.getTime(), this.timezone) : new timezoneJS.Date(this.getTime());\n    },\n    toGMTString: function () { return this.toString('EEE, dd MMM yyyy HH:mm:ss Z', 'Etc/GMT'); },\n    toLocaleString: function () {},\n    toLocaleDateString: function () {},\n    toLocaleTimeString: function () {},\n    toSource: function () {},\n    toISOString: function () { return this.toString('yyyy-MM-ddTHH:mm:ss.SSS', 'Etc/UTC') + 'Z'; },\n    toJSON: function () { return this.toISOString(); },\n    toDateString: function () { return this.toString('EEE MMM dd yyyy'); },\n    toTimeString: function () { return this.toString('H:mm k'); },\n    // Allows different format following ISO8601 format:\n    toString: function (format, tz) {\n      // Default format is the same as toISOString\n      if (!format) format = 'yyyy-MM-dd HH:mm:ss';\n      var result = format;\n      var tzInfo = tz ? timezoneJS.timezone.getTzInfo(this.getTime(), tz) : this.getTimezoneInfo();\n      var _this = this;\n      // If timezone is specified, get a clone of the current Date object and modify it\n      if (tz) {\n        _this = this.clone();\n        _this.setTimezone(tz);\n      }\n      var hours = _this.getHours();\n      return result\n      // fix the same characters in Month names\n      .replace(/a+/g, function () { return 'k'; })\n      // `y`: year\n      .replace(/y+/g, function (token) { return _fixWidth(_this.getFullYear(), token.length); })\n      // `d`: date\n      .replace(/d+/g, function (token) { return _fixWidth(_this.getDate(), token.length); })\n      // `m`: minute\n      .replace(/m+/g, function (token) { return _fixWidth(_this.getMinutes(), token.length); })\n      // `s`: second\n      .replace(/s+/g, function (token) { return _fixWidth(_this.getSeconds(), token.length); })\n      // `S`: millisecond\n      .replace(/S+/g, function (token) { return _fixWidth(_this.getMilliseconds(), token.length); })\n      // 'h': 12 hour format\n      .replace(/h+/g, function (token) { return _fixWidth( ((hours%12) === 0) ? 12 : (hours % 12), token.length); })\n      // `M`: month. Note: `MM` will be the numeric representation (e.g February is 02) but `MMM` will be text representation (e.g February is Feb)\n      .replace(/M+/g, function (token) {\n        var _month = _this.getMonth(),\n        _len = token.length;\n        if (_len > 3) {\n          return timezoneJS.Months[_month];\n        } else if (_len > 2) {\n          return timezoneJS.Months[_month].substring(0, _len);\n        }\n        return _fixWidth(_month + 1, _len);\n      })\n      // `k`: AM/PM\n      .replace(/k+/g, function () {\n        if (hours >= 12) {\n          if (hours > 12) {\n            hours -= 12;\n          }\n          return 'PM';\n        }\n        return 'AM';\n      })\n      // `H`: hour\n      .replace(/H+/g, function (token) { return _fixWidth(hours, token.length); })\n      // `E`: day\n      .replace(/E+/g, function (token) { return DAYS[_this.getDay()].substring(0, token.length); })\n      // `Z`: timezone abbreviation\n      .replace(/Z+/gi, function () { return tzInfo.tzAbbr; });\n    },\n    toUTCString: function () { return this.toGMTString(); },\n    civilToJulianDayNumber: function (y, m, d) {\n      var a;\n      // Adjust for zero-based JS-style array\n      m++;\n      if (m > 12) {\n        a = parseInt(m/12, 10);\n        m = m % 12;\n        y += a;\n      }\n      if (m <= 2) {\n        y -= 1;\n        m += 12;\n      }\n      a = Math.floor(y / 100);\n      var b = 2 - a + Math.floor(a / 4)\n        , jDt = Math.floor(365.25 * (y + 4716)) + Math.floor(30.6001 * (m + 1)) + d + b - 1524;\n      return jDt;\n    },\n    getLocalOffset: function () {\n      return this._dateProxy.getTimezoneOffset();\n    }\n  };\n\n\n  timezoneJS.timezone = new function () {\n    var _this = this\n      , regionMap = {'Etc':'etcetera','EST':'northamerica','MST':'northamerica','HST':'northamerica','EST5EDT':'northamerica','CST6CDT':'northamerica','MST7MDT':'northamerica','PST8PDT':'northamerica','America':['northamerica','southamerica'],'Pacific':'australasia','Atlantic':'europe','Africa':'africa','Indian':'africa','Antarctica':'antarctica','Asia':'asia','Australia':'australasia','Europe':'europe','WET':'europe','CET':'europe','MET':'europe','EET':'europe'}\n      , regionExceptions = {'Pacific/Honolulu':'northamerica','Atlantic/Bermuda':'northamerica','Atlantic/Cape_Verde':'africa','Atlantic/St_Helena':'africa','Indian/Kerguelen':'antarctica','Indian/Chagos':'asia','Indian/Maldives':'asia','Indian/Christmas':'australasia','Indian/Cocos':'australasia','America/Danmarkshavn':'europe','America/Scoresbysund':'europe','America/Godthab':'europe','America/Thule':'europe','Asia/Istanbul':'europe','Asia/Yekaterinburg':'europe','Asia/Omsk':'europe','Asia/Novosibirsk':'europe','Asia/Krasnoyarsk':'europe','Asia/Irkutsk':'europe','Asia/Yakutsk':'europe','Asia/Vladivostok':'europe','Asia/Sakhalin':'europe','Asia/Magadan':'europe','Asia/Kamchatka':'europe','Asia/Anadyr':'europe','Africa/Ceuta':'europe','GMT':'etcetera','Europe/Nicosia':'asia'};\n    function invalidTZError(t) { throw new Error('Timezone \\'' + t + '\\' is either incorrect, or not loaded in the timezone registry.'); }\n    function builtInLoadZoneFile(fileName, opts) {\n      var url = _this.zoneFileBasePath + '/' + fileName;\n      return !opts || !opts.async\n      ? _this.parseZones(_this.transport({ url : url, async : false }))\n      : _this.transport({\n        async: true,\n        url : url,\n        success : function (str) {\n          return _this.parseZones(str) && typeof opts.callback === 'function' && opts.callback();\n        },\n        error : function () {\n          throw new Error('Error retrieving \\'' + url + '\\' zoneinfo files');\n        }\n      });\n    }\n    function getRegionForTimezone(tz) {\n      var exc = regionExceptions[tz]\n        , reg\n        , ret;\n      if (exc) return exc;\n      reg = tz.split('/')[0];\n      ret = regionMap[reg];\n      // If there's nothing listed in the main regions for this TZ, check the 'backward' links\n      if (ret) return ret;\n      var link = _this.zones[tz];\n      if (typeof link === 'string') {\n        return getRegionForTimezone(link);\n      }\n      // Backward-compat file hasn't loaded yet, try looking in there\n      if (!_this.loadedZones.backward) {\n        // This is for obvious legacy zones (e.g., Iceland) that don't even have a prefix like 'America/' that look like normal zones\n        _this.loadZoneFile('backward');\n        return getRegionForTimezone(tz);\n      }\n      invalidTZError(tz);\n    }\n    //str has format hh:mm, can be negative\n    function parseTimeString(str) {\n      var pat = /(\\d+)(?::0*(\\d*))?(?::0*(\\d*))?([wsugz])?$/;\n      var hms = str.match(pat);\n      hms[1] = parseInt(hms[1], 10);\n      hms[2] = hms[2] ? parseInt(hms[2], 10) : 0;\n      hms[3] = hms[3] ? parseInt(hms[3], 10) : 0;\n      return hms.slice(1, 5);\n    }\n    //z is something like `[ '-3:44:40', '-', 'LMT', '1911', 'May', '15', '' ]` or `[ '-5:00', '-', 'EST', '1974', 'Apr', '28', '2:00' ]`\n    function processZone(z) {\n      if (!z[3]) { return; }\n      var yea = parseInt(z[3], 10)\n        , mon = 11\n        , dat = 31;\n      //If month is there\n      if (z[4]) {\n        mon = SHORT_MONTHS[z[4].substr(0, 3)];\n        dat = parseInt(z[5], 10) || 1;\n      }\n      var t = z[6] ? parseTimeString(z[6]) : [0, 0, 0];\n      return [yea, mon, dat, t[0], t[1], t[2]];\n    }\n    function getZone(dt, tz) {\n      var utcMillis = typeof dt === 'number' ? dt : new Date(dt).getTime();\n      var t = tz;\n      var zoneList = _this.zones[t];\n      // Follow links to get to an actual zone\n      while (typeof zoneList === 'string') {\n        t = zoneList;\n        zoneList = _this.zones[t];\n      }\n      if (!zoneList) {\n        // Backward-compat file hasn't loaded yet, try looking in there\n        if (!_this.loadedZones.backward) {\n          //This is for backward entries like 'America/Fort_Wayne' that\n          // getRegionForTimezone *thinks* it has a region file and zone\n          // for (e.g., America => 'northamerica'), but in reality it's a\n          // legacy zone we need the backward file for.\n          _this.loadZoneFile('backward');\n          return getZone(dt, tz);\n        }\n        invalidTZError(t);\n      }\n      if (zoneList.length === 0) {\n        throw new Error('No Zone found for \\'' + tz + '\\' on ' + dt);\n      }\n      //Do backwards lookup since most use cases deal with newer dates.\n      for (var i = zoneList.length - 1; i >= 0; i--) {\n        var z = zoneList[i];\n        if (z[3] && utcMillis > z[3]) break;\n      }\n      return zoneList[i+1];\n    }\n    function getBasicOffset(time) {\n      var off = parseTimeString(time)\n        , adj = time.charAt(0) === '-' ? -1 : 1;\n      off = adj * (((off[0] * 60 + off[1]) * 60 + off[2]) * 1000);\n      return off/60/1000;\n    }\n    function getAdjustedOffset(off, min) {\n      return -Math.ceil(min - off);\n    }\n\n    //if isUTC is true, date is given in UTC, otherwise it's given\n    // in local time (ie. date.getUTC*() returns local time components)\n    function getRule(dt, zone, isUTC) {\n      var date = typeof dt === 'number' ? new Date(dt) : dt;\n      var ruleset = zone[1];\n      var basicOffset = zone[0];\n\n      // If the zone has a DST rule like '1:00', create a rule and return it\n      // instead of looking it up in the parsed rules\n      var staticDstMatch = ruleset.match(/^([0-9]):([0-9][0-9])$/);\n      if (staticDstMatch) {\n        return [-1000000, 'max', '-', 'Jan', 1, [0, 0, 0], parseInt(staticDstMatch[1],10) * 60 + parseInt(staticDstMatch[2], 10), '-'];\n      }\n\n      //Convert a date to UTC. Depending on the 'type' parameter, the date\n      // parameter may be:\n      //\n      // - `u`, `g`, `z`: already UTC (no adjustment).\n      //\n      // - `s`: standard time (adjust for time zone offset but not for DST)\n      //\n      // - `w`: wall clock time (adjust for both time zone and DST offset).\n      //\n      // DST adjustment is done using the rule given as third argument.\n      var convertDateToUTC = function (date, type, rule) {\n        var offset = 0;\n\n        if (type === 'u' || type === 'g' || type === 'z') { // UTC\n          offset = 0;\n        } else if (type === 's') { // Standard Time\n          offset = basicOffset;\n        } else if (type === 'w' || !type) { // Wall Clock Time\n          offset = getAdjustedOffset(basicOffset, rule[6]);\n        } else {\n          throw new Error('unknown type ' + type);\n        }\n        offset *= 60 * 1000; // to millis\n\n        return new Date(date.getTime() + offset);\n      };\n\n      //Step 1:  Find applicable rules for this year.\n      //\n      //Step 2:  Sort the rules by effective date.\n      //\n      //Step 3:  Check requested date to see if a rule has yet taken effect this year.  If not,\n      //\n      //Step 4:  Get the rules for the previous year.  If there isn't an applicable rule for last year, then\n      // there probably is no current time offset since they seem to explicitly turn off the offset\n      // when someone stops observing DST.\n      //\n      // FIXME if this is not the case and we'll walk all the way back (ugh).\n      //\n      //Step 5:  Sort the rules by effective date.\n      //Step 6:  Apply the most recent rule before the current time.\n      var convertRuleToExactDateAndTime = function (yearAndRule, prevRule) {\n        var year = yearAndRule[0]\n          , rule = yearAndRule[1];\n          // Assume that the rule applies to the year of the given date.\n\n        var hms = rule[5];\n        var effectiveDate;\n\n        if (!EXACT_DATE_TIME[year])\n          EXACT_DATE_TIME[year] = {};\n\n        // Result for given parameters is already stored\n        if (EXACT_DATE_TIME[year][rule])\n          effectiveDate = EXACT_DATE_TIME[year][rule];\n        else {\n          //If we have a specific date, use that!\n          if (!isNaN(rule[4])) {\n            effectiveDate = new Date(Date.UTC(year, SHORT_MONTHS[rule[3]], rule[4], hms[0], hms[1], hms[2], 0));\n          }\n          //Let's hunt for the date.\n          else {\n            var targetDay\n              , operator;\n            //Example: `lastThu`\n            if (rule[4].substr(0, 4) === 'last') {\n              // Start at the last day of the month and work backward.\n              effectiveDate = new Date(Date.UTC(year, SHORT_MONTHS[rule[3]] + 1, 1, hms[0] - 24, hms[1], hms[2], 0));\n              targetDay = SHORT_DAYS[rule[4].substr(4, 3)];\n              operator = '<=';\n            }\n            //Example: `Sun>=15`\n            else {\n              //Start at the specified date.\n              effectiveDate = new Date(Date.UTC(year, SHORT_MONTHS[rule[3]], rule[4].substr(5), hms[0], hms[1], hms[2], 0));\n              targetDay = SHORT_DAYS[rule[4].substr(0, 3)];\n              operator = rule[4].substr(3, 2);\n            }\n            var ourDay = effectiveDate.getUTCDay();\n            //Go forwards.\n            if (operator === '>=') {\n              effectiveDate.setUTCDate(effectiveDate.getUTCDate() + (targetDay - ourDay + ((targetDay < ourDay) ? 7 : 0)));\n            }\n            //Go backwards.  Looking for the last of a certain day, or operator is '<=' (less likely).\n            else {\n              effectiveDate.setUTCDate(effectiveDate.getUTCDate() + (targetDay - ourDay - ((targetDay > ourDay) ? 7 : 0)));\n            }\n          }\n          EXACT_DATE_TIME[year][rule] = effectiveDate;\n        }\n\n\n        //If previous rule is given, correct for the fact that the starting time of the current\n        // rule may be specified in local time.\n        if (prevRule) {\n          effectiveDate = convertDateToUTC(effectiveDate, hms[3], prevRule);\n        }\n        return effectiveDate;\n      };\n\n      var findApplicableRules = function (year, ruleset) {\n        var applicableRules = [];\n        for (var i = 0; ruleset && i < ruleset.length; i++) {\n          //Exclude future rules.\n          if (ruleset[i][0] <= year &&\n              (\n                // Date is in a set range.\n                ruleset[i][1] >= year ||\n                // Date is in an 'only' year.\n                  (ruleset[i][0] === year && ruleset[i][1] === 'only') ||\n                //We're in a range from the start year to infinity.\n                    ruleset[i][1] === 'max'\n          )\n             ) {\n               //It's completely okay to have any number of matches here.\n               // Normally we should only see two, but that doesn't preclude other numbers of matches.\n               // These matches are applicable to this year.\n               applicableRules.push([year, ruleset[i]]);\n             }\n        }\n        return applicableRules;\n      };\n\n      var compareDates = function (a, b, prev) {\n        var year, rule;\n        if (!(a instanceof Date)) {\n          year = a[0];\n          rule = a[1];\n          a = (!prev && EXACT_DATE_TIME[year] && EXACT_DATE_TIME[year][rule])\n            ? EXACT_DATE_TIME[year][rule]\n            : convertRuleToExactDateAndTime(a, prev);\n        } else if (prev) {\n          a = convertDateToUTC(a, isUTC ? 'u' : 'w', prev);\n        }\n        if (!(b instanceof Date)) {\n          year = b[0];\n          rule = b[1];\n          b = (!prev && EXACT_DATE_TIME[year] && EXACT_DATE_TIME[year][rule]) ? EXACT_DATE_TIME[year][rule]\n            : convertRuleToExactDateAndTime(b, prev);\n        } else if (prev) {\n          b = convertDateToUTC(b, isUTC ? 'u' : 'w', prev);\n        }\n        a = Number(a);\n        b = Number(b);\n        return a - b;\n      };\n\n      var year = date.getUTCFullYear();\n      var applicableRules;\n\n      applicableRules = findApplicableRules(year, _this.rules[ruleset]);\n      applicableRules.push(date);\n      //While sorting, the time zone in which the rule starting time is specified\n      // is ignored. This is ok as long as the timespan between two DST changes is\n      // larger than the DST offset, which is probably always true.\n      // As the given date may indeed be close to a DST change, it may get sorted\n      // to a wrong position (off by one), which is corrected below.\n      applicableRules.sort(compareDates);\n\n      //If there are not enough past DST rules...\n      if (_arrIndexOf.call(applicableRules, date) < 2) {\n        applicableRules = applicableRules.concat(findApplicableRules(year-1, _this.rules[ruleset]));\n        applicableRules.sort(compareDates);\n      }\n      var pinpoint = _arrIndexOf.call(applicableRules, date);\n      if (pinpoint > 1 && compareDates(date, applicableRules[pinpoint-1], applicableRules[pinpoint-2][1]) < 0) {\n        //The previous rule does not really apply, take the one before that.\n        return applicableRules[pinpoint - 2][1];\n      } else if (pinpoint > 0 && pinpoint < applicableRules.length - 1 && compareDates(date, applicableRules[pinpoint+1], applicableRules[pinpoint-1][1]) > 0) {\n\n        //The next rule does already apply, take that one.\n        return applicableRules[pinpoint + 1][1];\n      } else if (pinpoint === 0) {\n        //No applicable rule found in this and in previous year.\n        return null;\n      }\n      return applicableRules[pinpoint - 1][1];\n    }\n    function getAbbreviation(zone, rule) {\n      var base = zone[2];\n      if (base.indexOf('%s') > -1) {\n        var repl;\n        if (rule) {\n          repl = rule[7] === '-' ? '' : rule[7];\n        }\n        //FIXME: Right now just falling back to Standard --\n        // apparently ought to use the last valid rule,\n        // although in practice that always ought to be Standard\n        else {\n          repl = 'S';\n        }\n        return base.replace('%s', repl);\n      } else if (base.indexOf('/') > -1) {\n        //Chose one of two alternative strings.\n        return base.split('/', 2)[rule ? (rule[6] ? 1 : 0) : 0];\n      }\n      return base;\n    }\n\n    this.zoneFileBasePath = null;\n    this.zoneFiles = ['africa', 'antarctica', 'asia', 'australasia', 'backward', 'etcetera', 'europe', 'northamerica', 'pacificnew', 'southamerica'];\n    this.loadingSchemes = {\n      PRELOAD_ALL: 'preloadAll',\n      LAZY_LOAD: 'lazyLoad',\n      MANUAL_LOAD: 'manualLoad'\n    };\n    this.getRegionForTimezone = getRegionForTimezone;\n    this.loadingScheme = this.loadingSchemes.LAZY_LOAD;\n    this.loadedZones = {};\n    this.zones = {};\n    this.rules = {};\n\n    this.init = function (o) {\n      var opts = { async: true }\n        , def = this.loadingScheme === this.loadingSchemes.PRELOAD_ALL\n          ? this.zoneFiles\n          : (this.defaultZoneFile || 'northamerica');\n      //Override default with any passed-in opts\n      for (var p in o) {\n        opts[p] = o[p];\n      }\n      return this.loadZoneFiles(def, opts);\n    };\n\n    //Get a single zone file, or all files in an array\n    this.loadZoneFiles = function(fileNames, opts) {\n      var callbackFn\n        , done = 0;\n      if (typeof fileNames === 'string') {\n        return this.loadZoneFile(fileNames, opts);\n      }\n      //Wraps callback function in another one that makes\n      // sure all files have been loaded.\n      opts = opts || {};\n      callbackFn = opts.callback;\n      opts.callback = function () {\n        done++;\n        (done === fileNames.length) && typeof callbackFn === 'function' && callbackFn();\n      };\n      for (var i = 0; i < fileNames.length; i++) {\n        this.loadZoneFile(fileNames[i], opts);\n      }\n    };\n    //Get the zone files via XHR -- if the sync flag\n    // is set to true, it's being called by the lazy-loading\n    // mechanism, so the result needs to be returned inline.\n    this.loadZoneFile = function (fileName, opts) {\n      if (typeof this.zoneFileBasePath === 'undefined') {\n        throw new Error('Please define a base path to your zone file directory -- timezoneJS.timezone.zoneFileBasePath.');\n      }\n      //Ignore already loaded zones.\n      if (this.loadedZones[fileName]) {\n        return;\n      }\n      this.loadedZones[fileName] = true;\n      return builtInLoadZoneFile(fileName, opts);\n    };\n    this.loadZoneJSONData = function (url, sync) {\n      var processData = function (data) {\n        data = eval('('+ data +')');\n        for (var z in data.zones) {\n          _this.zones[z] = data.zones[z];\n        }\n        for (var r in data.rules) {\n          _this.rules[r] = data.rules[r];\n        }\n      };\n      return sync\n      ? processData(_this.transport({ url : url, async : false }))\n      : _this.transport({ url : url, success : processData });\n    };\n    this.loadZoneDataFromObject = function (data) {\n      if (!data) { return; }\n      for (var z in data.zones) {\n        _this.zones[z] = data.zones[z];\n      }\n      for (var r in data.rules) {\n        _this.rules[r] = data.rules[r];\n      }\n    };\n    this.getAllZones = function () {\n      var arr = [];\n      for (var z in this.zones) { arr.push(z); }\n      return arr.sort();\n    };\n    this.parseZones = function (str) {\n\n      if (!str) {\n        return false;\n      }\n\n      var lines = str.split('\\n')\n        , arr = []\n        , chunk = ''\n        , l\n        , zone = null\n        , rule = null;\n      for (var i = 0; i < lines.length; i++) {\n        l = lines[i];\n        if (l.match(/^\\s/)) {\n          l = 'Zone ' + zone + l;\n        }\n        l = l.split('#')[0];\n        if (l.length > 3) {\n          arr = l.split(/\\s+/);\n          chunk = arr.shift();\n          //Ignore Leap.\n          switch (chunk) {\n            case 'Zone':\n              zone = arr.shift();\n              if (!_this.zones[zone]) {\n                _this.zones[zone] = [];\n              }\n              if (arr.length < 3) break;\n              //Process zone right here and replace 3rd element with the processed array.\n              arr.splice(3, arr.length, processZone(arr));\n              if (arr[3]) arr[3] = Date.UTC.apply(null, arr[3]);\n              arr[0] = -getBasicOffset(arr[0]);\n              _this.zones[zone].push(arr);\n              break;\n            case 'Rule':\n              rule = arr.shift();\n              if (!_this.rules[rule]) {\n                _this.rules[rule] = [];\n              }\n              //Parse int FROM year and TO year\n              arr[0] = parseInt(arr[0], 10);\n              arr[1] = parseInt(arr[1], 10) || arr[1];\n              //Parse time string AT\n              arr[5] = parseTimeString(arr[5]);\n              //Parse offset SAVE\n              arr[6] = getBasicOffset(arr[6]);\n              _this.rules[rule].push(arr);\n              break;\n            case 'Link':\n              //No zones for these should already exist.\n              if (_this.zones[arr[1]]) {\n                throw new Error('Error with Link ' + arr[1] + '. Cannot create link of a preexisted zone.');\n              }\n              //Create the link.\n              //Links are saved as strings that are the keys\n              //of their referenced values.\n              //Ex: \"US/Central\": \"America/Chicago\"\n              if (isNaN(arr[0])) {\n                _this.zones[arr[1]] = arr[0];\n              }\n              else {\n                _this.zones[arr[1]] = parseInt(arr[0], 10);\n              }\n              break;\n          }\n        }\n      }\n      return true;\n    };\n    //Expose transport mechanism and allow overwrite.\n    this.transport = _transport;\n    this.getTzInfo = function (dt, tz, isUTC) {\n      //Lazy-load any zones not yet loaded.\n      if (this.loadingScheme === this.loadingSchemes.LAZY_LOAD) {\n        //Get the correct region for the zone.\n        var zoneFile = getRegionForTimezone(tz);\n        if (!zoneFile) {\n          throw new Error('Not a valid timezone ID.');\n        }\n        //Get the file and parse it -- use synchronous XHR.\n        this.loadZoneFiles(zoneFile);\n      }\n      var z = getZone(dt, tz);\n      var off = +z[0];\n      //See if the offset needs adjustment.\n      var rule = getRule(dt, z, isUTC);\n      if (rule) {\n        off = getAdjustedOffset(off, rule[6]);\n      }\n      var abbr = getAbbreviation(z, rule);\n      return { tzOffset: off, tzAbbr: abbr };\n    };\n  }();\n}).call(typeof window !== \"undefined\" ? window : this);\n"]}