sugar-rails 1.3.3 → 1.3.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  module Sugar
2
2
  module Rails
3
- VERSION = "1.3.3"
4
- SUGARJS_VERSION = "1.3.3"
3
+ VERSION = "1.3.4"
4
+ SUGARJS_VERSION = "1.3.4"
5
5
  end
6
6
  end
@@ -766,9 +766,7 @@
766
766
  }
767
767
 
768
768
  }
769
- if(!forceUTC) {
770
- d.utc(false);
771
- }
769
+ d.utc(false);
772
770
  return {
773
771
  date: d,
774
772
  set: set
@@ -1025,15 +1023,14 @@
1025
1023
  }
1026
1024
  }
1027
1025
 
1028
- function createDate(args, prefer) {
1029
- var f, localeCode, forceUTC;
1026
+ function createDate(args, prefer, forceUTC) {
1027
+ var f, localeCode;
1030
1028
  if(isNumber(args[1])) {
1031
1029
  // If the second argument is a number, then we have an enumerated constructor type as in "new Date(2003, 2, 12);"
1032
1030
  f = collectDateArguments(args)[0];
1033
1031
  } else {
1034
1032
  f = args[0];
1035
1033
  localeCode = args[1];
1036
- forceUTC = args[2];
1037
1034
  }
1038
1035
  return getExtendedDate(f, localeCode, prefer, forceUTC).date;
1039
1036
  }
@@ -1393,6 +1390,26 @@
1393
1390
  });
1394
1391
  }
1395
1392
 
1393
+ function buildUTCAliases() {
1394
+ date.extend({
1395
+ 'utc': {
1396
+
1397
+ 'create': function() {
1398
+ return createDate(arguments, 0, true);
1399
+ },
1400
+
1401
+ 'past': function() {
1402
+ return createDate(arguments, -1, true);
1403
+ },
1404
+
1405
+ 'future': function() {
1406
+ return createDate(arguments, 1, true);
1407
+ }
1408
+
1409
+ }
1410
+ }, false, false);
1411
+ }
1412
+
1396
1413
  function setDateProperties() {
1397
1414
  date.extend({
1398
1415
  'RFC1123': '{Dow}, {dd} {Mon} {yyyy} {HH}:{mm}:{ss} {tz}',
@@ -1402,24 +1419,17 @@
1402
1419
  }, false, false);
1403
1420
  }
1404
1421
 
1405
- function buildDate() {
1406
- buildDateUnits();
1407
- buildDateMethods();
1408
- buildCoreInputFormats();
1409
- buildDateOutputShortcuts();
1410
- buildAsianDigits();
1411
- buildRelativeAliases();
1412
- setDateProperties();
1413
- }
1414
-
1415
1422
 
