sugar-rails 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4311d917d2bd8e082d19c261c3ef63287aa58aa0
4
- data.tar.gz: 4f0f74834bb613be5196257d1a9f602ce37944f5
3
+ metadata.gz: fba3b4ab4f8afef08aeddaf1dcd3207cdce41b49
4
+ data.tar.gz: 0620a0062c3d0ef9b92dfda53bbf3d59f350f52a
5
5
  SHA512:
6
- metadata.gz: 603add75bf31001d58ef8ceb42969add9b08bb6e0aaa95e2c6b0184077939989ab1d792f2b915762d6d7f27ac0a57e5f4ed8cb318fdbdae822f68f6273424b3d
7
- data.tar.gz: dfc82dd09a825fc08dc0b11bb859b5acead96928d8523f0c1d74e186f21123b1567fe0e521b688b676e62e211bff8fbfa8dc8d2133c0d2db13a5683138e269bd
6
+ metadata.gz: 52a704b88be2e13d6c427aad5f51bc426ab565d40ad689824d218a58d7db22113a37567c3a03a34418ff6bfb5a314a844cea46b6f650a9eb3f0be09431b88464
7
+ data.tar.gz: c7bfd37be2ee33a1b5dde2e04c359b943c3c82fdebff4f0f4fd182a59c29f7140dae1885fb02b47e4b6ede90ee1536ef71ba0c2eaea07b86ffcc5e02c6791beb
data/README.md CHANGED
@@ -106,6 +106,8 @@ Many thanks go to the following who have contributed to making this gem even bet
106
106
  * created [Sugar](https://github.com/andrewplummer/Sugar) :)
107
107
  * **[@pierrickrouxel](https://github.com/pierrickrouxel)**
108
108
  * update to support Sugar 1.4.0 and Rails 4.0
109
+ * **[@byroot](https://github.com/byroot)**
110
+ * update to Sugar 1.4.1
109
111
 
110
112
 
111
113
  ## License
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Sugar Library v1.4.0
2
+ * Sugar Library vedge
3
3
  *
4
4
  * Freely distributable and licensed under the MIT-style license.
5
5
  * Copyright (c) 2013 Andrew Plummer
@@ -4848,7 +4848,8 @@
4848
4848
  '{weekday} {2?} {shift} week',
4849
4849
  '{num} {unit=4-5} {sign} {day}',
4850
4850
  '{0?} {date}{1} of {month}',
4851
- '{0?}{month?} {date?}{1?} of {shift} {unit=6-7}'
4851
+ '{0?}{month?} {date?}{1?} of {shift} {unit=6-7}',
4852
+ '{edge} of {day}'
4852
4853
  ]
4853
4854
  });
4854
4855
 
@@ -4870,6 +4871,14 @@
4870
4871
  *
4871
4872
  ***/
4872
4873
 
4874
+ var DATE_UNITS = 'year|month|week|day|hour|minute|(?:milli)?second';
4875
+ var FULL_CAPTURED_DURATION = '((?:\\d+)?\\s*(?:' + DATE_UNITS + '))s?';
4876
+ var RANGE_REG = /(?:from)?\s*(.+)\s+(?:to|until)\s+(.+)$/i;
4877
+ var DURATION_REG = regexp('(\\d+)?\\s*('+ DATE_UNITS +')s?', 'i');
4878
+ var RANGE_REG_FRONT_DURATION = regexp('(?:for)?\\s*'+ FULL_CAPTURED_DURATION +'\\s*(?:starting)?\\s*at\\s*(.+)', 'i');
4879
+ var RANGE_REG_REAR_DURATION = regexp('(.+)\\s*for\\s*' + FULL_CAPTURED_DURATION, 'i');
4880
+
4881
+
4873
4882
  function Range(start, end) {
4874
4883
  this.start = cloneRangeMember(start);
4875
4884
  this.end = cloneRangeMember(end);
@@ -4884,6 +4893,31 @@
4884
4893
  return isDate(m) ? m.getTime() : m.valueOf();
4885
4894
  }
4886
4895
 
4896
+ function getSimpleDate(str) {
4897
+ // Needed as argument numbers are checked internally here.
4898
+ return str == null ? new date() : new date(str);
4899
+ }
4900
+
4901
+ function createRangeFromString(str) {
4902
+ var match, datetime, duration, start, end;
4903
+ if(match = str.match(RANGE_REG)) {
4904
+ return date.range(match[1], match[2]);
4905
+ }
4906
+ if(match = str.match(RANGE_REG_FRONT_DURATION)) {
4907
+ duration = match[1];
4908
+ datetime = match[2];
4909
+ }
4910
+ if(match = str.match(RANGE_REG_REAR_DURATION)) {
4911
+ datetime = match[1];
4912
+ duration = match[2];
4913
+ }
4914
+ if(datetime && duration) {
4915
+ start = date.create(datetime);
4916
+ end = incrementDate(start, getDuration(duration));
4917
+ }
4918
+ return date.range(start, end);
4919
+ }
4920
+
4887
4921
  function cloneRangeMember(m) {
4888
4922
  if(isDate(m)) {
4889
4923
  return new date(m.getTime());
@@ -4902,9 +4936,9 @@
4902
4936
  if(isNumber(amt)) {
4903
4937
  return amt;
4904
4938
  }
4905
- match = amt.toLowerCase().match(/^(\d+)?\s?(\w+?)s?$/i);
4939
+ match = amt.match(DURATION_REG);
4906
4940
  val = parseInt(match[1]) || 1;
4907
- unit = match[2].slice(0,1).toUpperCase() + match[2].slice(1);
4941
+ unit = match[2].slice(0,1).toUpperCase() + match[2].slice(1).toLowerCase();
4908
4942
  if(unit.match(/hour|minute|second/i)) {
4909
4943
  unit += 's';
4910
4944
  } else if(unit === 'Year') {
@@ -5171,20 +5205,32 @@
5171
5205
  * Date.range('today', 'tomorrow')
5172
5206
  *
5173
5207
  ***/
5174
- [number, string, date].forEach(function(klass) {
5175
- extend(klass, false, true, {
5176
5208
 
5177
- 'range': function(start, end) {
5178
- if(klass.create) {
5179
- start = klass.create(start);
5180
- end = klass.create(end);
5181
- }
5182
- return new Range(start, end);
5183
- }
5209
+ function extendRangeConstructor(klass, constructor) {
5210
+ extend(klass, false, true, { 'range': constructor });
5211
+ }
5184
5212
 
5185
- });
5213
+ var PrimitiveRangeConstructor = function(start, end) {
5214
+ return new Range(start, end);
5215
+ };
5216
+
5217
+ var DateRangeConstructor = function(start, end) {
5218
+ if(date.create) {
5219
+ if(arguments.length === 1 && isString(start)) {
5220
+ return createRangeFromString(start);
5221
+ }
5222
+ start = date.create(start);
5223
+ end = date.create(end);
5224
+ } else {
5225
+ start = getSimpleDate(start);
5226
+ end = getSimpleDate(end);
5227
+ }
5228
+ return new Range(start, end);
5229
+ };
5186
5230
 
5187
- });
5231
+ extendRangeConstructor(number, PrimitiveRangeConstructor);
5232
+ extendRangeConstructor(string, PrimitiveRangeConstructor);
5233
+ extendRangeConstructor(date, DateRangeConstructor);
5188
5234
 
5189
5235
  /***
5190
5236
  * Number module
@@ -6000,11 +6046,11 @@
6000
6046
  return !obj && obj !== false && obj !== 0 ? '' : encodeURIComponent(obj).replace(/%20/g, '+');
6001
6047
  }
6002
6048
 
6003
- function matchKey(key, match) {
6049
+ function matchInObject(match, key, value) {
6004
6050
  if(isRegExp(match)) {
6005
6051
  return match.test(key);
6006
6052
  } else if(isObjectType(match)) {
6007
- return hasOwnProperty(match, key);
6053
+ return match[key] === value;
6008
6054
  } else {
6009
6055
  return key === string(match);
6010
6056
  }
@@ -6015,7 +6061,7 @@
6015
6061
  iterateOverObject(obj, function(key, value) {
6016
6062
  match = false;
6017
6063
  flattenedArgs(args, function(arg) {
6018
- if(matchKey(key, arg)) {
6064
+ if(matchInObject(arg, key, value)) {
6019
6065
  match = true;
6020
6066
  }
6021
6067
  }, 1);
@@ -6189,38 +6235,39 @@
6189
6235
  *
6190
6236
  ***/
6191
6237
  'merge': function(target, source, deep, resolve) {
6192
- var key, val, goDeep;
6238
+ var key, sourceIsObject, targetIsObject, sourceVal, targetVal, conflict, result;
6193
6239
  // Strings cannot be reliably merged thanks to
6194
6240
  // their properties not being enumerable in < IE8.
6195
6241
  if(target && typeof source !== 'string') {
6196
6242
  for(key in source) {
6197
6243
  if(!hasOwnProperty(source, key) || !target) continue;
6198
- val = source[key];
6199
- goDeep = deep && isObjectType(val);
6200
- // Conflict!
6201
- if(isDefined(target[key])) {
6202
- // Do not merge.
6203
- if(resolve === false && !goDeep) {
6204
- continue;
6205
- }
6206
- // Use the result of the callback as the result.
6244
+ sourceVal = source[key];
6245
+ targetVal = target[key];
6246
+ conflict = isDefined(targetVal);
6247
+ sourceIsObject = isObjectType(sourceVal);
6248
+ targetIsObject = isObjectType(targetVal);
6249
+ result = conflict && resolve === false ? targetVal : sourceVal;
6250
+
6251
+ if(conflict) {
6207
6252
  if(isFunction(resolve)) {
6208
- val = resolve.call(source, key, target[key], source[key])
6253
+ // Use the result of the callback as the result.
6254
+ result = resolve.call(source, key, targetVal, sourceVal)
6209
6255
  }
6210
6256
  }
6211
- // Deep merging.
6212
- if(goDeep) {
6213
- if(isDate(val)) {
6214
- val = new date(val.getTime());
6215
- } else if(isRegExp(val)) {
6216
- val = new regexp(val.source, getRegExpFlags(val));
6257
+
6258
+ // Going deep
6259
+ if(deep && (sourceIsObject || targetIsObject)) {
6260
+ if(isDate(sourceVal)) {
6261
+ result = new date(sourceVal.getTime());
6262
+ } else if(isRegExp(sourceVal)) {
6263
+ result = new regexp(sourceVal.source, getRegExpFlags(sourceVal));
6217
6264
  } else {
6218
- if(!target[key]) target[key] = array.isArray(val) ? [] : {};
6219
- object.merge(target[key], source[key], deep, resolve);
6265
+ if(!targetIsObject) target[key] = array.isArray(sourceVal) ? [] : {};
6266
+ object.merge(target[key], sourceVal, deep, resolve);
6220
6267
  continue;
6221
6268
  }
6222
6269
  }
6223
- target[key] = val;
6270
+ target[key] = result;
6224
6271
  }
6225
6272
  }
6226
6273
  return target;
@@ -8746,87 +8793,87 @@ Date.addLocale('nl', {
8746
8793
  '{shift} {weekday}'
8747
8794
  ]
8748
8795
  });
8749
- /*
8750
- *
8751
- * Date.addLocale(<code>) adds this locale to Sugar.
8752
- * To set the locale globally, simply call:
8753
- *
8754
- * Date.setLocale('pl');
8755
- *
8756
- * var locale = Date.getLocale(<code>) will return this object, which
8757
- * can be tweaked to change the behavior of parsing/formatting in the locales.
8758
- *
8759
- * locale.addFormat adds a date format (see this file for examples).
8760
- * Special tokens in the date format will be parsed out into regex tokens:
8761
- *
8762
- * {0} is a reference to an entry in locale.optionals. Output: (?:the)?
8763
- * {unit} is a reference to all units. Output: (day|week|month|...)
8764
- * {unit3} is a reference to a specific unit. Output: (hour)
8765
- * {unit3-5} is a reference to a subset of the units array. Output: (hour|day|week)
8766
- * {unit?} "?" makes that token optional. Output: (day|week|month)?
8767
- *
8768
- * {day} Any reference to tokens in the modifiers array will include all with the same name. Output: (yesterday|today|tomorrow)
8769
- *
8770
- * All spaces are optional and will be converted to "\s*"
8771
- *
8772
- * Locale arrays months, weekdays, units, numbers, as well as the "src" field for
8773
- * all entries in the modifiers array follow a special format indicated by a colon:
8774
- *
8775
- * minute:|s = minute|minutes
8776
- * thicke:n|r = thicken|thicker
8777
- *
8778
- * Additionally in the months, weekdays, units, and numbers array these will be added at indexes that are multiples
8779
- * of the relevant number for retrieval. For example having "sunday:|s" in the units array will result in:
8780
- *
8781
- * units: ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sundays']
8782
- *
8783
- * When matched, the index will be found using:
8784
- *
8785
- * units.indexOf(match) % 7;
8786
- *
8787
- * Resulting in the correct index with any number of alternates for that entry.
8788
- *
8789
- */
8790
-
8791
- Date.addLocale('pl', {
8792
- 'plural': true,
8793
- 'months': 'Styczeń|Stycznia,Luty|Lutego,Marzec|Marca,Kwiecień|Kwietnia,Maj|Maja,Czerwiec|Czerwca,Lipiec|Lipca,Sierpień|Sierpnia,Wrzesień|Września,Październik|Października,Listopad|Listopada,Grudzień|Grudnia',
8794
- 'weekdays': 'Niedziela|Niedzielę,Poniedziałek,Wtorek,Środ:a|ę,Czwartek,Piątek,Sobota|Sobotę',
8795
- 'units': 'milisekund:a|y|,sekund:a|y|,minut:a|y|,godzin:a|y|,dzień|dni,tydzień|tygodnie|tygodni,miesiące|miesiące|miesięcy,rok|lata|lat',
8796
- 'numbers': 'jeden|jedną,dwa|dwie,trzy,cztery,pięć,sześć,siedem,osiem,dziewięć,dziesięć',
8797
- 'optionals': 'w|we,roku',
8798
- 'short': '{d} {Month} {yyyy}',
8799
- 'long': '{d} {Month} {yyyy} {H}:{mm}',
8800
- 'full' : '{Weekday}, {d} {Month} {yyyy} {H}:{mm}:{ss}',
8801
- 'past': '{num} {unit} {sign}',
8802
- 'future': '{sign} {num} {unit}',
8803
- 'duration': '{num} {unit}',
8804
- 'timeMarker':'o',
8805
- 'ampm': 'am,pm',
8806
- 'modifiers': [
8807
- { 'name': 'day', 'src': 'przedwczoraj', 'value': -2 },
8808
- { 'name': 'day', 'src': 'wczoraj', 'value': -1 },
8809
- { 'name': 'day', 'src': 'dzisiaj|dziś', 'value': 0 },
8810
- { 'name': 'day', 'src': 'jutro', 'value': 1 },
8811
- { 'name': 'day', 'src': 'pojutrze', 'value': 2 },
8812
- { 'name': 'sign', 'src': 'temu|przed', 'value': -1 },
8813
- { 'name': 'sign', 'src': 'za', 'value': 1 },
8814
- { 'name': 'shift', 'src': 'zeszły|zeszła|ostatni|ostatnia', 'value': -1 },
8815
- { 'name': 'shift', 'src': 'następny|następna|następnego|przyszły|przyszła|przyszłego', 'value': 1 }
8816
- ],
8817
- 'dateParse': [
8818
- '{num} {unit} {sign}',
8819
- '{sign} {num} {unit}',
8820
- '{month} {year}',
8821
- '{shift} {unit=5-7}',
8822
- '{0} {shift?} {weekday}'
8823
- ],
8824
- 'timeParse': [
8825
- '{date} {month} {year?} {1}',
8826
- '{0} {shift?} {weekday}'
8827
- ]
8828
- });
8829
-
8796
+ /*
8797
+ *
8798
+ * Date.addLocale(<code>) adds this locale to Sugar.
8799
+ * To set the locale globally, simply call:
8800
+ *
8801
+ * Date.setLocale('pl');
8802
+ *
8803
+ * var locale = Date.getLocale(<code>) will return this object, which
8804
+ * can be tweaked to change the behavior of parsing/formatting in the locales.
8805
+ *
8806
+ * locale.addFormat adds a date format (see this file for examples).
8807
+ * Special tokens in the date format will be parsed out into regex tokens:
8808
+ *
8809
+ * {0} is a reference to an entry in locale.optionals. Output: (?:the)?
8810
+ * {unit} is a reference to all units. Output: (day|week|month|...)
8811
+ * {unit3} is a reference to a specific unit. Output: (hour)
8812
+ * {unit3-5} is a reference to a subset of the units array. Output: (hour|day|week)
8813
+ * {unit?} "?" makes that token optional. Output: (day|week|month)?
8814
+ *
8815
+ * {day} Any reference to tokens in the modifiers array will include all with the same name. Output: (yesterday|today|tomorrow)
8816
+ *
8817
+ * All spaces are optional and will be converted to "\s*"
8818
+ *
8819
+ * Locale arrays months, weekdays, units, numbers, as well as the "src" field for
8820
+ * all entries in the modifiers array follow a special format indicated by a colon:
8821
+ *
8822
+ * minute:|s = minute|minutes
8823
+ * thicke:n|r = thicken|thicker
8824
+ *
8825
+ * Additionally in the months, weekdays, units, and numbers array these will be added at indexes that are multiples
8826
+ * of the relevant number for retrieval. For example having "sunday:|s" in the units array will result in:
8827
+ *
8828
+ * units: ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sundays']
8829
+ *
8830
+ * When matched, the index will be found using:
8831
+ *
8832
+ * units.indexOf(match) % 7;
8833
+ *
8834
+ * Resulting in the correct index with any number of alternates for that entry.
8835
+ *
8836
+ */
8837
+
8838
+ Date.addLocale('pl', {
8839
+ 'plural': true,
8840
+ 'months': 'Styczeń|Stycznia,Luty|Lutego,Marzec|Marca,Kwiecień|Kwietnia,Maj|Maja,Czerwiec|Czerwca,Lipiec|Lipca,Sierpień|Sierpnia,Wrzesień|Września,Październik|Października,Listopad|Listopada,Grudzień|Grudnia',
8841
+ 'weekdays': 'Niedziela|Niedzielę,Poniedziałek,Wtorek,Środ:a|ę,Czwartek,Piątek,Sobota|Sobotę',
8842
+ 'units': 'milisekund:a|y|,sekund:a|y|,minut:a|y|,godzin:a|y|,dzień|dni,tydzień|tygodnie|tygodni,miesiące|miesiące|miesięcy,rok|lata|lat',
8843
+ 'numbers': 'jeden|jedną,dwa|dwie,trzy,cztery,pięć,sześć,siedem,osiem,dziewięć,dziesięć',
8844
+ 'optionals': 'w|we,roku',
8845
+ 'short': '{d} {Month} {yyyy}',
8846
+ 'long': '{d} {Month} {yyyy} {H}:{mm}',
8847
+ 'full' : '{Weekday}, {d} {Month} {yyyy} {H}:{mm}:{ss}',
8848
+ 'past': '{num} {unit} {sign}',
8849
+ 'future': '{sign} {num} {unit}',
8850
+ 'duration': '{num} {unit}',
8851
+ 'timeMarker':'o',
8852
+ 'ampm': 'am,pm',
8853
+ 'modifiers': [
8854
+ { 'name': 'day', 'src': 'przedwczoraj', 'value': -2 },
8855
+ { 'name': 'day', 'src': 'wczoraj', 'value': -1 },
8856
+ { 'name': 'day', 'src': 'dzisiaj|dziś', 'value': 0 },
8857
+ { 'name': 'day', 'src': 'jutro', 'value': 1 },
8858
+ { 'name': 'day', 'src': 'pojutrze', 'value': 2 },
8859
+ { 'name': 'sign', 'src': 'temu|przed', 'value': -1 },
8860
+ { 'name': 'sign', 'src': 'za', 'value': 1 },
8861
+ { 'name': 'shift', 'src': 'zeszły|zeszła|ostatni|ostatnia', 'value': -1 },
8862
+ { 'name': 'shift', 'src': 'następny|następna|następnego|przyszły|przyszła|przyszłego', 'value': 1 }
8863
+ ],
8864
+ 'dateParse': [
8865
+ '{num} {unit} {sign}',
8866
+ '{sign} {num} {unit}',
8867
+ '{month} {year}',
8868
+ '{shift} {unit=5-7}',
8869
+ '{0} {shift?} {weekday}'
8870
+ ],
8871
+ 'timeParse': [
8872
+ '{date} {month} {year?} {1}',
8873
+ '{0} {shift?} {weekday}'
8874
+ ]
8875
+ });
8876
+
8830
8877
  /*
8831
8878
  *
8832
8879
  * Date.addLocale(<code>) adds this locale to Sugar.
@@ -9124,7 +9171,7 @@ Date.addLocale('sv', {
9124
9171
  Date.addLocale('zh-CN', {
9125
9172
  'variant': true,
9126
9173
  'monthSuffix': '月',
9127
- 'weekdays': '星期日|周日,星期一|周一,星期二|周二,星期三|周三,星期四|周四,星期五|周五,星期六|周六',
9174
+ 'weekdays': '星期日|周日|星期天,星期一|周一,星期二|周二,星期三|周三,星期四|周四,星期五|周五,星期六|周六',
9128
9175
  'units': '毫秒,秒钟,分钟,小时,天,个星期|周,个月,年',
9129
9176
  'tokens': '日|号',
9130
9177
  'short':'{yyyy}年{M}月{d}日',
@@ -9136,11 +9183,13 @@ Date.addLocale('zh-CN', {
9136
9183
  'timeSuffixes': '点|时,分钟?,秒',
9137
9184
  'ampm': '上午,下午',
9138
9185
  'modifiers': [
9186
+ { 'name': 'day', 'src': '大前天', 'value': -3 },
9139
9187
  { 'name': 'day', 'src': '前天', 'value': -2 },
9140
9188
  { 'name': 'day', 'src': '昨天', 'value': -1 },
9141
9189
  { 'name': 'day', 'src': '今天', 'value': 0 },
9142
9190
  { 'name': 'day', 'src': '明天', 'value': 1 },
9143
9191
  { 'name': 'day', 'src': '后天', 'value': 2 },
9192
+ { 'name': 'day', 'src': '大后天', 'value': 3 },
9144
9193
  { 'name': 'sign', 'src': '前', 'value': -1 },
9145
9194
  { 'name': 'sign', 'src': '后', 'value': 1 },
9146
9195
  { 'name': 'shift', 'src': '上|去', 'value': -1 },
@@ -9205,7 +9254,7 @@ Date.addLocale('zh-CN', {
9205
9254
 
9206
9255
  Date.addLocale('zh-TW', {
9207
9256
  'monthSuffix': '月',
9208
- 'weekdays': '星期日|週日,星期一|週一,星期二|週二,星期三|週三,星期四|週四,星期五|週五,星期六|週六',
9257
+ 'weekdays': '星期日|週日|星期天,星期一|週一,星期二|週二,星期三|週三,星期四|週四,星期五|週五,星期六|週六',
9209
9258
  'units': '毫秒,秒鐘,分鐘,小時,天,個星期|週,個月,年',
9210
9259
  'tokens': '日|號',
9211
9260
  'short':'{yyyy}年{M}月{d}日',
@@ -9217,11 +9266,13 @@ Date.addLocale('zh-TW', {
9217
9266
  'timeSuffixes': '點|時,分鐘?,秒',
9218
9267
  'ampm': '上午,下午',
9219
9268
  'modifiers': [
9269
+ { 'name': 'day', 'src': '大前天', 'value': -3 },
9220
9270
  { 'name': 'day', 'src': '前天', 'value': -2 },
9221
9271
  { 'name': 'day', 'src': '昨天', 'value': -1 },
9222
9272
  { 'name': 'day', 'src': '今天', 'value': 0 },
9223
9273
  { 'name': 'day', 'src': '明天', 'value': 1 },
9224
9274
  { 'name': 'day', 'src': '後天', 'value': 2 },
9275
+ { 'name': 'day', 'src': '大後天', 'value': 3 },
9225
9276
  { 'name': 'sign', 'src': '前', 'value': -1 },
9226
9277
  { 'name': 'sign', 'src': '後', 'value': 1 },
9227
9278
  { 'name': 'shift', 'src': '上|去', 'value': -1 },
@@ -9241,4 +9292,4 @@ Date.addLocale('zh-TW', {
9241
9292
  });
9242
9293
 
9243
9294
 
9244
- })();
9295
+ }).call(this);
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Sugar Library v1.4.0
2
+ * Sugar Library vedge
3
3
  *
4
4
  * Freely distributable and licensed under the MIT-style license.
5
5
  * Copyright (c) 2013 Andrew Plummer
@@ -7,42 +7,42 @@
7
7
  *
8
8
  * ---------------------------- */
9
9
  (function(){function aa(a){return function(){return a}}
10
- var l=Object,p=Array,q=RegExp,r=Date,s=String,t=Number,u=Math,ba="undefined"!==typeof global?global:this,v=l.prototype.toString,da=l.prototype.hasOwnProperty,ea=l.defineProperty&&l.defineProperties,fa="function"===typeof q(),ga=!("0"in new s("a")),ia={},ja=/^\[object Date|Array|String|Number|RegExp|Boolean|Arguments\]$/,w="Boolean Number String Array Date RegExp Function".split(" "),la=ka("boolean",w[0]),x=ka("number",w[1]),y=ka("string",w[2]),A=ma(w[3]),C=ma(w[4]),D=ma(w[5]),F=ma(w[6]);
10
+ var m=Object,p=Array,q=RegExp,r=Date,s=String,t=Number,u=Math,ba="undefined"!==typeof global?global:this,v=m.prototype.toString,da=m.prototype.hasOwnProperty,ea=m.defineProperty&&m.defineProperties,fa="function"===typeof q(),ga=!("0"in new s("a")),ia={},ja=/^\[object Date|Array|String|Number|RegExp|Boolean|Arguments\]$/,w="Boolean Number String Array Date RegExp Function".split(" "),la=ka("boolean",w[0]),x=ka("number",w[1]),z=ka("string",w[2]),A=ma(w[3]),C=ma(w[4]),D=ma(w[5]),F=ma(w[6]);
11
11
  function ma(a){var b="Array"===a&&p.isArray||function(b,d){return(d||v.call(b))==="[object "+a+"]"};return ia[a]=b}function ka(a,b){function c(c){return G(c)?v.call(c)==="[object "+b+"]":typeof c===a}return ia[b]=c}
12
- function na(a){a.SugarMethods||(oa(a,"SugarMethods",{}),H(a,!1,!0,{extend:function(b,c,d){H(a,!1!==d,c,b)},sugarRestore:function(){return pa(this,a,arguments,function(a,c,d){oa(a,c,d.method)})},sugarRevert:function(){return pa(this,a,arguments,function(a,c,d){d.existed?oa(a,c,d.original):delete a[c]})}}))}function H(a,b,c,d){var e=b?a.prototype:a;na(a);I(d,function(d,f){var h=e[d],m=J(e,d);F(c)&&h&&(f=qa(h,f,c));!1===c&&h||oa(e,d,f);a.SugarMethods[d]={method:f,existed:m,original:h,instance:b}})}
13
- function K(a,b,c,d,e){var g={};d=y(d)?d.split(","):d;d.forEach(function(a,b){e(g,a,b)});H(a,b,c,g)}function pa(a,b,c,d){var e=0===c.length,g=L(c),f=!1;I(b.SugarMethods,function(b,c){if(e||-1!==g.indexOf(b))f=!0,d(c.instance?a.prototype:a,b,c)});return f}function qa(a,b,c){return function(d){return c.apply(this,arguments)?b.apply(this,arguments):a.apply(this,arguments)}}function oa(a,b,c){ea?l.defineProperty(a,b,{value:c,configurable:!0,enumerable:!1,writable:!0}):a[b]=c}
12
+ function na(a){a.SugarMethods||(oa(a,"SugarMethods",{}),H(a,!1,!0,{extend:function(b,c,d){H(a,!1!==d,c,b)},sugarRestore:function(){return pa(this,a,arguments,function(a,c,d){oa(a,c,d.method)})},sugarRevert:function(){return pa(this,a,arguments,function(a,c,d){d.existed?oa(a,c,d.original):delete a[c]})}}))}function H(a,b,c,d){var e=b?a.prototype:a;na(a);I(d,function(d,f){var h=e[d],l=J(e,d);F(c)&&h&&(f=qa(h,f,c));!1===c&&h||oa(e,d,f);a.SugarMethods[d]={method:f,existed:l,original:h,instance:b}})}
13
+ function K(a,b,c,d,e){var g={};d=z(d)?d.split(","):d;d.forEach(function(a,b){e(g,a,b)});H(a,b,c,g)}function pa(a,b,c,d){var e=0===c.length,g=L(c),f=!1;I(b.SugarMethods,function(b,c){if(e||-1!==g.indexOf(b))f=!0,d(c.instance?a.prototype:a,b,c)});return f}function qa(a,b,c){return function(d){return c.apply(this,arguments)?b.apply(this,arguments):a.apply(this,arguments)}}function oa(a,b,c){ea?m.defineProperty(a,b,{value:c,configurable:!0,enumerable:!1,writable:!0}):a[b]=c}
14
14
  function L(a,b,c){var d=[];c=c||0;var e;for(e=a.length;c<e;c++)d.push(a[c]),b&&b.call(a,a[c],c);return d}function sa(a,b,c){var d=a[c||0];A(d)&&(a=d,c=0);L(a,b,c)}function ta(a){if(!a||!a.call)throw new TypeError("Callback is not callable");}function M(a){return void 0!==a}function N(a){return void 0===a}function J(a,b){return!!a&&da.call(a,b)}function G(a){return!!a&&("object"===typeof a||fa&&D(a))}function ua(a){var b=typeof a;return null==a||"string"===b||"number"===b||"boolean"===b}
15
- function va(a,b){b=b||v.call(a);try{if(a&&a.constructor&&!J(a,"constructor")&&!J(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}return!!a&&"[object Object]"===b&&"hasOwnProperty"in a}function I(a,b){for(var c in a)if(J(a,c)&&!1===b.call(a,c,a[c],a))break}function wa(a,b){for(var c=0;c<a;c++)b(c)}function xa(a,b){I(b,function(c){a[c]=b[c]});return a}function ya(a){ua(a)&&(a=l(a));if(ga&&y(a))for(var b=a,c=0,d;d=b.charAt(c);)b[c++]=d;return a}function O(a){xa(this,ya(a))}
16
- O.prototype.constructor=l;var P=u.abs,za=u.pow,Aa=u.ceil,Q=u.floor,R=u.round,Ca=u.min,S=u.max;function Da(a,b,c){var d=za(10,P(b||0));c=c||R;0>b&&(d=1/d);return c(a*d)/d}var Ea=48,Fa=57,Ga=65296,Ha=65305,Ia=".",Ja="",Ka={},La;function Ma(){return"\t\n\x0B\f\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u2028\u2029\u3000\ufeff"}function Na(a,b){var c="";for(a=a.toString();0<b;)if(b&1&&(c+=a),b>>=1)a+=a;return c}
15
+ function va(a,b){b=b||v.call(a);try{if(a&&a.constructor&&!J(a,"constructor")&&!J(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}return!!a&&"[object Object]"===b&&"hasOwnProperty"in a}function I(a,b){for(var c in a)if(J(a,c)&&!1===b.call(a,c,a[c],a))break}function wa(a,b){for(var c=0;c<a;c++)b(c)}function xa(a,b){I(b,function(c){a[c]=b[c]});return a}function ya(a){ua(a)&&(a=m(a));if(ga&&z(a))for(var b=a,c=0,d;d=b.charAt(c);)b[c++]=d;return a}function O(a){xa(this,ya(a))}
16
+ O.prototype.constructor=m;var P=u.abs,za=u.pow,Aa=u.ceil,Q=u.floor,R=u.round,Ca=u.min,S=u.max;function Da(a,b,c){var d=za(10,P(b||0));c=c||R;0>b&&(d=1/d);return c(a*d)/d}var Ea=48,Fa=57,Ga=65296,Ha=65305,Ia=".",Ja="",Ka={},La;function Ma(){return"\t\n\x0B\f\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u2028\u2029\u3000\ufeff"}function Na(a,b){var c="";for(a=a.toString();0<b;)if(b&1&&(c+=a),b>>=1)a+=a;return c}
17
17
  function Oa(a,b){var c,d;c=a.replace(La,function(a){a=Ka[a];a===Ia&&(d=!0);return a});return d?parseFloat(c):parseInt(c,b||10)}function T(a,b,c,d){d=P(a).toString(d||10);d=Na("0",b-d.replace(/\.\d+/,"").length)+d;if(c||0>a)d=(0>a?"-":"+")+d;return d}function Pa(a){if(11<=a&&13>=a)return"th";switch(a%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}
18
- function Qa(a,b){function c(a,c){if(a||-1<b.indexOf(c))d+=c}var d="";b=b||"";c(a.multiline,"m");c(a.ignoreCase,"i");c(a.global,"g");c(a.u,"y");return d}function Ra(a){y(a)||(a=s(a));return a.replace(/([\\/\'*+?|()\[\]{}.^$])/g,"\\$1")}function U(a,b){return a["get"+(a._utc?"UTC":"")+b]()}function Sa(a,b,c){return a["set"+(a._utc&&"ISOWeek"!=b?"UTC":"")+b](c)}
19
- function Ta(a,b){var c=typeof a,d,e,g,f,h,m,n;if("string"===c)return a;g=v.call(a);d=va(a,g);e=A(a,g);if(null!=a&&d||e){b||(b=[]);if(1<b.length)for(m=b.length;m--;)if(b[m]===a)return"CYC";b.push(a);d=a.valueOf()+s(a.constructor);f=e?a:l.keys(a).sort();m=0;for(n=f.length;m<n;m++)h=e?m:f[m],d+=h+Ta(a[h],b);b.pop()}else d=-Infinity===1/a?"-0":s(a&&a.valueOf?a.valueOf():a);return c+g+d}function Ua(a,b){return a===b?0!==a||1/a===1/b:Va(a)&&Va(b)?Ta(a)===Ta(b):!1}
20
- function Va(a){var b=v.call(a);return ja.test(b)||va(a,b)}function Wa(a,b,c){var d,e=a.length,g=b.length,f=!1!==b[g-1];if(!(g>(f?1:2)))return Xa(a,e,b[0],f,c);d=[];L(b,function(b){if(la(b))return!1;d.push(Xa(a,e,b,f,c))});return d}function Xa(a,b,c,d,e){d&&(c%=b,0>c&&(c=b+c));return e?a.charAt(c):a[c]}function Ya(a,b){K(b,!0,!1,a,function(a,b){a[b+("equal"===b?"s":"")]=function(){return l[b].apply(null,[this].concat(L(arguments)))}})}na(l);I(w,function(a,b){na(ba[b])});var Za,$a;
18
+ function Qa(a,b){function c(a,c){if(a||-1<b.indexOf(c))d+=c}var d="";b=b||"";c(a.multiline,"m");c(a.ignoreCase,"i");c(a.global,"g");c(a.u,"y");return d}function Ra(a){z(a)||(a=s(a));return a.replace(/([\\/\'*+?|()\[\]{}.^$])/g,"\\$1")}function U(a,b){return a["get"+(a._utc?"UTC":"")+b]()}function Sa(a,b,c){return a["set"+(a._utc&&"ISOWeek"!=b?"UTC":"")+b](c)}
19
+ function Ta(a,b){var c=typeof a,d,e,g,f,h,l,n;if("string"===c)return a;g=v.call(a);d=va(a,g);e=A(a,g);if(null!=a&&d||e){b||(b=[]);if(1<b.length)for(l=b.length;l--;)if(b[l]===a)return"CYC";b.push(a);d=a.valueOf()+s(a.constructor);f=e?a:m.keys(a).sort();l=0;for(n=f.length;l<n;l++)h=e?l:f[l],d+=h+Ta(a[h],b);b.pop()}else d=-Infinity===1/a?"-0":s(a&&a.valueOf?a.valueOf():a);return c+g+d}function Ua(a,b){return a===b?0!==a||1/a===1/b:Va(a)&&Va(b)?Ta(a)===Ta(b):!1}
20
+ function Va(a){var b=v.call(a);return ja.test(b)||va(a,b)}function Wa(a,b,c){var d,e=a.length,g=b.length,f=!1!==b[g-1];if(!(g>(f?1:2)))return Xa(a,e,b[0],f,c);d=[];L(b,function(b){if(la(b))return!1;d.push(Xa(a,e,b,f,c))});return d}function Xa(a,b,c,d,e){d&&(c%=b,0>c&&(c=b+c));return e?a.charAt(c):a[c]}function Ya(a,b){K(b,!0,!1,a,function(a,b){a[b+("equal"===b?"s":"")]=function(){return m[b].apply(null,[this].concat(L(arguments)))}})}na(m);I(w,function(a,b){na(ba[b])});var Za,$a;
21
21
  for($a=0;9>=$a;$a++)Za=s.fromCharCode($a+Ga),Ja+=Za,Ka[Za]=s.fromCharCode($a+Ea);Ka[","]="";Ka["\uff0e"]=Ia;Ka[Ia]=Ia;La=q("["+Ja+"\uff0e,"+Ia+"]","g");
22
- "use strict";H(l,!1,!1,{keys:function(a){var b=[];if(!G(a)&&!D(a)&&!F(a))throw new TypeError("Object required");I(a,function(a){b.push(a)});return b}});
22
+ "use strict";H(m,!1,!1,{keys:function(a){var b=[];if(!G(a)&&!D(a)&&!F(a))throw new TypeError("Object required");I(a,function(a){b.push(a)});return b}});
23
23
  function ab(a,b,c,d){var e=a.length,g=-1==d,f=g?e-1:0;c=isNaN(c)?f:parseInt(c>>0);0>c&&(c=e+c);if(!g&&0>c||g&&c>=e)c=f;for(;g&&0<=c||!g&&c<e;){if(a[c]===b)return c;c+=d}return-1}function bb(a,b,c,d){var e=a.length,g=0,f=M(c);ta(b);if(0!=e||f)f||(c=a[d?e-1:g],g++);else throw new TypeError("Reduce called on empty array with no initial value");for(;g<e;)f=d?e-g-1:g,f in a&&(c=b(c,a[f],f,a)),g++;return c}function cb(a){if(0===a.length)throw new TypeError("First argument must be defined");}H(p,!1,!1,{isArray:function(a){return A(a)}});
24
24
  H(p,!0,!1,{every:function(a,b){var c=this.length,d=0;for(cb(arguments);d<c;){if(d in this&&!a.call(b,this[d],d,this))return!1;d++}return!0},some:function(a,b){var c=this.length,d=0;for(cb(arguments);d<c;){if(d in this&&a.call(b,this[d],d,this))return!0;d++}return!1},map:function(a,b){b=arguments[1];var c=this.length,d=0,e=Array(c);for(cb(arguments);d<c;)d in this&&(e[d]=a.call(b,this[d],d,this)),d++;return e},filter:function(a){var b=arguments[1],c=this.length,d=0,e=[];for(cb(arguments);d<c;)d in
25
- this&&a.call(b,this[d],d,this)&&e.push(this[d]),d++;return e},indexOf:function(a,b){return y(this)?this.indexOf(a,b):ab(this,a,b,1)},lastIndexOf:function(a,b){return y(this)?this.lastIndexOf(a,b):ab(this,a,b,-1)},forEach:function(a,b){var c=this.length,d=0;for(ta(a);d<c;)d in this&&a.call(b,this[d],d,this),d++},reduce:function(a,b){return bb(this,a,b)},reduceRight:function(a,b){return bb(this,a,b,!0)}});
25
+ this&&a.call(b,this[d],d,this)&&e.push(this[d]),d++;return e},indexOf:function(a,b){return z(this)?this.indexOf(a,b):ab(this,a,b,1)},lastIndexOf:function(a,b){return z(this)?this.lastIndexOf(a,b):ab(this,a,b,-1)},forEach:function(a,b){var c=this.length,d=0;for(ta(a);d<c;)d in this&&a.call(b,this[d],d,this),d++},reduce:function(a,b){return bb(this,a,b)},reduceRight:function(a,b){return bb(this,a,b,!0)}});
26
26
  H(Function,!0,!1,{bind:function(a){var b=this,c=L(arguments,null,1),d;if(!F(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(L(arguments)))};d.prototype=this.prototype;return d}});H(r,!1,!1,{now:function(){return(new r).getTime()}});
27
27
  (function(){var a=Ma().match(/^\s+$/);try{s.prototype.trim.call([1])}catch(b){a=!1}H(s,!0,!a,{trim:function(){return this.toString().trimLeft().trimRight()},trimLeft:function(){return this.replace(q("^["+Ma()+"]+"),"")},trimRight:function(){return this.replace(q("["+Ma()+"]+$"),"")}})})();
28
28
  (function(){var a=new r(r.UTC(1999,11,31)),a=a.toISOString&&"1999-12-31T00:00:00.000Z"===a.toISOString();K(r,!0,!a,"toISOString,toJSON",function(a,c){a[c]=function(){return T(this.getUTCFullYear(),4)+"-"+T(this.getUTCMonth()+1,2)+"-"+T(this.getUTCDate(),2)+"T"+T(this.getUTCHours(),2)+":"+T(this.getUTCMinutes(),2)+":"+T(this.getUTCSeconds(),2)+"."+T(this.getUTCMilliseconds(),3)+"Z"}})})();
29
29
  "use strict";function db(a){a=q(a);return function(b){return a.test(b)}}
30
30
  function eb(a){var b=a.getTime();return function(a){return!(!a||!a.getTime)&&a.getTime()===b}}function fb(a){return function(b,c,d){return b===a||a.call(this,b,c,d)}}function gb(a){return function(b,c,d){return b===a||a.call(d,c,b,d)}}function hb(a,b){var c={};return function(d,e,g){var f;if(!G(d))return!1;for(f in a)if(c[f]=c[f]||ib(a[f],b),!1===c[f].call(g,d[f],e,g))return!1;return!0}}function jb(a){return function(b){return b===a||Ua(b,a)}}
31
31
  function ib(a,b){if(!ua(a)){if(D(a))return db(a);if(C(a))return eb(a);if(F(a))return b?gb(a):fb(a);if(va(a))return hb(a,b)}return jb(a)}function kb(a,b,c,d){return b?b.apply?b.apply(c,d||[]):F(a[b])?a[b].call(a):a[b]:a}function V(a,b,c,d){var e=+a.length;0>c&&(c=a.length+c);c=isNaN(c)?0:c;for(!0===d&&(e+=c);c<e;){d=c%a.length;if(!(d in a)){lb(a,b,c);break}if(!1===b.call(a,a[d],d,a))break;c++}}
32
- function lb(a,b,c){var d=[],e;for(e in a)e in a&&(e>>>0==e&&4294967295!=e)&&e>=c&&d.push(parseInt(e));d.sort().each(function(c){return b.call(a,a[c],c,a)})}function mb(a,b,c,d,e,g){var f,h,m;0<a.length&&(m=ib(b),V(a,function(b,c){if(m.call(g,b,c,a))return f=b,h=c,!1},c,d));return e?h:f}function nb(a,b){var c=[],d={},e;V(a,function(g,f){e=b?kb(g,b,a,[g,f,a]):g;ob(d,e)||c.push(g)});return c}
33
- function pb(a,b,c){var d=[],e={};b.each(function(a){ob(e,a)});a.each(function(a){var b=Ta(a),h=!Va(a);if(qb(e,b,a,h)!==c){var m=0;if(h)for(b=e[b];m<b.length;)b[m]===a?b.splice(m,1):m+=1;else delete e[b];d.push(a)}});return d}function rb(a,b,c){b=b||Infinity;c=c||0;var d=[];V(a,function(a){A(a)&&c<b?d=d.concat(rb(a,b,c+1)):d.push(a)});return d}function sb(a){var b=[];L(a,function(a){b=b.concat(a)});return b}function qb(a,b,c,d){var e=b in a;d&&(a[b]||(a[b]=[]),e=-1!==a[b].indexOf(c));return e}
34
- function ob(a,b){var c=Ta(b),d=!Va(b),e=qb(a,c,b,d);d?a[c].push(b):a[c]=b;return e}function tb(a,b,c,d){var e,g,f,h=[],m="max"===c,n="min"===c,z=p.isArray(a);for(e in a)if(a.hasOwnProperty(e)){c=a[e];f=kb(c,b,a,z?[c,parseInt(e),a]:[]);if(N(f))throw new TypeError("Cannot compare with undefined");if(f===g)h.push(c);else if(N(g)||m&&f>g||n&&f<g)h=[c],g=f}z||(h=rb(h,1));return d?h:h[0]}
35
- function ub(a,b){var c,d,e,g,f=0,h=0;c=p[xb];d=p[yb];var m=p[zb],n=p[Ab],z=p[Bb];a=Cb(a,c,d);b=Cb(b,c,d);do c=a.charAt(f),e=m[c]||c,c=b.charAt(f),g=m[c]||c,c=e?n.indexOf(e):null,d=g?n.indexOf(g):null,-1===c||-1===d?(c=a.charCodeAt(f)||null,d=b.charCodeAt(f)||null,z&&((c>=Ea&&c<=Fa||c>=Ga&&c<=Ha)&&(d>=Ea&&d<=Fa||d>=Ga&&d<=Ha))&&(c=Oa(a.slice(f)),d=Oa(b.slice(f)))):(e=e!==a.charAt(f),g=g!==b.charAt(f),e!==g&&0===h&&(h=e-g)),f+=1;while(null!=c&&null!=d&&c===d);return c===d?h:c-d}
36
- function Cb(a,b,c){y(a)||(a=s(a));c&&(a=a.toLowerCase());b&&(a=a.replace(b,""));return a}var Ab="AlphanumericSortOrder",xb="AlphanumericSortIgnore",yb="AlphanumericSortIgnoreCase",zb="AlphanumericSortEquivalents",Bb="AlphanumericSortNatural";H(p,!1,!0,{create:function(){var a=[];L(arguments,function(b){if(!ua(b)&&"length"in b&&("[object Arguments]"===v.call(b)||b.callee)||!ua(b)&&"length"in b&&!y(b)&&!va(b))b=p.prototype.slice.call(b,0);a=a.concat(b)});return a}});
32
+ function lb(a,b,c){var d=[],e;for(e in a)e in a&&(e>>>0==e&&4294967295!=e)&&e>=c&&d.push(parseInt(e));d.sort().each(function(c){return b.call(a,a[c],c,a)})}function mb(a,b,c,d,e,g){var f,h,l;0<a.length&&(l=ib(b),V(a,function(b,c){if(l.call(g,b,c,a))return f=b,h=c,!1},c,d));return e?h:f}function nb(a,b){var c=[],d={},e;V(a,function(g,f){e=b?kb(g,b,a,[g,f,a]):g;ob(d,e)||c.push(g)});return c}
33
+ function pb(a,b,c){var d=[],e={};b.each(function(a){ob(e,a)});a.each(function(a){var b=Ta(a),h=!Va(a);if(qb(e,b,a,h)!==c){var l=0;if(h)for(b=e[b];l<b.length;)b[l]===a?b.splice(l,1):l+=1;else delete e[b];d.push(a)}});return d}function rb(a,b,c){b=b||Infinity;c=c||0;var d=[];V(a,function(a){A(a)&&c<b?d=d.concat(rb(a,b,c+1)):d.push(a)});return d}function sb(a){var b=[];L(a,function(a){b=b.concat(a)});return b}function qb(a,b,c,d){var e=b in a;d&&(a[b]||(a[b]=[]),e=-1!==a[b].indexOf(c));return e}
34
+ function ob(a,b){var c=Ta(b),d=!Va(b),e=qb(a,c,b,d);d?a[c].push(b):a[c]=b;return e}function tb(a,b,c,d){var e,g,f,h=[],l="max"===c,n="min"===c,y=p.isArray(a);for(e in a)if(a.hasOwnProperty(e)){c=a[e];f=kb(c,b,a,y?[c,parseInt(e),a]:[]);if(N(f))throw new TypeError("Cannot compare with undefined");if(f===g)h.push(c);else if(N(g)||l&&f>g||n&&f<g)h=[c],g=f}y||(h=rb(h,1));return d?h:h[0]}
35
+ function ub(a,b){var c,d,e,g,f=0,h=0;c=p[xb];d=p[yb];var l=p[zb],n=p[Ab],y=p[Bb];a=Cb(a,c,d);b=Cb(b,c,d);do c=a.charAt(f),e=l[c]||c,c=b.charAt(f),g=l[c]||c,c=e?n.indexOf(e):null,d=g?n.indexOf(g):null,-1===c||-1===d?(c=a.charCodeAt(f)||null,d=b.charCodeAt(f)||null,y&&((c>=Ea&&c<=Fa||c>=Ga&&c<=Ha)&&(d>=Ea&&d<=Fa||d>=Ga&&d<=Ha))&&(c=Oa(a.slice(f)),d=Oa(b.slice(f)))):(e=e!==a.charAt(f),g=g!==b.charAt(f),e!==g&&0===h&&(h=e-g)),f+=1;while(null!=c&&null!=d&&c===d);return c===d?h:c-d}
36
+ function Cb(a,b,c){z(a)||(a=s(a));c&&(a=a.toLowerCase());b&&(a=a.replace(b,""));return a}var Ab="AlphanumericSortOrder",xb="AlphanumericSortIgnore",yb="AlphanumericSortIgnoreCase",zb="AlphanumericSortEquivalents",Bb="AlphanumericSortNatural";H(p,!1,!0,{create:function(){var a=[];L(arguments,function(b){if(!ua(b)&&"length"in b&&("[object Arguments]"===v.call(b)||b.callee)||!ua(b)&&"length"in b&&!z(b)&&!va(b))b=p.prototype.slice.call(b,0);a=a.concat(b)});return a}});
37
37
  H(p,!0,!1,{find:function(a,b){ta(a);return mb(this,a,0,!1,!1,b)},findIndex:function(a,b){var c;ta(a);c=mb(this,a,0,!1,!0,b);return N(c)?-1:c}});
38
38
  H(p,!0,!0,{findFrom:function(a,b,c){return mb(this,a,b,c)},findIndexFrom:function(a,b,c){b=mb(this,a,b,c,!0);return N(b)?-1:b},findAll:function(a,b,c){var d=[],e;0<this.length&&(e=ib(a),V(this,function(a,b,c){e(a,b,c)&&d.push(a)},b,c));return d},count:function(a){return N(a)?this.length:this.findAll(a).length},removeAt:function(a,b){if(N(a))return this;N(b)&&(b=a);this.splice(a,b-a+1);return this},include:function(a,b){return this.clone().add(a,b)},exclude:function(){return p.prototype.remove.apply(this.clone(),
39
39
  arguments)},clone:function(){return xa([],this)},unique:function(a){return nb(this,a)},flatten:function(a){return rb(this,a)},union:function(){return nb(this.concat(sb(arguments)))},intersect:function(){return pb(this,sb(arguments),!1)},subtract:function(a){return pb(this,sb(arguments),!0)},at:function(){return Wa(this,arguments)},first:function(a){if(N(a))return this[0];0>a&&(a=0);return this.slice(0,a)},last:function(a){return N(a)?this[this.length-1]:this.slice(0>this.length-a?0:this.length-a)},
40
40
  from:function(a){return this.slice(a)},to:function(a){N(a)&&(a=this.length);return this.slice(0,a)},min:function(a,b){return tb(this,a,"min",b)},max:function(a,b){return tb(this,a,"max",b)},least:function(a,b){return tb(this.groupBy.apply(this,[a]),"length","min",b)},most:function(a,b){return tb(this.groupBy.apply(this,[a]),"length","max",b)},sum:function(a){a=a?this.map(a):this;return 0<a.length?a.reduce(function(a,c){return a+c}):0},average:function(a){a=a?this.map(a):this;return 0<a.length?a.sum()/
41
41
  a.length:0},inGroups:function(a,b){var c=1<arguments.length,d=this,e=[],g=Aa(this.length/a);wa(a,function(a){a*=g;var h=d.slice(a,a+g);c&&h.length<g&&wa(g-h.length,function(){h=h.add(b)});e.push(h)});return e},inGroupsOf:function(a,b){var c=[],d=this.length,e=this,g;if(0===d||0===a)return e;N(a)&&(a=1);N(b)&&(b=null);wa(Aa(d/a),function(d){for(g=e.slice(a*d,a*d+a);g.length<a;)g.push(b);c.push(g)});return c},isEmpty:function(){return 0==this.compact().length},sortBy:function(a,b){var c=this.clone();
42
- c.sort(function(d,e){var g,f;g=kb(d,a,c,[d]);f=kb(e,a,c,[e]);return(y(g)&&y(f)?ub(g,f):g<f?-1:g>f?1:0)*(b?-1:1)});return c},randomize:function(){for(var a=this.concat(),b=a.length,c,d;b;)c=u.random()*b|0,d=a[--b],a[b]=a[c],a[c]=d;return a},zip:function(){var a=L(arguments);return this.map(function(b,c){return[b].concat(a.map(function(a){return c in a?a[c]:null}))})},sample:function(a){var b=this.randomize();return 0<arguments.length?b.slice(0,a):b[0]},each:function(a,b,c){V(this,a,b,c);return this},
42
+ c.sort(function(d,e){var g,f;g=kb(d,a,c,[d]);f=kb(e,a,c,[e]);return(z(g)&&z(f)?ub(g,f):g<f?-1:g>f?1:0)*(b?-1:1)});return c},randomize:function(){for(var a=this.concat(),b=a.length,c,d;b;)c=u.random()*b|0,d=a[--b],a[b]=a[c],a[c]=d;return a},zip:function(){var a=L(arguments);return this.map(function(b,c){return[b].concat(a.map(function(a){return c in a?a[c]:null}))})},sample:function(a){var b=this.randomize();return 0<arguments.length?b.slice(0,a):b[0]},each:function(a,b,c){V(this,a,b,c);return this},
43
43
  add:function(a,b){if(!x(t(b))||isNaN(b))b=this.length;p.prototype.splice.apply(this,[b,0].concat(a));return this},remove:function(){var a=this;L(arguments,function(b){var c=0;for(b=ib(b);c<a.length;)b(a[c],c,a)?a.splice(c,1):c++});return a},compact:function(a){var b=[];V(this,function(c){A(c)?b.push(c.compact()):a&&c?b.push(c):a||(null==c||c.valueOf()!==c.valueOf())||b.push(c)});return b},groupBy:function(a,b){var c=this,d={},e;V(c,function(b,f){e=kb(b,a,c,[b,f,c]);d[e]||(d[e]=[]);d[e].push(b)});
44
- b&&I(d,b);return d},none:function(){return!this.any.apply(this,arguments)}});H(p,!0,!0,{all:p.prototype.every,any:p.prototype.some,insert:p.prototype.add});function Db(a,b){K(l,!1,!0,a,function(a,d){a[d]=function(a,c,f){var h=l.keys(ya(a)),m;b||(m=ib(c,!0));f=p.prototype[d].call(h,function(d){var f=a[d];return b?kb(f,c,a,[d,f,a]):m(f,d,a)},f);A(f)&&(f=f.reduce(function(b,c){b[c]=a[c];return b},{}));return f}});Ya(a,O)}
45
- H(l,!1,!0,{map:function(a,b){var c={},d,e;for(d in a)J(a,d)&&(e=a[d],c[d]=kb(e,b,a,[d,e,a]));return c},reduce:function(a){var b=l.keys(ya(a)).map(function(b){return a[b]});return b.reduce.apply(b,L(arguments,null,1))},each:function(a,b){ta(b);I(a,b);return a},size:function(a){return l.keys(ya(a)).length}});var Eb="any all none count find findAll isEmpty".split(" "),Fb="sum average min max least most".split(" "),Gb=["map","reduce","size"],Hb=Eb.concat(Fb).concat(Gb);
44
+ b&&I(d,b);return d},none:function(){return!this.any.apply(this,arguments)}});H(p,!0,!0,{all:p.prototype.every,any:p.prototype.some,insert:p.prototype.add});function Db(a,b){K(m,!1,!0,a,function(a,d){a[d]=function(a,c,f){var h=m.keys(ya(a)),l;b||(l=ib(c,!0));f=p.prototype[d].call(h,function(d){var f=a[d];return b?kb(f,c,a,[d,f,a]):l(f,d,a)},f);A(f)&&(f=f.reduce(function(b,c){b[c]=a[c];return b},{}));return f}});Ya(a,O)}
45
+ H(m,!1,!0,{map:function(a,b){var c={},d,e;for(d in a)J(a,d)&&(e=a[d],c[d]=kb(e,b,a,[d,e,a]));return c},reduce:function(a){var b=m.keys(ya(a)).map(function(b){return a[b]});return b.reduce.apply(b,L(arguments,null,1))},each:function(a,b){ta(b);I(a,b);return a},size:function(a){return m.keys(ya(a)).length}});var Eb="any all none count find findAll isEmpty".split(" "),Fb="sum average min max least most".split(" "),Gb=["map","reduce","size"],Hb=Eb.concat(Fb).concat(Gb);
46
46
  (function(){function a(){var a=arguments;return 0<a.length&&!F(a[0])}var b=p.prototype.map;K(p,!0,a,"every,all,some,filter,any,none,find,findIndex",function(a,b){var e=p.prototype[b];a[b]=function(a){var b=ib(a);return e.call(this,function(a,c){return b(a,c,this)})}});H(p,!0,a,{map:function(a){return b.call(this,function(b,e){return kb(b,a,this,[b,e,this])})}})})();
47
47
  (function(){p[Ab]="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(a){return a+a.toLowerCase()}).join("");var a={};V("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(" "),
48
48
  function(b){var c=b.charAt(0);V(b.slice(1).split(""),function(b){a[b]=c;a[b.toLowerCase()]=c.toLowerCase()})});p[Bb]=!0;p[yb]=!0;p[zb]=a})();Db(Eb);Db(Fb,!0);Ya(Gb,O);p.AlphanumericSort=ub;
@@ -53,38 +53,38 @@ method:"Minutes",b:aa(6E4)},{name:"second",method:"Seconds",b:aa(1E3)},{name:"mi
53
53
  Tb.prototype={getMonth:function(a){return x(a)?a-1:this.months.indexOf(a)%12},getWeekday:function(a){return this.weekdays.indexOf(a)%7},addFormat:function(a,b,c,d,e){var g=c||[],f=this,h;a=a.replace(/\s+/g,"[,. ]*");a=a.replace(/\{([^,]+?)\}/g,function(a,b){var d,e,h,B=b.match(/\?$/);h=b.match(/^(\d+)\??$/);var k=b.match(/(\d)(?:-(\d))?/),E=b.replace(/[^a-z]+$/,"");h?d=f.tokens[h[1]]:f[E]?d=f[E]:f[E+"s"]&&(d=f[E+"s"],k&&(e=[],d.forEach(function(a,b){var c=b%(f.units?8:d.length);c>=k[1]&&c<=(k[2]||
54
54
  k[1])&&e.push(a)}),d=e),d=Ub(d));h?h="(?:"+d+")":(c||g.push(E),h="("+d+")");B&&(h+="?");return h});b?(b=Vb(f,e),e=["t","[\\s\\u3000]"].concat(f.timeMarker),h=a.match(/\\d\{\d,\d\}\)+\??$/),Wb(f,"(?:"+b+")[,\\s\\u3000]+?"+a,Jb.concat(g),d),Wb(f,a+"(?:[,\\s]*(?:"+e.join("|")+(h?"+":"*")+")"+b+")?",g.concat(Jb),d)):Wb(f,a,g,d)}};
55
55
  function Xb(a,b,c){var d,e,g=b[0],f=b[1],h=b[2];b=a[c]||a.relative;if(F(b))return b.call(a,g,f,h,c);e=a.units[8*(a.plural&&1<g?1:0)+f]||a.units[f];a.capitalizeUnit&&(e=Yb(e));d=a.modifiers.filter(function(a){return"sign"==a.name&&a.value==(0<h?1:-1)})[0];return b.replace(/\{(.*?)\}/g,function(a,b){switch(b){case "num":return g;case "unit":return e;case "sign":return d.src}})}function Zb(a,b){b=b||a.code;return"en"===b||"en-US"===b?!0:a.variant}
56
- function $b(a,b){return b.replace(q(a.num,"g"),function(b){return ac(a,b)||""})}function ac(a,b){var c;return x(b)?b:b&&-1!==(c=a.numbers.indexOf(b))?(c+1)%10:1}function Y(a,b){var c;y(a)||(a="");c=Sb[a]||Sb[a.slice(0,2)];if(!1===b&&!c)throw new TypeError("Invalid locale.");return c||Ib}
57
- function bc(a,b){function c(a){var b=h[a];y(b)?h[a]=b.split(","):b||(h[a]=[])}function d(a,b){a=a.split("+").map(function(a){return a.replace(/(.+):(.+)$/,function(a,b,c){return c.split("|").map(function(a){return b+a}).join("|")})}).join("|");a.split("|").forEach(b)}function e(a,b,c){var e=[];h[a].forEach(function(a,f){b&&(a+="+"+a.slice(0,3));d(a,function(a,b){e[b*c+f]=a.toLowerCase()})});h[a]=e}function g(a,b,c){a="\\d{"+a+","+b+"}";c&&(a+="|(?:"+Ub(h.numbers)+")+");return a}function f(a,b){h[a]=
58
- h[a]||b}var h,m;h=new Tb(b);c("modifiers");"months weekdays units numbers articles tokens timeMarker ampm timeSuffixes dateParse timeParse".split(" ").forEach(c);m=!h.monthSuffix;e("months",m,12);e("weekdays",m,7);e("units",!1,8);e("numbers",!1,10);f("code",a);f("date",g(1,2,h.digitDate));f("year","'\\d{2}|"+g(4,4));f("num",function(){var a=["-?\\d+"].concat(h.articles);h.numbers&&(a=a.concat(h.numbers));return Ub(a)}());(function(){var a=[];h.i={};h.modifiers.push({name:"day",src:"yesterday",value:-1});
56
+ function $b(a,b){return b.replace(q(a.num,"g"),function(b){return ac(a,b)||""})}function ac(a,b){var c;return x(b)?b:b&&-1!==(c=a.numbers.indexOf(b))?(c+1)%10:1}function Y(a,b){var c;z(a)||(a="");c=Sb[a]||Sb[a.slice(0,2)];if(!1===b&&!c)throw new TypeError("Invalid locale.");return c||Ib}
57
+ function bc(a,b){function c(a){var b=h[a];z(b)?h[a]=b.split(","):b||(h[a]=[])}function d(a,b){a=a.split("+").map(function(a){return a.replace(/(.+):(.+)$/,function(a,b,c){return c.split("|").map(function(a){return b+a}).join("|")})}).join("|");a.split("|").forEach(b)}function e(a,b,c){var e=[];h[a].forEach(function(a,f){b&&(a+="+"+a.slice(0,3));d(a,function(a,b){e[b*c+f]=a.toLowerCase()})});h[a]=e}function g(a,b,c){a="\\d{"+a+","+b+"}";c&&(a+="|(?:"+Ub(h.numbers)+")+");return a}function f(a,b){h[a]=
58
+ h[a]||b}var h,l;h=new Tb(b);c("modifiers");"months weekdays units numbers articles tokens timeMarker ampm timeSuffixes dateParse timeParse".split(" ").forEach(c);l=!h.monthSuffix;e("months",l,12);e("weekdays",l,7);e("units",!1,8);e("numbers",!1,10);f("code",a);f("date",g(1,2,h.digitDate));f("year","'\\d{2}|"+g(4,4));f("num",function(){var a=["-?\\d+"].concat(h.articles);h.numbers&&(a=a.concat(h.numbers));return Ub(a)}());(function(){var a=[];h.i={};h.modifiers.push({name:"day",src:"yesterday",value:-1});
59
59
  h.modifiers.push({name:"day",src:"today",value:0});h.modifiers.push({name:"day",src:"tomorrow",value:1});h.modifiers.forEach(function(b){var c=b.name;d(b.src,function(d){var e=h[c];h.i[d]=b;a.push({name:c,src:d,value:b.value});h[c]=e?e+"|"+d:d})});h.day+="|"+Ub(h.weekdays);h.modifiers=a})();h.monthSuffix&&(h.month=g(1,2),h.months="1 2 3 4 5 6 7 8 9 10 11 12".split(" ").map(function(a){return a+h.monthSuffix}));h.full_month=g(1,2)+"|"+Ub(h.months);0<h.timeSuffixes.length&&h.addFormat(Vb(h),!1,Jb);
60
60
  h.addFormat("{day}",!0);h.addFormat("{month}"+(h.monthSuffix||""));h.addFormat("{year}"+(h.yearSuffix||""));h.timeParse.forEach(function(a){h.addFormat(a,!0)});h.dateParse.forEach(function(a){h.addFormat(a)});return Sb[a]=h}function Wb(a,b,c,d){a.g.unshift({r:d,locale:a,q:q("^"+b+"$","i"),to:c})}function Yb(a){return a.slice(0,1).toUpperCase()+a.slice(1)}function Ub(a){return a.filter(function(a){return!!a}).join("|")}function cc(){var a=r.SugarNewDate;return a?a():new r}
61
- function dc(a,b){var c;if(G(a[0]))return a;if(x(a[0])&&!x(a[1]))return[a[0]];if(y(a[0])&&b)return[ec(a[0]),a[1]];c={};Nb.forEach(function(b,e){c[b.name]=a[e]});return[c]}function ec(a){var b,c={};if(a=a.match(/^(\d+)?\s?(\w+?)s?$/i))N(b)&&(b=parseInt(a[1])||1),c[a[2].toLowerCase()]=b;return c}function fc(a,b,c){var d;N(c)&&(c=Ob.length);for(b=b||0;b<c&&(d=Ob[b],!1!==a(d.name,d,b));b++);}
61
+ function dc(a,b){var c;if(G(a[0]))return a;if(x(a[0])&&!x(a[1]))return[a[0]];if(z(a[0])&&b)return[ec(a[0]),a[1]];c={};Nb.forEach(function(b,e){c[b.name]=a[e]});return[c]}function ec(a){var b,c={};if(a=a.match(/^(\d+)?\s?(\w+?)s?$/i))N(b)&&(b=parseInt(a[1])||1),c[a[2].toLowerCase()]=b;return c}function fc(a,b,c){var d;N(c)&&(c=Ob.length);for(b=b||0;b<c&&(d=Ob[b],!1!==a(d.name,d,b));b++);}
62
62
  function gc(a,b){var c={},d,e;b.forEach(function(b,f){d=a[f+1];N(d)||""===d||("year"===b&&(c.t=d.replace(/'/,"")),e=parseFloat(d.replace(/'/,"").replace(/,/,".")),c[b]=isNaN(e)?d.toLowerCase():e)});return c}function hc(a){a=a.trim().replace(/^just (?=now)|\.+$/i,"");return ic(a)}
63
63
  function ic(a){return a.replace(Mb,function(a,c,d){var e=0,g=1,f,h;if(c)return a;d.split("").reverse().forEach(function(a){a=Lb[a];var b=9<a;b?(f&&(e+=g),g*=a/(h||1),h=a):(!1===f&&(g*=10),e+=g*a);f=b});f&&(e+=g);return e})}
64
- function jc(a,b,c,d){function e(a){vb.push(a)}function g(){vb.forEach(function(a){a.call()})}function f(){var a=n.getWeekday();n.setWeekday(7*(k.num-1)+(a>Ba?Ba+7:Ba))}function h(){var a=B.i[k.edge];fc(function(a){if(M(k[a]))return E=a,!1},4);if("year"===E)k.e="month";else if("month"===E||"week"===E)k.e="day";n[(0>a.value?"endOf":"beginningOf")+Yb(E)]();-2===a.value&&n.reset()}function m(){var a;fc(function(b,c,d){"day"===b&&(b="date");if(M(k[b])){if(d>=wb)return n.setTime(NaN),!1;a=a||{};a[b]=k[b];
65
- delete k[b]}});a&&e(function(){n.set(a,!0)})}var n,z,ha,vb,B,k,E,wb,Ba,ra,ca;n=cc();vb=[];n.utc(d);C(a)?n.utc(a.isUTC()).setTime(a.getTime()):x(a)?n.setTime(a):G(a)?(n.set(a,!0),k=a):y(a)&&(ha=Y(b),a=hc(a),ha&&I(ha.o?[ha.o].concat(ha.g):ha.g,function(c,d){var g=a.match(d.q);if(g){B=d.locale;k=gc(g,d.to);B.o=d;k.utc&&n.utc();if(k.timestamp)return k=k.timestamp,!1;d.r&&(!y(k.month)&&(y(k.date)||Zb(ha,b)))&&(ca=k.month,k.month=k.date,k.date=ca);k.year&&2===k.t.length&&(k.year=100*R(U(cc(),"FullYear")/
66
- 100)-100*R(k.year/100)+k.year);k.month&&(k.month=B.getMonth(k.month),k.shift&&!k.unit&&(k.unit=B.units[7]));k.weekday&&k.date?delete k.weekday:k.weekday&&(k.weekday=B.getWeekday(k.weekday),k.shift&&!k.unit&&(k.unit=B.units[5]));k.day&&(ca=B.i[k.day])?(k.day=ca.value,n.reset(),z=!0):k.day&&-1<(Ba=B.getWeekday(k.day))&&(delete k.day,k.num&&k.month?(e(f),k.day=1):k.weekday=Ba);k.date&&!x(k.date)&&(k.date=$b(B,k.date));k.ampm&&k.ampm===B.ampm[1]&&12>k.hour?k.hour+=12:k.ampm===B.ampm[0]&&12===k.hour&&
67
- (k.hour=0);if("offset_hours"in k||"offset_minutes"in k)n.utc(),k.offset_minutes=k.offset_minutes||0,k.offset_minutes+=60*k.offset_hours,"-"===k.offset_sign&&(k.offset_minutes*=-1),k.minute-=k.offset_minutes;k.unit&&(z=!0,ra=ac(B,k.num),wb=B.units.indexOf(k.unit)%8,E=W.units[wb],m(),k.shift&&(ra*=(ca=B.i[k.shift])?ca.value:0),k.sign&&(ca=B.i[k.sign])&&(ra*=ca.value),M(k.weekday)&&(n.set({weekday:k.weekday},!0),delete k.weekday),k[E]=(k[E]||0)+ra);k.edge&&e(h);"-"===k.year_sign&&(k.year*=-1);fc(function(a,
68
- b,c){b=k[a];var d=b%1;d&&(k[Ob[c-1].name]=R(d*("second"===a?1E3:60)),k[a]=Q(b))},1,4);return!1}}),k?z?n.advance(k):(n._utc&&n.reset(),kc(n,k,!0,!1,c)):("now"!==a&&(n=new r(a)),d&&n.addMinutes(-n.getTimezoneOffset())),g(),n.utc(!1));return{c:n,set:k}}function lc(a){var b,c=P(a),d=c,e=0;fc(function(a,f,h){b=Q(Da(c/f.b(),1));1<=b&&(d=b,e=h)},1);return[d,e,a]}
64
+ function jc(a,b,c,d){function e(a){vb.push(a)}function g(){vb.forEach(function(a){a.call()})}function f(){var a=n.getWeekday();n.setWeekday(7*(k.num-1)+(a>Ba?Ba+7:Ba))}function h(){var a=B.i[k.edge];fc(function(a){if(M(k[a]))return E=a,!1},4);if("year"===E)k.e="month";else if("month"===E||"week"===E)k.e="day";n[(0>a.value?"endOf":"beginningOf")+Yb(E)]();-2===a.value&&n.reset()}function l(){var a;fc(function(b,c,d){"day"===b&&(b="date");if(M(k[b])){if(d>=wb)return n.setTime(NaN),!1;a=a||{};a[b]=k[b];
65
+ delete k[b]}});a&&e(function(){n.set(a,!0)})}var n,y,ha,vb,B,k,E,wb,Ba,ra,ca;n=cc();vb=[];n.utc(d);C(a)?n.utc(a.isUTC()).setTime(a.getTime()):x(a)?n.setTime(a):G(a)?(n.set(a,!0),k=a):z(a)&&(ha=Y(b),a=hc(a),ha&&I(ha.o?[ha.o].concat(ha.g):ha.g,function(c,d){var g=a.match(d.q);if(g){B=d.locale;k=gc(g,d.to);B.o=d;k.utc&&n.utc();if(k.timestamp)return k=k.timestamp,!1;d.r&&(!z(k.month)&&(z(k.date)||Zb(ha,b)))&&(ca=k.month,k.month=k.date,k.date=ca);k.year&&2===k.t.length&&(k.year=100*R(U(cc(),"FullYear")/
66
+ 100)-100*R(k.year/100)+k.year);k.month&&(k.month=B.getMonth(k.month),k.shift&&!k.unit&&(k.unit=B.units[7]));k.weekday&&k.date?delete k.weekday:k.weekday&&(k.weekday=B.getWeekday(k.weekday),k.shift&&!k.unit&&(k.unit=B.units[5]));k.day&&(ca=B.i[k.day])?(k.day=ca.value,n.reset(),y=!0):k.day&&-1<(Ba=B.getWeekday(k.day))&&(delete k.day,k.num&&k.month?(e(f),k.day=1):k.weekday=Ba);k.date&&!x(k.date)&&(k.date=$b(B,k.date));k.ampm&&k.ampm===B.ampm[1]&&12>k.hour?k.hour+=12:k.ampm===B.ampm[0]&&12===k.hour&&
67
+ (k.hour=0);if("offset_hours"in k||"offset_minutes"in k)n.utc(),k.offset_minutes=k.offset_minutes||0,k.offset_minutes+=60*k.offset_hours,"-"===k.offset_sign&&(k.offset_minutes*=-1),k.minute-=k.offset_minutes;k.unit&&(y=!0,ra=ac(B,k.num),wb=B.units.indexOf(k.unit)%8,E=W.units[wb],l(),k.shift&&(ra*=(ca=B.i[k.shift])?ca.value:0),k.sign&&(ca=B.i[k.sign])&&(ra*=ca.value),M(k.weekday)&&(n.set({weekday:k.weekday},!0),delete k.weekday),k[E]=(k[E]||0)+ra);k.edge&&e(h);"-"===k.year_sign&&(k.year*=-1);fc(function(a,
68
+ b,c){b=k[a];var d=b%1;d&&(k[Ob[c-1].name]=R(d*("second"===a?1E3:60)),k[a]=Q(b))},1,4);return!1}}),k?y?n.advance(k):(n._utc&&n.reset(),kc(n,k,!0,!1,c)):("now"!==a&&(n=new r(a)),d&&n.addMinutes(-n.getTimezoneOffset())),g(),n.utc(!1));return{c:n,set:k}}function lc(a){var b,c=P(a),d=c,e=0;fc(function(a,f,h){b=Q(Da(c/f.b(),1));1<=b&&(d=b,e=h)},1);return[d,e,a]}
69
69
  function mc(a){var b=lc(a.millisecondsFromNow());if(6===b[1]||5===b[1]&&4===b[0]&&a.daysFromNow()>=cc().daysInMonth())b[0]=P(a.monthsFromNow()),b[1]=6;return b}function nc(a,b,c){function d(a,c){var d=U(a,"Month");return Y(c).months[d+12*b]}Z(a,d,c);Z(Yb(a),d,c,1)}function Z(a,b,c,d){X[a]=function(a,g){var f=b(a,g);c&&(f=f.slice(0,c));d&&(f=f.slice(0,d).toUpperCase()+f.slice(d));return f}}
70
70
  function oc(a,b,c){X[a]=b;X[a+a]=function(a,c){return T(b(a,c),2)};c&&(X[a+a+a]=function(a,c){return T(b(a,c),3)},X[a+a+a+a]=function(a,c){return T(b(a,c),4)})}function pc(a){var b=a.match(/(\{\w+\})|[^{}]+/g);Qb[a]=b.map(function(a){a.replace(/\{(\w+)\}/,function(b,e){a=X[e]||e;return e});return a})}
71
71
  function qc(a,b,c,d){var e;if(!a.isValid())return"Invalid Date";Date[b]?b=Date[b]:F(b)&&(e=mc(a),b=b.apply(a,e.concat(Y(d))));if(!b&&c)return e=e||mc(a),0===e[1]&&(e[1]=1,e[0]=1),a=Y(d),Xb(a,e,0<e[2]?"future":"past");b=b||"long";if("short"===b||"long"===b||"full"===b)b=Y(d)[b];Qb[b]||pc(b);var g,f;e="";b=Qb[b];g=0;for(c=b.length;g<c;g++)f=b[g],e+=F(f)?f(a,d):f;return e}
72
- function rc(a,b,c,d,e){var g,f,h,m=0,n=0,z=0;g=jc(b,c,null,e);0<d&&(n=z=d,f=!0);if(!g.c.isValid())return!1;if(g.set&&g.set.e){Rb.forEach(function(b){b.name===g.set.e&&(m=b.b(g.c,a-g.c)-1)});b=Yb(g.set.e);if(g.set.edge||g.set.shift)g.c["beginningOf"+b]();"month"===g.set.e&&(h=g.c.clone()["endOf"+b]().getTime());!f&&(g.set.sign&&"millisecond"!=g.set.e)&&(n=50,z=-50)}f=a.getTime();b=g.c.getTime();h=sc(a,b,h||b+m);return f>=b-n&&f<=h+z}
72
+ function rc(a,b,c,d,e){var g,f,h,l=0,n=0,y=0;g=jc(b,c,null,e);0<d&&(n=y=d,f=!0);if(!g.c.isValid())return!1;if(g.set&&g.set.e){Rb.forEach(function(b){b.name===g.set.e&&(l=b.b(g.c,a-g.c)-1)});b=Yb(g.set.e);if(g.set.edge||g.set.shift)g.c["beginningOf"+b]();"month"===g.set.e&&(h=g.c.clone()["endOf"+b]().getTime());!f&&(g.set.sign&&"millisecond"!=g.set.e)&&(n=50,y=-50)}f=a.getTime();b=g.c.getTime();h=sc(a,b,h||b+l);return f>=b-n&&f<=h+y}
73
73
  function sc(a,b,c){b=new r(b);a=(new r(c)).utc(a.isUTC());23!==U(a,"Hours")&&(b=b.getTimezoneOffset(),a=a.getTimezoneOffset(),b!==a&&(c+=(a-b).minutes()));return c}
74
- function kc(a,b,c,d,e){function g(a){return M(b[a])?b[a]:b[a+"s"]}function f(a){return M(g(a))}var h;if(x(b)&&d)b={milliseconds:b};else if(x(b))return a.setTime(b),a;M(b.date)&&(b.day=b.date);fc(function(d,e,g){var m="day"===d;if(f(d)||m&&f("weekday"))return b.e=d,h=+g,!1;!c||("week"===d||m&&f("week"))||Sa(a,e.method,m?1:0)});Rb.forEach(function(c){var e=c.name;c=c.method;var h;h=g(e);N(h)||(d?("week"===e&&(h=(b.day||0)+7*h,c="Date"),h=h*d+U(a,c)):"month"===e&&f("day")&&Sa(a,"Date",15),Sa(a,c,h),
75
- d&&"month"===e&&(e=h,0>e&&(e=e%12+12),e%12!=U(a,"Month")&&Sa(a,"Date",0)))});d||(f("day")||!f("weekday"))||a.setWeekday(g("weekday"));var m;a:{switch(e){case -1:m=a>cc();break a;case 1:m=a<cc();break a}m=void 0}m&&fc(function(b,c){if((c.k||"week"===b&&f("weekday"))&&!(f(b)||"day"===b&&f("weekday")))return a[c.j](e),!1},h+1);return a}
76
- function Vb(a,b){var c=Kb,d={h:0,m:1,s:2},e;a=a||W;return c.replace(/{([a-z])}/g,function(c,f){var h=[],m="h"===f,n=m&&!b;if("t"===f)return a.ampm.join("|");m&&h.push(":");(e=a.timeSuffixes[d[f]])&&h.push(e+"\\s*");return 0===h.length?"":"(?:"+h.join("|")+")"+(n?"":"?")})}function tc(a,b,c){var d,e;x(a[1])?d=dc(a)[0]:(d=a[0],e=a[1]);return jc(d,e,b,c).c}
74
+ function kc(a,b,c,d,e){function g(a){return M(b[a])?b[a]:b[a+"s"]}function f(a){return M(g(a))}var h;if(x(b)&&d)b={milliseconds:b};else if(x(b))return a.setTime(b),a;M(b.date)&&(b.day=b.date);fc(function(d,e,g){var l="day"===d;if(f(d)||l&&f("weekday"))return b.e=d,h=+g,!1;!c||("week"===d||l&&f("week"))||Sa(a,e.method,l?1:0)});Rb.forEach(function(c){var e=c.name;c=c.method;var h;h=g(e);N(h)||(d?("week"===e&&(h=(b.day||0)+7*h,c="Date"),h=h*d+U(a,c)):"month"===e&&f("day")&&Sa(a,"Date",15),Sa(a,c,h),
75
+ d&&"month"===e&&(e=h,0>e&&(e=e%12+12),e%12!=U(a,"Month")&&Sa(a,"Date",0)))});d||(f("day")||!f("weekday"))||a.setWeekday(g("weekday"));var l;a:{switch(e){case -1:l=a>cc();break a;case 1:l=a<cc();break a}l=void 0}l&&fc(function(b,c){if((c.k||"week"===b&&f("weekday"))&&!(f(b)||"day"===b&&f("weekday")))return a[c.j](e),!1},h+1);return a}
76
+ function Vb(a,b){var c=Kb,d={h:0,m:1,s:2},e;a=a||W;return c.replace(/{([a-z])}/g,function(c,f){var h=[],l="h"===f,n=l&&!b;if("t"===f)return a.ampm.join("|");l&&h.push(":");(e=a.timeSuffixes[d[f]])&&h.push(e+"\\s*");return 0===h.length?"":"(?:"+h.join("|")+")"+(n?"":"?")})}function tc(a,b,c){var d,e;x(a[1])?d=dc(a)[0]:(d=a[0],e=a[1]);return jc(d,e,b,c).c}
77
77
  H(r,!1,!0,{create:function(){return tc(arguments)},past:function(){return tc(arguments,-1)},future:function(){return tc(arguments,1)},addLocale:function(a,b){return bc(a,b)},setLocale:function(a){var b=Y(a,!1);Ib=b;a&&a!=b.code&&(b.code=a);return b},getLocale:function(a){return a?Y(a,!1):Ib},addFormat:function(a,b,c){Wb(Y(c),a,b)}});
78
78
  H(r,!0,!0,{set:function(){var a=dc(arguments);return kc(this,a[0],a[1])},setWeekday:function(a){if(!N(a))return Sa(this,"Date",U(this,"Date")+a-U(this,"Day"))},setISOWeek:function(a){var b=U(this,"Day")||7;if(!N(a))return this.set({month:0,date:4}),this.set({weekday:1}),1<a&&this.addWeeks(a-1),1!==b&&this.advance({days:b-1}),this.getTime()},getISOWeek:function(){var a;a=this.clone();var b=U(a,"Day")||7;a.addDays(4-b).reset();return 1+Q(a.daysSince(a.clone().beginningOfYear())/7)},beginningOfISOWeek:function(){var a=
79
79
  this.getDay();0===a?a=-6:1!==a&&(a=1);this.setWeekday(a);return this.reset()},endOfISOWeek:function(){0!==this.getDay()&&this.setWeekday(7);return this.endOfDay()},getUTCOffset:function(a){var b=this._utc?0:this.getTimezoneOffset(),c=!0===a?":":"";return!b&&a?"Z":T(Q(-b/60),2,!0)+c+T(P(b%60),2)},utc:function(a){oa(this,"_utc",!0===a||0===arguments.length);return this},isUTC:function(){return!!this._utc||0===this.getTimezoneOffset()},advance:function(){var a=dc(arguments,!0);return kc(this,a[0],a[1],
80
80
  1)},rewind:function(){var a=dc(arguments,!0);return kc(this,a[0],a[1],-1)},isValid:function(){return!isNaN(this.getTime())},isAfter:function(a,b){return this.getTime()>r.create(a).getTime()-(b||0)},isBefore:function(a,b){return this.getTime()<r.create(a).getTime()+(b||0)},isBetween:function(a,b,c){var d=this.getTime();a=r.create(a).getTime();var e=r.create(b).getTime();b=Ca(a,e);a=S(a,e);c=c||0;return b-c<d&&a+c>d},isLeapYear:function(){var a=U(this,"FullYear");return 0===a%4&&0!==a%100||0===a%400},
81
- daysInMonth:function(){return 32-U(new r(U(this,"FullYear"),U(this,"Month"),32),"Date")},format:function(a,b){return qc(this,a,!1,b)},relative:function(a,b){y(a)&&(b=a,a=null);return qc(this,a,!0,b)},is:function(a,b,c){var d,e;if(this.isValid()){if(y(a))switch(a=a.trim().toLowerCase(),e=this.clone().utc(c),!0){case "future"===a:return this.getTime()>cc().getTime();case "past"===a:return this.getTime()<cc().getTime();case "weekday"===a:return 0<U(e,"Day")&&6>U(e,"Day");case "weekend"===a:return 0===
81
+ daysInMonth:function(){return 32-U(new r(U(this,"FullYear"),U(this,"Month"),32),"Date")},format:function(a,b){return qc(this,a,!1,b)},relative:function(a,b){z(a)&&(b=a,a=null);return qc(this,a,!0,b)},is:function(a,b,c){var d,e;if(this.isValid()){if(z(a))switch(a=a.trim().toLowerCase(),e=this.clone().utc(c),!0){case "future"===a:return this.getTime()>cc().getTime();case "past"===a:return this.getTime()<cc().getTime();case "weekday"===a:return 0<U(e,"Day")&&6>U(e,"Day");case "weekend"===a:return 0===
82
82
  U(e,"Day")||6===U(e,"Day");case -1<(d=W.weekdays.indexOf(a)%7):return U(e,"Day")===d;case -1<(d=W.months.indexOf(a)%12):return U(e,"Month")===d}return rc(this,a,null,b,c)}},reset:function(a){var b={},c;a=a||"hours";"date"===a&&(a="days");c=Rb.some(function(b){return a===b.name||a===b.name+"s"});b[a]=a.match(/^days?/)?1:0;return c?this.set(b,!0):this},clone:function(){var a=new r(this.getTime());a.utc(!!this._utc);return a}});
83
83
  H(r,!0,!0,{iso:function(){return this.toISOString()},getWeekday:r.prototype.getDay,getUTCWeekday:r.prototype.getUTCDay});function uc(a,b){function c(){return R(this*b)}function d(){return tc(arguments)[a.j](this)}function e(){return tc(arguments)[a.j](-this)}var g=a.name,f={};f[g]=c;f[g+"s"]=c;f[g+"Before"]=e;f[g+"sBefore"]=e;f[g+"Ago"]=e;f[g+"sAgo"]=e;f[g+"After"]=d;f[g+"sAfter"]=d;f[g+"FromNow"]=d;f[g+"sFromNow"]=d;t.extend(f)}H(t,!0,!0,{duration:function(a){a=Y(a);return Xb(a,lc(this),"duration")}});
84
84
  W=Ib=r.addLocale("en",{plural:!0,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",tokens:"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}",
85
85
  past:"{num} {unit} {sign}",future:"{num} {unit} {sign}",duration:"{num} {unit}",modifiers:[{name:"sign",src:"ago|before",value:-1},{name:"sign",src:"from now|after|from|in|later",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",value:1}],dateParse:["{month} {year}","{shift} {unit=5-7}","{0?} {date}{1}","{0?} {edge} of {shift?} {unit=4-7?}{month?}{year?}"],
86
- timeParse:"{num} {unit} {sign};{sign} {num} {unit};{0} {num}{1} {day} of {month} {year?};{weekday?} {month} {date}{1?} {year?};{date} {month} {year};{date} {month};{shift} {weekday};{shift} week {weekday};{weekday} {2?} {shift} week;{num} {unit=4-5} {sign} {day};{0?} {date}{1} of {month};{0?}{month?} {date?}{1?} of {shift} {unit=6-7}".split(";")});Ob=Rb.concat().reverse();Nb=Rb.concat();Nb.splice(2,1);
87
- K(r,!0,!0,Rb,function(a,b,c){function d(a){a/=f;var c=a%1,d=b.error||0.999;c&&P(c%1)>d&&(a=R(a));return 0>a?Aa(a):Q(a)}var e=b.name,g=Yb(e),f=b.b(),h,m;b.j="add"+g+"s";h=function(a,b){return d(this.getTime()-r.create(a,b).getTime())};m=function(a,b){return d(r.create(a,b).getTime()-this.getTime())};a[e+"sAgo"]=m;a[e+"sUntil"]=m;a[e+"sSince"]=h;a[e+"sFromNow"]=h;a[b.j]=function(a,b){var c={};c[e]=a;return this.advance(c,b)};uc(b,f);3>c&&["Last","This","Next"].forEach(function(b){a["is"+b+g]=function(){return rc(this,
86
+ timeParse:"{num} {unit} {sign};{sign} {num} {unit};{0} {num}{1} {day} of {month} {year?};{weekday?} {month} {date}{1?} {year?};{date} {month} {year};{date} {month};{shift} {weekday};{shift} week {weekday};{weekday} {2?} {shift} week;{num} {unit=4-5} {sign} {day};{0?} {date}{1} of {month};{0?}{month?} {date?}{1?} of {shift} {unit=6-7};{edge} of {day}".split(";")});Ob=Rb.concat().reverse();Nb=Rb.concat();Nb.splice(2,1);
87
+ K(r,!0,!0,Rb,function(a,b,c){function d(a){a/=f;var c=a%1,d=b.error||0.999;c&&P(c%1)>d&&(a=R(a));return 0>a?Aa(a):Q(a)}var e=b.name,g=Yb(e),f=b.b(),h,l;b.j="add"+g+"s";h=function(a,b){return d(this.getTime()-r.create(a,b).getTime())};l=function(a,b){return d(r.create(a,b).getTime()-this.getTime())};a[e+"sAgo"]=l;a[e+"sUntil"]=l;a[e+"sSince"]=h;a[e+"sFromNow"]=h;a[b.j]=function(a,b){var c={};c[e]=a;return this.advance(c,b)};uc(b,f);3>c&&["Last","This","Next"].forEach(function(b){a["is"+b+g]=function(){return rc(this,
88
88
  b+" "+e,"en")}});4>c&&(a["beginningOf"+g]=function(){var a={};switch(e){case "year":a.year=U(this,"FullYear");break;case "month":a.month=U(this,"Month");break;case "day":a.day=U(this,"Date");break;case "week":a.weekday=0}return this.set(a,!0)},a["endOf"+g]=function(){var a={hours:23,minutes:59,seconds:59,milliseconds:999};switch(e){case "year":a.month=11;a.day=31;break;case "month":a.day=this.daysInMonth();break;case "week":a.weekday=6}return this.set(a,!0)})});
89
89
  W.addFormat("([+-])?(\\d{4,4})[-.]?{full_month}[-.]?(\\d{1,2})?",!0,["year_sign","year","month","date"],!1,!0);W.addFormat("(\\d{1,2})[-.\\/]{full_month}(?:[-.\\/](\\d{2,4}))?",!0,["date","month","year"],!0);W.addFormat("{full_month}[-.](\\d{4,4})",!1,["month","year"]);W.addFormat("\\/Date\\((\\d+(?:[+-]\\d{4,4})?)\\)\\/",!1,["timestamp"]);W.addFormat(Vb(W),!1,Jb);Pb=W.g.slice(0,7).reverse();W.g=W.g.slice(7).concat(Pb);oc("f",function(a){return U(a,"Milliseconds")},!0);
90
90
  oc("s",function(a){return U(a,"Seconds")});oc("m",function(a){return U(a,"Minutes")});oc("h",function(a){return U(a,"Hours")%12||12});oc("H",function(a){return U(a,"Hours")});oc("d",function(a){return U(a,"Date")});oc("M",function(a){return U(a,"Month")+1});(function(){function a(a,c){var d=U(a,"Hours");return Y(c).ampm[Q(d/12)]||""}Z("t",a,1);Z("tt",a);Z("T",a,1,1);Z("TT",a,null,2)})();
@@ -92,61 +92,63 @@ oc("s",function(a){return U(a,"Seconds")});oc("m",function(a){return U(a,"Minute
92
92
  "\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d\u5341\u767e\u5343\u4e07".split("").forEach(function(a,b){9<b&&(b=za(10,b-9));Lb[a]=b});xa(Lb,Ka);Mb=q("([\u671f\u9031\u5468])?([\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d\u5341\u767e\u5343\u4e07"+Ja+"]+)(?!\u6628)","g");
93
93
  (function(){var a=W.weekdays.slice(0,7),b=W.months.slice(0,12);K(r,!0,!0,"today yesterday tomorrow weekday weekend future past".split(" ").concat(a).concat(b),function(a,b){a["is"+Yb(b)]=function(a){return this.is(b,0,a)}})})();r.utc||(r.utc={create:function(){return tc(arguments,0,!0)},past:function(){return tc(arguments,-1,!0)},future:function(){return tc(arguments,1,!0)}});
94
94
  H(r,!1,!0,{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}"});
95
- "use strict";function Range(a,b){this.start=vc(a);this.end=vc(b)}function vc(a){return C(a)?new r(a.getTime()):null==a?a:C(a)?a.getTime():a.valueOf()}function wc(a){a=null==a?a:C(a)?a.getTime():a.valueOf();return!!a||0===a}
96
- function xc(a,b){var c,d,e,g;if(x(b))return new r(a.getTime()+b);c=b[0];d=b[1];e=U(a,d);g=new r(a.getTime());Sa(g,d,e+c);return g}function yc(a,b){return s.fromCharCode(a.charCodeAt(0)+b)}function zc(a,b){return a+b}Range.prototype.toString=function(){return this.isValid()?this.start+".."+this.end:"Invalid Range"};
97
- H(Range,!0,!0,{isValid:function(){return wc(this.start)&&wc(this.end)&&typeof this.start===typeof this.end},span:function(){return this.isValid()?P((y(this.end)?this.end.charCodeAt(0):this.end)-(y(this.start)?this.start.charCodeAt(0):this.start))+1:NaN},contains:function(a){return null==a?!1:a.start&&a.end?a.start>=this.start&&a.start<=this.end&&a.end>=this.start&&a.end<=this.end:a>=this.start&&a<=this.end},every:function(a,b){var c,d=this.start,e=this.end,g=e<d,f=d,h=0,m=[];F(a)&&(b=a,a=null);a=
98
- a||1;x(d)?c=zc:y(d)?c=yc:C(d)&&(c=a,x(c)?a=c:(d=c.toLowerCase().match(/^(\d+)?\s?(\w+?)s?$/i),c=parseInt(d[1])||1,d=d[2].slice(0,1).toUpperCase()+d[2].slice(1),d.match(/hour|minute|second/i)?d+="s":"Year"===d?d="FullYear":"Day"===d&&(d="Date"),a=[c,d]),c=xc);for(g&&0<a&&(a*=-1);g?f>=e:f<=e;)m.push(f),b&&b(f,h),f=c(f,a),h++;return m},union:function(a){return new Range(this.start<a.start?this.start:a.start,this.end>a.end?this.end:a.end)},intersect:function(a){return a.start>this.end||a.end<this.start?
99
- new Range(NaN,NaN):new Range(this.start>a.start?this.start:a.start,this.end<a.end?this.end:a.end)},clone:function(){return new Range(this.start,this.end)},clamp:function(a){var b=this.start,c=this.end,d=c<b?c:b,b=b>c?b:c;return vc(a<d?d:a>b?b:a)}});[t,s,r].forEach(function(a){H(a,!1,!0,{range:function(b,c){a.create&&(b=a.create(b),c=a.create(c));return new Range(b,c)}})});
95
+ "use strict";
96
+ var vc=/(?:from)?\s*(.+)\s+(?:to|until)\s+(.+)$/i,wc=q("(\\d+)?\\s*(year|month|week|day|hour|minute|(?:milli)?second)s?","i"),xc=q("(?:for)?\\s*((?:\\d+)?\\s*(?:year|month|week|day|hour|minute|(?:milli)?second))s?\\s*(?:starting)?\\s*at\\s*(.+)","i"),yc=q("(.+)\\s*for\\s*((?:\\d+)?\\s*(?:year|month|week|day|hour|minute|(?:milli)?second))s?","i");function Range(a,b){this.start=zc(a);this.end=zc(b)}function zc(a){return C(a)?new r(a.getTime()):null==a?a:C(a)?a.getTime():a.valueOf()}
97
+ function Ac(a){a=null==a?a:C(a)?a.getTime():a.valueOf();return!!a||0===a}function Bc(a){var b;if(x(a))return a;b=a.match(wc);a=parseInt(b[1])||1;b=b[2].slice(0,1).toUpperCase()+b[2].slice(1).toLowerCase();b.match(/hour|minute|second/i)?b+="s":"Year"===b?b="FullYear":"Day"===b&&(b="Date");return[a,b]}function Cc(a,b){var c,d,e,g;if(x(b))return new r(a.getTime()+b);c=b[0];d=b[1];e=U(a,d);g=new r(a.getTime());Sa(g,d,e+c);return g}function Dc(a,b){return s.fromCharCode(a.charCodeAt(0)+b)}
98
+ function Ec(a,b){return a+b}Range.prototype.toString=function(){return this.isValid()?this.start+".."+this.end:"Invalid Range"};
99
+ H(Range,!0,!0,{isValid:function(){return Ac(this.start)&&Ac(this.end)&&typeof this.start===typeof this.end},span:function(){return this.isValid()?P((z(this.end)?this.end.charCodeAt(0):this.end)-(z(this.start)?this.start.charCodeAt(0):this.start))+1:NaN},contains:function(a){return null==a?!1:a.start&&a.end?a.start>=this.start&&a.start<=this.end&&a.end>=this.start&&a.end<=this.end:a>=this.start&&a<=this.end},every:function(a,b){var c,d=this.start,e=this.end,g=e<d,f=d,h=0,l=[];F(a)&&(b=a,a=null);a=
100
+ a||1;x(d)?c=Ec:z(d)?c=Dc:C(d)&&(a=Bc(a),c=Cc);for(g&&0<a&&(a*=-1);g?f>=e:f<=e;)l.push(f),b&&b(f,h),f=c(f,a),h++;return l},union:function(a){return new Range(this.start<a.start?this.start:a.start,this.end>a.end?this.end:a.end)},intersect:function(a){return a.start>this.end||a.end<this.start?new Range(NaN,NaN):new Range(this.start>a.start?this.start:a.start,this.end<a.end?this.end:a.end)},clone:function(){return new Range(this.start,this.end)},clamp:function(a){var b=this.start,c=this.end,d=c<b?c:b,
101
+ b=b>c?b:c;return zc(a<d?d:a>b?b:a)}});function Fc(a,b){return new Range(a,b)}H(t,!1,!0,{range:Fc});H(s,!1,!0,{range:Fc});H(r,!1,!0,{range:function(a,b){if(r.create){if(1===arguments.length&&z(a)){var c;c=a;var d,e,g,f,h;if(d=c.match(vc))c=r.range(d[1],d[2]);else{if(d=c.match(xc))g=d[1],e=d[2];if(d=c.match(yc))e=d[1],g=d[2];e&&g&&(f=r.create(e),h=Cc(f,Bc(g)));c=r.range(f,h)}return c}a=r.create(a);b=r.create(b)}else a=null==a?new r:new r(a),b=null==b?new r:new r(b);return new Range(a,b)}});
100
102
  H(t,!0,!0,{upto:function(a,b,c){return t.range(this,a).every(c,b)},clamp:function(a,b){return(new Range(a,b)).clamp(this)},cap:function(a){return this.clamp(void 0,a)}});H(t,!0,!0,{downto:t.prototype.upto});H(p,!1,function(a){return a instanceof Range},{create:function(a){return a.every()}});
101
- "use strict";function Ac(a,b,c,d,e){Infinity!==b&&(a.timers||(a.timers=[]),x(b)||(b=1),a.n=!1,a.timers.push(setTimeout(function(){a.n||c.apply(d,e||[])},b)))}
102
- H(Function,!0,!0,{lazy:function(a,b,c){function d(){g.length<c-(f&&b?1:0)&&g.push([this,arguments]);f||(f=!0,b?h():Ac(d,m,h));return z}var e=this,g=[],f=!1,h,m,n,z;a=a||1;c=c||Infinity;m=Aa(a);n=R(m/a)||1;h=function(){var a=g.length,b;if(0!=a){for(b=S(a-n,0);a>b;)z=Function.prototype.apply.apply(e,g.shift()),a--;Ac(d,m,function(){f=!1;h()})}};return d},throttle:function(a){return this.lazy(a,!0,1)},debounce:function(a){function b(){b.cancel();Ac(b,a,c,this,arguments)}var c=this;return b},delay:function(a){var b=
103
- L(arguments,null,1);Ac(this,a,this,this,b);return this},every:function(a){function b(){c.apply(c,d);Ac(c,a,b)}var c=this,d=arguments,d=1<d.length?L(d,null,1):[];Ac(c,a,b);return c},cancel:function(){var a=this.timers,b;if(A(a))for(;b=a.shift();)clearTimeout(b);this.n=!0;return this},after:function(a){var b=this,c=0,d=[];if(!x(a))a=1;else if(0===a)return b.call(),b;return function(){var e;d.push(L(arguments));c++;if(c==a)return e=b.call(this,d),c=0,d=[],e}},once:function(){return this.throttle(Infinity,
103
+ "use strict";function Gc(a,b,c,d,e){Infinity!==b&&(a.timers||(a.timers=[]),x(b)||(b=1),a.n=!1,a.timers.push(setTimeout(function(){a.n||c.apply(d,e||[])},b)))}
104
+ H(Function,!0,!0,{lazy:function(a,b,c){function d(){g.length<c-(f&&b?1:0)&&g.push([this,arguments]);f||(f=!0,b?h():Gc(d,l,h));return y}var e=this,g=[],f=!1,h,l,n,y;a=a||1;c=c||Infinity;l=Aa(a);n=R(l/a)||1;h=function(){var a=g.length,b;if(0!=a){for(b=S(a-n,0);a>b;)y=Function.prototype.apply.apply(e,g.shift()),a--;Gc(d,l,function(){f=!1;h()})}};return d},throttle:function(a){return this.lazy(a,!0,1)},debounce:function(a){function b(){b.cancel();Gc(b,a,c,this,arguments)}var c=this;return b},delay:function(a){var b=
105
+ L(arguments,null,1);Gc(this,a,this,this,b);return this},every:function(a){function b(){c.apply(c,d);Gc(c,a,b)}var c=this,d=arguments,d=1<d.length?L(d,null,1):[];Gc(c,a,b);return c},cancel:function(){var a=this.timers,b;if(A(a))for(;b=a.shift();)clearTimeout(b);this.n=!0;return this},after:function(a){var b=this,c=0,d=[];if(!x(a))a=1;else if(0===a)return b.call(),b;return function(){var e;d.push(L(arguments));c++;if(c==a)return e=b.call(this,d),c=0,d=[],e}},once:function(){return this.throttle(Infinity,
104
106
  !0)},fill:function(){var a=this,b=L(arguments);return function(){var c=L(arguments);b.forEach(function(a,b){(null!=a||b>=c.length)&&c.splice(b,0,a)});return a.apply(this,c)}}});
105
- "use strict";function Bc(a,b,c,d,e,g){var f=a.toFixed(20),h=f.search(/\./),f=f.search(/[1-9]/),h=h-f;0<h&&(h-=1);e=S(Ca(Q(h/3),!1===e?c.length:e),-d);d=c.charAt(e+d-1);-9>h&&(e=-3,b=P(h)-9,d=c.slice(0,1));c=g?za(2,10*e):za(10,3*e);return Da(a/c,b||0).format()+d.trim()}
107
+ "use strict";function Hc(a,b,c,d,e,g){var f=a.toFixed(20),h=f.search(/\./),f=f.search(/[1-9]/),h=h-f;0<h&&(h-=1);e=S(Ca(Q(h/3),!1===e?c.length:e),-d);d=c.charAt(e+d-1);-9>h&&(e=-3,b=P(h)-9,d=c.slice(0,1));c=g?za(2,10*e):za(10,3*e);return Da(a/c,b||0).format()+d.trim()}
106
108
  H(t,!1,!0,{random:function(a,b){var c,d;1==arguments.length&&(b=a,a=0);c=Ca(a||0,N(b)?1:b);d=S(a||0,N(b)?1:b)+1;return Q(u.random()*(d-c)+c)}});
107
- H(t,!0,!0,{log:function(a){return u.log(this)/(a?u.log(a):1)},abbr:function(a){return Bc(this,a,"kmbt",0,4)},metric:function(a,b){return Bc(this,a,"n\u03bcm kMGTPE",4,N(b)?1:b)},bytes:function(a,b){return Bc(this,a,"kMGTPE",0,N(b)?4:b,!0)+"B"},isInteger:function(){return 0==this%1},isOdd:function(){return!isNaN(this)&&!this.isMultipleOf(2)},isEven:function(){return this.isMultipleOf(2)},isMultipleOf:function(a){return 0===this%a},format:function(a,b,c){var d,e,g,f="";N(b)&&(b=",");N(c)&&(c=".");d=
109
+ H(t,!0,!0,{log:function(a){return u.log(this)/(a?u.log(a):1)},abbr:function(a){return Hc(this,a,"kmbt",0,4)},metric:function(a,b){return Hc(this,a,"n\u03bcm kMGTPE",4,N(b)?1:b)},bytes:function(a,b){return Hc(this,a,"kMGTPE",0,N(b)?4:b,!0)+"B"},isInteger:function(){return 0==this%1},isOdd:function(){return!isNaN(this)&&!this.isMultipleOf(2)},isEven:function(){return this.isMultipleOf(2)},isMultipleOf:function(a){return 0===this%a},format:function(a,b,c){var d,e,g,f="";N(b)&&(b=",");N(c)&&(c=".");d=
108
110
  (x(a)?Da(this,a||0).toFixed(S(a,0)):this.toString()).replace(/^-/,"").split(".");e=d[0];g=d[1];for(d=e.length;0<d;d-=3)d<e.length&&(f=b+f),f=e.slice(S(0,d-3),d)+f;g&&(f+=c+Na("0",(a||0)-g.length)+g);return(0>this?"-":"")+f},hex:function(a){return this.pad(a||1,!1,16)},times:function(a){if(a)for(var b=0;b<this;b++)a.call(this,b);return this.toNumber()},chr:function(){return s.fromCharCode(this)},pad:function(a,b,c){return T(this,a,b,c)},ordinalize:function(){var a=P(this),a=parseInt(a.toString().slice(-2));
109
111
  return this+Pa(a)},toNumber:function(){return parseFloat(this,10)}});(function(){function a(a){return function(c){return c?Da(this,c,a):a(this)}}H(t,!0,!0,{ceil:a(Aa),round:a(R),floor:a(Q)});K(t,!0,!0,"abs,pow,sin,asin,cos,acos,tan,atan,exp,pow,sqrt",function(a,c){a[c]=function(a,b){return u[c](this,a,b)}})})();
110
- "use strict";var Cc=["isObject","isNaN"],Dc="keys values select reject each merge clone equal watch tap has toQueryString".split(" ");
111
- function Ec(a,b,c,d){var e,g,f;(g=b.match(/^(.+?)(\[.*\])$/))?(f=g[1],b=g[2].replace(/^\[|\]$/g,"").split("]["),b.forEach(function(b){e=!b||b.match(/^\d+$/);!f&&A(a)&&(f=a.length);J(a,f)||(a[f]=e?[]:{});a=a[f];f=b}),!f&&e&&(f=a.length.toString()),Ec(a,f,c,d)):a[b]=d&&"true"===c?!0:d&&"false"===c?!1:c}function Fc(a,b){var c;return A(b)||G(b)&&b.toString===v?(c=[],I(b,function(b,e){a&&(b=a+"["+b+"]");c.push(Fc(b,e))}),c.join("&")):a?Gc(a)+"="+(C(b)?b.getTime():Gc(b)):""}
112
- function Gc(a){return a||!1===a||0===a?encodeURIComponent(a).replace(/%20/g,"+"):""}function Hc(a,b,c){var d,e=a instanceof O?new O:{};I(a,function(a,f){d=!1;sa(b,function(b){(D(b)?b.test(a):G(b)?J(b,a):a===s(b))&&(d=!0)},1);d===c&&(e[a]=f)});return e}H(l,!1,!0,{watch:function(a,b,c){if(ea){var d=a[b];l.defineProperty(a,b,{enumerable:!0,configurable:!0,get:function(){return d},set:function(e){d=c.call(a,b,d,e)}})}}});
113
- H(l,!1,function(){return 1<arguments.length},{keys:function(a,b){var c=l.keys(a);c.forEach(function(c){b.call(a,c,a[c])});return c}});
114
- H(l,!1,!0,{isObject:function(a){return va(a)},isNaN:function(a){return x(a)&&a.valueOf()!==a.valueOf()},equal:function(a,b){return Ua(a,b)},extended:function(a){return new O(a)},merge:function(a,b,c,d){var e,g,f;if(a&&"string"!==typeof b)for(e in b)if(J(b,e)&&a){g=b[e];f=c&&G(g);if(M(a[e])){if(!1===d&&!f)continue;F(d)&&(g=d.call(b,e,a[e],b[e]))}if(f)if(C(g))g=new r(g.getTime());else if(D(g))g=new q(g.source,Qa(g));else{a[e]||(a[e]=p.isArray(g)?[]:{});l.merge(a[e],b[e],c,d);continue}a[e]=g}return a},
115
- values:function(a,b){var c=[];I(a,function(d,e){c.push(e);b&&b.call(a,e)});return c},clone:function(a,b){var c;if(!G(a))return a;c=v.call(a);if(C(a,c)&&a.clone)return a.clone();if(C(a,c)||D(a,c))return new a.constructor(a);if(a instanceof O)c=new O;else if(A(a,c))c=[];else if(va(a,c))c={};else throw new TypeError("Clone must be a basic data type.");return l.merge(c,a,b)},fromQueryString:function(a,b){var c=l.extended();a=a&&a.toString?a.toString():"";a.replace(/^.*?\?/,"").split("&").forEach(function(a){a=
116
- a.split("=");2===a.length&&Ec(c,a[0],decodeURIComponent(a[1]),b)});return c},toQueryString:function(a,b){return Fc(b,a)},tap:function(a,b){var c=b;F(b)||(c=function(){if(b)a[b]()});c.call(a,a);return a},has:function(a,b){return J(a,b)},select:function(a){return Hc(a,arguments,!0)},reject:function(a){return Hc(a,arguments,!1)}});K(l,!1,!0,w,function(a,b){var c="is"+b;Cc.push(c);a[c]=ia[b]});
117
- H(l,!1,function(){return 0===arguments.length},{extend:function(){var a=Cc.concat(Dc);"undefined"!==typeof Hb&&(a=a.concat(Hb));Ya(a,l)}});Ya(Dc,O);
112
+ "use strict";var Ic=["isObject","isNaN"],Jc="keys values select reject each merge clone equal watch tap has toQueryString".split(" ");
113
+ function Kc(a,b,c,d){var e,g,f;(g=b.match(/^(.+?)(\[.*\])$/))?(f=g[1],b=g[2].replace(/^\[|\]$/g,"").split("]["),b.forEach(function(b){e=!b||b.match(/^\d+$/);!f&&A(a)&&(f=a.length);J(a,f)||(a[f]=e?[]:{});a=a[f];f=b}),!f&&e&&(f=a.length.toString()),Kc(a,f,c,d)):a[b]=d&&"true"===c?!0:d&&"false"===c?!1:c}function Lc(a,b){var c;return A(b)||G(b)&&b.toString===v?(c=[],I(b,function(b,e){a&&(b=a+"["+b+"]");c.push(Lc(b,e))}),c.join("&")):a?Mc(a)+"="+(C(b)?b.getTime():Mc(b)):""}
114
+ function Mc(a){return a||!1===a||0===a?encodeURIComponent(a).replace(/%20/g,"+"):""}function Nc(a,b,c){var d,e=a instanceof O?new O:{};I(a,function(a,f){d=!1;sa(b,function(b){(D(b)?b.test(a):G(b)?b[a]===f:a===s(b))&&(d=!0)},1);d===c&&(e[a]=f)});return e}H(m,!1,!0,{watch:function(a,b,c){if(ea){var d=a[b];m.defineProperty(a,b,{enumerable:!0,configurable:!0,get:function(){return d},set:function(e){d=c.call(a,b,d,e)}})}}});
115
+ H(m,!1,function(){return 1<arguments.length},{keys:function(a,b){var c=m.keys(a);c.forEach(function(c){b.call(a,c,a[c])});return c}});
116
+ H(m,!1,!0,{isObject:function(a){return va(a)},isNaN:function(a){return x(a)&&a.valueOf()!==a.valueOf()},equal:function(a,b){return Ua(a,b)},extended:function(a){return new O(a)},merge:function(a,b,c,d){var e,g,f,h,l,n,y;if(a&&"string"!==typeof b)for(e in b)if(J(b,e)&&a){h=b[e];l=a[e];n=M(l);g=G(h);f=G(l);y=n&&!1===d?l:h;n&&F(d)&&(y=d.call(b,e,l,h));if(c&&(g||f))if(C(h))y=new r(h.getTime());else if(D(h))y=new q(h.source,Qa(h));else{f||(a[e]=p.isArray(h)?[]:{});m.merge(a[e],h,c,d);continue}a[e]=y}return a},
117
+ values:function(a,b){var c=[];I(a,function(d,e){c.push(e);b&&b.call(a,e)});return c},clone:function(a,b){var c;if(!G(a))return a;c=v.call(a);if(C(a,c)&&a.clone)return a.clone();if(C(a,c)||D(a,c))return new a.constructor(a);if(a instanceof O)c=new O;else if(A(a,c))c=[];else if(va(a,c))c={};else throw new TypeError("Clone must be a basic data type.");return m.merge(c,a,b)},fromQueryString:function(a,b){var c=m.extended();a=a&&a.toString?a.toString():"";a.replace(/^.*?\?/,"").split("&").forEach(function(a){a=
118
+ a.split("=");2===a.length&&Kc(c,a[0],decodeURIComponent(a[1]),b)});return c},toQueryString:function(a,b){return Lc(b,a)},tap:function(a,b){var c=b;F(b)||(c=function(){if(b)a[b]()});c.call(a,a);return a},has:function(a,b){return J(a,b)},select:function(a){return Nc(a,arguments,!0)},reject:function(a){return Nc(a,arguments,!1)}});K(m,!1,!0,w,function(a,b){var c="is"+b;Ic.push(c);a[c]=ia[b]});
119
+ H(m,!1,function(){return 0===arguments.length},{extend:function(){var a=Ic.concat(Jc);"undefined"!==typeof Hb&&(a=a.concat(Hb));Ya(a,m)}});Ya(Jc,O);
118
120
  "use strict";H(q,!1,!0,{escape:function(a){return Ra(a)}});H(q,!0,!0,{getFlags:function(){return Qa(this)},setFlags:function(a){return q(this.source,a)},addFlag:function(a){return this.setFlags(Qa(this,a))},removeFlag:function(a){return this.setFlags(Qa(this).replace(a,""))}});
119
121
  "use strict";
120
- function Ic(a){a=+a;if(0>a||Infinity===a)throw new RangeError("Invalid number");return a}function Jc(a,b){return Na(M(b)?b:" ",a)}function Kc(a,b,c,d,e){var g;if(a.length<=b)return a.toString();d=N(d)?"...":d;switch(c){case "left":return a=e?Lc(a,b,!0):a.slice(a.length-b),d+a;case "middle":return c=Aa(b/2),g=Q(b/2),b=e?Lc(a,c):a.slice(0,c),a=e?Lc(a,g,!0):a.slice(a.length-g),b+d+a;default:return b=e?Lc(a,b):a.slice(0,b),b+d}}
121
- function Lc(a,b,c){if(c)return Lc(a.reverse(),b).reverse();c=q("(?=["+Ma()+"])");var d=0;return a.split(c).filter(function(a){d+=a.length;return d<=b}).join("")}function Mc(a,b,c){y(b)&&(b=a.indexOf(b),-1===b&&(b=c?a.length:0));return b}var Nc,Oc;H(s,!0,!1,{repeat:function(a){a=Ic(a);return Na(this,a)}});
122
+ function Oc(a){a=+a;if(0>a||Infinity===a)throw new RangeError("Invalid number");return a}function Pc(a,b){return Na(M(b)?b:" ",a)}function Qc(a,b,c,d,e){var g;if(a.length<=b)return a.toString();d=N(d)?"...":d;switch(c){case "left":return a=e?Rc(a,b,!0):a.slice(a.length-b),d+a;case "middle":return c=Aa(b/2),g=Q(b/2),b=e?Rc(a,c):a.slice(0,c),a=e?Rc(a,g,!0):a.slice(a.length-g),b+d+a;default:return b=e?Rc(a,b):a.slice(0,b),b+d}}
123
+ function Rc(a,b,c){if(c)return Rc(a.reverse(),b).reverse();c=q("(?=["+Ma()+"])");var d=0;return a.split(c).filter(function(a){d+=a.length;return d<=b}).join("")}function Sc(a,b,c){z(b)&&(b=a.indexOf(b),-1===b&&(b=c?a.length:0));return b}var Tc,Uc;H(s,!0,!1,{repeat:function(a){a=Oc(a);return Na(this,a)}});
122
124
  H(s,!0,function(a){return D(a)||2<arguments.length},{startsWith:function(a){var b=arguments,c=b[1],b=b[2],d=this;c&&(d=d.slice(c));N(b)&&(b=!0);c=D(a)?a.source.replace("^",""):Ra(a);return q("^"+c,b?"":"i").test(d)},endsWith:function(a){var b=arguments,c=b[1],b=b[2],d=this;M(c)&&(d=d.slice(0,c));N(b)&&(b=!0);c=D(a)?a.source.replace("$",""):Ra(a);return q(c+"$",b?"":"i").test(d)}});
123
125
  H(s,!0,!0,{escapeRegExp:function(){return Ra(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;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/\//g,"&#x2f;")},unescapeHTML:function(){return this.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&apos;/g,"'").replace(/&#x2f;/g,
124
- "/").replace(/&amp;/g,"&")},encodeBase64:function(){return Nc(unescape(encodeURIComponent(this)))},decodeBase64:function(){return decodeURIComponent(escape(Oc(this)))},each:function(a,b){var c,d,e;F(a)?(b=a,a=/[\s\S]/g):a?y(a)?a=q(Ra(a),"gi"):D(a)&&(a=q(a.source,Qa(a,"g"))):a=/[\s\S]/g;c=this.match(a)||[];if(b)for(d=0,e=c.length;d<e;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+=s.fromCharCode(c+a)});return b},codes:function(a){var b=[],
126
+ "/").replace(/&amp;/g,"&")},encodeBase64:function(){return Tc(unescape(encodeURIComponent(this)))},decodeBase64:function(){return decodeURIComponent(escape(Uc(this)))},each:function(a,b){var c,d,e;F(a)?(b=a,a=/[\s\S]/g):a?z(a)?a=q(Ra(a),"gi"):D(a)&&(a=q(a.source,Qa(a,"g"))):a=/[\s\S]/g;c=this.match(a)||[];if(b)for(d=0,e=c.length;d<e;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+=s.fromCharCode(c+a)});return b},codes:function(a){var b=[],
125
127
  c,d;c=0;for(d=this.length;c<d;c++){var e=this.charCodeAt(c);b.push(e);a&&a.call(this,e,c)}return b},chars:function(a){return this.each(a)},words:function(a){return this.trim().each(/\S+/g,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(b){if(a)var d=a.call(b);return d?d:b})},isBlank:function(){return 0===this.trim().length},has:function(a){return-1!==this.search(D(a)?a:Ra(a))},add:function(a,b){b=N(b)?
126
- 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"\u3000"===b?b:" "})},at:function(){return Wa(this,arguments,!0)},from:function(a){return this.slice(Mc(this,a,!0))},to:function(a){N(a)&&(a=this.length);return this.slice(0,Mc(this,a))},dasherize:function(){return this.underscore().replace(/_/g,"-")},underscore:function(){return this.replace(/[-\s]+/g,
127
- "_").replace(s.Inflector&&s.Inflector.acronymRegExp,function(a,b){return(0<b?"_":"")+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=(b=s.Inflector)&&b.acronyms[d];b=y(b)?b:void 0;e=!1!==a||0<e;return b?e?b:b.toLowerCase():e?d.capitalize():d})},spacify:function(){return this.underscore().replace(/_/g," ")},stripTags:function(){var a=this;sa(0<arguments.length?
128
- arguments:[""],function(b){a=a.replace(q("</?"+Ra(b)+"[^<>]*>","gi"),"")});return a},removeTags:function(){var a=this;sa(0<arguments.length?arguments:["\\S+"],function(b){b=q("<("+b+")[^<>]*(?:\\/>|>.*?<\\/\\1>)","gi");a=a.replace(b,"")});return a},truncate:function(a,b,c){return Kc(this,a,b,c)},truncateOnWord:function(a,b,c){return Kc(this,a,b,c,!0)},pad:function(a,b){var c,d;a=Ic(a);c=S(0,a-this.length)/2;d=Q(c);c=Aa(c);return Jc(d,b)+this+Jc(c,b)},padLeft:function(a,b){a=Ic(a);return Jc(S(0,a-
129
- this.length),b)+this},padRight:function(a,b){a=Ic(a);return this+Jc(S(0,a-this.length),b)},first:function(a){N(a)&&(a=1);return this.substr(0,a)},last:function(a){N(a)&&(a=1);return this.substr(0>this.length-a?0:this.length-a)},toNumber:function(a){return Oa(this,a)},capitalize:function(a){var b;return this.toLowerCase().replace(a?/[^']/g:/^\S/,function(a){var d=a.toUpperCase(),e;e=b?a:d;b=d!==a;return e})},assign:function(){var a={};sa(arguments,function(b,c){G(b)?xa(a,b):a[c+1]=b});return this.replace(/\{([^{]+?)\}/g,
128
+ 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"\u3000"===b?b:" "})},at:function(){return Wa(this,arguments,!0)},from:function(a){return this.slice(Sc(this,a,!0))},to:function(a){N(a)&&(a=this.length);return this.slice(0,Sc(this,a))},dasherize:function(){return this.underscore().replace(/_/g,"-")},underscore:function(){return this.replace(/[-\s]+/g,
129
+ "_").replace(s.Inflector&&s.Inflector.acronymRegExp,function(a,b){return(0<b?"_":"")+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=(b=s.Inflector)&&b.acronyms[d];b=z(b)?b:void 0;e=!1!==a||0<e;return b?e?b:b.toLowerCase():e?d.capitalize():d})},spacify:function(){return this.underscore().replace(/_/g," ")},stripTags:function(){var a=this;sa(0<arguments.length?
130
+ arguments:[""],function(b){a=a.replace(q("</?"+Ra(b)+"[^<>]*>","gi"),"")});return a},removeTags:function(){var a=this;sa(0<arguments.length?arguments:["\\S+"],function(b){b=q("<("+b+")[^<>]*(?:\\/>|>.*?<\\/\\1>)","gi");a=a.replace(b,"")});return a},truncate:function(a,b,c){return Qc(this,a,b,c)},truncateOnWord:function(a,b,c){return Qc(this,a,b,c,!0)},pad:function(a,b){var c,d;a=Oc(a);c=S(0,a-this.length)/2;d=Q(c);c=Aa(c);return Pc(d,b)+this+Pc(c,b)},padLeft:function(a,b){a=Oc(a);return Pc(S(0,a-
131
+ this.length),b)+this},padRight:function(a,b){a=Oc(a);return this+Pc(S(0,a-this.length),b)},first:function(a){N(a)&&(a=1);return this.substr(0,a)},last:function(a){N(a)&&(a=1);return this.substr(0>this.length-a?0:this.length-a)},toNumber:function(a){return Oa(this,a)},capitalize:function(a){var b;return this.toLowerCase().replace(a?/[^']/g:/^\S/,function(a){var d=a.toUpperCase(),e;e=b?a:d;b=d!==a;return e})},assign:function(){var a={};sa(arguments,function(b,c){G(b)?xa(a,b):a[c+1]=b});return this.replace(/\{([^{]+?)\}/g,
130
132
  function(b,c){return J(a,c)?a[c]:b})}});H(s,!0,!0,{insert:s.prototype.add});
131
- (function(a){if(ba.btoa)Nc=ba.btoa,Oc=ba.atob;else{var b=/[^A-Za-z0-9\+\/\=]/g;Nc=function(b){var d="",e,g,f,h,m,n,z=0;do e=b.charCodeAt(z++),g=b.charCodeAt(z++),f=b.charCodeAt(z++),h=e>>2,e=(e&3)<<4|g>>4,m=(g&15)<<2|f>>6,n=f&63,isNaN(g)?m=n=64:isNaN(f)&&(n=64),d=d+a.charAt(h)+a.charAt(e)+a.charAt(m)+a.charAt(n);while(z<b.length);return d};Oc=function(c){var d="",e,g,f,h,m,n=0;if(c.match(b))throw Error("String contains invalid base64 characters");c=c.replace(/[^A-Za-z0-9\+\/\=]/g,"");do e=a.indexOf(c.charAt(n++)),
132
- g=a.indexOf(c.charAt(n++)),h=a.indexOf(c.charAt(n++)),m=a.indexOf(c.charAt(n++)),e=e<<2|g>>4,g=(g&15)<<4|h>>2,f=(h&3)<<6|m,d+=s.fromCharCode(e),64!=h&&(d+=s.fromCharCode(g)),64!=m&&(d+=s.fromCharCode(f));while(n<c.length);return d}}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");
133
- "use strict";var Pc=[],Qc=[],Rc=[],Sc=[],Tc={},Uc,$;function Vc(a){var b=Rc;a=b.indexOf(a);-1<a&&b.splice(a,1)}
134
- function Wc(a,b,c){y(b)&&Vc(b);Vc(c);a.unshift({l:b,p:c})}function Xc(a,b){return a==b||"all"==a||!a}function Yc(a){return Rc.some(function(b){return(new q("\\b"+b+"$","i")).test(a)})}function Zc(a,b){a=y(a)?a.toString():"";return a.isBlank()||Yc(a)?a:$c(a,b?Pc:Qc)}function $c(a,b){I(b,function(b,d){if(a.match(d.l))return a=a.replace(d.l,d.p),!1});return a}function ad(a){return a.replace(/^\W*[a-z]/,function(a){return a.toUpperCase()})}
135
- $={acronym:function(a){Tc[a.toLowerCase()]=a;a=l.keys(Tc).map(function(a){return Tc[a]});$.acronymRegExp=q(a.join("|"),"g")},plural:function(a,b){Wc(Pc,a,b)},singular:function(a,b){Wc(Qc,a,b)},irregular:function(a,b){var c=a.first(),d=a.from(1),e=b.first(),g=b.from(1),f=e.toUpperCase(),h=e.toLowerCase(),m=c.toUpperCase(),n=c.toLowerCase();Vc(a);Vc(b);m==f?($.plural(new q("({1}){2}$".assign(c,d),"i"),"$1"+g),$.plural(new q("({1}){2}$".assign(e,g),"i"),"$1"+g),$.singular(new q("({1}){2}$".assign(e,
136
- g),"i"),"$1"+d)):($.plural(new q("{1}{2}$".assign(m,d)),f+g),$.plural(new q("{1}{2}$".assign(n,d)),h+g),$.plural(new q("{1}{2}$".assign(f,g)),f+g),$.plural(new q("{1}{2}$".assign(h,g)),h+g),$.singular(new q("{1}{2}$".assign(f,g)),m+d),$.singular(new q("{1}{2}$".assign(h,g)),n+d))},uncountable:function(a){var b=p.isArray(a)?a:L(arguments);Rc=Rc.concat(b)},human:function(a,b){Sc.unshift({l:a,p:b})},clear:function(a){Xc(a,"singulars")&&(Qc=[]);Xc(a,"plurals")&&(Pc=[]);Xc(a,"uncountables")&&(Rc=[]);Xc(a,
137
- "humans")&&(Sc=[]);Xc(a,"acronyms")&&(Tc={})}};Uc="and or nor a an the so but to of at by from into on onto off out in over with for".split(" ");$.plural(/$/,"s");$.plural(/s$/gi,"s");$.plural(/(ax|test)is$/gi,"$1es");$.plural(/(octop|vir|fung|foc|radi|alumn)(i|us)$/gi,"$1i");$.plural(/(census|alias|status)$/gi,"$1es");$.plural(/(bu)s$/gi,"$1ses");$.plural(/(buffal|tomat)o$/gi,"$1oes");$.plural(/([ti])um$/gi,"$1a");$.plural(/([ti])a$/gi,"$1a");$.plural(/sis$/gi,"ses");$.plural(/f+e?$/gi,"ves");
133
+ (function(a){if(ba.btoa)Tc=ba.btoa,Uc=ba.atob;else{var b=/[^A-Za-z0-9\+\/\=]/g;Tc=function(b){var d="",e,g,f,h,l,n,y=0;do e=b.charCodeAt(y++),g=b.charCodeAt(y++),f=b.charCodeAt(y++),h=e>>2,e=(e&3)<<4|g>>4,l=(g&15)<<2|f>>6,n=f&63,isNaN(g)?l=n=64:isNaN(f)&&(n=64),d=d+a.charAt(h)+a.charAt(e)+a.charAt(l)+a.charAt(n);while(y<b.length);return d};Uc=function(c){var d="",e,g,f,h,l,n=0;if(c.match(b))throw Error("String contains invalid base64 characters");c=c.replace(/[^A-Za-z0-9\+\/\=]/g,"");do e=a.indexOf(c.charAt(n++)),
134
+ g=a.indexOf(c.charAt(n++)),h=a.indexOf(c.charAt(n++)),l=a.indexOf(c.charAt(n++)),e=e<<2|g>>4,g=(g&15)<<4|h>>2,f=(h&3)<<6|l,d+=s.fromCharCode(e),64!=h&&(d+=s.fromCharCode(g)),64!=l&&(d+=s.fromCharCode(f));while(n<c.length);return d}}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");
135
+ "use strict";var Vc=[],Wc=[],Xc=[],Yc=[],Zc={},$c,$;function ad(a){var b=Xc;a=b.indexOf(a);-1<a&&b.splice(a,1)}
136
+ function bd(a,b,c){z(b)&&ad(b);ad(c);a.unshift({l:b,p:c})}function cd(a,b){return a==b||"all"==a||!a}function dd(a){return Xc.some(function(b){return(new q("\\b"+b+"$","i")).test(a)})}function ed(a,b){a=z(a)?a.toString():"";return a.isBlank()||dd(a)?a:fd(a,b?Vc:Wc)}function fd(a,b){I(b,function(b,d){if(a.match(d.l))return a=a.replace(d.l,d.p),!1});return a}function gd(a){return a.replace(/^\W*[a-z]/,function(a){return a.toUpperCase()})}
137
+ $={acronym:function(a){Zc[a.toLowerCase()]=a;a=m.keys(Zc).map(function(a){return Zc[a]});$.acronymRegExp=q(a.join("|"),"g")},plural:function(a,b){bd(Vc,a,b)},singular:function(a,b){bd(Wc,a,b)},irregular:function(a,b){var c=a.first(),d=a.from(1),e=b.first(),g=b.from(1),f=e.toUpperCase(),h=e.toLowerCase(),l=c.toUpperCase(),n=c.toLowerCase();ad(a);ad(b);l==f?($.plural(new q("({1}){2}$".assign(c,d),"i"),"$1"+g),$.plural(new q("({1}){2}$".assign(e,g),"i"),"$1"+g),$.singular(new q("({1}){2}$".assign(e,
138
+ g),"i"),"$1"+d)):($.plural(new q("{1}{2}$".assign(l,d)),f+g),$.plural(new q("{1}{2}$".assign(n,d)),h+g),$.plural(new q("{1}{2}$".assign(f,g)),f+g),$.plural(new q("{1}{2}$".assign(h,g)),h+g),$.singular(new q("{1}{2}$".assign(f,g)),l+d),$.singular(new q("{1}{2}$".assign(h,g)),n+d))},uncountable:function(a){var b=p.isArray(a)?a:L(arguments);Xc=Xc.concat(b)},human:function(a,b){Yc.unshift({l:a,p:b})},clear:function(a){cd(a,"singulars")&&(Wc=[]);cd(a,"plurals")&&(Vc=[]);cd(a,"uncountables")&&(Xc=[]);cd(a,
139
+ "humans")&&(Yc=[]);cd(a,"acronyms")&&(Zc={})}};$c="and or nor a an the so but to of at by from into on onto off out in over with for".split(" ");$.plural(/$/,"s");$.plural(/s$/gi,"s");$.plural(/(ax|test)is$/gi,"$1es");$.plural(/(octop|vir|fung|foc|radi|alumn)(i|us)$/gi,"$1i");$.plural(/(census|alias|status)$/gi,"$1es");$.plural(/(bu)s$/gi,"$1ses");$.plural(/(buffal|tomat)o$/gi,"$1oes");$.plural(/([ti])um$/gi,"$1a");$.plural(/([ti])a$/gi,"$1a");$.plural(/sis$/gi,"ses");$.plural(/f+e?$/gi,"ves");
138
140
  $.plural(/(cuff|roof)$/gi,"$1s");$.plural(/([ht]ive)$/gi,"$1s");$.plural(/([^aeiouy]o)$/gi,"$1es");$.plural(/([^aeiouy]|qu)y$/gi,"$1ies");$.plural(/(x|ch|ss|sh)$/gi,"$1es");$.plural(/(matr|vert|ind)(?:ix|ex)$/gi,"$1ices");$.plural(/([ml])ouse$/gi,"$1ice");$.plural(/([ml])ice$/gi,"$1ice");$.plural(/^(ox)$/gi,"$1en");$.plural(/^(oxen)$/gi,"$1");$.plural(/(quiz)$/gi,"$1zes");$.plural(/(phot|cant|hom|zer|pian|portic|pr|quart|kimon)o$/gi,"$1os");$.plural(/(craft)$/gi,"$1");
139
141
  $.plural(/([ft])[eo]{2}(th?)$/gi,"$1ee$2");$.singular(/s$/gi,"");$.singular(/([pst][aiu]s)$/gi,"$1");$.singular(/([aeiouy])ss$/gi,"$1ss");$.singular(/(n)ews$/gi,"$1ews");$.singular(/([ti])a$/gi,"$1um");$.singular(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/gi,"$1$2sis");$.singular(/(^analy)ses$/gi,"$1sis");$.singular(/(i)(f|ves)$/i,"$1fe");$.singular(/([aeolr]f?)(f|ves)$/i,"$1f");$.singular(/([ht]ive)s$/gi,"$1");$.singular(/([^aeiouy]|qu)ies$/gi,"$1y");
140
142
  $.singular(/(s)eries$/gi,"$1eries");$.singular(/(m)ovies$/gi,"$1ovie");$.singular(/(x|ch|ss|sh)es$/gi,"$1");$.singular(/([ml])(ous|ic)e$/gi,"$1ouse");$.singular(/(bus)(es)?$/gi,"$1");$.singular(/(o)es$/gi,"$1");$.singular(/(shoe)s?$/gi,"$1");$.singular(/(cris|ax|test)[ie]s$/gi,"$1is");$.singular(/(octop|vir|fung|foc|radi|alumn)(i|us)$/gi,"$1us");$.singular(/(census|alias|status)(es)?$/gi,"$1");$.singular(/^(ox)(en)?/gi,"$1");$.singular(/(vert|ind)(ex|ices)$/gi,"$1ex");
141
143
  $.singular(/(matr)(ix|ices)$/gi,"$1ix");$.singular(/(quiz)(zes)?$/gi,"$1");$.singular(/(database)s?$/gi,"$1");$.singular(/ee(th?)$/gi,"oo$1");$.irregular("person","people");$.irregular("man","men");$.irregular("child","children");$.irregular("sex","sexes");$.irregular("move","moves");$.irregular("save","saves");$.irregular("cow","kine");$.irregular("goose","geese");$.irregular("zombie","zombies");$.uncountable("equipment information rice money species series fish sheep jeans".split(" "));
142
- H(s,!0,!0,{pluralize:function(){return Zc(this,!0)},singularize:function(){return Zc(this,!1)},humanize:function(){var a=$c(this,Sc),b,a=a.replace(/_id$/g,""),a=a.replace(/(_)?([a-z\d]*)/gi,function(a,d,e){b=J(Tc,e)?Tc[e]:null;return(d?" ":"")+(b||e.toLowerCase())});return ad(a)},titleize:function(){var a=/[.:;!]$/,b,c,d;return this.spacify().humanize().words(function(e,g,f){b=a.test(e);d=0==g||g==f.length-1||b||c;c=b;return d||-1===Uc.indexOf(e)?ad(e):e}).join(" ")},parameterize:function(a){var b=
143
- this;void 0===a&&(a="-");b.normalize&&(b=b.normalize());b=b.replace(/[^a-z0-9\-_]+/gi,a);a&&(b=b.replace(new q("^{sep}+|{sep}+$|({sep}){sep}+".assign({sep:Ra(a)}),"g"),"$1"));return encodeURI(b.toLowerCase())}});s.Inflector=$;s.Inflector.acronyms=Tc;
144
+ H(s,!0,!0,{pluralize:function(){return ed(this,!0)},singularize:function(){return ed(this,!1)},humanize:function(){var a=fd(this,Yc),b,a=a.replace(/_id$/g,""),a=a.replace(/(_)?([a-z\d]*)/gi,function(a,d,e){b=J(Zc,e)?Zc[e]:null;return(d?" ":"")+(b||e.toLowerCase())});return gd(a)},titleize:function(){var a=/[.:;!]$/,b,c,d;return this.spacify().humanize().words(function(e,g,f){b=a.test(e);d=0==g||g==f.length-1||b||c;c=b;return d||-1===$c.indexOf(e)?gd(e):e}).join(" ")},parameterize:function(a){var b=
145
+ this;void 0===a&&(a="-");b.normalize&&(b=b.normalize());b=b.replace(/[^a-z0-9\-_]+/gi,a);a&&(b=b.replace(new q("^{sep}+|{sep}+$|({sep}){sep}+".assign({sep:Ra(a)}),"g"),"$1"));return encodeURI(b.toLowerCase())}});s.Inflector=$;s.Inflector.acronyms=Zc;
144
146
  "use strict";
145
- var bd=65248,cd=[{type:"a",start:65,end:90},{type:"a",start:97,end:122},{type:"n",start:48,end:57},{type:"p",start:33,end:47},{type:"p",start:58,end:64},{type:"p",start:91,end:96},{type:"p",start:123,end:126}],dd,ed=/[\u0020-\u00A5]|[\uFF61-\uFF9F][\uff9e\uff9f]?/g,fd=/[\u3000-\u301C]|[\u301A-\u30FC]|[\uFF01-\uFF60]|[\uFFE0-\uFFE6]/g,gd="\uff61\uff64\uff62\uff63\u00a5\u00a2\u00a3",hd="\u3002\u3001\u300c\u300d\uffe5\uffe0\uffe1",id=/[\u30ab\u30ad\u30af\u30b1\u30b3\u30b5\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c6\u30c8\u30cf\u30d2\u30d5\u30d8\u30db]/,
146
- jd=/[\u30cf\u30d2\u30d5\u30d8\u30db\u30f2]/,kd="\uff71\uff72\uff73\uff74\uff75\uff67\uff68\uff69\uff6a\uff6b\uff76\uff77\uff78\uff79\uff7a\uff7b\uff7c\uff7d\uff7e\uff7f\uff80\uff81\uff82\uff6f\uff83\uff84\uff85\uff86\uff87\uff88\uff89\uff8a\uff8b\uff8c\uff8d\uff8e\uff8f\uff90\uff91\uff92\uff93\uff94\uff6c\uff95\uff6d\uff96\uff6e\uff97\uff98\uff99\uff9a\uff9b\uff9c\uff66\uff9d\uff70\uff65",ld="\u30a2\u30a4\u30a6\u30a8\u30aa\u30a1\u30a3\u30a5\u30a7\u30a9\u30ab\u30ad\u30af\u30b1\u30b3\u30b5\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c3\u30c6\u30c8\u30ca\u30cb\u30cc\u30cd\u30ce\u30cf\u30d2\u30d5\u30d8\u30db\u30de\u30df\u30e0\u30e1\u30e2\u30e4\u30e3\u30e6\u30e5\u30e8\u30e7\u30e9\u30ea\u30eb\u30ec\u30ed\u30ef\u30f2\u30f3\u30fc\u30fb";
147
- function md(a,b,c,d){dd||nd();var e=L(b).join(""),g=dd[d],e=e.replace(/all/,"").replace(/(\w)lphabet|umbers?|atakana|paces?|unctuation/g,"$1");return a.replace(c,function(a){return!g[a]||e&&!e.has(g[a].type)?a:g[a].to})}
148
- function nd(){var a;dd={zenkaku:{},hankaku:{}};cd.forEach(function(a){wa(a.end-a.start+1,function(c){c+=a.start;od(a.type,s.fromCharCode(c),s.fromCharCode(c+bd))})});ld.each(function(b,c){a=kd.charAt(c);od("k",a,b);b.match(id)&&od("k",a+"\uff9e",b.shift(1));b.match(jd)&&od("k",a+"\uff9f",b.shift(2))});hd.each(function(a,c){od("p",gd.charAt(c),a)});od("k","\uff73\uff9e","\u30f4");od("k","\uff66\uff9e","\u30fa");od("s"," ","\u3000")}
149
- function od(a,b,c){dd.zenkaku[b]={type:a,to:c};dd.hankaku[c]={type:a,to:b}}H(s,!0,!0,{hankaku:function(){return md(this,arguments,fd,"hankaku")},zenkaku:function(){return md(this,arguments,ed,"zenkaku")},hiragana:function(a){var b=this;!1!==a&&(b=b.zenkaku("k"));return b.replace(/[\u30A1-\u30F6]/g,function(a){return a.shift(-96)})},katakana:function(){return this.replace(/[\u3041-\u3096]/g,function(a){return a.shift(96)})}});
147
+ var hd=65248,id=[{type:"a",start:65,end:90},{type:"a",start:97,end:122},{type:"n",start:48,end:57},{type:"p",start:33,end:47},{type:"p",start:58,end:64},{type:"p",start:91,end:96},{type:"p",start:123,end:126}],jd,kd=/[\u0020-\u00A5]|[\uFF61-\uFF9F][\uff9e\uff9f]?/g,ld=/[\u3000-\u301C]|[\u301A-\u30FC]|[\uFF01-\uFF60]|[\uFFE0-\uFFE6]/g,md="\uff61\uff64\uff62\uff63\u00a5\u00a2\u00a3",nd="\u3002\u3001\u300c\u300d\uffe5\uffe0\uffe1",od=/[\u30ab\u30ad\u30af\u30b1\u30b3\u30b5\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c6\u30c8\u30cf\u30d2\u30d5\u30d8\u30db]/,
148
+ pd=/[\u30cf\u30d2\u30d5\u30d8\u30db\u30f2]/,qd="\uff71\uff72\uff73\uff74\uff75\uff67\uff68\uff69\uff6a\uff6b\uff76\uff77\uff78\uff79\uff7a\uff7b\uff7c\uff7d\uff7e\uff7f\uff80\uff81\uff82\uff6f\uff83\uff84\uff85\uff86\uff87\uff88\uff89\uff8a\uff8b\uff8c\uff8d\uff8e\uff8f\uff90\uff91\uff92\uff93\uff94\uff6c\uff95\uff6d\uff96\uff6e\uff97\uff98\uff99\uff9a\uff9b\uff9c\uff66\uff9d\uff70\uff65",rd="\u30a2\u30a4\u30a6\u30a8\u30aa\u30a1\u30a3\u30a5\u30a7\u30a9\u30ab\u30ad\u30af\u30b1\u30b3\u30b5\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c3\u30c6\u30c8\u30ca\u30cb\u30cc\u30cd\u30ce\u30cf\u30d2\u30d5\u30d8\u30db\u30de\u30df\u30e0\u30e1\u30e2\u30e4\u30e3\u30e6\u30e5\u30e8\u30e7\u30e9\u30ea\u30eb\u30ec\u30ed\u30ef\u30f2\u30f3\u30fc\u30fb";
149
+ function sd(a,b,c,d){jd||td();var e=L(b).join(""),g=jd[d],e=e.replace(/all/,"").replace(/(\w)lphabet|umbers?|atakana|paces?|unctuation/g,"$1");return a.replace(c,function(a){return!g[a]||e&&!e.has(g[a].type)?a:g[a].to})}
150
+ function td(){var a;jd={zenkaku:{},hankaku:{}};id.forEach(function(a){wa(a.end-a.start+1,function(c){c+=a.start;ud(a.type,s.fromCharCode(c),s.fromCharCode(c+hd))})});rd.each(function(b,c){a=qd.charAt(c);ud("k",a,b);b.match(od)&&ud("k",a+"\uff9e",b.shift(1));b.match(pd)&&ud("k",a+"\uff9f",b.shift(2))});nd.each(function(a,c){ud("p",md.charAt(c),a)});ud("k","\uff73\uff9e","\u30f4");ud("k","\uff66\uff9e","\u30fa");ud("s"," ","\u3000")}
151
+ function ud(a,b,c){jd.zenkaku[b]={type:a,to:c};jd.hankaku[c]={type:a,to:b}}H(s,!0,!0,{hankaku:function(){return sd(this,arguments,ld,"hankaku")},zenkaku:function(){return sd(this,arguments,kd,"zenkaku")},hiragana:function(a){var b=this;!1!==a&&(b=b.zenkaku("k"));return b.replace(/[\u30A1-\u30F6]/g,function(a){return a.shift(-96)})},katakana:function(){return this.replace(/[\u3041-\u3096]/g,function(a){return a.shift(96)})}});
150
152
  [{a:["Arabic"],source:"\u0600-\u06ff"},{a:["Cyrillic"],source:"\u0400-\u04ff"},{a:["Devanagari"],source:"\u0900-\u097f"},{a:["Greek"],source:"\u0370-\u03ff"},{a:["Hangul"],source:"\uac00-\ud7af\u1100-\u11ff"},{a:["Han","Kanji"],source:"\u4e00-\u9fff\uf900-\ufaff"},{a:["Hebrew"],source:"\u0590-\u05ff"},{a:["Hiragana"],source:"\u3040-\u309f\u30fb-\u30fc"},{a:["Kana"],source:"\u3040-\u30ff\uff61-\uff9f"},{a:["Katakana"],source:"\u30a0-\u30ff\uff61-\uff9f"},{a:["Latin"],source:"\u0001-\u007f\u0080-\u00ff\u0100-\u017f\u0180-\u024f"},
151
153
  {a:["Thai"],source:"\u0e00-\u0e7f"}].forEach(function(a){var b=q("^["+a.source+"\\s]+$"),c=q("["+a.source+"]");a.a.forEach(function(a){oa(s.prototype,"is"+a,function(){return b.test(this.trim())});oa(s.prototype,"has"+a,function(){return c.test(this)})})});
152
154
  Date.addLocale("da",{plural:!0,months:"januar,februar,marts,april,maj,juni,juli,august,september,oktober,november,december",weekdays:"s\u00f8ndag|sondag,mandag,tirsdag,onsdag,torsdag,fredag,l\u00f8rdag|lordag",units:"millisekund:|er,sekund:|er,minut:|ter,tim:e|er,dag:|e,ug:e|er|en,m\u00e5ned:|er|en+maaned:|er|en,\u00e5r:||et+aar:||et",numbers:"en|et,to,tre,fire,fem,seks,syv,otte,ni,ti",tokens:"den,for",articles:"den","short":"d. {d}. {month} {yyyy}","long":"den {d}. {month} {yyyy} {H}:{mm}",full:"{Weekday} den {d}. {month} {yyyy} {H}:{mm}:{ss}",
@@ -192,9 +194,9 @@ relative:function(a,b,c,d){c=a.toString().slice(-1);switch(!0){case 11<=a&&15>=a
192
194
  Date.addLocale("sv",{plural:!0,months:"januari,februari,mars,april,maj,juni,juli,augusti,september,oktober,november,december",weekdays:"s\u00f6ndag|sondag,m\u00e5ndag:|en+mandag:|en,tisdag,onsdag,torsdag,fredag,l\u00f6rdag|lordag",units:"millisekund:|er,sekund:|er,minut:|er,timm:e|ar,dag:|ar,veck:a|or|an,m\u00e5nad:|er|en+manad:|er|en,\u00e5r:||et+ar:||et",numbers:"en|ett,tv\u00e5|tva,tre,fyra,fem,sex,sju,\u00e5tta|atta,nio,tio",tokens:"den,f\u00f6r|for",articles:"den","short":"den {d} {month} {yyyy}",
193
195
  "long":"den {d} {month} {yyyy} {H}:{mm}",full:"{Weekday} den {d} {month} {yyyy} {H}:{mm}:{ss}",past:"{num} {unit} {sign}",future:"{sign} {num} {unit}",duration:"{num} {unit}",ampm:"am,pm",modifiers:[{name:"day",src:"f\u00f6rrg\u00e5r|i f\u00f6rrg\u00e5r|if\u00f6rrg\u00e5r|forrgar|i forrgar|iforrgar",value:-2},{name:"day",src:"g\u00e5r|i g\u00e5r|ig\u00e5r|gar|i gar|igar",value:-1},{name:"day",src:"dag|i dag|idag",value:0},{name:"day",src:"morgon|i morgon|imorgon",value:1},{name:"day",src:"\u00f6ver morgon|\u00f6vermorgon|i \u00f6ver morgon|i \u00f6vermorgon|i\u00f6vermorgon|over morgon|overmorgon|i over morgon|i overmorgon|iovermorgon",
194
196
  value:2},{name:"sign",src:"sedan|sen",value:-1},{name:"sign",src:"om",value:1},{name:"shift",src:"i f\u00f6rra|f\u00f6rra|i forra|forra",value:-1},{name:"shift",src:"denna",value:0},{name:"shift",src:"n\u00e4sta|nasta",value:1}],dateParse:["{num} {unit} {sign}","{sign} {num} {unit}","{1?} {num} {unit} {sign}","{shift} {unit=5-7}"],timeParse:["{0?} {weekday?} {date?} {month} {year}","{date} {month}","{shift} {weekday}"]});
195
- Date.addLocale("zh-CN",{variant:!0,monthSuffix:"\u6708",weekdays:"\u661f\u671f\u65e5|\u5468\u65e5,\u661f\u671f\u4e00|\u5468\u4e00,\u661f\u671f\u4e8c|\u5468\u4e8c,\u661f\u671f\u4e09|\u5468\u4e09,\u661f\u671f\u56db|\u5468\u56db,\u661f\u671f\u4e94|\u5468\u4e94,\u661f\u671f\u516d|\u5468\u516d",units:"\u6beb\u79d2,\u79d2\u949f,\u5206\u949f,\u5c0f\u65f6,\u5929,\u4e2a\u661f\u671f|\u5468,\u4e2a\u6708,\u5e74",tokens:"\u65e5|\u53f7","short":"{yyyy}\u5e74{M}\u6708{d}\u65e5","long":"{yyyy}\u5e74{M}\u6708{d}\u65e5 {tt}{h}:{mm}",
196
- full:"{yyyy}\u5e74{M}\u6708{d}\u65e5 {weekday} {tt}{h}:{mm}:{ss}",past:"{num}{unit}{sign}",future:"{num}{unit}{sign}",duration:"{num}{unit}",timeSuffixes:"\u70b9|\u65f6,\u5206\u949f?,\u79d2",ampm:"\u4e0a\u5348,\u4e0b\u5348",modifiers:[{name:"day",src:"\u524d\u5929",value:-2},{name:"day",src:"\u6628\u5929",value:-1},{name:"day",src:"\u4eca\u5929",value:0},{name:"day",src:"\u660e\u5929",value:1},{name:"day",src:"\u540e\u5929",value:2},{name:"sign",src:"\u524d",value:-1},{name:"sign",src:"\u540e",value:1},
197
- {name:"shift",src:"\u4e0a|\u53bb",value:-1},{name:"shift",src:"\u8fd9",value:0},{name:"shift",src:"\u4e0b|\u660e",value:1}],dateParse:["{num}{unit}{sign}","{shift}{unit=5-7}"],timeParse:["{shift}{weekday}","{year}\u5e74{month?}\u6708?{date?}{0?}","{month}\u6708{date?}{0?}","{date}[\u65e5\u53f7]"]});
198
- Date.addLocale("zh-TW",{monthSuffix:"\u6708",weekdays:"\u661f\u671f\u65e5|\u9031\u65e5,\u661f\u671f\u4e00|\u9031\u4e00,\u661f\u671f\u4e8c|\u9031\u4e8c,\u661f\u671f\u4e09|\u9031\u4e09,\u661f\u671f\u56db|\u9031\u56db,\u661f\u671f\u4e94|\u9031\u4e94,\u661f\u671f\u516d|\u9031\u516d",units:"\u6beb\u79d2,\u79d2\u9418,\u5206\u9418,\u5c0f\u6642,\u5929,\u500b\u661f\u671f|\u9031,\u500b\u6708,\u5e74",tokens:"\u65e5|\u865f","short":"{yyyy}\u5e74{M}\u6708{d}\u65e5","long":"{yyyy}\u5e74{M}\u6708{d}\u65e5 {tt}{h}:{mm}",
199
- full:"{yyyy}\u5e74{M}\u6708{d}\u65e5 {Weekday} {tt}{h}:{mm}:{ss}",past:"{num}{unit}{sign}",future:"{num}{unit}{sign}",duration:"{num}{unit}",timeSuffixes:"\u9ede|\u6642,\u5206\u9418?,\u79d2",ampm:"\u4e0a\u5348,\u4e0b\u5348",modifiers:[{name:"day",src:"\u524d\u5929",value:-2},{name:"day",src:"\u6628\u5929",value:-1},{name:"day",src:"\u4eca\u5929",value:0},{name:"day",src:"\u660e\u5929",value:1},{name:"day",src:"\u5f8c\u5929",value:2},{name:"sign",src:"\u524d",value:-1},{name:"sign",src:"\u5f8c",value:1},
200
- {name:"shift",src:"\u4e0a|\u53bb",value:-1},{name:"shift",src:"\u9019",value:0},{name:"shift",src:"\u4e0b|\u660e",value:1}],dateParse:["{num}{unit}{sign}","{shift}{unit=5-7}"],timeParse:["{shift}{weekday}","{year}\u5e74{month?}\u6708?{date?}{0?}","{month}\u6708{date?}{0?}","{date}[\u65e5\u865f]"]});})();
197
+ Date.addLocale("zh-CN",{variant:!0,monthSuffix:"\u6708",weekdays:"\u661f\u671f\u65e5|\u5468\u65e5|\u661f\u671f\u5929,\u661f\u671f\u4e00|\u5468\u4e00,\u661f\u671f\u4e8c|\u5468\u4e8c,\u661f\u671f\u4e09|\u5468\u4e09,\u661f\u671f\u56db|\u5468\u56db,\u661f\u671f\u4e94|\u5468\u4e94,\u661f\u671f\u516d|\u5468\u516d",units:"\u6beb\u79d2,\u79d2\u949f,\u5206\u949f,\u5c0f\u65f6,\u5929,\u4e2a\u661f\u671f|\u5468,\u4e2a\u6708,\u5e74",tokens:"\u65e5|\u53f7","short":"{yyyy}\u5e74{M}\u6708{d}\u65e5","long":"{yyyy}\u5e74{M}\u6708{d}\u65e5 {tt}{h}:{mm}",
198
+ full:"{yyyy}\u5e74{M}\u6708{d}\u65e5 {weekday} {tt}{h}:{mm}:{ss}",past:"{num}{unit}{sign}",future:"{num}{unit}{sign}",duration:"{num}{unit}",timeSuffixes:"\u70b9|\u65f6,\u5206\u949f?,\u79d2",ampm:"\u4e0a\u5348,\u4e0b\u5348",modifiers:[{name:"day",src:"\u5927\u524d\u5929",value:-3},{name:"day",src:"\u524d\u5929",value:-2},{name:"day",src:"\u6628\u5929",value:-1},{name:"day",src:"\u4eca\u5929",value:0},{name:"day",src:"\u660e\u5929",value:1},{name:"day",src:"\u540e\u5929",value:2},{name:"day",src:"\u5927\u540e\u5929",
199
+ value:3},{name:"sign",src:"\u524d",value:-1},{name:"sign",src:"\u540e",value:1},{name:"shift",src:"\u4e0a|\u53bb",value:-1},{name:"shift",src:"\u8fd9",value:0},{name:"shift",src:"\u4e0b|\u660e",value:1}],dateParse:["{num}{unit}{sign}","{shift}{unit=5-7}"],timeParse:["{shift}{weekday}","{year}\u5e74{month?}\u6708?{date?}{0?}","{month}\u6708{date?}{0?}","{date}[\u65e5\u53f7]"]});
200
+ Date.addLocale("zh-TW",{monthSuffix:"\u6708",weekdays:"\u661f\u671f\u65e5|\u9031\u65e5|\u661f\u671f\u5929,\u661f\u671f\u4e00|\u9031\u4e00,\u661f\u671f\u4e8c|\u9031\u4e8c,\u661f\u671f\u4e09|\u9031\u4e09,\u661f\u671f\u56db|\u9031\u56db,\u661f\u671f\u4e94|\u9031\u4e94,\u661f\u671f\u516d|\u9031\u516d",units:"\u6beb\u79d2,\u79d2\u9418,\u5206\u9418,\u5c0f\u6642,\u5929,\u500b\u661f\u671f|\u9031,\u500b\u6708,\u5e74",tokens:"\u65e5|\u865f","short":"{yyyy}\u5e74{M}\u6708{d}\u65e5","long":"{yyyy}\u5e74{M}\u6708{d}\u65e5 {tt}{h}:{mm}",
201
+ full:"{yyyy}\u5e74{M}\u6708{d}\u65e5 {Weekday} {tt}{h}:{mm}:{ss}",past:"{num}{unit}{sign}",future:"{num}{unit}{sign}",duration:"{num}{unit}",timeSuffixes:"\u9ede|\u6642,\u5206\u9418?,\u79d2",ampm:"\u4e0a\u5348,\u4e0b\u5348",modifiers:[{name:"day",src:"\u5927\u524d\u5929",value:-3},{name:"day",src:"\u524d\u5929",value:-2},{name:"day",src:"\u6628\u5929",value:-1},{name:"day",src:"\u4eca\u5929",value:0},{name:"day",src:"\u660e\u5929",value:1},{name:"day",src:"\u5f8c\u5929",value:2},{name:"day",src:"\u5927\u5f8c\u5929",
202
+ value:3},{name:"sign",src:"\u524d",value:-1},{name:"sign",src:"\u5f8c",value:1},{name:"shift",src:"\u4e0a|\u53bb",value:-1},{name:"shift",src:"\u9019",value:0},{name:"shift",src:"\u4e0b|\u660e",value:1}],dateParse:["{num}{unit}{sign}","{shift}{unit=5-7}"],timeParse:["{shift}{weekday}","{year}\u5e74{month?}\u6708?{date?}{0?}","{month}\u6708{date?}{0?}","{date}[\u65e5\u865f]"]});})();