1416
1423
  date.extend({
1417
1424
 
1418
1425
  /***
1419
- * @method Date.create(<d>, [locale] = currentLocale, [utc] = false)
1426
+ * @method Date.create(<d>, [locale] = currentLocale)
1420
1427
  * @returns Date
1421
1428
  * @short Alternate Date constructor which understands many different text formats, a timestamp, or another date.
1422
- * @extra If no argument is given, date is assumed to be now. %Date.create% additionally can accept enumerated parameters as with the standard date constructor. [locale] can be passed to specify the locale that the date is in. When unspecified, the current locale (default is English) is assumed. [utc] indicates a utc-based date. For more information, see @date_format.
1429
+ * @extra If no argument is given, date is assumed to be now. %Date.create% additionally can accept enumerated parameters as with the standard date constructor. [locale] can be passed to specify the locale that the date is in. When unspecified, the current locale (default is English) is assumed. UTC-based dates can be created through the %utc% object. For more see @date_format.
1430
+ * @set
1431
+ * Date.utc.create
1432
+ *
1423
1433
  * @example
1424
1434
  *
1425
1435
  * Date.create('July') -> July of this year
@@ -1431,6 +1441,7 @@
1431
1441
  * Date.create(-446806800000) -> November 5, 1955
1432
1442
  * Date.create(1776, 6, 4) -> July 4, 1776
1433
1443
  * Date.create('1776年07月04日', 'ja') -> July 4, 1776
1444
+ * Date.utc.create('July 4, 1776', 'en') -> July 4, 1776
1434
1445
  *
1435
1446
  ***/
1436
1447
  'create': function() {
@@ -1438,10 +1449,12 @@
1438
1449
  },
1439
1450
 
1440
1451
  /***
1441
- * @method Date.past(<d>, [locale] = currentLocale, [utc] = false)
1452
+ * @method Date.past(<d>, [locale] = currentLocale)
1442
1453
  * @returns Date
1443
1454
  * @short Alternate form of %Date.create% with any ambiguity assumed to be the past.
1444
- * @extra For example %"Sunday"% can be either "the Sunday coming up" or "the Sunday last" depending on context. Note that dates explicitly in the future ("next Sunday") will remain in the future. This method simply provides a hint when ambiguity exists.
1455
+ * @extra For example %"Sunday"% can be either "the Sunday coming up" or "the Sunday last" depending on context. Note that dates explicitly in the future ("next Sunday") will remain in the future. This method simply provides a hint when ambiguity exists. UTC-based dates can be created through the %utc% object. For more, see @date_format.
1456
+ * @set
1457
+ * Date.utc.past
1445
1458
  * @example
1446
1459
  *
1447
1460
  * Date.past('July') -> July of this year or last depending on the current month
@@ -1453,10 +1466,13 @@
1453
1466
  },
1454
1467
 
1455
1468
  /***
1456
- * @method Date.future(<d>, [locale] = currentLocale, [utc] = false)
1469
+ * @method Date.future(<d>, [locale] = currentLocale)
1457
1470
  * @returns Date
1458
1471
  * @short Alternate form of %Date.create% with any ambiguity assumed to be the future.
1459
- * @extra For example %"Sunday"% can be either "the Sunday coming up" or "the Sunday last" depending on context. Note that dates explicitly in the past ("last Sunday") will remain in the past. This method simply provides a hint when ambiguity exists.
1472
+ * @extra For example %"Sunday"% can be either "the Sunday coming up" or "the Sunday last" depending on context. Note that dates explicitly in the past ("last Sunday") will remain in the past. This method simply provides a hint when ambiguity exists. UTC-based dates can be created through the %utc% object. For more, see @date_format.
1473
+ * @set
1474
+ * Date.utc.future
1475
+ *
1460
1476
  * @example
1461
1477
  *
1462
1478
  * Date.future('July') -> July of this year or next depending on the current month
@@ -1691,7 +1707,7 @@
1691
1707
  * @method isAfter(<d>, [margin] = 0)
1692
1708
  * @returns Boolean
1693
1709
  * @short Returns true if the date is after the <d>.
1694
- * @extra [margin] is to allow extra margin of error (in ms). <d> will accept a date object, timestamp, or text format. If not specified, <d> is assumed to be now. See @date_format for more information.
1710
+ * @extra [margin] is to allow extra margin of error (in ms). <d> will accept a date object, timestamp, or text format. If not specified, <d> is assumed to be now. See @date_format for more.
1695
1711
  * @example
1696
1712
  *
1697
1713
  * new Date().isAfter('tomorrow') -> false
@@ -1706,7 +1722,7 @@
1706
1722
  * @method isBefore(<d>, [margin] = 0)
1707
1723
  * @returns Boolean
1708
1724
  * @short Returns true if the date is before <d>.
1709
- * @extra [margin] is to allow extra margin of error (in ms). <d> will accept a date object, timestamp, or text format. If not specified, <d> is assumed to be now. See @date_format for more information.
1725
+ * @extra [margin] is to allow extra margin of error (in ms). <d> will accept a date object, timestamp, or text format. If not specified, <d> is assumed to be now. See @date_format for more.
1710
1726
  * @example
1711
1727
  *
1712
1728
  * new Date().isBefore('tomorrow') -> true
@@ -1721,7 +1737,7 @@
1721
1737
  * @method isBetween(<d1>, <d2>, [margin] = 0)
1722
1738
  * @returns Boolean
1723
1739
  * @short Returns true if the date falls between <d1> and <d2>.
1724
- * @extra [margin] is to allow extra margin of error (in ms). <d1> and <d2> will accept a date object, timestamp, or text format. If not specified, they are assumed to be now. See @date_format for more information.
1740
+ * @extra [margin] is to allow extra margin of error (in ms). <d1> and <d2> will accept a date object, timestamp, or text format. If not specified, they are assumed to be now. See @date_format for more.
1725
1741
  * @example
1726
1742
  *
1727
1743
  * new Date().isBetween('yesterday', 'tomorrow') -> true
@@ -1798,7 +1814,7 @@
1798
1814
  * @method relative([fn], [locale] = currentLocale)
1799
1815
  * @returns String
1800
1816
  * @short Returns a relative date string offset to the current time.
1801
- * @extra [fn] can be passed to provide for more granular control over the resulting string. [fn] is passed 4 arguments: the adjusted value, unit, offset in milliseconds, and a localization object. As an alternate syntax, [locale] can also be passed as the first (and only) parameter. For more information, see @date_format.
1817
+ * @extra [fn] can be passed to provide for more granular control over the resulting string. [fn] is passed 4 arguments: the adjusted value, unit, offset in milliseconds, and a localization object. As an alternate syntax, [locale] can also be passed as the first (and only) parameter. For more, see @date_format.
1802
1818
  * @example
1803
1819
  *
1804
1820
  * Date.create('90 seconds ago').relative() -> 1 minute ago
@@ -1821,7 +1837,7 @@
1821
1837
  * @method is(<d>, [margin] = 0)
1822
1838
  * @returns Boolean
1823
1839
  * @short Returns true if the date is <d>.
1824
- * @extra <d> will accept a date object, timestamp, or text format. %is% additionally understands more generalized expressions like month/weekday names, 'today', etc, and compares to the precision implied in <d>. [margin] allows an extra margin of error in milliseconds. For more information, see @date_format.
1840
+ * @extra <d> will accept a date object, timestamp, or text format. %is% additionally understands more generalized expressions like month/weekday names, 'today', etc, and compares to the precision implied in <d>. [margin] allows an extra margin of error in milliseconds. For more, see @date_format.
1825
1841
  * @example
1826
1842
  *
1827
1843
  * Date.create().is('July') -> true or false?
@@ -1961,7 +1977,7 @@
1961
1977
  * @method [unit]Before([d], [locale] = currentLocale)
1962
1978
  * @returns Date
1963
1979
  * @short Returns a date that is <n> units before [d], where <n> is the number.
1964
- * @extra [d] will accept a date object, timestamp, or text format. Note that "months" is ambiguous as a unit of time. If the target date falls on a day that does not exist (ie. August 31 -> February 31), the date will be shifted to the last day of the month. Be careful using %monthsBefore% if you need exact precision. See @date_format for more information.
1980
+ * @extra [d] will accept a date object, timestamp, or text format. Note that "months" is ambiguous as a unit of time. If the target date falls on a day that does not exist (ie. August 31 -> February 31), the date will be shifted to the last day of the month. Be careful using %monthsBefore% if you need exact precision. See @date_format for more.
1965
1981
  *
1966
1982
  * @set
1967
1983
  * millisecondBefore
@@ -2019,7 +2035,7 @@
2019
2035
  * @method [unit]After([d], [locale] = currentLocale)
2020
2036
  * @returns Date
2021
2037
  * @short Returns a date <n> units after [d], where <n> is the number.
2022
- * @extra [d] will accept a date object, timestamp, or text format. Note that "months" is ambiguous as a unit of time. If the target date falls on a day that does not exist (ie. August 31 -> February 31), the date will be shifted to the last day of the month. Be careful using %monthsAfter% if you need exact precision. See @date_format for more information.
2038
+ * @extra [d] will accept a date object, timestamp, or text format. Note that "months" is ambiguous as a unit of time. If the target date falls on a day that does not exist (ie. August 31 -> February 31), the date will be shifted to the last day of the month. Be careful using %monthsAfter% if you need exact precision. See @date_format for more.
2023
2039
  *
2024
2040
  * @set
2025
2041
  * millisecondAfter
@@ -2163,5 +2179,12 @@
2163
2179
  ]
2164
2180
  });
2165
2181
 
2166
- buildDate();
2182
+ buildDateUnits();
2183
+ buildDateMethods();
2184
+ buildCoreInputFormats();
2185
+ buildDateOutputShortcuts();
2186
+ buildAsianDigits();
2187
+ buildRelativeAliases();
2188
+ buildUTCAliases();
2189
+ setDateProperties();
2167
2190
 
@@ -1,16 +1,16 @@
1
- function Aa(a,b,c,d){var e=k;if(a===b)return k;else if(E(b)&&D(a))return q(b).test(a);else if(A(b)&&!A(a))return b.apply(c,d);else if(L(b)&&la(a)){H(b,function(f){Aa(a[f],b[f],c,[a[f],a])||(e=m)});return e}else return ta(a)&&ta(b)?sa(a)===sa(b):a===b}function T(a,b,c,d){return K(b)?a:A(b)?b.apply(c,d||[]):A(a[b])?a[b].call(a):a[b]}
2
- function U(a,b,c,d){var e,f;if(c<0)c=a.length+c;f=isNaN(c)?0:c;for(c=d===k?a.length+f:a.length;f<c;){e=f%a.length;if(e in a){if(b.call(a,a[e],e,a)===m)break}else return Ba(a,b,f,d);f++}}function Ba(a,b,c){var d=[],e;for(e in a)e in a&&e>>>0==e&&e!=4294967295&&e>=c&&d.push(parseInt(e));d.sort().each(function(f){return b.call(a,a[f],f,a)});return a}function Ca(a,b,c,d,e){var f,g;U(a,function(j,i,h){if(Aa(j,b,h,[j,i,h])){f=j;g=i;return m}},c,d);return e?g:f}
3
- function Ea(a,b){var c=[],d={},e;U(a,function(f,g){e=b?T(f,b,a,[f,g,a]):f;Fa(d,e)||c.push(f)});return c}function Ga(a,b,c){var d=[],e={};b.each(function(f){Fa(e,f)});a.each(function(f){var g=sa(f),j=!ta(f);if(Ha(e,g,f,j)!=c){var i=0;if(j)for(g=e[g];i<g.length;)if(g[i]===f)g.splice(i,1);else i+=1;else delete e[g];d.push(f)}});return d}function Ia(a,b,c){b=b||Infinity;c=c||0;var d=[];U(a,function(e){if(fa(e)&&c<b)d=d.concat(Ia(e,b,c+1));else d.push(e)});return d}
4
- function Ja(a){var b=[];G(a,function(c){b=b.concat(c)});return b}function Ha(a,b,c,d){var e=b in a;if(d){a[b]||(a[b]=[]);e=a[b].indexOf(c)!==-1}return e}function Fa(a,b){var c=sa(b),d=!ta(b),e=Ha(a,c,b,d);if(d)a[c].push(b);else a[c]=b;return e}function Ka(a,b,c,d){var e,f=[],g=c==="max",j=c==="min",i=Array.isArray(a);H(a,function(h){var n=a[h];h=T(n,b,a,i?[n,parseInt(h),a]:[]);if(h===e)f.push(n);else if(K(e)||g&&h>e||j&&h<e){f=[n];e=h}});i||(f=Ia(f,1));return d?f:f[0]}
5
- function La(a){if(p[Ma])a=a.toLowerCase();return a.replace(p[Na],"")}function Oa(a,b){var c=a.charAt(b);return(p[Pa]||{})[c]||c}function Qa(a){var b=p[Ra];return a?b.indexOf(a):l}var Ra="AlphanumericSortOrder",Na="AlphanumericSortIgnore",Ma="AlphanumericSortIgnoreCase",Pa="AlphanumericSortEquivalents";F(p,m,m,{create:function(){var a=[];G(arguments,function(b){if(la(b))a=a.concat(p.prototype.slice.call(b));else a.push(b)});return a}});
6
- F(p,k,m,{find:function(a,b,c){return Ca(this,a,b,c)},findAll:function(a,b,c){var d=[];U(this,function(e,f,g){Aa(e,a,g,[e,f,g])&&d.push(e)},b,c);return d},findIndex:function(a,b,c){a=Ca(this,a,b,c,k);return K(a)?-1:a},count:function(a){if(K(a))return this.length;return this.findAll(a).length},removeAt:function(a,b){if(K(a))return this;if(K(b))b=a;for(var c=0;c<=b-a;c++)this.splice(a,1);return this},include:function(a,b){return this.clone().add(a,b)},exclude:function(){return p.prototype.remove.apply(this.clone(),
7
- arguments)},clone:function(){return na([],this)},unique:function(a){return Ea(this,a)},flatten:function(a){return Ia(this,a)},union:function(){return Ea(this.concat(Ja(arguments)))},intersect:function(){return Ga(this,Ja(arguments),m)},subtract:function(){return Ga(this,Ja(arguments),k)},at:function(){return ua(this,arguments)},first:function(a){if(K(a))return this[0];if(a<0)a=0;return this.slice(0,a)},last:function(a){if(K(a))return this[this.length-1];return this.slice(this.length-a<0?0:this.length-
8
- a)},from:function(a){return this.slice(a)},to:function(a){if(K(a))a=this.length;return this.slice(0,a)},min:function(a,b){return Ka(this,a,"min",b)},max:function(a,b){return Ka(this,a,"max",b)},least:function(a,b){return Ka(this.groupBy.apply(this,[a]),"length","min",b)},most:function(a,b){return Ka(this.groupBy.apply(this,[a]),"length","max",b)},sum:function(a){a=a?this.map(a):this;return a.length>0?a.reduce(function(b,c){return b+c}):0},average:function(a){a=a?this.map(a):this;return a.length>0?
1
+ function Ba(a,b,c,d){var e=k;if(a===b)return k;else if(E(b)&&D(a))return q(b).test(a);else if(A(b)&&!A(a))return b.apply(c,d);else if(L(b)&&la(a)){H(b,function(f){Ba(a[f],b[f],c,[a[f],a])||(e=m)});return e}else return ua(a)&&ua(b)?ta(a)===ta(b):a===b}function S(a,b,c,d){return K(b)?a:A(b)?b.apply(c,d||[]):A(a[b])?a[b].call(a):a[b]}
2
+ function T(a,b,c,d){var e,f;if(c<0)c=a.length+c;f=isNaN(c)?0:c;for(c=d===k?a.length+f:a.length;f<c;){e=f%a.length;if(e in a){if(b.call(a,a[e],e,a)===m)break}else return Ca(a,b,f,d);f++}}function Ca(a,b,c){var d=[],e;for(e in a)e in a&&e>>>0==e&&e!=4294967295&&e>=c&&d.push(parseInt(e));d.sort().each(function(f){return b.call(a,a[f],f,a)});return a}function Ea(a,b,c,d,e){var f,g;T(a,function(j,i,h){if(Ba(j,b,h,[j,i,h])){f=j;g=i;return m}},c,d);return e?g:f}
3
+ function Fa(a,b){var c=[],d={},e;T(a,function(f,g){e=b?S(f,b,a,[f,g,a]):f;Ga(d,e)||c.push(f)});return c}function Ha(a,b,c){var d=[],e={};b.each(function(f){Ga(e,f)});a.each(function(f){var g=ta(f),j=!ua(f);if(Ia(e,g,f,j)!=c){var i=0;if(j)for(g=e[g];i<g.length;)if(g[i]===f)g.splice(i,1);else i+=1;else delete e[g];d.push(f)}});return d}function Ja(a,b,c){b=b||Infinity;c=c||0;var d=[];T(a,function(e){if(fa(e)&&c<b)d=d.concat(Ja(e,b,c+1));else d.push(e)});return d}
4
+ function Ka(a){var b=[];G(a,function(c){b=b.concat(c)});return b}function Ia(a,b,c,d){var e=b in a;if(d){a[b]||(a[b]=[]);e=a[b].indexOf(c)!==-1}return e}function Ga(a,b){var c=ta(b),d=!ua(b),e=Ia(a,c,b,d);if(d)a[c].push(b);else a[c]=b;return e}function La(a,b,c,d){var e,f=[],g=c==="max",j=c==="min",i=Array.isArray(a);H(a,function(h){var n=a[h];h=S(n,b,a,i?[n,parseInt(h),a]:[]);if(h===e)f.push(n);else if(K(e)||g&&h>e||j&&h<e){f=[n];e=h}});i||(f=Ja(f,1));return d?f:f[0]}
5
+ function Ma(a){if(p[Na])a=a.toLowerCase();return a.replace(p[Oa],"")}function Pa(a,b){var c=a.charAt(b);return(p[Qa]||{})[c]||c}function Ra(a){var b=p[Sa];return a?b.indexOf(a):l}var Sa="AlphanumericSortOrder",Oa="AlphanumericSortIgnore",Na="AlphanumericSortIgnoreCase",Qa="AlphanumericSortEquivalents";F(p,m,m,{create:function(){var a=[];G(arguments,function(b){if(la(b))a=a.concat(p.prototype.slice.call(b));else a.push(b)});return a}});
6
+ F(p,k,m,{find:function(a,b,c){return Ea(this,a,b,c)},findAll:function(a,b,c){var d=[];T(this,function(e,f,g){Ba(e,a,g,[e,f,g])&&d.push(e)},b,c);return d},findIndex:function(a,b,c){a=Ea(this,a,b,c,k);return K(a)?-1:a},count:function(a){if(K(a))return this.length;return this.findAll(a).length},removeAt:function(a,b){if(K(a))return this;if(K(b))b=a;for(var c=0;c<=b-a;c++)this.splice(a,1);return this},include:function(a,b){return this.clone().add(a,b)},exclude:function(){return p.prototype.remove.apply(this.clone(),
7
+ arguments)},clone:function(){return na([],this)},unique:function(a){return Fa(this,a)},flatten:function(a){return Ja(this,a)},union:function(){return Fa(this.concat(Ka(arguments)))},intersect:function(){return Ha(this,Ka(arguments),m)},subtract:function(){return Ha(this,Ka(arguments),k)},at:function(){return va(this,arguments)},first:function(a){if(K(a))return this[0];if(a<0)a=0;return this.slice(0,a)},last:function(a){if(K(a))return this[this.length-1];return this.slice(this.length-a<0?0:this.length-
8
+ a)},from:function(a){return this.slice(a)},to:function(a){if(K(a))a=this.length;return this.slice(0,a)},min:function(a,b){return La(this,a,"min",b)},max:function(a,b){return La(this,a,"max",b)},least:function(a,b){return La(this.groupBy.apply(this,[a]),"length","min",b)},most:function(a,b){return La(this.groupBy.apply(this,[a]),"length","max",b)},sum:function(a){a=a?this.map(a):this;return a.length>0?a.reduce(function(b,c){return b+c}):0},average:function(a){a=a?this.map(a):this;return a.length>0?
9
9
  a.sum()/a.length:0},inGroups:function(a,b){var c=arguments.length>1,d=this,e=[],f=O(this.length/a,void 0,"ceil");N(0,a-1,function(g){g=g*f;var j=d.slice(g,g+f);c&&j.length<f&&N(1,f-j.length,function(){j=j.add(b)});e.push(j)});return e},inGroupsOf:function(a,b){var c=[],d=this.length,e=this,f;if(d===0||a===0)return e;if(K(a))a=1;if(K(b))b=l;N(0,O(d/a,void 0,"ceil")-1,function(g){for(f=e.slice(a*g,a*g+a);f.length<a;)f.push(b);c.push(f)});return c},isEmpty:function(){return this.compact().length==0},
10
- sortBy:function(a,b){var c=this.clone();c.sort(function(d,e){var f,g;f=T(d,a,c,[d]);g=T(e,a,c,[e]);if(D(f)&&D(g)){f=f;g=g;var j,i,h,n,r=0,y=0;f=La(f);g=La(g);do{h=Oa(f,r);n=Oa(g,r);j=Qa(h);i=Qa(n);if(j===-1||i===-1){j=f.charCodeAt(r)||l;i=g.charCodeAt(r)||l}h=h!==f.charAt(r);n=n!==g.charAt(r);if(h!==n&&y===0)y=h-n;r+=1}while(j!=l&&i!=l&&j===i);f=j===i?y:j<i?-1:1}else f=f<g?-1:f>g?1:0;return f*(b?-1:1)});return c},randomize:function(){for(var a=this.concat(),b,c,d=a.length;d;b=parseInt(v.random()*
11
- d),c=a[--d],a[d]=a[b],a[b]=c);return a},zip:function(){var a=G(arguments);return this.map(function(b,c){return[b].concat(a.map(function(d){return c in d?d[c]:l}))})},sample:function(a){var b=[],c=this.clone(),d;if(K(a))a=1;for(;b.length<a;){d=P(v.random()*(c.length-1));b.push(c[d]);c.removeAt(d);if(c.length==0)break}return arguments.length>0?b:b[0]},each:function(a,b,c){U(this,a,b,c);return this},add:function(a,b){if(!B(u(b))||isNaN(b))b=this.length;p.prototype.splice.apply(this,[b,0].concat(a));
12
- return this},remove:function(){var a,b=this;G(arguments,function(c){for(a=0;a<b.length;)if(Aa(b[a],c,b,[b[a],a,b]))b.splice(a,1);else a++});return b},compact:function(a){var b=[];U(this,function(c){if(fa(c))b.push(c.compact());else if(a&&c)b.push(c);else!a&&c!=l&&c.valueOf()===c.valueOf()&&b.push(c)});return b},groupBy:function(a,b){var c=this,d={},e;U(c,function(f,g){e=T(f,a,c,[f,g,c]);d[e]||(d[e]=[]);d[e].push(f)});b&&H(d,b);return d},none:function(){return!this.any.apply(this,arguments)}});
13
- F(p,k,m,{all:p.prototype.every,any:p.prototype.some,insert:p.prototype.add});function Sa(a){if(a&&a.valueOf)a=a.valueOf();return o.keys(a)}function Ta(a,b){I(o,m,m,a,function(c,d){c[d]=function(e,f,g){g=p.prototype[d].call(Sa(e),function(j){return b?T(e[j],f,e,[j,e[j],e]):Aa(e[j],f,e,[j,e[j],e])},g);if(fa(g))g=g.reduce(function(j,i){j[i]=e[i];return j},{});return g}});va(a,M)}
14
- F(o,m,m,{map:function(a,b){return Sa(a).reduce(function(c,d){c[d]=T(a[d],b,a,[d,a[d],a]);return c},{})},reduce:function(a){var b=Sa(a).map(function(c){return a[c]});return b.reduce.apply(b,G(arguments).slice(1))},size:function(a){return Sa(a).length}});(function(){I(p,k,function(){var a=arguments;return a.length>0&&!A(a[0])},"map,every,all,some,any,none,filter",function(a,b){a[b]=function(c){return this[b](function(d,e){return b==="map"?T(d,c,this,[d,e,this]):Aa(d,c,this,[d,e,this])})}})})();
15
- (function(){p[Ra]="A\u00c1\u00c0\u00c2\u00c3\u0104BC\u0106\u010c\u00c7D\u010e\u00d0E\u00c9\u00c8\u011a\u00ca\u00cb\u0118FG\u011eH\u0131I\u00cd\u00cc\u0130\u00ce\u00cfJKL\u0141MN\u0143\u0147\u00d1O\u00d3\u00d2\u00d4PQR\u0158S\u015a\u0160\u015eT\u0164U\u00da\u00d9\u016e\u00db\u00dcVWXY\u00ddZ\u0179\u017b\u017d\u00de\u00c6\u0152\u00d8\u00d5\u00c5\u00c4\u00d6".split("").map(function(b){return b+b.toLowerCase()}).join("");var a={};U("A\u00c1\u00c0\u00c2\u00c3\u00c4,C\u00c7,E\u00c9\u00c8\u00ca\u00cb,I\u00cd\u00cc\u0130\u00ce\u00cf,O\u00d3\u00d2\u00d4\u00d5\u00d6,S\u00df,U\u00da\u00d9\u00db\u00dc".split(","),
16
- function(b){var c=b.charAt(0);U(b.slice(1).split(""),function(d){a[d]=c;a[d.toLowerCase()]=c.toLowerCase()})});p[Ma]=k;p[Pa]=a})();Ta("each,any,all,none,count,find,findAll,isEmpty");Ta("sum,average,min,max,least,most",k);va("map,reduce,size",M);
10
+ sortBy:function(a,b){var c=this.clone();c.sort(function(d,e){var f,g;f=S(d,a,c,[d]);g=S(e,a,c,[e]);if(D(f)&&D(g)){f=f;g=g;var j,i,h,n,r=0,y=0;f=Ma(f);g=Ma(g);do{h=Pa(f,r);n=Pa(g,r);j=Ra(h);i=Ra(n);if(j===-1||i===-1){j=f.charCodeAt(r)||l;i=g.charCodeAt(r)||l}h=h!==f.charAt(r);n=n!==g.charAt(r);if(h!==n&&y===0)y=h-n;r+=1}while(j!=l&&i!=l&&j===i);f=j===i?y:j<i?-1:1}else f=f<g?-1:f>g?1:0;return f*(b?-1:1)});return c},randomize:function(){for(var a=this.concat(),b,c,d=a.length;d;b=parseInt(v.random()*
11
+ d),c=a[--d],a[d]=a[b],a[b]=c);return a},zip:function(){var a=G(arguments);return this.map(function(b,c){return[b].concat(a.map(function(d){return c in d?d[c]:l}))})},sample:function(a){var b=[],c=this.clone(),d;if(K(a))a=1;for(;b.length<a;){d=oa(v.random()*(c.length-1));b.push(c[d]);c.removeAt(d);if(c.length==0)break}return arguments.length>0?b:b[0]},each:function(a,b,c){T(this,a,b,c);return this},add:function(a,b){if(!B(u(b))||isNaN(b))b=this.length;p.prototype.splice.apply(this,[b,0].concat(a));
12
+ return this},remove:function(){var a,b=this;G(arguments,function(c){for(a=0;a<b.length;)if(Ba(b[a],c,b,[b[a],a,b]))b.splice(a,1);else a++});return b},compact:function(a){var b=[];T(this,function(c){if(fa(c))b.push(c.compact());else if(a&&c)b.push(c);else!a&&c!=l&&c.valueOf()===c.valueOf()&&b.push(c)});return b},groupBy:function(a,b){var c=this,d={},e;T(c,function(f,g){e=S(f,a,c,[f,g,c]);d[e]||(d[e]=[]);d[e].push(f)});b&&H(d,b);return d},none:function(){return!this.any.apply(this,arguments)}});
13
+ F(p,k,m,{all:p.prototype.every,any:p.prototype.some,insert:p.prototype.add});function Ta(a){if(a&&a.valueOf)a=a.valueOf();return o.keys(a)}function Ua(a,b){I(o,m,m,a,function(c,d){c[d]=function(e,f,g){g=p.prototype[d].call(Ta(e),function(j){return b?S(e[j],f,e,[j,e[j],e]):Ba(e[j],f,e,[j,e[j],e])},g);if(fa(g))g=g.reduce(function(j,i){j[i]=e[i];return j},{});return g}});wa(a,M)}
14
+ F(o,m,m,{map:function(a,b){return Ta(a).reduce(function(c,d){c[d]=S(a[d],b,a,[d,a[d],a]);return c},{})},reduce:function(a){var b=Ta(a).map(function(c){return a[c]});return b.reduce.apply(b,G(arguments).slice(1))},size:function(a){return Ta(a).length}});(function(){I(p,k,function(){var a=arguments;return a.length>0&&!A(a[0])},"map,every,all,some,any,none,filter",function(a,b){a[b]=function(c){return this[b](function(d,e){return b==="map"?S(d,c,this,[d,e,this]):Ba(d,c,this,[d,e,this])})}})})();
15
+ (function(){p[Sa]="A\u00c1\u00c0\u00c2\u00c3\u0104BC\u0106\u010c\u00c7D\u010e\u00d0E\u00c9\u00c8\u011a\u00ca\u00cb\u0118FG\u011eH\u0131I\u00cd\u00cc\u0130\u00ce\u00cfJKL\u0141MN\u0143\u0147\u00d1O\u00d3\u00d2\u00d4PQR\u0158S\u015a\u0160\u015eT\u0164U\u00da\u00d9\u016e\u00db\u00dcVWXY\u00ddZ\u0179\u017b\u017d\u00de\u00c6\u0152\u00d8\u00d5\u00c5\u00c4\u00d6".split("").map(function(b){return b+b.toLowerCase()}).join("");var a={};T("A\u00c1\u00c0\u00c2\u00c3\u00c4,C\u00c7,E\u00c9\u00c8\u00ca\u00cb,I\u00cd\u00cc\u0130\u00ce\u00cf,O\u00d3\u00d2\u00d4\u00d5\u00d6,S\u00df,U\u00da\u00d9\u00db\u00dc".split(","),
16
+ function(b){var c=b.charAt(0);T(b.slice(1).split(""),function(d){a[d]=c;a[d.toLowerCase()]=c.toLowerCase()})});p[Na]=k;p[Qa]=a})();Ua("each,any,all,none,count,find,findAll,isEmpty");Ua("sum,average,min,max,least,most",k);wa("map,reduce,size",M);
@@ -1,9 +1,9 @@
1
- var k=true,l=null,m=false;function aa(a){return function(){return a}}var o=Object,p=Array,q=RegExp,s=Date,t=String,u=Number,v=Math,ba=typeof global!=="undefined"?global:this,ea=o.defineProperty&&o.defineProperties,w="Array,Boolean,Date,Function,Number,String,RegExp".split(","),fa=x(w[0]),ga=x(w[1]),ha=x(w[2]),A=x(w[3]),B=x(w[4]),D=x(w[5]),E=x(w[6]);function x(a){return function(b){return o.prototype.toString.call(b)==="[object "+a+"]"}}
1
+ var k=true,l=null,m=false;function aa(a){return function(){return a}}var o=Object,p=Array,q=RegExp,s=Date,t=String,u=Number,v=Math,ba=typeof global!=="undefined"?global:this,ca=o.defineProperty&&o.defineProperties,w="Array,Boolean,Date,Function,Number,String,RegExp".split(","),fa=x(w[0]),ga=x(w[1]),ha=x(w[2]),A=x(w[3]),B=x(w[4]),D=x(w[5]),E=x(w[6]);function x(a){return function(b){return o.prototype.toString.call(b)==="[object "+a+"]"}}
2
2
  function ia(a){if(!a.SugarMethods){ja(a,"SugarMethods",{});F(a,m,m,{restore:function(){var b=arguments.length===0,c=G(arguments);H(a.SugarMethods,function(d,e){if(b||c.indexOf(d)>-1)ja(e.va?a.prototype:a,d,e.method)})},extend:function(b,c,d){F(a,d!==m,c,b)}})}}function F(a,b,c,d){var e=b?a.prototype:a,f;ia(a);H(d,function(g,j){f=e[g];if(typeof c==="function")j=ka(e[g],j,c);if(c!==m||!e[g])ja(e,g,j);a.SugarMethods[g]={va:b,method:j,Da:f}})}
3
- function I(a,b,c,d,e){var f={};d=D(d)?d.split(","):d;d.forEach(function(g,j){e(f,g,j)});F(a,b,c,f)}function ka(a,b,c){return function(){return a&&(c===k||!c.apply(this,arguments))?a.apply(this,arguments):b.apply(this,arguments)}}function ja(a,b,c){if(ea)o.defineProperty(a,b,{value:c,configurable:k,enumerable:m,writable:k});else a[b]=c}function G(a,b){var c=[],d;for(d=0;d<a.length;d++){c.push(a[d]);b&&b.call(a,a[d],d)}return c}function J(a){return a!==void 0}function K(a){return a===void 0}
3
+ function I(a,b,c,d,e){var f={};d=D(d)?d.split(","):d;d.forEach(function(g,j){e(f,g,j)});F(a,b,c,f)}function ka(a,b,c){return function(){return a&&(c===k||!c.apply(this,arguments))?a.apply(this,arguments):b.apply(this,arguments)}}function ja(a,b,c){if(ca)o.defineProperty(a,b,{value:c,configurable:k,enumerable:m,writable:k});else a[b]=c}function G(a,b){var c=[],d;for(d=0;d<a.length;d++){c.push(a[d]);b&&b.call(a,a[d],d)}return c}function J(a){return a!==void 0}function K(a){return a===void 0}
4
4
  function la(a){return a&&typeof a==="object"}function L(a){return!!a&&o.prototype.toString.call(a)==="[object Object]"&&"hasOwnProperty"in a}function ma(a,b){return o.hasOwnProperty.call(a,b)}function H(a,b){for(var c in a)if(ma(a,c))if(b.call(a,c,a[c])===m)break}function na(a,b){H(b,function(c){a[c]=b[c]});return a}function M(a){na(this,a)}M.prototype.constructor=o;function N(a,b,c,d){var e=[];a=parseInt(a);for(var f=d<0;!f&&a<=b||f&&a>=b;){e.push(a);c&&c.call(this,a);a+=d||1}return e}
5
- function O(a,b,c){c=v[c||"round"];var d=v.pow(10,v.abs(b||0));if(b<0)d=1/d;return c(a*d)/d}function P(a,b){return O(a,b,"floor")}function R(a,b,c,d){d=v.abs(a).toString(d||10);d=oa(b-d.replace(/\.\d+/,"").length,"0")+d;if(c||a<0)d=(a<0?"-":"+")+d;return d}function pa(a){if(a>=11&&a<=13)return"th";else switch(a%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}
6
- function qa(){return"\t\n\u000b\u000c\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u2028\u2029\u3000\ufeff"}function oa(a,b){return p(v.max(0,J(a)?a:1)+1).join(b||"")}function ra(a,b){var c=a.toString().match(/[^/]*$/)[0];if(b)c=(c+b).split("").sort().join("").replace(/([gimy])\1+/g,"$1");return c}function S(a){D(a)||(a=t(a));return a.replace(/([\\/'*+?|()\[\]{}.^$])/g,"\\$1")}
7
- function sa(a,b){var c=typeof a,d,e,f,g,j,i;if(c==="string")return a;f=o.prototype.toString.call(a);d=L(a);e=f==="[object Array]";if(a!=l&&d||e){b||(b=[]);if(b.length>1)for(i=b.length;i--;)if(b[i]===a)return"CYC";b.push(a);d=t(a.constructor);g=e?a:o.keys(a).sort();for(i=0;i<g.length;i++){j=e?i:g[i];d+=j+sa(a[j],b)}b.pop()}else d=1/a===-Infinity?"-0":t(a&&a.valueOf?a.valueOf():a);return c+f+d}
8
- function ta(a){var b=o.prototype.toString.call(a);return b==="[object Date]"||b==="[object Array]"||b==="[object String]"||b==="[object Number]"||b==="[object RegExp]"||b==="[object Boolean]"||b==="[object Arguments]"||L(a)}function ua(a,b,c){var d=[],e=a.length,f=b[b.length-1]!==m,g;G(b,function(j){if(ga(j))return m;if(f){j%=e;if(j<0)j=e+j}g=c?a.charAt(j)||"":a[j];d.push(g)});return d.length<2?d[0]:d}
9
- function va(a,b){I(b,k,m,a,function(c,d){c[d+(d==="equal"?"s":"")]=function(){return o[d].apply(l,[this].concat(G(arguments)))}})}ia(o);H(w,function(a,b){ia(ba[b])});
5
+ function O(a,b,c){c=v[c||"round"];var d=v.pow(10,v.abs(b||0));if(b<0)d=1/d;return c(a*d)/d}function oa(a,b){return O(a,b,"floor")}function P(a,b,c,d){d=v.abs(a).toString(d||10);d=pa(b-d.replace(/\.\d+/,"").length,"0")+d;if(c||a<0)d=(a<0?"-":"+")+d;return d}function qa(a){if(a>=11&&a<=13)return"th";else switch(a%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}
6
+ function ra(){return"\t\n\u000b\u000c\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u2028\u2029\u3000\ufeff"}function pa(a,b){return p(v.max(0,J(a)?a:1)+1).join(b||"")}function sa(a,b){var c=a.toString().match(/[^/]*$/)[0];if(b)c=(c+b).split("").sort().join("").replace(/([gimy])\1+/g,"$1");return c}function R(a){D(a)||(a=t(a));return a.replace(/([\\/'*+?|()\[\]{}.^$])/g,"\\$1")}
7
+ function ta(a,b){var c=typeof a,d,e,f,g,j,i;if(c==="string")return a;f=o.prototype.toString.call(a);d=L(a);e=f==="[object Array]";if(a!=l&&d||e){b||(b=[]);if(b.length>1)for(i=b.length;i--;)if(b[i]===a)return"CYC";b.push(a);d=t(a.constructor);g=e?a:o.keys(a).sort();for(i=0;i<g.length;i++){j=e?i:g[i];d+=j+ta(a[j],b)}b.pop()}else d=1/a===-Infinity?"-0":t(a&&a.valueOf?a.valueOf():a);return c+f+d}
8
+ function ua(a){var b=o.prototype.toString.call(a);return b==="[object Date]"||b==="[object Array]"||b==="[object String]"||b==="[object Number]"||b==="[object RegExp]"||b==="[object Boolean]"||b==="[object Arguments]"||L(a)}function va(a,b,c){var d=[],e=a.length,f=b[b.length-1]!==m,g;G(b,function(j){if(ga(j))return m;if(f){j%=e;if(j<0)j=e+j}g=c?a.charAt(j)||"":a[j];d.push(g)});return d.length<2?d[0]:d}
9
+ function wa(a,b){I(b,k,m,a,function(c,d){c[d+(d==="equal"?"s":"")]=function(){return o[d].apply(l,[this].concat(G(arguments)))}})}ia(o);H(w,function(a,b){ia(ba[b])});
@@ -1,42 +1,43 @@
1
- var V,Ua,Va=["ampm","hour","minute","second","ampm","utc","offset_sign","offset_hours","offset_minutes","ampm"],Wa="({t})?\\s*(\\d{1,2}(?:[,.]\\d+)?)(?:{h}(\\d{1,2}(?:[,.]\\d+)?)?{m}(?::?(\\d{1,2}(?:[,.]\\d+)?){s})?\\s*(?:({t})|(Z)|(?:([+-])(\\d{2,2})(?::?(\\d{2,2}))?)?)?|\\s*({t}))",Xa={},Ya,Za,$a,ab=[],bb=[{ba:"f{1,4}|ms|milliseconds",format:function(a){return W(a,"Milliseconds")}},{ba:"ss?|seconds",format:function(a){return W(a,"Seconds")}},{ba:"mm?|minutes",format:function(a){return W(a,"Minutes")}},
2
- {ba:"hh?|hours|12hr",format:function(a){a=W(a,"Hours");return a===0?12:a-P(a/13)*12}},{ba:"HH?|24hr",format:function(a){return W(a,"Hours")}},{ba:"dd?|date|day",format:function(a){return W(a,"Date")}},{ba:"dow|weekday",la:k,format:function(a,b,c){a=W(a,"Day");return b.weekdays[a+(c-1)*7]}},{ba:"MM?",format:function(a){return W(a,"Month")+1}},{ba:"mon|month",la:k,format:function(a,b,c){a=W(a,"Month");return b.months[a+(c-1)*12]}},{ba:"y{2,4}|year",format:function(a){return W(a,"FullYear")}},{ba:"[Tt]{1,2}",
3
- format:function(a,b,c,d){a=W(a,"Hours");b=b.ampm[P(a/12)];if(d.length===1)b=b.slice(0,1);if(d.slice(0,1)==="T")b=b.toUpperCase();return b}},{ba:"z{1,4}|tz|timezone",text:k,format:function(a,b,c,d){a=a.getUTCOffset();if(d=="z"||d=="zz")a=a.replace(/(\d{2})(\d{2})/,function(e,f){return R(f,d.length)});return a}},{ba:"iso(tz|timezone)",format:function(a){return a.getUTCOffset(k)}},{ba:"ord",format:function(a){a=W(a,"Date");return a+pa(a)}}],cb=[{$:"year",method:"FullYear",ja:k,da:function(a){return(365+
4
- (a?a.isLeapYear()?1:0:0.25))*24*60*60*1E3}},{$:"month",method:"Month",ja:k,da:function(a,b){var c=30.4375,d;if(a){d=a.daysInMonth();if(b<=d.days())c=d}return c*24*60*60*1E3}},{$:"week",method:"Week",da:aa(6048E5)},{$:"day",method:"Date",ja:k,da:aa(864E5)},{$:"hour",method:"Hours",da:aa(36E5)},{$:"minute",method:"Minutes",da:aa(6E4)},{$:"second",method:"Seconds",da:aa(1E3)},{$:"millisecond",method:"Milliseconds",da:aa(1)}],db={};function eb(a){na(this,a);this.ga=ab.concat()}
5
- eb.prototype={getMonth:function(a){return B(a)?a-1:this.months.indexOf(a)%12},getWeekday:function(a){return this.weekdays.indexOf(a)%7},oa:function(a){var b;return B(a)?a:a&&(b=this.numbers.indexOf(a))!==-1?(b+1)%10:1},ta:function(a){var b=this;return a.replace(q(this.num,"g"),function(c){return b.oa(c)||""})},ra:function(a){return V.units[this.units.indexOf(a)%8]},Aa:function(a){return this.na(a,a[2]>0?"future":"past")},qa:function(a){return this.na(fb(a),"duration")},ua:function(a){a=a||this.code;
6
- return a==="en"||a==="en-US"?k:this.variant},xa:function(a){return a===this.ampm[0]},ya:function(a){return a===this.ampm[1]},na:function(a,b){var c=a[0],d=a[1],e=a[2],f,g,j;if(this.code=="ru"){j=c.toString().slice(-1);switch(k){case j==1:j=1;break;case j>=2&&j<=4:j=2;break;default:j=3}}else j=this.plural&&c>1?1:0;g=this.units[j*8+d]||this.units[d];if(this.capitalizeUnit)g=gb(g);f=this.modifiers.filter(function(i){return i.name=="sign"&&i.value==(e>0?1:-1)})[0];return this[b].replace(/\{(.*?)\}/g,
7
- function(i,h){switch(h){case "num":return c;case "unit":return g;case "sign":return f.src}})},sa:function(){return this.ma?[this.ma].concat(this.ga):this.ga},addFormat:function(a,b,c,d,e){var f=c||[],g=this,j;a=a.replace(/\s+/g,"[-,. ]*");a=a.replace(/\{([^,]+?)\}/g,function(i,h){var n=h.match(/\?$/),r=h.match(/(\d)(?:-(\d))?/),y=h.match(/^\d+$/),z=h.replace(/[^a-z]+$/,""),C,ca;if(y)C=g.optionals[y[0]];else if(g[z])C=g[z];else if(g[z+"s"]){C=g[z+"s"];if(r){ca=[];C.forEach(function(da,Da){var Q=Da%
8
- (g.units?8:C.length);if(Q>=r[1]&&Q<=(r[2]||r[1]))ca.push(da)});C=ca}C=hb(C)}if(y)return"(?:"+C+")?";else{c||f.push(z);return"("+C+")"+(n?"?":"")}});if(b){b=ib(Wa,g,e);e=["t","[\\s\\u3000]"].concat(g.timeMarker);j=a.match(/\\d\{\d,\d\}\)+\??$/);jb(g,"(?:"+b+")[,\\s\\u3000]+?"+a,Va.concat(f),d);jb(g,a+"(?:[,\\s]*(?:"+e.join("|")+(j?"+":"*")+")"+b+")?",f.concat(Va),d)}else jb(g,a,f,d)}};
9
- function kb(a,b){var c;D(a)||(a="");c=db[a]||db[a.slice(0,2)];if(b===m&&!c)throw Error("Invalid locale.");return c||Ua}
10
- function lb(a,b){function c(i){var h=g[i];if(D(h))g[i]=h.split(",");else h||(g[i]=[])}function d(i,h){i=i.split("+").map(function(n){return n.replace(/(.+):(.+)$/,function(r,y,z){return z.split("|").map(function(C){return y+C}).join("|")})}).join("|");return i.split("|").forEach(h)}function e(i,h,n){var r=[];g[i].forEach(function(y,z){if(h)y+="+"+y.slice(0,3);d(y,function(C,ca){r[ca*n+z]=C.toLowerCase()})});g[i]=r}function f(i,h,n){i="\\d{"+i+","+h+"}";if(n)i+="|(?:"+hb(g.numbers)+")+";return i}var g,
11
- j;g=new eb(b);c("modifiers");"months,weekdays,units,numbers,articles,optionals,timeMarker,ampm,timeSuffixes,dateParse,timeParse".split(",").forEach(c);j=!g.monthSuffix;e("months",j,12);e("weekdays",j,7);e("units",m,8);e("numbers",m,10);g.code=a;g.date=f(1,2,g.digitDate);g.year=f(4,4);g.num=function(){var i=["\\d+"].concat(g.articles);if(g.numbers)i=i.concat(g.numbers);return hb(i)}();(function(){var i=[];g.ha={};g.modifiers.forEach(function(h){var n=h.name;d(h.src,function(r){var y=g[n];g.ha[r]=h;
12
- i.push({name:n,src:r,value:h.value});g[n]=y?y+"|"+r:r})});g.day+="|"+hb(g.weekdays);g.modifiers=i})();if(g.monthSuffix){g.month=f(1,2);g.months=N(1,12).map(function(i){return i+g.monthSuffix})}g.full_month=f(1,2)+"|"+hb(g.months);g.timeSuffixes.length>0&&g.addFormat(ib(Wa,g),m,Va);g.addFormat("{day}",k);g.addFormat("{month}"+(g.monthSuffix||""));g.addFormat("{year}"+(g.yearSuffix||""));g.timeParse.forEach(function(i){g.addFormat(i,k)});g.dateParse.forEach(function(i){g.addFormat(i)});return db[a]=
13
- g}function jb(a,b,c,d){a.ga.unshift({Ba:d,wa:a,za:q("^"+b+"$","i"),to:c})}function gb(a){return a.slice(0,1).toUpperCase()+a.slice(1)}function hb(a){return a.filter(function(b){return!!b}).join("|")}function mb(a,b){var c;if(L(a[0]))return a;else if(B(a[0])&&!B(a[1]))return[a[0]];else if(D(a[0])&&b)return[nb(a[0]),a[1]];c={};Za.forEach(function(d,e){c[d.$]=a[e]});return[c]}
14
- function nb(a,b){var c={};if(match=a.match(/^(\d+)?\s?(\w+?)s?$/i)){if(K(b))b=parseInt(match[1])||1;c[match[2].toLowerCase()]=b}return c}function ob(a,b){var c={},d,e;b.forEach(function(f,g){d=a[g+1];if(!(K(d)||d==="")){if(f==="year")c.Ca=d;e=parseFloat(d.replace(/,/,"."));c[f]=!isNaN(e)?e:d.toLowerCase()}});return c}function pb(a){a=a.trim().replace(/^(just )?now|\.+$/i,"");return qb(a)}
15
- function qb(a){return a.replace(Ya,function(b,c,d){var e=0,f=1,g,j;if(c)return b;d.split("").reverse().forEach(function(i){i=Xa[i];var h=i>9;if(h){if(g)e+=f;f*=i/(j||1);j=i}else{if(g===m)f*=10;e+=f*i}g=h});if(g)e+=f;return e})}
16
- function rb(a,b,c,d){var e=new s,f=m,g,j,i,h,n,r,y,z,C;e.utc(d);if(ha(a))e=a.clone();else if(B(a))e=new s(a);else if(L(a)){e.set(a,k);h=a}else if(D(a)){g=kb(b);a=pb(a);g&&H(g.sa(),function(ca,da){var Da=a.match(da.za);if(Da){i=da;j=i.wa;h=ob(Da,i.to,j);h.utc&&e.utc();j.ma=i;if(h.timestamp){h=h.timestamp;return m}if(i.Ba&&!D(h.month)&&(D(h.date)||g.ua(b))){z=h.month;h.month=h.date;h.date=z}if(h.year&&h.Ca.length===2)h.year=O(W(new s,"FullYear")/100)*100-O(h.year/100)*100+h.year;if(h.month){h.month=
1
+ var U,Va,Wa=["ampm","hour","minute","second","ampm","utc","offset_sign","offset_hours","offset_minutes","ampm"],Xa="({t})?\\s*(\\d{1,2}(?:[,.]\\d+)?)(?:{h}(\\d{1,2}(?:[,.]\\d+)?)?{m}(?::?(\\d{1,2}(?:[,.]\\d+)?){s})?\\s*(?:({t})|(Z)|(?:([+-])(\\d{2,2})(?::?(\\d{2,2}))?)?)?|\\s*({t}))",Ya={},Za,$a,ab,bb=[],cb=[{ba:"f{1,4}|ms|milliseconds",format:function(a){return V(a,"Milliseconds")}},{ba:"ss?|seconds",format:function(a){return V(a,"Seconds")}},{ba:"mm?|minutes",format:function(a){return V(a,"Minutes")}},
2
+ {ba:"hh?|hours|12hr",format:function(a){a=V(a,"Hours");return a===0?12:a-oa(a/13)*12}},{ba:"HH?|24hr",format:function(a){return V(a,"Hours")}},{ba:"dd?|date|day",format:function(a){return V(a,"Date")}},{ba:"dow|weekday",la:k,format:function(a,b,c){a=V(a,"Day");return b.weekdays[a+(c-1)*7]}},{ba:"MM?",format:function(a){return V(a,"Month")+1}},{ba:"mon|month",la:k,format:function(a,b,c){a=V(a,"Month");return b.months[a+(c-1)*12]}},{ba:"y{2,4}|year",format:function(a){return V(a,"FullYear")}},{ba:"[Tt]{1,2}",
3
+ format:function(a,b,c,d){a=V(a,"Hours");b=b.ampm[oa(a/12)];if(d.length===1)b=b.slice(0,1);if(d.slice(0,1)==="T")b=b.toUpperCase();return b}},{ba:"z{1,4}|tz|timezone",text:k,format:function(a,b,c,d){a=a.getUTCOffset();if(d=="z"||d=="zz")a=a.replace(/(\d{2})(\d{2})/,function(e,f){return P(f,d.length)});return a}},{ba:"iso(tz|timezone)",format:function(a){return a.getUTCOffset(k)}},{ba:"ord",format:function(a){a=V(a,"Date");return a+qa(a)}}],db=[{$:"year",method:"FullYear",ja:k,da:function(a){return(365+
4
+ (a?a.isLeapYear()?1:0:0.25))*24*60*60*1E3}},{$:"month",method:"Month",ja:k,da:function(a,b){var c=30.4375,d;if(a){d=a.daysInMonth();if(b<=d.days())c=d}return c*24*60*60*1E3}},{$:"week",method:"Week",da:aa(6048E5)},{$:"day",method:"Date",ja:k,da:aa(864E5)},{$:"hour",method:"Hours",da:aa(36E5)},{$:"minute",method:"Minutes",da:aa(6E4)},{$:"second",method:"Seconds",da:aa(1E3)},{$:"millisecond",method:"Milliseconds",da:aa(1)}],eb={};function fb(a){na(this,a);this.ga=bb.concat()}
5
+ fb.prototype={getMonth:function(a){return B(a)?a-1:this.months.indexOf(a)%12},getWeekday:function(a){return this.weekdays.indexOf(a)%7},oa:function(a){var b;return B(a)?a:a&&(b=this.numbers.indexOf(a))!==-1?(b+1)%10:1},ta:function(a){var b=this;return a.replace(q(this.num,"g"),function(c){return b.oa(c)||""})},ra:function(a){return U.units[this.units.indexOf(a)%8]},Aa:function(a){return this.na(a,a[2]>0?"future":"past")},qa:function(a){return this.na(gb(a),"duration")},ua:function(a){a=a||this.code;
6
+ return a==="en"||a==="en-US"?k:this.variant},xa:function(a){return a===this.ampm[0]},ya:function(a){return a===this.ampm[1]},na:function(a,b){var c=a[0],d=a[1],e=a[2],f,g,j;if(this.code=="ru"){j=c.toString().slice(-1);switch(k){case j==1:j=1;break;case j>=2&&j<=4:j=2;break;default:j=3}}else j=this.plural&&c>1?1:0;g=this.units[j*8+d]||this.units[d];if(this.capitalizeUnit)g=hb(g);f=this.modifiers.filter(function(i){return i.name=="sign"&&i.value==(e>0?1:-1)})[0];return this[b].replace(/\{(.*?)\}/g,
7
+ function(i,h){switch(h){case "num":return c;case "unit":return g;case "sign":return f.src}})},sa:function(){return this.ma?[this.ma].concat(this.ga):this.ga},addFormat:function(a,b,c,d,e){var f=c||[],g=this,j;a=a.replace(/\s+/g,"[-,. ]*");a=a.replace(/\{([^,]+?)\}/g,function(i,h){var n=h.match(/\?$/),r=h.match(/(\d)(?:-(\d))?/),y=h.match(/^\d+$/),z=h.replace(/[^a-z]+$/,""),C,da;if(y)C=g.optionals[y[0]];else if(g[z])C=g[z];else if(g[z+"s"]){C=g[z+"s"];if(r){da=[];C.forEach(function(ea,Da){var Q=Da%
8
+ (g.units?8:C.length);if(Q>=r[1]&&Q<=(r[2]||r[1]))da.push(ea)});C=da}C=ib(C)}if(y)return"(?:"+C+")?";else{c||f.push(z);return"("+C+")"+(n?"?":"")}});if(b){b=jb(Xa,g,e);e=["t","[\\s\\u3000]"].concat(g.timeMarker);j=a.match(/\\d\{\d,\d\}\)+\??$/);kb(g,"(?:"+b+")[,\\s\\u3000]+?"+a,Wa.concat(f),d);kb(g,a+"(?:[,\\s]*(?:"+e.join("|")+(j?"+":"*")+")"+b+")?",f.concat(Wa),d)}else kb(g,a,f,d)}};
9
+ function lb(a,b){var c;D(a)||(a="");c=eb[a]||eb[a.slice(0,2)];if(b===m&&!c)throw Error("Invalid locale.");return c||Va}
10
+ function mb(a,b){function c(i){var h=g[i];if(D(h))g[i]=h.split(",");else h||(g[i]=[])}function d(i,h){i=i.split("+").map(function(n){return n.replace(/(.+):(.+)$/,function(r,y,z){return z.split("|").map(function(C){return y+C}).join("|")})}).join("|");return i.split("|").forEach(h)}function e(i,h,n){var r=[];g[i].forEach(function(y,z){if(h)y+="+"+y.slice(0,3);d(y,function(C,da){r[da*n+z]=C.toLowerCase()})});g[i]=r}function f(i,h,n){i="\\d{"+i+","+h+"}";if(n)i+="|(?:"+ib(g.numbers)+")+";return i}var g,
11
+ j;g=new fb(b);c("modifiers");"months,weekdays,units,numbers,articles,optionals,timeMarker,ampm,timeSuffixes,dateParse,timeParse".split(",").forEach(c);j=!g.monthSuffix;e("months",j,12);e("weekdays",j,7);e("units",m,8);e("numbers",m,10);g.code=a;g.date=f(1,2,g.digitDate);g.year=f(4,4);g.num=function(){var i=["\\d+"].concat(g.articles);if(g.numbers)i=i.concat(g.numbers);return ib(i)}();(function(){var i=[];g.ha={};g.modifiers.forEach(function(h){var n=h.name;d(h.src,function(r){var y=g[n];g.ha[r]=h;
12
+ i.push({name:n,src:r,value:h.value});g[n]=y?y+"|"+r:r})});g.day+="|"+ib(g.weekdays);g.modifiers=i})();if(g.monthSuffix){g.month=f(1,2);g.months=N(1,12).map(function(i){return i+g.monthSuffix})}g.full_month=f(1,2)+"|"+ib(g.months);g.timeSuffixes.length>0&&g.addFormat(jb(Xa,g),m,Wa);g.addFormat("{day}",k);g.addFormat("{month}"+(g.monthSuffix||""));g.addFormat("{year}"+(g.yearSuffix||""));g.timeParse.forEach(function(i){g.addFormat(i,k)});g.dateParse.forEach(function(i){g.addFormat(i)});return eb[a]=
13
+ g}function kb(a,b,c,d){a.ga.unshift({Ba:d,wa:a,za:q("^"+b+"$","i"),to:c})}function hb(a){return a.slice(0,1).toUpperCase()+a.slice(1)}function ib(a){return a.filter(function(b){return!!b}).join("|")}function nb(a,b){var c;if(L(a[0]))return a;else if(B(a[0])&&!B(a[1]))return[a[0]];else if(D(a[0])&&b)return[ob(a[0]),a[1]];c={};$a.forEach(function(d,e){c[d.$]=a[e]});return[c]}
14
+ function ob(a,b){var c={};if(match=a.match(/^(\d+)?\s?(\w+?)s?$/i)){if(K(b))b=parseInt(match[1])||1;c[match[2].toLowerCase()]=b}return c}function pb(a,b){var c={},d,e;b.forEach(function(f,g){d=a[g+1];if(!(K(d)||d==="")){if(f==="year")c.Ca=d;e=parseFloat(d.replace(/,/,"."));c[f]=!isNaN(e)?e:d.toLowerCase()}});return c}function qb(a){a=a.trim().replace(/^(just )?now|\.+$/i,"");return rb(a)}
15
+ function rb(a){return a.replace(Za,function(b,c,d){var e=0,f=1,g,j;if(c)return b;d.split("").reverse().forEach(function(i){i=Ya[i];var h=i>9;if(h){if(g)e+=f;f*=i/(j||1);j=i}else{if(g===m)f*=10;e+=f*i}g=h});if(g)e+=f;return e})}
16
+ function sb(a,b,c,d){var e=new s,f=m,g,j,i,h,n,r,y,z,C;e.utc(d);if(ha(a))e=a.clone();else if(B(a))e=new s(a);else if(L(a)){e.set(a,k);h=a}else if(D(a)){g=lb(b);a=qb(a);g&&H(g.sa(),function(da,ea){var Da=a.match(ea.za);if(Da){i=ea;j=i.wa;h=pb(Da,i.to,j);h.utc&&e.utc();j.ma=i;if(h.timestamp){h=h.timestamp;return m}if(i.Ba&&!D(h.month)&&(D(h.date)||g.ua(b))){z=h.month;h.month=h.date;h.date=z}if(h.year&&h.Ca.length===2)h.year=O(V(new s,"FullYear")/100)*100-O(h.year/100)*100+h.year;if(h.month){h.month=
17
17
  j.getMonth(h.month);if(h.shift&&!h.unit)h.unit=j.units[7]}if(h.weekday&&h.date)delete h.weekday;else if(h.weekday){h.weekday=j.getWeekday(h.weekday);if(h.shift&&!h.unit)h.unit=j.units[5]}if(h.day&&(z=j.ha[h.day])){h.day=z.value;e.reset();f=k}else if(h.day&&(r=j.getWeekday(h.day))>-1){delete h.day;if(h.num&&h.month){C=function(){var Q=e.getWeekday();e.setWeekday(7*(h.num-1)+(Q>r?r+7:r))};h.day=1}else h.weekday=r}if(h.date&&!B(h.date))h.date=j.ta(h.date);if(j.ya(h.ampm)&&h.hour<12)h.hour+=12;else if(j.xa(h.ampm)&&
18
18
  h.hour===12)h.hour=0;if("offset_hours"in h||"offset_minutes"in h){e.utc();h.offset_minutes=h.offset_minutes||0;h.offset_minutes+=h.offset_hours*60;if(h.offset_sign==="-")h.offset_minutes*=-1;h.minute-=h.offset_minutes}if(h.unit){f=k;y=j.oa(h.num);n=j.ra(h.unit);if(h.shift||h.edge){y*=(z=j.ha[h.shift])?z.value:0;if(n==="month"&&J(h.date)){e.set({day:h.date},k);delete h.date}if(n==="year"&&J(h.month)){e.set({month:h.month,day:h.date},k);delete h.month;delete h.date}}if(h.sign&&(z=j.ha[h.sign]))y*=z.value;
19
- if(J(h.weekday)){e.set({weekday:h.weekday},k);delete h.weekday}h[n]=(h[n]||0)+y}if(h.year_sign==="-")h.year*=-1;$a.slice(1,4).forEach(function(Q,Ub){var zb=h[Q.$],Ab=zb%1;if(Ab){h[$a[Ub].$]=O(Ab*(Q.$==="second"?1E3:60));h[Q.$]=P(zb)}});return m}});if(i)if(f)e.advance(h);else{e._utc&&e.reset();sb(e,h,k,m,c)}else e=a?new s(a):new s;if(h&&h.edge){z=j.ha[h.edge];H($a.slice(4),function(ca,da){if(J(h[da.$])){n=da.$;return m}});if(n==="year")h.fa="month";else if(n==="month"||n==="week")h.fa="day";e[(z.value<
20
- 0?"endOf":"beginningOf")+gb(n)]();z.value===-2&&e.reset()}C&&C()}d||e.utc(m);return{ea:e,set:h}}function fb(a){var b,c=v.abs(a),d=c,e=0;$a.slice(1).forEach(function(f,g){b=P(O(c/f.da()*10)/10);if(b>=1){d=b;e=g+1}});return[d,e,a]}
21
- function tb(a,b,c,d){var e,f=kb(d),g=q(/^[A-Z]/);if(a.isValid())if(Date[b])b=Date[b];else{if(A(b)){e=fb(a.millisecondsFromNow());b=b.apply(a,e.concat(f))}}else return"Invalid Date";if(!b&&c){e=e||fb(a.millisecondsFromNow());if(e[1]===0){e[1]=1;e[0]=1}return f.Aa(e)}b=b||"long";b=f[b]||b;bb.forEach(function(j){b=b.replace(q("\\{("+j.ba+")(\\d)?\\}",j.la?"i":""),function(i,h,n){i=j.format(a,f,n||1,h);n=h.length;var r=h.match(/^(.)\1+$/);if(j.la){if(n===3)i=i.slice(0,3);if(r||h.match(g))i=gb(i)}else if(r&&
22
- !j.text)i=(B(i)?R(i,n):i.toString()).slice(-n);return i})});return b}
23
- function ub(a,b,c,d){var e=rb(b,l,l,d),f=0;d=b=0;var g;if(c>0){b=d=c;g=k}if(!e.ea.isValid())return m;if(e.set&&e.set.fa){cb.forEach(function(i){if(i.$===e.set.fa)f=i.da(e.ea,a-e.ea)-1});c=gb(e.set.fa);if(e.set.edge||e.set.shift)e.ea["beginningOf"+c]();if(e.set.fa==="month")j=e.ea.clone()["endOf"+c]().getTime();if(!g&&e.set.sign&&e.set.fa!="millisecond"){b=50;d=-50}}g=a.getTime();c=e.ea.getTime();var j=j||c+f;return g>=c-b&&g<=j+d}
24
- function sb(a,b,c,d,e){function f(i){return J(b[i])?b[i]:b[i+"s"]}var g,j;if(B(b)&&d)b={milliseconds:b};else if(B(b)){a.setTime(b);return a}if(b.date)b.day=b.date;H($a,function(i,h){var n=h.$==="day";if(J(f(h.$))||n&&J(f("weekday"))){b.fa=h.$;j=+i;return m}else if(c&&h.$!=="week"&&(!n||!J(f("week"))))X(a,h.method,n?1:0)});cb.forEach(function(i){var h=i.$;i=i.method;var n;n=f(h);if(!K(n)){if(d){if(h==="week"){n=(b.day||0)+n*7;i="Date"}n=n*d+W(a,i)}else h==="month"&&J(f("day"))&&X(a,"Date",15);X(a,
25
- i,n);if(d&&h==="month"){h=n;if(h<0)h+=12;h%12!=W(a,"Month")&&X(a,"Date",0)}}});if(!d&&!J(f("day"))&&J(f("weekday"))){g=f("weekday");a.setWeekday(g)}(function(){var i=new s;return e===-1&&a>i||e===1&&a<i})()&&H($a.slice(j+1),function(i,h){if((h.ja||h.$==="week"&&J(f("weekday")))&&!J(f(h.$))){a[h.ia](e);return m}});return a}function W(a,b){return a["get"+(a._utc?"UTC":"")+b]()}function X(a,b,c){return a["set"+(a._utc?"UTC":"")+b](c)}
26
- function ib(a,b,c){var d={h:0,m:1,s:2},e;b=b||V;return a.replace(/{([a-z])}/g,function(f,g){var j=[],i=g==="h",h=i&&!c;if(g==="t")return b.ampm.join("|");else{i&&j.push(":");if(e=b.timeSuffixes[d[g]])j.push(e+"\\s*");return j.length===0?"":"(?:"+j.join("|")+")"+(h?"":"?")}})}function vb(a,b){var c,d,e;if(B(a[1]))c=mb(a)[0];else{c=a[0];d=a[1];e=a[2]}return rb(c,d,b,e).ea}
27
- s.extend({create:function(){return vb(arguments)},past:function(){return vb(arguments,-1)},future:function(){return vb(arguments,1)},addLocale:function(a,b){return lb(a,b)},setLocale:function(a){var b=kb(a,m);Ua=b;if(a&&a!=b.code)b.code=a;return b},getLocale:function(a){return!a?Ua:kb(a,m)},addFormat:function(a,b,c){jb(kb(c),a,b)}},m,m);
28
- s.extend({set:function(){var a=mb(arguments);return sb(this,a[0],a[1])},setWeekday:function(a){if(!K(a))return X(this,"Date",W(this,"Date")+a-W(this,"Day"))},setWeek:function(a){if(!K(a)){W(this,"Date");X(this,"Month",0);X(this,"Date",a*7+1);return this.getTime()}},getWeek:function(){var a=this;a=a.clone();var b=W(a,"Day")||7;a.addDays(4-b).reset();return 1+P(a.daysSince(a.clone().beginningOfYear())/7)},getUTCOffset:function(a){var b=this._utc?0:this.getTimezoneOffset(),c=a===k?":":"";if(!b&&a)return"Z";
29
- return R(O(-b/60),2,k)+c+R(b%60,2)},utc:function(a){this._utc=a===k||arguments.length===0;return this},isUTC:function(){return!!this._utc||this.getTimezoneOffset()===0},advance:function(){var a=mb(arguments,k);return sb(this,a[0],a[1],1)},rewind:function(){var a=mb(arguments,k);return sb(this,a[0],a[1],-1)},isValid:function(){return!isNaN(this.getTime())},isAfter:function(a,b){return this.getTime()>s.create(a).getTime()-(b||0)},isBefore:function(a,b){return this.getTime()<s.create(a).getTime()+(b||
30
- 0)},isBetween:function(a,b,c){var d=this.getTime();a=s.create(a).getTime();var e=s.create(b).getTime();b=v.min(a,e);a=v.max(a,e);c=c||0;return b-c<d&&a+c>d},isLeapYear:function(){var a=W(this,"FullYear");return a%4===0&&a%100!==0||a%400===0},daysInMonth:function(){return 32-W(new s(W(this,"FullYear"),W(this,"Month"),32),"Date")},format:function(a,b){return tb(this,a,m,b)},relative:function(a,b){if(D(a)){b=a;a=l}return tb(this,a,k,b)},is:function(a,b,c){var d,e;if(this.isValid()){if(D(a)){a=a.trim().toLowerCase();
31
- e=this.clone().utc(c);switch(k){case a==="future":return this.getTime()>(new s).getTime();case a==="past":return this.getTime()<(new s).getTime();case a==="weekday":return W(e,"Day")>0&&W(e,"Day")<6;case a==="weekend":return W(e,"Day")===0||W(e,"Day")===6;case (d=V.weekdays.indexOf(a)%7)>-1:return W(e,"Day")===d;case (d=V.months.indexOf(a)%12)>-1:return W(e,"Month")===d}}return ub(this,a,b,c)}},reset:function(a){var b={},c;a=a||"hours";if(a==="date")a="days";c=cb.some(function(d){return a===d.$||
19
+ if(J(h.weekday)){e.set({weekday:h.weekday},k);delete h.weekday}h[n]=(h[n]||0)+y}if(h.year_sign==="-")h.year*=-1;ab.slice(1,4).forEach(function(Q,Ub){var zb=h[Q.$],Ab=zb%1;if(Ab){h[ab[Ub].$]=O(Ab*(Q.$==="second"?1E3:60));h[Q.$]=oa(zb)}});return m}});if(i)if(f)e.advance(h);else{e._utc&&e.reset();tb(e,h,k,m,c)}else e=a?new s(a):new s;if(h&&h.edge){z=j.ha[h.edge];H(ab.slice(4),function(da,ea){if(J(h[ea.$])){n=ea.$;return m}});if(n==="year")h.fa="month";else if(n==="month"||n==="week")h.fa="day";e[(z.value<
20
+ 0?"endOf":"beginningOf")+hb(n)]();z.value===-2&&e.reset()}C&&C()}e.utc(m);return{ea:e,set:h}}function gb(a){var b,c=v.abs(a),d=c,e=0;ab.slice(1).forEach(function(f,g){b=oa(O(c/f.da()*10)/10);if(b>=1){d=b;e=g+1}});return[d,e,a]}
21
+ function ub(a,b,c,d){var e,f=lb(d),g=q(/^[A-Z]/);if(a.isValid())if(Date[b])b=Date[b];else{if(A(b)){e=gb(a.millisecondsFromNow());b=b.apply(a,e.concat(f))}}else return"Invalid Date";if(!b&&c){e=e||gb(a.millisecondsFromNow());if(e[1]===0){e[1]=1;e[0]=1}return f.Aa(e)}b=b||"long";b=f[b]||b;cb.forEach(function(j){b=b.replace(q("\\{("+j.ba+")(\\d)?\\}",j.la?"i":""),function(i,h,n){i=j.format(a,f,n||1,h);n=h.length;var r=h.match(/^(.)\1+$/);if(j.la){if(n===3)i=i.slice(0,3);if(r||h.match(g))i=hb(i)}else if(r&&
22
+ !j.text)i=(B(i)?P(i,n):i.toString()).slice(-n);return i})});return b}
23
+ function vb(a,b,c,d){var e=sb(b,l,l,d),f=0;d=b=0;var g;if(c>0){b=d=c;g=k}if(!e.ea.isValid())return m;if(e.set&&e.set.fa){db.forEach(function(i){if(i.$===e.set.fa)f=i.da(e.ea,a-e.ea)-1});c=hb(e.set.fa);if(e.set.edge||e.set.shift)e.ea["beginningOf"+c]();if(e.set.fa==="month")j=e.ea.clone()["endOf"+c]().getTime();if(!g&&e.set.sign&&e.set.fa!="millisecond"){b=50;d=-50}}g=a.getTime();c=e.ea.getTime();var j=j||c+f;return g>=c-b&&g<=j+d}
24
+ function tb(a,b,c,d,e){function f(i){return J(b[i])?b[i]:b[i+"s"]}var g,j;if(B(b)&&d)b={milliseconds:b};else if(B(b)){a.setTime(b);return a}if(b.date)b.day=b.date;H(ab,function(i,h){var n=h.$==="day";if(J(f(h.$))||n&&J(f("weekday"))){b.fa=h.$;j=+i;return m}else if(c&&h.$!=="week"&&(!n||!J(f("week"))))W(a,h.method,n?1:0)});db.forEach(function(i){var h=i.$;i=i.method;var n;n=f(h);if(!K(n)){if(d){if(h==="week"){n=(b.day||0)+n*7;i="Date"}n=n*d+V(a,i)}else h==="month"&&J(f("day"))&&W(a,"Date",15);W(a,
25
+ i,n);if(d&&h==="month"){h=n;if(h<0)h+=12;h%12!=V(a,"Month")&&W(a,"Date",0)}}});if(!d&&!J(f("day"))&&J(f("weekday"))){g=f("weekday");a.setWeekday(g)}(function(){var i=new s;return e===-1&&a>i||e===1&&a<i})()&&H(ab.slice(j+1),function(i,h){if((h.ja||h.$==="week"&&J(f("weekday")))&&!J(f(h.$))){a[h.ia](e);return m}});return a}function V(a,b){return a["get"+(a._utc?"UTC":"")+b]()}function W(a,b,c){return a["set"+(a._utc?"UTC":"")+b](c)}
26
+ function jb(a,b,c){var d={h:0,m:1,s:2},e;b=b||U;return a.replace(/{([a-z])}/g,function(f,g){var j=[],i=g==="h",h=i&&!c;if(g==="t")return b.ampm.join("|");else{i&&j.push(":");if(e=b.timeSuffixes[d[g]])j.push(e+"\\s*");return j.length===0?"":"(?:"+j.join("|")+")"+(h?"":"?")}})}function X(a,b,c){var d,e;if(B(a[1]))d=nb(a)[0];else{d=a[0];e=a[1]}return sb(d,e,b,c).ea}
27
+ s.extend({create:function(){return X(arguments)},past:function(){return X(arguments,-1)},future:function(){return X(arguments,1)},addLocale:function(a,b){return mb(a,b)},setLocale:function(a){var b=lb(a,m);Va=b;if(a&&a!=b.code)b.code=a;return b},getLocale:function(a){return!a?Va:lb(a,m)},addFormat:function(a,b,c){kb(lb(c),a,b)}},m,m);
28
+ s.extend({set:function(){var a=nb(arguments);return tb(this,a[0],a[1])},setWeekday:function(a){if(!K(a))return W(this,"Date",V(this,"Date")+a-V(this,"Day"))},setWeek:function(a){if(!K(a)){V(this,"Date");W(this,"Month",0);W(this,"Date",a*7+1);return this.getTime()}},getWeek:function(){var a=this;a=a.clone();var b=V(a,"Day")||7;a.addDays(4-b).reset();return 1+oa(a.daysSince(a.clone().beginningOfYear())/7)},getUTCOffset:function(a){var b=this._utc?0:this.getTimezoneOffset(),c=a===k?":":"";if(!b&&a)return"Z";
29
+ return P(O(-b/60),2,k)+c+P(b%60,2)},utc:function(a){this._utc=a===k||arguments.length===0;return this},isUTC:function(){return!!this._utc||this.getTimezoneOffset()===0},advance:function(){var a=nb(arguments,k);return tb(this,a[0],a[1],1)},rewind:function(){var a=nb(arguments,k);return tb(this,a[0],a[1],-1)},isValid:function(){return!isNaN(this.getTime())},isAfter:function(a,b){return this.getTime()>s.create(a).getTime()-(b||0)},isBefore:function(a,b){return this.getTime()<s.create(a).getTime()+(b||
30
+ 0)},isBetween:function(a,b,c){var d=this.getTime();a=s.create(a).getTime();var e=s.create(b).getTime();b=v.min(a,e);a=v.max(a,e);c=c||0;return b-c<d&&a+c>d},isLeapYear:function(){var a=V(this,"FullYear");return a%4===0&&a%100!==0||a%400===0},daysInMonth:function(){return 32-V(new s(V(this,"FullYear"),V(this,"Month"),32),"Date")},format:function(a,b){return ub(this,a,m,b)},relative:function(a,b){if(D(a)){b=a;a=l}return ub(this,a,k,b)},is:function(a,b,c){var d,e;if(this.isValid()){if(D(a)){a=a.trim().toLowerCase();
31
+ e=this.clone().utc(c);switch(k){case a==="future":return this.getTime()>(new s).getTime();case a==="past":return this.getTime()<(new s).getTime();case a==="weekday":return V(e,"Day")>0&&V(e,"Day")<6;case a==="weekend":return V(e,"Day")===0||V(e,"Day")===6;case (d=U.weekdays.indexOf(a)%7)>-1:return V(e,"Day")===d;case (d=U.months.indexOf(a)%12)>-1:return V(e,"Month")===d}}return vb(this,a,b,c)}},reset:function(a){var b={},c;a=a||"hours";if(a==="date")a="days";c=db.some(function(d){return a===d.$||
32
32
  a===d.$+"s"});b[a]=a.match(/^days?/)?1:0;return c?this.set(b,k):this},clone:function(){var a=new s(this.getTime());a._utc=this._utc;return a}});s.extend({iso:function(){return this.toISOString()},getWeekday:s.prototype.getDay,getUTCWeekday:s.prototype.getUTCDay});
33
- function wb(a,b){function c(){return O(this*b)}function d(){return vb(arguments)[a.ia](this)}function e(){return vb(arguments)[a.ia](-this)}var f=a.$,g={};g[f]=c;g[f+"s"]=c;g[f+"Before"]=e;g[f+"sBefore"]=e;g[f+"Ago"]=e;g[f+"sAgo"]=e;g[f+"After"]=d;g[f+"sAfter"]=d;g[f+"FromNow"]=d;g[f+"sFromNow"]=d;u.extend(g)}u.extend({duration:function(a){return kb(a).qa(this)}});
34
- V=Ua=s.addLocale("en",{plural:k,timeMarker:"at",ampm:"am,pm",months:"January,February,March,April,May,June,July,August,September,October,November,December",weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",units:"millisecond:|s,second:|s,minute:|s,hour:|s,day:|s,week:|s,month:|s,year:|s",numbers:"one,two,three,four,five,six,seven,eight,nine,ten",articles:"a,an,the",optionals:"the,st|nd|rd|th,of","short":"{Month} {d}, {yyyy}","long":"{Month} {d}, {yyyy} {h}:{mm}{tt}",full:"{Weekday} {Month} {d}, {yyyy} {h}:{mm}:{ss}{tt}",
33
+ function wb(a,b){function c(){return O(this*b)}function d(){return X(arguments)[a.ia](this)}function e(){return X(arguments)[a.ia](-this)}var f=a.$,g={};g[f]=c;g[f+"s"]=c;g[f+"Before"]=e;g[f+"sBefore"]=e;g[f+"Ago"]=e;g[f+"sAgo"]=e;g[f+"After"]=d;g[f+"sAfter"]=d;g[f+"FromNow"]=d;g[f+"sFromNow"]=d;u.extend(g)}u.extend({duration:function(a){return lb(a).qa(this)}});
34
+ U=Va=s.addLocale("en",{plural:k,timeMarker:"at",ampm:"am,pm",months:"January,February,March,April,May,June,July,August,September,October,November,December",weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",units:"millisecond:|s,second:|s,minute:|s,hour:|s,day:|s,week:|s,month:|s,year:|s",numbers:"one,two,three,four,five,six,seven,eight,nine,ten",articles:"a,an,the",optionals:"the,st|nd|rd|th,of","short":"{Month} {d}, {yyyy}","long":"{Month} {d}, {yyyy} {h}:{mm}{tt}",full:"{Weekday} {Month} {d}, {yyyy} {h}:{mm}:{ss}{tt}",
35
35
  past:"{num} {unit} {sign}",future:"{num} {unit} {sign}",duration:"{num} {unit}",modifiers:[{name:"day",src:"yesterday",value:-1},{name:"day",src:"today",value:0},{name:"day",src:"tomorrow",value:1},{name:"sign",src:"ago|before",value:-1},{name:"sign",src:"from now|after|from|in",value:1},{name:"edge",src:"last day",value:-2},{name:"edge",src:"end",value:-1},{name:"edge",src:"first day|beginning",value:1},{name:"shift",src:"last",value:-1},{name:"shift",src:"the|this",value:0},{name:"shift",src:"next",
36
- value:1}],dateParse:["{num} {unit} {sign}","{sign} {num} {unit}","{num} {unit=4-5} {sign} {day}","{month} {year}","{shift} {unit=5-7}","{0} {edge} of {shift?} {unit=4-7?}{month?}{year?}"],timeParse:["{0} {num}{1} {day} of {month} {year?}","{weekday?} {month} {date}{1} {year?}","{date} {month} {year}","{shift} {weekday}","{shift} week {weekday}","{weekday} {2} {shift} week","{0} {date}{1} of {month}","{0}{month?} {date?}{1} of {shift} {unit=6-7}"]});$a=cb.concat().reverse();Za=cb.concat();
37
- Za.splice(2,1);
38
- I(s,k,m,cb,function(a,b,c){var d=b.$,e=gb(d),f=b.da(),g,j;b.ia="add"+e+"s";g=function(i,h){return O((this.getTime()-s.create(i,h).getTime())/f)};j=function(i,h){return O((s.create(i,h).getTime()-this.getTime())/f)};a[d+"sAgo"]=j;a[d+"sUntil"]=j;a[d+"sSince"]=g;a[d+"sFromNow"]=g;a[b.ia]=function(i,h){var n={};n[d]=i;return this.advance(n,h)};wb(b,f);c<3&&["Last","This","Next"].forEach(function(i){a["is"+i+e]=function(){return this.is(i+" "+d)}});if(c<4){a["beginningOf"+e]=function(){var i={};switch(d){case "year":i.year=
39
- W(this,"FullYear");break;case "month":i.month=W(this,"Month");break;case "day":i.day=W(this,"Date");break;case "week":i.weekday=0}return this.set(i,k)};a["endOf"+e]=function(){var i={hours:23,minutes:59,seconds:59,milliseconds:999};switch(d){case "year":i.month=11;i.day=31;break;case "month":i.day=this.daysInMonth();break;case "week":i.weekday=6}return this.set(i,k)}}});V.addFormat("([+-])?(\\d{4,4})[-.]?{full_month}[-.]?(\\d{1,2})?",k,["year_sign","year","month","date"],m,k);
40
- V.addFormat("(\\d{1,2})[-.\\/]{full_month}(?:[-.\\/](\\d{2,4}))?",k,["date","month","year"],k);V.addFormat("{full_month}[-.](\\d{4,4})",m,["month","year"]);V.addFormat("\\/Date\\((\\d+(?:\\+\\d{4,4})?)\\)\\/",m,["timestamp"]);V.addFormat(ib(Wa,V),m,Va);ab=V.ga.slice(0,7).reverse();V.ga=V.ga.slice(7).concat(ab);I(s,k,m,"short,long,full",function(a,b){a[b]=function(c){return tb(this,b,m,c)}});
41
- "\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d\u5341\u767e\u5343\u4e07".split("").forEach(function(a,b){if(b>9)b=v.pow(10,b-9);Xa[a]=b});"\uff10\uff11\uff12\uff13\uff14\uff15\uff16\uff17\uff18\uff19".split("").forEach(function(a,b){Xa[a]=b});Ya=q("([\u671f\u9031\u5468])?([\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d\u5341\u767e\u5343\u4e07\uff10\uff11\uff12\uff13\uff14\uff15\uff16\uff17\uff18\uff19]+)(?!\u6628)","g");
42
- (function(){var a="today,yesterday,tomorrow,weekday,weekend,future,past".split(","),b=V.weekdays.slice(0,7),c=V.months.slice(0,12);I(s,k,m,a.concat(b).concat(c),function(d,e){d["is"+gb(e)]=function(f){return this.is(e,0,f)}})})();s.extend({RFC1123:"{Dow}, {dd} {Mon} {yyyy} {HH}:{mm}:{ss} {tz}",RFC1036:"{Weekday}, {dd}-{Mon}-{yy} {HH}:{mm}:{ss} {tz}",ISO8601_DATE:"{yyyy}-{MM}-{dd}",ISO8601_DATETIME:"{yyyy}-{MM}-{dd}T{HH}:{mm}:{ss}.{fff}{isotz}"},m,m);
36
+ value:1}],dateParse:["{num} {unit} {sign}","{sign} {num} {unit}","{num} {unit=4-5} {sign} {day}","{month} {year}","{shift} {unit=5-7}","{0} {edge} of {shift?} {unit=4-7?}{month?}{year?}"],timeParse:["{0} {num}{1} {day} of {month} {year?}","{weekday?} {month} {date}{1} {year?}","{date} {month} {year}","{shift} {weekday}","{shift} week {weekday}","{weekday} {2} {shift} week","{0} {date}{1} of {month}","{0}{month?} {date?}{1} of {shift} {unit=6-7}"]});ab=db.concat().reverse();$a=db.concat();
37
+ $a.splice(2,1);
38
+ I(s,k,m,db,function(a,b,c){var d=b.$,e=hb(d),f=b.da(),g,j;b.ia="add"+e+"s";g=function(i,h){return O((this.getTime()-s.create(i,h).getTime())/f)};j=function(i,h){return O((s.create(i,h).getTime()-this.getTime())/f)};a[d+"sAgo"]=j;a[d+"sUntil"]=j;a[d+"sSince"]=g;a[d+"sFromNow"]=g;a[b.ia]=function(i,h){var n={};n[d]=i;return this.advance(n,h)};wb(b,f);c<3&&["Last","This","Next"].forEach(function(i){a["is"+i+e]=function(){return this.is(i+" "+d)}});if(c<4){a["beginningOf"+e]=function(){var i={};switch(d){case "year":i.year=
39
+ V(this,"FullYear");break;case "month":i.month=V(this,"Month");break;case "day":i.day=V(this,"Date");break;case "week":i.weekday=0}return this.set(i,k)};a["endOf"+e]=function(){var i={hours:23,minutes:59,seconds:59,milliseconds:999};switch(d){case "year":i.month=11;i.day=31;break;case "month":i.day=this.daysInMonth();break;case "week":i.weekday=6}return this.set(i,k)}}});U.addFormat("([+-])?(\\d{4,4})[-.]?{full_month}[-.]?(\\d{1,2})?",k,["year_sign","year","month","date"],m,k);
40
+ U.addFormat("(\\d{1,2})[-.\\/]{full_month}(?:[-.\\/](\\d{2,4}))?",k,["date","month","year"],k);U.addFormat("{full_month}[-.](\\d{4,4})",m,["month","year"]);U.addFormat("\\/Date\\((\\d+(?:\\+\\d{4,4})?)\\)\\/",m,["timestamp"]);U.addFormat(jb(Xa,U),m,Wa);bb=U.ga.slice(0,7).reverse();U.ga=U.ga.slice(7).concat(bb);I(s,k,m,"short,long,full",function(a,b){a[b]=function(c){return ub(this,b,m,c)}});
41
+ "\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d\u5341\u767e\u5343\u4e07".split("").forEach(function(a,b){if(b>9)b=v.pow(10,b-9);Ya[a]=b});"\uff10\uff11\uff12\uff13\uff14\uff15\uff16\uff17\uff18\uff19".split("").forEach(function(a,b){Ya[a]=b});Za=q("([\u671f\u9031\u5468])?([\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d\u5341\u767e\u5343\u4e07\uff10\uff11\uff12\uff13\uff14\uff15\uff16\uff17\uff18\uff19]+)(?!\u6628)","g");
42
+ (function(){var a="today,yesterday,tomorrow,weekday,weekend,future,past".split(","),b=U.weekdays.slice(0,7),c=U.months.slice(0,12);I(s,k,m,a.concat(b).concat(c),function(d,e){d["is"+hb(e)]=function(f){return this.is(e,0,f)}})})();(function(){s.extend({utc:{create:function(){return X(arguments,0,k)},past:function(){return X(arguments,-1,k)},future:function(){return X(arguments,1,k)}}},m,m)})();
43
+ s.extend({RFC1123:"{Dow}, {dd} {Mon} {yyyy} {HH}:{mm}:{ss} {tz}",RFC1036:"{Weekday}, {dd}-{Mon}-{yy} {HH}:{mm}:{ss} {tz}",ISO8601_DATE:"{yyyy}-{MM}-{dd}",ISO8601_DATETIME:"{yyyy}-{MM}-{dd}T{HH}:{mm}:{ss}.{fff}{isotz}"},m,m);
@@ -1,3 +1,3 @@
1
1
  DateRange=function(a,b){this.start=s.create(a);this.end=s.create(b)};DateRange.prototype.toString=function(){return this.isValid()?this.start.full()+".."+this.end.full():"Invalid DateRange"};
2
- F(DateRange,k,m,{isValid:function(){return this.start<this.end},duration:function(){return this.isValid()?this.end.getTime()-this.start.getTime():NaN},contains:function(a){var b=this;return(a.start&&a.end?[a.start,a.end]:[a]).every(function(c){return c>=b.start&&c<=b.end})},every:function(a,b){var c=this.start.clone(),d=[],e=0,f,g;if(D(a)){c.advance(nb(a,0),k);f=nb(a);g=a.toLowerCase()==="day"}else f={milliseconds:a};for(;c<=this.end;){d.push(c);b&&b(c,e);if(g&&W(c,"Hours")===23){c=c.clone();X(c,
2
+ F(DateRange,k,m,{isValid:function(){return this.start<this.end},duration:function(){return this.isValid()?this.end.getTime()-this.start.getTime():NaN},contains:function(a){var b=this;return(a.start&&a.end?[a.start,a.end]:[a]).every(function(c){return c>=b.start&&c<=b.end})},every:function(a,b){var c=this.start.clone(),d=[],e=0,f,g;if(D(a)){c.advance(ob(a,0),k);f=ob(a);g=a.toLowerCase()==="day"}else f={milliseconds:a};for(;c<=this.end;){d.push(c);b&&b(c,e);if(g&&V(c,"Hours")===23){c=c.clone();W(c,
3
3
  "Hours",48)}else c=c.clone().advance(f,k);e++}return d},union:function(a){return new DateRange(this.start<a.start?this.start:a.start,this.end>a.end?this.end:a.end)},intersect:function(a){return new DateRange(this.start>a.start?this.start:a.start,this.end<a.end?this.end:a.end)}});I(DateRange,k,m,"Millisecond,Second,Minute,Hour,Day,Week,Month,Year",function(a,b){a["each"+b]=function(c){return this.every(b,c)}});F(s,m,m,{range:function(a,b){return new DateRange(a,b)}});
@@ -1,8 +1,8 @@
1
1
  F(o,m,m,{keys:function(a){var b=[];if(!la(a)&&!E(a)&&!A(a))throw new TypeError("Object required");H(a,function(c){b.push(c)});return b}});
2
- function wa(a,b,c,d){var e=a.length,f=d==-1,g=f?e-1:0;c=isNaN(c)?g:parseInt(c>>0);if(c<0)c=e+c;if(!f&&c<0||f&&c>=e)c=g;for(;f&&c>=0||!f&&c<e;){if(a[c]===b)return c;c+=d}return-1}function xa(a,b,c,d){var e=a.length,f=0,g=J(c);ya(b);if(e==0&&!g)throw new TypeError("Reduce called on empty array with no initial value");else if(g)c=c;else{c=a[d?e-1:f];f++}for(;f<e;){g=d?e-f-1:f;if(g in a)c=b(c,a[g],g,a);f++}return c}function ya(a){if(!a||!a.call)throw new TypeError("Callback is not callable");}
3
- function za(a){if(a.length===0)throw new TypeError("First argument must be defined");}F(p,m,m,{isArray:function(a){return fa(a)}});
4
- F(p,k,m,{every:function(a,b){var c=this.length,d=0;for(za(arguments);d<c;){if(d in this&&!a.call(b,this[d],d,this))return m;d++}return k},some:function(a,b){var c=this.length,d=0;for(za(arguments);d<c;){if(d in this&&a.call(b,this[d],d,this))return k;d++}return m},map:function(a,b){var c=this.length,d=0,e=Array(c);for(za(arguments);d<c;){if(d in this)e[d]=a.call(b,this[d],d,this);d++}return e},filter:function(a,b){var c=this.length,d=0,e=[];for(za(arguments);d<c;){d in this&&a.call(b,this[d],d,this)&&
5
- e.push(this[d]);d++}return e},indexOf:function(a,b){if(D(this))return this.indexOf(a,b);return wa(this,a,b,1)},lastIndexOf:function(a,b){if(D(this))return this.lastIndexOf(a,b);return wa(this,a,b,-1)},forEach:function(a,b){var c=this.length,d=0;for(ya(a);d<c;){d in this&&a.call(b,this[d],d,this);d++}},reduce:function(a,b){return xa(this,a,b)},reduceRight:function(a,b){return xa(this,a,b,k)}});
2
+ function xa(a,b,c,d){var e=a.length,f=d==-1,g=f?e-1:0;c=isNaN(c)?g:parseInt(c>>0);if(c<0)c=e+c;if(!f&&c<0||f&&c>=e)c=g;for(;f&&c>=0||!f&&c<e;){if(a[c]===b)return c;c+=d}return-1}function ya(a,b,c,d){var e=a.length,f=0,g=J(c);za(b);if(e==0&&!g)throw new TypeError("Reduce called on empty array with no initial value");else if(g)c=c;else{c=a[d?e-1:f];f++}for(;f<e;){g=d?e-f-1:f;if(g in a)c=b(c,a[g],g,a);f++}return c}function za(a){if(!a||!a.call)throw new TypeError("Callback is not callable");}
3
+ function Aa(a){if(a.length===0)throw new TypeError("First argument must be defined");}F(p,m,m,{isArray:function(a){return fa(a)}});
4
+ F(p,k,m,{every:function(a,b){var c=this.length,d=0;for(Aa(arguments);d<c;){if(d in this&&!a.call(b,this[d],d,this))return m;d++}return k},some:function(a,b){var c=this.length,d=0;for(Aa(arguments);d<c;){if(d in this&&a.call(b,this[d],d,this))return k;d++}return m},map:function(a,b){var c=this.length,d=0,e=Array(c);for(Aa(arguments);d<c;){if(d in this)e[d]=a.call(b,this[d],d,this);d++}return e},filter:function(a,b){var c=this.length,d=0,e=[];for(Aa(arguments);d<c;){d in this&&a.call(b,this[d],d,this)&&
5
+ e.push(this[d]);d++}return e},indexOf:function(a,b){if(D(this))return this.indexOf(a,b);return xa(this,a,b,1)},lastIndexOf:function(a,b){if(D(this))return this.lastIndexOf(a,b);return xa(this,a,b,-1)},forEach:function(a,b){var c=this.length,d=0;for(za(a);d<c;){d in this&&a.call(b,this[d],d,this);d++}},reduce:function(a,b){return ya(this,a,b)},reduceRight:function(a,b){return ya(this,a,b,k)}});
6
6
  F(Function,k,m,{bind:function(a){var b=this,c=G(arguments).slice(1),d;if(!A(this))throw new TypeError("Function.prototype.bind called on a non-function");d=function(){return b.apply(b.prototype&&this instanceof b?this:a,c.concat(G(arguments)))};d.prototype=this.prototype;return d}});F(s,m,m,{now:function(){return(new s).getTime()}});
7
- (function(){var a=qa().match(/^\s+$/);try{t.prototype.trim.call([1])}catch(b){a=m}F(t,k,!a,{trim:function(){return this.toString().trimLeft().trimRight()},trimLeft:function(){return this.replace(q("^["+qa()+"]+"),"")},trimRight:function(){return this.replace(q("["+qa()+"]+$"),"")}})})();
8
- (function(){var a=new s(s.UTC(1999,11,31));a=a.toISOString&&a.toISOString()==="1999-12-31T00:00:00.000Z";I(s,k,!a,"toISOString,toJSON",function(b,c){b[c]=function(){return R(this.getUTCFullYear(),4)+"-"+R(this.getUTCMonth()+1,2)+"-"+R(this.getUTCDate(),2)+"T"+R(this.getUTCHours(),2)+":"+R(this.getUTCMinutes(),2)+":"+R(this.getUTCSeconds(),2)+"."+R(this.getUTCMilliseconds(),3)+"Z"}})})();
7
+ (function(){var a=ra().match(/^\s+$/);try{t.prototype.trim.call([1])}catch(b){a=m}F(t,k,!a,{trim:function(){return this.toString().trimLeft().trimRight()},trimLeft:function(){return this.replace(q("^["+ra()+"]+"),"")},trimRight:function(){return this.replace(q("["+ra()+"]+$"),"")}})})();
8
+ (function(){var a=new s(s.UTC(1999,11,31));a=a.toISOString&&a.toISOString()==="1999-12-31T00:00:00.000Z";I(s,k,!a,"toISOString,toJSON",function(b,c){b[c]=function(){return P(this.getUTCFullYear(),4)+"-"+P(this.getUTCMonth()+1,2)+"-"+P(this.getUTCDate(),2)+"T"+P(this.getUTCHours(),2)+":"+P(this.getUTCMinutes(),2)+":"+P(this.getUTCSeconds(),2)+"."+P(this.getUTCMilliseconds(),3)+"Z"}})})();
@@ -8,4 +8,4 @@ Z.plural(/(craft)$/gi,"$1");Z.plural(/([ft])[eo]{2}(th?)$/gi,"$1ee$2");Z.singula
8
8
  Z.singular(/(s)eries$/gi,"$1eries");Z.singular(/(m)ovies$/gi,"$1ovie");Z.singular(/(x|ch|ss|sh)es$/gi,"$1");Z.singular(/([ml])(ous|ic)e$/gi,"$1ouse");Z.singular(/(bus)(es)?$/gi,"$1");Z.singular(/(o)es$/gi,"$1");Z.singular(/(shoe)s?$/gi,"$1");Z.singular(/(cris|ax|test)[ie]s$/gi,"$1is");Z.singular(/(octop|vir|fung|foc|radi|alumn)(i|us)$/gi,"$1us");Z.singular(/(census|alias|status)(es)?$/gi,"$1");Z.singular(/^(ox)(en)?/gi,"$1");Z.singular(/(vert|ind)(ex|ices)$/gi,"$1ex");
9
9
  Z.singular(/(matr)(ix|ices)$/gi,"$1ix");Z.singular(/(quiz)(zes)?$/gi,"$1");Z.singular(/(database)s?$/gi,"$1");Z.singular(/ee(th?)$/gi,"oo$1");Z.irregular("person","people");Z.irregular("man","men");Z.irregular("child","children");Z.irregular("sex","sexes");Z.irregular("move","moves");Z.irregular("save","saves");Z.irregular("save","saves");Z.irregular("cow","kine");Z.irregular("goose","geese");Z.irregular("zombie","zombies");Z.uncountable("equipment,information,rice,money,species,series,fish,sheep,jeans".split(","));
10
10
  F(t,k,m,{pluralize:function(){return Pb(this,k)},singularize:function(){return Pb(this,m)},humanize:function(){var a=Qb(this,Ib);a=a.replace(/_id$/g,"");a=a.replace(/(_)?([a-z\d]*)/gi,function(b,c,d){return(c?" ":"")+(Jb[d]||d.toLowerCase())});return Rb(a)},titleize:function(){var a=/[.:;!]$/,b,c,d;return this.spacify().humanize().words(function(e,f,g){b=a.test(e);d=f==0||f==g.length-1||b||c;c=b;return d||Kb.indexOf(e)===-1?Rb(e):e}).join(" ")},parameterize:function(a){var b=this;if(a===undefined)a=
11
- "-";if(b.normalize)b=b.normalize();b=b.replace(/[^a-z0-9\-_]+/gi,a);if(a)b=b.replace(new q("^{sep}+|{sep}+$|({sep}){sep}+".assign({sep:S(a)}),"g"),"$1");return encodeURI(b.toLowerCase())}});t.Inflector=Z;t.Inflector.acronyms=Jb;
11
+ "-";if(b.normalize)b=b.normalize();b=b.replace(/[^a-z0-9\-_]+/gi,a);if(a)b=b.replace(new q("^{sep}+|{sep}+$|({sep}){sep}+".assign({sep:R(a)}),"g"),"$1");return encodeURI(b.toLowerCase())}});t.Inflector=Z;t.Inflector.acronyms=Jb;
@@ -1,5 +1,5 @@
1
1
  function yb(a,b,c,d,e,f){var g=a.toFixed(20),j=g.search(/\./);g=g.search(/[1-9]/);j=j-g;if(j>0)j-=1;e=v.max(v.min((j/3).floor(),e===m?c.length:e),-d);d=c.charAt(e+d-1);if(j<-9){e=-3;b=j.abs()-9;d=c.slice(0,1)}return(a/(f?(2).pow(10*e):(10).pow(e*3))).round(b||0).format()+d.trim()}
2
2
  F(u,m,m,{random:function(a,b){var c,d;if(arguments.length==1){b=a;a=0}c=v.min(a||0,K(b)?1:b);d=v.max(a||0,K(b)?1:b);return O(v.random()*(d-c)+c)}});
3
3
  F(u,k,m,{log:function(a){return v.log(this)/(a?v.log(a):1)},abbr:function(a){return yb(this,a,"kmbt",0,4)},metric:function(a,b){return yb(this,a,"n\u03bcm kMGTPE",4,K(b)?1:b)},bytes:function(a,b){return yb(this,a,"kMGTPE",0,K(b)?4:b,k)+"B"},isInteger:function(){return this%1==0},isOdd:function(){return!this.isMultipleOf(2)},isEven:function(){return this.isMultipleOf(2)},isMultipleOf:function(a){return this%a===0},format:function(a,b,c){var d,e,f=/(\d+)(\d{3})/;if(t(b).match(/\d/))throw new TypeError("Thousands separator cannot contain numbers.");
4
- d=B(a)?O(this,a||0).toFixed(v.max(a,0)):this.toString();b=b||",";c=c||".";e=d.split(".");d=e[0];for(e=e[1]||"";d.match(f);)d=d.replace(f,"$1"+b+"$2");if(e.length>0)d+=c+oa((a||0)-e.length,"0")+e;return d},hex:function(a){return this.pad(a||1,m,16)},upto:function(a,b,c){return N(this,a,b,c||1)},downto:function(a,b,c){return N(this,a,b,-(c||1))},times:function(a){if(a)for(var b=0;b<this;b++)a.call(this,b);return this.toNumber()},chr:function(){return t.fromCharCode(this)},pad:function(a,b,c){return R(this,
5
- a,b,c)},ordinalize:function(){var a=this.abs();a=parseInt(a.toString().slice(-2));return this+pa(a)},toNumber:function(){return parseFloat(this,10)}});I(u,k,m,"round,floor,ceil",function(a,b){a[b]=function(c){return O(this,c,b)}});I(u,k,m,"abs,pow,sin,asin,cos,acos,tan,atan,exp,pow,sqrt",function(a,b){a[b]=function(c,d){return v[b](this,c,d)}});
4
+ d=B(a)?O(this,a||0).toFixed(v.max(a,0)):this.toString();b=b||",";c=c||".";e=d.split(".");d=e[0];for(e=e[1]||"";d.match(f);)d=d.replace(f,"$1"+b+"$2");if(e.length>0)d+=c+pa((a||0)-e.length,"0")+e;return d},hex:function(a){return this.pad(a||1,m,16)},upto:function(a,b,c){return N(this,a,b,c||1)},downto:function(a,b,c){return N(this,a,b,-(c||1))},times:function(a){if(a)for(var b=0;b<this;b++)a.call(this,b);return this.toNumber()},chr:function(){return t.fromCharCode(this)},pad:function(a,b,c){return P(this,
5
+ a,b,c)},ordinalize:function(){var a=this.abs();a=parseInt(a.toString().slice(-2));return this+qa(a)},toNumber:function(){return parseFloat(this,10)}});I(u,k,m,"round,floor,ceil",function(a,b){a[b]=function(c){return O(this,c,b)}});I(u,k,m,"abs,pow,sin,asin,cos,acos,tan,atan,exp,pow,sqrt",function(a,b){a[b]=function(c,d){return v[b](this,c,d)}});
@@ -1,6 +1,6 @@
1
1
  var Bb="isObject,isNaN".split(","),Cb="keys,values,each,merge,clone,equal,watch,tap,has".split(",");
2
- function Db(a,b,c,d){var e=/^(.+?)(\[.*\])$/,f,g,j;if(d!==m&&(g=b.match(e))){j=g[1];b=g[2].replace(/^\[|\]$/g,"").split("][");b.forEach(function(i){f=!i||i.match(/^\d+$/);if(!j&&fa(a))j=a.length;a[j]||(a[j]=f?[]:{});a=a[j];j=i});if(!j&&f)j=a.length.toString();Db(a,j,c)}else a[b]=c.match(/^[\d.]+$/)?parseFloat(c):c==="true"?k:c==="false"?m:c}F(o,m,k,{watch:function(a,b,c){if(ea){var d=a[b];o.defineProperty(a,b,{enumerable:k,configurable:k,get:function(){return d},set:function(e){d=c.call(a,b,d,e)}})}}});
2
+ function Db(a,b,c,d){var e=/^(.+?)(\[.*\])$/,f,g,j;if(d!==m&&(g=b.match(e))){j=g[1];b=g[2].replace(/^\[|\]$/g,"").split("][");b.forEach(function(i){f=!i||i.match(/^\d+$/);if(!j&&fa(a))j=a.length;a[j]||(a[j]=f?[]:{});a=a[j];j=i});if(!j&&f)j=a.length.toString();Db(a,j,c)}else a[b]=c.match(/^[\d.]+$/)?parseFloat(c):c==="true"?k:c==="false"?m:c}F(o,m,k,{watch:function(a,b,c){if(ca){var d=a[b];o.defineProperty(a,b,{enumerable:k,configurable:k,get:function(){return d},set:function(e){d=c.call(a,b,d,e)}})}}});
3
3
  F(o,m,function(a,b){return A(b)},{keys:function(a,b){var c=o.keys(a);c.forEach(function(d){b.call(a,d,a[d])});return c}});
4
- F(o,m,m,{isObject:function(a){return L(a)},isNaN:function(a){return B(a)&&a.valueOf()!==a.valueOf()},equal:function(a,b){return ta(a)&&ta(b)?sa(a)===sa(b):a===b},extended:function(a){return new M(a)},merge:function(a,b,c,d){var e,f;if(a&&typeof b!="string")for(e in b)if(ma(b,e)&&a){f=b[e];if(J(a[e])){if(d===m)continue;if(A(d))f=d.call(b,e,a[e],b[e])}if(c===k&&f&&la(f))if(ha(f))f=new s(f.getTime());else if(E(f))f=new q(f.source,ra(f));else{a[e]||(a[e]=p.isArray(f)?[]:{});o.merge(a[e],b[e],c,d);continue}a[e]=
4
+ F(o,m,m,{isObject:function(a){return L(a)},isNaN:function(a){return B(a)&&a.valueOf()!==a.valueOf()},equal:function(a,b){return ua(a)&&ua(b)?ta(a)===ta(b):a===b},extended:function(a){return new M(a)},merge:function(a,b,c,d){var e,f;if(a&&typeof b!="string")for(e in b)if(ma(b,e)&&a){f=b[e];if(J(a[e])){if(d===m)continue;if(A(d))f=d.call(b,e,a[e],b[e])}if(c===k&&f&&la(f))if(ha(f))f=new s(f.getTime());else if(E(f))f=new q(f.source,sa(f));else{a[e]||(a[e]=p.isArray(f)?[]:{});o.merge(a[e],b[e],c,d);continue}a[e]=
5
5
  f}return a},values:function(a,b){var c=[];H(a,function(d,e){c.push(e);b&&b.call(a,e)});return c},clone:function(a,b){if(!la(a))return a;if(p.isArray(a))return a.concat();var c=a instanceof M?new M:{};return o.merge(c,a,b)},fromQueryString:function(a,b){var c=o.extended();a=a&&a.toString?a.toString():"";decodeURIComponent(a.replace(/^.*?\?/,"")).split("&").forEach(function(d){d=d.split("=");d.length===2&&Db(c,d[0],d[1],b)});return c},tap:function(a,b){var c=b;A(b)||(c=function(){b&&a[b]()});c.call(a,
6
- a);return a},has:function(a,b){return ma(a,b)}});I(o,m,m,w,function(a,b){var c="is"+b;Bb.push(c);a[c]=function(d){return o.prototype.toString.call(d)==="[object "+b+"]"}});(function(){F(o,m,function(){return arguments.length===0},{extend:function(){va(Bb.concat(Cb),o)}})})();va(Cb,M);
6
+ a);return a},has:function(a,b){return ma(a,b)}});I(o,m,m,w,function(a,b){var c="is"+b;Bb.push(c);a[c]=function(d){return o.prototype.toString.call(d)==="[object "+b+"]"}});(function(){F(o,m,function(){return arguments.length===0},{extend:function(){wa(Bb.concat(Cb),o)}})})();wa(Cb,M);
@@ -1,2 +1,2 @@
1
- F(q,m,m,{escape:function(a){return S(a)}});
2
- F(q,k,m,{getFlags:function(){return ra(this)},setFlags:function(a){return q(this.source,a)},addFlag:function(a){return this.setFlags(ra(this,a))},removeFlag:function(a){return this.setFlags(ra(this).replace(a,""))}});
1
+ F(q,m,m,{escape:function(a){return R(a)}});
2
+ F(q,k,m,{getFlags:function(){return sa(this)},setFlags:function(a){return q(this.source,a)},addFlag:function(a){return this.setFlags(sa(this,a))},removeFlag:function(a){return this.setFlags(sa(this).replace(a,""))}});
@@ -1,12 +1,12 @@
1
1
  var Eb,Fb;
2
- F(t,k,m,{escapeRegExp:function(){return S(this)},escapeURL:function(a){return a?encodeURIComponent(this):encodeURI(this)},unescapeURL:function(a){return a?decodeURI(this):decodeURIComponent(this)},escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")},encodeBase64:function(){return Eb(this)},decodeBase64:function(){return Fb(this)},each:function(a,b){var c,
3
- d;if(A(a)){b=a;a=/[\s\S]/g}else if(a)if(D(a))a=q(S(a),"gi");else{if(E(a))a=q(a.source,ra(a,"g"))}else a=/[\s\S]/g;c=this.match(a)||[];if(b)for(d=0;d<c.length;d++)c[d]=b.call(this,c[d],d,c)||c[d];return c},shift:function(a){var b="";a=a||0;this.codes(function(c){b+=t.fromCharCode(c+a)});return b},codes:function(a){for(var b=[],c=0;c<this.length;c++){var d=this.charCodeAt(c);b.push(d);a&&a.call(this,d,c)}return b},chars:function(a){return this.each(a)},words:function(a){return this.trim().each(/\S+/g,
4
- a)},lines:function(a){return this.trim().each(/^.*$/gm,a)},paragraphs:function(a){var b=this.trim().split(/[\r\n]{2,}/);return b=b.map(function(c){if(a)var d=a.call(c);return d?d:c})},startsWith:function(a,b){if(K(b))b=k;var c=E(a)?a.source.replace("^",""):S(a);return q("^"+c,b?"":"i").test(this)},endsWith:function(a,b){if(K(b))b=k;var c=E(a)?a.source.replace("$",""):S(a);return q(c+"$",b?"":"i").test(this)},isBlank:function(){return this.trim().length===0},has:function(a){return this.search(E(a)?
5
- a:S(a))!==-1},add:function(a,b){b=K(b)?this.length:b;return this.slice(0,b)+a+this.slice(b)},remove:function(a){return this.replace(a,"")},reverse:function(){return this.split("").reverse().join("")},compact:function(){return this.trim().replace(/([\r\n\s\u3000])+/g,function(a,b){return b==="\u3000"?b:" "})},at:function(){return ua(this,arguments,k)},from:function(a){return this.slice(a)},to:function(a){if(K(a))a=this.length;return this.slice(0,a)},dasherize:function(){return this.underscore().replace(/_/g,
2
+ F(t,k,m,{escapeRegExp:function(){return R(this)},escapeURL:function(a){return a?encodeURIComponent(this):encodeURI(this)},unescapeURL:function(a){return a?decodeURI(this):decodeURIComponent(this)},escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")},encodeBase64:function(){return Eb(this)},decodeBase64:function(){return Fb(this)},each:function(a,b){var c,
3
+ d;if(A(a)){b=a;a=/[\s\S]/g}else if(a)if(D(a))a=q(R(a),"gi");else{if(E(a))a=q(a.source,sa(a,"g"))}else a=/[\s\S]/g;c=this.match(a)||[];if(b)for(d=0;d<c.length;d++)c[d]=b.call(this,c[d],d,c)||c[d];return c},shift:function(a){var b="";a=a||0;this.codes(function(c){b+=t.fromCharCode(c+a)});return b},codes:function(a){for(var b=[],c=0;c<this.length;c++){var d=this.charCodeAt(c);b.push(d);a&&a.call(this,d,c)}return b},chars:function(a){return this.each(a)},words:function(a){return this.trim().each(/\S+/g,
4
+ a)},lines:function(a){return this.trim().each(/^.*$/gm,a)},paragraphs:function(a){var b=this.trim().split(/[\r\n]{2,}/);return b=b.map(function(c){if(a)var d=a.call(c);return d?d:c})},startsWith:function(a,b){if(K(b))b=k;var c=E(a)?a.source.replace("^",""):R(a);return q("^"+c,b?"":"i").test(this)},endsWith:function(a,b){if(K(b))b=k;var c=E(a)?a.source.replace("$",""):R(a);return q(c+"$",b?"":"i").test(this)},isBlank:function(){return this.trim().length===0},has:function(a){return this.search(E(a)?
5
+ a:R(a))!==-1},add:function(a,b){b=K(b)?this.length:b;return this.slice(0,b)+a+this.slice(b)},remove:function(a){return this.replace(a,"")},reverse:function(){return this.split("").reverse().join("")},compact:function(){return this.trim().replace(/([\r\n\s\u3000])+/g,function(a,b){return b==="\u3000"?b:" "})},at:function(){return va(this,arguments,k)},from:function(a){return this.slice(a)},to:function(a){if(K(a))a=this.length;return this.slice(0,a)},dasherize:function(){return this.underscore().replace(/_/g,
6
6
  "-")},underscore:function(){return this.replace(/[-\s]+/g,"_").replace(t.Inflector&&t.Inflector.acronymRegExp,function(a,b){return(b>0?"_":"")+a.toLowerCase()}).replace(/([A-Z\d]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").toLowerCase()},camelize:function(a){return this.underscore().replace(/(^|_)([^_]+)/g,function(b,c,d,e){b=d;b=(c=t.Inflector)&&c.acronyms[b];b=D(b)?b:void 0;e=a!==m||e>0;if(b)return e?b:b.toLowerCase();return e?d.capitalize():d})},spacify:function(){return this.underscore().replace(/_/g,
7
- " ")},stripTags:function(){var a=this;G(arguments.length>0?arguments:[""],function(b){a=a.replace(q("</?"+S(b)+"[^<>]*>","gi"),"")});return a},removeTags:function(){var a=this;G(arguments.length>0?arguments:["\\S+"],function(b){b=q("<("+b+")[^<>]*(?:\\/>|>.*?<\\/\\1>)","gi");a=a.replace(b,"")});return a},truncate:function(a,b,c,d){var e="",f="",g=this.toString(),j="["+qa()+"]+",i="[^"+qa()+"]*",h=q(j+i+"$");d=K(d)?"...":t(d);if(g.length<=a)return g;switch(c){case "left":a=g.length-a;e=d;g=g.slice(a);
8
- h=q("^"+i+j);break;case "middle":a=P(a/2);f=d+g.slice(g.length-a).trimLeft();g=g.slice(0,a);break;default:a=a;f=d;g=g.slice(0,a)}if(b===m&&this.slice(a,a+1).match(/\S/))g=g.remove(h);return e+g+f},pad:function(a,b){return oa(b,a)+this+oa(b,a)},padLeft:function(a,b){return oa(b,a)+this},padRight:function(a,b){return this+oa(b,a)},first:function(a){if(K(a))a=1;return this.substr(0,a)},last:function(a){if(K(a))a=1;return this.substr(this.length-a<0?0:this.length-a)},repeat:function(a){var b="",c=0;if(B(a)&&
9
- a>0)for(;c<a;){b+=this;c++}return b},toNumber:function(a){var b=this.replace(/,/g,"");return b.match(/\./)?parseFloat(b):parseInt(b,a||10)},capitalize:function(a){var b;return this.toLowerCase().replace(a?/[\s\S]/g:/^\S/,function(c){var d=c.toUpperCase(),e;e=b?c:d;b=d!==c;return e})},assign:function(){var a={};G(arguments,function(b,c){if(L(b))na(a,b);else a[c+1]=b});return this.replace(/\{([^{]+?)\}/g,function(b,c){return ma(a,c)?a[c]:b})},namespace:function(a){a=a||ba;H(this.split("."),function(b,
10
- c){return!!(a=a[c])});return a}});F(t,k,m,{insert:t.prototype.add});
7
+ " ")},stripTags:function(){var a=this;G(arguments.length>0?arguments:[""],function(b){a=a.replace(q("</?"+R(b)+"[^<>]*>","gi"),"")});return a},removeTags:function(){var a=this;G(arguments.length>0?arguments:["\\S+"],function(b){b=q("<("+b+")[^<>]*(?:\\/>|>.*?<\\/\\1>)","gi");a=a.replace(b,"")});return a},truncate:function(a,b,c,d){var e="",f="",g=this.toString(),j="["+ra()+"]+",i="[^"+ra()+"]*",h=q(j+i+"$");d=K(d)?"...":t(d);if(g.length<=a)return g;switch(c){case "left":a=g.length-a;e=d;g=g.slice(a);
8
+ h=q("^"+i+j);break;case "middle":a=oa(a/2);f=d+g.slice(g.length-a).trimLeft();g=g.slice(0,a);break;default:a=a;f=d;g=g.slice(0,a)}if(b===m&&this.slice(a,a+1).match(/\S/))g=g.remove(h);return e+g+f},pad:function(a,b){return pa(b,a)+this+pa(b,a)},padLeft:function(a,b){return pa(b,a)+this},padRight:function(a,b){return this+pa(b,a)},first:function(a){if(K(a))a=1;return this.substr(0,a)},last:function(a){if(K(a))a=1;return this.substr(this.length-a<0?0:this.length-a)},repeat:function(a){var b="",c=0;
9
+ if(B(a)&&a>0)for(;c<a;){b+=this;c++}return b},toNumber:function(a){var b=this.replace(/,/g,"");return b.match(/\./)?parseFloat(b):parseInt(b,a||10)},capitalize:function(a){var b;return this.toLowerCase().replace(a?/[\s\S]/g:/^\S/,function(c){var d=c.toUpperCase(),e;e=b?c:d;b=d!==c;return e})},assign:function(){var a={};G(arguments,function(b,c){if(L(b))na(a,b);else a[c+1]=b});return this.replace(/\{([^{]+?)\}/g,function(b,c){return ma(a,c)?a[c]:b})},namespace:function(a){a=a||ba;H(this.split("."),
10
+ function(b,c){return!!(a=a[c])});return a}});F(t,k,m,{insert:t.prototype.add});
11
11
  (function(a){if(this.btoa){Eb=this.btoa;Fb=this.atob}else{var b=/[^A-Za-z0-9\+\/\=]/g;Eb=function(c){var d="",e,f,g,j,i,h,n=0;do{e=c.charCodeAt(n++);f=c.charCodeAt(n++);g=c.charCodeAt(n++);j=e>>2;e=(e&3)<<4|f>>4;i=(f&15)<<2|g>>6;h=g&63;if(isNaN(f))i=h=64;else if(isNaN(g))h=64;d=d+a.charAt(j)+a.charAt(e)+a.charAt(i)+a.charAt(h)}while(n<c.length);return d};Fb=function(c){var d="",e,f,g,j,i,h=0;if(c.match(b))throw Error("String contains invalid base64 characters");c=c.replace(/[^A-Za-z0-9\+\/\=]/g,"");
12
12
  do{e=a.indexOf(c.charAt(h++));f=a.indexOf(c.charAt(h++));j=a.indexOf(c.charAt(h++));i=a.indexOf(c.charAt(h++));e=e<<2|f>>4;f=(f&15)<<4|j>>2;g=(j&3)<<6|i;d+=t.fromCharCode(e);if(j!=64)d+=t.fromCharCode(f);if(i!=64)d+=t.fromCharCode(g)}while(h<c.length);return d}}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Sugar Library v1.3.3
2
+ * Sugar Library v1.3.4
3
3
  *
4
4
  * Freely distributable and licensed under the MIT-style license.
5
5
  * Copyright (c) 2012 Andrew Plummer
@@ -2800,9 +2800,7 @@
2800
2800
  }
2801
2801
 
2802
2802
  }
2803
- if(!forceUTC) {
2804
- d.utc(false);
2805
- }
2803
+ d.utc(false);
2806
2804
  return {
2807
2805
  date: d,
2808
2806
  set: set
@@ -3059,15 +3057,14 @@
3059
3057
  }
3060
3058
  }
3061
3059
 
3062
- function createDate(args, prefer) {
3063
- var f, localeCode, forceUTC;
3060
+ function createDate(args, prefer, forceUTC) {
3061
+ var f, localeCode;
3064
3062
  if(isNumber(args[1])) {
3065
3063
  // If the second argument is a number, then we have an enumerated constructor type as in "new Date(2003, 2, 12);"
3066
3064
  f = collectDateArguments(args)[0];
3067
3065
  } else {
3068
3066
  f = args[0];
3069
3067
  localeCode = args[1];
3070
- forceUTC = args[2];
3071
3068
  }
3072
3069
  return getExtendedDate(f, localeCode, prefer, forceUTC).date;
3073
3070
  }
@@ -3427,6 +3424,26 @@
3427
3424
  });
3428
3425
  }
3429
3426
 
3427
+ function buildUTCAliases() {
3428
+ date.extend({
3429
+ 'utc': {
3430
+
3431
+ 'create': function() {
3432
+ return createDate(arguments, 0, true);
3433
+ },
3434
+
3435
+ 'past': function() {
3436
+ return createDate(arguments, -1, true);
3437
+ },
3438
+
3439
+ 'future': function() {
3440
+ return createDate(arguments, 1, true);
3441
+ }
3442
+
3443
+ }
3444
+ }, false, false);
3445
+ }
3446
+
3430
3447
  function setDateProperties() {
3431
3448
  date.extend({
3432
3449
  'RFC1123': '{Dow}, {dd} {Mon} {yyyy} {HH}:{mm}:{ss} {tz}',
@@ -3436,24 +3453,17 @@
3436
3453
  }, false, false);
3437
3454
  }
3438
3455
 
3439
- function buildDate() {
3440
- buildDateUnits();
3441
- buildDateMethods();
3442
- buildCoreInputFormats();
3443
- buildDateOutputShortcuts();
3444
- buildAsianDigits();
3445
- buildRelativeAliases();
3446
- setDateProperties();
3447
- }
3448
-
3449
3456
 
3450
3457
  date.extend({
3451
3458
 
3452
3459
  /***
3453
- * @method Date.create(<d>, [locale] = currentLocale, [utc] = false)
3460
+ * @method Date.create(<d>, [locale] = currentLocale)
3454
3461
  * @returns Date
3455
3462
  * @short Alternate Date constructor which understands many different text formats, a timestamp, or another date.
3456
- * @extra If no argument is given, date is assumed to be now. %Date.create% additionally can accept enumerated parameters as with the standard date constructor. [locale] can be passed to specify the locale that the date is in. When unspecified, the current locale (default is English) is assumed. [utc] indicates a utc-based date. For more information, see @date_format.
3463
+ * @extra If no argument is given, date is assumed to be now. %Date.create% additionally can accept enumerated parameters as with the standard date constructor. [locale] can be passed to specify the locale that the date is in. When unspecified, the current locale (default is English) is assumed. UTC-based dates can be created through the %utc% object. For more see @date_format.
3464
+ * @set
3465
+ * Date.utc.create
3466
+ *
3457
3467
  * @example
3458
3468
  *
3459
3469
  * Date.create('July') -> July of this year
@@ -3465,6 +3475,7 @@
3465
3475
  * Date.create(-446806800000) -> November 5, 1955
3466
3476
  * Date.create(1776, 6, 4) -> July 4, 1776
3467
3477
  * Date.create('1776年07月04日', 'ja') -> July 4, 1776
3478
+ * Date.utc.create('July 4, 1776', 'en') -> July 4, 1776
3468
3479
  *
3469
3480
  ***/
3470
3481
  'create': function() {
@@ -3472,10 +3483,12 @@
3472
3483
  },
3473
3484
 
3474
3485
  /***
3475
- * @method Date.past(<d>, [locale] = currentLocale, [utc] = false)
3486
+ * @method Date.past(<d>, [locale] = currentLocale)
3476
3487
  * @returns Date
3477
3488
  * @short Alternate form of %Date.create% with any ambiguity assumed to be the past.
3478
- * @extra For example %"Sunday"% can be either "the Sunday coming up" or "the Sunday last" depending on context. Note that dates explicitly in the future ("next Sunday") will remain in the future. This method simply provides a hint when ambiguity exists.
3489
+ * @extra For example %"Sunday"% can be either "the Sunday coming up" or "the Sunday last" depending on context. Note that dates explicitly in the future ("next Sunday") will remain in the future. This method simply provides a hint when ambiguity exists. UTC-based dates can be created through the %utc% object. For more, see @date_format.
3490
+ * @set
3491
+ * Date.utc.past
3479
3492
  * @example
3480
3493
  *
3481
3494
  * Date.past('July') -> July of this year or last depending on the current month
@@ -3487,10 +3500,13 @@
3487
3500
  },
3488
3501
 
3489
3502
  /***
3490
- * @method Date.future(<d>, [locale] = currentLocale, [utc] = false)
3503
+ * @method Date.future(<d>, [locale] = currentLocale)
3491
3504
  * @returns Date
3492
3505
  * @short Alternate form of %Date.create% with any ambiguity assumed to be the future.
3493
- * @extra For example %"Sunday"% can be either "the Sunday coming up" or "the Sunday last" depending on context. Note that dates explicitly in the past ("last Sunday") will remain in the past. This method simply provides a hint when ambiguity exists.
3506
+ * @extra For example %"Sunday"% can be either "the Sunday coming up" or "the Sunday last" depending on context. Note that dates explicitly in the past ("last Sunday") will remain in the past. This method simply provides a hint when ambiguity exists. UTC-based dates can be created through the %utc% object. For more, see @date_format.
3507
+ * @set
3508
+ * Date.utc.future
3509
+ *
3494
3510
  * @example
3495
3511
  *
3496
3512
  * Date.future('July') -> July of this year or next depending on the current month
@@ -3725,7 +3741,7 @@
3725
3741
  * @method isAfter(<d>, [margin] = 0)
3726
3742
  * @returns Boolean
3727
3743
  * @short Returns true if the date is after the <d>.
3728
- * @extra [margin] is to allow extra margin of error (in ms). <d> will accept a date object, timestamp, or text format. If not specified, <d> is assumed to be now. See @date_format for more information.
3744
+ * @extra [margin] is to allow extra margin of error (in ms). <d> will accept a date object, timestamp, or text format. If not specified, <d> is assumed to be now. See @date_format for more.
3729
3745
  * @example
3730
3746
  *
3731
3747
  * new Date().isAfter('tomorrow') -> false
@@ -3740,7 +3756,7 @@
3740
3756
  * @method isBefore(<d>, [margin] = 0)
3741
3757
  * @returns Boolean
3742
3758
  * @short Returns true if the date is before <d>.
3743
- * @extra [margin] is to allow extra margin of error (in ms). <d> will accept a date object, timestamp, or text format. If not specified, <d> is assumed to be now. See @date_format for more information.
3759
+ * @extra [margin] is to allow extra margin of error (in ms). <d> will accept a date object, timestamp, or text format. If not specified, <d> is assumed to be now. See @date_format for more.
3744
3760
  * @example
3745
3761
  *
3746
3762
  * new Date().isBefore('tomorrow') -> true
@@ -3755,7 +3771,7 @@
3755
3771
  * @method isBetween(<d1>, <d2>, [margin] = 0)
3756
3772
  * @returns Boolean
3757
3773
  * @short Returns true if the date falls between <d1> and <d2>.
3758
- * @extra [margin] is to allow extra margin of error (in ms). <d1> and <d2> will accept a date object, timestamp, or text format. If not specified, they are assumed to be now. See @date_format for more information.
3774
+ * @extra [margin] is to allow extra margin of error (in ms). <d1> and <d2> will accept a date object, timestamp, or text format. If not specified, they are assumed to be now. See @date_format for more.
3759
3775
  * @example
3760
3776
  *
3761
3777
  * new Date().isBetween('yesterday', 'tomorrow') -> true
@@ -3832,7 +3848,7 @@
3832
3848
  * @method relative([fn], [locale] = currentLocale)
3833
3849
  * @returns String
3834
3850
  * @short Returns a relative date string offset to the current time.
3835
- * @extra [fn] can be passed to provide for more granular control over the resulting string. [fn] is passed 4 arguments: the adjusted value, unit, offset in milliseconds, and a localization object. As an alternate syntax, [locale] can also be passed as the first (and only) parameter. For more information, see @date_format.
3851
+ * @extra [fn] can be passed to provide for more granular control over the resulting string. [fn] is passed 4 arguments: the adjusted value, unit, offset in milliseconds, and a localization object. As an alternate syntax, [locale] can also be passed as the first (and only) parameter. For more, see @date_format.
3836
3852
  * @example
3837
3853
  *
3838
3854
  * Date.create('90 seconds ago').relative() -> 1 minute ago
@@ -3855,7 +3871,7 @@
3855
3871
  * @method is(<d>, [margin] = 0)
3856
3872
  * @returns Boolean
3857
3873
  * @short Returns true if the date is <d>.
3858
- * @extra <d> will accept a date object, timestamp, or text format. %is% additionally understands more generalized expressions like month/weekday names, 'today', etc, and compares to the precision implied in <d>. [margin] allows an extra margin of error in milliseconds. For more information, see @date_format.
3874
+ * @extra <d> will accept a date object, timestamp, or text format. %is% additionally understands more generalized expressions like month/weekday names, 'today', etc, and compares to the precision implied in <d>. [margin] allows an extra margin of error in milliseconds. For more, see @date_format.
3859
3875
  * @example
3860
3876
  *
3861
3877
  * Date.create().is('July') -> true or false?
@@ -3995,7 +4011,7 @@
3995
4011
  * @method [unit]Before([d], [locale] = currentLocale)
3996
4012
  * @returns Date
3997
4013
  * @short Returns a date that is <n> units before [d], where <n> is the number.
3998
- * @extra [d] will accept a date object, timestamp, or text format. Note that "months" is ambiguous as a unit of time. If the target date falls on a day that does not exist (ie. August 31 -> February 31), the date will be shifted to the last day of the month. Be careful using %monthsBefore% if you need exact precision. See @date_format for more information.
4014
+ * @extra [d] will accept a date object, timestamp, or text format. Note that "months" is ambiguous as a unit of time. If the target date falls on a day that does not exist (ie. August 31 -> February 31), the date will be shifted to the last day of the month. Be careful using %monthsBefore% if you need exact precision. See @date_format for more.
3999
4015
  *
4000
4016
  * @set
4001
4017
  * millisecondBefore
@@ -4053,7 +4069,7 @@
4053
4069
  * @method [unit]After([d], [locale] = currentLocale)
4054
4070
  * @returns Date
4055
4071
  * @short Returns a date <n> units after [d], where <n> is the number.
4056
- * @extra [d] will accept a date object, timestamp, or text format. Note that "months" is ambiguous as a unit of time. If the target date falls on a day that does not exist (ie. August 31 -> February 31), the date will be shifted to the last day of the month. Be careful using %monthsAfter% if you need exact precision. See @date_format for more information.
4072
+ * @extra [d] will accept a date object, timestamp, or text format. Note that "months" is ambiguous as a unit of time. If the target date falls on a day that does not exist (ie. August 31 -> February 31), the date will be shifted to the last day of the month. Be careful using %monthsAfter% if you need exact precision. See @date_format for more.
4057
4073
  *
4058
4074
  * @set
4059
4075
  * millisecondAfter
@@ -4197,7 +4213,14 @@
4197
4213
  ]
4198
4214
  });
4199
4215
 
4200
- buildDate();
4216
+ buildDateUnits();
4217
+ buildDateMethods();
4218
+ buildCoreInputFormats();
4219
+ buildDateOutputShortcuts();
4220
+ buildAsianDigits();
4221
+ buildRelativeAliases();
4222
+ buildUTCAliases();
4223
+ setDateProperties();
4201
4224
 
4202
4225
 
4203
4226
  /***