MailPoet Newsletters (New) - Version 3.0.0-beta.25

Version Description

  • 2017-04-04 =
  • Improved: subscriber listings with large number of subscribers (tens of thousands) now load much faster on MySQL 5.5 and lower. Thanks Moulouk!;
  • Fixed: updating sending frequency no longer breaks limit enforcement. Thx Vincent!;
  • Fixed: sending works again on hosts running (very old) PHP version 5.3. WordPress recommends PHP 7 or newer. Ask your host how to upgrade. Thanks Emmanuel.
Download this release

Release Info

Developer wysija
Plugin Icon 128x128 MailPoet Newsletters (New)
Version 3.0.0-beta.25
Comparing to
See all releases

Code changes from version 3.0.0-beta.24 to 3.0.0-beta.25

assets/css/admin.css CHANGED
@@ -1773,8 +1773,11 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
1773
  cursor: default;
1774
  z-index: 4;
1775
  }
1776
- .CodeMirror-gutter-wrapper ::selection { background-color: transparent }
1777
- .CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
 
 
 
1778
 
1779
  .CodeMirror-lines {
1780
  cursor: text;
@@ -1819,8 +1822,6 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
1819
 
1820
  .CodeMirror-widget {}
1821
 
1822
- .CodeMirror-rtl pre { direction: rtl; }
1823
-
1824
  .CodeMirror-code {
1825
  outline: none;
1826
  }
1773
  cursor: default;
1774
  z-index: 4;
1775
  }
1776
+ .CodeMirror-gutter-wrapper {
1777
+ -webkit-user-select: none;
1778
+ -moz-user-select: none;
1779
+ user-select: none;
1780
+ }
1781
 
1782
  .CodeMirror-lines {
1783
  cursor: text;
1822
 
1823
  .CodeMirror-widget {}
1824
 
 
 
1825
  .CodeMirror-code {
1826
  outline: none;
1827
  }
assets/js/admin.js CHANGED
@@ -3,13 +3,13 @@ webpackJsonp([0],[
3
  /***/ function(module, exports, __webpack_require__) {
4
 
5
  __webpack_require__(1);
6
- __webpack_require__(414);
7
- __webpack_require__(436);
8
- __webpack_require__(439);
 
 
9
  __webpack_require__(441);
10
- __webpack_require__(444);
11
- __webpack_require__(448);
12
- module.exports = __webpack_require__(449);
13
 
14
 
15
  /***/ },
@@ -12332,7 +12332,7 @@ webpackJsonp([0],[
12332
 
12333
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
12334
 
12335
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(2), __webpack_require__(181), __webpack_require__(268), __webpack_require__(282), __webpack_require__(408)], __WEBPACK_AMD_DEFINE_RESULT__ = function (React, Router, MailPoet, Form, ReactStringReplace) {
12336
  var fields = [{
12337
  name: 'email',
12338
  label: MailPoet.I18n.t('email'),
@@ -13474,7 +13474,7 @@ webpackJsonp([0],[
13474
  /***/ function(module, exports, __webpack_require__) {
13475
 
13476
  /* WEBPACK VAR INJECTION */(function(module) {//! moment.js
13477
- //! version : 2.18.1
13478
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
13479
  //! license : MIT
13480
  //! momentjs.com
@@ -13516,10 +13516,6 @@ webpackJsonp([0],[
13516
  return true;
13517
  }
13518
 
13519
- function isUndefined(input) {
13520
- return input === void 0;
13521
- }
13522
-
13523
  function isNumber(input) {
13524
  return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';
13525
  }
@@ -13576,9 +13572,7 @@ webpackJsonp([0],[
13576
  userInvalidated : false,
13577
  iso : false,
13578
  parsedDateParts : [],
13579
- meridiem : null,
13580
- rfc2822 : false,
13581
- weekdayMismatch : false
13582
  };
13583
  }
13584
 
@@ -13654,6 +13648,10 @@ webpackJsonp([0],[
13654
  return m;
13655
  }
13656
 
 
 
 
 
13657
  // Plugins that add properties should also add the key here (null value),
13658
  // so we can properly clone ourselves.
13659
  var momentProperties = hooks.momentProperties = [];
@@ -13693,7 +13691,7 @@ webpackJsonp([0],[
13693
  }
13694
 
13695
  if (momentProperties.length > 0) {
13696
- for (i = 0; i < momentProperties.length; i++) {
13697
  prop = momentProperties[i];
13698
  val = from[prop];
13699
  if (!isUndefined(val)) {
@@ -13830,11 +13828,8 @@ webpackJsonp([0],[
13830
  }
13831
  this._config = config;
13832
  // Lenient ordinal parsing accepts just a number in addition to
13833
- // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
13834
- // TODO: Remove "ordinalParse" fallback in next major release.
13835
- this._dayOfMonthOrdinalParseLenient = new RegExp(
13836
- (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
13837
- '|' + (/\d{1,2}/).source);
13838
  }
13839
 
13840
  function mergeConfigs(parentConfig, childConfig) {
@@ -13932,7 +13927,7 @@ webpackJsonp([0],[
13932
  }
13933
 
13934
  var defaultOrdinal = '%d';
13935
- var defaultDayOfMonthOrdinalParse = /\d{1,2}/;
13936
 
13937
  function ordinal (number) {
13938
  return this._ordinal.replace('%d', number);
@@ -13942,7 +13937,6 @@ webpackJsonp([0],[
13942
  future : 'in %s',
13943
  past : '%s ago',
13944
  s : 'a few seconds',
13945
- ss : '%d seconds',
13946
  m : 'a minute',
13947
  mm : '%d minutes',
13948
  h : 'an hour',
@@ -14125,7 +14119,7 @@ webpackJsonp([0],[
14125
  return function (mom) {
14126
  var output = '', i;
14127
  for (i = 0; i < length; i++) {
14128
- output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];
14129
  }
14130
  return output;
14131
  };
@@ -14328,8 +14322,7 @@ webpackJsonp([0],[
14328
  var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
14329
  function localeMonths (m, format) {
14330
  if (!m) {
14331
- return isArray(this._months) ? this._months :
14332
- this._months['standalone'];
14333
  }
14334
  return isArray(this._months) ? this._months[m.month()] :
14335
  this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];
@@ -14338,8 +14331,7 @@ webpackJsonp([0],[
14338
  var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
14339
  function localeMonthsShort (m, format) {
14340
  if (!m) {
14341
- return isArray(this._monthsShort) ? this._monthsShort :
14342
- this._monthsShort['standalone'];
14343
  }
14344
  return isArray(this._monthsShort) ? this._monthsShort[m.month()] :
14345
  this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
@@ -14606,11 +14598,11 @@ webpackJsonp([0],[
14606
  }
14607
 
14608
  function createDate (y, m, d, h, M, s, ms) {
14609
- // can't just apply() to create a date:
14610
- // https://stackoverflow.com/q/181348
14611
  var date = new Date(y, m, d, h, M, s, ms);
14612
 
14613
- // the date constructor remaps years 0-99 to 1900-1999
14614
  if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
14615
  date.setFullYear(y);
14616
  }
@@ -14620,7 +14612,7 @@ webpackJsonp([0],[
14620
  function createUTCDate (y) {
14621
  var date = new Date(Date.UTC.apply(null, arguments));
14622
 
14623
- // the Date.UTC function remaps years 0-99 to 1900-1999
14624
  if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
14625
  date.setUTCFullYear(y);
14626
  }
@@ -14637,7 +14629,7 @@ webpackJsonp([0],[
14637
  return -fwdlw + fwd - 1;
14638
  }
14639
 
14640
- // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
14641
  function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
14642
  var localWeekday = (7 + weekday - dow) % 7,
14643
  weekOffset = firstWeekOffset(year, dow, doy),
@@ -14838,8 +14830,7 @@ webpackJsonp([0],[
14838
  var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
14839
  function localeWeekdays (m, format) {
14840
  if (!m) {
14841
- return isArray(this._weekdays) ? this._weekdays :
14842
- this._weekdays['standalone'];
14843
  }
14844
  return isArray(this._weekdays) ? this._weekdays[m.day()] :
14845
  this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];
@@ -15159,10 +15150,8 @@ webpackJsonp([0],[
15159
  addRegexToken('A', matchMeridiem);
15160
  addRegexToken('H', match1to2);
15161
  addRegexToken('h', match1to2);
15162
- addRegexToken('k', match1to2);
15163
  addRegexToken('HH', match1to2, match2);
15164
  addRegexToken('hh', match1to2, match2);
15165
- addRegexToken('kk', match1to2, match2);
15166
 
15167
  addRegexToken('hmm', match3to4);
15168
  addRegexToken('hmmss', match5to6);
@@ -15170,10 +15159,6 @@ webpackJsonp([0],[
15170
  addRegexToken('Hmmss', match5to6);
15171
 
15172
  addParseToken(['H', 'HH'], HOUR);
15173
- addParseToken(['k', 'kk'], function (input, array, config) {
15174
- var kInput = toInt(input);
15175
- array[HOUR] = kInput === 24 ? 0 : kInput;
15176
- });
15177
  addParseToken(['a', 'A'], function (input, array, config) {
15178
  config._isPm = config._locale.isPM(input);
15179
  config._meridiem = input;
@@ -15244,7 +15229,7 @@ webpackJsonp([0],[
15244
  longDateFormat: defaultLongDateFormat,
15245
  invalidDate: defaultInvalidDate,
15246
  ordinal: defaultOrdinal,
15247
- dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
15248
  relativeTime: defaultRelativeTime,
15249
 
15250
  months: defaultLocaleMonths,
@@ -15555,77 +15540,6 @@ webpackJsonp([0],[
15555
  }
15556
  }
15557
 
15558
- // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
15559
- var basicRfcRegex = /^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d?\d\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(?:\d\d)?\d\d\s)(\d\d:\d\d)(\:\d\d)?(\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\d{4}))$/;
15560
-
15561
- // date and time from ref 2822 format
15562
- function configFromRFC2822(config) {
15563
- var string, match, dayFormat,
15564
- dateFormat, timeFormat, tzFormat;
15565
- var timezones = {
15566
- ' GMT': ' +0000',
15567
- ' EDT': ' -0400',
15568
- ' EST': ' -0500',
15569
- ' CDT': ' -0500',
15570
- ' CST': ' -0600',
15571
- ' MDT': ' -0600',
15572
- ' MST': ' -0700',
15573
- ' PDT': ' -0700',
15574
- ' PST': ' -0800'
15575
- };
15576
- var military = 'YXWVUTSRQPONZABCDEFGHIKLM';
15577
- var timezone, timezoneIndex;
15578
-
15579
- string = config._i
15580
- .replace(/\([^\)]*\)|[\n\t]/g, ' ') // Remove comments and folding whitespace
15581
- .replace(/(\s\s+)/g, ' ') // Replace multiple-spaces with a single space
15582
- .replace(/^\s|\s$/g, ''); // Remove leading and trailing spaces
15583
- match = basicRfcRegex.exec(string);
15584
-
15585
- if (match) {
15586
- dayFormat = match[1] ? 'ddd' + ((match[1].length === 5) ? ', ' : ' ') : '';
15587
- dateFormat = 'D MMM ' + ((match[2].length > 10) ? 'YYYY ' : 'YY ');
15588
- timeFormat = 'HH:mm' + (match[4] ? ':ss' : '');
15589
-
15590
- // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.
15591
- if (match[1]) { // day of week given
15592
- var momentDate = new Date(match[2]);
15593
- var momentDay = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'][momentDate.getDay()];
15594
-
15595
- if (match[1].substr(0,3) !== momentDay) {
15596
- getParsingFlags(config).weekdayMismatch = true;
15597
- config._isValid = false;
15598
- return;
15599
- }
15600
- }
15601
-
15602
- switch (match[5].length) {
15603
- case 2: // military
15604
- if (timezoneIndex === 0) {
15605
- timezone = ' +0000';
15606
- } else {
15607
- timezoneIndex = military.indexOf(match[5][1].toUpperCase()) - 12;
15608
- timezone = ((timezoneIndex < 0) ? ' -' : ' +') +
15609
- (('' + timezoneIndex).replace(/^-?/, '0')).match(/..$/)[0] + '00';
15610
- }
15611
- break;
15612
- case 4: // Zone
15613
- timezone = timezones[match[5]];
15614
- break;
15615
- default: // UT or +/-9999
15616
- timezone = timezones[' GMT'];
15617
- }
15618
- match[5] = timezone;
15619
- config._i = match.splice(1).join('');
15620
- tzFormat = ' ZZ';
15621
- config._f = dayFormat + dateFormat + timeFormat + tzFormat;
15622
- configFromStringAndFormat(config);
15623
- getParsingFlags(config).rfc2822 = true;
15624
- } else {
15625
- config._isValid = false;
15626
- }
15627
- }
15628
-
15629
  // date from iso format or fallback
15630
  function configFromString(config) {
15631
  var matched = aspNetJsonRegex.exec(config._i);
@@ -15638,24 +15552,13 @@ webpackJsonp([0],[
15638
  configFromISO(config);
15639
  if (config._isValid === false) {
15640
  delete config._isValid;
15641
- } else {
15642
- return;
15643
- }
15644
-
15645
- configFromRFC2822(config);
15646
- if (config._isValid === false) {
15647
- delete config._isValid;
15648
- } else {
15649
- return;
15650
  }
15651
-
15652
- // Final attempt, use Input Fallback
15653
- hooks.createFromInputFallback(config);
15654
  }
15655
 
15656
  hooks.createFromInputFallback = deprecate(
15657
- 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
15658
- 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
15659
  'discouraged and will be removed in an upcoming major release. Please refer to ' +
15660
  'http://momentjs.com/guides/#/warnings/js-date/ for more info.',
15661
  function (config) {
@@ -15702,10 +15605,10 @@ webpackJsonp([0],[
15702
  }
15703
 
15704
  //if the day of the year is set, figure out what it is
15705
- if (config._dayOfYear != null) {
15706
  yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
15707
 
15708
- if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {
15709
  getParsingFlags(config)._overflowDayOfYear = true;
15710
  }
15711
 
@@ -15809,9 +15712,6 @@ webpackJsonp([0],[
15809
  // constant that refers to the ISO standard
15810
  hooks.ISO_8601 = function () {};
15811
 
15812
- // constant that refers to the RFC 2822 form
15813
- hooks.RFC_2822 = function () {};
15814
-
15815
  // date from string and format string
15816
  function configFromStringAndFormat(config) {
15817
  // TODO: Move this to another part of the creation flow to prevent circular deps
@@ -15819,10 +15719,7 @@ webpackJsonp([0],[
15819
  configFromISO(config);
15820
  return;
15821
  }
15822
- if (config._f === hooks.RFC_2822) {
15823
- configFromRFC2822(config);
15824
- return;
15825
- }
15826
  config._a = [];
15827
  getParsingFlags(config).empty = true;
15828
 
@@ -16014,7 +15911,7 @@ webpackJsonp([0],[
16014
 
16015
  function configFromInput(config) {
16016
  var input = config._i;
16017
- if (isUndefined(input)) {
16018
  config._d = new Date(hooks.now());
16019
  } else if (isDate(input)) {
16020
  config._d = new Date(input.valueOf());
@@ -16025,7 +15922,7 @@ webpackJsonp([0],[
16025
  return parseInt(obj, 10);
16026
  });
16027
  configFromArray(config);
16028
- } else if (isObject(input)) {
16029
  configFromObject(config);
16030
  } else if (isNumber(input)) {
16031
  // from milliseconds
@@ -16126,38 +16023,6 @@ webpackJsonp([0],[
16126
  return Date.now ? Date.now() : +(new Date());
16127
  };
16128
 
16129
- var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];
16130
-
16131
- function isDurationValid(m) {
16132
- for (var key in m) {
16133
- if (!(ordering.indexOf(key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
16134
- return false;
16135
- }
16136
- }
16137
-
16138
- var unitHasDecimal = false;
16139
- for (var i = 0; i < ordering.length; ++i) {
16140
- if (m[ordering[i]]) {
16141
- if (unitHasDecimal) {
16142
- return false; // only allow non-integers for smallest unit
16143
- }
16144
- if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
16145
- unitHasDecimal = true;
16146
- }
16147
- }
16148
- }
16149
-
16150
- return true;
16151
- }
16152
-
16153
- function isValid$1() {
16154
- return this._isValid;
16155
- }
16156
-
16157
- function createInvalid$1() {
16158
- return createDuration(NaN);
16159
- }
16160
-
16161
  function Duration (duration) {
16162
  var normalizedInput = normalizeObjectUnits(duration),
16163
  years = normalizedInput.year || 0,
@@ -16170,8 +16035,6 @@ webpackJsonp([0],[
16170
  seconds = normalizedInput.second || 0,
16171
  milliseconds = normalizedInput.millisecond || 0;
16172
 
16173
- this._isValid = isDurationValid(normalizedInput);
16174
-
16175
  // representation for dateAddRemove
16176
  this._milliseconds = +milliseconds +
16177
  seconds * 1e3 + // 1000
@@ -16295,7 +16158,7 @@ webpackJsonp([0],[
16295
  // a second time. In case it wants us to change the offset again
16296
  // _changeInProgress == true case, then we have to adjust, because
16297
  // there is no such time in the given timezone.
16298
- function getSetOffset (input, keepLocalTime, keepMinutes) {
16299
  var offset = this._offset || 0,
16300
  localAdjust;
16301
  if (!this.isValid()) {
@@ -16307,7 +16170,7 @@ webpackJsonp([0],[
16307
  if (input === null) {
16308
  return this;
16309
  }
16310
- } else if (Math.abs(input) < 16 && !keepMinutes) {
16311
  input = input * 60;
16312
  }
16313
  if (!this._isUTC && keepLocalTime) {
@@ -16365,7 +16228,7 @@ webpackJsonp([0],[
16365
 
16366
  function setOffsetToParsedOffset () {
16367
  if (this._tzm != null) {
16368
- this.utcOffset(this._tzm, false, true);
16369
  } else if (typeof this._i === 'string') {
16370
  var tZone = offsetFromString(matchOffset, this._i);
16371
  if (tZone != null) {
@@ -16497,7 +16360,6 @@ webpackJsonp([0],[
16497
  }
16498
 
16499
  createDuration.fn = Duration.prototype;
16500
- createDuration.invalid = createInvalid$1;
16501
 
16502
  function parseIso (inp, sign) {
16503
  // We'd normally use ~~inp for this, but unfortunately it also
@@ -16734,19 +16596,18 @@ webpackJsonp([0],[
16734
  return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
16735
  }
16736
 
16737
- function toISOString() {
16738
- if (!this.isValid()) {
16739
- return null;
16740
- }
16741
  var m = this.clone().utc();
16742
- if (m.year() < 0 || m.year() > 9999) {
 
 
 
 
 
 
 
16743
  return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
16744
  }
16745
- if (isFunction(Date.prototype.toISOString)) {
16746
- // native implementation is ~50x faster, use it when we can
16747
- return this.toDate().toISOString();
16748
- }
16749
- return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
16750
  }
16751
 
16752
  /**
@@ -16766,7 +16627,7 @@ webpackJsonp([0],[
16766
  zone = 'Z';
16767
  }
16768
  var prefix = '[' + func + '("]';
16769
- var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';
16770
  var datetime = '-MM-DD[T]HH:mm:ss.SSS';
16771
  var suffix = zone + '[")]';
16772
 
@@ -16934,7 +16795,7 @@ webpackJsonp([0],[
16934
  return this.isValid() ? this.toISOString() : null;
16935
  }
16936
 
16937
- function isValid$2 () {
16938
  return isValid(this);
16939
  }
16940
 
@@ -17094,10 +16955,7 @@ webpackJsonp([0],[
17094
  addRegexToken('D', match1to2);
17095
  addRegexToken('DD', match1to2, match2);
17096
  addRegexToken('Do', function (isStrict, locale) {
17097
- // TODO: Remove "ordinalParse" fallback in next major release.
17098
- return isStrict ?
17099
- (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :
17100
- locale._dayOfMonthOrdinalParseLenient;
17101
  });
17102
 
17103
  addParseToken(['D', 'DD'], DATE);
@@ -17277,7 +17135,7 @@ webpackJsonp([0],[
17277
  proto.isSame = isSame;
17278
  proto.isSameOrAfter = isSameOrAfter;
17279
  proto.isSameOrBefore = isSameOrBefore;
17280
- proto.isValid = isValid$2;
17281
  proto.lang = lang;
17282
  proto.locale = locale;
17283
  proto.localeData = localeData;
@@ -17502,7 +17360,7 @@ webpackJsonp([0],[
17502
  }
17503
 
17504
  getSetGlobalLocale('en', {
17505
- dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
17506
  ordinal : function (number) {
17507
  var b = number % 10,
17508
  output = (toInt(number % 100 / 10) === 1) ? 'th' :
@@ -17623,9 +17481,6 @@ webpackJsonp([0],[
17623
  }
17624
 
17625
  function as (units) {
17626
- if (!this.isValid()) {
17627
- return NaN;
17628
- }
17629
  var days;
17630
  var months;
17631
  var milliseconds = this._milliseconds;
@@ -17654,9 +17509,6 @@ webpackJsonp([0],[
17654
 
17655
  // TODO: Use this.as('ms')?
17656
  function valueOf$1 () {
17657
- if (!this.isValid()) {
17658
- return NaN;
17659
- }
17660
  return (
17661
  this._milliseconds +
17662
  this._days * 864e5 +
@@ -17682,12 +17534,12 @@ webpackJsonp([0],[
17682
 
17683
  function get$2 (units) {
17684
  units = normalizeUnits(units);
17685
- return this.isValid() ? this[units + 's']() : NaN;
17686
  }
17687
 
17688
  function makeGetter(name) {
17689
  return function () {
17690
- return this.isValid() ? this._data[name] : NaN;
17691
  };
17692
  }
17693
 
@@ -17705,12 +17557,11 @@ webpackJsonp([0],[
17705
 
17706
  var round = Math.round;
17707
  var thresholds = {
17708
- ss: 44, // a few seconds to seconds
17709
- s : 45, // seconds to minute
17710
- m : 45, // minutes to hour
17711
- h : 22, // hours to day
17712
- d : 26, // days to month
17713
- M : 11 // months to year
17714
  };
17715
 
17716
  // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
@@ -17727,17 +17578,16 @@ webpackJsonp([0],[
17727
  var months = round(duration.as('M'));
17728
  var years = round(duration.as('y'));
17729
 
17730
- var a = seconds <= thresholds.ss && ['s', seconds] ||
17731
- seconds < thresholds.s && ['ss', seconds] ||
17732
- minutes <= 1 && ['m'] ||
17733
- minutes < thresholds.m && ['mm', minutes] ||
17734
- hours <= 1 && ['h'] ||
17735
- hours < thresholds.h && ['hh', hours] ||
17736
- days <= 1 && ['d'] ||
17737
- days < thresholds.d && ['dd', days] ||
17738
- months <= 1 && ['M'] ||
17739
- months < thresholds.M && ['MM', months] ||
17740
- years <= 1 && ['y'] || ['yy', years];
17741
 
17742
  a[2] = withoutSuffix;
17743
  a[3] = +posNegDuration > 0;
@@ -17766,17 +17616,10 @@ webpackJsonp([0],[
17766
  return thresholds[threshold];
17767
  }
17768
  thresholds[threshold] = limit;
17769
- if (threshold === 's') {
17770
- thresholds.ss = limit - 1;
17771
- }
17772
  return true;
17773
  }
17774
 
17775
  function humanize (withSuffix) {
17776
- if (!this.isValid()) {
17777
- return this.localeData().invalidDate();
17778
- }
17779
-
17780
  var locale = this.localeData();
17781
  var output = relativeTime$1(this, !withSuffix, locale);
17782
 
@@ -17797,10 +17640,6 @@ webpackJsonp([0],[
17797
  // This is because there is no context-free conversion between hours and days
17798
  // (think of clock changes)
17799
  // and also not between days and months (28-31 days per month)
17800
- if (!this.isValid()) {
17801
- return this.localeData().invalidDate();
17802
- }
17803
-
17804
  var seconds = abs$1(this._milliseconds) / 1000;
17805
  var days = abs$1(this._days);
17806
  var months = abs$1(this._months);
@@ -17845,7 +17684,6 @@ webpackJsonp([0],[
17845
 
17846
  var proto$2 = Duration.prototype;
17847
 
17848
- proto$2.isValid = isValid$1;
17849
  proto$2.abs = abs;
17850
  proto$2.add = add$1;
17851
  proto$2.subtract = subtract$1;
@@ -17901,7 +17739,7 @@ webpackJsonp([0],[
17901
  // Side effect imports
17902
 
17903
 
17904
- hooks.version = '2.18.1';
17905
 
17906
  setHookCallback(createLocal);
17907
 
@@ -17950,231 +17788,217 @@ webpackJsonp([0],[
17950
  "./ar": 294,
17951
  "./ar-dz": 295,
17952
  "./ar-dz.js": 295,
17953
- "./ar-kw": 296,
17954
- "./ar-kw.js": 296,
17955
- "./ar-ly": 297,
17956
- "./ar-ly.js": 297,
17957
- "./ar-ma": 298,
17958
- "./ar-ma.js": 298,
17959
- "./ar-sa": 299,
17960
- "./ar-sa.js": 299,
17961
- "./ar-tn": 300,
17962
- "./ar-tn.js": 300,
17963
  "./ar.js": 294,
17964
- "./az": 301,
17965
- "./az.js": 301,
17966
- "./be": 302,
17967
- "./be.js": 302,
17968
- "./bg": 303,
17969
- "./bg.js": 303,
17970
- "./bn": 304,
17971
- "./bn.js": 304,
17972
- "./bo": 305,
17973
- "./bo.js": 305,
17974
- "./br": 306,
17975
- "./br.js": 306,
17976
- "./bs": 307,
17977
- "./bs.js": 307,
17978
- "./ca": 308,
17979
- "./ca.js": 308,
17980
- "./cs": 309,
17981
- "./cs.js": 309,
17982
- "./cv": 310,
17983
- "./cv.js": 310,
17984
- "./cy": 311,
17985
- "./cy.js": 311,
17986
- "./da": 312,
17987
- "./da.js": 312,
17988
- "./de": 313,
17989
- "./de-at": 314,
17990
- "./de-at.js": 314,
17991
- "./de-ch": 315,
17992
- "./de-ch.js": 315,
17993
- "./de.js": 313,
17994
- "./dv": 316,
17995
- "./dv.js": 316,
17996
- "./el": 317,
17997
- "./el.js": 317,
17998
- "./en-au": 318,
17999
- "./en-au.js": 318,
18000
- "./en-ca": 319,
18001
- "./en-ca.js": 319,
18002
- "./en-gb": 320,
18003
- "./en-gb.js": 320,
18004
- "./en-ie": 321,
18005
- "./en-ie.js": 321,
18006
- "./en-nz": 322,
18007
- "./en-nz.js": 322,
18008
- "./eo": 323,
18009
- "./eo.js": 323,
18010
- "./es": 324,
18011
- "./es-do": 325,
18012
- "./es-do.js": 325,
18013
- "./es.js": 324,
18014
- "./et": 326,
18015
- "./et.js": 326,
18016
- "./eu": 327,
18017
- "./eu.js": 327,
18018
- "./fa": 328,
18019
- "./fa.js": 328,
18020
- "./fi": 329,
18021
- "./fi.js": 329,
18022
- "./fo": 330,
18023
- "./fo.js": 330,
18024
- "./fr": 331,
18025
- "./fr-ca": 332,
18026
- "./fr-ca.js": 332,
18027
- "./fr-ch": 333,
18028
- "./fr-ch.js": 333,
18029
- "./fr.js": 331,
18030
- "./fy": 334,
18031
- "./fy.js": 334,
18032
- "./gd": 335,
18033
- "./gd.js": 335,
18034
- "./gl": 336,
18035
- "./gl.js": 336,
18036
- "./gom-latn": 337,
18037
- "./gom-latn.js": 337,
18038
- "./he": 338,
18039
- "./he.js": 338,
18040
- "./hi": 339,
18041
- "./hi.js": 339,
18042
- "./hr": 340,
18043
- "./hr.js": 340,
18044
- "./hu": 341,
18045
- "./hu.js": 341,
18046
- "./hy-am": 342,
18047
- "./hy-am.js": 342,
18048
- "./id": 343,
18049
- "./id.js": 343,
18050
- "./is": 344,
18051
- "./is.js": 344,
18052
- "./it": 345,
18053
- "./it.js": 345,
18054
- "./ja": 346,
18055
- "./ja.js": 346,
18056
- "./jv": 347,
18057
- "./jv.js": 347,
18058
- "./ka": 348,
18059
- "./ka.js": 348,
18060
- "./kk": 349,
18061
- "./kk.js": 349,
18062
- "./km": 350,
18063
- "./km.js": 350,
18064
- "./kn": 351,
18065
- "./kn.js": 351,
18066
- "./ko": 352,
18067
- "./ko.js": 352,
18068
- "./ky": 353,
18069
- "./ky.js": 353,
18070
- "./lb": 354,
18071
- "./lb.js": 354,
18072
- "./lo": 355,
18073
- "./lo.js": 355,
18074
- "./lt": 356,
18075
- "./lt.js": 356,
18076
- "./lv": 357,
18077
- "./lv.js": 357,
18078
- "./me": 358,
18079
- "./me.js": 358,
18080
- "./mi": 359,
18081
- "./mi.js": 359,
18082
- "./mk": 360,
18083
- "./mk.js": 360,
18084
- "./ml": 361,
18085
- "./ml.js": 361,
18086
- "./mr": 362,
18087
- "./mr.js": 362,
18088
- "./ms": 363,
18089
- "./ms-my": 364,
18090
- "./ms-my.js": 364,
18091
- "./ms.js": 363,
18092
- "./my": 365,
18093
- "./my.js": 365,
18094
- "./nb": 366,
18095
- "./nb.js": 366,
18096
- "./ne": 367,
18097
- "./ne.js": 367,
18098
- "./nl": 368,
18099
- "./nl-be": 369,
18100
- "./nl-be.js": 369,
18101
- "./nl.js": 368,
18102
- "./nn": 370,
18103
- "./nn.js": 370,
18104
- "./pa-in": 371,
18105
- "./pa-in.js": 371,
18106
- "./pl": 372,
18107
- "./pl.js": 372,
18108
- "./pt": 373,
18109
- "./pt-br": 374,
18110
- "./pt-br.js": 374,
18111
- "./pt.js": 373,
18112
- "./ro": 375,
18113
- "./ro.js": 375,
18114
- "./ru": 376,
18115
- "./ru.js": 376,
18116
- "./sd": 377,
18117
- "./sd.js": 377,
18118
- "./se": 378,
18119
- "./se.js": 378,
18120
- "./si": 379,
18121
- "./si.js": 379,
18122
- "./sk": 380,
18123
- "./sk.js": 380,
18124
- "./sl": 381,
18125
- "./sl.js": 381,
18126
- "./sq": 382,
18127
- "./sq.js": 382,
18128
- "./sr": 383,
18129
- "./sr-cyrl": 384,
18130
- "./sr-cyrl.js": 384,
18131
- "./sr.js": 383,
18132
- "./ss": 385,
18133
- "./ss.js": 385,
18134
- "./sv": 386,
18135
- "./sv.js": 386,
18136
- "./sw": 387,
18137
- "./sw.js": 387,
18138
- "./ta": 388,
18139
- "./ta.js": 388,
18140
- "./te": 389,
18141
- "./te.js": 389,
18142
- "./tet": 390,
18143
- "./tet.js": 390,
18144
- "./th": 391,
18145
- "./th.js": 391,
18146
- "./tl-ph": 392,
18147
- "./tl-ph.js": 392,
18148
- "./tlh": 393,
18149
- "./tlh.js": 393,
18150
- "./tr": 394,
18151
- "./tr.js": 394,
18152
- "./tzl": 395,
18153
- "./tzl.js": 395,
18154
- "./tzm": 396,
18155
- "./tzm-latn": 397,
18156
- "./tzm-latn.js": 397,
18157
- "./tzm.js": 396,
18158
- "./uk": 398,
18159
- "./uk.js": 398,
18160
- "./ur": 399,
18161
- "./ur.js": 399,
18162
- "./uz": 400,
18163
- "./uz-latn": 401,
18164
- "./uz-latn.js": 401,
18165
- "./uz.js": 400,
18166
- "./vi": 402,
18167
- "./vi.js": 402,
18168
- "./x-pseudo": 403,
18169
- "./x-pseudo.js": 403,
18170
- "./yo": 404,
18171
- "./yo.js": 404,
18172
- "./zh-cn": 405,
18173
- "./zh-cn.js": 405,
18174
- "./zh-hk": 406,
18175
- "./zh-hk.js": 406,
18176
- "./zh-tw": 407,
18177
- "./zh-tw.js": 407
18178
  };
18179
  function webpackContext(req) {
18180
  return __webpack_require__(webpackContextResolve(req));
@@ -18253,7 +18077,7 @@ webpackJsonp([0],[
18253
  y : '\'n jaar',
18254
  yy : '%d jaar'
18255
  },
18256
- dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
18257
  ordinal : function (number) {
18258
  return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter
18259
  },
@@ -18481,70 +18305,6 @@ webpackJsonp([0],[
18481
 
18482
  /***/ },
18483
  /* 296 */
18484
- /***/ function(module, exports, __webpack_require__) {
18485
-
18486
- //! moment.js locale configuration
18487
- //! locale : Arabic (Kuwait) [ar-kw]
18488
- //! author : Nusret Parlak: https://github.com/nusretparlak
18489
-
18490
- ;(function (global, factory) {
18491
- true ? factory(__webpack_require__(290)) :
18492
- typeof define === 'function' && define.amd ? define(['../moment'], factory) :
18493
- factory(global.moment)
18494
- }(this, (function (moment) { 'use strict';
18495
-
18496
-
18497
- var arKw = moment.defineLocale('ar-kw', {
18498
- months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
18499
- monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
18500
- weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
18501
- weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
18502
- weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
18503
- weekdaysParseExact : true,
18504
- longDateFormat : {
18505
- LT : 'HH:mm',
18506
- LTS : 'HH:mm:ss',
18507
- L : 'DD/MM/YYYY',
18508
- LL : 'D MMMM YYYY',
18509
- LLL : 'D MMMM YYYY HH:mm',
18510
- LLLL : 'dddd D MMMM YYYY HH:mm'
18511
- },
18512
- calendar : {
18513
- sameDay: '[اليوم على الساعة] LT',
18514
- nextDay: '[غدا على الساعة] LT',
18515
- nextWeek: 'dddd [على الساعة] LT',
18516
- lastDay: '[أمس على الساعة] LT',
18517
- lastWeek: 'dddd [على الساعة] LT',
18518
- sameElse: 'L'
18519
- },
18520
- relativeTime : {
18521
- future : 'في %s',
18522
- past : 'منذ %s',
18523
- s : 'ثوان',
18524
- m : 'دقيقة',
18525
- mm : '%d دقائق',
18526
- h : 'ساعة',
18527
- hh : '%d ساعات',
18528
- d : 'يوم',
18529
- dd : '%d أيام',
18530
- M : 'شهر',
18531
- MM : '%d أشهر',
18532
- y : 'سنة',
18533
- yy : '%d سنوات'
18534
- },
18535
- week : {
18536
- dow : 0, // Sunday is the first day of the week.
18537
- doy : 12 // The week that contains Jan 1st is the first week of the year.
18538
- }
18539
- });
18540
-
18541
- return arKw;
18542
-
18543
- })));
18544
-
18545
-
18546
- /***/ },
18547
- /* 297 */
18548
  /***/ function(module, exports, __webpack_require__) {
18549
 
18550
  //! moment.js locale configuration
@@ -18675,7 +18435,7 @@ webpackJsonp([0],[
18675
 
18676
 
18677
  /***/ },
18678
- /* 298 */
18679
  /***/ function(module, exports, __webpack_require__) {
18680
 
18681
  //! moment.js locale configuration
@@ -18740,7 +18500,7 @@ webpackJsonp([0],[
18740
 
18741
 
18742
  /***/ },
18743
- /* 299 */
18744
  /***/ function(module, exports, __webpack_require__) {
18745
 
18746
  //! moment.js locale configuration
@@ -18850,7 +18610,7 @@ webpackJsonp([0],[
18850
 
18851
 
18852
  /***/ },
18853
- /* 300 */
18854
  /***/ function(module, exports, __webpack_require__) {
18855
 
18856
  //! moment.js locale configuration
@@ -18914,7 +18674,7 @@ webpackJsonp([0],[
18914
 
18915
 
18916
  /***/ },
18917
- /* 301 */
18918
  /***/ function(module, exports, __webpack_require__) {
18919
 
18920
  //! moment.js locale configuration
@@ -19002,7 +18762,7 @@ webpackJsonp([0],[
19002
  return 'axşam';
19003
  }
19004
  },
19005
- dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,
19006
  ordinal : function (number) {
19007
  if (number === 0) { // special case for zero
19008
  return number + '-ıncı';
@@ -19024,7 +18784,7 @@ webpackJsonp([0],[
19024
 
19025
 
19026
  /***/ },
19027
- /* 302 */
19028
  /***/ function(module, exports, __webpack_require__) {
19029
 
19030
  //! moment.js locale configuration
@@ -19136,7 +18896,7 @@ webpackJsonp([0],[
19136
  return 'вечара';
19137
  }
19138
  },
19139
- dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/,
19140
  ordinal: function (number, period) {
19141
  switch (period) {
19142
  case 'M':
@@ -19163,7 +18923,7 @@ webpackJsonp([0],[
19163
 
19164
 
19165
  /***/ },
19166
- /* 303 */
19167
  /***/ function(module, exports, __webpack_require__) {
19168
 
19169
  //! moment.js locale configuration
@@ -19226,7 +18986,7 @@ webpackJsonp([0],[
19226
  y : 'година',
19227
  yy : '%d години'
19228
  },
19229
- dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
19230
  ordinal : function (number) {
19231
  var lastDigit = number % 10,
19232
  last2Digits = number % 100;
@@ -19258,7 +19018,7 @@ webpackJsonp([0],[
19258
 
19259
 
19260
  /***/ },
19261
- /* 304 */
19262
  /***/ function(module, exports, __webpack_require__) {
19263
 
19264
  //! moment.js locale configuration
@@ -19382,7 +19142,7 @@ webpackJsonp([0],[
19382
 
19383
 
19384
  /***/ },
19385
- /* 305 */
19386
  /***/ function(module, exports, __webpack_require__) {
19387
 
19388
  //! moment.js locale configuration
@@ -19506,7 +19266,7 @@ webpackJsonp([0],[
19506
 
19507
 
19508
  /***/ },
19509
- /* 306 */
19510
  /***/ function(module, exports, __webpack_require__) {
19511
 
19512
  //! moment.js locale configuration
@@ -19602,7 +19362,7 @@ webpackJsonp([0],[
19602
  y : 'ur bloaz',
19603
  yy : specialMutationForYears
19604
  },
19605
- dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/,
19606
  ordinal : function (number) {
19607
  var output = (number === 1) ? 'añ' : 'vet';
19608
  return number + output;
@@ -19619,7 +19379,7 @@ webpackJsonp([0],[
19619
 
19620
 
19621
  /***/ },
19622
- /* 307 */
19623
  /***/ function(module, exports, __webpack_require__) {
19624
 
19625
  //! moment.js locale configuration
@@ -19753,7 +19513,7 @@ webpackJsonp([0],[
19753
  y : 'godinu',
19754
  yy : translate
19755
  },
19756
- dayOfMonthOrdinalParse: /\d{1,2}\./,
19757
  ordinal : '%d.',
19758
  week : {
19759
  dow : 1, // Monday is the first day of the week.
@@ -19767,7 +19527,7 @@ webpackJsonp([0],[
19767
 
19768
 
19769
  /***/ },
19770
- /* 308 */
19771
  /***/ function(module, exports, __webpack_require__) {
19772
 
19773
  //! moment.js locale configuration
@@ -19782,12 +19542,8 @@ webpackJsonp([0],[
19782
 
19783
 
19784
  var ca = moment.defineLocale('ca', {
19785
- months : {
19786
- standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),
19787
- format: 'de gener_de febrer_de març_d\'abril_de maig_de juny_de juliol_d\'agost_de setembre_d\'octubre_de novembre_de desembre'.split('_'),
19788
- isFormat: /D[oD]?(\s)+MMMM/
19789
- },
19790
- monthsShort : 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split('_'),
19791
  monthsParseExact : true,
19792
  weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),
19793
  weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
@@ -19797,12 +19553,9 @@ webpackJsonp([0],[
19797
  LT : 'H:mm',
19798
  LTS : 'H:mm:ss',
19799
  L : 'DD/MM/YYYY',
19800
- LL : '[el] D MMMM [de] YYYY',
19801
- ll : 'D MMM YYYY',
19802
- LLL : '[el] D MMMM [de] YYYY [a les] H:mm',
19803
- lll : 'D MMM YYYY, H:mm',
19804
- LLLL : '[el] dddd D MMMM [de] YYYY [a les] H:mm',
19805
- llll : 'ddd D MMM YYYY, H:mm'
19806
  },
19807
  calendar : {
19808
  sameDay : function () {
@@ -19837,7 +19590,7 @@ webpackJsonp([0],[
19837
  y : 'un any',
19838
  yy : '%d anys'
19839
  },
19840
- dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
19841
  ordinal : function (number, period) {
19842
  var output = (number === 1) ? 'r' :
19843
  (number === 2) ? 'n' :
@@ -19860,7 +19613,7 @@ webpackJsonp([0],[
19860
 
19861
 
19862
  /***/ },
19863
- /* 309 */
19864
  /***/ function(module, exports, __webpack_require__) {
19865
 
19866
  //! moment.js locale configuration
@@ -20023,7 +19776,7 @@ webpackJsonp([0],[
20023
  y : translate,
20024
  yy : translate
20025
  },
20026
- dayOfMonthOrdinalParse : /\d{1,2}\./,
20027
  ordinal : '%d.',
20028
  week : {
20029
  dow : 1, // Monday is the first day of the week.
@@ -20037,7 +19790,7 @@ webpackJsonp([0],[
20037
 
20038
 
20039
  /***/ },
20040
- /* 310 */
20041
  /***/ function(module, exports, __webpack_require__) {
20042
 
20043
  //! moment.js locale configuration
@@ -20091,7 +19844,7 @@ webpackJsonp([0],[
20091
  y : 'пӗр ҫул',
20092
  yy : '%d ҫул'
20093
  },
20094
- dayOfMonthOrdinalParse: /\d{1,2}-мӗш/,
20095
  ordinal : '%d-мӗш',
20096
  week : {
20097
  dow : 1, // Monday is the first day of the week.
@@ -20105,7 +19858,7 @@ webpackJsonp([0],[
20105
 
20106
 
20107
  /***/ },
20108
- /* 311 */
20109
  /***/ function(module, exports, __webpack_require__) {
20110
 
20111
  //! moment.js locale configuration
@@ -20159,7 +19912,7 @@ webpackJsonp([0],[
20159
  y: 'blwyddyn',
20160
  yy: '%d flynedd'
20161
  },
20162
- dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
20163
  // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
20164
  ordinal: function (number) {
20165
  var b = number,
@@ -20191,7 +19944,7 @@ webpackJsonp([0],[
20191
 
20192
 
20193
  /***/ },
20194
- /* 312 */
20195
  /***/ function(module, exports, __webpack_require__) {
20196
 
20197
  //! moment.js locale configuration
@@ -20217,14 +19970,14 @@ webpackJsonp([0],[
20217
  L : 'DD/MM/YYYY',
20218
  LL : 'D. MMMM YYYY',
20219
  LLL : 'D. MMMM YYYY HH:mm',
20220
- LLLL : 'dddd [d.] D. MMMM YYYY [kl.] HH:mm'
20221
  },
20222
  calendar : {
20223
- sameDay : '[i dag kl.] LT',
20224
- nextDay : '[i morgen kl.] LT',
20225
- nextWeek : 'dddd [kl.] LT',
20226
- lastDay : '[i går kl.] LT',
20227
- lastWeek : '[i] dddd[s kl.] LT',
20228
  sameElse : 'L'
20229
  },
20230
  relativeTime : {
@@ -20242,7 +19995,7 @@ webpackJsonp([0],[
20242
  y : 'et år',
20243
  yy : '%d år'
20244
  },
20245
- dayOfMonthOrdinalParse: /\d{1,2}\./,
20246
  ordinal : '%d.',
20247
  week : {
20248
  dow : 1, // Monday is the first day of the week.
@@ -20256,7 +20009,7 @@ webpackJsonp([0],[
20256
 
20257
 
20258
  /***/ },
20259
- /* 313 */
20260
  /***/ function(module, exports, __webpack_require__) {
20261
 
20262
  //! moment.js locale configuration
@@ -20325,7 +20078,7 @@ webpackJsonp([0],[
20325
  y : processRelativeTime,
20326
  yy : processRelativeTime
20327
  },
20328
- dayOfMonthOrdinalParse: /\d{1,2}\./,
20329
  ordinal : '%d.',
20330
  week : {
20331
  dow : 1, // Monday is the first day of the week.
@@ -20339,7 +20092,7 @@ webpackJsonp([0],[
20339
 
20340
 
20341
  /***/ },
20342
- /* 314 */
20343
  /***/ function(module, exports, __webpack_require__) {
20344
 
20345
  //! moment.js locale configuration
@@ -20409,7 +20162,7 @@ webpackJsonp([0],[
20409
  y : processRelativeTime,
20410
  yy : processRelativeTime
20411
  },
20412
- dayOfMonthOrdinalParse: /\d{1,2}\./,
20413
  ordinal : '%d.',
20414
  week : {
20415
  dow : 1, // Monday is the first day of the week.
@@ -20423,90 +20176,7 @@ webpackJsonp([0],[
20423
 
20424
 
20425
  /***/ },
20426
- /* 315 */
20427
- /***/ function(module, exports, __webpack_require__) {
20428
-
20429
- //! moment.js locale configuration
20430
- //! locale : German (Switzerland) [de-ch]
20431
- //! author : sschueller : https://github.com/sschueller
20432
-
20433
- ;(function (global, factory) {
20434
- true ? factory(__webpack_require__(290)) :
20435
- typeof define === 'function' && define.amd ? define(['../moment'], factory) :
20436
- factory(global.moment)
20437
- }(this, (function (moment) { 'use strict';
20438
-
20439
-
20440
- // based on: https://www.bk.admin.ch/dokumentation/sprachen/04915/05016/index.html?lang=de#
20441
-
20442
- function processRelativeTime(number, withoutSuffix, key, isFuture) {
20443
- var format = {
20444
- 'm': ['eine Minute', 'einer Minute'],
20445
- 'h': ['eine Stunde', 'einer Stunde'],
20446
- 'd': ['ein Tag', 'einem Tag'],
20447
- 'dd': [number + ' Tage', number + ' Tagen'],
20448
- 'M': ['ein Monat', 'einem Monat'],
20449
- 'MM': [number + ' Monate', number + ' Monaten'],
20450
- 'y': ['ein Jahr', 'einem Jahr'],
20451
- 'yy': [number + ' Jahre', number + ' Jahren']
20452
- };
20453
- return withoutSuffix ? format[key][0] : format[key][1];
20454
- }
20455
-
20456
- var deCh = moment.defineLocale('de-ch', {
20457
- months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
20458
- monthsShort : 'Jan._Febr._März_April_Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.'.split('_'),
20459
- monthsParseExact : true,
20460
- weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
20461
- weekdaysShort : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
20462
- weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
20463
- weekdaysParseExact : true,
20464
- longDateFormat : {
20465
- LT: 'HH.mm',
20466
- LTS: 'HH.mm.ss',
20467
- L : 'DD.MM.YYYY',
20468
- LL : 'D. MMMM YYYY',
20469
- LLL : 'D. MMMM YYYY HH.mm',
20470
- LLLL : 'dddd, D. MMMM YYYY HH.mm'
20471
- },
20472
- calendar : {
20473
- sameDay: '[heute um] LT [Uhr]',
20474
- sameElse: 'L',
20475
- nextDay: '[morgen um] LT [Uhr]',
20476
- nextWeek: 'dddd [um] LT [Uhr]',
20477
- lastDay: '[gestern um] LT [Uhr]',
20478
- lastWeek: '[letzten] dddd [um] LT [Uhr]'
20479
- },
20480
- relativeTime : {
20481
- future : 'in %s',
20482
- past : 'vor %s',
20483
- s : 'ein paar Sekunden',
20484
- m : processRelativeTime,
20485
- mm : '%d Minuten',
20486
- h : processRelativeTime,
20487
- hh : '%d Stunden',
20488
- d : processRelativeTime,
20489
- dd : processRelativeTime,
20490
- M : processRelativeTime,
20491
- MM : processRelativeTime,
20492
- y : processRelativeTime,
20493
- yy : processRelativeTime
20494
- },
20495
- dayOfMonthOrdinalParse: /\d{1,2}\./,
20496
- ordinal : '%d.',
20497
- week : {
20498
- dow : 1, // Monday is the first day of the week.
20499
- doy : 4 // The week that contains Jan 4th is the first week of the year.
20500
- }
20501
- });
20502
-
20503
- return deCh;
20504
-
20505
- })));
20506
-
20507
-
20508
- /***/ },
20509
- /* 316 */
20510
  /***/ function(module, exports, __webpack_require__) {
20511
 
20512
  //! moment.js locale configuration
@@ -20611,7 +20281,7 @@ webpackJsonp([0],[
20611
 
20612
 
20613
  /***/ },
20614
- /* 317 */
20615
  /***/ function(module, exports, __webpack_require__) {
20616
 
20617
  //! moment.js locale configuration
@@ -20633,9 +20303,7 @@ webpackJsonp([0],[
20633
  monthsNominativeEl : 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'),
20634
  monthsGenitiveEl : 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split('_'),
20635
  months : function (momentToFormat, format) {
20636
- if (!momentToFormat) {
20637
- return this._monthsNominativeEl;
20638
- } else if (/D/.test(format.substring(0, format.indexOf('MMMM')))) { // if there is a day number before 'MMMM'
20639
  return this._monthsGenitiveEl[momentToFormat.month()];
20640
  } else {
20641
  return this._monthsNominativeEl[momentToFormat.month()];
@@ -20702,7 +20370,7 @@ webpackJsonp([0],[
20702
  y : 'ένας χρόνος',
20703
  yy : '%d χρόνια'
20704
  },
20705
- dayOfMonthOrdinalParse: /\d{1,2}η/,
20706
  ordinal: '%dη',
20707
  week : {
20708
  dow : 1, // Monday is the first day of the week.
@@ -20716,7 +20384,7 @@ webpackJsonp([0],[
20716
 
20717
 
20718
  /***/ },
20719
- /* 318 */
20720
  /***/ function(module, exports, __webpack_require__) {
20721
 
20722
  //! moment.js locale configuration
@@ -20767,7 +20435,7 @@ webpackJsonp([0],[
20767
  y : 'a year',
20768
  yy : '%d years'
20769
  },
20770
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
20771
  ordinal : function (number) {
20772
  var b = number % 10,
20773
  output = (~~(number % 100 / 10) === 1) ? 'th' :
@@ -20788,7 +20456,7 @@ webpackJsonp([0],[
20788
 
20789
 
20790
  /***/ },
20791
- /* 319 */
20792
  /***/ function(module, exports, __webpack_require__) {
20793
 
20794
  //! moment.js locale configuration
@@ -20839,7 +20507,7 @@ webpackJsonp([0],[
20839
  y : 'a year',
20840
  yy : '%d years'
20841
  },
20842
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
20843
  ordinal : function (number) {
20844
  var b = number % 10,
20845
  output = (~~(number % 100 / 10) === 1) ? 'th' :
@@ -20856,7 +20524,7 @@ webpackJsonp([0],[
20856
 
20857
 
20858
  /***/ },
20859
- /* 320 */
20860
  /***/ function(module, exports, __webpack_require__) {
20861
 
20862
  //! moment.js locale configuration
@@ -20907,7 +20575,7 @@ webpackJsonp([0],[
20907
  y : 'a year',
20908
  yy : '%d years'
20909
  },
20910
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
20911
  ordinal : function (number) {
20912
  var b = number % 10,
20913
  output = (~~(number % 100 / 10) === 1) ? 'th' :
@@ -20928,7 +20596,7 @@ webpackJsonp([0],[
20928
 
20929
 
20930
  /***/ },
20931
- /* 321 */
20932
  /***/ function(module, exports, __webpack_require__) {
20933
 
20934
  //! moment.js locale configuration
@@ -20979,7 +20647,7 @@ webpackJsonp([0],[
20979
  y : 'a year',
20980
  yy : '%d years'
20981
  },
20982
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
20983
  ordinal : function (number) {
20984
  var b = number % 10,
20985
  output = (~~(number % 100 / 10) === 1) ? 'th' :
@@ -21000,7 +20668,7 @@ webpackJsonp([0],[
21000
 
21001
 
21002
  /***/ },
21003
- /* 322 */
21004
  /***/ function(module, exports, __webpack_require__) {
21005
 
21006
  //! moment.js locale configuration
@@ -21051,7 +20719,7 @@ webpackJsonp([0],[
21051
  y : 'a year',
21052
  yy : '%d years'
21053
  },
21054
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
21055
  ordinal : function (number) {
21056
  var b = number % 10,
21057
  output = (~~(number % 100 / 10) === 1) ? 'th' :
@@ -21072,14 +20740,14 @@ webpackJsonp([0],[
21072
 
21073
 
21074
  /***/ },
21075
- /* 323 */
21076
  /***/ function(module, exports, __webpack_require__) {
21077
 
21078
  //! moment.js locale configuration
21079
  //! locale : Esperanto [eo]
21080
  //! author : Colin Dean : https://github.com/colindean
21081
- //! author : Mia Nordentoft Imperatori : https://github.com/miestasmia
21082
- //! comment : miestasmia corrected the translation by colindean
21083
 
21084
  ;(function (global, factory) {
21085
  true ? factory(__webpack_require__(290)) :
@@ -21091,16 +20759,16 @@ webpackJsonp([0],[
21091
  var eo = moment.defineLocale('eo', {
21092
  months : 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split('_'),
21093
  monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec'.split('_'),
21094
- weekdays : 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),
21095
- weekdaysShort : 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),
21096
- weekdaysMin : 'di_lu_ma_me_ĵa_ve_sa'.split('_'),
21097
  longDateFormat : {
21098
  LT : 'HH:mm',
21099
  LTS : 'HH:mm:ss',
21100
  L : 'YYYY-MM-DD',
21101
- LL : 'D[-a de] MMMM, YYYY',
21102
- LLL : 'D[-a de] MMMM, YYYY HH:mm',
21103
- LLLL : 'dddd, [la] D[-a de] MMMM, YYYY HH:mm'
21104
  },
21105
  meridiemParse: /[ap]\.t\.m/i,
21106
  isPM: function (input) {
@@ -21122,7 +20790,7 @@ webpackJsonp([0],[
21122
  sameElse : 'L'
21123
  },
21124
  relativeTime : {
21125
- future : 'post %s',
21126
  past : 'antaŭ %s',
21127
  s : 'sekundoj',
21128
  m : 'minuto',
@@ -21136,7 +20804,7 @@ webpackJsonp([0],[
21136
  y : 'jaro',
21137
  yy : '%d jaroj'
21138
  },
21139
- dayOfMonthOrdinalParse: /\d{1,2}a/,
21140
  ordinal : '%da',
21141
  week : {
21142
  dow : 1, // Monday is the first day of the week.
@@ -21150,7 +20818,7 @@ webpackJsonp([0],[
21150
 
21151
 
21152
  /***/ },
21153
- /* 324 */
21154
  /***/ function(module, exports, __webpack_require__) {
21155
 
21156
  //! moment.js locale configuration
@@ -21170,9 +20838,7 @@ webpackJsonp([0],[
21170
  var es = moment.defineLocale('es', {
21171
  months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
21172
  monthsShort : function (m, format) {
21173
- if (!m) {
21174
- return monthsShortDot;
21175
- } else if (/-MMM-/.test(format)) {
21176
  return monthsShort[m.month()];
21177
  } else {
21178
  return monthsShortDot[m.month()];
@@ -21224,7 +20890,7 @@ webpackJsonp([0],[
21224
  y : 'un año',
21225
  yy : '%d años'
21226
  },
21227
- dayOfMonthOrdinalParse : /\d{1,2}º/,
21228
  ordinal : '%dº',
21229
  week : {
21230
  dow : 1, // Monday is the first day of the week.
@@ -21238,7 +20904,7 @@ webpackJsonp([0],[
21238
 
21239
 
21240
  /***/ },
21241
- /* 325 */
21242
  /***/ function(module, exports, __webpack_require__) {
21243
 
21244
  //! moment.js locale configuration
@@ -21257,9 +20923,7 @@ webpackJsonp([0],[
21257
  var esDo = moment.defineLocale('es-do', {
21258
  months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
21259
  monthsShort : function (m, format) {
21260
- if (!m) {
21261
- return monthsShortDot;
21262
- } else if (/-MMM-/.test(format)) {
21263
  return monthsShort[m.month()];
21264
  } else {
21265
  return monthsShortDot[m.month()];
@@ -21311,7 +20975,7 @@ webpackJsonp([0],[
21311
  y : 'un año',
21312
  yy : '%d años'
21313
  },
21314
- dayOfMonthOrdinalParse : /\d{1,2}º/,
21315
  ordinal : '%dº',
21316
  week : {
21317
  dow : 1, // Monday is the first day of the week.
@@ -21325,7 +20989,7 @@ webpackJsonp([0],[
21325
 
21326
 
21327
  /***/ },
21328
- /* 326 */
21329
  /***/ function(module, exports, __webpack_require__) {
21330
 
21331
  //! moment.js locale configuration
@@ -21396,7 +21060,7 @@ webpackJsonp([0],[
21396
  y : processRelativeTime,
21397
  yy : processRelativeTime
21398
  },
21399
- dayOfMonthOrdinalParse: /\d{1,2}\./,
21400
  ordinal : '%d.',
21401
  week : {
21402
  dow : 1, // Monday is the first day of the week.
@@ -21410,7 +21074,7 @@ webpackJsonp([0],[
21410
 
21411
 
21412
  /***/ },
21413
- /* 327 */
21414
  /***/ function(module, exports, __webpack_require__) {
21415
 
21416
  //! moment.js locale configuration
@@ -21467,7 +21131,7 @@ webpackJsonp([0],[
21467
  y : 'urte bat',
21468
  yy : '%d urte'
21469
  },
21470
- dayOfMonthOrdinalParse: /\d{1,2}\./,
21471
  ordinal : '%d.',
21472
  week : {
21473
  dow : 1, // Monday is the first day of the week.
@@ -21481,7 +21145,7 @@ webpackJsonp([0],[
21481
 
21482
 
21483
  /***/ },
21484
- /* 328 */
21485
  /***/ function(module, exports, __webpack_require__) {
21486
 
21487
  //! moment.js locale configuration
@@ -21557,7 +21221,7 @@ webpackJsonp([0],[
21557
  relativeTime : {
21558
  future : 'در %s',
21559
  past : '%s پیش',
21560
- s : 'چند ثانیه',
21561
  m : 'یک دقیقه',
21562
  mm : '%d دقیقه',
21563
  h : 'یک ساعت',
@@ -21579,7 +21243,7 @@ webpackJsonp([0],[
21579
  return symbolMap[match];
21580
  }).replace(/,/g, '،');
21581
  },
21582
- dayOfMonthOrdinalParse: /\d{1,2}م/,
21583
  ordinal : '%dم',
21584
  week : {
21585
  dow : 6, // Saturday is the first day of the week.
@@ -21593,7 +21257,7 @@ webpackJsonp([0],[
21593
 
21594
 
21595
  /***/ },
21596
- /* 329 */
21597
  /***/ function(module, exports, __webpack_require__) {
21598
 
21599
  //! moment.js locale configuration
@@ -21691,7 +21355,7 @@ webpackJsonp([0],[
21691
  y : translate,
21692
  yy : translate
21693
  },
21694
- dayOfMonthOrdinalParse: /\d{1,2}\./,
21695
  ordinal : '%d.',
21696
  week : {
21697
  dow : 1, // Monday is the first day of the week.
@@ -21705,7 +21369,7 @@ webpackJsonp([0],[
21705
 
21706
 
21707
  /***/ },
21708
- /* 330 */
21709
  /***/ function(module, exports, __webpack_require__) {
21710
 
21711
  //! moment.js locale configuration
@@ -21756,7 +21420,7 @@ webpackJsonp([0],[
21756
  y : 'eitt ár',
21757
  yy : '%d ár'
21758
  },
21759
- dayOfMonthOrdinalParse: /\d{1,2}\./,
21760
  ordinal : '%d.',
21761
  week : {
21762
  dow : 1, // Monday is the first day of the week.
@@ -21770,7 +21434,7 @@ webpackJsonp([0],[
21770
 
21771
 
21772
  /***/ },
21773
- /* 331 */
21774
  /***/ function(module, exports, __webpack_require__) {
21775
 
21776
  //! moment.js locale configuration
@@ -21801,12 +21465,12 @@ webpackJsonp([0],[
21801
  LLLL : 'dddd D MMMM YYYY HH:mm'
21802
  },
21803
  calendar : {
21804
- sameDay : '[Aujourdhui à] LT',
21805
- nextDay : '[Demain à] LT',
21806
- nextWeek : 'dddd [à] LT',
21807
- lastDay : '[Hier à] LT',
21808
- lastWeek : 'dddd [dernier à] LT',
21809
- sameElse : 'L'
21810
  },
21811
  relativeTime : {
21812
  future : 'dans %s',
@@ -21823,28 +21487,9 @@ webpackJsonp([0],[
21823
  y : 'un an',
21824
  yy : '%d ans'
21825
  },
21826
- dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
21827
- ordinal : function (number, period) {
21828
- switch (period) {
21829
- // TODO: Return 'e' when day of month > 1. Move this case inside
21830
- // block for masculine words below.
21831
- // See https://github.com/moment/moment/issues/3375
21832
- case 'D':
21833
- return number + (number === 1 ? 'er' : '');
21834
-
21835
- // Words with masculine grammatical gender: mois, trimestre, jour
21836
- default:
21837
- case 'M':
21838
- case 'Q':
21839
- case 'DDD':
21840
- case 'd':
21841
- return number + (number === 1 ? 'er' : 'e');
21842
-
21843
- // Words with feminine grammatical gender: semaine
21844
- case 'w':
21845
- case 'W':
21846
- return number + (number === 1 ? 're' : 'e');
21847
- }
21848
  },
21849
  week : {
21850
  dow : 1, // Monday is the first day of the week.
@@ -21858,7 +21503,7 @@ webpackJsonp([0],[
21858
 
21859
 
21860
  /***/ },
21861
- /* 332 */
21862
  /***/ function(module, exports, __webpack_require__) {
21863
 
21864
  //! moment.js locale configuration
@@ -21889,12 +21534,12 @@ webpackJsonp([0],[
21889
  LLLL : 'dddd D MMMM YYYY HH:mm'
21890
  },
21891
  calendar : {
21892
- sameDay : '[Aujourdhui à] LT',
21893
- nextDay : '[Demain à] LT',
21894
- nextWeek : 'dddd [à] LT',
21895
- lastDay : '[Hier à] LT',
21896
- lastWeek : 'dddd [dernier à] LT',
21897
- sameElse : 'L'
21898
  },
21899
  relativeTime : {
21900
  future : 'dans %s',
@@ -21911,23 +21556,9 @@ webpackJsonp([0],[
21911
  y : 'un an',
21912
  yy : '%d ans'
21913
  },
21914
- dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
21915
- ordinal : function (number, period) {
21916
- switch (period) {
21917
- // Words with masculine grammatical gender: mois, trimestre, jour
21918
- default:
21919
- case 'M':
21920
- case 'Q':
21921
- case 'D':
21922
- case 'DDD':
21923
- case 'd':
21924
- return number + (number === 1 ? 'er' : 'e');
21925
-
21926
- // Words with feminine grammatical gender: semaine
21927
- case 'w':
21928
- case 'W':
21929
- return number + (number === 1 ? 're' : 'e');
21930
- }
21931
  }
21932
  });
21933
 
@@ -21937,7 +21568,7 @@ webpackJsonp([0],[
21937
 
21938
 
21939
  /***/ },
21940
- /* 333 */
21941
  /***/ function(module, exports, __webpack_require__) {
21942
 
21943
  //! moment.js locale configuration
@@ -21968,12 +21599,12 @@ webpackJsonp([0],[
21968
  LLLL : 'dddd D MMMM YYYY HH:mm'
21969
  },
21970
  calendar : {
21971
- sameDay : '[Aujourdhui à] LT',
21972
- nextDay : '[Demain à] LT',
21973
- nextWeek : 'dddd [à] LT',
21974
- lastDay : '[Hier à] LT',
21975
- lastWeek : 'dddd [dernier à] LT',
21976
- sameElse : 'L'
21977
  },
21978
  relativeTime : {
21979
  future : 'dans %s',
@@ -21990,23 +21621,9 @@ webpackJsonp([0],[
21990
  y : 'un an',
21991
  yy : '%d ans'
21992
  },
21993
- dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
21994
- ordinal : function (number, period) {
21995
- switch (period) {
21996
- // Words with masculine grammatical gender: mois, trimestre, jour
21997
- default:
21998
- case 'M':
21999
- case 'Q':
22000
- case 'D':
22001
- case 'DDD':
22002
- case 'd':
22003
- return number + (number === 1 ? 'er' : 'e');
22004
-
22005
- // Words with feminine grammatical gender: semaine
22006
- case 'w':
22007
- case 'W':
22008
- return number + (number === 1 ? 're' : 'e');
22009
- }
22010
  },
22011
  week : {
22012
  dow : 1, // Monday is the first day of the week.
@@ -22020,7 +21637,7 @@ webpackJsonp([0],[
22020
 
22021
 
22022
  /***/ },
22023
- /* 334 */
22024
  /***/ function(module, exports, __webpack_require__) {
22025
 
22026
  //! moment.js locale configuration
@@ -22040,9 +21657,7 @@ webpackJsonp([0],[
22040
  var fy = moment.defineLocale('fy', {
22041
  months : 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'),
22042
  monthsShort : function (m, format) {
22043
- if (!m) {
22044
- return monthsShortWithDots;
22045
- } else if (/-MMM-/.test(format)) {
22046
  return monthsShortWithoutDots[m.month()];
22047
  } else {
22048
  return monthsShortWithDots[m.month()];
@@ -22084,7 +21699,7 @@ webpackJsonp([0],[
22084
  y : 'ien jier',
22085
  yy : '%d jierren'
22086
  },
22087
- dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
22088
  ordinal : function (number) {
22089
  return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
22090
  },
@@ -22100,7 +21715,7 @@ webpackJsonp([0],[
22100
 
22101
 
22102
  /***/ },
22103
- /* 335 */
22104
  /***/ function(module, exports, __webpack_require__) {
22105
 
22106
  //! moment.js locale configuration
@@ -22164,7 +21779,7 @@ webpackJsonp([0],[
22164
  y : 'bliadhna',
22165
  yy : '%d bliadhna'
22166
  },
22167
- dayOfMonthOrdinalParse : /\d{1,2}(d|na|mh)/,
22168
  ordinal : function (number) {
22169
  var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
22170
  return number + output;
@@ -22181,7 +21796,7 @@ webpackJsonp([0],[
22181
 
22182
 
22183
  /***/ },
22184
- /* 336 */
22185
  /***/ function(module, exports, __webpack_require__) {
22186
 
22187
  //! moment.js locale configuration
@@ -22249,7 +21864,7 @@ webpackJsonp([0],[
22249
  y : 'un ano',
22250
  yy : '%d anos'
22251
  },
22252
- dayOfMonthOrdinalParse : /\d{1,2}º/,
22253
  ordinal : '%dº',
22254
  week : {
22255
  dow : 1, // Monday is the first day of the week.
@@ -22263,134 +21878,7 @@ webpackJsonp([0],[
22263
 
22264
 
22265
  /***/ },
22266
- /* 337 */
22267
- /***/ function(module, exports, __webpack_require__) {
22268
-
22269
- //! moment.js locale configuration
22270
- //! locale : Konkani Latin script [gom-latn]
22271
- //! author : The Discoverer : https://github.com/WikiDiscoverer
22272
-
22273
- ;(function (global, factory) {
22274
- true ? factory(__webpack_require__(290)) :
22275
- typeof define === 'function' && define.amd ? define(['../moment'], factory) :
22276
- factory(global.moment)
22277
- }(this, (function (moment) { 'use strict';
22278
-
22279
-
22280
- function processRelativeTime(number, withoutSuffix, key, isFuture) {
22281
- var format = {
22282
- 's': ['thodde secondanim', 'thodde second'],
22283
- 'm': ['eka mintan', 'ek minute'],
22284
- 'mm': [number + ' mintanim', number + ' mintam'],
22285
- 'h': ['eka horan', 'ek hor'],
22286
- 'hh': [number + ' horanim', number + ' hor'],
22287
- 'd': ['eka disan', 'ek dis'],
22288
- 'dd': [number + ' disanim', number + ' dis'],
22289
- 'M': ['eka mhoinean', 'ek mhoino'],
22290
- 'MM': [number + ' mhoineanim', number + ' mhoine'],
22291
- 'y': ['eka vorsan', 'ek voros'],
22292
- 'yy': [number + ' vorsanim', number + ' vorsam']
22293
- };
22294
- return withoutSuffix ? format[key][0] : format[key][1];
22295
- }
22296
-
22297
- var gomLatn = moment.defineLocale('gom-latn', {
22298
- months : 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split('_'),
22299
- monthsShort : 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),
22300
- monthsParseExact : true,
22301
- weekdays : 'Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son\'var'.split('_'),
22302
- weekdaysShort : 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
22303
- weekdaysMin : 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),
22304
- weekdaysParseExact : true,
22305
- longDateFormat : {
22306
- LT : 'A h:mm [vazta]',
22307
- LTS : 'A h:mm:ss [vazta]',
22308
- L : 'DD-MM-YYYY',
22309
- LL : 'D MMMM YYYY',
22310
- LLL : 'D MMMM YYYY A h:mm [vazta]',
22311
- LLLL : 'dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]',
22312
- llll: 'ddd, D MMM YYYY, A h:mm [vazta]'
22313
- },
22314
- calendar : {
22315
- sameDay: '[Aiz] LT',
22316
- nextDay: '[Faleam] LT',
22317
- nextWeek: '[Ieta to] dddd[,] LT',
22318
- lastDay: '[Kal] LT',
22319
- lastWeek: '[Fatlo] dddd[,] LT',
22320
- sameElse: 'L'
22321
- },
22322
- relativeTime : {
22323
- future : '%s',
22324
- past : '%s adim',
22325
- s : processRelativeTime,
22326
- m : processRelativeTime,
22327
- mm : processRelativeTime,
22328
- h : processRelativeTime,
22329
- hh : processRelativeTime,
22330
- d : processRelativeTime,
22331
- dd : processRelativeTime,
22332
- M : processRelativeTime,
22333
- MM : processRelativeTime,
22334
- y : processRelativeTime,
22335
- yy : processRelativeTime
22336
- },
22337
- dayOfMonthOrdinalParse : /\d{1,2}(er)/,
22338
- ordinal : function (number, period) {
22339
- switch (period) {
22340
- // the ordinal 'er' only applies to day of the month
22341
- case 'D':
22342
- return number + 'er';
22343
- default:
22344
- case 'M':
22345
- case 'Q':
22346
- case 'DDD':
22347
- case 'd':
22348
- case 'w':
22349
- case 'W':
22350
- return number;
22351
- }
22352
- },
22353
- week : {
22354
- dow : 1, // Monday is the first day of the week.
22355
- doy : 4 // The week that contains Jan 4th is the first week of the year.
22356
- },
22357
- meridiemParse: /rati|sokalli|donparam|sanje/,
22358
- meridiemHour : function (hour, meridiem) {
22359
- if (hour === 12) {
22360
- hour = 0;
22361
- }
22362
- if (meridiem === 'rati') {
22363
- return hour < 4 ? hour : hour + 12;
22364
- } else if (meridiem === 'sokalli') {
22365
- return hour;
22366
- } else if (meridiem === 'donparam') {
22367
- return hour > 12 ? hour : hour + 12;
22368
- } else if (meridiem === 'sanje') {
22369
- return hour + 12;
22370
- }
22371
- },
22372
- meridiem : function (hour, minute, isLower) {
22373
- if (hour < 4) {
22374
- return 'rati';
22375
- } else if (hour < 12) {
22376
- return 'sokalli';
22377
- } else if (hour < 16) {
22378
- return 'donparam';
22379
- } else if (hour < 20) {
22380
- return 'sanje';
22381
- } else {
22382
- return 'rati';
22383
- }
22384
- }
22385
- });
22386
-
22387
- return gomLatn;
22388
-
22389
- })));
22390
-
22391
-
22392
- /***/ },
22393
- /* 338 */
22394
  /***/ function(module, exports, __webpack_require__) {
22395
 
22396
  //! moment.js locale configuration
@@ -22494,7 +21982,7 @@ webpackJsonp([0],[
22494
 
22495
 
22496
  /***/ },
22497
- /* 339 */
22498
  /***/ function(module, exports, __webpack_require__) {
22499
 
22500
  //! moment.js locale configuration
@@ -22623,7 +22111,7 @@ webpackJsonp([0],[
22623
 
22624
 
22625
  /***/ },
22626
- /* 340 */
22627
  /***/ function(module, exports, __webpack_require__) {
22628
 
22629
  //! moment.js locale configuration
@@ -22759,7 +22247,7 @@ webpackJsonp([0],[
22759
  y : 'godinu',
22760
  yy : translate
22761
  },
22762
- dayOfMonthOrdinalParse: /\d{1,2}\./,
22763
  ordinal : '%d.',
22764
  week : {
22765
  dow : 1, // Monday is the first day of the week.
@@ -22773,7 +22261,7 @@ webpackJsonp([0],[
22773
 
22774
 
22775
  /***/ },
22776
- /* 341 */
22777
  /***/ function(module, exports, __webpack_require__) {
22778
 
22779
  //! moment.js locale configuration
@@ -22873,7 +22361,7 @@ webpackJsonp([0],[
22873
  y : translate,
22874
  yy : translate
22875
  },
22876
- dayOfMonthOrdinalParse: /\d{1,2}\./,
22877
  ordinal : '%d.',
22878
  week : {
22879
  dow : 1, // Monday is the first day of the week.
@@ -22887,7 +22375,7 @@ webpackJsonp([0],[
22887
 
22888
 
22889
  /***/ },
22890
- /* 342 */
22891
  /***/ function(module, exports, __webpack_require__) {
22892
 
22893
  //! moment.js locale configuration
@@ -22960,7 +22448,7 @@ webpackJsonp([0],[
22960
  return 'երեկոյան';
22961
  }
22962
  },
22963
- dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/,
22964
  ordinal: function (number, period) {
22965
  switch (period) {
22966
  case 'DDD':
@@ -22987,7 +22475,7 @@ webpackJsonp([0],[
22987
 
22988
 
22989
  /***/ },
22990
- /* 343 */
22991
  /***/ function(module, exports, __webpack_require__) {
22992
 
22993
  //! moment.js locale configuration
@@ -23075,7 +22563,7 @@ webpackJsonp([0],[
23075
 
23076
 
23077
  /***/ },
23078
- /* 344 */
23079
  /***/ function(module, exports, __webpack_require__) {
23080
 
23081
  //! moment.js locale configuration
@@ -23193,7 +22681,7 @@ webpackJsonp([0],[
23193
  y : translate,
23194
  yy : translate
23195
  },
23196
- dayOfMonthOrdinalParse: /\d{1,2}\./,
23197
  ordinal : '%d.',
23198
  week : {
23199
  dow : 1, // Monday is the first day of the week.
@@ -23207,7 +22695,7 @@ webpackJsonp([0],[
23207
 
23208
 
23209
  /***/ },
23210
- /* 345 */
23211
  /***/ function(module, exports, __webpack_require__) {
23212
 
23213
  //! moment.js locale configuration
@@ -23225,9 +22713,9 @@ webpackJsonp([0],[
23225
  var it = moment.defineLocale('it', {
23226
  months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),
23227
  monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
23228
- weekdays : 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'),
23229
- weekdaysShort : 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
23230
- weekdaysMin : 'do_lu_ma_me_gi_ve_sa'.split('_'),
23231
  longDateFormat : {
23232
  LT : 'HH:mm',
23233
  LTS : 'HH:mm:ss',
@@ -23268,7 +22756,7 @@ webpackJsonp([0],[
23268
  y : 'un anno',
23269
  yy : '%d anni'
23270
  },
23271
- dayOfMonthOrdinalParse : /\d{1,2}º/,
23272
  ordinal: '%dº',
23273
  week : {
23274
  dow : 1, // Monday is the first day of the week.
@@ -23282,7 +22770,7 @@ webpackJsonp([0],[
23282
 
23283
 
23284
  /***/ },
23285
- /* 346 */
23286
  /***/ function(module, exports, __webpack_require__) {
23287
 
23288
  //! moment.js locale configuration
@@ -23303,16 +22791,12 @@ webpackJsonp([0],[
23303
  weekdaysShort : '日_月_火_水_木_金_土'.split('_'),
23304
  weekdaysMin : '日_月_火_水_木_金_土'.split('_'),
23305
  longDateFormat : {
23306
- LT : 'HH:mm',
23307
- LTS : 'HH:mm:ss',
23308
  L : 'YYYY/MM/DD',
23309
  LL : 'YYYY年M月D日',
23310
- LLL : 'YYYY年M月D日 HH:mm',
23311
- LLLL : 'YYYY年M月D日 HH:mm dddd',
23312
- l : 'YYYY/MM/DD',
23313
- ll : 'YYYY年M月D日',
23314
- lll : 'YYYY年M月D日 HH:mm',
23315
- llll : 'YYYY年M月D日 HH:mm dddd'
23316
  },
23317
  meridiemParse: /午前|午後/i,
23318
  isPM : function (input) {
@@ -23333,7 +22817,7 @@ webpackJsonp([0],[
23333
  lastWeek : '[前週]dddd LT',
23334
  sameElse : 'L'
23335
  },
23336
- dayOfMonthOrdinalParse : /\d{1,2}日/,
23337
  ordinal : function (number, period) {
23338
  switch (period) {
23339
  case 'd':
@@ -23367,7 +22851,7 @@ webpackJsonp([0],[
23367
 
23368
 
23369
  /***/ },
23370
- /* 347 */
23371
  /***/ function(module, exports, __webpack_require__) {
23372
 
23373
  //! moment.js locale configuration
@@ -23455,7 +22939,7 @@ webpackJsonp([0],[
23455
 
23456
 
23457
  /***/ },
23458
- /* 348 */
23459
  /***/ function(module, exports, __webpack_require__) {
23460
 
23461
  //! moment.js locale configuration
@@ -23506,10 +22990,10 @@ webpackJsonp([0],[
23506
  },
23507
  past : function (s) {
23508
  if ((/(წამი|წუთი|საათი|დღე|თვე)/).test(s)) {
23509
- return s.replace(/(ი|ე)$/, 'ის უკან');
23510
  }
23511
  if ((/წელი/).test(s)) {
23512
- return s.replace(/წელი$/, 'წლის უკან');
23513
  }
23514
  },
23515
  s : 'რამდენიმე წამი',
@@ -23524,7 +23008,7 @@ webpackJsonp([0],[
23524
  y : 'წელი',
23525
  yy : '%d წელი'
23526
  },
23527
- dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
23528
  ordinal : function (number) {
23529
  if (number === 0) {
23530
  return number;
@@ -23549,7 +23033,7 @@ webpackJsonp([0],[
23549
 
23550
 
23551
  /***/ },
23552
- /* 349 */
23553
  /***/ function(module, exports, __webpack_require__) {
23554
 
23555
  //! moment.js locale configuration
@@ -23623,7 +23107,7 @@ webpackJsonp([0],[
23623
  y : 'бір жыл',
23624
  yy : '%d жыл'
23625
  },
23626
- dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/,
23627
  ordinal : function (number) {
23628
  var a = number % 10,
23629
  b = number >= 100 ? 100 : null;
@@ -23641,7 +23125,7 @@ webpackJsonp([0],[
23641
 
23642
 
23643
  /***/ },
23644
- /* 350 */
23645
  /***/ function(module, exports, __webpack_require__) {
23646
 
23647
  //! moment.js locale configuration
@@ -23704,138 +23188,7 @@ webpackJsonp([0],[
23704
 
23705
 
23706
  /***/ },
23707
- /* 351 */
23708
- /***/ function(module, exports, __webpack_require__) {
23709
-
23710
- //! moment.js locale configuration
23711
- //! locale : Kannada [kn]
23712
- //! author : Rajeev Naik : https://github.com/rajeevnaikte
23713
-
23714
- ;(function (global, factory) {
23715
- true ? factory(__webpack_require__(290)) :
23716
- typeof define === 'function' && define.amd ? define(['../moment'], factory) :
23717
- factory(global.moment)
23718
- }(this, (function (moment) { 'use strict';
23719
-
23720
-
23721
- var symbolMap = {
23722
- '1': '೧',
23723
- '2': '೨',
23724
- '3': '೩',
23725
- '4': '೪',
23726
- '5': '೫',
23727
- '6': '೬',
23728
- '7': '೭',
23729
- '8': '೮',
23730
- '9': '೯',
23731
- '0': '೦'
23732
- };
23733
- var numberMap = {
23734
- '೧': '1',
23735
- '೨': '2',
23736
- '೩': '3',
23737
- '೪': '4',
23738
- '೫': '5',
23739
- '೬': '6',
23740
- '೭': '7',
23741
- '೮': '8',
23742
- '೯': '9',
23743
- '೦': '0'
23744
- };
23745
-
23746
- var kn = moment.defineLocale('kn', {
23747
- months : 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split('_'),
23748
- monthsShort : 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬ_ಅಕ್ಟೋಬ_ನವೆಂಬ_ಡಿಸೆಂಬ'.split('_'),
23749
- monthsParseExact: true,
23750
- weekdays : 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split('_'),
23751
- weekdaysShort : 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),
23752
- weekdaysMin : 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),
23753
- longDateFormat : {
23754
- LT : 'A h:mm',
23755
- LTS : 'A h:mm:ss',
23756
- L : 'DD/MM/YYYY',
23757
- LL : 'D MMMM YYYY',
23758
- LLL : 'D MMMM YYYY, A h:mm',
23759
- LLLL : 'dddd, D MMMM YYYY, A h:mm'
23760
- },
23761
- calendar : {
23762
- sameDay : '[ಇಂದು] LT',
23763
- nextDay : '[ನಾಳೆ] LT',
23764
- nextWeek : 'dddd, LT',
23765
- lastDay : '[ನಿನ್ನೆ] LT',
23766
- lastWeek : '[ಕೊನೆಯ] dddd, LT',
23767
- sameElse : 'L'
23768
- },
23769
- relativeTime : {
23770
- future : '%s ನಂತರ',
23771
- past : '%s ಹಿಂದೆ',
23772
- s : 'ಕೆಲವು ಕ್ಷಣಗಳು',
23773
- m : 'ಒಂದು ನಿಮಿಷ',
23774
- mm : '%d ನಿಮಿಷ',
23775
- h : 'ಒಂದು ಗಂಟೆ',
23776
- hh : '%d ಗಂಟೆ',
23777
- d : 'ಒಂದು ದಿನ',
23778
- dd : '%d ದಿನ',
23779
- M : 'ಒಂದು ತಿಂಗಳು',
23780
- MM : '%d ತಿಂಗಳು',
23781
- y : 'ಒಂದು ವರ್ಷ',
23782
- yy : '%d ವರ್ಷ'
23783
- },
23784
- preparse: function (string) {
23785
- return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {
23786
- return numberMap[match];
23787
- });
23788
- },
23789
- postformat: function (string) {
23790
- return string.replace(/\d/g, function (match) {
23791
- return symbolMap[match];
23792
- });
23793
- },
23794
- meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,
23795
- meridiemHour : function (hour, meridiem) {
23796
- if (hour === 12) {
23797
- hour = 0;
23798
- }
23799
- if (meridiem === 'ರಾತ್ರಿ') {
23800
- return hour < 4 ? hour : hour + 12;
23801
- } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {
23802
- return hour;
23803
- } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {
23804
- return hour >= 10 ? hour : hour + 12;
23805
- } else if (meridiem === 'ಸಂಜೆ') {
23806
- return hour + 12;
23807
- }
23808
- },
23809
- meridiem : function (hour, minute, isLower) {
23810
- if (hour < 4) {
23811
- return 'ರಾತ್ರಿ';
23812
- } else if (hour < 10) {
23813
- return 'ಬೆಳಿಗ್ಗೆ';
23814
- } else if (hour < 17) {
23815
- return 'ಮಧ್ಯಾಹ್ನ';
23816
- } else if (hour < 20) {
23817
- return 'ಸಂಜೆ';
23818
- } else {
23819
- return 'ರಾತ್ರಿ';
23820
- }
23821
- },
23822
- dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/,
23823
- ordinal : function (number) {
23824
- return number + 'ನೇ';
23825
- },
23826
- week : {
23827
- dow : 0, // Sunday is the first day of the week.
23828
- doy : 6 // The week that contains Jan 1st is the first week of the year.
23829
- }
23830
- });
23831
-
23832
- return kn;
23833
-
23834
- })));
23835
-
23836
-
23837
- /***/ },
23838
- /* 352 */
23839
  /***/ function(module, exports, __webpack_require__) {
23840
 
23841
  //! moment.js locale configuration
@@ -23857,16 +23210,12 @@ webpackJsonp([0],[
23857
  weekdaysShort : '일_월_화_수_목_금_토'.split('_'),
23858
  weekdaysMin : '일_월_화_수_목_금_토'.split('_'),
23859
  longDateFormat : {
23860
- LT : 'A h:mm',
23861
- LTS : 'A h:mm:ss',
23862
  L : 'YYYY.MM.DD',
23863
  LL : 'YYYY년 MMMM D일',
23864
- LLL : 'YYYY년 MMMM D일 A h:mm',
23865
- LLLL : 'YYYY년 MMMM D일 dddd A h:mm',
23866
- l : 'YYYY.MM.DD',
23867
- ll : 'YYYY년 MMMM D일',
23868
- lll : 'YYYY년 MMMM D일 A h:mm',
23869
- llll : 'YYYY년 MMMM D일 dddd A h:mm'
23870
  },
23871
  calendar : {
23872
  sameDay : '오늘 LT',
@@ -23881,7 +23230,7 @@ webpackJsonp([0],[
23881
  past : '%s 전',
23882
  s : '몇 초',
23883
  ss : '%d초',
23884
- m : '1분',
23885
  mm : '%d분',
23886
  h : '한 시간',
23887
  hh : '%d시간',
@@ -23892,7 +23241,7 @@ webpackJsonp([0],[
23892
  y : '일 년',
23893
  yy : '%d년'
23894
  },
23895
- dayOfMonthOrdinalParse : /\d{1,2}일/,
23896
  ordinal : '%d일',
23897
  meridiemParse : /오전|오후/,
23898
  isPM : function (token) {
@@ -23909,7 +23258,7 @@ webpackJsonp([0],[
23909
 
23910
 
23911
  /***/ },
23912
- /* 353 */
23913
  /***/ function(module, exports, __webpack_require__) {
23914
 
23915
  //! moment.js locale configuration
@@ -23984,7 +23333,7 @@ webpackJsonp([0],[
23984
  y : 'бир жыл',
23985
  yy : '%d жыл'
23986
  },
23987
- dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/,
23988
  ordinal : function (number) {
23989
  var a = number % 10,
23990
  b = number >= 100 ? 100 : null;
@@ -24002,7 +23351,7 @@ webpackJsonp([0],[
24002
 
24003
 
24004
  /***/ },
24005
- /* 354 */
24006
  /***/ function(module, exports, __webpack_require__) {
24007
 
24008
  //! moment.js locale configuration
@@ -24130,7 +23479,7 @@ webpackJsonp([0],[
24130
  y : processRelativeTime,
24131
  yy : '%d Joer'
24132
  },
24133
- dayOfMonthOrdinalParse: /\d{1,2}\./,
24134
  ordinal: '%d.',
24135
  week: {
24136
  dow: 1, // Monday is the first day of the week.
@@ -24144,7 +23493,7 @@ webpackJsonp([0],[
24144
 
24145
 
24146
  /***/ },
24147
- /* 355 */
24148
  /***/ function(module, exports, __webpack_require__) {
24149
 
24150
  //! moment.js locale configuration
@@ -24207,7 +23556,7 @@ webpackJsonp([0],[
24207
  y : '1 ປີ',
24208
  yy : '%d ປີ'
24209
  },
24210
- dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/,
24211
  ordinal : function (number) {
24212
  return 'ທີ່' + number;
24213
  }
@@ -24219,7 +23568,7 @@ webpackJsonp([0],[
24219
 
24220
 
24221
  /***/ },
24222
- /* 356 */
24223
  /***/ function(module, exports, __webpack_require__) {
24224
 
24225
  //! moment.js locale configuration
@@ -24325,7 +23674,7 @@ webpackJsonp([0],[
24325
  y : translateSingular,
24326
  yy : translate
24327
  },
24328
- dayOfMonthOrdinalParse: /\d{1,2}-oji/,
24329
  ordinal : function (number) {
24330
  return number + '-oji';
24331
  },
@@ -24341,7 +23690,7 @@ webpackJsonp([0],[
24341
 
24342
 
24343
  /***/ },
24344
- /* 357 */
24345
  /***/ function(module, exports, __webpack_require__) {
24346
 
24347
  //! moment.js locale configuration
@@ -24429,7 +23778,7 @@ webpackJsonp([0],[
24429
  y : relativeTimeWithSingular,
24430
  yy : relativeTimeWithPlural
24431
  },
24432
- dayOfMonthOrdinalParse: /\d{1,2}\./,
24433
  ordinal : '%d.',
24434
  week : {
24435
  dow : 1, // Monday is the first day of the week.
@@ -24443,7 +23792,7 @@ webpackJsonp([0],[
24443
 
24444
 
24445
  /***/ },
24446
- /* 358 */
24447
  /***/ function(module, exports, __webpack_require__) {
24448
 
24449
  //! moment.js locale configuration
@@ -24545,7 +23894,7 @@ webpackJsonp([0],[
24545
  y : 'godinu',
24546
  yy : translator.translate
24547
  },
24548
- dayOfMonthOrdinalParse: /\d{1,2}\./,
24549
  ordinal : '%d.',
24550
  week : {
24551
  dow : 1, // Monday is the first day of the week.
@@ -24559,7 +23908,7 @@ webpackJsonp([0],[
24559
 
24560
 
24561
  /***/ },
24562
- /* 359 */
24563
  /***/ function(module, exports, __webpack_require__) {
24564
 
24565
  //! moment.js locale configuration
@@ -24614,7 +23963,7 @@ webpackJsonp([0],[
24614
  y: 'he tau',
24615
  yy: '%d tau'
24616
  },
24617
- dayOfMonthOrdinalParse: /\d{1,2}º/,
24618
  ordinal: '%dº',
24619
  week : {
24620
  dow : 1, // Monday is the first day of the week.
@@ -24628,7 +23977,7 @@ webpackJsonp([0],[
24628
 
24629
 
24630
  /***/ },
24631
- /* 360 */
24632
  /***/ function(module, exports, __webpack_require__) {
24633
 
24634
  //! moment.js locale configuration
@@ -24691,7 +24040,7 @@ webpackJsonp([0],[
24691
  y : 'година',
24692
  yy : '%d години'
24693
  },
24694
- dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
24695
  ordinal : function (number) {
24696
  var lastDigit = number % 10,
24697
  last2Digits = number % 100;
@@ -24723,7 +24072,7 @@ webpackJsonp([0],[
24723
 
24724
 
24725
  /***/ },
24726
- /* 361 */
24727
  /***/ function(module, exports, __webpack_require__) {
24728
 
24729
  //! moment.js locale configuration
@@ -24809,7 +24158,7 @@ webpackJsonp([0],[
24809
 
24810
 
24811
  /***/ },
24812
- /* 362 */
24813
  /***/ function(module, exports, __webpack_require__) {
24814
 
24815
  //! moment.js locale configuration
@@ -24973,7 +24322,7 @@ webpackJsonp([0],[
24973
 
24974
 
24975
  /***/ },
24976
- /* 363 */
24977
  /***/ function(module, exports, __webpack_require__) {
24978
 
24979
  //! moment.js locale configuration
@@ -25060,7 +24409,7 @@ webpackJsonp([0],[
25060
 
25061
 
25062
  /***/ },
25063
- /* 364 */
25064
  /***/ function(module, exports, __webpack_require__) {
25065
 
25066
  //! moment.js locale configuration
@@ -25148,7 +24497,7 @@ webpackJsonp([0],[
25148
 
25149
 
25150
  /***/ },
25151
- /* 365 */
25152
  /***/ function(module, exports, __webpack_require__) {
25153
 
25154
  //! moment.js locale configuration
@@ -25249,7 +24598,7 @@ webpackJsonp([0],[
25249
 
25250
 
25251
  /***/ },
25252
- /* 366 */
25253
  /***/ function(module, exports, __webpack_require__) {
25254
 
25255
  //! moment.js locale configuration
@@ -25303,7 +24652,7 @@ webpackJsonp([0],[
25303
  y : 'ett år',
25304
  yy : '%d år'
25305
  },
25306
- dayOfMonthOrdinalParse: /\d{1,2}\./,
25307
  ordinal : '%d.',
25308
  week : {
25309
  dow : 1, // Monday is the first day of the week.
@@ -25317,7 +24666,7 @@ webpackJsonp([0],[
25317
 
25318
 
25319
  /***/ },
25320
- /* 367 */
25321
  /***/ function(module, exports, __webpack_require__) {
25322
 
25323
  //! moment.js locale configuration
@@ -25445,7 +24794,7 @@ webpackJsonp([0],[
25445
 
25446
 
25447
  /***/ },
25448
- /* 368 */
25449
  /***/ function(module, exports, __webpack_require__) {
25450
 
25451
  //! moment.js locale configuration
@@ -25469,9 +24818,7 @@ webpackJsonp([0],[
25469
  var nl = moment.defineLocale('nl', {
25470
  months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
25471
  monthsShort : function (m, format) {
25472
- if (!m) {
25473
- return monthsShortWithDots;
25474
- } else if (/-MMM-/.test(format)) {
25475
  return monthsShortWithoutDots[m.month()];
25476
  } else {
25477
  return monthsShortWithDots[m.month()];
@@ -25522,7 +24869,7 @@ webpackJsonp([0],[
25522
  y : 'één jaar',
25523
  yy : '%d jaar'
25524
  },
25525
- dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
25526
  ordinal : function (number) {
25527
  return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
25528
  },
@@ -25538,7 +24885,7 @@ webpackJsonp([0],[
25538
 
25539
 
25540
  /***/ },
25541
- /* 369 */
25542
  /***/ function(module, exports, __webpack_require__) {
25543
 
25544
  //! moment.js locale configuration
@@ -25562,9 +24909,7 @@ webpackJsonp([0],[
25562
  var nlBe = moment.defineLocale('nl-be', {
25563
  months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
25564
  monthsShort : function (m, format) {
25565
- if (!m) {
25566
- return monthsShortWithDots;
25567
- } else if (/-MMM-/.test(format)) {
25568
  return monthsShortWithoutDots[m.month()];
25569
  } else {
25570
  return monthsShortWithDots[m.month()];
@@ -25615,7 +24960,7 @@ webpackJsonp([0],[
25615
  y : 'één jaar',
25616
  yy : '%d jaar'
25617
  },
25618
- dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
25619
  ordinal : function (number) {
25620
  return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
25621
  },
@@ -25631,7 +24976,7 @@ webpackJsonp([0],[
25631
 
25632
 
25633
  /***/ },
25634
- /* 370 */
25635
  /***/ function(module, exports, __webpack_require__) {
25636
 
25637
  //! moment.js locale configuration
@@ -25682,7 +25027,7 @@ webpackJsonp([0],[
25682
  y : 'eit år',
25683
  yy : '%d år'
25684
  },
25685
- dayOfMonthOrdinalParse: /\d{1,2}\./,
25686
  ordinal : '%d.',
25687
  week : {
25688
  dow : 1, // Monday is the first day of the week.
@@ -25696,7 +25041,7 @@ webpackJsonp([0],[
25696
 
25697
 
25698
  /***/ },
25699
- /* 371 */
25700
  /***/ function(module, exports, __webpack_require__) {
25701
 
25702
  //! moment.js locale configuration
@@ -25825,7 +25170,7 @@ webpackJsonp([0],[
25825
 
25826
 
25827
  /***/ },
25828
- /* 372 */
25829
  /***/ function(module, exports, __webpack_require__) {
25830
 
25831
  //! moment.js locale configuration
@@ -25864,9 +25209,7 @@ webpackJsonp([0],[
25864
 
25865
  var pl = moment.defineLocale('pl', {
25866
  months : function (momentToFormat, format) {
25867
- if (!momentToFormat) {
25868
- return monthsNominative;
25869
- } else if (format === '') {
25870
  // Hack: if format empty we know this is used to generate
25871
  // RegExp by moment. Give then back both valid forms of months
25872
  // in RegExp ready format.
@@ -25923,7 +25266,7 @@ webpackJsonp([0],[
25923
  y : 'rok',
25924
  yy : translate
25925
  },
25926
- dayOfMonthOrdinalParse: /\d{1,2}\./,
25927
  ordinal : '%d.',
25928
  week : {
25929
  dow : 1, // Monday is the first day of the week.
@@ -25937,7 +25280,7 @@ webpackJsonp([0],[
25937
 
25938
 
25939
  /***/ },
25940
- /* 373 */
25941
  /***/ function(module, exports, __webpack_require__) {
25942
 
25943
  //! moment.js locale configuration
@@ -25956,7 +25299,7 @@ webpackJsonp([0],[
25956
  monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
25957
  weekdays : 'Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado'.split('_'),
25958
  weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
25959
- weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
25960
  weekdaysParseExact : true,
25961
  longDateFormat : {
25962
  LT : 'HH:mm',
@@ -25993,7 +25336,7 @@ webpackJsonp([0],[
25993
  y : 'um ano',
25994
  yy : '%d anos'
25995
  },
25996
- dayOfMonthOrdinalParse: /\d{1,2}º/,
25997
  ordinal : '%dº',
25998
  week : {
25999
  dow : 1, // Monday is the first day of the week.
@@ -26007,7 +25350,7 @@ webpackJsonp([0],[
26007
 
26008
 
26009
  /***/ },
26010
- /* 374 */
26011
  /***/ function(module, exports, __webpack_require__) {
26012
 
26013
  //! moment.js locale configuration
@@ -26026,7 +25369,7 @@ webpackJsonp([0],[
26026
  monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
26027
  weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),
26028
  weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
26029
- weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
26030
  weekdaysParseExact : true,
26031
  longDateFormat : {
26032
  LT : 'HH:mm',
@@ -26063,7 +25406,7 @@ webpackJsonp([0],[
26063
  y : 'um ano',
26064
  yy : '%d anos'
26065
  },
26066
- dayOfMonthOrdinalParse: /\d{1,2}º/,
26067
  ordinal : '%dº'
26068
  });
26069
 
@@ -26073,7 +25416,7 @@ webpackJsonp([0],[
26073
 
26074
 
26075
  /***/ },
26076
- /* 375 */
26077
  /***/ function(module, exports, __webpack_require__) {
26078
 
26079
  //! moment.js locale configuration
@@ -26153,7 +25496,7 @@ webpackJsonp([0],[
26153
 
26154
 
26155
  /***/ },
26156
- /* 376 */
26157
  /***/ function(module, exports, __webpack_require__) {
26158
 
26159
  //! moment.js locale configuration
@@ -26313,7 +25656,7 @@ webpackJsonp([0],[
26313
  return 'вечера';
26314
  }
26315
  },
26316
- dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
26317
  ordinal: function (number, period) {
26318
  switch (period) {
26319
  case 'M':
@@ -26341,110 +25684,7 @@ webpackJsonp([0],[
26341
 
26342
 
26343
  /***/ },
26344
- /* 377 */
26345
- /***/ function(module, exports, __webpack_require__) {
26346
-
26347
- //! moment.js locale configuration
26348
- //! locale : Sindhi [sd]
26349
- //! author : Narain Sagar : https://github.com/narainsagar
26350
-
26351
- ;(function (global, factory) {
26352
- true ? factory(__webpack_require__(290)) :
26353
- typeof define === 'function' && define.amd ? define(['../moment'], factory) :
26354
- factory(global.moment)
26355
- }(this, (function (moment) { 'use strict';
26356
-
26357
-
26358
- var months = [
26359
- 'جنوري',
26360
- 'فيبروري',
26361
- 'مارچ',
26362
- 'اپريل',
26363
- 'مئي',
26364
- 'جون',
26365
- 'جولاءِ',
26366
- 'آگسٽ',
26367
- 'سيپٽمبر',
26368
- 'آڪٽوبر',
26369
- 'نومبر',
26370
- 'ڊسمبر'
26371
- ];
26372
- var days = [
26373
- 'آچر',
26374
- 'سومر',
26375
- 'اڱارو',
26376
- 'اربع',
26377
- 'خميس',
26378
- 'جمع',
26379
- 'ڇنڇر'
26380
- ];
26381
-
26382
- var sd = moment.defineLocale('sd', {
26383
- months : months,
26384
- monthsShort : months,
26385
- weekdays : days,
26386
- weekdaysShort : days,
26387
- weekdaysMin : days,
26388
- longDateFormat : {
26389
- LT : 'HH:mm',
26390
- LTS : 'HH:mm:ss',
26391
- L : 'DD/MM/YYYY',
26392
- LL : 'D MMMM YYYY',
26393
- LLL : 'D MMMM YYYY HH:mm',
26394
- LLLL : 'dddd، D MMMM YYYY HH:mm'
26395
- },
26396
- meridiemParse: /صبح|شام/,
26397
- isPM : function (input) {
26398
- return 'شام' === input;
26399
- },
26400
- meridiem : function (hour, minute, isLower) {
26401
- if (hour < 12) {
26402
- return 'صبح';
26403
- }
26404
- return 'شام';
26405
- },
26406
- calendar : {
26407
- sameDay : '[اڄ] LT',
26408
- nextDay : '[سڀاڻي] LT',
26409
- nextWeek : 'dddd [اڳين هفتي تي] LT',
26410
- lastDay : '[ڪالهه] LT',
26411
- lastWeek : '[گزريل هفتي] dddd [تي] LT',
26412
- sameElse : 'L'
26413
- },
26414
- relativeTime : {
26415
- future : '%s پوء',
26416
- past : '%s اڳ',
26417
- s : 'چند سيڪنڊ',
26418
- m : 'هڪ منٽ',
26419
- mm : '%d منٽ',
26420
- h : 'هڪ ڪلاڪ',
26421
- hh : '%d ڪلاڪ',
26422
- d : 'هڪ ڏينهن',
26423
- dd : '%d ڏينهن',
26424
- M : 'هڪ مهينو',
26425
- MM : '%d مهينا',
26426
- y : 'هڪ سال',
26427
- yy : '%d سال'
26428
- },
26429
- preparse: function (string) {
26430
- return string.replace(/،/g, ',');
26431
- },
26432
- postformat: function (string) {
26433
- return string.replace(/,/g, '،');
26434
- },
26435
- week : {
26436
- dow : 1, // Monday is the first day of the week.
26437
- doy : 4 // The week that contains Jan 4th is the first week of the year.
26438
- }
26439
- });
26440
-
26441
- return sd;
26442
-
26443
- })));
26444
-
26445
-
26446
- /***/ },
26447
- /* 378 */
26448
  /***/ function(module, exports, __webpack_require__) {
26449
 
26450
  //! moment.js locale configuration
@@ -26496,7 +25736,7 @@ webpackJsonp([0],[
26496
  y : 'okta jahki',
26497
  yy : '%d jagit'
26498
  },
26499
- dayOfMonthOrdinalParse: /\d{1,2}\./,
26500
  ordinal : '%d.',
26501
  week : {
26502
  dow : 1, // Monday is the first day of the week.
@@ -26510,7 +25750,7 @@ webpackJsonp([0],[
26510
 
26511
 
26512
  /***/ },
26513
- /* 379 */
26514
  /***/ function(module, exports, __webpack_require__) {
26515
 
26516
  //! moment.js locale configuration
@@ -26563,7 +25803,7 @@ webpackJsonp([0],[
26563
  y : 'වසර',
26564
  yy : 'වසර %d'
26565
  },
26566
- dayOfMonthOrdinalParse: /\d{1,2} වැනි/,
26567
  ordinal : function (number) {
26568
  return number + ' වැනි';
26569
  },
@@ -26586,7 +25826,7 @@ webpackJsonp([0],[
26586
 
26587
 
26588
  /***/ },
26589
- /* 380 */
26590
  /***/ function(module, exports, __webpack_require__) {
26591
 
26592
  //! moment.js locale configuration
@@ -26727,7 +25967,7 @@ webpackJsonp([0],[
26727
  y : translate,
26728
  yy : translate
26729
  },
26730
- dayOfMonthOrdinalParse: /\d{1,2}\./,
26731
  ordinal : '%d.',
26732
  week : {
26733
  dow : 1, // Monday is the first day of the week.
@@ -26741,7 +25981,7 @@ webpackJsonp([0],[
26741
 
26742
 
26743
  /***/ },
26744
- /* 381 */
26745
  /***/ function(module, exports, __webpack_require__) {
26746
 
26747
  //! moment.js locale configuration
@@ -26894,7 +26134,7 @@ webpackJsonp([0],[
26894
  y : processRelativeTime,
26895
  yy : processRelativeTime
26896
  },
26897
- dayOfMonthOrdinalParse: /\d{1,2}\./,
26898
  ordinal : '%d.',
26899
  week : {
26900
  dow : 1, // Monday is the first day of the week.
@@ -26908,7 +26148,7 @@ webpackJsonp([0],[
26908
 
26909
 
26910
  /***/ },
26911
- /* 382 */
26912
  /***/ function(module, exports, __webpack_require__) {
26913
 
26914
  //! moment.js locale configuration
@@ -26969,7 +26209,7 @@ webpackJsonp([0],[
26969
  y : 'një vit',
26970
  yy : '%d vite'
26971
  },
26972
- dayOfMonthOrdinalParse: /\d{1,2}\./,
26973
  ordinal : '%d.',
26974
  week : {
26975
  dow : 1, // Monday is the first day of the week.
@@ -26983,7 +26223,7 @@ webpackJsonp([0],[
26983
 
26984
 
26985
  /***/ },
26986
- /* 383 */
26987
  /***/ function(module, exports, __webpack_require__) {
26988
 
26989
  //! moment.js locale configuration
@@ -27084,7 +26324,7 @@ webpackJsonp([0],[
27084
  y : 'godinu',
27085
  yy : translator.translate
27086
  },
27087
- dayOfMonthOrdinalParse: /\d{1,2}\./,
27088
  ordinal : '%d.',
27089
  week : {
27090
  dow : 1, // Monday is the first day of the week.
@@ -27098,7 +26338,7 @@ webpackJsonp([0],[
27098
 
27099
 
27100
  /***/ },
27101
- /* 384 */
27102
  /***/ function(module, exports, __webpack_require__) {
27103
 
27104
  //! moment.js locale configuration
@@ -27199,7 +26439,7 @@ webpackJsonp([0],[
27199
  y : 'годину',
27200
  yy : translator.translate
27201
  },
27202
- dayOfMonthOrdinalParse: /\d{1,2}\./,
27203
  ordinal : '%d.',
27204
  week : {
27205
  dow : 1, // Monday is the first day of the week.
@@ -27213,7 +26453,7 @@ webpackJsonp([0],[
27213
 
27214
 
27215
  /***/ },
27216
- /* 385 */
27217
  /***/ function(module, exports, __webpack_require__) {
27218
 
27219
  //! moment.js locale configuration
@@ -27293,7 +26533,7 @@ webpackJsonp([0],[
27293
  return hour + 12;
27294
  }
27295
  },
27296
- dayOfMonthOrdinalParse: /\d{1,2}/,
27297
  ordinal : '%d',
27298
  week : {
27299
  dow : 1, // Monday is the first day of the week.
@@ -27307,7 +26547,7 @@ webpackJsonp([0],[
27307
 
27308
 
27309
  /***/ },
27310
- /* 386 */
27311
  /***/ function(module, exports, __webpack_require__) {
27312
 
27313
  //! moment.js locale configuration
@@ -27360,7 +26600,7 @@ webpackJsonp([0],[
27360
  y : 'ett år',
27361
  yy : '%d år'
27362
  },
27363
- dayOfMonthOrdinalParse: /\d{1,2}(e|a)/,
27364
  ordinal : function (number) {
27365
  var b = number % 10,
27366
  output = (~~(number % 100 / 10) === 1) ? 'e' :
@@ -27381,7 +26621,7 @@ webpackJsonp([0],[
27381
 
27382
 
27383
  /***/ },
27384
- /* 387 */
27385
  /***/ function(module, exports, __webpack_require__) {
27386
 
27387
  //! moment.js locale configuration
@@ -27445,7 +26685,7 @@ webpackJsonp([0],[
27445
 
27446
 
27447
  /***/ },
27448
- /* 388 */
27449
  /***/ function(module, exports, __webpack_require__) {
27450
 
27451
  //! moment.js locale configuration
@@ -27521,7 +26761,7 @@ webpackJsonp([0],[
27521
  y : 'ஒரு வருடம்',
27522
  yy : '%d ஆண்டுகள்'
27523
  },
27524
- dayOfMonthOrdinalParse: /\d{1,2}வது/,
27525
  ordinal : function (number) {
27526
  return number + 'வது';
27527
  },
@@ -27580,7 +26820,7 @@ webpackJsonp([0],[
27580
 
27581
 
27582
  /***/ },
27583
- /* 389 */
27584
  /***/ function(module, exports, __webpack_require__) {
27585
 
27586
  //! moment.js locale configuration
@@ -27632,7 +26872,7 @@ webpackJsonp([0],[
27632
  y : 'ఒక సంవత్సరం',
27633
  yy : '%d సంవత్సరాలు'
27634
  },
27635
- dayOfMonthOrdinalParse : /\d{1,2}వ/,
27636
  ordinal : '%dవ',
27637
  meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,
27638
  meridiemHour : function (hour, meridiem) {
@@ -27674,7 +26914,7 @@ webpackJsonp([0],[
27674
 
27675
 
27676
  /***/ },
27677
- /* 390 */
27678
  /***/ function(module, exports, __webpack_require__) {
27679
 
27680
  //! moment.js locale configuration
@@ -27726,7 +26966,7 @@ webpackJsonp([0],[
27726
  y : 'tinan ida',
27727
  yy : 'tinan %d'
27728
  },
27729
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
27730
  ordinal : function (number) {
27731
  var b = number % 10,
27732
  output = (~~(number % 100 / 10) === 1) ? 'th' :
@@ -27747,7 +26987,7 @@ webpackJsonp([0],[
27747
 
27748
 
27749
  /***/ },
27750
- /* 391 */
27751
  /***/ function(module, exports, __webpack_require__) {
27752
 
27753
  //! moment.js locale configuration
@@ -27772,7 +27012,7 @@ webpackJsonp([0],[
27772
  longDateFormat : {
27773
  LT : 'H:mm',
27774
  LTS : 'H:mm:ss',
27775
- L : 'DD/MM/YYYY',
27776
  LL : 'D MMMM YYYY',
27777
  LLL : 'D MMMM YYYY เวลา H:mm',
27778
  LLLL : 'วันddddที่ D MMMM YYYY เวลา H:mm'
@@ -27819,7 +27059,7 @@ webpackJsonp([0],[
27819
 
27820
 
27821
  /***/ },
27822
- /* 392 */
27823
  /***/ function(module, exports, __webpack_require__) {
27824
 
27825
  //! moment.js locale configuration
@@ -27870,7 +27110,7 @@ webpackJsonp([0],[
27870
  y : 'isang taon',
27871
  yy : '%d taon'
27872
  },
27873
- dayOfMonthOrdinalParse: /\d{1,2}/,
27874
  ordinal : function (number) {
27875
  return number;
27876
  },
@@ -27886,7 +27126,7 @@ webpackJsonp([0],[
27886
 
27887
 
27888
  /***/ },
27889
- /* 393 */
27890
  /***/ function(module, exports, __webpack_require__) {
27891
 
27892
  //! moment.js locale configuration
@@ -27997,7 +27237,7 @@ webpackJsonp([0],[
27997
  y : 'wa’ DIS',
27998
  yy : translate
27999
  },
28000
- dayOfMonthOrdinalParse: /\d{1,2}\./,
28001
  ordinal : '%d.',
28002
  week : {
28003
  dow : 1, // Monday is the first day of the week.
@@ -28011,7 +27251,7 @@ webpackJsonp([0],[
28011
 
28012
 
28013
  /***/ },
28014
- /* 394 */
28015
  /***/ function(module, exports, __webpack_require__) {
28016
 
28017
  //! moment.js locale configuration
@@ -28084,7 +27324,7 @@ webpackJsonp([0],[
28084
  y : 'bir yıl',
28085
  yy : '%d yıl'
28086
  },
28087
- dayOfMonthOrdinalParse: /\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,
28088
  ordinal : function (number) {
28089
  if (number === 0) { // special case for zero
28090
  return number + '\'ıncı';
@@ -28106,7 +27346,7 @@ webpackJsonp([0],[
28106
 
28107
 
28108
  /***/ },
28109
- /* 395 */
28110
  /***/ function(module, exports, __webpack_require__) {
28111
 
28112
  //! moment.js locale configuration
@@ -28171,7 +27411,7 @@ webpackJsonp([0],[
28171
  y : processRelativeTime,
28172
  yy : processRelativeTime
28173
  },
28174
- dayOfMonthOrdinalParse: /\d{1,2}\./,
28175
  ordinal : '%d.',
28176
  week : {
28177
  dow : 1, // Monday is the first day of the week.
@@ -28202,7 +27442,7 @@ webpackJsonp([0],[
28202
 
28203
 
28204
  /***/ },
28205
- /* 396 */
28206
  /***/ function(module, exports, __webpack_require__) {
28207
 
28208
  //! moment.js locale configuration
@@ -28265,7 +27505,7 @@ webpackJsonp([0],[
28265
 
28266
 
28267
  /***/ },
28268
- /* 397 */
28269
  /***/ function(module, exports, __webpack_require__) {
28270
 
28271
  //! moment.js locale configuration
@@ -28328,7 +27568,7 @@ webpackJsonp([0],[
28328
 
28329
 
28330
  /***/ },
28331
- /* 398 */
28332
  /***/ function(module, exports, __webpack_require__) {
28333
 
28334
  //! moment.js locale configuration
@@ -28370,13 +27610,8 @@ webpackJsonp([0],[
28370
  'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),
28371
  'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),
28372
  'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')
28373
- };
28374
-
28375
- if (!m) {
28376
- return weekdays['nominative'];
28377
- }
28378
-
28379
- var nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ?
28380
  'accusative' :
28381
  ((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ?
28382
  'genitive' :
@@ -28457,7 +27692,7 @@ webpackJsonp([0],[
28457
  return 'вечора';
28458
  }
28459
  },
28460
- dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/,
28461
  ordinal: function (number, period) {
28462
  switch (period) {
28463
  case 'M':
@@ -28484,111 +27719,7 @@ webpackJsonp([0],[
28484
 
28485
 
28486
  /***/ },
28487
- /* 399 */
28488
- /***/ function(module, exports, __webpack_require__) {
28489
-
28490
- //! moment.js locale configuration
28491
- //! locale : Urdu [ur]
28492
- //! author : Sawood Alam : https://github.com/ibnesayeed
28493
- //! author : Zack : https://github.com/ZackVision
28494
-
28495
- ;(function (global, factory) {
28496
- true ? factory(__webpack_require__(290)) :
28497
- typeof define === 'function' && define.amd ? define(['../moment'], factory) :
28498
- factory(global.moment)
28499
- }(this, (function (moment) { 'use strict';
28500
-
28501
-
28502
- var months = [
28503
- 'جنوری',
28504
- 'فروری',
28505
- 'مارچ',
28506
- 'اپریل',
28507
- 'مئی',
28508
- 'جون',
28509
- 'جولائی',
28510
- 'اگست',
28511
- 'ستمبر',
28512
- 'اکتوبر',
28513
- 'نومبر',
28514
- 'دسمبر'
28515
- ];
28516
- var days = [
28517
- 'اتوار',
28518
- 'پیر',
28519
- 'منگل',
28520
- 'بدھ',
28521
- 'جمعرات',
28522
- 'جمعہ',
28523
- 'ہفتہ'
28524
- ];
28525
-
28526
- var ur = moment.defineLocale('ur', {
28527
- months : months,
28528
- monthsShort : months,
28529
- weekdays : days,
28530
- weekdaysShort : days,
28531
- weekdaysMin : days,
28532
- longDateFormat : {
28533
- LT : 'HH:mm',
28534
- LTS : 'HH:mm:ss',
28535
- L : 'DD/MM/YYYY',
28536
- LL : 'D MMMM YYYY',
28537
- LLL : 'D MMMM YYYY HH:mm',
28538
- LLLL : 'dddd، D MMMM YYYY HH:mm'
28539
- },
28540
- meridiemParse: /صبح|شام/,
28541
- isPM : function (input) {
28542
- return 'شام' === input;
28543
- },
28544
- meridiem : function (hour, minute, isLower) {
28545
- if (hour < 12) {
28546
- return 'صبح';
28547
- }
28548
- return 'شام';
28549
- },
28550
- calendar : {
28551
- sameDay : '[آج بوقت] LT',
28552
- nextDay : '[کل بوقت] LT',
28553
- nextWeek : 'dddd [بوقت] LT',
28554
- lastDay : '[گذشتہ روز بوقت] LT',
28555
- lastWeek : '[گذشتہ] dddd [بوقت] LT',
28556
- sameElse : 'L'
28557
- },
28558
- relativeTime : {
28559
- future : '%s بعد',
28560
- past : '%s قبل',
28561
- s : 'چند سیکنڈ',
28562
- m : 'ایک منٹ',
28563
- mm : '%d منٹ',
28564
- h : 'ایک گھنٹہ',
28565
- hh : '%d گھنٹے',
28566
- d : 'ایک دن',
28567
- dd : '%d دن',
28568
- M : 'ایک ماہ',
28569
- MM : '%d ماہ',
28570
- y : 'ایک سال',
28571
- yy : '%d سال'
28572
- },
28573
- preparse: function (string) {
28574
- return string.replace(/،/g, ',');
28575
- },
28576
- postformat: function (string) {
28577
- return string.replace(/,/g, '،');
28578
- },
28579
- week : {
28580
- dow : 1, // Monday is the first day of the week.
28581
- doy : 4 // The week that contains Jan 4th is the first week of the year.
28582
- }
28583
- });
28584
-
28585
- return ur;
28586
-
28587
- })));
28588
-
28589
-
28590
- /***/ },
28591
- /* 400 */
28592
  /***/ function(module, exports, __webpack_require__) {
28593
 
28594
  //! moment.js locale configuration
@@ -28651,70 +27782,7 @@ webpackJsonp([0],[
28651
 
28652
 
28653
  /***/ },
28654
- /* 401 */
28655
- /***/ function(module, exports, __webpack_require__) {
28656
-
28657
- //! moment.js locale configuration
28658
- //! locale : Uzbek Latin [uz-latn]
28659
- //! author : Rasulbek Mirzayev : github.com/Rasulbeeek
28660
-
28661
- ;(function (global, factory) {
28662
- true ? factory(__webpack_require__(290)) :
28663
- typeof define === 'function' && define.amd ? define(['../moment'], factory) :
28664
- factory(global.moment)
28665
- }(this, (function (moment) { 'use strict';
28666
-
28667
-
28668
- var uzLatn = moment.defineLocale('uz-latn', {
28669
- months : 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split('_'),
28670
- monthsShort : 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),
28671
- weekdays : 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split('_'),
28672
- weekdaysShort : 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),
28673
- weekdaysMin : 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),
28674
- longDateFormat : {
28675
- LT : 'HH:mm',
28676
- LTS : 'HH:mm:ss',
28677
- L : 'DD/MM/YYYY',
28678
- LL : 'D MMMM YYYY',
28679
- LLL : 'D MMMM YYYY HH:mm',
28680
- LLLL : 'D MMMM YYYY, dddd HH:mm'
28681
- },
28682
- calendar : {
28683
- sameDay : '[Bugun soat] LT [da]',
28684
- nextDay : '[Ertaga] LT [da]',
28685
- nextWeek : 'dddd [kuni soat] LT [da]',
28686
- lastDay : '[Kecha soat] LT [da]',
28687
- lastWeek : '[O\'tgan] dddd [kuni soat] LT [da]',
28688
- sameElse : 'L'
28689
- },
28690
- relativeTime : {
28691
- future : 'Yaqin %s ichida',
28692
- past : 'Bir necha %s oldin',
28693
- s : 'soniya',
28694
- m : 'bir daqiqa',
28695
- mm : '%d daqiqa',
28696
- h : 'bir soat',
28697
- hh : '%d soat',
28698
- d : 'bir kun',
28699
- dd : '%d kun',
28700
- M : 'bir oy',
28701
- MM : '%d oy',
28702
- y : 'bir yil',
28703
- yy : '%d yil'
28704
- },
28705
- week : {
28706
- dow : 1, // Monday is the first day of the week.
28707
- doy : 7 // The week that contains Jan 1st is the first week of the year.
28708
- }
28709
- });
28710
-
28711
- return uzLatn;
28712
-
28713
- })));
28714
-
28715
-
28716
- /***/ },
28717
- /* 402 */
28718
  /***/ function(module, exports, __webpack_require__) {
28719
 
28720
  //! moment.js locale configuration
@@ -28782,7 +27850,7 @@ webpackJsonp([0],[
28782
  y : 'một năm',
28783
  yy : '%d năm'
28784
  },
28785
- dayOfMonthOrdinalParse: /\d{1,2}/,
28786
  ordinal : function (number) {
28787
  return number;
28788
  },
@@ -28798,7 +27866,7 @@ webpackJsonp([0],[
28798
 
28799
 
28800
  /***/ },
28801
- /* 403 */
28802
  /***/ function(module, exports, __webpack_require__) {
28803
 
28804
  //! moment.js locale configuration
@@ -28850,7 +27918,7 @@ webpackJsonp([0],[
28850
  y : 'á ~ýéár',
28851
  yy : '%d ý~éárs'
28852
  },
28853
- dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
28854
  ordinal : function (number) {
28855
  var b = number % 10,
28856
  output = (~~(number % 100 / 10) === 1) ? 'th' :
@@ -28871,7 +27939,7 @@ webpackJsonp([0],[
28871
 
28872
 
28873
  /***/ },
28874
- /* 404 */
28875
  /***/ function(module, exports, __webpack_require__) {
28876
 
28877
  //! moment.js locale configuration
@@ -28922,7 +27990,7 @@ webpackJsonp([0],[
28922
  y : 'ọdún kan',
28923
  yy : 'ọdún %d'
28924
  },
28925
- dayOfMonthOrdinalParse : /ọjọ́\s\d{1,2}/,
28926
  ordinal : 'ọjọ́ %d',
28927
  week : {
28928
  dow : 1, // Monday is the first day of the week.
@@ -28936,7 +28004,7 @@ webpackJsonp([0],[
28936
 
28937
 
28938
  /***/ },
28939
- /* 405 */
28940
  /***/ function(module, exports, __webpack_require__) {
28941
 
28942
  //! moment.js locale configuration
@@ -28958,16 +28026,16 @@ webpackJsonp([0],[
28958
  weekdaysShort : '周日_周一_周二_周三_周四_周五_周六'.split('_'),
28959
  weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
28960
  longDateFormat : {
28961
- LT : 'HH:mm',
28962
- LTS : 'HH:mm:ss',
28963
- L : 'YYYY年MMMD日',
28964
  LL : 'YYYY年MMMD日',
28965
  LLL : 'YYYY年MMMD日Ah点mm分',
28966
  LLLL : 'YYYY年MMMD日ddddAh点mm分',
28967
- l : 'YYYY年MMMD日',
28968
  ll : 'YYYY年MMMD日',
28969
- lll : 'YYYY年MMMD日 HH:mm',
28970
- llll : 'YYYY年MMMD日dddd HH:mm'
28971
  },
28972
  meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
28973
  meridiemHour: function (hour, meridiem) {
@@ -29001,14 +28069,30 @@ webpackJsonp([0],[
29001
  }
29002
  },
29003
  calendar : {
29004
- sameDay : '[今天]LT',
29005
- nextDay : '[明天]LT',
29006
- nextWeek : '[下]ddddLT',
29007
- lastDay : '[昨天]LT',
29008
- lastWeek : '[]ddddLT',
29009
- sameElse : 'L'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29010
  },
29011
- dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
29012
  ordinal : function (number, period) {
29013
  switch (period) {
29014
  case 'd':
@@ -29052,7 +28136,7 @@ webpackJsonp([0],[
29052
 
29053
 
29054
  /***/ },
29055
- /* 406 */
29056
  /***/ function(module, exports, __webpack_require__) {
29057
 
29058
  //! moment.js locale configuration
@@ -29075,16 +28159,16 @@ webpackJsonp([0],[
29075
  weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),
29076
  weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
29077
  longDateFormat : {
29078
- LT : 'HH:mm',
29079
- LTS : 'HH:mm:ss',
29080
  L : 'YYYY年MMMD日',
29081
  LL : 'YYYY年MMMD日',
29082
- LLL : 'YYYY年MMMD日 HH:mm',
29083
- LLLL : 'YYYY年MMMD日dddd HH:mm',
29084
  l : 'YYYY年MMMD日',
29085
  ll : 'YYYY年MMMD日',
29086
- lll : 'YYYY年MMMD日 HH:mm',
29087
- llll : 'YYYY年MMMD日dddd HH:mm'
29088
  },
29089
  meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
29090
  meridiemHour : function (hour, meridiem) {
@@ -29123,7 +28207,7 @@ webpackJsonp([0],[
29123
  lastWeek : '[上]ddddLT',
29124
  sameElse : 'L'
29125
  },
29126
- dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
29127
  ordinal : function (number, period) {
29128
  switch (period) {
29129
  case 'd' :
@@ -29162,7 +28246,7 @@ webpackJsonp([0],[
29162
 
29163
 
29164
  /***/ },
29165
- /* 407 */
29166
  /***/ function(module, exports, __webpack_require__) {
29167
 
29168
  //! moment.js locale configuration
@@ -29184,16 +28268,16 @@ webpackJsonp([0],[
29184
  weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),
29185
  weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
29186
  longDateFormat : {
29187
- LT : 'HH:mm',
29188
- LTS : 'HH:mm:ss',
29189
  L : 'YYYY年MMMD日',
29190
  LL : 'YYYY年MMMD日',
29191
- LLL : 'YYYY年MMMD日 HH:mm',
29192
- LLLL : 'YYYY年MMMD日dddd HH:mm',
29193
  l : 'YYYY年MMMD日',
29194
  ll : 'YYYY年MMMD日',
29195
- lll : 'YYYY年MMMD日 HH:mm',
29196
- llll : 'YYYY年MMMD日dddd HH:mm'
29197
  },
29198
  meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
29199
  meridiemHour : function (hour, meridiem) {
@@ -29232,7 +28316,7 @@ webpackJsonp([0],[
29232
  lastWeek : '[上]ddddLT',
29233
  sameElse : 'L'
29234
  },
29235
- dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
29236
  ordinal : function (number, period) {
29237
  switch (period) {
29238
  case 'd' :
@@ -29271,13 +28355,13 @@ webpackJsonp([0],[
29271
 
29272
 
29273
  /***/ },
29274
- /* 408 */,
29275
- /* 409 */,
29276
- /* 410 */,
29277
- /* 411 */,
29278
- /* 412 */,
29279
- /* 413 */,
29280
- /* 414 */
29281
  /***/ function(module, exports, __webpack_require__) {
29282
 
29283
  'use strict';
@@ -29296,43 +28380,43 @@ webpackJsonp([0],[
29296
 
29297
  var _history = __webpack_require__(237);
29298
 
29299
- var _newslettersTypesJsx = __webpack_require__(415);
29300
 
29301
  var _newslettersTypesJsx2 = _interopRequireDefault(_newslettersTypesJsx);
29302
 
29303
- var _newslettersTemplatesJsx = __webpack_require__(417);
29304
 
29305
  var _newslettersTemplatesJsx2 = _interopRequireDefault(_newslettersTemplatesJsx);
29306
 
29307
- var _newslettersSendJsx = __webpack_require__(418);
29308
 
29309
  var _newslettersSendJsx2 = _interopRequireDefault(_newslettersSendJsx);
29310
 
29311
- var _newslettersTypesStandardJsx = __webpack_require__(427);
29312
 
29313
  var _newslettersTypesStandardJsx2 = _interopRequireDefault(_newslettersTypesStandardJsx);
29314
 
29315
- var _newslettersTypesWelcomeWelcomeJsx = __webpack_require__(428);
29316
 
29317
  var _newslettersTypesWelcomeWelcomeJsx2 = _interopRequireDefault(_newslettersTypesWelcomeWelcomeJsx);
29318
 
29319
- var _newslettersTypesNotificationNotificationJsx = __webpack_require__(429);
29320
 
29321
  var _newslettersTypesNotificationNotificationJsx2 = _interopRequireDefault(_newslettersTypesNotificationNotificationJsx);
29322
 
29323
- var _newslettersListingsStandardJsx = __webpack_require__(430);
29324
 
29325
  var _newslettersListingsStandardJsx2 = _interopRequireDefault(_newslettersListingsStandardJsx);
29326
 
29327
- var _newslettersListingsWelcomeJsx = __webpack_require__(433);
29328
 
29329
  var _newslettersListingsWelcomeJsx2 = _interopRequireDefault(_newslettersListingsWelcomeJsx);
29330
 
29331
- var _newslettersListingsNotificationJsx = __webpack_require__(434);
29332
 
29333
  var _newslettersListingsNotificationJsx2 = _interopRequireDefault(_newslettersListingsNotificationJsx);
29334
 
29335
- var _newslettersListingsNotification_historyJsx = __webpack_require__(435);
29336
 
29337
  var _newslettersListingsNotification_historyJsx2 = _interopRequireDefault(_newslettersListingsNotification_historyJsx);
29338
 
@@ -29374,12 +28458,12 @@ webpackJsonp([0],[
29374
  /* Listings */ /* Newsletter: type selection */ /* New newsletter: types */ /* Template selection */ /* Sending options */
29375
 
29376
  /***/ },
29377
- /* 415 */
29378
  /***/ function(module, exports, __webpack_require__) {
29379
 
29380
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
29381
 
29382
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(2), __webpack_require__(268), __webpack_require__(181), __webpack_require__(416)], __WEBPACK_AMD_DEFINE_RESULT__ = function (React, MailPoet, Router, Breadcrumb) {
29383
  var NewsletterTypes = React.createClass({
29384
  displayName: 'NewsletterTypes',
29385
 
@@ -29526,7 +28610,7 @@ webpackJsonp([0],[
29526
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
29527
 
29528
  /***/ },
29529
- /* 416 */
29530
  /***/ function(module, exports, __webpack_require__) {
29531
 
29532
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
@@ -29594,12 +28678,12 @@ webpackJsonp([0],[
29594
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
29595
 
29596
  /***/ },
29597
- /* 417 */
29598
  /***/ function(module, exports, __webpack_require__) {
29599
 
29600
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
29601
 
29602
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(2), __webpack_require__(271), __webpack_require__(268), __webpack_require__(181), __webpack_require__(269), __webpack_require__(416)], __WEBPACK_AMD_DEFINE_RESULT__ = function (React, _, MailPoet, Router, classNames, Breadcrumb) {
29603
 
29604
  var ImportTemplate = React.createClass({
29605
  displayName: 'ImportTemplate',
@@ -29866,14 +28950,14 @@ webpackJsonp([0],[
29866
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
29867
 
29868
  /***/ },
29869
- /* 418 */
29870
  /***/ function(module, exports, __webpack_require__) {
29871
 
29872
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
29873
 
29874
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
29875
 
29876
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(2), __webpack_require__(181), __webpack_require__(271), __webpack_require__(268), __webpack_require__(282), __webpack_require__(419), __webpack_require__(422), __webpack_require__(425), __webpack_require__(416)], __WEBPACK_AMD_DEFINE_RESULT__ = function (React, Router, _, MailPoet, Form, StandardNewsletterFields, NotificationNewsletterFields, WelcomeNewsletterFields, Breadcrumb) {
29877
 
29878
  var NewsletterSend = React.createClass({
29879
  displayName: 'NewsletterSend',
@@ -30112,7 +29196,7 @@ webpackJsonp([0],[
30112
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
30113
 
30114
  /***/ },
30115
- /* 419 */
30116
  /***/ function(module, exports, __webpack_require__) {
30117
 
30118
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
@@ -30121,7 +29205,7 @@ webpackJsonp([0],[
30121
 
30122
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
30123
 
30124
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(2), __webpack_require__(267), __webpack_require__(271), __webpack_require__(268), __webpack_require__(420), __webpack_require__(288), __webpack_require__(286), __webpack_require__(284)], __WEBPACK_AMD_DEFINE_RESULT__ = function (React, jQuery, _, MailPoet, Hooks, Checkbox, Select, Text) {
30125
 
30126
  var settings = window.mailpoet_settings || {},
30127
  currentTime = window.mailpoet_current_time || '00:00',
@@ -30490,14 +29574,14 @@ webpackJsonp([0],[
30490
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
30491
 
30492
  /***/ },
30493
- /* 420 */,
30494
- /* 421 */,
30495
- /* 422 */
30496
  /***/ function(module, exports, __webpack_require__) {
30497
 
30498
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
30499
 
30500
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(268), __webpack_require__(420), __webpack_require__(423), __webpack_require__(271)], __WEBPACK_AMD_DEFINE_RESULT__ = function (MailPoet, Hooks, Scheduling, _) {
30501
 
30502
  var settings = window.mailpoet_settings || {};
30503
 
@@ -30593,7 +29677,7 @@ webpackJsonp([0],[
30593
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
30594
 
30595
  /***/ },
30596
- /* 423 */
30597
  /***/ function(module, exports, __webpack_require__) {
30598
 
30599
  'use strict';
@@ -30612,7 +29696,7 @@ webpackJsonp([0],[
30612
 
30613
  var _formFieldsSelectJsx2 = _interopRequireDefault(_formFieldsSelectJsx);
30614
 
30615
- var _newslettersSchedulingCommonJsx = __webpack_require__(424);
30616
 
30617
  var intervalField = {
30618
  name: 'intervalType',
@@ -30726,7 +29810,7 @@ webpackJsonp([0],[
30726
  module.exports = NotificationScheduling;
30727
 
30728
  /***/ },
30729
- /* 424 */
30730
  /***/ function(module, exports, __webpack_require__) {
30731
 
30732
  'use strict';
@@ -30820,12 +29904,12 @@ webpackJsonp([0],[
30820
  exports.nthWeekDayValues = _nthWeekDayValues;
30821
 
30822
  /***/ },
30823
- /* 425 */
30824
  /***/ function(module, exports, __webpack_require__) {
30825
 
30826
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
30827
 
30828
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(268), __webpack_require__(420), __webpack_require__(426)], __WEBPACK_AMD_DEFINE_RESULT__ = function (MailPoet, Hooks, Scheduling) {
30829
 
30830
  var settings = window.mailpoet_settings || {};
30831
 
@@ -30894,7 +29978,7 @@ webpackJsonp([0],[
30894
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
30895
 
30896
  /***/ },
30897
- /* 426 */
30898
  /***/ function(module, exports, __webpack_require__) {
30899
 
30900
  'use strict';
@@ -30921,7 +30005,7 @@ webpackJsonp([0],[
30921
 
30922
  var _formFieldsTextJsx2 = _interopRequireDefault(_formFieldsTextJsx);
30923
 
30924
- var _newslettersSchedulingCommonJsx = __webpack_require__(424);
30925
 
30926
  var availableRoles = window.mailpoet_roles || {};
30927
  var availableSegments = _underscore2['default'].filter(window.mailpoet_segments || [], function (segment) {
@@ -31066,12 +30150,12 @@ webpackJsonp([0],[
31066
  module.exports = WelcomeScheduling;
31067
 
31068
  /***/ },
31069
- /* 427 */
31070
  /***/ function(module, exports, __webpack_require__) {
31071
 
31072
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
31073
 
31074
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(2), __webpack_require__(181), __webpack_require__(268), __webpack_require__(416)], __WEBPACK_AMD_DEFINE_RESULT__ = function (React, Router, MailPoet, Breadcrumb) {
31075
 
31076
  var NewsletterStandard = React.createClass({
31077
  displayName: 'NewsletterStandard',
@@ -31120,12 +30204,12 @@ webpackJsonp([0],[
31120
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
31121
 
31122
  /***/ },
31123
- /* 428 */
31124
  /***/ function(module, exports, __webpack_require__) {
31125
 
31126
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
31127
 
31128
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(271), __webpack_require__(2), __webpack_require__(181), __webpack_require__(268), __webpack_require__(426), __webpack_require__(416)], __WEBPACK_AMD_DEFINE_RESULT__ = function (_, React, Router, MailPoet, Scheduling, Breadcrumb) {
31129
 
31130
  var field = {
31131
  name: 'options',
@@ -31222,12 +30306,12 @@ webpackJsonp([0],[
31222
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
31223
 
31224
  /***/ },
31225
- /* 429 */
31226
  /***/ function(module, exports, __webpack_require__) {
31227
 
31228
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
31229
 
31230
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(271), __webpack_require__(2), __webpack_require__(181), __webpack_require__(268), __webpack_require__(423), __webpack_require__(416)], __WEBPACK_AMD_DEFINE_RESULT__ = function (_, React, Router, MailPoet, Scheduling, Breadcrumb) {
31231
 
31232
  var field = {
31233
  name: 'options',
@@ -31316,7 +30400,7 @@ webpackJsonp([0],[
31316
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
31317
 
31318
  /***/ },
31319
- /* 430 */
31320
  /***/ function(module, exports, __webpack_require__) {
31321
 
31322
  'use strict';
@@ -31345,11 +30429,11 @@ webpackJsonp([0],[
31345
 
31346
  var _listingListingJsx2 = _interopRequireDefault(_listingListingJsx);
31347
 
31348
- var _newslettersListingsTabsJsx = __webpack_require__(431);
31349
 
31350
  var _newslettersListingsTabsJsx2 = _interopRequireDefault(_newslettersListingsTabsJsx);
31351
 
31352
- var _newslettersListingsMixinsJsx = __webpack_require__(432);
31353
 
31354
  var mailpoet_tracking_enabled = !!window['mailpoet_tracking_enabled'];
31355
  var mailpoet_settings = window.mailpoet_settings || {};
@@ -31556,7 +30640,7 @@ webpackJsonp([0],[
31556
  module.exports = NewsletterListStandard;
31557
 
31558
  /***/ },
31559
- /* 431 */
31560
  /***/ function(module, exports, __webpack_require__) {
31561
 
31562
  'use strict';
@@ -31626,7 +30710,7 @@ webpackJsonp([0],[
31626
  module.exports = ListingTabs;
31627
 
31628
  /***/ },
31629
- /* 432 */
31630
  /***/ function(module, exports, __webpack_require__) {
31631
 
31632
  'use strict';
@@ -31645,7 +30729,7 @@ webpackJsonp([0],[
31645
 
31646
  var _reactDom2 = _interopRequireDefault(_reactDom);
31647
 
31648
- var _reactStringReplace = __webpack_require__(408);
31649
 
31650
  var _reactStringReplace2 = _interopRequireDefault(_reactStringReplace);
31651
 
@@ -31911,7 +30995,7 @@ webpackJsonp([0],[
31911
  exports.MailerMixin = _MailerMixin;
31912
 
31913
  /***/ },
31914
- /* 433 */
31915
  /***/ function(module, exports, __webpack_require__) {
31916
 
31917
  'use strict';
@@ -31930,11 +31014,11 @@ webpackJsonp([0],[
31930
 
31931
  var _listingListingJsx2 = _interopRequireDefault(_listingListingJsx);
31932
 
31933
- var _newslettersListingsTabsJsx = __webpack_require__(431);
31934
 
31935
  var _newslettersListingsTabsJsx2 = _interopRequireDefault(_newslettersListingsTabsJsx);
31936
 
31937
- var _newslettersListingsMixinsJsx = __webpack_require__(432);
31938
 
31939
  var _classnames = __webpack_require__(269);
31940
 
@@ -32310,7 +31394,7 @@ webpackJsonp([0],[
32310
  module.exports = NewsletterListWelcome;
32311
 
32312
  /***/ },
32313
- /* 434 */
32314
  /***/ function(module, exports, __webpack_require__) {
32315
 
32316
  'use strict';
@@ -32329,11 +31413,11 @@ webpackJsonp([0],[
32329
 
32330
  var _listingListingJsx2 = _interopRequireDefault(_listingListingJsx);
32331
 
32332
- var _newslettersListingsTabsJsx = __webpack_require__(431);
32333
 
32334
  var _newslettersListingsTabsJsx2 = _interopRequireDefault(_newslettersListingsTabsJsx);
32335
 
32336
- var _newslettersListingsMixinsJsx = __webpack_require__(432);
32337
 
32338
  var _classnames = __webpack_require__(269);
32339
 
@@ -32347,7 +31431,7 @@ webpackJsonp([0],[
32347
 
32348
  var _mailpoet2 = _interopRequireDefault(_mailpoet);
32349
 
32350
- var _newslettersSchedulingCommonJsx = __webpack_require__(424);
32351
 
32352
  var mailpoet_settings = window.mailpoet_settings || {};
32353
 
@@ -32662,7 +31746,7 @@ webpackJsonp([0],[
32662
  module.exports = NewsletterListNotification;
32663
 
32664
  /***/ },
32665
- /* 435 */
32666
  /***/ function(module, exports, __webpack_require__) {
32667
 
32668
  'use strict';
@@ -32691,11 +31775,11 @@ webpackJsonp([0],[
32691
 
32692
  var _listingListingJsx2 = _interopRequireDefault(_listingListingJsx);
32693
 
32694
- var _newslettersListingsTabsJsx = __webpack_require__(431);
32695
 
32696
  var _newslettersListingsTabsJsx2 = _interopRequireDefault(_newslettersListingsTabsJsx);
32697
 
32698
- var _newslettersListingsMixinsJsx = __webpack_require__(432);
32699
 
32700
  var mailpoet_tracking_enabled = !!window['mailpoet_tracking_enabled'];
32701
  var mailpoet_settings = window.mailpoet_settings || {};
@@ -32834,7 +31918,7 @@ webpackJsonp([0],[
32834
  module.exports = NewsletterListNotificationHistory;
32835
 
32836
  /***/ },
32837
- /* 436 */
32838
  /***/ function(module, exports, __webpack_require__) {
32839
 
32840
  'use strict';
@@ -32853,11 +31937,11 @@ webpackJsonp([0],[
32853
 
32854
  var _history = __webpack_require__(237);
32855
 
32856
- var _segmentsListJsx = __webpack_require__(437);
32857
 
32858
  var _segmentsListJsx2 = _interopRequireDefault(_segmentsListJsx);
32859
 
32860
- var _segmentsFormJsx = __webpack_require__(438);
32861
 
32862
  var _segmentsFormJsx2 = _interopRequireDefault(_segmentsFormJsx);
32863
 
@@ -32889,7 +31973,7 @@ webpackJsonp([0],[
32889
  }
32890
 
32891
  /***/ },
32892
- /* 437 */
32893
  /***/ function(module, exports, __webpack_require__) {
32894
 
32895
  'use strict';
@@ -33205,7 +32289,7 @@ webpackJsonp([0],[
33205
  module.exports = SegmentList;
33206
 
33207
  /***/ },
33208
- /* 438 */
33209
  /***/ function(module, exports, __webpack_require__) {
33210
 
33211
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
@@ -33265,7 +32349,7 @@ webpackJsonp([0],[
33265
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
33266
 
33267
  /***/ },
33268
- /* 439 */
33269
  /***/ function(module, exports, __webpack_require__) {
33270
 
33271
  'use strict';
@@ -33284,7 +32368,7 @@ webpackJsonp([0],[
33284
 
33285
  var _history = __webpack_require__(237);
33286
 
33287
- var _formsListJsx = __webpack_require__(440);
33288
 
33289
  var _formsListJsx2 = _interopRequireDefault(_formsListJsx);
33290
 
@@ -33314,7 +32398,7 @@ webpackJsonp([0],[
33314
  }
33315
 
33316
  /***/ },
33317
- /* 440 */
33318
  /***/ function(module, exports, __webpack_require__) {
33319
 
33320
  'use strict';
@@ -33545,11 +32629,11 @@ webpackJsonp([0],[
33545
  module.exports = FormList;
33546
 
33547
  /***/ },
33548
- /* 441 */
33549
  /***/ function(module, exports, __webpack_require__) {
33550
 
33551
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
33552
- __webpack_require__(442),
33553
  __webpack_require__(267),
33554
  __webpack_require__(268)
33555
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(
@@ -33626,14 +32710,14 @@ webpackJsonp([0],[
33626
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
33627
 
33628
  /***/ },
33629
- /* 442 */
33630
  /***/ function(module, exports, __webpack_require__) {
33631
 
33632
- /* WEBPACK VAR INJECTION */(function(global) {module.exports = global["Backbone"] = __webpack_require__(443);
33633
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
33634
 
33635
  /***/ },
33636
- /* 443 */
33637
  /***/ function(module, exports, __webpack_require__) {
33638
 
33639
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(global) {// Backbone.js 1.3.3
@@ -35560,17 +34644,17 @@ webpackJsonp([0],[
35560
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
35561
 
35562
  /***/ },
35563
- /* 444 */
35564
  /***/ function(module, exports, __webpack_require__) {
35565
 
35566
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
35567
- __webpack_require__(442),
35568
  __webpack_require__(271),
35569
  __webpack_require__(267),
35570
  __webpack_require__(268),
35571
- __webpack_require__(445),
35572
- __webpack_require__(446),
35573
- __webpack_require__(447),
35574
  __webpack_require__(290),
35575
  __webpack_require__(280)
35576
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function (
@@ -36674,8 +35758,8 @@ webpackJsonp([0],[
36674
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
36675
 
36676
  /***/ },
36677
- /* 445 */,
36678
- /* 446 */
36679
  /***/ function(module, exports) {
36680
 
36681
  /*!
@@ -36686,7 +35770,7 @@ webpackJsonp([0],[
36686
  !function(e){"use strict";function t(t,r){if(r=r||{},r.worker&&w.WORKERS_SUPPORTED){var n=h();return n.userStep=r.step,n.userChunk=r.chunk,n.userComplete=r.complete,n.userError=r.error,r.step=m(r.step),r.chunk=m(r.chunk),r.complete=m(r.complete),r.error=m(r.error),delete r.worker,void n.postMessage({input:t,config:r,workerId:n.id})}var o=null;return"string"==typeof t?o=r.download?new i(r):new a(r):(e.File&&t instanceof File||t instanceof Object)&&(o=new s(r)),o.stream(t)}function r(e,t){function r(){"object"==typeof t&&("string"==typeof t.delimiter&&1==t.delimiter.length&&-1==w.BAD_DELIMITERS.indexOf(t.delimiter)&&(u=t.delimiter),("boolean"==typeof t.quotes||t.quotes instanceof Array)&&(o=t.quotes),"string"==typeof t.newline&&(f=t.newline))}function n(e){if("object"!=typeof e)return[];var t=[];for(var r in e)t.push(r);return t}function i(e,t){var r="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var n=e instanceof Array&&e.length>0,i=!(t[0]instanceof Array);if(n){for(var a=0;a<e.length;a++)a>0&&(r+=u),r+=s(e[a],a);t.length>0&&(r+=f)}for(var o=0;o<t.length;o++){for(var h=n?e.length:t[o].length,d=0;h>d;d++){d>0&&(r+=u);var c=n&&i?e[d]:d;r+=s(t[o][c],d)}o<t.length-1&&(r+=f)}return r}function s(e,t){if("undefined"==typeof e||null===e)return"";e=e.toString().replace(/"/g,'""');var r="boolean"==typeof o&&o||o instanceof Array&&o[t]||a(e,w.BAD_DELIMITERS)||e.indexOf(u)>-1||" "==e.charAt(0)||" "==e.charAt(e.length-1);return r?'"'+e+'"':e}function a(e,t){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>-1)return!0;return!1}var o=!1,u=",",f="\r\n";if(r(),"string"==typeof e&&(e=JSON.parse(e)),e instanceof Array){if(!e.length||e[0]instanceof Array)return i(null,e);if("object"==typeof e[0])return i(n(e[0]),e)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),e.data instanceof Array&&(e.fields||(e.fields=e.data[0]instanceof Array?e.fields:n(e.data[0])),e.data[0]instanceof Array||"object"==typeof e.data[0]||(e.data=[e.data])),i(e.fields||[],e.data||[]);throw"exception: Unable to serialize unrecognized input"}function n(t){function r(e){var t=_(e);t.chunkSize=parseInt(t.chunkSize),this._handle=new o(t),this._handle.streamer=this,this._config=t}this._handle=null,this._paused=!1,this._finished=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this._completeResults={data:[],errors:[],meta:{}},r.call(this,t),this.parseChunk=function(t){var r=this._partialLine+t;this._partialLine="";var n=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var i=n.meta.cursor;this._finished||(this._partialLine=r.substring(i-this._baseIndex),this._baseIndex=i),n&&n.data&&(this._rowCount+=n.data.length);var s=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(k)e.postMessage({results:n,workerId:w.WORKER_ID,finished:s});else if(m(this._config.chunk)){if(this._config.chunk(n,this._handle),this._paused)return;n=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(n.data),this._completeResults.errors=this._completeResults.errors.concat(n.errors),this._completeResults.meta=n.meta),!s||!m(this._config.complete)||n&&n.meta.aborted||this._config.complete(this._completeResults),s||n&&n.meta.paused||this._nextChunk(),n}},this._sendError=function(t){m(this._config.error)?this._config.error(t):k&&this._config.error&&e.postMessage({workerId:w.WORKER_ID,error:t,finished:!1})}}function i(e){function t(e){var t=e.getResponseHeader("Content-Range");return parseInt(t.substr(t.lastIndexOf("/")+1))}e=e||{},e.chunkSize||(e.chunkSize=w.RemoteChunkSize),n.call(this,e);var r;this._nextChunk=k?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)return void this._chunkLoaded();if(r=new XMLHttpRequest,k||(r.onload=g(this._chunkLoaded,this),r.onerror=g(this._chunkError,this)),r.open("GET",this._input,!k),this._config.chunkSize){var e=this._start+this._config.chunkSize-1;r.setRequestHeader("Range","bytes="+this._start+"-"+e),r.setRequestHeader("If-None-Match","webkit-no-cache")}try{r.send()}catch(t){this._chunkError(t.message)}k&&0==r.status?this._chunkError():this._start+=this._config.chunkSize},this._chunkLoaded=function(){if(4==r.readyState){if(r.status<200||r.status>=400)return void this._chunkError();this._finished=!this._config.chunkSize||this._start>t(r),this.parseChunk(r.responseText)}},this._chunkError=function(e){var t=r.statusText||e;this._sendError(t)}}function s(e){e=e||{},e.chunkSize||(e.chunkSize=w.LocalChunkSize),n.call(this,e);var t,r,i="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,r=e.slice||e.webkitSlice||e.mozSlice,i?(t=new FileReader,t.onload=g(this._chunkLoaded,this),t.onerror=g(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var n=Math.min(this._start+this._config.chunkSize,this._input.size);e=r.call(e,this._start,n)}var s=t.readAsText(e,this._config.encoding);i||this._chunkLoaded({target:{result:s}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function a(e){e=e||{},n.call(this,e);var t,r;this.stream=function(e){return t=e,r=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e=this._config.chunkSize,t=e?r.substr(0,e):r;return r=e?r.substr(e):"",this._finished=!r,this.parseChunk(t)}}}function o(e){function t(){if(b&&c&&(f("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+w.DefaultDelimiter+"'"),c=!1),e.skipEmptyLines)for(var t=0;t<b.data.length;t++)1==b.data[t].length&&""==b.data[t][0]&&b.data.splice(t--,1);return r()&&n(),i()}function r(){return e.header&&0==y.length}function n(){if(b){for(var e=0;r()&&e<b.data.length;e++)for(var t=0;t<b.data[e].length;t++)y.push(b.data[e][t]);b.data.splice(0,1)}}function i(){if(!b||!e.header&&!e.dynamicTyping)return b;for(var t=0;t<b.data.length;t++){for(var r={},n=0;n<b.data[t].length;n++){if(e.dynamicTyping){var i=b.data[t][n];b.data[t][n]="true"==i||"TRUE"==i?!0:"false"==i||"FALSE"==i?!1:o(i)}e.header&&(n>=y.length?(r.__parsed_extra||(r.__parsed_extra=[]),r.__parsed_extra.push(b.data[t][n])):r[y[n]]=b.data[t][n])}e.header&&(b.data[t]=r,n>y.length?f("FieldMismatch","TooManyFields","Too many fields: expected "+y.length+" fields but parsed "+n,t):n<y.length&&f("FieldMismatch","TooFewFields","Too few fields: expected "+y.length+" fields but parsed "+n,t))}return e.header&&b.meta&&(b.meta.fields=y),b}function s(t){for(var r,n,i,s=[","," ","|",";",w.RECORD_SEP,w.UNIT_SEP],a=0;a<s.length;a++){var o=s[a],f=0,h=0;i=void 0;for(var d=new u({delimiter:o,preview:10}).parse(t),c=0;c<d.data.length;c++){var l=d.data[c].length;h+=l,"undefined"!=typeof i?l>1&&(f+=Math.abs(l-i),i=l):i=l}h/=d.data.length,("undefined"==typeof n||n>f)&&h>1.99&&(n=f,r=o)}return e.delimiter=r,{successful:!!r,bestDelimiter:r}}function a(e){e=e.substr(0,1048576);var t=e.split("\r");if(1==t.length)return"\n";for(var r=0,n=0;n<t.length;n++)"\n"==t[n][0]&&r++;return r>=t.length/2?"\r\n":"\r"}function o(e){var t=l.test(e);return t?parseFloat(e):e}function f(e,t,r,n){b.errors.push({type:e,code:t,message:r,row:n})}var h,d,c,l=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,p=this,g=0,v=!1,k=!1,y=[],b={data:[],errors:[],meta:{}};if(m(e.step)){var R=e.step;e.step=function(n){if(b=n,r())t();else{if(t(),0==b.data.length)return;g+=n.data.length,e.preview&&g>e.preview?d.abort():R(b,p)}}}this.parse=function(r,n,i){if(e.newline||(e.newline=a(r)),c=!1,!e.delimiter){var o=s(r);o.successful?e.delimiter=o.bestDelimiter:(c=!0,e.delimiter=w.DefaultDelimiter),b.meta.delimiter=e.delimiter}var f=_(e);return e.preview&&e.header&&f.preview++,h=r,d=new u(f),b=d.parse(h,n,i),t(),v?{meta:{paused:!0}}:b||{meta:{paused:!1}}},this.paused=function(){return v},this.pause=function(){v=!0,d.abort(),h=h.substr(d.getCharIndex())},this.resume=function(){v=!1,p.streamer.parseChunk(h)},this.aborted=function(){return k},this.abort=function(){k=!0,d.abort(),b.meta.aborted=!0,m(e.complete)&&e.complete(b),h=""}}function u(e){e=e||{};var t=e.delimiter,r=e.newline,n=e.comments,i=e.step,s=e.preview,a=e.fastMode;if(("string"!=typeof t||w.BAD_DELIMITERS.indexOf(t)>-1)&&(t=","),n===t)throw"Comment character same as delimiter";n===!0?n="#":("string"!=typeof n||w.BAD_DELIMITERS.indexOf(n)>-1)&&(n=!1),"\n"!=r&&"\r"!=r&&"\r\n"!=r&&(r="\n");var o=0,u=!1;this.parse=function(e,f,h){function d(e){b.push(e),S=o}function c(t){return h?p():(t||(t=e.substr(o)),w.push(t),o=g,d(w),y&&_(),p())}function l(t){o=t,d(w),w=[],O=e.indexOf(r,o)}function p(e){return{data:b,errors:R,meta:{delimiter:t,linebreak:r,aborted:u,truncated:!!e,cursor:S+(f||0)}}}function _(){i(p()),b=[],R=[]}if("string"!=typeof e)throw"Input must be a string";var g=e.length,m=t.length,v=r.length,k=n.length,y="function"==typeof i;o=0;var b=[],R=[],w=[],S=0;if(!e)return p();if(a||a!==!1&&-1===e.indexOf('"')){for(var E=e.split(r),C=0;C<E.length;C++){var w=E[C];if(o+=w.length,C!==E.length-1)o+=r.length;else if(h)return p();if(!n||w.substr(0,k)!=n){if(y){if(b=[],d(w.split(t)),_(),u)return p()}else d(w.split(t));if(s&&C>=s)return b=b.slice(0,s),p(!0)}}return p()}for(var x=e.indexOf(t,o),O=e.indexOf(r,o);;)if('"'!=e[o])if(n&&0===w.length&&e.substr(o,k)===n){if(-1==O)return p();o=O+v,O=e.indexOf(r,o),x=e.indexOf(t,o)}else if(-1!==x&&(O>x||-1===O))w.push(e.substring(o,x)),o=x+m,x=e.indexOf(t,o);else{if(-1===O)break;if(w.push(e.substring(o,O)),l(O+v),y&&(_(),u))return p();if(s&&b.length>=s)return p(!0)}else{var I=o;for(o++;;){var I=e.indexOf('"',I+1);if(-1===I)return h||R.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:o}),c();if(I===g-1){var D=e.substring(o,I).replace(/""/g,'"');return c(D)}if('"'!=e[I+1]){if(e[I+1]==t){w.push(e.substring(o,I).replace(/""/g,'"')),o=I+1+m,x=e.indexOf(t,o),O=e.indexOf(r,o);break}if(e.substr(I+1,v)===r){if(w.push(e.substring(o,I).replace(/""/g,'"')),l(I+1+v),x=e.indexOf(t,o),y&&(_(),u))return p();if(s&&b.length>=s)return p(!0);break}}else I++}}return c()},this.abort=function(){u=!0},this.getCharIndex=function(){return o}}function f(){var e=document.getElementsByTagName("script");return e.length?e[e.length-1].src:""}function h(){if(!w.WORKERS_SUPPORTED)return!1;if(!y&&null===w.SCRIPT_PATH)throw new Error("Script path cannot be determined automatically when Papa Parse is loaded asynchronously. You need to set Papa.SCRIPT_PATH manually.");var t=new e.Worker(w.SCRIPT_PATH||v);return t.onmessage=d,t.id=R++,b[t.id]=t,t}function d(e){var t=e.data,r=b[t.workerId],n=!1;if(t.error)r.userError(t.error,t.file);else if(t.results&&t.results.data){var i=function(){n=!0,c(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},s={abort:i,pause:l,resume:l};if(m(r.userStep)){for(var a=0;a<t.results.data.length&&(r.userStep({data:[t.results.data[a]],errors:t.results.errors,meta:t.results.meta},s),!n);a++);delete t.results}else m(r.userChunk)&&(r.userChunk(t.results,s,t.file),delete t.results)}t.finished&&!n&&c(t.workerId,t.results)}function c(e,t){var r=b[e];m(r.userComplete)&&r.userComplete(t),r.terminate(),delete b[e]}function l(){throw"Not implemented."}function p(t){var r=t.data;if("undefined"==typeof w.WORKER_ID&&r&&(w.WORKER_ID=r.workerId),"string"==typeof r.input)e.postMessage({workerId:w.WORKER_ID,results:w.parse(r.input,r.config),finished:!0});else if(e.File&&r.input instanceof File||r.input instanceof Object){var n=w.parse(r.input,r.config);n&&e.postMessage({workerId:w.WORKER_ID,results:n,finished:!0})}}function _(e){if("object"!=typeof e)return e;var t=e instanceof Array?[]:{};for(var r in e)t[r]=_(e[r]);return t}function g(e,t){return function(){e.apply(t,arguments)}}function m(e){return"function"==typeof e}var v,k=!e.document&&!!e.postMessage,y=!1,b={},R=0,w={};if(w.parse=t,w.unparse=r,w.RECORD_SEP=String.fromCharCode(30),w.UNIT_SEP=String.fromCharCode(31),w.BYTE_ORDER_MARK="",w.BAD_DELIMITERS=["\r","\n",'"',w.BYTE_ORDER_MARK],w.WORKERS_SUPPORTED=!!e.Worker,w.SCRIPT_PATH=null,w.LocalChunkSize=10485760,w.RemoteChunkSize=5242880,w.DefaultDelimiter=",",w.Parser=u,w.ParserHandle=o,w.NetworkStreamer=i,w.FileStreamer=s,w.StringStreamer=a,"undefined"!=typeof module&&module.exports?module.exports=w:m(e.define)&&e.define.amd?e.define(function(){return w}):e.Papa=w,e.jQuery){var S=e.jQuery;S.fn.parse=function(t){function r(){if(0==a.length)return void(m(t.complete)&&t.complete());var e=a[0];if(m(t.before)){var r=t.before(e.file,e.inputElem);if("object"==typeof r){if("abort"==r.action)return void n("AbortError",e.file,e.inputElem,r.reason);if("skip"==r.action)return void i();"object"==typeof r.config&&(e.instanceConfig=S.extend(e.instanceConfig,r.config))}else if("skip"==r)return void i()}var s=e.instanceConfig.complete;e.instanceConfig.complete=function(t){m(s)&&s(t,e.file,e.inputElem),i()},w.parse(e.file,e.instanceConfig)}function n(e,r,n,i){m(t.error)&&t.error({name:e},r,n,i)}function i(){a.splice(0,1),r()}var s=t.config||{},a=[];return this.each(function(){var t="INPUT"==S(this).prop("tagName").toUpperCase()&&"file"==S(this).attr("type").toLowerCase()&&e.FileReader;if(!t||!this.files||0==this.files.length)return!0;for(var r=0;r<this.files.length;r++)a.push({file:this.files[r],inputElem:this,instanceConfig:S.extend({},s)})}),r(),this}}k?e.onmessage=p:w.WORKERS_SUPPORTED&&(v=f(),document.body?document.addEventListener("DOMContentLoaded",function(){y=!0},!0):y=!0),i.prototype=Object.create(n.prototype),i.prototype.constructor=i,s.prototype=Object.create(n.prototype),s.prototype.constructor=s,a.prototype=Object.create(a.prototype),a.prototype.constructor=a}("undefined"!=typeof window?window:this);
36687
 
36688
  /***/ },
36689
- /* 447 */
36690
  /***/ function(module, exports) {
36691
 
36692
  /*
@@ -36771,14 +35855,14 @@ webpackJsonp([0],[
36771
 
36772
 
36773
  /***/ },
36774
- /* 448 */
36775
  /***/ function(module, exports, __webpack_require__) {
36776
 
36777
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
36778
  __webpack_require__(271),
36779
  __webpack_require__(267),
36780
  __webpack_require__(268),
36781
- __webpack_require__(445),
36782
  __webpack_require__(280)
36783
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function (
36784
  _,
@@ -36944,7 +36028,7 @@ webpackJsonp([0],[
36944
 
36945
 
36946
  /***/ },
36947
- /* 449 */
36948
  /***/ function(module, exports, __webpack_require__) {
36949
 
36950
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function() {
3
  /***/ function(module, exports, __webpack_require__) {
4
 
5
  __webpack_require__(1);
6
+ __webpack_require__(407);
7
+ __webpack_require__(429);
8
+ __webpack_require__(432);
9
+ __webpack_require__(434);
10
+ __webpack_require__(437);
11
  __webpack_require__(441);
12
+ module.exports = __webpack_require__(442);
 
 
13
 
14
 
15
  /***/ },
12332
 
12333
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
12334
 
12335
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(2), __webpack_require__(181), __webpack_require__(268), __webpack_require__(282), __webpack_require__(401)], __WEBPACK_AMD_DEFINE_RESULT__ = function (React, Router, MailPoet, Form, ReactStringReplace) {
12336
  var fields = [{
12337
  name: 'email',
12338
  label: MailPoet.I18n.t('email'),
13474
  /***/ function(module, exports, __webpack_require__) {
13475
 
13476
  /* WEBPACK VAR INJECTION */(function(module) {//! moment.js
13477
+ //! version : 2.17.1
13478
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
13479
  //! license : MIT
13480
  //! momentjs.com
13516
  return true;
13517
  }
13518
 
 
 
 
 
13519
  function isNumber(input) {
13520
  return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';
13521
  }
13572
  userInvalidated : false,
13573
  iso : false,
13574
  parsedDateParts : [],
13575
+ meridiem : null
 
 
13576
  };
13577
  }
13578
 
13648
  return m;
13649
  }
13650
 
13651
+ function isUndefined(input) {
13652
+ return input === void 0;
13653
+ }
13654
+
13655
  // Plugins that add properties should also add the key here (null value),
13656
  // so we can properly clone ourselves.
13657
  var momentProperties = hooks.momentProperties = [];
13691
  }
13692
 
13693
  if (momentProperties.length > 0) {
13694
+ for (i in momentProperties) {
13695
  prop = momentProperties[i];
13696
  val = from[prop];
13697
  if (!isUndefined(val)) {
13828
  }
13829
  this._config = config;
13830
  // Lenient ordinal parsing accepts just a number in addition to
13831
+ // number + (possibly) stuff coming from _ordinalParseLenient.
13832
+ this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\d{1,2}/).source);
 
 
 
13833
  }
13834
 
13835
  function mergeConfigs(parentConfig, childConfig) {
13927
  }
13928
 
13929
  var defaultOrdinal = '%d';
13930
+ var defaultOrdinalParse = /\d{1,2}/;
13931
 
13932
  function ordinal (number) {
13933
  return this._ordinal.replace('%d', number);
13937
  future : 'in %s',
13938
  past : '%s ago',
13939
  s : 'a few seconds',
 
13940
  m : 'a minute',
13941
  mm : '%d minutes',
13942
  h : 'an hour',
14119
  return function (mom) {
14120
  var output = '', i;
14121
  for (i = 0; i < length; i++) {
14122
+ output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];
14123
  }
14124
  return output;
14125
  };
14322
  var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
14323
  function localeMonths (m, format) {
14324
  if (!m) {
14325
+ return this._months;
 
14326
  }
14327
  return isArray(this._months) ? this._months[m.month()] :
14328
  this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];
14331
  var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
14332
  function localeMonthsShort (m, format) {
14333
  if (!m) {
14334
+ return this._monthsShort;
 
14335
  }
14336
  return isArray(this._monthsShort) ? this._monthsShort[m.month()] :
14337
  this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
14598
  }
14599
 
14600
  function createDate (y, m, d, h, M, s, ms) {
14601
+ //can't just apply() to create a date:
14602
+ //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply
14603
  var date = new Date(y, m, d, h, M, s, ms);
14604
 
14605
+ //the date constructor remaps years 0-99 to 1900-1999
14606
  if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
14607
  date.setFullYear(y);
14608
  }
14612
  function createUTCDate (y) {
14613
  var date = new Date(Date.UTC.apply(null, arguments));
14614
 
14615
+ //the Date.UTC function remaps years 0-99 to 1900-1999
14616
  if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
14617
  date.setUTCFullYear(y);
14618
  }
14629
  return -fwdlw + fwd - 1;
14630
  }
14631
 
14632
+ //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
14633
  function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
14634
  var localWeekday = (7 + weekday - dow) % 7,
14635
  weekOffset = firstWeekOffset(year, dow, doy),
14830
  var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
14831
  function localeWeekdays (m, format) {
14832
  if (!m) {
14833
+ return this._weekdays;
 
14834
  }
14835
  return isArray(this._weekdays) ? this._weekdays[m.day()] :
14836
  this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];
15150
  addRegexToken('A', matchMeridiem);
15151
  addRegexToken('H', match1to2);
15152
  addRegexToken('h', match1to2);
 
15153
  addRegexToken('HH', match1to2, match2);
15154
  addRegexToken('hh', match1to2, match2);
 
15155
 
15156
  addRegexToken('hmm', match3to4);
15157
  addRegexToken('hmmss', match5to6);
15159
  addRegexToken('Hmmss', match5to6);
15160
 
15161
  addParseToken(['H', 'HH'], HOUR);
 
 
 
 
15162
  addParseToken(['a', 'A'], function (input, array, config) {
15163
  config._isPm = config._locale.isPM(input);
15164
  config._meridiem = input;
15229
  longDateFormat: defaultLongDateFormat,
15230
  invalidDate: defaultInvalidDate,
15231
  ordinal: defaultOrdinal,
15232
+ ordinalParse: defaultOrdinalParse,
15233
  relativeTime: defaultRelativeTime,
15234
 
15235
  months: defaultLocaleMonths,
15540
  }
15541
  }
15542
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15543
  // date from iso format or fallback
15544
  function configFromString(config) {
15545
  var matched = aspNetJsonRegex.exec(config._i);
15552
  configFromISO(config);
15553
  if (config._isValid === false) {
15554
  delete config._isValid;
15555
+ hooks.createFromInputFallback(config);
 
 
 
 
 
 
 
 
15556
  }
 
 
 
15557
  }
15558
 
15559
  hooks.createFromInputFallback = deprecate(
15560
+ 'value provided is not in a recognized ISO format. moment construction falls back to js Date(), ' +
15561
+ 'which is not reliable across all browsers and versions. Non ISO date formats are ' +
15562
  'discouraged and will be removed in an upcoming major release. Please refer to ' +
15563
  'http://momentjs.com/guides/#/warnings/js-date/ for more info.',
15564
  function (config) {
15605
  }
15606
 
15607
  //if the day of the year is set, figure out what it is
15608
+ if (config._dayOfYear) {
15609
  yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
15610
 
15611
+ if (config._dayOfYear > daysInYear(yearToUse)) {
15612
  getParsingFlags(config)._overflowDayOfYear = true;
15613
  }
15614
 
15712
  // constant that refers to the ISO standard
15713
  hooks.ISO_8601 = function () {};
15714
 
 
 
 
15715
  // date from string and format string
15716
  function configFromStringAndFormat(config) {
15717
  // TODO: Move this to another part of the creation flow to prevent circular deps
15719
  configFromISO(config);
15720
  return;
15721
  }
15722
+
 
 
 
15723
  config._a = [];
15724
  getParsingFlags(config).empty = true;
15725
 
15911
 
15912
  function configFromInput(config) {
15913
  var input = config._i;
15914
+ if (input === undefined) {
15915
  config._d = new Date(hooks.now());
15916
  } else if (isDate(input)) {
15917
  config._d = new Date(input.valueOf());
15922
  return parseInt(obj, 10);
15923
  });
15924
  configFromArray(config);
15925
+ } else if (typeof(input) === 'object') {
15926
  configFromObject(config);
15927
  } else if (isNumber(input)) {
15928
  // from milliseconds
16023
  return Date.now ? Date.now() : +(new Date());
16024
  };
16025
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16026
  function Duration (duration) {
16027
  var normalizedInput = normalizeObjectUnits(duration),
16028
  years = normalizedInput.year || 0,
16035
  seconds = normalizedInput.second || 0,
16036
  milliseconds = normalizedInput.millisecond || 0;
16037
 
 
 
16038
  // representation for dateAddRemove
16039
  this._milliseconds = +milliseconds +
16040
  seconds * 1e3 + // 1000
16158
  // a second time. In case it wants us to change the offset again
16159
  // _changeInProgress == true case, then we have to adjust, because
16160
  // there is no such time in the given timezone.
16161
+ function getSetOffset (input, keepLocalTime) {
16162
  var offset = this._offset || 0,
16163
  localAdjust;
16164
  if (!this.isValid()) {
16170
  if (input === null) {
16171
  return this;
16172
  }
16173
+ } else if (Math.abs(input) < 16) {
16174
  input = input * 60;
16175
  }
16176
  if (!this._isUTC && keepLocalTime) {
16228
 
16229
  function setOffsetToParsedOffset () {
16230
  if (this._tzm != null) {
16231
+ this.utcOffset(this._tzm);
16232
  } else if (typeof this._i === 'string') {
16233
  var tZone = offsetFromString(matchOffset, this._i);
16234
  if (tZone != null) {
16360
  }
16361
 
16362
  createDuration.fn = Duration.prototype;
 
16363
 
16364
  function parseIso (inp, sign) {
16365
  // We'd normally use ~~inp for this, but unfortunately it also
16596
  return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
16597
  }
16598
 
16599
+ function toISOString () {
 
 
 
16600
  var m = this.clone().utc();
16601
+ if (0 < m.year() && m.year() <= 9999) {
16602
+ if (isFunction(Date.prototype.toISOString)) {
16603
+ // native implementation is ~50x faster, use it when we can
16604
+ return this.toDate().toISOString();
16605
+ } else {
16606
+ return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
16607
+ }
16608
+ } else {
16609
  return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
16610
  }
 
 
 
 
 
16611
  }
16612
 
16613
  /**
16627
  zone = 'Z';
16628
  }
16629
  var prefix = '[' + func + '("]';
16630
+ var year = (0 < this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';
16631
  var datetime = '-MM-DD[T]HH:mm:ss.SSS';
16632
  var suffix = zone + '[")]';
16633
 
16795
  return this.isValid() ? this.toISOString() : null;
16796
  }
16797
 
16798
+ function isValid$1 () {
16799
  return isValid(this);
16800
  }
16801
 
16955
  addRegexToken('D', match1to2);
16956
  addRegexToken('DD', match1to2, match2);
16957
  addRegexToken('Do', function (isStrict, locale) {
16958
+ return isStrict ? locale._ordinalParse : locale._ordinalParseLenient;
 
 
 
16959
  });
16960
 
16961
  addParseToken(['D', 'DD'], DATE);
17135
  proto.isSame = isSame;
17136
  proto.isSameOrAfter = isSameOrAfter;
17137
  proto.isSameOrBefore = isSameOrBefore;
17138
+ proto.isValid = isValid$1;
17139
  proto.lang = lang;
17140
  proto.locale = locale;
17141
  proto.localeData = localeData;
17360
  }
17361
 
17362
  getSetGlobalLocale('en', {
17363
+ ordinalParse: /\d{1,2}(th|st|nd|rd)/,
17364
  ordinal : function (number) {
17365
  var b = number % 10,
17366
  output = (toInt(number % 100 / 10) === 1) ? 'th' :
17481
  }
17482
 
17483
  function as (units) {
 
 
 
17484
  var days;
17485
  var months;
17486
  var milliseconds = this._milliseconds;
17509
 
17510
  // TODO: Use this.as('ms')?
17511
  function valueOf$1 () {
 
 
 
17512
  return (
17513
  this._milliseconds +
17514
  this._days * 864e5 +
17534
 
17535
  function get$2 (units) {
17536
  units = normalizeUnits(units);
17537
+ return this[units + 's']();
17538
  }
17539
 
17540
  function makeGetter(name) {
17541
  return function () {
17542
+ return this._data[name];
17543
  };
17544
  }
17545
 
17557
 
17558
  var round = Math.round;
17559
  var thresholds = {
17560
+ s: 45, // seconds to minute
17561
+ m: 45, // minutes to hour
17562
+ h: 22, // hours to day
17563
+ d: 26, // days to month
17564
+ M: 11 // months to year
 
17565
  };
17566
 
17567
  // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
17578
  var months = round(duration.as('M'));
17579
  var years = round(duration.as('y'));
17580
 
17581
+ var a = seconds < thresholds.s && ['s', seconds] ||
17582
+ minutes <= 1 && ['m'] ||
17583
+ minutes < thresholds.m && ['mm', minutes] ||
17584
+ hours <= 1 && ['h'] ||
17585
+ hours < thresholds.h && ['hh', hours] ||
17586
+ days <= 1 && ['d'] ||
17587
+ days < thresholds.d && ['dd', days] ||
17588
+ months <= 1 && ['M'] ||
17589
+ months < thresholds.M && ['MM', months] ||
17590
+ years <= 1 && ['y'] || ['yy', years];
 
17591
 
17592
  a[2] = withoutSuffix;
17593
  a[3] = +posNegDuration > 0;
17616
  return thresholds[threshold];
17617
  }
17618
  thresholds[threshold] = limit;
 
 
 
17619
  return true;
17620
  }
17621
 
17622
  function humanize (withSuffix) {
 
 
 
 
17623
  var locale = this.localeData();
17624
  var output = relativeTime$1(this, !withSuffix, locale);
17625
 
17640
  // This is because there is no context-free conversion between hours and days
17641
  // (think of clock changes)
17642
  // and also not between days and months (28-31 days per month)
 
 
 
 
17643
  var seconds = abs$1(this._milliseconds) / 1000;
17644
  var days = abs$1(this._days);
17645
  var months = abs$1(this._months);
17684
 
17685
  var proto$2 = Duration.prototype;
17686
 
 
17687
  proto$2.abs = abs;
17688
  proto$2.add = add$1;
17689
  proto$2.subtract = subtract$1;
17739
  // Side effect imports
17740
 
17741
 
17742
+ hooks.version = '2.17.1';
17743
 
17744
  setHookCallback(createLocal);
17745
 
17788
  "./ar": 294,
17789
  "./ar-dz": 295,
17790
  "./ar-dz.js": 295,
17791
+ "./ar-ly": 296,
17792
+ "./ar-ly.js": 296,
17793
+ "./ar-ma": 297,
17794
+ "./ar-ma.js": 297,
17795
+ "./ar-sa": 298,
17796
+ "./ar-sa.js": 298,
17797
+ "./ar-tn": 299,
17798
+ "./ar-tn.js": 299,
 
 
17799
  "./ar.js": 294,
17800
+ "./az": 300,
17801
+ "./az.js": 300,
17802
+ "./be": 301,
17803
+ "./be.js": 301,
17804
+ "./bg": 302,
17805
+ "./bg.js": 302,
17806
+ "./bn": 303,
17807
+ "./bn.js": 303,
17808
+ "./bo": 304,
17809
+ "./bo.js": 304,
17810
+ "./br": 305,
17811
+ "./br.js": 305,
17812
+ "./bs": 306,
17813
+ "./bs.js": 306,
17814
+ "./ca": 307,
17815
+ "./ca.js": 307,
17816
+ "./cs": 308,
17817
+ "./cs.js": 308,
17818
+ "./cv": 309,
17819
+ "./cv.js": 309,
17820
+ "./cy": 310,
17821
+ "./cy.js": 310,
17822
+ "./da": 311,
17823
+ "./da.js": 311,
17824
+ "./de": 312,
17825
+ "./de-at": 313,
17826
+ "./de-at.js": 313,
17827
+ "./de.js": 312,
17828
+ "./dv": 314,
17829
+ "./dv.js": 314,
17830
+ "./el": 315,
17831
+ "./el.js": 315,
17832
+ "./en-au": 316,
17833
+ "./en-au.js": 316,
17834
+ "./en-ca": 317,
17835
+ "./en-ca.js": 317,
17836
+ "./en-gb": 318,
17837
+ "./en-gb.js": 318,
17838
+ "./en-ie": 319,
17839
+ "./en-ie.js": 319,
17840
+ "./en-nz": 320,
17841
+ "./en-nz.js": 320,
17842
+ "./eo": 321,
17843
+ "./eo.js": 321,
17844
+ "./es": 322,
17845
+ "./es-do": 323,
17846
+ "./es-do.js": 323,
17847
+ "./es.js": 322,
17848
+ "./et": 324,
17849
+ "./et.js": 324,
17850
+ "./eu": 325,
17851
+ "./eu.js": 325,
17852
+ "./fa": 326,
17853
+ "./fa.js": 326,
17854
+ "./fi": 327,
17855
+ "./fi.js": 327,
17856
+ "./fo": 328,
17857
+ "./fo.js": 328,
17858
+ "./fr": 329,
17859
+ "./fr-ca": 330,
17860
+ "./fr-ca.js": 330,
17861
+ "./fr-ch": 331,
17862
+ "./fr-ch.js": 331,
17863
+ "./fr.js": 329,
17864
+ "./fy": 332,
17865
+ "./fy.js": 332,
17866
+ "./gd": 333,
17867
+ "./gd.js": 333,
17868
+ "./gl": 334,
17869
+ "./gl.js": 334,
17870
+ "./he": 335,
17871
+ "./he.js": 335,
17872
+ "./hi": 336,
17873
+ "./hi.js": 336,
17874
+ "./hr": 337,
17875
+ "./hr.js": 337,
17876
+ "./hu": 338,
17877
+ "./hu.js": 338,
17878
+ "./hy-am": 339,
17879
+ "./hy-am.js": 339,
17880
+ "./id": 340,
17881
+ "./id.js": 340,
17882
+ "./is": 341,
17883
+ "./is.js": 341,
17884
+ "./it": 342,
17885
+ "./it.js": 342,
17886
+ "./ja": 343,
17887
+ "./ja.js": 343,
17888
+ "./jv": 344,
17889
+ "./jv.js": 344,
17890
+ "./ka": 345,
17891
+ "./ka.js": 345,
17892
+ "./kk": 346,
17893
+ "./kk.js": 346,
17894
+ "./km": 347,
17895
+ "./km.js": 347,
17896
+ "./ko": 348,
17897
+ "./ko.js": 348,
17898
+ "./ky": 349,
17899
+ "./ky.js": 349,
17900
+ "./lb": 350,
17901
+ "./lb.js": 350,
17902
+ "./lo": 351,
17903
+ "./lo.js": 351,
17904
+ "./lt": 352,
17905
+ "./lt.js": 352,
17906
+ "./lv": 353,
17907
+ "./lv.js": 353,
17908
+ "./me": 354,
17909
+ "./me.js": 354,
17910
+ "./mi": 355,
17911
+ "./mi.js": 355,
17912
+ "./mk": 356,
17913
+ "./mk.js": 356,
17914
+ "./ml": 357,
17915
+ "./ml.js": 357,
17916
+ "./mr": 358,
17917
+ "./mr.js": 358,
17918
+ "./ms": 359,
17919
+ "./ms-my": 360,
17920
+ "./ms-my.js": 360,
17921
+ "./ms.js": 359,
17922
+ "./my": 361,
17923
+ "./my.js": 361,
17924
+ "./nb": 362,
17925
+ "./nb.js": 362,
17926
+ "./ne": 363,
17927
+ "./ne.js": 363,
17928
+ "./nl": 364,
17929
+ "./nl-be": 365,
17930
+ "./nl-be.js": 365,
17931
+ "./nl.js": 364,
17932
+ "./nn": 366,
17933
+ "./nn.js": 366,
17934
+ "./pa-in": 367,
17935
+ "./pa-in.js": 367,
17936
+ "./pl": 368,
17937
+ "./pl.js": 368,
17938
+ "./pt": 369,
17939
+ "./pt-br": 370,
17940
+ "./pt-br.js": 370,
17941
+ "./pt.js": 369,
17942
+ "./ro": 371,
17943
+ "./ro.js": 371,
17944
+ "./ru": 372,
17945
+ "./ru.js": 372,
17946
+ "./se": 373,
17947
+ "./se.js": 373,
17948
+ "./si": 374,
17949
+ "./si.js": 374,
17950
+ "./sk": 375,
17951
+ "./sk.js": 375,
17952
+ "./sl": 376,
17953
+ "./sl.js": 376,
17954
+ "./sq": 377,
17955
+ "./sq.js": 377,
17956
+ "./sr": 378,
17957
+ "./sr-cyrl": 379,
17958
+ "./sr-cyrl.js": 379,
17959
+ "./sr.js": 378,
17960
+ "./ss": 380,
17961
+ "./ss.js": 380,
17962
+ "./sv": 381,
17963
+ "./sv.js": 381,
17964
+ "./sw": 382,
17965
+ "./sw.js": 382,
17966
+ "./ta": 383,
17967
+ "./ta.js": 383,
17968
+ "./te": 384,
17969
+ "./te.js": 384,
17970
+ "./tet": 385,
17971
+ "./tet.js": 385,
17972
+ "./th": 386,
17973
+ "./th.js": 386,
17974
+ "./tl-ph": 387,
17975
+ "./tl-ph.js": 387,
17976
+ "./tlh": 388,
17977
+ "./tlh.js": 388,
17978
+ "./tr": 389,
17979
+ "./tr.js": 389,
17980
+ "./tzl": 390,
17981
+ "./tzl.js": 390,
17982
+ "./tzm": 391,
17983
+ "./tzm-latn": 392,
17984
+ "./tzm-latn.js": 392,
17985
+ "./tzm.js": 391,
17986
+ "./uk": 393,
17987
+ "./uk.js": 393,
17988
+ "./uz": 394,
17989
+ "./uz.js": 394,
17990
+ "./vi": 395,
17991
+ "./vi.js": 395,
17992
+ "./x-pseudo": 396,
17993
+ "./x-pseudo.js": 396,
17994
+ "./yo": 397,
17995
+ "./yo.js": 397,
17996
+ "./zh-cn": 398,
17997
+ "./zh-cn.js": 398,
17998
+ "./zh-hk": 399,
17999
+ "./zh-hk.js": 399,
18000
+ "./zh-tw": 400,
18001
+ "./zh-tw.js": 400
 
 
 
 
 
 
 
 
 
 
 
 
18002
  };
18003
  function webpackContext(req) {
18004
  return __webpack_require__(webpackContextResolve(req));
18077
  y : '\'n jaar',
18078
  yy : '%d jaar'
18079
  },
18080
+ ordinalParse: /\d{1,2}(ste|de)/,
18081
  ordinal : function (number) {
18082
  return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter
18083
  },
18305
 
18306
  /***/ },
18307
  /* 296 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18308
  /***/ function(module, exports, __webpack_require__) {
18309
 
18310
  //! moment.js locale configuration
18435
 
18436
 
18437
  /***/ },
18438
+ /* 297 */
18439
  /***/ function(module, exports, __webpack_require__) {
18440
 
18441
  //! moment.js locale configuration
18500
 
18501
 
18502
  /***/ },
18503
+ /* 298 */
18504
  /***/ function(module, exports, __webpack_require__) {
18505
 
18506
  //! moment.js locale configuration
18610
 
18611
 
18612
  /***/ },
18613
+ /* 299 */
18614
  /***/ function(module, exports, __webpack_require__) {
18615
 
18616
  //! moment.js locale configuration
18674
 
18675
 
18676
  /***/ },
18677
+ /* 300 */
18678
  /***/ function(module, exports, __webpack_require__) {
18679
 
18680
  //! moment.js locale configuration
18762
  return 'axşam';
18763
  }
18764
  },
18765
+ ordinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,
18766
  ordinal : function (number) {
18767
  if (number === 0) { // special case for zero
18768
  return number + '-ıncı';
18784
 
18785
 
18786
  /***/ },
18787
+ /* 301 */
18788
  /***/ function(module, exports, __webpack_require__) {
18789
 
18790
  //! moment.js locale configuration
18896
  return 'вечара';
18897
  }
18898
  },
18899
+ ordinalParse: /\d{1,2}-(і|ы|га)/,
18900
  ordinal: function (number, period) {
18901
  switch (period) {
18902
  case 'M':
18923
 
18924
 
18925
  /***/ },
18926
+ /* 302 */
18927
  /***/ function(module, exports, __webpack_require__) {
18928
 
18929
  //! moment.js locale configuration
18986
  y : 'година',
18987
  yy : '%d години'
18988
  },
18989
+ ordinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
18990
  ordinal : function (number) {
18991
  var lastDigit = number % 10,
18992
  last2Digits = number % 100;
19018
 
19019
 
19020
  /***/ },
19021
+ /* 303 */
19022
  /***/ function(module, exports, __webpack_require__) {
19023
 
19024
  //! moment.js locale configuration
19142
 
19143
 
19144
  /***/ },
19145
+ /* 304 */
19146
  /***/ function(module, exports, __webpack_require__) {
19147
 
19148
  //! moment.js locale configuration
19266
 
19267
 
19268
  /***/ },
19269
+ /* 305 */
19270
  /***/ function(module, exports, __webpack_require__) {
19271
 
19272
  //! moment.js locale configuration
19362
  y : 'ur bloaz',
19363
  yy : specialMutationForYears
19364
  },
19365
+ ordinalParse: /\d{1,2}(añ|vet)/,
19366
  ordinal : function (number) {
19367
  var output = (number === 1) ? 'añ' : 'vet';
19368
  return number + output;
19379
 
19380
 
19381
  /***/ },
19382
+ /* 306 */
19383
  /***/ function(module, exports, __webpack_require__) {
19384
 
19385
  //! moment.js locale configuration
19513
  y : 'godinu',
19514
  yy : translate
19515
  },
19516
+ ordinalParse: /\d{1,2}\./,
19517
  ordinal : '%d.',
19518
  week : {
19519
  dow : 1, // Monday is the first day of the week.
19527
 
19528
 
19529
  /***/ },
19530
+ /* 307 */
19531
  /***/ function(module, exports, __webpack_require__) {
19532
 
19533
  //! moment.js locale configuration
19542
 
19543
 
19544
  var ca = moment.defineLocale('ca', {
19545
+ months : 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),
19546
+ monthsShort : 'gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.'.split('_'),
 
 
 
 
19547
  monthsParseExact : true,
19548
  weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),
19549
  weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
19553
  LT : 'H:mm',
19554
  LTS : 'H:mm:ss',
19555
  L : 'DD/MM/YYYY',
19556
+ LL : 'D MMMM YYYY',
19557
+ LLL : 'D MMMM YYYY H:mm',
19558
+ LLLL : 'dddd D MMMM YYYY H:mm'
 
 
 
19559
  },
19560
  calendar : {
19561
  sameDay : function () {
19590
  y : 'un any',
19591
  yy : '%d anys'
19592
  },
19593
+ ordinalParse: /\d{1,2}(r|n|t|è|a)/,
19594
  ordinal : function (number, period) {
19595
  var output = (number === 1) ? 'r' :
19596
  (number === 2) ? 'n' :
19613
 
19614
 
19615
  /***/ },
19616
+ /* 308 */
19617
  /***/ function(module, exports, __webpack_require__) {
19618
 
19619
  //! moment.js locale configuration
19776
  y : translate,
19777
  yy : translate
19778
  },
19779
+ ordinalParse : /\d{1,2}\./,
19780
  ordinal : '%d.',
19781
  week : {
19782
  dow : 1, // Monday is the first day of the week.
19790
 
19791
 
19792
  /***/ },
19793
+ /* 309 */
19794
  /***/ function(module, exports, __webpack_require__) {
19795
 
19796
  //! moment.js locale configuration
19844
  y : 'пӗр ҫул',
19845
  yy : '%d ҫул'
19846
  },
19847
+ ordinalParse: /\d{1,2}-мӗш/,
19848
  ordinal : '%d-мӗш',
19849
  week : {
19850
  dow : 1, // Monday is the first day of the week.
19858
 
19859
 
19860
  /***/ },
19861
+ /* 310 */
19862
  /***/ function(module, exports, __webpack_require__) {
19863
 
19864
  //! moment.js locale configuration
19912
  y: 'blwyddyn',
19913
  yy: '%d flynedd'
19914
  },
19915
+ ordinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
19916
  // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
19917
  ordinal: function (number) {
19918
  var b = number,
19944
 
19945
 
19946
  /***/ },
19947
+ /* 311 */
19948
  /***/ function(module, exports, __webpack_require__) {
19949
 
19950
  //! moment.js locale configuration
19970
  L : 'DD/MM/YYYY',
19971
  LL : 'D. MMMM YYYY',
19972
  LLL : 'D. MMMM YYYY HH:mm',
19973
+ LLLL : 'dddd [d.] D. MMMM YYYY HH:mm'
19974
  },
19975
  calendar : {
19976
+ sameDay : '[I dag kl.] LT',
19977
+ nextDay : '[I morgen kl.] LT',
19978
+ nextWeek : 'dddd [kl.] LT',
19979
+ lastDay : '[I går kl.] LT',
19980
+ lastWeek : '[sidste] dddd [kl] LT',
19981
  sameElse : 'L'
19982
  },
19983
  relativeTime : {
19995
  y : 'et år',
19996
  yy : '%d år'
19997
  },
19998
+ ordinalParse: /\d{1,2}\./,
19999
  ordinal : '%d.',
20000
  week : {
20001
  dow : 1, // Monday is the first day of the week.
20009
 
20010
 
20011
  /***/ },
20012
+ /* 312 */
20013
  /***/ function(module, exports, __webpack_require__) {
20014
 
20015
  //! moment.js locale configuration
20078
  y : processRelativeTime,
20079
  yy : processRelativeTime
20080
  },
20081
+ ordinalParse: /\d{1,2}\./,
20082
  ordinal : '%d.',
20083
  week : {
20084
  dow : 1, // Monday is the first day of the week.
20092
 
20093
 
20094
  /***/ },
20095
+ /* 313 */
20096
  /***/ function(module, exports, __webpack_require__) {
20097
 
20098
  //! moment.js locale configuration
20162
  y : processRelativeTime,
20163
  yy : processRelativeTime
20164
  },
20165
+ ordinalParse: /\d{1,2}\./,
20166
  ordinal : '%d.',
20167
  week : {
20168
  dow : 1, // Monday is the first day of the week.
20176
 
20177
 
20178
  /***/ },
20179
+ /* 314 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20180
  /***/ function(module, exports, __webpack_require__) {
20181
 
20182
  //! moment.js locale configuration
20281
 
20282
 
20283
  /***/ },
20284
+ /* 315 */
20285
  /***/ function(module, exports, __webpack_require__) {
20286
 
20287
  //! moment.js locale configuration
20303
  monthsNominativeEl : 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'),
20304
  monthsGenitiveEl : 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split('_'),
20305
  months : function (momentToFormat, format) {
20306
+ if (/D/.test(format.substring(0, format.indexOf('MMMM')))) { // if there is a day number before 'MMMM'
 
 
20307
  return this._monthsGenitiveEl[momentToFormat.month()];
20308
  } else {
20309
  return this._monthsNominativeEl[momentToFormat.month()];
20370
  y : 'ένας χρόνος',
20371
  yy : '%d χρόνια'
20372
  },
20373
+ ordinalParse: /\d{1,2}η/,
20374
  ordinal: '%dη',
20375
  week : {
20376
  dow : 1, // Monday is the first day of the week.
20384
 
20385
 
20386
  /***/ },
20387
+ /* 316 */
20388
  /***/ function(module, exports, __webpack_require__) {
20389
 
20390
  //! moment.js locale configuration
20435
  y : 'a year',
20436
  yy : '%d years'
20437
  },
20438
+ ordinalParse: /\d{1,2}(st|nd|rd|th)/,
20439
  ordinal : function (number) {
20440
  var b = number % 10,
20441
  output = (~~(number % 100 / 10) === 1) ? 'th' :
20456
 
20457
 
20458
  /***/ },
20459
+ /* 317 */
20460
  /***/ function(module, exports, __webpack_require__) {
20461
 
20462
  //! moment.js locale configuration
20507
  y : 'a year',
20508
  yy : '%d years'
20509
  },
20510
+ ordinalParse: /\d{1,2}(st|nd|rd|th)/,
20511
  ordinal : function (number) {
20512
  var b = number % 10,
20513
  output = (~~(number % 100 / 10) === 1) ? 'th' :
20524
 
20525
 
20526
  /***/ },
20527
+ /* 318 */
20528
  /***/ function(module, exports, __webpack_require__) {
20529
 
20530
  //! moment.js locale configuration
20575
  y : 'a year',
20576
  yy : '%d years'
20577
  },
20578
+ ordinalParse: /\d{1,2}(st|nd|rd|th)/,
20579
  ordinal : function (number) {
20580
  var b = number % 10,
20581
  output = (~~(number % 100 / 10) === 1) ? 'th' :
20596
 
20597
 
20598
  /***/ },
20599
+ /* 319 */
20600
  /***/ function(module, exports, __webpack_require__) {
20601
 
20602
  //! moment.js locale configuration
20647
  y : 'a year',
20648
  yy : '%d years'
20649
  },
20650
+ ordinalParse: /\d{1,2}(st|nd|rd|th)/,
20651
  ordinal : function (number) {
20652
  var b = number % 10,
20653
  output = (~~(number % 100 / 10) === 1) ? 'th' :
20668
 
20669
 
20670
  /***/ },
20671
+ /* 320 */
20672
  /***/ function(module, exports, __webpack_require__) {
20673
 
20674
  //! moment.js locale configuration
20719
  y : 'a year',
20720
  yy : '%d years'
20721
  },
20722
+ ordinalParse: /\d{1,2}(st|nd|rd|th)/,
20723
  ordinal : function (number) {
20724
  var b = number % 10,
20725
  output = (~~(number % 100 / 10) === 1) ? 'th' :
20740
 
20741
 
20742
  /***/ },
20743
+ /* 321 */
20744
  /***/ function(module, exports, __webpack_require__) {
20745
 
20746
  //! moment.js locale configuration
20747
  //! locale : Esperanto [eo]
20748
  //! author : Colin Dean : https://github.com/colindean
20749
+ //! komento: Mi estas malcerta se mi korekte traktis akuzativojn en tiu traduko.
20750
+ //! Se ne, bonvolu korekti kaj avizi min por ke mi povas lerni!
20751
 
20752
  ;(function (global, factory) {
20753
  true ? factory(__webpack_require__(290)) :
20759
  var eo = moment.defineLocale('eo', {
20760
  months : 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split('_'),
20761
  monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec'.split('_'),
20762
+ weekdays : 'Dimanĉo_Lundo_Mardo_Merkredo_Ĵaŭdo_Vendredo_Sabato'.split('_'),
20763
+ weekdaysShort : 'Dim_Lun_Mard_Merk_Ĵaŭ_Ven_Sab'.split('_'),
20764
+ weekdaysMin : 'Di_Lu_Ma_Me_Ĵa_Ve_Sa'.split('_'),
20765
  longDateFormat : {
20766
  LT : 'HH:mm',
20767
  LTS : 'HH:mm:ss',
20768
  L : 'YYYY-MM-DD',
20769
+ LL : 'D[-an de] MMMM, YYYY',
20770
+ LLL : 'D[-an de] MMMM, YYYY HH:mm',
20771
+ LLLL : 'dddd, [la] D[-an de] MMMM, YYYY HH:mm'
20772
  },
20773
  meridiemParse: /[ap]\.t\.m/i,
20774
  isPM: function (input) {
20790
  sameElse : 'L'
20791
  },
20792
  relativeTime : {
20793
+ future : 'je %s',
20794
  past : 'antaŭ %s',
20795
  s : 'sekundoj',
20796
  m : 'minuto',
20804
  y : 'jaro',
20805
  yy : '%d jaroj'
20806
  },
20807
+ ordinalParse: /\d{1,2}a/,
20808
  ordinal : '%da',
20809
  week : {
20810
  dow : 1, // Monday is the first day of the week.
20818
 
20819
 
20820
  /***/ },
20821
+ /* 322 */
20822
  /***/ function(module, exports, __webpack_require__) {
20823
 
20824
  //! moment.js locale configuration
20838
  var es = moment.defineLocale('es', {
20839
  months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
20840
  monthsShort : function (m, format) {
20841
+ if (/-MMM-/.test(format)) {
 
 
20842
  return monthsShort[m.month()];
20843
  } else {
20844
  return monthsShortDot[m.month()];
20890
  y : 'un año',
20891
  yy : '%d años'
20892
  },
20893
+ ordinalParse : /\d{1,2}º/,
20894
  ordinal : '%dº',
20895
  week : {
20896
  dow : 1, // Monday is the first day of the week.
20904
 
20905
 
20906
  /***/ },
20907
+ /* 323 */
20908
  /***/ function(module, exports, __webpack_require__) {
20909
 
20910
  //! moment.js locale configuration
20923
  var esDo = moment.defineLocale('es-do', {
20924
  months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
20925
  monthsShort : function (m, format) {
20926
+ if (/-MMM-/.test(format)) {
 
 
20927
  return monthsShort[m.month()];
20928
  } else {
20929
  return monthsShortDot[m.month()];
20975
  y : 'un año',
20976
  yy : '%d años'
20977
  },
20978
+ ordinalParse : /\d{1,2}º/,
20979
  ordinal : '%dº',
20980
  week : {
20981
  dow : 1, // Monday is the first day of the week.
20989
 
20990
 
20991
  /***/ },
20992
+ /* 324 */
20993
  /***/ function(module, exports, __webpack_require__) {
20994
 
20995
  //! moment.js locale configuration
21060
  y : processRelativeTime,
21061
  yy : processRelativeTime
21062
  },
21063
+ ordinalParse: /\d{1,2}\./,
21064
  ordinal : '%d.',
21065
  week : {
21066
  dow : 1, // Monday is the first day of the week.
21074
 
21075
 
21076
  /***/ },
21077
+ /* 325 */
21078
  /***/ function(module, exports, __webpack_require__) {
21079
 
21080
  //! moment.js locale configuration
21131
  y : 'urte bat',
21132
  yy : '%d urte'
21133
  },
21134
+ ordinalParse: /\d{1,2}\./,
21135
  ordinal : '%d.',
21136
  week : {
21137
  dow : 1, // Monday is the first day of the week.
21145
 
21146
 
21147
  /***/ },
21148
+ /* 326 */
21149
  /***/ function(module, exports, __webpack_require__) {
21150
 
21151
  //! moment.js locale configuration
21221
  relativeTime : {
21222
  future : 'در %s',
21223
  past : '%s پیش',
21224
+ s : 'چندین ثانیه',
21225
  m : 'یک دقیقه',
21226
  mm : '%d دقیقه',
21227
  h : 'یک ساعت',
21243
  return symbolMap[match];
21244
  }).replace(/,/g, '،');
21245
  },
21246
+ ordinalParse: /\d{1,2}م/,
21247
  ordinal : '%dم',
21248
  week : {
21249
  dow : 6, // Saturday is the first day of the week.
21257
 
21258
 
21259
  /***/ },
21260
+ /* 327 */
21261
  /***/ function(module, exports, __webpack_require__) {
21262
 
21263
  //! moment.js locale configuration
21355
  y : translate,
21356
  yy : translate
21357
  },
21358
+ ordinalParse: /\d{1,2}\./,
21359
  ordinal : '%d.',
21360
  week : {
21361
  dow : 1, // Monday is the first day of the week.
21369
 
21370
 
21371
  /***/ },
21372
+ /* 328 */
21373
  /***/ function(module, exports, __webpack_require__) {
21374
 
21375
  //! moment.js locale configuration
21420
  y : 'eitt ár',
21421
  yy : '%d ár'
21422
  },
21423
+ ordinalParse: /\d{1,2}\./,
21424
  ordinal : '%d.',
21425
  week : {
21426
  dow : 1, // Monday is the first day of the week.
21434
 
21435
 
21436
  /***/ },
21437
+ /* 329 */
21438
  /***/ function(module, exports, __webpack_require__) {
21439
 
21440
  //! moment.js locale configuration
21465
  LLLL : 'dddd D MMMM YYYY HH:mm'
21466
  },
21467
  calendar : {
21468
+ sameDay: '[Aujourd\'hui à] LT',
21469
+ nextDay: '[Demain à] LT',
21470
+ nextWeek: 'dddd [à] LT',
21471
+ lastDay: '[Hier à] LT',
21472
+ lastWeek: 'dddd [dernier à] LT',
21473
+ sameElse: 'L'
21474
  },
21475
  relativeTime : {
21476
  future : 'dans %s',
21487
  y : 'un an',
21488
  yy : '%d ans'
21489
  },
21490
+ ordinalParse: /\d{1,2}(er|)/,
21491
+ ordinal : function (number) {
21492
+ return number + (number === 1 ? 'er' : '');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21493
  },
21494
  week : {
21495
  dow : 1, // Monday is the first day of the week.
21503
 
21504
 
21505
  /***/ },
21506
+ /* 330 */
21507
  /***/ function(module, exports, __webpack_require__) {
21508
 
21509
  //! moment.js locale configuration
21534
  LLLL : 'dddd D MMMM YYYY HH:mm'
21535
  },
21536
  calendar : {
21537
+ sameDay: '[Aujourd\'hui à] LT',
21538
+ nextDay: '[Demain à] LT',
21539
+ nextWeek: 'dddd [à] LT',
21540
+ lastDay: '[Hier à] LT',
21541
+ lastWeek: 'dddd [dernier à] LT',
21542
+ sameElse: 'L'
21543
  },
21544
  relativeTime : {
21545
  future : 'dans %s',
21556
  y : 'un an',
21557
  yy : '%d ans'
21558
  },
21559
+ ordinalParse: /\d{1,2}(er|e)/,
21560
+ ordinal : function (number) {
21561
+ return number + (number === 1 ? 'er' : 'e');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21562
  }
21563
  });
21564
 
21568
 
21569
 
21570
  /***/ },
21571
+ /* 331 */
21572
  /***/ function(module, exports, __webpack_require__) {
21573
 
21574
  //! moment.js locale configuration
21599
  LLLL : 'dddd D MMMM YYYY HH:mm'
21600
  },
21601
  calendar : {
21602
+ sameDay: '[Aujourd\'hui à] LT',
21603
+ nextDay: '[Demain à] LT',
21604
+ nextWeek: 'dddd [à] LT',
21605
+ lastDay: '[Hier à] LT',
21606
+ lastWeek: 'dddd [dernier à] LT',
21607
+ sameElse: 'L'
21608
  },
21609
  relativeTime : {
21610
  future : 'dans %s',
21621
  y : 'un an',
21622
  yy : '%d ans'
21623
  },
21624
+ ordinalParse: /\d{1,2}(er|e)/,
21625
+ ordinal : function (number) {
21626
+ return number + (number === 1 ? 'er' : 'e');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21627
  },
21628
  week : {
21629
  dow : 1, // Monday is the first day of the week.
21637
 
21638
 
21639
  /***/ },
21640
+ /* 332 */
21641
  /***/ function(module, exports, __webpack_require__) {
21642
 
21643
  //! moment.js locale configuration
21657
  var fy = moment.defineLocale('fy', {
21658
  months : 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'),
21659
  monthsShort : function (m, format) {
21660
+ if (/-MMM-/.test(format)) {
 
 
21661
  return monthsShortWithoutDots[m.month()];
21662
  } else {
21663
  return monthsShortWithDots[m.month()];
21699
  y : 'ien jier',
21700
  yy : '%d jierren'
21701
  },
21702
+ ordinalParse: /\d{1,2}(ste|de)/,
21703
  ordinal : function (number) {
21704
  return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
21705
  },
21715
 
21716
 
21717
  /***/ },
21718
+ /* 333 */
21719
  /***/ function(module, exports, __webpack_require__) {
21720
 
21721
  //! moment.js locale configuration
21779
  y : 'bliadhna',
21780
  yy : '%d bliadhna'
21781
  },
21782
+ ordinalParse : /\d{1,2}(d|na|mh)/,
21783
  ordinal : function (number) {
21784
  var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
21785
  return number + output;
21796
 
21797
 
21798
  /***/ },
21799
+ /* 334 */
21800
  /***/ function(module, exports, __webpack_require__) {
21801
 
21802
  //! moment.js locale configuration
21864
  y : 'un ano',
21865
  yy : '%d anos'
21866
  },
21867
+ ordinalParse : /\d{1,2}º/,
21868
  ordinal : '%dº',
21869
  week : {
21870
  dow : 1, // Monday is the first day of the week.
21878
 
21879
 
21880
  /***/ },
21881
+ /* 335 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21882
  /***/ function(module, exports, __webpack_require__) {
21883
 
21884
  //! moment.js locale configuration
21982
 
21983
 
21984
  /***/ },
21985
+ /* 336 */
21986
  /***/ function(module, exports, __webpack_require__) {
21987
 
21988
  //! moment.js locale configuration
22111
 
22112
 
22113
  /***/ },
22114
+ /* 337 */
22115
  /***/ function(module, exports, __webpack_require__) {
22116
 
22117
  //! moment.js locale configuration
22247
  y : 'godinu',
22248
  yy : translate
22249
  },
22250
+ ordinalParse: /\d{1,2}\./,
22251
  ordinal : '%d.',
22252
  week : {
22253
  dow : 1, // Monday is the first day of the week.
22261
 
22262
 
22263
  /***/ },
22264
+ /* 338 */
22265
  /***/ function(module, exports, __webpack_require__) {
22266
 
22267
  //! moment.js locale configuration
22361
  y : translate,
22362
  yy : translate
22363
  },
22364
+ ordinalParse: /\d{1,2}\./,
22365
  ordinal : '%d.',
22366
  week : {
22367
  dow : 1, // Monday is the first day of the week.
22375
 
22376
 
22377
  /***/ },
22378
+ /* 339 */
22379
  /***/ function(module, exports, __webpack_require__) {
22380
 
22381
  //! moment.js locale configuration
22448
  return 'երեկոյան';
22449
  }
22450
  },
22451
+ ordinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/,
22452
  ordinal: function (number, period) {
22453
  switch (period) {
22454
  case 'DDD':
22475
 
22476
 
22477
  /***/ },
22478
+ /* 340 */
22479
  /***/ function(module, exports, __webpack_require__) {
22480
 
22481
  //! moment.js locale configuration
22563
 
22564
 
22565
  /***/ },
22566
+ /* 341 */
22567
  /***/ function(module, exports, __webpack_require__) {
22568
 
22569
  //! moment.js locale configuration
22681
  y : translate,
22682
  yy : translate
22683
  },
22684
+ ordinalParse: /\d{1,2}\./,
22685
  ordinal : '%d.',
22686
  week : {
22687
  dow : 1, // Monday is the first day of the week.
22695
 
22696
 
22697
  /***/ },
22698
+ /* 342 */
22699
  /***/ function(module, exports, __webpack_require__) {
22700
 
22701
  //! moment.js locale configuration
22713
  var it = moment.defineLocale('it', {
22714
  months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),
22715
  monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
22716
+ weekdays : 'Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato'.split('_'),
22717
+ weekdaysShort : 'Dom_Lun_Mar_Mer_Gio_Ven_Sab'.split('_'),
22718
+ weekdaysMin : 'Do_Lu_Ma_Me_Gi_Ve_Sa'.split('_'),
22719
  longDateFormat : {
22720
  LT : 'HH:mm',
22721
  LTS : 'HH:mm:ss',
22756
  y : 'un anno',
22757
  yy : '%d anni'
22758
  },
22759
+ ordinalParse : /\d{1,2}º/,
22760
  ordinal: '%dº',
22761
  week : {
22762
  dow : 1, // Monday is the first day of the week.
22770
 
22771
 
22772
  /***/ },
22773
+ /* 343 */
22774
  /***/ function(module, exports, __webpack_require__) {
22775
 
22776
  //! moment.js locale configuration
22791
  weekdaysShort : '日_月_火_水_木_金_土'.split('_'),
22792
  weekdaysMin : '日_月_火_水_木_金_土'.split('_'),
22793
  longDateFormat : {
22794
+ LT : 'Ah時m分',
22795
+ LTS : 'Ah時m分s秒',
22796
  L : 'YYYY/MM/DD',
22797
  LL : 'YYYY年M月D日',
22798
+ LLL : 'YYYY年M月D日Ah時m分',
22799
+ LLLL : 'YYYY年M月D日Ah時m分 dddd'
 
 
 
 
22800
  },
22801
  meridiemParse: /午前|午後/i,
22802
  isPM : function (input) {
22817
  lastWeek : '[前週]dddd LT',
22818
  sameElse : 'L'
22819
  },
22820
+ ordinalParse : /\d{1,2}日/,
22821
  ordinal : function (number, period) {
22822
  switch (period) {
22823
  case 'd':
22851
 
22852
 
22853
  /***/ },
22854
+ /* 344 */
22855
  /***/ function(module, exports, __webpack_require__) {
22856
 
22857
  //! moment.js locale configuration
22939
 
22940
 
22941
  /***/ },
22942
+ /* 345 */
22943
  /***/ function(module, exports, __webpack_require__) {
22944
 
22945
  //! moment.js locale configuration
22990
  },
22991
  past : function (s) {
22992
  if ((/(წამი|წუთი|საათი|დღე|თვე)/).test(s)) {
22993
+ return s.replace(/(ი|ე)$/, 'ის წინ');
22994
  }
22995
  if ((/წელი/).test(s)) {
22996
+ return s.replace(/წელი$/, 'წლის წინ');
22997
  }
22998
  },
22999
  s : 'რამდენიმე წამი',
23008
  y : 'წელი',
23009
  yy : '%d წელი'
23010
  },
23011
+ ordinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
23012
  ordinal : function (number) {
23013
  if (number === 0) {
23014
  return number;
23033
 
23034
 
23035
  /***/ },
23036
+ /* 346 */
23037
  /***/ function(module, exports, __webpack_require__) {
23038
 
23039
  //! moment.js locale configuration
23107
  y : 'бір жыл',
23108
  yy : '%d жыл'
23109
  },
23110
+ ordinalParse: /\d{1,2}-(ші|шы)/,
23111
  ordinal : function (number) {
23112
  var a = number % 10,
23113
  b = number >= 100 ? 100 : null;
23125
 
23126
 
23127
  /***/ },
23128
+ /* 347 */
23129
  /***/ function(module, exports, __webpack_require__) {
23130
 
23131
  //! moment.js locale configuration
23188
 
23189
 
23190
  /***/ },
23191
+ /* 348 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23192
  /***/ function(module, exports, __webpack_require__) {
23193
 
23194
  //! moment.js locale configuration
23210
  weekdaysShort : '일_월_화_수_목_금_토'.split('_'),
23211
  weekdaysMin : '일_월_화_수_목_금_토'.split('_'),
23212
  longDateFormat : {
23213
+ LT : 'A h시 m분',
23214
+ LTS : 'A h시 m분 s초',
23215
  L : 'YYYY.MM.DD',
23216
  LL : 'YYYY년 MMMM D일',
23217
+ LLL : 'YYYY년 MMMM D일 A h시 m분',
23218
+ LLLL : 'YYYY년 MMMM D일 dddd A h시 m분'
 
 
 
 
23219
  },
23220
  calendar : {
23221
  sameDay : '오늘 LT',
23230
  past : '%s 전',
23231
  s : '몇 초',
23232
  ss : '%d초',
23233
+ m : '일분',
23234
  mm : '%d분',
23235
  h : '한 시간',
23236
  hh : '%d시간',
23241
  y : '일 년',
23242
  yy : '%d년'
23243
  },
23244
+ ordinalParse : /\d{1,2}일/,
23245
  ordinal : '%d일',
23246
  meridiemParse : /오전|오후/,
23247
  isPM : function (token) {
23258
 
23259
 
23260
  /***/ },
23261
+ /* 349 */
23262
  /***/ function(module, exports, __webpack_require__) {
23263
 
23264
  //! moment.js locale configuration
23333
  y : 'бир жыл',
23334
  yy : '%d жыл'
23335
  },
23336
+ ordinalParse: /\d{1,2}-(чи|чы|чү|чу)/,
23337
  ordinal : function (number) {
23338
  var a = number % 10,
23339
  b = number >= 100 ? 100 : null;
23351
 
23352
 
23353
  /***/ },
23354
+ /* 350 */
23355
  /***/ function(module, exports, __webpack_require__) {
23356
 
23357
  //! moment.js locale configuration
23479
  y : processRelativeTime,
23480
  yy : '%d Joer'
23481
  },
23482
+ ordinalParse: /\d{1,2}\./,
23483
  ordinal: '%d.',
23484
  week: {
23485
  dow: 1, // Monday is the first day of the week.
23493
 
23494
 
23495
  /***/ },
23496
+ /* 351 */
23497
  /***/ function(module, exports, __webpack_require__) {
23498
 
23499
  //! moment.js locale configuration
23556
  y : '1 ປີ',
23557
  yy : '%d ປີ'
23558
  },
23559
+ ordinalParse: /(ທີ່)\d{1,2}/,
23560
  ordinal : function (number) {
23561
  return 'ທີ່' + number;
23562
  }
23568
 
23569
 
23570
  /***/ },
23571
+ /* 352 */
23572
  /***/ function(module, exports, __webpack_require__) {
23573
 
23574
  //! moment.js locale configuration
23674
  y : translateSingular,
23675
  yy : translate
23676
  },
23677
+ ordinalParse: /\d{1,2}-oji/,
23678
  ordinal : function (number) {
23679
  return number + '-oji';
23680
  },
23690
 
23691
 
23692
  /***/ },
23693
+ /* 353 */
23694
  /***/ function(module, exports, __webpack_require__) {
23695
 
23696
  //! moment.js locale configuration
23778
  y : relativeTimeWithSingular,
23779
  yy : relativeTimeWithPlural
23780
  },
23781
+ ordinalParse: /\d{1,2}\./,
23782
  ordinal : '%d.',
23783
  week : {
23784
  dow : 1, // Monday is the first day of the week.
23792
 
23793
 
23794
  /***/ },
23795
+ /* 354 */
23796
  /***/ function(module, exports, __webpack_require__) {
23797
 
23798
  //! moment.js locale configuration
23894
  y : 'godinu',
23895
  yy : translator.translate
23896
  },
23897
+ ordinalParse: /\d{1,2}\./,
23898
  ordinal : '%d.',
23899
  week : {
23900
  dow : 1, // Monday is the first day of the week.
23908
 
23909
 
23910
  /***/ },
23911
+ /* 355 */
23912
  /***/ function(module, exports, __webpack_require__) {
23913
 
23914
  //! moment.js locale configuration
23963
  y: 'he tau',
23964
  yy: '%d tau'
23965
  },
23966
+ ordinalParse: /\d{1,2}º/,
23967
  ordinal: '%dº',
23968
  week : {
23969
  dow : 1, // Monday is the first day of the week.
23977
 
23978
 
23979
  /***/ },
23980
+ /* 356 */
23981
  /***/ function(module, exports, __webpack_require__) {
23982
 
23983
  //! moment.js locale configuration
24040
  y : 'година',
24041
  yy : '%d години'
24042
  },
24043
+ ordinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
24044
  ordinal : function (number) {
24045
  var lastDigit = number % 10,
24046
  last2Digits = number % 100;
24072
 
24073
 
24074
  /***/ },
24075
+ /* 357 */
24076
  /***/ function(module, exports, __webpack_require__) {
24077
 
24078
  //! moment.js locale configuration
24158
 
24159
 
24160
  /***/ },
24161
+ /* 358 */
24162
  /***/ function(module, exports, __webpack_require__) {
24163
 
24164
  //! moment.js locale configuration
24322
 
24323
 
24324
  /***/ },
24325
+ /* 359 */
24326
  /***/ function(module, exports, __webpack_require__) {
24327
 
24328
  //! moment.js locale configuration
24409
 
24410
 
24411
  /***/ },
24412
+ /* 360 */
24413
  /***/ function(module, exports, __webpack_require__) {
24414
 
24415
  //! moment.js locale configuration
24497
 
24498
 
24499
  /***/ },
24500
+ /* 361 */
24501
  /***/ function(module, exports, __webpack_require__) {
24502
 
24503
  //! moment.js locale configuration
24598
 
24599
 
24600
  /***/ },
24601
+ /* 362 */
24602
  /***/ function(module, exports, __webpack_require__) {
24603
 
24604
  //! moment.js locale configuration
24652
  y : 'ett år',
24653
  yy : '%d år'
24654
  },
24655
+ ordinalParse: /\d{1,2}\./,
24656
  ordinal : '%d.',
24657
  week : {
24658
  dow : 1, // Monday is the first day of the week.
24666
 
24667
 
24668
  /***/ },
24669
+ /* 363 */
24670
  /***/ function(module, exports, __webpack_require__) {
24671
 
24672
  //! moment.js locale configuration
24794
 
24795
 
24796
  /***/ },
24797
+ /* 364 */
24798
  /***/ function(module, exports, __webpack_require__) {
24799
 
24800
  //! moment.js locale configuration
24818
  var nl = moment.defineLocale('nl', {
24819
  months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
24820
  monthsShort : function (m, format) {
24821
+ if (/-MMM-/.test(format)) {
 
 
24822
  return monthsShortWithoutDots[m.month()];
24823
  } else {
24824
  return monthsShortWithDots[m.month()];
24869
  y : 'één jaar',
24870
  yy : '%d jaar'
24871
  },
24872
+ ordinalParse: /\d{1,2}(ste|de)/,
24873
  ordinal : function (number) {
24874
  return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
24875
  },
24885
 
24886
 
24887
  /***/ },
24888
+ /* 365 */
24889
  /***/ function(module, exports, __webpack_require__) {
24890
 
24891
  //! moment.js locale configuration
24909
  var nlBe = moment.defineLocale('nl-be', {
24910
  months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
24911
  monthsShort : function (m, format) {
24912
+ if (/-MMM-/.test(format)) {
 
 
24913
  return monthsShortWithoutDots[m.month()];
24914
  } else {
24915
  return monthsShortWithDots[m.month()];
24960
  y : 'één jaar',
24961
  yy : '%d jaar'
24962
  },
24963
+ ordinalParse: /\d{1,2}(ste|de)/,
24964
  ordinal : function (number) {
24965
  return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
24966
  },
24976
 
24977
 
24978
  /***/ },
24979
+ /* 366 */
24980
  /***/ function(module, exports, __webpack_require__) {
24981
 
24982
  //! moment.js locale configuration
25027
  y : 'eit år',
25028
  yy : '%d år'
25029
  },
25030
+ ordinalParse: /\d{1,2}\./,
25031
  ordinal : '%d.',
25032
  week : {
25033
  dow : 1, // Monday is the first day of the week.
25041
 
25042
 
25043
  /***/ },
25044
+ /* 367 */
25045
  /***/ function(module, exports, __webpack_require__) {
25046
 
25047
  //! moment.js locale configuration
25170
 
25171
 
25172
  /***/ },
25173
+ /* 368 */
25174
  /***/ function(module, exports, __webpack_require__) {
25175
 
25176
  //! moment.js locale configuration
25209
 
25210
  var pl = moment.defineLocale('pl', {
25211
  months : function (momentToFormat, format) {
25212
+ if (format === '') {
 
 
25213
  // Hack: if format empty we know this is used to generate
25214
  // RegExp by moment. Give then back both valid forms of months
25215
  // in RegExp ready format.
25266
  y : 'rok',
25267
  yy : translate
25268
  },
25269
+ ordinalParse: /\d{1,2}\./,
25270
  ordinal : '%d.',
25271
  week : {
25272
  dow : 1, // Monday is the first day of the week.
25280
 
25281
 
25282
  /***/ },
25283
+ /* 369 */
25284
  /***/ function(module, exports, __webpack_require__) {
25285
 
25286
  //! moment.js locale configuration
25299
  monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
25300
  weekdays : 'Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado'.split('_'),
25301
  weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
25302
+ weekdaysMin : 'Dom_2ª_3ª_4ª_5ª_6ª_Sáb'.split('_'),
25303
  weekdaysParseExact : true,
25304
  longDateFormat : {
25305
  LT : 'HH:mm',
25336
  y : 'um ano',
25337
  yy : '%d anos'
25338
  },
25339
+ ordinalParse: /\d{1,2}º/,
25340
  ordinal : '%dº',
25341
  week : {
25342
  dow : 1, // Monday is the first day of the week.
25350
 
25351
 
25352
  /***/ },
25353
+ /* 370 */
25354
  /***/ function(module, exports, __webpack_require__) {
25355
 
25356
  //! moment.js locale configuration
25369
  monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
25370
  weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),
25371
  weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
25372
+ weekdaysMin : 'Dom_2ª_3ª_4ª_5ª_6ª_Sáb'.split('_'),
25373
  weekdaysParseExact : true,
25374
  longDateFormat : {
25375
  LT : 'HH:mm',
25406
  y : 'um ano',
25407
  yy : '%d anos'
25408
  },
25409
+ ordinalParse: /\d{1,2}º/,
25410
  ordinal : '%dº'
25411
  });
25412
 
25416
 
25417
 
25418
  /***/ },
25419
+ /* 371 */
25420
  /***/ function(module, exports, __webpack_require__) {
25421
 
25422
  //! moment.js locale configuration
25496
 
25497
 
25498
  /***/ },
25499
+ /* 372 */
25500
  /***/ function(module, exports, __webpack_require__) {
25501
 
25502
  //! moment.js locale configuration
25656
  return 'вечера';
25657
  }
25658
  },
25659
+ ordinalParse: /\d{1,2}-(й|го|я)/,
25660
  ordinal: function (number, period) {
25661
  switch (period) {
25662
  case 'M':
25684
 
25685
 
25686
  /***/ },
25687
+ /* 373 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25688
  /***/ function(module, exports, __webpack_require__) {
25689
 
25690
  //! moment.js locale configuration
25736
  y : 'okta jahki',
25737
  yy : '%d jagit'
25738
  },
25739
+ ordinalParse: /\d{1,2}\./,
25740
  ordinal : '%d.',
25741
  week : {
25742
  dow : 1, // Monday is the first day of the week.
25750
 
25751
 
25752
  /***/ },
25753
+ /* 374 */
25754
  /***/ function(module, exports, __webpack_require__) {
25755
 
25756
  //! moment.js locale configuration
25803
  y : 'වසර',
25804
  yy : 'වසර %d'
25805
  },
25806
+ ordinalParse: /\d{1,2} වැනි/,
25807
  ordinal : function (number) {
25808
  return number + ' වැනි';
25809
  },
25826
 
25827
 
25828
  /***/ },
25829
+ /* 375 */
25830
  /***/ function(module, exports, __webpack_require__) {
25831
 
25832
  //! moment.js locale configuration
25967
  y : translate,
25968
  yy : translate
25969
  },
25970
+ ordinalParse: /\d{1,2}\./,
25971
  ordinal : '%d.',
25972
  week : {
25973
  dow : 1, // Monday is the first day of the week.
25981
 
25982
 
25983
  /***/ },
25984
+ /* 376 */
25985
  /***/ function(module, exports, __webpack_require__) {
25986
 
25987
  //! moment.js locale configuration
26134
  y : processRelativeTime,
26135
  yy : processRelativeTime
26136
  },
26137
+ ordinalParse: /\d{1,2}\./,
26138
  ordinal : '%d.',
26139
  week : {
26140
  dow : 1, // Monday is the first day of the week.
26148
 
26149
 
26150
  /***/ },
26151
+ /* 377 */
26152
  /***/ function(module, exports, __webpack_require__) {
26153
 
26154
  //! moment.js locale configuration
26209
  y : 'një vit',
26210
  yy : '%d vite'
26211
  },
26212
+ ordinalParse: /\d{1,2}\./,
26213
  ordinal : '%d.',
26214
  week : {
26215
  dow : 1, // Monday is the first day of the week.
26223
 
26224
 
26225
  /***/ },
26226
+ /* 378 */
26227
  /***/ function(module, exports, __webpack_require__) {
26228
 
26229
  //! moment.js locale configuration
26324
  y : 'godinu',
26325
  yy : translator.translate
26326
  },
26327
+ ordinalParse: /\d{1,2}\./,
26328
  ordinal : '%d.',
26329
  week : {
26330
  dow : 1, // Monday is the first day of the week.
26338
 
26339
 
26340
  /***/ },
26341
+ /* 379 */
26342
  /***/ function(module, exports, __webpack_require__) {
26343
 
26344
  //! moment.js locale configuration
26439
  y : 'годину',
26440
  yy : translator.translate
26441
  },
26442
+ ordinalParse: /\d{1,2}\./,
26443
  ordinal : '%d.',
26444
  week : {
26445
  dow : 1, // Monday is the first day of the week.
26453
 
26454
 
26455
  /***/ },
26456
+ /* 380 */
26457
  /***/ function(module, exports, __webpack_require__) {
26458
 
26459
  //! moment.js locale configuration
26533
  return hour + 12;
26534
  }
26535
  },
26536
+ ordinalParse: /\d{1,2}/,
26537
  ordinal : '%d',
26538
  week : {
26539
  dow : 1, // Monday is the first day of the week.
26547
 
26548
 
26549
  /***/ },
26550
+ /* 381 */
26551
  /***/ function(module, exports, __webpack_require__) {
26552
 
26553
  //! moment.js locale configuration
26600
  y : 'ett år',
26601
  yy : '%d år'
26602
  },
26603
+ ordinalParse: /\d{1,2}(e|a)/,
26604
  ordinal : function (number) {
26605
  var b = number % 10,
26606
  output = (~~(number % 100 / 10) === 1) ? 'e' :
26621
 
26622
 
26623
  /***/ },
26624
+ /* 382 */
26625
  /***/ function(module, exports, __webpack_require__) {
26626
 
26627
  //! moment.js locale configuration
26685
 
26686
 
26687
  /***/ },
26688
+ /* 383 */
26689
  /***/ function(module, exports, __webpack_require__) {
26690
 
26691
  //! moment.js locale configuration
26761
  y : 'ஒரு வருடம்',
26762
  yy : '%d ஆண்டுகள்'
26763
  },
26764
+ ordinalParse: /\d{1,2}வது/,
26765
  ordinal : function (number) {
26766
  return number + 'வது';
26767
  },
26820
 
26821
 
26822
  /***/ },
26823
+ /* 384 */
26824
  /***/ function(module, exports, __webpack_require__) {
26825
 
26826
  //! moment.js locale configuration
26872
  y : 'ఒక సంవత్సరం',
26873
  yy : '%d సంవత్సరాలు'
26874
  },
26875
+ ordinalParse : /\d{1,2}వ/,
26876
  ordinal : '%dవ',
26877
  meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,
26878
  meridiemHour : function (hour, meridiem) {
26914
 
26915
 
26916
  /***/ },
26917
+ /* 385 */
26918
  /***/ function(module, exports, __webpack_require__) {
26919
 
26920
  //! moment.js locale configuration
26966
  y : 'tinan ida',
26967
  yy : 'tinan %d'
26968
  },
26969
+ ordinalParse: /\d{1,2}(st|nd|rd|th)/,
26970
  ordinal : function (number) {
26971
  var b = number % 10,
26972
  output = (~~(number % 100 / 10) === 1) ? 'th' :
26987
 
26988
 
26989
  /***/ },
26990
+ /* 386 */
26991
  /***/ function(module, exports, __webpack_require__) {
26992
 
26993
  //! moment.js locale configuration
27012
  longDateFormat : {
27013
  LT : 'H:mm',
27014
  LTS : 'H:mm:ss',
27015
+ L : 'YYYY/MM/DD',
27016
  LL : 'D MMMM YYYY',
27017
  LLL : 'D MMMM YYYY เวลา H:mm',
27018
  LLLL : 'วันddddที่ D MMMM YYYY เวลา H:mm'
27059
 
27060
 
27061
  /***/ },
27062
+ /* 387 */
27063
  /***/ function(module, exports, __webpack_require__) {
27064
 
27065
  //! moment.js locale configuration
27110
  y : 'isang taon',
27111
  yy : '%d taon'
27112
  },
27113
+ ordinalParse: /\d{1,2}/,
27114
  ordinal : function (number) {
27115
  return number;
27116
  },
27126
 
27127
 
27128
  /***/ },
27129
+ /* 388 */
27130
  /***/ function(module, exports, __webpack_require__) {
27131
 
27132
  //! moment.js locale configuration
27237
  y : 'wa’ DIS',
27238
  yy : translate
27239
  },
27240
+ ordinalParse: /\d{1,2}\./,
27241
  ordinal : '%d.',
27242
  week : {
27243
  dow : 1, // Monday is the first day of the week.
27251
 
27252
 
27253
  /***/ },
27254
+ /* 389 */
27255
  /***/ function(module, exports, __webpack_require__) {
27256
 
27257
  //! moment.js locale configuration
27324
  y : 'bir yıl',
27325
  yy : '%d yıl'
27326
  },
27327
+ ordinalParse: /\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,
27328
  ordinal : function (number) {
27329
  if (number === 0) { // special case for zero
27330
  return number + '\'ıncı';
27346
 
27347
 
27348
  /***/ },
27349
+ /* 390 */
27350
  /***/ function(module, exports, __webpack_require__) {
27351
 
27352
  //! moment.js locale configuration
27411
  y : processRelativeTime,
27412
  yy : processRelativeTime
27413
  },
27414
+ ordinalParse: /\d{1,2}\./,
27415
  ordinal : '%d.',
27416
  week : {
27417
  dow : 1, // Monday is the first day of the week.
27442
 
27443
 
27444
  /***/ },
27445
+ /* 391 */
27446
  /***/ function(module, exports, __webpack_require__) {
27447
 
27448
  //! moment.js locale configuration
27505
 
27506
 
27507
  /***/ },
27508
+ /* 392 */
27509
  /***/ function(module, exports, __webpack_require__) {
27510
 
27511
  //! moment.js locale configuration
27568
 
27569
 
27570
  /***/ },
27571
+ /* 393 */
27572
  /***/ function(module, exports, __webpack_require__) {
27573
 
27574
  //! moment.js locale configuration
27610
  'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),
27611
  'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),
27612
  'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')
27613
+ },
27614
+ nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ?
 
 
 
 
 
27615
  'accusative' :
27616
  ((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ?
27617
  'genitive' :
27692
  return 'вечора';
27693
  }
27694
  },
27695
+ ordinalParse: /\d{1,2}-(й|го)/,
27696
  ordinal: function (number, period) {
27697
  switch (period) {
27698
  case 'M':
27719
 
27720
 
27721
  /***/ },
27722
+ /* 394 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27723
  /***/ function(module, exports, __webpack_require__) {
27724
 
27725
  //! moment.js locale configuration
27782
 
27783
 
27784
  /***/ },
27785
+ /* 395 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27786
  /***/ function(module, exports, __webpack_require__) {
27787
 
27788
  //! moment.js locale configuration
27850
  y : 'một năm',
27851
  yy : '%d năm'
27852
  },
27853
+ ordinalParse: /\d{1,2}/,
27854
  ordinal : function (number) {
27855
  return number;
27856
  },
27866
 
27867
 
27868
  /***/ },
27869
+ /* 396 */
27870
  /***/ function(module, exports, __webpack_require__) {
27871
 
27872
  //! moment.js locale configuration
27918
  y : 'á ~ýéár',
27919
  yy : '%d ý~éárs'
27920
  },
27921
+ ordinalParse: /\d{1,2}(th|st|nd|rd)/,
27922
  ordinal : function (number) {
27923
  var b = number % 10,
27924
  output = (~~(number % 100 / 10) === 1) ? 'th' :
27939
 
27940
 
27941
  /***/ },
27942
+ /* 397 */
27943
  /***/ function(module, exports, __webpack_require__) {
27944
 
27945
  //! moment.js locale configuration
27990
  y : 'ọdún kan',
27991
  yy : 'ọdún %d'
27992
  },
27993
+ ordinalParse : /ọjọ́\s\d{1,2}/,
27994
  ordinal : 'ọjọ́ %d',
27995
  week : {
27996
  dow : 1, // Monday is the first day of the week.
28004
 
28005
 
28006
  /***/ },
28007
+ /* 398 */
28008
  /***/ function(module, exports, __webpack_require__) {
28009
 
28010
  //! moment.js locale configuration
28026
  weekdaysShort : '周日_周一_周二_周三_周四_周五_周六'.split('_'),
28027
  weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
28028
  longDateFormat : {
28029
+ LT : 'Ah点mm',
28030
+ LTS : 'Ah点m分s秒',
28031
+ L : 'YYYY-MM-DD',
28032
  LL : 'YYYY年MMMD日',
28033
  LLL : 'YYYY年MMMD日Ah点mm分',
28034
  LLLL : 'YYYY年MMMD日ddddAh点mm分',
28035
+ l : 'YYYY-MM-DD',
28036
  ll : 'YYYY年MMMD日',
28037
+ lll : 'YYYY年MMMD日Ah点mm',
28038
+ llll : 'YYYY年MMMD日ddddAh点mm'
28039
  },
28040
  meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
28041
  meridiemHour: function (hour, meridiem) {
28069
  }
28070
  },
28071
  calendar : {
28072
+ sameDay : function () {
28073
+ return this.minutes() === 0 ? '[今天]Ah[点整]' : '[今天]LT';
28074
+ },
28075
+ nextDay : function () {
28076
+ return this.minutes() === 0 ? '[明天]Ah[点整]' : '[明天]LT';
28077
+ },
28078
+ lastDay : function () {
28079
+ return this.minutes() === 0 ? '[昨天]Ah[点整]' : '[昨天]LT';
28080
+ },
28081
+ nextWeek : function () {
28082
+ var startOfWeek, prefix;
28083
+ startOfWeek = moment().startOf('week');
28084
+ prefix = this.diff(startOfWeek, 'days') >= 7 ? '[下]' : '[本]';
28085
+ return this.minutes() === 0 ? prefix + 'dddAh点整' : prefix + 'dddAh点mm';
28086
+ },
28087
+ lastWeek : function () {
28088
+ var startOfWeek, prefix;
28089
+ startOfWeek = moment().startOf('week');
28090
+ prefix = this.unix() < startOfWeek.unix() ? '[上]' : '[本]';
28091
+ return this.minutes() === 0 ? prefix + 'dddAh点整' : prefix + 'dddAh点mm';
28092
+ },
28093
+ sameElse : 'LL'
28094
  },
28095
+ ordinalParse: /\d{1,2}(日|月|周)/,
28096
  ordinal : function (number, period) {
28097
  switch (period) {
28098
  case 'd':
28136
 
28137
 
28138
  /***/ },
28139
+ /* 399 */
28140
  /***/ function(module, exports, __webpack_require__) {
28141
 
28142
  //! moment.js locale configuration
28159
  weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),
28160
  weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
28161
  longDateFormat : {
28162
+ LT : 'Ah點mm',
28163
+ LTS : 'Ah點m分s秒',
28164
  L : 'YYYY年MMMD日',
28165
  LL : 'YYYY年MMMD日',
28166
+ LLL : 'YYYY年MMMD日Ah點mm',
28167
+ LLLL : 'YYYY年MMMD日ddddAh點mm',
28168
  l : 'YYYY年MMMD日',
28169
  ll : 'YYYY年MMMD日',
28170
+ lll : 'YYYY年MMMD日Ah點mm',
28171
+ llll : 'YYYY年MMMD日ddddAh點mm'
28172
  },
28173
  meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
28174
  meridiemHour : function (hour, meridiem) {
28207
  lastWeek : '[上]ddddLT',
28208
  sameElse : 'L'
28209
  },
28210
+ ordinalParse: /\d{1,2}(日|月|週)/,
28211
  ordinal : function (number, period) {
28212
  switch (period) {
28213
  case 'd' :
28246
 
28247
 
28248
  /***/ },
28249
+ /* 400 */
28250
  /***/ function(module, exports, __webpack_require__) {
28251
 
28252
  //! moment.js locale configuration
28268
  weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),
28269
  weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
28270
  longDateFormat : {
28271
+ LT : 'Ah點mm',
28272
+ LTS : 'Ah點m分s秒',
28273
  L : 'YYYY年MMMD日',
28274
  LL : 'YYYY年MMMD日',
28275
+ LLL : 'YYYY年MMMD日Ah點mm',
28276
+ LLLL : 'YYYY年MMMD日ddddAh點mm',
28277
  l : 'YYYY年MMMD日',
28278
  ll : 'YYYY年MMMD日',
28279
+ lll : 'YYYY年MMMD日Ah點mm',
28280
+ llll : 'YYYY年MMMD日ddddAh點mm'
28281
  },
28282
  meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
28283
  meridiemHour : function (hour, meridiem) {
28316
  lastWeek : '[上]ddddLT',
28317
  sameElse : 'L'
28318
  },
28319
+ ordinalParse: /\d{1,2}(日|月|週)/,
28320
  ordinal : function (number, period) {
28321
  switch (period) {
28322
  case 'd' :
28355
 
28356
 
28357
  /***/ },
28358
+ /* 401 */,
28359
+ /* 402 */,
28360
+ /* 403 */,
28361
+ /* 404 */,
28362
+ /* 405 */,
28363
+ /* 406 */,
28364
+ /* 407 */
28365
  /***/ function(module, exports, __webpack_require__) {
28366
 
28367
  'use strict';
28380
 
28381
  var _history = __webpack_require__(237);
28382
 
28383
+ var _newslettersTypesJsx = __webpack_require__(408);
28384
 
28385
  var _newslettersTypesJsx2 = _interopRequireDefault(_newslettersTypesJsx);
28386
 
28387
+ var _newslettersTemplatesJsx = __webpack_require__(410);
28388
 
28389
  var _newslettersTemplatesJsx2 = _interopRequireDefault(_newslettersTemplatesJsx);
28390
 
28391
+ var _newslettersSendJsx = __webpack_require__(411);
28392
 
28393
  var _newslettersSendJsx2 = _interopRequireDefault(_newslettersSendJsx);
28394
 
28395
+ var _newslettersTypesStandardJsx = __webpack_require__(420);
28396
 
28397
  var _newslettersTypesStandardJsx2 = _interopRequireDefault(_newslettersTypesStandardJsx);
28398
 
28399
+ var _newslettersTypesWelcomeWelcomeJsx = __webpack_require__(421);
28400
 
28401
  var _newslettersTypesWelcomeWelcomeJsx2 = _interopRequireDefault(_newslettersTypesWelcomeWelcomeJsx);
28402
 
28403
+ var _newslettersTypesNotificationNotificationJsx = __webpack_require__(422);
28404
 
28405
  var _newslettersTypesNotificationNotificationJsx2 = _interopRequireDefault(_newslettersTypesNotificationNotificationJsx);
28406
 
28407
+ var _newslettersListingsStandardJsx = __webpack_require__(423);
28408
 
28409
  var _newslettersListingsStandardJsx2 = _interopRequireDefault(_newslettersListingsStandardJsx);
28410
 
28411
+ var _newslettersListingsWelcomeJsx = __webpack_require__(426);
28412
 
28413
  var _newslettersListingsWelcomeJsx2 = _interopRequireDefault(_newslettersListingsWelcomeJsx);
28414
 
28415
+ var _newslettersListingsNotificationJsx = __webpack_require__(427);
28416
 
28417
  var _newslettersListingsNotificationJsx2 = _interopRequireDefault(_newslettersListingsNotificationJsx);
28418
 
28419
+ var _newslettersListingsNotification_historyJsx = __webpack_require__(428);
28420
 
28421
  var _newslettersListingsNotification_historyJsx2 = _interopRequireDefault(_newslettersListingsNotification_historyJsx);
28422
 
28458
  /* Listings */ /* Newsletter: type selection */ /* New newsletter: types */ /* Template selection */ /* Sending options */
28459
 
28460
  /***/ },
28461
+ /* 408 */
28462
  /***/ function(module, exports, __webpack_require__) {
28463
 
28464
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
28465
 
28466
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(2), __webpack_require__(268), __webpack_require__(181), __webpack_require__(409)], __WEBPACK_AMD_DEFINE_RESULT__ = function (React, MailPoet, Router, Breadcrumb) {
28467
  var NewsletterTypes = React.createClass({
28468
  displayName: 'NewsletterTypes',
28469
 
28610
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
28611
 
28612
  /***/ },
28613
+ /* 409 */
28614
  /***/ function(module, exports, __webpack_require__) {
28615
 
28616
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
28678
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
28679
 
28680
  /***/ },
28681
+ /* 410 */
28682
  /***/ function(module, exports, __webpack_require__) {
28683
 
28684
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
28685
 
28686
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(2), __webpack_require__(271), __webpack_require__(268), __webpack_require__(181), __webpack_require__(269), __webpack_require__(409)], __WEBPACK_AMD_DEFINE_RESULT__ = function (React, _, MailPoet, Router, classNames, Breadcrumb) {
28687
 
28688
  var ImportTemplate = React.createClass({
28689
  displayName: 'ImportTemplate',
28950
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
28951
 
28952
  /***/ },
28953
+ /* 411 */
28954
  /***/ function(module, exports, __webpack_require__) {
28955
 
28956
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
28957
 
28958
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
28959
 
28960
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(2), __webpack_require__(181), __webpack_require__(271), __webpack_require__(268), __webpack_require__(282), __webpack_require__(412), __webpack_require__(415), __webpack_require__(418), __webpack_require__(409)], __WEBPACK_AMD_DEFINE_RESULT__ = function (React, Router, _, MailPoet, Form, StandardNewsletterFields, NotificationNewsletterFields, WelcomeNewsletterFields, Breadcrumb) {
28961
 
28962
  var NewsletterSend = React.createClass({
28963
  displayName: 'NewsletterSend',
29196
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
29197
 
29198
  /***/ },
29199
+ /* 412 */
29200
  /***/ function(module, exports, __webpack_require__) {
29201
 
29202
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
29205
 
29206
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
29207
 
29208
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(2), __webpack_require__(267), __webpack_require__(271), __webpack_require__(268), __webpack_require__(413), __webpack_require__(288), __webpack_require__(286), __webpack_require__(284)], __WEBPACK_AMD_DEFINE_RESULT__ = function (React, jQuery, _, MailPoet, Hooks, Checkbox, Select, Text) {
29209
 
29210
  var settings = window.mailpoet_settings || {},
29211
  currentTime = window.mailpoet_current_time || '00:00',
29574
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
29575
 
29576
  /***/ },
29577
+ /* 413 */,
29578
+ /* 414 */,
29579
+ /* 415 */
29580
  /***/ function(module, exports, __webpack_require__) {
29581
 
29582
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
29583
 
29584
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(268), __webpack_require__(413), __webpack_require__(416), __webpack_require__(271)], __WEBPACK_AMD_DEFINE_RESULT__ = function (MailPoet, Hooks, Scheduling, _) {
29585
 
29586
  var settings = window.mailpoet_settings || {};
29587
 
29677
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
29678
 
29679
  /***/ },
29680
+ /* 416 */
29681
  /***/ function(module, exports, __webpack_require__) {
29682
 
29683
  'use strict';
29696
 
29697
  var _formFieldsSelectJsx2 = _interopRequireDefault(_formFieldsSelectJsx);
29698
 
29699
+ var _newslettersSchedulingCommonJsx = __webpack_require__(417);
29700
 
29701
  var intervalField = {
29702
  name: 'intervalType',
29810
  module.exports = NotificationScheduling;
29811
 
29812
  /***/ },
29813
+ /* 417 */
29814
  /***/ function(module, exports, __webpack_require__) {
29815
 
29816
  'use strict';
29904
  exports.nthWeekDayValues = _nthWeekDayValues;
29905
 
29906
  /***/ },
29907
+ /* 418 */
29908
  /***/ function(module, exports, __webpack_require__) {
29909
 
29910
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
29911
 
29912
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(268), __webpack_require__(413), __webpack_require__(419)], __WEBPACK_AMD_DEFINE_RESULT__ = function (MailPoet, Hooks, Scheduling) {
29913
 
29914
  var settings = window.mailpoet_settings || {};
29915
 
29978
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
29979
 
29980
  /***/ },
29981
+ /* 419 */
29982
  /***/ function(module, exports, __webpack_require__) {
29983
 
29984
  'use strict';
30005
 
30006
  var _formFieldsTextJsx2 = _interopRequireDefault(_formFieldsTextJsx);
30007
 
30008
+ var _newslettersSchedulingCommonJsx = __webpack_require__(417);
30009
 
30010
  var availableRoles = window.mailpoet_roles || {};
30011
  var availableSegments = _underscore2['default'].filter(window.mailpoet_segments || [], function (segment) {
30150
  module.exports = WelcomeScheduling;
30151
 
30152
  /***/ },
30153
+ /* 420 */
30154
  /***/ function(module, exports, __webpack_require__) {
30155
 
30156
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
30157
 
30158
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(2), __webpack_require__(181), __webpack_require__(268), __webpack_require__(409)], __WEBPACK_AMD_DEFINE_RESULT__ = function (React, Router, MailPoet, Breadcrumb) {
30159
 
30160
  var NewsletterStandard = React.createClass({
30161
  displayName: 'NewsletterStandard',
30204
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
30205
 
30206
  /***/ },
30207
+ /* 421 */
30208
  /***/ function(module, exports, __webpack_require__) {
30209
 
30210
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
30211
 
30212
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(271), __webpack_require__(2), __webpack_require__(181), __webpack_require__(268), __webpack_require__(419), __webpack_require__(409)], __WEBPACK_AMD_DEFINE_RESULT__ = function (_, React, Router, MailPoet, Scheduling, Breadcrumb) {
30213
 
30214
  var field = {
30215
  name: 'options',
30306
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
30307
 
30308
  /***/ },
30309
+ /* 422 */
30310
  /***/ function(module, exports, __webpack_require__) {
30311
 
30312
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
30313
 
30314
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(271), __webpack_require__(2), __webpack_require__(181), __webpack_require__(268), __webpack_require__(416), __webpack_require__(409)], __WEBPACK_AMD_DEFINE_RESULT__ = function (_, React, Router, MailPoet, Scheduling, Breadcrumb) {
30315
 
30316
  var field = {
30317
  name: 'options',
30400
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
30401
 
30402
  /***/ },
30403
+ /* 423 */
30404
  /***/ function(module, exports, __webpack_require__) {
30405
 
30406
  'use strict';
30429
 
30430
  var _listingListingJsx2 = _interopRequireDefault(_listingListingJsx);
30431
 
30432
+ var _newslettersListingsTabsJsx = __webpack_require__(424);
30433
 
30434
  var _newslettersListingsTabsJsx2 = _interopRequireDefault(_newslettersListingsTabsJsx);
30435
 
30436
+ var _newslettersListingsMixinsJsx = __webpack_require__(425);
30437
 
30438
  var mailpoet_tracking_enabled = !!window['mailpoet_tracking_enabled'];
30439
  var mailpoet_settings = window.mailpoet_settings || {};
30640
  module.exports = NewsletterListStandard;
30641
 
30642
  /***/ },
30643
+ /* 424 */
30644
  /***/ function(module, exports, __webpack_require__) {
30645
 
30646
  'use strict';
30710
  module.exports = ListingTabs;
30711
 
30712
  /***/ },
30713
+ /* 425 */
30714
  /***/ function(module, exports, __webpack_require__) {
30715
 
30716
  'use strict';
30729
 
30730
  var _reactDom2 = _interopRequireDefault(_reactDom);
30731
 
30732
+ var _reactStringReplace = __webpack_require__(401);
30733
 
30734
  var _reactStringReplace2 = _interopRequireDefault(_reactStringReplace);
30735
 
30995
  exports.MailerMixin = _MailerMixin;
30996
 
30997
  /***/ },
30998
+ /* 426 */
30999
  /***/ function(module, exports, __webpack_require__) {
31000
 
31001
  'use strict';
31014
 
31015
  var _listingListingJsx2 = _interopRequireDefault(_listingListingJsx);
31016
 
31017
+ var _newslettersListingsTabsJsx = __webpack_require__(424);
31018
 
31019
  var _newslettersListingsTabsJsx2 = _interopRequireDefault(_newslettersListingsTabsJsx);
31020
 
31021
+ var _newslettersListingsMixinsJsx = __webpack_require__(425);
31022
 
31023
  var _classnames = __webpack_require__(269);
31024
 
31394
  module.exports = NewsletterListWelcome;
31395
 
31396
  /***/ },
31397
+ /* 427 */
31398
  /***/ function(module, exports, __webpack_require__) {
31399
 
31400
  'use strict';
31413
 
31414
  var _listingListingJsx2 = _interopRequireDefault(_listingListingJsx);
31415
 
31416
+ var _newslettersListingsTabsJsx = __webpack_require__(424);
31417
 
31418
  var _newslettersListingsTabsJsx2 = _interopRequireDefault(_newslettersListingsTabsJsx);
31419
 
31420
+ var _newslettersListingsMixinsJsx = __webpack_require__(425);
31421
 
31422
  var _classnames = __webpack_require__(269);
31423
 
31431
 
31432
  var _mailpoet2 = _interopRequireDefault(_mailpoet);
31433
 
31434
+ var _newslettersSchedulingCommonJsx = __webpack_require__(417);
31435
 
31436
  var mailpoet_settings = window.mailpoet_settings || {};
31437
 
31746
  module.exports = NewsletterListNotification;
31747
 
31748
  /***/ },
31749
+ /* 428 */
31750
  /***/ function(module, exports, __webpack_require__) {
31751
 
31752
  'use strict';
31775
 
31776
  var _listingListingJsx2 = _interopRequireDefault(_listingListingJsx);
31777
 
31778
+ var _newslettersListingsTabsJsx = __webpack_require__(424);
31779
 
31780
  var _newslettersListingsTabsJsx2 = _interopRequireDefault(_newslettersListingsTabsJsx);
31781
 
31782
+ var _newslettersListingsMixinsJsx = __webpack_require__(425);
31783
 
31784
  var mailpoet_tracking_enabled = !!window['mailpoet_tracking_enabled'];
31785
  var mailpoet_settings = window.mailpoet_settings || {};
31918
  module.exports = NewsletterListNotificationHistory;
31919
 
31920
  /***/ },
31921
+ /* 429 */
31922
  /***/ function(module, exports, __webpack_require__) {
31923
 
31924
  'use strict';
31937
 
31938
  var _history = __webpack_require__(237);
31939
 
31940
+ var _segmentsListJsx = __webpack_require__(430);
31941
 
31942
  var _segmentsListJsx2 = _interopRequireDefault(_segmentsListJsx);
31943
 
31944
+ var _segmentsFormJsx = __webpack_require__(431);
31945
 
31946
  var _segmentsFormJsx2 = _interopRequireDefault(_segmentsFormJsx);
31947
 
31973
  }
31974
 
31975
  /***/ },
31976
+ /* 430 */
31977
  /***/ function(module, exports, __webpack_require__) {
31978
 
31979
  'use strict';
32289
  module.exports = SegmentList;
32290
 
32291
  /***/ },
32292
+ /* 431 */
32293
  /***/ function(module, exports, __webpack_require__) {
32294
 
32295
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
32349
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
32350
 
32351
  /***/ },
32352
+ /* 432 */
32353
  /***/ function(module, exports, __webpack_require__) {
32354
 
32355
  'use strict';
32368
 
32369
  var _history = __webpack_require__(237);
32370
 
32371
+ var _formsListJsx = __webpack_require__(433);
32372
 
32373
  var _formsListJsx2 = _interopRequireDefault(_formsListJsx);
32374
 
32398
  }
32399
 
32400
  /***/ },
32401
+ /* 433 */
32402
  /***/ function(module, exports, __webpack_require__) {
32403
 
32404
  'use strict';
32629
  module.exports = FormList;
32630
 
32631
  /***/ },
32632
+ /* 434 */
32633
  /***/ function(module, exports, __webpack_require__) {
32634
 
32635
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
32636
+ __webpack_require__(435),
32637
  __webpack_require__(267),
32638
  __webpack_require__(268)
32639
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(
32710
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
32711
 
32712
  /***/ },
32713
+ /* 435 */
32714
  /***/ function(module, exports, __webpack_require__) {
32715
 
32716
+ /* WEBPACK VAR INJECTION */(function(global) {module.exports = global["Backbone"] = __webpack_require__(436);
32717
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
32718
 
32719
  /***/ },
32720
+ /* 436 */
32721
  /***/ function(module, exports, __webpack_require__) {
32722
 
32723
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(global) {// Backbone.js 1.3.3
34644
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
34645
 
34646
  /***/ },
34647
+ /* 437 */
34648
  /***/ function(module, exports, __webpack_require__) {
34649
 
34650
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
34651
+ __webpack_require__(435),
34652
  __webpack_require__(271),
34653
  __webpack_require__(267),
34654
  __webpack_require__(268),
34655
+ __webpack_require__(438),
34656
+ __webpack_require__(439),
34657
+ __webpack_require__(440),
34658
  __webpack_require__(290),
34659
  __webpack_require__(280)
34660
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function (
35758
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
35759
 
35760
  /***/ },
35761
+ /* 438 */,
35762
+ /* 439 */
35763
  /***/ function(module, exports) {
35764
 
35765
  /*!
35770
  !function(e){"use strict";function t(t,r){if(r=r||{},r.worker&&w.WORKERS_SUPPORTED){var n=h();return n.userStep=r.step,n.userChunk=r.chunk,n.userComplete=r.complete,n.userError=r.error,r.step=m(r.step),r.chunk=m(r.chunk),r.complete=m(r.complete),r.error=m(r.error),delete r.worker,void n.postMessage({input:t,config:r,workerId:n.id})}var o=null;return"string"==typeof t?o=r.download?new i(r):new a(r):(e.File&&t instanceof File||t instanceof Object)&&(o=new s(r)),o.stream(t)}function r(e,t){function r(){"object"==typeof t&&("string"==typeof t.delimiter&&1==t.delimiter.length&&-1==w.BAD_DELIMITERS.indexOf(t.delimiter)&&(u=t.delimiter),("boolean"==typeof t.quotes||t.quotes instanceof Array)&&(o=t.quotes),"string"==typeof t.newline&&(f=t.newline))}function n(e){if("object"!=typeof e)return[];var t=[];for(var r in e)t.push(r);return t}function i(e,t){var r="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var n=e instanceof Array&&e.length>0,i=!(t[0]instanceof Array);if(n){for(var a=0;a<e.length;a++)a>0&&(r+=u),r+=s(e[a],a);t.length>0&&(r+=f)}for(var o=0;o<t.length;o++){for(var h=n?e.length:t[o].length,d=0;h>d;d++){d>0&&(r+=u);var c=n&&i?e[d]:d;r+=s(t[o][c],d)}o<t.length-1&&(r+=f)}return r}function s(e,t){if("undefined"==typeof e||null===e)return"";e=e.toString().replace(/"/g,'""');var r="boolean"==typeof o&&o||o instanceof Array&&o[t]||a(e,w.BAD_DELIMITERS)||e.indexOf(u)>-1||" "==e.charAt(0)||" "==e.charAt(e.length-1);return r?'"'+e+'"':e}function a(e,t){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>-1)return!0;return!1}var o=!1,u=",",f="\r\n";if(r(),"string"==typeof e&&(e=JSON.parse(e)),e instanceof Array){if(!e.length||e[0]instanceof Array)return i(null,e);if("object"==typeof e[0])return i(n(e[0]),e)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),e.data instanceof Array&&(e.fields||(e.fields=e.data[0]instanceof Array?e.fields:n(e.data[0])),e.data[0]instanceof Array||"object"==typeof e.data[0]||(e.data=[e.data])),i(e.fields||[],e.data||[]);throw"exception: Unable to serialize unrecognized input"}function n(t){function r(e){var t=_(e);t.chunkSize=parseInt(t.chunkSize),this._handle=new o(t),this._handle.streamer=this,this._config=t}this._handle=null,this._paused=!1,this._finished=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this._completeResults={data:[],errors:[],meta:{}},r.call(this,t),this.parseChunk=function(t){var r=this._partialLine+t;this._partialLine="";var n=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var i=n.meta.cursor;this._finished||(this._partialLine=r.substring(i-this._baseIndex),this._baseIndex=i),n&&n.data&&(this._rowCount+=n.data.length);var s=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(k)e.postMessage({results:n,workerId:w.WORKER_ID,finished:s});else if(m(this._config.chunk)){if(this._config.chunk(n,this._handle),this._paused)return;n=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(n.data),this._completeResults.errors=this._completeResults.errors.concat(n.errors),this._completeResults.meta=n.meta),!s||!m(this._config.complete)||n&&n.meta.aborted||this._config.complete(this._completeResults),s||n&&n.meta.paused||this._nextChunk(),n}},this._sendError=function(t){m(this._config.error)?this._config.error(t):k&&this._config.error&&e.postMessage({workerId:w.WORKER_ID,error:t,finished:!1})}}function i(e){function t(e){var t=e.getResponseHeader("Content-Range");return parseInt(t.substr(t.lastIndexOf("/")+1))}e=e||{},e.chunkSize||(e.chunkSize=w.RemoteChunkSize),n.call(this,e);var r;this._nextChunk=k?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)return void this._chunkLoaded();if(r=new XMLHttpRequest,k||(r.onload=g(this._chunkLoaded,this),r.onerror=g(this._chunkError,this)),r.open("GET",this._input,!k),this._config.chunkSize){var e=this._start+this._config.chunkSize-1;r.setRequestHeader("Range","bytes="+this._start+"-"+e),r.setRequestHeader("If-None-Match","webkit-no-cache")}try{r.send()}catch(t){this._chunkError(t.message)}k&&0==r.status?this._chunkError():this._start+=this._config.chunkSize},this._chunkLoaded=function(){if(4==r.readyState){if(r.status<200||r.status>=400)return void this._chunkError();this._finished=!this._config.chunkSize||this._start>t(r),this.parseChunk(r.responseText)}},this._chunkError=function(e){var t=r.statusText||e;this._sendError(t)}}function s(e){e=e||{},e.chunkSize||(e.chunkSize=w.LocalChunkSize),n.call(this,e);var t,r,i="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,r=e.slice||e.webkitSlice||e.mozSlice,i?(t=new FileReader,t.onload=g(this._chunkLoaded,this),t.onerror=g(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var n=Math.min(this._start+this._config.chunkSize,this._input.size);e=r.call(e,this._start,n)}var s=t.readAsText(e,this._config.encoding);i||this._chunkLoaded({target:{result:s}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function a(e){e=e||{},n.call(this,e);var t,r;this.stream=function(e){return t=e,r=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e=this._config.chunkSize,t=e?r.substr(0,e):r;return r=e?r.substr(e):"",this._finished=!r,this.parseChunk(t)}}}function o(e){function t(){if(b&&c&&(f("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+w.DefaultDelimiter+"'"),c=!1),e.skipEmptyLines)for(var t=0;t<b.data.length;t++)1==b.data[t].length&&""==b.data[t][0]&&b.data.splice(t--,1);return r()&&n(),i()}function r(){return e.header&&0==y.length}function n(){if(b){for(var e=0;r()&&e<b.data.length;e++)for(var t=0;t<b.data[e].length;t++)y.push(b.data[e][t]);b.data.splice(0,1)}}function i(){if(!b||!e.header&&!e.dynamicTyping)return b;for(var t=0;t<b.data.length;t++){for(var r={},n=0;n<b.data[t].length;n++){if(e.dynamicTyping){var i=b.data[t][n];b.data[t][n]="true"==i||"TRUE"==i?!0:"false"==i||"FALSE"==i?!1:o(i)}e.header&&(n>=y.length?(r.__parsed_extra||(r.__parsed_extra=[]),r.__parsed_extra.push(b.data[t][n])):r[y[n]]=b.data[t][n])}e.header&&(b.data[t]=r,n>y.length?f("FieldMismatch","TooManyFields","Too many fields: expected "+y.length+" fields but parsed "+n,t):n<y.length&&f("FieldMismatch","TooFewFields","Too few fields: expected "+y.length+" fields but parsed "+n,t))}return e.header&&b.meta&&(b.meta.fields=y),b}function s(t){for(var r,n,i,s=[","," ","|",";",w.RECORD_SEP,w.UNIT_SEP],a=0;a<s.length;a++){var o=s[a],f=0,h=0;i=void 0;for(var d=new u({delimiter:o,preview:10}).parse(t),c=0;c<d.data.length;c++){var l=d.data[c].length;h+=l,"undefined"!=typeof i?l>1&&(f+=Math.abs(l-i),i=l):i=l}h/=d.data.length,("undefined"==typeof n||n>f)&&h>1.99&&(n=f,r=o)}return e.delimiter=r,{successful:!!r,bestDelimiter:r}}function a(e){e=e.substr(0,1048576);var t=e.split("\r");if(1==t.length)return"\n";for(var r=0,n=0;n<t.length;n++)"\n"==t[n][0]&&r++;return r>=t.length/2?"\r\n":"\r"}function o(e){var t=l.test(e);return t?parseFloat(e):e}function f(e,t,r,n){b.errors.push({type:e,code:t,message:r,row:n})}var h,d,c,l=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,p=this,g=0,v=!1,k=!1,y=[],b={data:[],errors:[],meta:{}};if(m(e.step)){var R=e.step;e.step=function(n){if(b=n,r())t();else{if(t(),0==b.data.length)return;g+=n.data.length,e.preview&&g>e.preview?d.abort():R(b,p)}}}this.parse=function(r,n,i){if(e.newline||(e.newline=a(r)),c=!1,!e.delimiter){var o=s(r);o.successful?e.delimiter=o.bestDelimiter:(c=!0,e.delimiter=w.DefaultDelimiter),b.meta.delimiter=e.delimiter}var f=_(e);return e.preview&&e.header&&f.preview++,h=r,d=new u(f),b=d.parse(h,n,i),t(),v?{meta:{paused:!0}}:b||{meta:{paused:!1}}},this.paused=function(){return v},this.pause=function(){v=!0,d.abort(),h=h.substr(d.getCharIndex())},this.resume=function(){v=!1,p.streamer.parseChunk(h)},this.aborted=function(){return k},this.abort=function(){k=!0,d.abort(),b.meta.aborted=!0,m(e.complete)&&e.complete(b),h=""}}function u(e){e=e||{};var t=e.delimiter,r=e.newline,n=e.comments,i=e.step,s=e.preview,a=e.fastMode;if(("string"!=typeof t||w.BAD_DELIMITERS.indexOf(t)>-1)&&(t=","),n===t)throw"Comment character same as delimiter";n===!0?n="#":("string"!=typeof n||w.BAD_DELIMITERS.indexOf(n)>-1)&&(n=!1),"\n"!=r&&"\r"!=r&&"\r\n"!=r&&(r="\n");var o=0,u=!1;this.parse=function(e,f,h){function d(e){b.push(e),S=o}function c(t){return h?p():(t||(t=e.substr(o)),w.push(t),o=g,d(w),y&&_(),p())}function l(t){o=t,d(w),w=[],O=e.indexOf(r,o)}function p(e){return{data:b,errors:R,meta:{delimiter:t,linebreak:r,aborted:u,truncated:!!e,cursor:S+(f||0)}}}function _(){i(p()),b=[],R=[]}if("string"!=typeof e)throw"Input must be a string";var g=e.length,m=t.length,v=r.length,k=n.length,y="function"==typeof i;o=0;var b=[],R=[],w=[],S=0;if(!e)return p();if(a||a!==!1&&-1===e.indexOf('"')){for(var E=e.split(r),C=0;C<E.length;C++){var w=E[C];if(o+=w.length,C!==E.length-1)o+=r.length;else if(h)return p();if(!n||w.substr(0,k)!=n){if(y){if(b=[],d(w.split(t)),_(),u)return p()}else d(w.split(t));if(s&&C>=s)return b=b.slice(0,s),p(!0)}}return p()}for(var x=e.indexOf(t,o),O=e.indexOf(r,o);;)if('"'!=e[o])if(n&&0===w.length&&e.substr(o,k)===n){if(-1==O)return p();o=O+v,O=e.indexOf(r,o),x=e.indexOf(t,o)}else if(-1!==x&&(O>x||-1===O))w.push(e.substring(o,x)),o=x+m,x=e.indexOf(t,o);else{if(-1===O)break;if(w.push(e.substring(o,O)),l(O+v),y&&(_(),u))return p();if(s&&b.length>=s)return p(!0)}else{var I=o;for(o++;;){var I=e.indexOf('"',I+1);if(-1===I)return h||R.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:o}),c();if(I===g-1){var D=e.substring(o,I).replace(/""/g,'"');return c(D)}if('"'!=e[I+1]){if(e[I+1]==t){w.push(e.substring(o,I).replace(/""/g,'"')),o=I+1+m,x=e.indexOf(t,o),O=e.indexOf(r,o);break}if(e.substr(I+1,v)===r){if(w.push(e.substring(o,I).replace(/""/g,'"')),l(I+1+v),x=e.indexOf(t,o),y&&(_(),u))return p();if(s&&b.length>=s)return p(!0);break}}else I++}}return c()},this.abort=function(){u=!0},this.getCharIndex=function(){return o}}function f(){var e=document.getElementsByTagName("script");return e.length?e[e.length-1].src:""}function h(){if(!w.WORKERS_SUPPORTED)return!1;if(!y&&null===w.SCRIPT_PATH)throw new Error("Script path cannot be determined automatically when Papa Parse is loaded asynchronously. You need to set Papa.SCRIPT_PATH manually.");var t=new e.Worker(w.SCRIPT_PATH||v);return t.onmessage=d,t.id=R++,b[t.id]=t,t}function d(e){var t=e.data,r=b[t.workerId],n=!1;if(t.error)r.userError(t.error,t.file);else if(t.results&&t.results.data){var i=function(){n=!0,c(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},s={abort:i,pause:l,resume:l};if(m(r.userStep)){for(var a=0;a<t.results.data.length&&(r.userStep({data:[t.results.data[a]],errors:t.results.errors,meta:t.results.meta},s),!n);a++);delete t.results}else m(r.userChunk)&&(r.userChunk(t.results,s,t.file),delete t.results)}t.finished&&!n&&c(t.workerId,t.results)}function c(e,t){var r=b[e];m(r.userComplete)&&r.userComplete(t),r.terminate(),delete b[e]}function l(){throw"Not implemented."}function p(t){var r=t.data;if("undefined"==typeof w.WORKER_ID&&r&&(w.WORKER_ID=r.workerId),"string"==typeof r.input)e.postMessage({workerId:w.WORKER_ID,results:w.parse(r.input,r.config),finished:!0});else if(e.File&&r.input instanceof File||r.input instanceof Object){var n=w.parse(r.input,r.config);n&&e.postMessage({workerId:w.WORKER_ID,results:n,finished:!0})}}function _(e){if("object"!=typeof e)return e;var t=e instanceof Array?[]:{};for(var r in e)t[r]=_(e[r]);return t}function g(e,t){return function(){e.apply(t,arguments)}}function m(e){return"function"==typeof e}var v,k=!e.document&&!!e.postMessage,y=!1,b={},R=0,w={};if(w.parse=t,w.unparse=r,w.RECORD_SEP=String.fromCharCode(30),w.UNIT_SEP=String.fromCharCode(31),w.BYTE_ORDER_MARK="",w.BAD_DELIMITERS=["\r","\n",'"',w.BYTE_ORDER_MARK],w.WORKERS_SUPPORTED=!!e.Worker,w.SCRIPT_PATH=null,w.LocalChunkSize=10485760,w.RemoteChunkSize=5242880,w.DefaultDelimiter=",",w.Parser=u,w.ParserHandle=o,w.NetworkStreamer=i,w.FileStreamer=s,w.StringStreamer=a,"undefined"!=typeof module&&module.exports?module.exports=w:m(e.define)&&e.define.amd?e.define(function(){return w}):e.Papa=w,e.jQuery){var S=e.jQuery;S.fn.parse=function(t){function r(){if(0==a.length)return void(m(t.complete)&&t.complete());var e=a[0];if(m(t.before)){var r=t.before(e.file,e.inputElem);if("object"==typeof r){if("abort"==r.action)return void n("AbortError",e.file,e.inputElem,r.reason);if("skip"==r.action)return void i();"object"==typeof r.config&&(e.instanceConfig=S.extend(e.instanceConfig,r.config))}else if("skip"==r)return void i()}var s=e.instanceConfig.complete;e.instanceConfig.complete=function(t){m(s)&&s(t,e.file,e.inputElem),i()},w.parse(e.file,e.instanceConfig)}function n(e,r,n,i){m(t.error)&&t.error({name:e},r,n,i)}function i(){a.splice(0,1),r()}var s=t.config||{},a=[];return this.each(function(){var t="INPUT"==S(this).prop("tagName").toUpperCase()&&"file"==S(this).attr("type").toLowerCase()&&e.FileReader;if(!t||!this.files||0==this.files.length)return!0;for(var r=0;r<this.files.length;r++)a.push({file:this.files[r],inputElem:this,instanceConfig:S.extend({},s)})}),r(),this}}k?e.onmessage=p:w.WORKERS_SUPPORTED&&(v=f(),document.body?document.addEventListener("DOMContentLoaded",function(){y=!0},!0):y=!0),i.prototype=Object.create(n.prototype),i.prototype.constructor=i,s.prototype=Object.create(n.prototype),s.prototype.constructor=s,a.prototype=Object.create(a.prototype),a.prototype.constructor=a}("undefined"!=typeof window?window:this);
35771
 
35772
  /***/ },
35773
+ /* 440 */
35774
  /***/ function(module, exports) {
35775
 
35776
  /*
35855
 
35856
 
35857
  /***/ },
35858
+ /* 441 */
35859
  /***/ function(module, exports, __webpack_require__) {
35860
 
35861
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
35862
  __webpack_require__(271),
35863
  __webpack_require__(267),
35864
  __webpack_require__(268),
35865
+ __webpack_require__(438),
35866
  __webpack_require__(280)
35867
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function (
35868
  _,
36028
 
36029
 
36030
  /***/ },
36031
+ /* 442 */
36032
  /***/ function(module, exports, __webpack_require__) {
36033
 
36034
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function() {
assets/js/admin_vendor.js CHANGED
@@ -5,7 +5,7 @@ webpackJsonp([1],[
5
  __webpack_require__(2);
6
  __webpack_require__(34);
7
  __webpack_require__(181);
8
- module.exports = __webpack_require__(408);
9
 
10
 
11
  /***/ },
@@ -18348,10 +18348,10 @@ webpackJsonp([1],[
18348
  */
18349
 
18350
  function getUnboundedScrollPosition(scrollable) {
18351
- if (scrollable.Window && scrollable instanceof scrollable.Window) {
18352
  return {
18353
- x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft,
18354
- y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop
18355
  };
18356
  }
18357
  return {
@@ -19100,9 +19100,7 @@ webpackJsonp([1],[
19100
  * @return {boolean} Whether or not the object is a DOM node.
19101
  */
19102
  function isNode(object) {
19103
- var doc = object ? object.ownerDocument || object : document;
19104
- var defaultView = doc.defaultView || window;
19105
- return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
19106
  }
19107
 
19108
  module.exports = isNode;
@@ -19111,7 +19109,7 @@ webpackJsonp([1],[
19111
  /* 155 */
19112
  /***/ function(module, exports) {
19113
 
19114
- /* WEBPACK VAR INJECTION */(function(global) {'use strict';
19115
 
19116
  /**
19117
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -19132,24 +19130,19 @@ webpackJsonp([1],[
19132
  *
19133
  * The activeElement will be null only if the document or document body is not
19134
  * yet defined.
19135
- *
19136
- * @param {?DOMDocument} doc Defaults to current document.
19137
- * @return {?DOMElement}
19138
  */
19139
- function getActiveElement(doc) /*?DOMElement*/{
19140
- doc = doc || global.document;
19141
- if (typeof doc === 'undefined') {
19142
  return null;
19143
  }
19144
  try {
19145
- return doc.activeElement || doc.body;
19146
  } catch (e) {
19147
- return doc.body;
19148
  }
19149
  }
19150
 
19151
  module.exports = getActiveElement;
19152
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
19153
 
19154
  /***/ },
19155
  /* 156 */
@@ -22167,30 +22160,28 @@ webpackJsonp([1],[
22167
  func = _React$PropTypes.func,
22168
  object = _React$PropTypes.object;
22169
 
22170
-
22171
- var propTypes = {
22172
- history: object,
22173
- children: _InternalPropTypes.routes,
22174
- routes: _InternalPropTypes.routes, // alias for children
22175
- render: func,
22176
- createElement: func,
22177
- onError: func,
22178
- onUpdate: func,
22179
-
22180
- // PRIVATE: For client-side rehydration of server match.
22181
- matchContext: object
22182
- };
22183
-
22184
  /**
22185
  * A <Router> is a high-level API for automatically setting up
22186
  * a router that renders a <RouterContext> with all the props
22187
  * it needs each time the URL changes.
22188
  */
 
22189
  var Router = _react2.default.createClass({
22190
  displayName: 'Router',
22191
 
22192
 
22193
- propTypes: propTypes,
 
 
 
 
 
 
 
 
 
 
 
22194
 
22195
  getDefaultProps: function getDefaultProps() {
22196
  return {
@@ -22287,7 +22278,7 @@ webpackJsonp([1],[
22287
 
22288
  // Only forward non-Router-specific props to routing context, as those are
22289
  // the only ones that might be custom routing context props.
22290
- Object.keys(propTypes).forEach(function (propType) {
22291
  return delete props[propType];
22292
  });
22293
 
@@ -22736,29 +22727,31 @@ webpackJsonp([1],[
22736
  changeRoutes = void 0,
22737
  enterRoutes = void 0;
22738
  if (prevRoutes) {
22739
- var parentIsLeaving = false;
22740
- leaveRoutes = prevRoutes.filter(function (route) {
22741
- if (parentIsLeaving) {
22742
- return true;
22743
- } else {
22744
- var isLeaving = nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState);
22745
- if (isLeaving) parentIsLeaving = true;
22746
- return isLeaving;
22747
- }
22748
- });
 
22749
 
22750
- // onLeave hooks start at the leaf route.
22751
- leaveRoutes.reverse();
22752
 
22753
- enterRoutes = [];
22754
- changeRoutes = [];
22755
 
22756
- nextRoutes.forEach(function (route) {
22757
- var isNew = prevRoutes.indexOf(route) === -1;
22758
- var paramsChanged = leaveRoutes.indexOf(route) !== -1;
22759
 
22760
- if (isNew || paramsChanged) enterRoutes.push(route);else changeRoutes.push(route);
22761
- });
 
22762
  } else {
22763
  leaveRoutes = [];
22764
  changeRoutes = [];
@@ -23252,6 +23245,8 @@ webpackJsonp([1],[
23252
 
23253
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
23254
 
 
 
23255
  exports.default = matchRoutes;
23256
 
23257
  var _AsyncUtils = __webpack_require__(192);
@@ -23400,32 +23395,38 @@ webpackJsonp([1],[
23400
  // By assumption, pattern is non-empty here, which is the prerequisite for
23401
  // actually terminating a match.
23402
  if (remainingPathname === '') {
23403
- var match = {
23404
- routes: [route],
23405
- params: createParams(paramNames, paramValues)
23406
- };
 
23407
 
23408
- getIndexRoute(route, location, paramNames, paramValues, function (error, indexRoute) {
23409
- if (error) {
23410
- callback(error);
23411
- } else {
23412
- if (Array.isArray(indexRoute)) {
23413
- var _match$routes;
23414
-
23415
- process.env.NODE_ENV !== 'production' ? (0, _routerWarning2.default)(indexRoute.every(function (route) {
23416
- return !route.path;
23417
- }), 'Index routes should not have paths') : void 0;
23418
- (_match$routes = match.routes).push.apply(_match$routes, indexRoute);
23419
- } else if (indexRoute) {
23420
- process.env.NODE_ENV !== 'production' ? (0, _routerWarning2.default)(!indexRoute.path, 'Index routes should not have paths') : void 0;
23421
- match.routes.push(indexRoute);
 
 
 
23422
  }
 
23423
 
23424
- callback(null, match);
23425
- }
23426
- });
 
23427
 
23428
- return;
23429
  }
23430
  }
23431
 
@@ -23934,6 +23935,11 @@ webpackJsonp([1],[
23934
  * You could use the following component to link to that route:
23935
  *
23936
  * <Link to={`/posts/${post.id}`} />
 
 
 
 
 
23937
  */
23938
  var Link = _react2.default.createClass({
23939
  displayName: 'Link',
@@ -23947,6 +23953,9 @@ webpackJsonp([1],[
23947
 
23948
  propTypes: {
23949
  to: oneOfType([string, object, func]),
 
 
 
23950
  activeStyle: object,
23951
  activeClassName: string,
23952
  onlyActiveOnIndex: bool.isRequired,
@@ -26338,7 +26347,12 @@ webpackJsonp([1],[
26338
  'use strict';
26339
 
26340
  exports.__esModule = true;
26341
- exports.default = createRouterHistory;
 
 
 
 
 
26342
 
26343
  var _useRouterHistory = __webpack_require__(224);
26344
 
@@ -26348,11 +26362,6 @@ webpackJsonp([1],[
26348
 
26349
  var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
26350
 
26351
- function createRouterHistory(createHistory) {
26352
- var history = void 0;
26353
- if (canUseDOM) history = (0, _useRouterHistory2.default)(createHistory)();
26354
- return history;
26355
- }
26356
  module.exports = exports['default'];
26357
 
26358
  /***/ },
@@ -26851,29 +26860,22 @@ webpackJsonp([1],[
26851
  /* 398 */,
26852
  /* 399 */,
26853
  /* 400 */,
26854
- /* 401 */,
26855
- /* 402 */,
26856
- /* 403 */,
26857
- /* 404 */,
26858
- /* 405 */,
26859
- /* 406 */,
26860
- /* 407 */,
26861
- /* 408 */
26862
  /***/ function(module, exports, __webpack_require__) {
26863
 
26864
  /* WEBPACK VAR INJECTION */(function(global) {if(!global["MailPoetLib"]) global["MailPoetLib"] = {};
26865
- module.exports = global["MailPoetLib"]["ReactStringReplace"] = __webpack_require__(409);
26866
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
26867
 
26868
  /***/ },
26869
- /* 409 */
26870
  /***/ function(module, exports, __webpack_require__) {
26871
 
26872
  /* eslint-disable vars-on-top, no-var, prefer-template */
26873
- var isRegExp = __webpack_require__(410);
26874
- var escapeRegExp = __webpack_require__(411);
26875
- var isString = __webpack_require__(412);
26876
- var flatten = __webpack_require__(413);
26877
 
26878
  /**
26879
  * Given a string, replace every substring that is matched by the `match` regex
@@ -26931,7 +26933,7 @@ webpackJsonp([1],[
26931
 
26932
 
26933
  /***/ },
26934
- /* 410 */
26935
  /***/ function(module, exports, __webpack_require__) {
26936
 
26937
  /* WEBPACK VAR INJECTION */(function(global, module) {/**
@@ -27059,7 +27061,7 @@ webpackJsonp([1],[
27059
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(291)(module)))
27060
 
27061
  /***/ },
27062
- /* 411 */
27063
  /***/ function(module, exports) {
27064
 
27065
  /* WEBPACK VAR INJECTION */(function(global) {/**
@@ -27232,7 +27234,7 @@ webpackJsonp([1],[
27232
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
27233
 
27234
  /***/ },
27235
- /* 412 */
27236
  /***/ function(module, exports) {
27237
 
27238
  /**
@@ -27333,7 +27335,7 @@ webpackJsonp([1],[
27333
 
27334
 
27335
  /***/ },
27336
- /* 413 */
27337
  /***/ function(module, exports) {
27338
 
27339
  /* WEBPACK VAR INJECTION */(function(global) {/**
5
  __webpack_require__(2);
6
  __webpack_require__(34);
7
  __webpack_require__(181);
8
+ module.exports = __webpack_require__(401);
9
 
10
 
11
  /***/ },
18348
  */
18349
 
18350
  function getUnboundedScrollPosition(scrollable) {
18351
+ if (scrollable === window) {
18352
  return {
18353
+ x: window.pageXOffset || document.documentElement.scrollLeft,
18354
+ y: window.pageYOffset || document.documentElement.scrollTop
18355
  };
18356
  }
18357
  return {
19100
  * @return {boolean} Whether or not the object is a DOM node.
19101
  */
19102
  function isNode(object) {
19103
+ return !!(object && (typeof Node === 'function' ? object instanceof Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
 
 
19104
  }
19105
 
19106
  module.exports = isNode;
19109
  /* 155 */
19110
  /***/ function(module, exports) {
19111
 
19112
+ 'use strict';
19113
 
19114
  /**
19115
  * Copyright (c) 2013-present, Facebook, Inc.
19130
  *
19131
  * The activeElement will be null only if the document or document body is not
19132
  * yet defined.
 
 
 
19133
  */
19134
+ function getActiveElement() /*?DOMElement*/{
19135
+ if (typeof document === 'undefined') {
 
19136
  return null;
19137
  }
19138
  try {
19139
+ return document.activeElement || document.body;
19140
  } catch (e) {
19141
+ return document.body;
19142
  }
19143
  }
19144
 
19145
  module.exports = getActiveElement;
 
19146
 
19147
  /***/ },
19148
  /* 156 */
22160
  func = _React$PropTypes.func,
22161
  object = _React$PropTypes.object;
22162
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22163
  /**
22164
  * A <Router> is a high-level API for automatically setting up
22165
  * a router that renders a <RouterContext> with all the props
22166
  * it needs each time the URL changes.
22167
  */
22168
+
22169
  var Router = _react2.default.createClass({
22170
  displayName: 'Router',
22171
 
22172
 
22173
+ propTypes: {
22174
+ history: object,
22175
+ children: _InternalPropTypes.routes,
22176
+ routes: _InternalPropTypes.routes, // alias for children
22177
+ render: func,
22178
+ createElement: func,
22179
+ onError: func,
22180
+ onUpdate: func,
22181
+
22182
+ // PRIVATE: For client-side rehydration of server match.
22183
+ matchContext: object
22184
+ },
22185
 
22186
  getDefaultProps: function getDefaultProps() {
22187
  return {
22278
 
22279
  // Only forward non-Router-specific props to routing context, as those are
22280
  // the only ones that might be custom routing context props.
22281
+ Object.keys(Router.propTypes).forEach(function (propType) {
22282
  return delete props[propType];
22283
  });
22284
 
22727
  changeRoutes = void 0,
22728
  enterRoutes = void 0;
22729
  if (prevRoutes) {
22730
+ (function () {
22731
+ var parentIsLeaving = false;
22732
+ leaveRoutes = prevRoutes.filter(function (route) {
22733
+ if (parentIsLeaving) {
22734
+ return true;
22735
+ } else {
22736
+ var isLeaving = nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState);
22737
+ if (isLeaving) parentIsLeaving = true;
22738
+ return isLeaving;
22739
+ }
22740
+ });
22741
 
22742
+ // onLeave hooks start at the leaf route.
22743
+ leaveRoutes.reverse();
22744
 
22745
+ enterRoutes = [];
22746
+ changeRoutes = [];
22747
 
22748
+ nextRoutes.forEach(function (route) {
22749
+ var isNew = prevRoutes.indexOf(route) === -1;
22750
+ var paramsChanged = leaveRoutes.indexOf(route) !== -1;
22751
 
22752
+ if (isNew || paramsChanged) enterRoutes.push(route);else changeRoutes.push(route);
22753
+ });
22754
+ })();
22755
  } else {
22756
  leaveRoutes = [];
22757
  changeRoutes = [];
23245
 
23246
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
23247
 
23248
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
23249
+
23250
  exports.default = matchRoutes;
23251
 
23252
  var _AsyncUtils = __webpack_require__(192);
23395
  // By assumption, pattern is non-empty here, which is the prerequisite for
23396
  // actually terminating a match.
23397
  if (remainingPathname === '') {
23398
+ var _ret = function () {
23399
+ var match = {
23400
+ routes: [route],
23401
+ params: createParams(paramNames, paramValues)
23402
+ };
23403
 
23404
+ getIndexRoute(route, location, paramNames, paramValues, function (error, indexRoute) {
23405
+ if (error) {
23406
+ callback(error);
23407
+ } else {
23408
+ if (Array.isArray(indexRoute)) {
23409
+ var _match$routes;
23410
+
23411
+ process.env.NODE_ENV !== 'production' ? (0, _routerWarning2.default)(indexRoute.every(function (route) {
23412
+ return !route.path;
23413
+ }), 'Index routes should not have paths') : void 0;
23414
+ (_match$routes = match.routes).push.apply(_match$routes, indexRoute);
23415
+ } else if (indexRoute) {
23416
+ process.env.NODE_ENV !== 'production' ? (0, _routerWarning2.default)(!indexRoute.path, 'Index routes should not have paths') : void 0;
23417
+ match.routes.push(indexRoute);
23418
+ }
23419
+
23420
+ callback(null, match);
23421
  }
23422
+ });
23423
 
23424
+ return {
23425
+ v: void 0
23426
+ };
23427
+ }();
23428
 
23429
+ if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
23430
  }
23431
  }
23432
 
23935
  * You could use the following component to link to that route:
23936
  *
23937
  * <Link to={`/posts/${post.id}`} />
23938
+ *
23939
+ * Links may pass along location state and/or query string parameters
23940
+ * in the state/query props, respectively.
23941
+ *
23942
+ * <Link ... query={{ show: true }} state={{ the: 'state' }} />
23943
  */
23944
  var Link = _react2.default.createClass({
23945
  displayName: 'Link',
23953
 
23954
  propTypes: {
23955
  to: oneOfType([string, object, func]),
23956
+ query: object,
23957
+ hash: string,
23958
+ state: object,
23959
  activeStyle: object,
23960
  activeClassName: string,
23961
  onlyActiveOnIndex: bool.isRequired,
26347
  'use strict';
26348
 
26349
  exports.__esModule = true;
26350
+
26351
+ exports.default = function (createHistory) {
26352
+ var history = void 0;
26353
+ if (canUseDOM) history = (0, _useRouterHistory2.default)(createHistory)();
26354
+ return history;
26355
+ };
26356
 
26357
  var _useRouterHistory = __webpack_require__(224);
26358
 
26362
 
26363
  var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
26364
 
 
 
 
 
 
26365
  module.exports = exports['default'];
26366
 
26367
  /***/ },
26860
  /* 398 */,
26861
  /* 399 */,
26862
  /* 400 */,
26863
+ /* 401 */
 
 
 
 
 
 
 
26864
  /***/ function(module, exports, __webpack_require__) {
26865
 
26866
  /* WEBPACK VAR INJECTION */(function(global) {if(!global["MailPoetLib"]) global["MailPoetLib"] = {};
26867
+ module.exports = global["MailPoetLib"]["ReactStringReplace"] = __webpack_require__(402);
26868
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
26869
 
26870
  /***/ },
26871
+ /* 402 */
26872
  /***/ function(module, exports, __webpack_require__) {
26873
 
26874
  /* eslint-disable vars-on-top, no-var, prefer-template */
26875
+ var isRegExp = __webpack_require__(403);
26876
+ var escapeRegExp = __webpack_require__(404);
26877
+ var isString = __webpack_require__(405);
26878
+ var flatten = __webpack_require__(406);
26879
 
26880
  /**
26881
  * Given a string, replace every substring that is matched by the `match` regex
26933
 
26934
 
26935
  /***/ },
26936
+ /* 403 */
26937
  /***/ function(module, exports, __webpack_require__) {
26938
 
26939
  /* WEBPACK VAR INJECTION */(function(global, module) {/**
27061
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(291)(module)))
27062
 
27063
  /***/ },
27064
+ /* 404 */
27065
  /***/ function(module, exports) {
27066
 
27067
  /* WEBPACK VAR INJECTION */(function(global) {/**
27234
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
27235
 
27236
  /***/ },
27237
+ /* 405 */
27238
  /***/ function(module, exports) {
27239
 
27240
  /**
27335
 
27336
 
27337
  /***/ },
27338
+ /* 406 */
27339
  /***/ function(module, exports) {
27340
 
27341
  /* WEBPACK VAR INJECTION */(function(global) {/**
assets/js/form_editor.js CHANGED
@@ -3,22 +3,22 @@ webpackJsonp([2],{
3
  /***/ 0:
4
  /***/ function(module, exports, __webpack_require__) {
5
 
6
- __webpack_require__(450);
7
- __webpack_require__(452);
8
- module.exports = __webpack_require__(454);
9
 
10
 
11
  /***/ },
12
 
13
- /***/ 450:
14
  /***/ function(module, exports, __webpack_require__) {
15
 
16
- /* WEBPACK VAR INJECTION */(function(global) {module.exports = global["WysijaForm"] = __webpack_require__(451);
17
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
18
 
19
  /***/ },
20
 
21
- /***/ 451:
22
  /***/ function(module, exports) {
23
 
24
  /*
@@ -1089,15 +1089,15 @@ webpackJsonp([2],{
1089
 
1090
  /***/ },
1091
 
1092
- /***/ 452:
1093
  /***/ function(module, exports, __webpack_require__) {
1094
 
1095
- /* WEBPACK VAR INJECTION */(function(global) {module.exports = global["CodeMirror"] = __webpack_require__(453);
1096
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
1097
 
1098
  /***/ },
1099
 
1100
- /***/ 453:
1101
  /***/ function(module, exports, __webpack_require__) {
1102
 
1103
  // CodeMirror, copyright (c) by Marijn Haverbeke and others
@@ -1110,59 +1110,58 @@ webpackJsonp([2],{
1110
  // at http://marijnhaverbeke.nl/blog/#cm-internals .
1111
 
1112
  (function (global, factory) {
1113
- true ? module.exports = factory() :
1114
- typeof define === 'function' && define.amd ? define(factory) :
1115
- (global.CodeMirror = factory());
1116
  }(this, (function () { 'use strict';
1117
 
1118
  // Kludges for bugs and behavior differences that can't be feature
1119
  // detected are enabled based on userAgent etc sniffing.
1120
- var userAgent = navigator.userAgent;
1121
- var platform = navigator.platform;
1122
-
1123
- var gecko = /gecko\/\d/i.test(userAgent);
1124
- var ie_upto10 = /MSIE \d/.test(userAgent);
1125
- var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(userAgent);
1126
- var edge = /Edge\/(\d+)/.exec(userAgent);
1127
- var ie = ie_upto10 || ie_11up || edge;
1128
- var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]);
1129
- var webkit = !edge && /WebKit\//.test(userAgent);
1130
- var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(userAgent);
1131
- var chrome = !edge && /Chrome\//.test(userAgent);
1132
- var presto = /Opera\//.test(userAgent);
1133
- var safari = /Apple Computer/.test(navigator.vendor);
1134
- var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(userAgent);
1135
- var phantom = /PhantomJS/.test(userAgent);
1136
-
1137
- var ios = !edge && /AppleWebKit/.test(userAgent) && /Mobile\/\w+/.test(userAgent);
1138
- var android = /Android/.test(userAgent);
1139
  // This is woefully incomplete. Suggestions for alternative methods welcome.
1140
- var mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);
1141
- var mac = ios || /Mac/.test(platform);
1142
- var chromeOS = /\bCrOS\b/.test(userAgent);
1143
- var windows = /win/i.test(platform);
1144
-
1145
- var presto_version = presto && userAgent.match(/Version\/(\d*\.\d*)/);
1146
- if (presto_version) { presto_version = Number(presto_version[1]); }
1147
- if (presto_version && presto_version >= 15) { presto = false; webkit = true; }
1148
  // Some browsers use the wrong event properties to signal cmd/ctrl on OS X
1149
- var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));
1150
- var captureRightClick = gecko || (ie && ie_version >= 9);
1151
 
1152
  function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*") }
1153
 
1154
  var rmClass = function(node, cls) {
1155
- var current = node.className;
1156
- var match = classTest(cls).exec(current);
1157
  if (match) {
1158
- var after = current.slice(match.index + match[0].length);
1159
- node.className = current.slice(0, match.index) + (after ? match[1] + after : "");
1160
  }
1161
- };
1162
 
1163
  function removeChildren(e) {
1164
  for (var count = e.childNodes.length; count > 0; --count)
1165
- { e.removeChild(e.firstChild); }
1166
  return e
1167
  }
1168
 
@@ -1171,44 +1170,38 @@ webpackJsonp([2],{
1171
  }
1172
 
1173
  function elt(tag, content, className, style) {
1174
- var e = document.createElement(tag);
1175
- if (className) { e.className = className; }
1176
- if (style) { e.style.cssText = style; }
1177
- if (typeof content == "string") { e.appendChild(document.createTextNode(content)); }
1178
- else if (content) { for (var i = 0; i < content.length; ++i) { e.appendChild(content[i]); } }
1179
- return e
1180
- }
1181
- // wrapper for elt, which removes the elt from the accessibility tree
1182
- function eltP(tag, content, className, style) {
1183
- var e = elt(tag, content, className, style);
1184
- e.setAttribute("role", "presentation");
1185
  return e
1186
  }
1187
 
1188
- var range;
1189
  if (document.createRange) { range = function(node, start, end, endNode) {
1190
- var r = document.createRange();
1191
- r.setEnd(endNode || node, end);
1192
- r.setStart(node, start);
1193
  return r
1194
- }; }
1195
  else { range = function(node, start, end) {
1196
- var r = document.body.createTextRange();
1197
- try { r.moveToElementText(node.parentNode); }
1198
  catch(e) { return r }
1199
- r.collapse(true);
1200
- r.moveEnd("character", end);
1201
- r.moveStart("character", start);
1202
  return r
1203
- }; }
1204
 
1205
  function contains(parent, child) {
1206
  if (child.nodeType == 3) // Android browser always returns false when child is a textnode
1207
- { child = child.parentNode; }
1208
  if (parent.contains)
1209
  { return parent.contains(child) }
1210
  do {
1211
- if (child.nodeType == 11) { child = child.host; }
1212
  if (child == parent) { return true }
1213
  } while (child = child.parentNode)
1214
  }
@@ -1217,44 +1210,44 @@ webpackJsonp([2],{
1217
  // IE and Edge may throw an "Unspecified Error" when accessing document.activeElement.
1218
  // IE < 10 will throw when accessed while the page is loading or in an iframe.
1219
  // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable.
1220
- var activeElement;
1221
  try {
1222
- activeElement = document.activeElement;
1223
  } catch(e) {
1224
- activeElement = document.body || null;
1225
  }
1226
- while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement)
1227
- { activeElement = activeElement.shadowRoot.activeElement; }
1228
  return activeElement
1229
  }
1230
 
1231
  function addClass(node, cls) {
1232
- var current = node.className;
1233
- if (!classTest(cls).test(current)) { node.className += (current ? " " : "") + cls; }
1234
  }
1235
  function joinClasses(a, b) {
1236
- var as = a.split(" ");
1237
  for (var i = 0; i < as.length; i++)
1238
- { if (as[i] && !classTest(as[i]).test(b)) { b += " " + as[i]; } }
1239
  return b
1240
  }
1241
 
1242
- var selectInput = function(node) { node.select(); };
1243
  if (ios) // Mobile Safari apparently has a bug where select() is broken.
1244
- { selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; }
1245
  else if (ie) // Suppress mysterious IE10 errors
1246
- { selectInput = function(node) { try { node.select(); } catch(_e) {} }; }
1247
 
1248
  function bind(f) {
1249
- var args = Array.prototype.slice.call(arguments, 1);
1250
  return function(){return f.apply(null, args)}
1251
  }
1252
 
1253
  function copyObj(obj, target, overwrite) {
1254
- if (!target) { target = {}; }
1255
  for (var prop in obj)
1256
  { if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))
1257
- { target[prop] = obj[prop]; } }
1258
  return target
1259
  }
1260
 
@@ -1262,23 +1255,23 @@ webpackJsonp([2],{
1262
  // Used mostly to find indentation.
1263
  function countColumn(string, end, tabSize, startIndex, startValue) {
1264
  if (end == null) {
1265
- end = string.search(/[^\s\u00a0]/);
1266
- if (end == -1) { end = string.length; }
1267
  }
1268
  for (var i = startIndex || 0, n = startValue || 0;;) {
1269
- var nextTab = string.indexOf("\t", i);
1270
  if (nextTab < 0 || nextTab >= end)
1271
  { return n + (end - i) }
1272
- n += nextTab - i;
1273
- n += tabSize - (n % tabSize);
1274
- i = nextTab + 1;
1275
  }
1276
  }
1277
 
1278
- var Delayed = function() {this.id = null;};
1279
  Delayed.prototype.set = function (ms, f) {
1280
- clearTimeout(this.id);
1281
- this.id = setTimeout(f, ms);
1282
  };
1283
 
1284
  function indexOf(array, elt) {
@@ -1288,69 +1281,68 @@ webpackJsonp([2],{
1288
  }
1289
 
1290
  // Number of pixels added to scroller and sizer to hide scrollbar
1291
- var scrollerGap = 30;
1292
 
1293
  // Returned or thrown by various protocols to signal 'I'm not
1294
  // handling this'.
1295
- var Pass = {toString: function(){return "CodeMirror.Pass"}};
1296
 
1297
  // Reused option objects for setSelection & friends
1298
  var sel_dontScroll = {scroll: false};
1299
  var sel_mouse = {origin: "*mouse"};
1300
  var sel_move = {origin: "+move"};
1301
-
1302
  // The inverse of countColumn -- find the offset that corresponds to
1303
  // a particular column.
1304
  function findColumn(string, goal, tabSize) {
1305
  for (var pos = 0, col = 0;;) {
1306
- var nextTab = string.indexOf("\t", pos);
1307
- if (nextTab == -1) { nextTab = string.length; }
1308
- var skipped = nextTab - pos;
1309
  if (nextTab == string.length || col + skipped >= goal)
1310
  { return pos + Math.min(skipped, goal - col) }
1311
- col += nextTab - pos;
1312
- col += tabSize - (col % tabSize);
1313
- pos = nextTab + 1;
1314
  if (col >= goal) { return pos }
1315
  }
1316
  }
1317
 
1318
- var spaceStrs = [""];
1319
  function spaceStr(n) {
1320
  while (spaceStrs.length <= n)
1321
- { spaceStrs.push(lst(spaceStrs) + " "); }
1322
  return spaceStrs[n]
1323
  }
1324
 
1325
  function lst(arr) { return arr[arr.length-1] }
1326
 
1327
  function map(array, f) {
1328
- var out = [];
1329
- for (var i = 0; i < array.length; i++) { out[i] = f(array[i], i); }
1330
  return out
1331
  }
1332
 
1333
  function insertSorted(array, value, score) {
1334
- var pos = 0, priority = score(value);
1335
- while (pos < array.length && score(array[pos]) <= priority) { pos++; }
1336
- array.splice(pos, 0, value);
1337
  }
1338
 
1339
  function nothing() {}
1340
 
1341
  function createObj(base, props) {
1342
- var inst;
1343
  if (Object.create) {
1344
- inst = Object.create(base);
1345
  } else {
1346
- nothing.prototype = base;
1347
- inst = new nothing();
1348
  }
1349
- if (props) { copyObj(props, inst); }
1350
  return inst
1351
  }
1352
 
1353
- var nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
1354
  function isWordCharBasic(ch) {
1355
  return /\w/.test(ch) || ch > "\x80" &&
1356
  (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch))
@@ -1371,12 +1363,12 @@ webpackJsonp([2],{
1371
  // as editing and measuring is concerned. This is not fully correct,
1372
  // since some scripts/fonts/browsers also treat other configurations
1373
  // of code points as a group.
1374
- var extendingChars = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;
1375
  function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch) }
1376
 
1377
  // Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range.
1378
  function skipExtendingChars(str, pos, dir) {
1379
- while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }
1380
  return pos
1381
  }
1382
 
@@ -1385,9 +1377,9 @@ webpackJsonp([2],{
1385
  function findFirst(pred, from, to) {
1386
  for (;;) {
1387
  if (Math.abs(from - to) <= 1) { return pred(from) ? from : to }
1388
- var mid = Math.floor((from + to) / 2);
1389
- if (pred(mid)) { to = mid; }
1390
- else { from = mid; }
1391
  }
1392
  }
1393
 
@@ -1396,114 +1388,113 @@ webpackJsonp([2],{
1396
  // display-related state.
1397
 
1398
  function Display(place, doc, input) {
1399
- var d = this;
1400
- this.input = input;
1401
 
1402
  // Covers bottom-right square when both scrollbars are present.
1403
- d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler");
1404
- d.scrollbarFiller.setAttribute("cm-not-content", "true");
1405
  // Covers bottom of gutter when coverGutterNextToScrollbar is on
1406
  // and h scrollbar is present.
1407
- d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler");
1408
- d.gutterFiller.setAttribute("cm-not-content", "true");
1409
  // Will contain the actual code, positioned to cover the viewport.
1410
- d.lineDiv = eltP("div", null, "CodeMirror-code");
1411
  // Elements are added to these to represent selection and cursors.
1412
- d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1");
1413
- d.cursorDiv = elt("div", null, "CodeMirror-cursors");
1414
  // A visibility: hidden element used to find the size of things.
1415
- d.measure = elt("div", null, "CodeMirror-measure");
1416
  // When lines outside of the viewport are measured, they are drawn in this.
1417
- d.lineMeasure = elt("div", null, "CodeMirror-measure");
1418
  // Wraps everything that needs to exist inside the vertically-padded coordinate system
1419
- d.lineSpace = eltP("div", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],
1420
- null, "position: relative; outline: none");
1421
- var lines = eltP("div", [d.lineSpace], "CodeMirror-lines");
1422
  // Moved around its parent to cover visible view.
1423
- d.mover = elt("div", [lines], null, "position: relative");
1424
  // Set to the height of the document, allowing scrolling.
1425
- d.sizer = elt("div", [d.mover], "CodeMirror-sizer");
1426
- d.sizerWidth = null;
1427
  // Behavior of elts with overflow: auto and padding is
1428
  // inconsistent across browsers. This is used to ensure the
1429
  // scrollable area is big enough.
1430
- d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerGap + "px; width: 1px;");
1431
  // Will contain the gutters, if any.
1432
- d.gutters = elt("div", null, "CodeMirror-gutters");
1433
- d.lineGutter = null;
1434
  // Actual scrollable element.
1435
- d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll");
1436
- d.scroller.setAttribute("tabIndex", "-1");
1437
  // The element in which the editor lives.
1438
- d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror");
1439
 
1440
  // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)
1441
- if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }
1442
- if (!webkit && !(gecko && mobile)) { d.scroller.draggable = true; }
1443
 
1444
  if (place) {
1445
- if (place.appendChild) { place.appendChild(d.wrapper); }
1446
- else { place(d.wrapper); }
1447
  }
1448
 
1449
  // Current rendered range (may be bigger than the view window).
1450
- d.viewFrom = d.viewTo = doc.first;
1451
- d.reportedViewFrom = d.reportedViewTo = doc.first;
1452
  // Information about the rendered lines.
1453
- d.view = [];
1454
- d.renderedView = null;
1455
  // Holds info about a single rendered line when it was rendered
1456
  // for measurement, while not in view.
1457
- d.externalMeasured = null;
1458
  // Empty space (in pixels) above the view
1459
- d.viewOffset = 0;
1460
- d.lastWrapHeight = d.lastWrapWidth = 0;
1461
- d.updateLineNumbers = null;
1462
 
1463
- d.nativeBarWidth = d.barHeight = d.barWidth = 0;
1464
- d.scrollbarsClipped = false;
1465
 
1466
  // Used to only resize the line number gutter when necessary (when
1467
  // the amount of lines crosses a boundary that makes its width change)
1468
- d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;
1469
  // Set to true when a non-horizontal-scrolling line widget is
1470
  // added. As an optimization, line widget aligning is skipped when
1471
  // this is false.
1472
- d.alignWidgets = false;
1473
 
1474
- d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;
1475
 
1476
  // Tracks the maximum line length so that the horizontal scrollbar
1477
  // can be kept static when scrolling.
1478
- d.maxLine = null;
1479
- d.maxLineLength = 0;
1480
- d.maxLineChanged = false;
1481
 
1482
  // Used for measuring wheel scrolling granularity
1483
- d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;
1484
 
1485
  // True when shift is held down.
1486
- d.shift = false;
1487
 
1488
  // Used to track whether anything happened since the context menu
1489
  // was opened.
1490
- d.selForContextMenu = null;
1491
 
1492
- d.activeTouch = null;
1493
 
1494
- input.init(d);
1495
  }
1496
 
1497
  // Find the line object corresponding to the given line number.
1498
  function getLine(doc, n) {
1499
- n -= doc.first;
1500
  if (n < 0 || n >= doc.size) { throw new Error("There is no line " + (n + doc.first) + " in the document.") }
1501
- var chunk = doc;
1502
  while (!chunk.lines) {
1503
  for (var i = 0;; ++i) {
1504
- var child = chunk.children[i], sz = child.chunkSize();
1505
  if (n < sz) { chunk = child; break }
1506
- n -= sz;
1507
  }
1508
  }
1509
  return chunk.lines[n]
@@ -1512,39 +1503,39 @@ webpackJsonp([2],{
1512
  // Get the part of a document between two positions, as an array of
1513
  // strings.
1514
  function getBetween(doc, start, end) {
1515
- var out = [], n = start.line;
1516
  doc.iter(start.line, end.line + 1, function (line) {
1517
- var text = line.text;
1518
- if (n == end.line) { text = text.slice(0, end.ch); }
1519
- if (n == start.line) { text = text.slice(start.ch); }
1520
- out.push(text);
1521
- ++n;
1522
- });
1523
  return out
1524
  }
1525
  // Get the lines between from and to, as array of strings.
1526
  function getLines(doc, from, to) {
1527
- var out = [];
1528
- doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value
1529
  return out
1530
  }
1531
 
1532
  // Update the height of a line, propagating the height change
1533
  // upwards to parent nodes.
1534
  function updateLineHeight(line, height) {
1535
- var diff = height - line.height;
1536
- if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }
1537
  }
1538
 
1539
  // Given a line object, find its line number by walking up through
1540
  // its parent links.
1541
  function lineNo(line) {
1542
  if (line.parent == null) { return null }
1543
- var cur = line.parent, no = indexOf(cur.lines, line);
1544
  for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {
1545
  for (var i = 0;; ++i) {
1546
  if (chunk.children[i] == cur) { break }
1547
- no += chunk.children[i].chunkSize();
1548
  }
1549
  }
1550
  return no + cur.first
@@ -1553,21 +1544,21 @@ webpackJsonp([2],{
1553
  // Find the line at the given vertical position, using the height
1554
  // information in the document tree.
1555
  function lineAtHeight(chunk, h) {
1556
- var n = chunk.first;
1557
  outer: do {
1558
  for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {
1559
- var child = chunk.children[i$1], ch = child.height;
1560
  if (h < ch) { chunk = child; continue outer }
1561
- h -= ch;
1562
- n += child.chunkSize();
1563
  }
1564
  return n
1565
  } while (!chunk.lines)
1566
- var i = 0;
1567
  for (; i < chunk.lines.length; ++i) {
1568
- var line = chunk.lines[i], lh = line.height;
1569
  if (h < lh) { break }
1570
- h -= lh;
1571
  }
1572
  return n + i
1573
  }
@@ -1583,9 +1574,9 @@ webpackJsonp([2],{
1583
  if ( sticky === void 0 ) sticky = null;
1584
 
1585
  if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }
1586
- this.line = line;
1587
- this.ch = ch;
1588
- this.sticky = sticky;
1589
  }
1590
 
1591
  // Compare two positions, return 0 if they are the same, a negative
@@ -1603,60 +1594,59 @@ webpackJsonp([2],{
1603
  function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1))}
1604
  function clipPos(doc, pos) {
1605
  if (pos.line < doc.first) { return Pos(doc.first, 0) }
1606
- var last = doc.first + doc.size - 1;
1607
  if (pos.line > last) { return Pos(last, getLine(doc, last).text.length) }
1608
  return clipToLen(pos, getLine(doc, pos.line).text.length)
1609
  }
1610
  function clipToLen(pos, linelen) {
1611
- var ch = pos.ch;
1612
  if (ch == null || ch > linelen) { return Pos(pos.line, linelen) }
1613
  else if (ch < 0) { return Pos(pos.line, 0) }
1614
  else { return pos }
1615
  }
1616
  function clipPosArray(doc, array) {
1617
- var out = [];
1618
- for (var i = 0; i < array.length; i++) { out[i] = clipPos(doc, array[i]); }
1619
  return out
1620
  }
1621
 
1622
  // Optimize some code when these features are not used.
1623
  var sawReadOnlySpans = false;
1624
  var sawCollapsedSpans = false;
1625
-
1626
  function seeReadOnlySpans() {
1627
- sawReadOnlySpans = true;
1628
  }
1629
 
1630
  function seeCollapsedSpans() {
1631
- sawCollapsedSpans = true;
1632
  }
1633
 
1634
  // TEXTMARKER SPANS
1635
 
1636
  function MarkedSpan(marker, from, to) {
1637
- this.marker = marker;
1638
- this.from = from; this.to = to;
1639
  }
1640
 
1641
  // Search an array of spans for a span matching the given marker.
1642
  function getMarkedSpanFor(spans, marker) {
1643
  if (spans) { for (var i = 0; i < spans.length; ++i) {
1644
- var span = spans[i];
1645
  if (span.marker == marker) { return span }
1646
  } }
1647
  }
1648
  // Remove a span from an array, returning undefined if no spans are
1649
  // left (we don't store arrays for lines without spans).
1650
  function removeMarkedSpan(spans, span) {
1651
- var r;
1652
  for (var i = 0; i < spans.length; ++i)
1653
- { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }
1654
  return r
1655
  }
1656
  // Add a span to a line.
1657
  function addMarkedSpan(line, span) {
1658
- line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];
1659
- span.marker.attachLine(line);
1660
  }
1661
 
1662
  // Used for the algorithm that adjusts markers for a change in the
@@ -1664,24 +1654,26 @@ webpackJsonp([2],{
1664
  // character position, returning an array of remaining chunks (or
1665
  // undefined if nothing remains).
1666
  function markedSpansBefore(old, startCh, isInsert) {
1667
- var nw;
1668
  if (old) { for (var i = 0; i < old.length; ++i) {
1669
- var span = old[i], marker = span.marker;
1670
- var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);
1671
  if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) {
1672
- var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh);(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to));
 
1673
  }
1674
  } }
1675
  return nw
1676
  }
1677
  function markedSpansAfter(old, endCh, isInsert) {
1678
- var nw;
1679
  if (old) { for (var i = 0; i < old.length; ++i) {
1680
- var span = old[i], marker = span.marker;
1681
- var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);
1682
  if (endsAfter || span.from == endCh && marker.type == "bookmark" && (!isInsert || span.marker.insertLeft)) {
1683
- var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh);(nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,
1684
- span.to == null ? null : span.to - endCh));
 
1685
  }
1686
  } }
1687
  return nw
@@ -1695,60 +1687,60 @@ webpackJsonp([2],{
1695
  // arrays with one element for each line in (after) the change.
1696
  function stretchSpansOverChange(doc, change) {
1697
  if (change.full) { return null }
1698
- var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;
1699
- var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;
1700
  if (!oldFirst && !oldLast) { return null }
1701
 
1702
- var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;
1703
  // Get the spans that 'stick out' on both sides
1704
- var first = markedSpansBefore(oldFirst, startCh, isInsert);
1705
- var last = markedSpansAfter(oldLast, endCh, isInsert);
1706
 
1707
  // Next, merge those two ends
1708
- var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);
1709
  if (first) {
1710
  // Fix up .to properties of first
1711
  for (var i = 0; i < first.length; ++i) {
1712
- var span = first[i];
1713
  if (span.to == null) {
1714
- var found = getMarkedSpanFor(last, span.marker);
1715
- if (!found) { span.to = startCh; }
1716
- else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }
1717
  }
1718
  }
1719
  }
1720
  if (last) {
1721
  // Fix up .from in last (or move them into first in case of sameLine)
1722
  for (var i$1 = 0; i$1 < last.length; ++i$1) {
1723
- var span$1 = last[i$1];
1724
- if (span$1.to != null) { span$1.to += offset; }
1725
  if (span$1.from == null) {
1726
- var found$1 = getMarkedSpanFor(first, span$1.marker);
1727
  if (!found$1) {
1728
- span$1.from = offset;
1729
- if (sameLine) { (first || (first = [])).push(span$1); }
1730
  }
1731
  } else {
1732
- span$1.from += offset;
1733
- if (sameLine) { (first || (first = [])).push(span$1); }
1734
  }
1735
  }
1736
  }
1737
  // Make sure we didn't create any zero-length spans
1738
- if (first) { first = clearEmptySpans(first); }
1739
- if (last && last != first) { last = clearEmptySpans(last); }
1740
 
1741
- var newMarkers = [first];
1742
  if (!sameLine) {
1743
  // Fill gap with whole-line-spans
1744
- var gap = change.text.length - 2, gapMarkers;
1745
  if (gap > 0 && first)
1746
  { for (var i$2 = 0; i$2 < first.length; ++i$2)
1747
  { if (first[i$2].to == null)
1748
- { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }
1749
  for (var i$3 = 0; i$3 < gap; ++i$3)
1750
- { newMarkers.push(gapMarkers); }
1751
- newMarkers.push(last);
1752
  }
1753
  return newMarkers
1754
  }
@@ -1757,9 +1749,9 @@ webpackJsonp([2],{
1757
  // option of false.
1758
  function clearEmptySpans(spans) {
1759
  for (var i = 0; i < spans.length; ++i) {
1760
- var span = spans[i];
1761
  if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)
1762
- { spans.splice(i--, 1); }
1763
  }
1764
  if (!spans.length) { return null }
1765
  return spans
@@ -1767,28 +1759,28 @@ webpackJsonp([2],{
1767
 
1768
  // Used to 'clip' out readOnly ranges when making a change.
1769
  function removeReadOnlyRanges(doc, from, to) {
1770
- var markers = null;
1771
  doc.iter(from.line, to.line + 1, function (line) {
1772
  if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {
1773
- var mark = line.markedSpans[i].marker;
1774
  if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))
1775
- { (markers || (markers = [])).push(mark); }
1776
  } }
1777
- });
1778
  if (!markers) { return null }
1779
- var parts = [{from: from, to: to}];
1780
  for (var i = 0; i < markers.length; ++i) {
1781
- var mk = markers[i], m = mk.find(0);
1782
  for (var j = 0; j < parts.length; ++j) {
1783
- var p = parts[j];
1784
  if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }
1785
- var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);
1786
  if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)
1787
- { newParts.push({from: p.from, to: m.from}); }
1788
  if (dto > 0 || !mk.inclusiveRight && !dto)
1789
- { newParts.push({from: m.to, to: p.to}); }
1790
- parts.splice.apply(parts, newParts);
1791
- j += newParts.length - 3;
1792
  }
1793
  }
1794
  return parts
@@ -1796,17 +1788,17 @@ webpackJsonp([2],{
1796
 
1797
  // Connect or disconnect spans from a line.
1798
  function detachMarkedSpans(line) {
1799
- var spans = line.markedSpans;
1800
  if (!spans) { return }
1801
  for (var i = 0; i < spans.length; ++i)
1802
- { spans[i].marker.detachLine(line); }
1803
- line.markedSpans = null;
1804
  }
1805
  function attachMarkedSpans(line, spans) {
1806
  if (!spans) { return }
1807
  for (var i = 0; i < spans.length; ++i)
1808
- { spans[i].marker.attachLine(line); }
1809
- line.markedSpans = spans;
1810
  }
1811
 
1812
  // Helpers used when computing which overlapping collapsed span
@@ -1818,12 +1810,12 @@ webpackJsonp([2],{
1818
  // spans is larger (and thus includes the other). Falls back to
1819
  // comparing ids when the spans cover exactly the same range.
1820
  function compareCollapsedMarkers(a, b) {
1821
- var lenDiff = a.lines.length - b.lines.length;
1822
  if (lenDiff != 0) { return lenDiff }
1823
- var aPos = a.find(), bPos = b.find();
1824
- var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);
1825
  if (fromCmp) { return -fromCmp }
1826
- var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);
1827
  if (toCmp) { return toCmp }
1828
  return b.id - a.id
1829
  }
@@ -1831,12 +1823,12 @@ webpackJsonp([2],{
1831
  // Find out whether a line ends or starts in a collapsed span. If
1832
  // so, return the marker for that span.
1833
  function collapsedSpanAtSide(line, start) {
1834
- var sps = sawCollapsedSpans && line.markedSpans, found;
1835
  if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {
1836
- sp = sps[i];
1837
  if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&
1838
  (!found || compareCollapsedMarkers(found, sp.marker) < 0))
1839
- { found = sp.marker; }
1840
  } }
1841
  return found
1842
  }
@@ -1846,15 +1838,15 @@ webpackJsonp([2],{
1846
  // Test whether there exists a collapsed span that partially
1847
  // overlaps (covers the start or end, but not both) of a new span.
1848
  // Such overlap is not allowed.
1849
- function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {
1850
- var line = getLine(doc, lineNo$$1);
1851
- var sps = sawCollapsedSpans && line.markedSpans;
1852
  if (sps) { for (var i = 0; i < sps.length; ++i) {
1853
- var sp = sps[i];
1854
  if (!sp.marker.collapsed) { continue }
1855
- var found = sp.marker.find(0);
1856
- var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);
1857
- var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);
1858
  if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }
1859
  if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||
1860
  fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))
@@ -1867,26 +1859,26 @@ webpackJsonp([2],{
1867
  // visual line. This finds the start of the visual line that the
1868
  // given line is part of (usually that is the line itself).
1869
  function visualLine(line) {
1870
- var merged;
1871
  while (merged = collapsedSpanAtStart(line))
1872
- { line = merged.find(-1, true).line; }
1873
  return line
1874
  }
1875
 
1876
  function visualLineEnd(line) {
1877
- var merged;
1878
  while (merged = collapsedSpanAtEnd(line))
1879
- { line = merged.find(1, true).line; }
1880
  return line
1881
  }
1882
 
1883
  // Returns an array of logical lines that continue the visual line
1884
  // started by the argument, or undefined if there are no such lines.
1885
  function visualLineContinued(line) {
1886
- var merged, lines;
1887
  while (merged = collapsedSpanAtEnd(line)) {
1888
  line = merged.find(1, true).line
1889
- ;(lines || (lines = [])).push(line);
1890
  }
1891
  return lines
1892
  }
@@ -1894,7 +1886,7 @@ webpackJsonp([2],{
1894
  // Get the line number of the start of the visual line that the
1895
  // given line number is part of.
1896
  function visualLineNo(doc, lineN) {
1897
- var line = getLine(doc, lineN), vis = visualLine(line);
1898
  if (line == vis) { return lineN }
1899
  return lineNo(vis)
1900
  }
@@ -1903,10 +1895,10 @@ webpackJsonp([2],{
1903
  // the given line.
1904
  function visualLineEndNo(doc, lineN) {
1905
  if (lineN > doc.lastLine()) { return lineN }
1906
- var line = getLine(doc, lineN), merged;
1907
  if (!lineIsHidden(doc, line)) { return lineN }
1908
  while (merged = collapsedSpanAtEnd(line))
1909
- { line = merged.find(1, true).line; }
1910
  return lineNo(line) + 1
1911
  }
1912
 
@@ -1914,9 +1906,9 @@ webpackJsonp([2],{
1914
  // are part of a visual line that starts with another line, or when
1915
  // they are entirely covered by collapsed, non-widget span.
1916
  function lineIsHidden(doc, line) {
1917
- var sps = sawCollapsedSpans && line.markedSpans;
1918
  if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {
1919
- sp = sps[i];
1920
  if (!sp.marker.collapsed) { continue }
1921
  if (sp.from == null) { return true }
1922
  if (sp.marker.widgetNode) { continue }
@@ -1926,13 +1918,13 @@ webpackJsonp([2],{
1926
  }
1927
  function lineIsHiddenInner(doc, line, span) {
1928
  if (span.to == null) {
1929
- var end = span.marker.find(1, true);
1930
  return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker))
1931
  }
1932
  if (span.marker.inclusiveRight && span.to == line.text.length)
1933
  { return true }
1934
  for (var sp = (void 0), i = 0; i < line.markedSpans.length; ++i) {
1935
- sp = line.markedSpans[i];
1936
  if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&
1937
  (sp.to == null || sp.to != span.from) &&
1938
  (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&
@@ -1942,19 +1934,19 @@ webpackJsonp([2],{
1942
 
1943
  // Find the height above the given line.
1944
  function heightAtLine(lineObj) {
1945
- lineObj = visualLine(lineObj);
1946
 
1947
- var h = 0, chunk = lineObj.parent;
1948
  for (var i = 0; i < chunk.lines.length; ++i) {
1949
- var line = chunk.lines[i];
1950
  if (line == lineObj) { break }
1951
- else { h += line.height; }
1952
  }
1953
  for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {
1954
  for (var i$1 = 0; i$1 < p.children.length; ++i$1) {
1955
- var cur = p.children[i$1];
1956
  if (cur == chunk) { break }
1957
- else { h += cur.height; }
1958
  }
1959
  }
1960
  return h
@@ -1965,66 +1957,66 @@ webpackJsonp([2],{
1965
  // other lines onto it.
1966
  function lineLength(line) {
1967
  if (line.height == 0) { return 0 }
1968
- var len = line.text.length, merged, cur = line;
1969
  while (merged = collapsedSpanAtStart(cur)) {
1970
- var found = merged.find(0, true);
1971
- cur = found.from.line;
1972
- len += found.from.ch - found.to.ch;
1973
  }
1974
- cur = line;
1975
  while (merged = collapsedSpanAtEnd(cur)) {
1976
- var found$1 = merged.find(0, true);
1977
- len -= cur.text.length - found$1.from.ch;
1978
- cur = found$1.to.line;
1979
- len += cur.text.length - found$1.to.ch;
1980
  }
1981
  return len
1982
  }
1983
 
1984
  // Find the longest line in the document.
1985
  function findMaxLine(cm) {
1986
- var d = cm.display, doc = cm.doc;
1987
- d.maxLine = getLine(doc, doc.first);
1988
- d.maxLineLength = lineLength(d.maxLine);
1989
- d.maxLineChanged = true;
1990
  doc.iter(function (line) {
1991
- var len = lineLength(line);
1992
  if (len > d.maxLineLength) {
1993
- d.maxLineLength = len;
1994
- d.maxLine = line;
1995
  }
1996
- });
1997
  }
1998
 
1999
  // BIDI HELPERS
2000
 
2001
  function iterateBidiSections(order, from, to, f) {
2002
  if (!order) { return f(from, to, "ltr") }
2003
- var found = false;
2004
  for (var i = 0; i < order.length; ++i) {
2005
- var part = order[i];
2006
  if (part.from < to && part.to > from || from == to && part.to == from) {
2007
- f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr");
2008
- found = true;
2009
  }
2010
  }
2011
- if (!found) { f(from, to, "ltr"); }
2012
  }
2013
 
2014
- var bidiOther = null;
2015
  function getBidiPartAt(order, ch, sticky) {
2016
- var found;
2017
- bidiOther = null;
2018
  for (var i = 0; i < order.length; ++i) {
2019
- var cur = order[i];
2020
  if (cur.from < ch && cur.to > ch) { return i }
2021
  if (cur.to == ch) {
2022
- if (cur.from != cur.to && sticky == "before") { found = i; }
2023
- else { bidiOther = i; }
2024
  }
2025
  if (cur.from == ch) {
2026
- if (cur.from != cur.to && sticky != "before") { found = i; }
2027
- else { bidiOther = i; }
2028
  }
2029
  }
2030
  return found != null ? found : bidiOther
@@ -2055,9 +2047,9 @@ webpackJsonp([2],{
2055
  // objects) in the order in which they occur visually.
2056
  var bidiOrdering = (function() {
2057
  // Character types for codepoints 0 to 0xff
2058
- var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN";
2059
  // Character types for codepoints 0x600 to 0x6f9
2060
- var arabicTypes = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";
2061
  function charType(code) {
2062
  if (code <= 0xf7) { return lowTypes.charAt(code) }
2063
  else if (0x590 <= code && code <= 0x5f4) { return "R" }
@@ -2068,30 +2060,30 @@ webpackJsonp([2],{
2068
  else { return "L" }
2069
  }
2070
 
2071
- var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
2072
- var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;
 
 
2073
 
2074
  function BidiSpan(level, from, to) {
2075
- this.level = level;
2076
- this.from = from; this.to = to;
2077
  }
2078
 
2079
- return function(str, direction) {
2080
- var outerType = direction == "ltr" ? "L" : "R";
2081
-
2082
- if (str.length == 0 || direction == "ltr" && !bidiRE.test(str)) { return false }
2083
- var len = str.length, types = [];
2084
  for (var i = 0; i < len; ++i)
2085
- { types.push(charType(str.charCodeAt(i))); }
2086
 
2087
  // W1. Examine each non-spacing mark (NSM) in the level run, and
2088
  // change the type of the NSM to the type of the previous
2089
  // character. If the NSM is at the start of the level run, it will
2090
  // get the type of sor.
2091
  for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) {
2092
- var type = types[i$1];
2093
- if (type == "m") { types[i$1] = prev; }
2094
- else { prev = type; }
2095
  }
2096
 
2097
  // W2. Search backwards from each instance of a European number
@@ -2100,20 +2092,20 @@ webpackJsonp([2],{
2100
  // number.
2101
  // W3. Change all ALs to R.
2102
  for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) {
2103
- var type$1 = types[i$2];
2104
- if (type$1 == "1" && cur == "r") { types[i$2] = "n"; }
2105
- else if (isStrong.test(type$1)) { cur = type$1; if (type$1 == "r") { types[i$2] = "R"; } }
2106
  }
2107
 
2108
  // W4. A single European separator between two European numbers
2109
  // changes to a European number. A single common separator between
2110
  // two numbers of the same type changes to that type.
2111
  for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) {
2112
- var type$2 = types[i$3];
2113
- if (type$2 == "+" && prev$1 == "1" && types[i$3+1] == "1") { types[i$3] = "1"; }
2114
  else if (type$2 == "," && prev$1 == types[i$3+1] &&
2115
- (prev$1 == "1" || prev$1 == "n")) { types[i$3] = prev$1; }
2116
- prev$1 = type$2;
2117
  }
2118
 
2119
  // W5. A sequence of European terminators adjacent to European
@@ -2121,14 +2113,14 @@ webpackJsonp([2],{
2121
  // W6. Otherwise, separators and terminators change to Other
2122
  // Neutral.
2123
  for (var i$4 = 0; i$4 < len; ++i$4) {
2124
- var type$3 = types[i$4];
2125
- if (type$3 == ",") { types[i$4] = "N"; }
2126
  else if (type$3 == "%") {
2127
- var end = (void 0);
2128
  for (end = i$4 + 1; end < len && types[end] == "%"; ++end) {}
2129
- var replace = (i$4 && types[i$4-1] == "!") || (end < len && types[end] == "1") ? "1" : "N";
2130
- for (var j = i$4; j < end; ++j) { types[j] = replace; }
2131
- i$4 = end - 1;
2132
  }
2133
  }
2134
 
@@ -2136,9 +2128,9 @@ webpackJsonp([2],{
2136
  // until the first strong type (R, L, or sor) is found. If an L is
2137
  // found, then change the type of the European number to L.
2138
  for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) {
2139
- var type$4 = types[i$5];
2140
- if (cur$1 == "L" && type$4 == "1") { types[i$5] = "L"; }
2141
- else if (isStrong.test(type$4)) { cur$1 = type$4; }
2142
  }
2143
 
2144
  // N1. A sequence of neutrals takes the direction of the
@@ -2149,13 +2141,13 @@ webpackJsonp([2],{
2149
  // N2. Any remaining neutrals take the embedding direction.
2150
  for (var i$6 = 0; i$6 < len; ++i$6) {
2151
  if (isNeutral.test(types[i$6])) {
2152
- var end$1 = (void 0);
2153
  for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {}
2154
- var before = (i$6 ? types[i$6-1] : outerType) == "L";
2155
- var after = (end$1 < len ? types[end$1] : outerType) == "L";
2156
- var replace$1 = before == after ? (before ? "L" : "R") : outerType;
2157
- for (var j$1 = i$6; j$1 < end$1; ++j$1) { types[j$1] = replace$1; }
2158
- i$6 = end$1 - 1;
2159
  }
2160
  }
2161
 
@@ -2164,67 +2156,67 @@ webpackJsonp([2],{
2164
  // levels (0, 1, 2) in an implementation that doesn't take
2165
  // explicit embedding into account, we can build up the order on
2166
  // the fly, without following the level-based algorithm.
2167
- var order = [], m;
2168
  for (var i$7 = 0; i$7 < len;) {
2169
  if (countsAsLeft.test(types[i$7])) {
2170
- var start = i$7;
2171
  for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {}
2172
- order.push(new BidiSpan(0, start, i$7));
2173
  } else {
2174
- var pos = i$7, at = order.length;
2175
  for (++i$7; i$7 < len && types[i$7] != "L"; ++i$7) {}
2176
  for (var j$2 = pos; j$2 < i$7;) {
2177
  if (countsAsNum.test(types[j$2])) {
2178
- if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)); }
2179
- var nstart = j$2;
2180
  for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {}
2181
- order.splice(at, 0, new BidiSpan(2, nstart, j$2));
2182
- pos = j$2;
2183
- } else { ++j$2; }
2184
  }
2185
- if (pos < i$7) { order.splice(at, 0, new BidiSpan(1, pos, i$7)); }
2186
  }
2187
  }
2188
  if (order[0].level == 1 && (m = str.match(/^\s+/))) {
2189
- order[0].from = m[0].length;
2190
- order.unshift(new BidiSpan(0, 0, m[0].length));
2191
  }
2192
  if (lst(order).level == 1 && (m = str.match(/\s+$/))) {
2193
- lst(order).to -= m[0].length;
2194
- order.push(new BidiSpan(0, len - m[0].length, len));
2195
  }
2196
 
2197
- return direction == "rtl" ? order.reverse() : order
2198
  }
2199
- })();
2200
 
2201
  // Get the bidi ordering for the given line (and cache it). Returns
2202
  // false for lines that are fully left-to-right, and an array of
2203
  // BidiSpan objects otherwise.
2204
- function getOrder(line, direction) {
2205
- var order = line.order;
2206
- if (order == null) { order = line.order = bidiOrdering(line.text, direction); }
2207
  return order
2208
  }
2209
 
2210
  function moveCharLogically(line, ch, dir) {
2211
- var target = skipExtendingChars(line.text, ch + dir, dir);
2212
  return target < 0 || target > line.text.length ? null : target
2213
  }
2214
 
2215
  function moveLogically(line, start, dir) {
2216
- var ch = moveCharLogically(line, start.ch, dir);
2217
  return ch == null ? null : new Pos(start.line, ch, dir < 0 ? "after" : "before")
2218
  }
2219
 
2220
  function endOfLine(visually, cm, lineObj, lineNo, dir) {
2221
  if (visually) {
2222
- var order = getOrder(lineObj, cm.doc.direction);
2223
  if (order) {
2224
- var part = dir < 0 ? lst(order) : order[0];
2225
- var moveInStorageOrder = (dir < 0) == (part.level == 1);
2226
- var sticky = moveInStorageOrder ? "after" : "before";
2227
- var ch;
2228
  // With a wrapped rtl chunk (possibly spanning multiple bidi parts),
2229
  // it could be that the last bidi part is not on the last visual line,
2230
  // since visual lines contain content order-consecutive chunks.
@@ -2232,12 +2224,12 @@ webpackJsonp([2],{
2232
  // in the rtl chunk that is on the last line (that is, the same line
2233
  // as the last (content-order) character).
2234
  if (part.level > 0) {
2235
- var prep = prepareMeasureForLine(cm, lineObj);
2236
- ch = dir < 0 ? lineObj.text.length - 1 : 0;
2237
- var targetTop = measureCharPrepared(cm, prep, ch).top;
2238
- ch = findFirst(function (ch) { return measureCharPrepared(cm, prep, ch).top == targetTop; }, (dir < 0) == (part.level == 1) ? part.from : part.to - 1, ch);
2239
- if (sticky == "before") { ch = moveCharLogically(lineObj, ch, 1, true); }
2240
- } else { ch = dir < 0 ? part.to : part.from; }
2241
  return new Pos(lineNo, ch, sticky)
2242
  }
2243
  }
@@ -2245,37 +2237,36 @@ webpackJsonp([2],{
2245
  }
2246
 
2247
  function moveVisually(cm, line, start, dir) {
2248
- var bidi = getOrder(line, cm.doc.direction);
2249
  if (!bidi) { return moveLogically(line, start, dir) }
2250
  if (start.ch >= line.text.length) {
2251
- start.ch = line.text.length;
2252
- start.sticky = "before";
2253
  } else if (start.ch <= 0) {
2254
- start.ch = 0;
2255
- start.sticky = "after";
2256
  }
2257
- var partPos = getBidiPartAt(bidi, start.ch, start.sticky), part = bidi[partPos];
2258
- if (cm.doc.direction == "ltr" && part.level % 2 == 0 && (dir > 0 ? part.to > start.ch : part.from < start.ch)) {
2259
- // Case 1: We move within an ltr part in an ltr editor. Even with wrapped lines,
2260
  // nothing interesting happens.
2261
  return moveLogically(line, start, dir)
2262
  }
2263
 
2264
- var mv = function (pos, dir) { return moveCharLogically(line, pos instanceof Pos ? pos.ch : pos, dir); };
2265
- var prep;
2266
  var getWrappedLineExtent = function (ch) {
2267
  if (!cm.options.lineWrapping) { return {begin: 0, end: line.text.length} }
2268
- prep = prep || prepareMeasureForLine(cm, line);
2269
  return wrappedLineExtentChar(cm, line, prep, ch)
2270
- };
2271
- var wrappedLineExtent = getWrappedLineExtent(start.sticky == "before" ? mv(start, -1) : start.ch);
2272
-
2273
- if (cm.doc.direction == "rtl" || part.level == 1) {
2274
- var moveInStorageOrder = (part.level == 1) == (dir < 0);
2275
- var ch = mv(start, moveInStorageOrder ? 1 : -1);
2276
- if (ch != null && (!moveInStorageOrder ? ch >= part.from && ch >= wrappedLineExtent.begin : ch <= part.to && ch <= wrappedLineExtent.end)) {
2277
- // Case 2: We move within an rtl part or in an rtl editor on the same visual line
2278
- var sticky = moveInStorageOrder ? "before" : "after";
2279
  return new Pos(start.line, ch, sticky)
2280
  }
2281
  }
@@ -2286,26 +2277,26 @@ webpackJsonp([2],{
2286
  var searchInVisualLine = function (partPos, dir, wrappedLineExtent) {
2287
  var getRes = function (ch, moveInStorageOrder) { return moveInStorageOrder
2288
  ? new Pos(start.line, mv(ch, 1), "before")
2289
- : new Pos(start.line, ch, "after"); };
2290
 
2291
  for (; partPos >= 0 && partPos < bidi.length; partPos += dir) {
2292
- var part = bidi[partPos];
2293
- var moveInStorageOrder = (dir > 0) == (part.level != 1);
2294
- var ch = moveInStorageOrder ? wrappedLineExtent.begin : mv(wrappedLineExtent.end, -1);
2295
  if (part.from <= ch && ch < part.to) { return getRes(ch, moveInStorageOrder) }
2296
- ch = moveInStorageOrder ? part.from : mv(part.to, -1);
2297
  if (wrappedLineExtent.begin <= ch && ch < wrappedLineExtent.end) { return getRes(ch, moveInStorageOrder) }
2298
  }
2299
- };
2300
 
2301
  // Case 3a: Look for other bidi parts on the same visual line
2302
- var res = searchInVisualLine(partPos + dir, dir, wrappedLineExtent);
2303
  if (res) { return res }
2304
 
2305
  // Case 3b: Look for other bidi parts on the next visual line
2306
- var nextCh = dir > 0 ? wrappedLineExtent.end : mv(wrappedLineExtent.begin, -1);
2307
  if (nextCh != null && !(dir > 0 && nextCh == line.text.length)) {
2308
- res = searchInVisualLine(dir > 0 ? 0 : bidi.length - 1, dir, getWrappedLineExtent(nextCh));
2309
  if (res) { return res }
2310
  }
2311
 
@@ -2318,18 +2309,18 @@ webpackJsonp([2],{
2318
  // Lightweight event framework. on/off also work on DOM nodes,
2319
  // registering native DOM handlers.
2320
 
2321
- var noHandlers = [];
2322
 
2323
  var on = function(emitter, type, f) {
2324
  if (emitter.addEventListener) {
2325
- emitter.addEventListener(type, f, false);
2326
  } else if (emitter.attachEvent) {
2327
- emitter.attachEvent("on" + type, f);
2328
  } else {
2329
- var map$$1 = emitter._handlers || (emitter._handlers = {});
2330
- map$$1[type] = (map$$1[type] || noHandlers).concat(f);
2331
  }
2332
- };
2333
 
2334
  function getHandlers(emitter, type) {
2335
  return emitter._handlers && emitter._handlers[type] || noHandlers
@@ -2337,24 +2328,24 @@ webpackJsonp([2],{
2337
 
2338
  function off(emitter, type, f) {
2339
  if (emitter.removeEventListener) {
2340
- emitter.removeEventListener(type, f, false);
2341
  } else if (emitter.detachEvent) {
2342
- emitter.detachEvent("on" + type, f);
2343
  } else {
2344
- var map$$1 = emitter._handlers, arr = map$$1 && map$$1[type];
2345
  if (arr) {
2346
- var index = indexOf(arr, f);
2347
  if (index > -1)
2348
- { map$$1[type] = arr.slice(0, index).concat(arr.slice(index + 1)); }
2349
  }
2350
  }
2351
  }
2352
 
2353
  function signal(emitter, type /*, values...*/) {
2354
- var handlers = getHandlers(emitter, type);
2355
  if (!handlers.length) { return }
2356
- var args = Array.prototype.slice.call(arguments, 2);
2357
- for (var i = 0; i < handlers.length; ++i) { handlers[i].apply(null, args); }
2358
  }
2359
 
2360
  // The DOM events that CodeMirror handles can be overridden by
@@ -2362,17 +2353,17 @@ webpackJsonp([2],{
2362
  // and preventDefault-ing the event in that handler.
2363
  function signalDOMEvent(cm, e, override) {
2364
  if (typeof e == "string")
2365
- { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }
2366
- signal(cm, override || e.type, cm, e);
2367
  return e_defaultPrevented(e) || e.codemirrorIgnore
2368
  }
2369
 
2370
  function signalCursorActivity(cm) {
2371
- var arr = cm._handlers && cm._handlers.cursorActivity;
2372
  if (!arr) { return }
2373
- var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []);
2374
  for (var i = 0; i < arr.length; ++i) { if (indexOf(set, arr[i]) == -1)
2375
- { set.push(arr[i]); } }
2376
  }
2377
 
2378
  function hasHandler(emitter, type) {
@@ -2382,35 +2373,35 @@ webpackJsonp([2],{
2382
  // Add on and off methods to a constructor's prototype, to make
2383
  // registering events on such objects more convenient.
2384
  function eventMixin(ctor) {
2385
- ctor.prototype.on = function(type, f) {on(this, type, f);};
2386
- ctor.prototype.off = function(type, f) {off(this, type, f);};
2387
  }
2388
 
2389
  // Due to the fact that we still support jurassic IE versions, some
2390
  // compatibility wrappers are needed.
2391
 
2392
  function e_preventDefault(e) {
2393
- if (e.preventDefault) { e.preventDefault(); }
2394
- else { e.returnValue = false; }
2395
  }
2396
  function e_stopPropagation(e) {
2397
- if (e.stopPropagation) { e.stopPropagation(); }
2398
- else { e.cancelBubble = true; }
2399
  }
2400
  function e_defaultPrevented(e) {
2401
  return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false
2402
  }
2403
- function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}
2404
 
2405
  function e_target(e) {return e.target || e.srcElement}
2406
  function e_button(e) {
2407
- var b = e.which;
2408
  if (b == null) {
2409
- if (e.button & 1) { b = 1; }
2410
- else if (e.button & 2) { b = 3; }
2411
- else if (e.button & 4) { b = 2; }
2412
  }
2413
- if (mac && e.ctrlKey && b == 1) { b = 3; }
2414
  return b
2415
  }
2416
 
@@ -2419,32 +2410,32 @@ webpackJsonp([2],{
2419
  // There is *some* kind of drag-and-drop support in IE6-8, but I
2420
  // couldn't get it to work yet.
2421
  if (ie && ie_version < 9) { return false }
2422
- var div = elt('div');
2423
  return "draggable" in div || "dragDrop" in div
2424
- }();
2425
 
2426
- var zwspSupported;
2427
  function zeroWidthElement(measure) {
2428
  if (zwspSupported == null) {
2429
- var test = elt("span", "\u200b");
2430
- removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")]));
2431
  if (measure.firstChild.offsetHeight != 0)
2432
- { zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); }
2433
  }
2434
  var node = zwspSupported ? elt("span", "\u200b") :
2435
- elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px");
2436
- node.setAttribute("cm-text", "");
2437
  return node
2438
  }
2439
 
2440
  // Feature-detect IE's crummy client rect reporting for bidi text
2441
- var badBidiRects;
2442
  function hasBadBidiRects(measure) {
2443
  if (badBidiRects != null) { return badBidiRects }
2444
- var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA"));
2445
- var r0 = range(txt, 0, 1).getBoundingClientRect();
2446
- var r1 = range(txt, 1, 2).getBoundingClientRect();
2447
- removeChildren(measure);
2448
  if (!r0 || r0.left == r0.right) { return false } // Safari returns null in some cases (#2780)
2449
  return badBidiRects = (r1.right - r0.right < 3)
2450
  }
@@ -2452,77 +2443,75 @@ webpackJsonp([2],{
2452
  // See if "".split is the broken IE version, if so, provide an
2453
  // alternative way to split lines.
2454
  var splitLinesAuto = "\n\nb".split(/\n/).length != 3 ? function (string) {
2455
- var pos = 0, result = [], l = string.length;
2456
  while (pos <= l) {
2457
- var nl = string.indexOf("\n", pos);
2458
- if (nl == -1) { nl = string.length; }
2459
- var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl);
2460
- var rt = line.indexOf("\r");
2461
  if (rt != -1) {
2462
- result.push(line.slice(0, rt));
2463
- pos += rt + 1;
2464
  } else {
2465
- result.push(line);
2466
- pos = nl + 1;
2467
  }
2468
  }
2469
  return result
2470
- } : function (string) { return string.split(/\r\n?|\n/); };
2471
 
2472
  var hasSelection = window.getSelection ? function (te) {
2473
  try { return te.selectionStart != te.selectionEnd }
2474
  catch(e) { return false }
2475
  } : function (te) {
2476
- var range$$1;
2477
- try {range$$1 = te.ownerDocument.selection.createRange();}
2478
  catch(e) {}
2479
- if (!range$$1 || range$$1.parentElement() != te) { return false }
2480
- return range$$1.compareEndPoints("StartToEnd", range$$1) != 0
2481
- };
2482
 
2483
  var hasCopyEvent = (function () {
2484
- var e = elt("div");
2485
  if ("oncopy" in e) { return true }
2486
- e.setAttribute("oncopy", "return;");
2487
  return typeof e.oncopy == "function"
2488
- })();
2489
 
2490
- var badZoomedRects = null;
2491
  function hasBadZoomedRects(measure) {
2492
  if (badZoomedRects != null) { return badZoomedRects }
2493
- var node = removeChildrenAndAdd(measure, elt("span", "x"));
2494
- var normal = node.getBoundingClientRect();
2495
- var fromRange = range(node, 0, 1).getBoundingClientRect();
2496
  return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1
2497
  }
2498
 
2499
- // Known modes, by name and by MIME
2500
  var modes = {};
2501
  var mimeModes = {};
2502
-
2503
  // Extra arguments are stored as the mode's dependencies, which is
2504
  // used by (legacy) mechanisms like loadmode.js to automatically
2505
  // load a mode. (Preferred mechanism is the require/define calls.)
2506
  function defineMode(name, mode) {
2507
  if (arguments.length > 2)
2508
- { mode.dependencies = Array.prototype.slice.call(arguments, 2); }
2509
- modes[name] = mode;
2510
  }
2511
 
2512
  function defineMIME(mime, spec) {
2513
- mimeModes[mime] = spec;
2514
  }
2515
 
2516
  // Given a MIME type, a {name, ...options} config object, or a name
2517
  // string, return a mode config object.
2518
  function resolveMode(spec) {
2519
  if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) {
2520
- spec = mimeModes[spec];
2521
  } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) {
2522
- var found = mimeModes[spec.name];
2523
- if (typeof found == "string") { found = {name: found}; }
2524
- spec = createObj(found, spec);
2525
- spec.name = found.name;
2526
  } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) {
2527
  return resolveMode("application/xml")
2528
  } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(spec)) {
@@ -2535,42 +2524,42 @@ webpackJsonp([2],{
2535
  // Given a mode spec (anything that resolveMode accepts), find and
2536
  // initialize an actual mode object.
2537
  function getMode(options, spec) {
2538
- spec = resolveMode(spec);
2539
- var mfactory = modes[spec.name];
2540
  if (!mfactory) { return getMode(options, "text/plain") }
2541
- var modeObj = mfactory(options, spec);
2542
  if (modeExtensions.hasOwnProperty(spec.name)) {
2543
- var exts = modeExtensions[spec.name];
2544
  for (var prop in exts) {
2545
  if (!exts.hasOwnProperty(prop)) { continue }
2546
- if (modeObj.hasOwnProperty(prop)) { modeObj["_" + prop] = modeObj[prop]; }
2547
- modeObj[prop] = exts[prop];
2548
  }
2549
  }
2550
- modeObj.name = spec.name;
2551
- if (spec.helperType) { modeObj.helperType = spec.helperType; }
2552
  if (spec.modeProps) { for (var prop$1 in spec.modeProps)
2553
- { modeObj[prop$1] = spec.modeProps[prop$1]; } }
2554
 
2555
  return modeObj
2556
  }
2557
 
2558
  // This can be used to attach properties to mode objects from
2559
  // outside the actual mode definition.
2560
- var modeExtensions = {};
2561
  function extendMode(mode, properties) {
2562
- var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});
2563
- copyObj(properties, exts);
2564
  }
2565
 
2566
  function copyState(mode, state) {
2567
  if (state === true) { return state }
2568
  if (mode.copyState) { return mode.copyState(state) }
2569
- var nstate = {};
2570
  for (var n in state) {
2571
- var val = state[n];
2572
- if (val instanceof Array) { val = val.concat([]); }
2573
- nstate[n] = val;
2574
  }
2575
  return nstate
2576
  }
@@ -2578,12 +2567,12 @@ webpackJsonp([2],{
2578
  // Given a mode and a state (for that mode), find the inner mode and
2579
  // state at the position that the state refers to.
2580
  function innerMode(mode, state) {
2581
- var info;
2582
  while (mode.innerMode) {
2583
- info = mode.innerMode(state);
2584
  if (!info || info.mode == mode) { break }
2585
- state = info.state;
2586
- mode = info.mode;
2587
  }
2588
  return info || {mode: mode, state: state}
2589
  }
@@ -2598,11 +2587,11 @@ webpackJsonp([2],{
2598
  // parsers more succinct.
2599
 
2600
  var StringStream = function(string, tabSize) {
2601
- this.pos = this.start = 0;
2602
- this.string = string;
2603
- this.tabSize = tabSize || 8;
2604
- this.lastColumnPos = this.lastColumnValue = 0;
2605
- this.lineStart = 0;
2606
  };
2607
 
2608
  StringStream.prototype.eol = function () {return this.pos >= this.string.length};
@@ -2613,34 +2602,34 @@ webpackJsonp([2],{
2613
  { return this.string.charAt(this.pos++) }
2614
  };
2615
  StringStream.prototype.eat = function (match) {
2616
- var ch = this.string.charAt(this.pos);
2617
- var ok;
2618
- if (typeof match == "string") { ok = ch == match; }
2619
- else { ok = ch && (match.test ? match.test(ch) : match(ch)); }
2620
  if (ok) {++this.pos; return ch}
2621
  };
2622
  StringStream.prototype.eatWhile = function (match) {
2623
- var start = this.pos;
2624
  while (this.eat(match)){}
2625
  return this.pos > start
2626
  };
2627
  StringStream.prototype.eatSpace = function () {
2628
  var this$1 = this;
2629
 
2630
- var start = this.pos;
2631
- while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) { ++this$1.pos; }
2632
  return this.pos > start
2633
  };
2634
- StringStream.prototype.skipToEnd = function () {this.pos = this.string.length;};
2635
  StringStream.prototype.skipTo = function (ch) {
2636
- var found = this.string.indexOf(ch, this.pos);
2637
  if (found > -1) {this.pos = found; return true}
2638
  };
2639
- StringStream.prototype.backUp = function (n) {this.pos -= n;};
2640
  StringStream.prototype.column = function () {
2641
  if (this.lastColumnPos < this.start) {
2642
- this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);
2643
- this.lastColumnPos = this.start;
2644
  }
2645
  return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)
2646
  };
@@ -2650,24 +2639,24 @@ webpackJsonp([2],{
2650
  };
2651
  StringStream.prototype.match = function (pattern, consume, caseInsensitive) {
2652
  if (typeof pattern == "string") {
2653
- var cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; };
2654
- var substr = this.string.substr(this.pos, pattern.length);
2655
  if (cased(substr) == cased(pattern)) {
2656
- if (consume !== false) { this.pos += pattern.length; }
2657
  return true
2658
  }
2659
  } else {
2660
- var match = this.string.slice(this.pos).match(pattern);
2661
  if (match && match.index > 0) { return null }
2662
- if (match && consume !== false) { this.pos += match[0].length; }
2663
  return match
2664
  }
2665
  };
2666
  StringStream.prototype.current = function (){return this.string.slice(this.start, this.pos)};
2667
  StringStream.prototype.hideFirstChars = function (n, inner) {
2668
- this.lineStart += n;
2669
  try { return inner() }
2670
- finally { this.lineStart -= n; }
2671
  };
2672
 
2673
  // Compute a style array (an array starting with a mode generation
@@ -2677,35 +2666,35 @@ webpackJsonp([2],{
2677
  function highlightLine(cm, line, state, forceToEnd) {
2678
  // A styles array always starts with a number identifying the
2679
  // mode/overlays that it is based on (for easy invalidation).
2680
- var st = [cm.state.modeGen], lineClasses = {};
2681
  // Compute the base array of styles
2682
  runMode(cm, line.text, cm.doc.mode, state, function (end, style) { return st.push(end, style); },
2683
- lineClasses, forceToEnd);
2684
 
2685
  // Run overlays, adjust style array.
2686
  var loop = function ( o ) {
2687
- var overlay = cm.state.overlays[o], i = 1, at = 0;
2688
  runMode(cm, line.text, overlay.mode, true, function (end, style) {
2689
- var start = i;
2690
  // Ensure there's a token end at the current position, and that i points at it
2691
  while (at < end) {
2692
- var i_end = st[i];
2693
  if (i_end > end)
2694
- { st.splice(i, 1, end, st[i+1], i_end); }
2695
- i += 2;
2696
- at = Math.min(end, i_end);
2697
  }
2698
  if (!style) { return }
2699
  if (overlay.opaque) {
2700
- st.splice(start, i - start, end, "overlay " + style);
2701
- i = start + 2;
2702
  } else {
2703
  for (; start < i; start += 2) {
2704
- var cur = st[start+1];
2705
- st[start+1] = (cur ? cur + " " : "") + "overlay " + style;
2706
  }
2707
  }
2708
- }, lineClasses);
2709
  };
2710
 
2711
  for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );
@@ -2715,30 +2704,30 @@ webpackJsonp([2],{
2715
 
2716
  function getLineStyles(cm, line, updateFrontier) {
2717
  if (!line.styles || line.styles[0] != cm.state.modeGen) {
2718
- var state = getStateBefore(cm, lineNo(line));
2719
- var result = highlightLine(cm, line, line.text.length > cm.options.maxHighlightLength ? copyState(cm.doc.mode, state) : state);
2720
- line.stateAfter = state;
2721
- line.styles = result.styles;
2722
- if (result.classes) { line.styleClasses = result.classes; }
2723
- else if (line.styleClasses) { line.styleClasses = null; }
2724
- if (updateFrontier === cm.doc.frontier) { cm.doc.frontier++; }
2725
  }
2726
  return line.styles
2727
  }
2728
 
2729
  function getStateBefore(cm, n, precise) {
2730
- var doc = cm.doc, display = cm.display;
2731
  if (!doc.mode.startState) { return true }
2732
- var pos = findStartLine(cm, n, precise), state = pos > doc.first && getLine(doc, pos-1).stateAfter;
2733
- if (!state) { state = startState(doc.mode); }
2734
- else { state = copyState(doc.mode, state); }
2735
  doc.iter(pos, n, function (line) {
2736
- processLine(cm, line.text, state);
2737
- var save = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo;
2738
- line.stateAfter = save ? copyState(doc.mode, state) : null;
2739
- ++pos;
2740
- });
2741
- if (precise) { doc.frontier = pos; }
2742
  return state
2743
  }
2744
 
@@ -2746,27 +2735,27 @@ webpackJsonp([2],{
2746
  // update state, but don't save a style array. Used for lines that
2747
  // aren't currently visible.
2748
  function processLine(cm, text, state, startAt) {
2749
- var mode = cm.doc.mode;
2750
- var stream = new StringStream(text, cm.options.tabSize);
2751
- stream.start = stream.pos = startAt || 0;
2752
- if (text == "") { callBlankLine(mode, state); }
2753
  while (!stream.eol()) {
2754
- readToken(mode, stream, state);
2755
- stream.start = stream.pos;
2756
  }
2757
  }
2758
 
2759
  function callBlankLine(mode, state) {
2760
  if (mode.blankLine) { return mode.blankLine(state) }
2761
  if (!mode.innerMode) { return }
2762
- var inner = innerMode(mode, state);
2763
  if (inner.mode.blankLine) { return inner.mode.blankLine(inner.state) }
2764
  }
2765
 
2766
  function readToken(mode, stream, state, inner) {
2767
  for (var i = 0; i < 10; i++) {
2768
- if (inner) { inner[0] = innerMode(mode, state).mode; }
2769
- var style = mode.token(stream, state);
2770
  if (stream.pos > stream.start) { return style }
2771
  }
2772
  throw new Error("Mode " + mode.name + " failed to advance stream.")
@@ -2779,72 +2768,72 @@ webpackJsonp([2],{
2779
  string: stream.current(),
2780
  type: style || null,
2781
  state: copy ? copyState(doc.mode, state) : state
2782
- }); };
2783
 
2784
- var doc = cm.doc, mode = doc.mode, style;
2785
- pos = clipPos(doc, pos);
2786
- var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise);
2787
- var stream = new StringStream(line.text, cm.options.tabSize), tokens;
2788
- if (asArray) { tokens = []; }
2789
  while ((asArray || stream.pos < pos.ch) && !stream.eol()) {
2790
- stream.start = stream.pos;
2791
- style = readToken(mode, stream, state);
2792
- if (asArray) { tokens.push(getObj(true)); }
2793
  }
2794
  return asArray ? tokens : getObj()
2795
  }
2796
 
2797
  function extractLineClasses(type, output) {
2798
  if (type) { for (;;) {
2799
- var lineClass = type.match(/(?:^|\s+)line-(background-)?(\S+)/);
2800
  if (!lineClass) { break }
2801
- type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length);
2802
- var prop = lineClass[1] ? "bgClass" : "textClass";
2803
  if (output[prop] == null)
2804
- { output[prop] = lineClass[2]; }
2805
  else if (!(new RegExp("(?:^|\s)" + lineClass[2] + "(?:$|\s)")).test(output[prop]))
2806
- { output[prop] += " " + lineClass[2]; }
2807
  } }
2808
  return type
2809
  }
2810
 
2811
  // Run the given mode's parser over a line, calling f for each token.
2812
  function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) {
2813
- var flattenSpans = mode.flattenSpans;
2814
- if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }
2815
- var curStart = 0, curStyle = null;
2816
- var stream = new StringStream(text, cm.options.tabSize), style;
2817
- var inner = cm.options.addModeClass && [null];
2818
- if (text == "") { extractLineClasses(callBlankLine(mode, state), lineClasses); }
2819
  while (!stream.eol()) {
2820
  if (stream.pos > cm.options.maxHighlightLength) {
2821
- flattenSpans = false;
2822
- if (forceToEnd) { processLine(cm, text, state, stream.pos); }
2823
- stream.pos = text.length;
2824
- style = null;
2825
  } else {
2826
- style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses);
2827
  }
2828
  if (inner) {
2829
- var mName = inner[0].name;
2830
- if (mName) { style = "m-" + (style ? mName + " " + style : mName); }
2831
  }
2832
  if (!flattenSpans || curStyle != style) {
2833
  while (curStart < stream.start) {
2834
- curStart = Math.min(stream.start, curStart + 5000);
2835
- f(curStart, curStyle);
2836
  }
2837
- curStyle = style;
2838
  }
2839
- stream.start = stream.pos;
2840
  }
2841
  while (curStart < stream.pos) {
2842
  // Webkit seems to refuse to render text nodes longer than 57444
2843
  // characters, and returns inaccurate measurements in nodes
2844
  // starting around 5000 chars.
2845
- var pos = Math.min(stream.pos, curStart + 5000);
2846
- f(pos, curStyle);
2847
- curStart = pos;
2848
  }
2849
  }
2850
 
@@ -2854,16 +2843,16 @@ webpackJsonp([2],{
2854
  // smallest indentation, which tends to need the least context to
2855
  // parse correctly.
2856
  function findStartLine(cm, n, precise) {
2857
- var minindent, minline, doc = cm.doc;
2858
- var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);
2859
  for (var search = n; search > lim; --search) {
2860
  if (search <= doc.first) { return doc.first }
2861
- var line = getLine(doc, search - 1);
2862
  if (line.stateAfter && (!precise || search <= doc.frontier)) { return search }
2863
- var indented = countColumn(line.text, null, cm.options.tabSize);
2864
  if (minline == null || minindent > indented) {
2865
- minline = search - 1;
2866
- minindent = indented;
2867
  }
2868
  }
2869
  return minline
@@ -2874,32 +2863,32 @@ webpackJsonp([2],{
2874
  // Line objects. These hold state related to a line, including
2875
  // highlighting info (the styles array).
2876
  var Line = function(text, markedSpans, estimateHeight) {
2877
- this.text = text;
2878
- attachMarkedSpans(this, markedSpans);
2879
- this.height = estimateHeight ? estimateHeight(this) : 1;
2880
  };
2881
 
2882
  Line.prototype.lineNo = function () { return lineNo(this) };
2883
- eventMixin(Line);
2884
 
2885
  // Change the content (text, markers) of a line. Automatically
2886
  // invalidates cached information and tries to re-estimate the
2887
  // line's height.
2888
  function updateLine(line, text, markedSpans, estimateHeight) {
2889
- line.text = text;
2890
- if (line.stateAfter) { line.stateAfter = null; }
2891
- if (line.styles) { line.styles = null; }
2892
- if (line.order != null) { line.order = null; }
2893
- detachMarkedSpans(line);
2894
- attachMarkedSpans(line, markedSpans);
2895
- var estHeight = estimateHeight ? estimateHeight(line) : 1;
2896
- if (estHeight != line.height) { updateLineHeight(line, estHeight); }
2897
  }
2898
 
2899
  // Detach a line from the document tree and its markers.
2900
  function cleanUpLine(line) {
2901
- line.parent = null;
2902
- detachMarkedSpans(line);
2903
  }
2904
 
2905
  // Convert a style as returned by a mode (either null, or a string
@@ -2909,7 +2898,7 @@ webpackJsonp([2],{
2909
  var styleToClassCacheWithMode = {};
2910
  function interpretTokenStyle(style, options) {
2911
  if (!style || /^\s*$/.test(style)) { return null }
2912
- var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;
2913
  return cache[style] ||
2914
  (cache[style] = style.replace(/\S+/g, "cm-$&"))
2915
  }
@@ -2923,64 +2912,67 @@ webpackJsonp([2],{
2923
  // The padding-right forces the element to have a 'border', which
2924
  // is needed on Webkit to be able to get line-level bounding
2925
  // rectangles for it (in measureChar).
2926
- var content = eltP("span", null, null, webkit ? "padding-right: .1px" : null);
2927
- var builder = {pre: eltP("pre", [content], "CodeMirror-line"), content: content,
2928
  col: 0, pos: 0, cm: cm,
2929
  trailingSpace: false,
2930
- splitSpaces: (ie || webkit) && cm.getOption("lineWrapping")};
2931
- lineView.measure = {};
 
 
 
2932
 
2933
  // Iterate over the logical lines that make up this visual line.
2934
  for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {
2935
- var line = i ? lineView.rest[i - 1] : lineView.line, order = (void 0);
2936
- builder.pos = 0;
2937
- builder.addToken = buildToken;
2938
  // Optionally wire in some hacks into the token-rendering
2939
  // algorithm, to deal with browser quirks.
2940
- if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction)))
2941
- { builder.addToken = buildTokenBadBidi(builder.addToken, order); }
2942
- builder.map = [];
2943
- var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line);
2944
- insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate));
2945
  if (line.styleClasses) {
2946
  if (line.styleClasses.bgClass)
2947
- { builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || ""); }
2948
  if (line.styleClasses.textClass)
2949
- { builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || ""); }
2950
  }
2951
 
2952
  // Ensure at least a single node is present, for measuring.
2953
  if (builder.map.length == 0)
2954
- { builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); }
2955
 
2956
  // Store the map and a cache object for the current logical line
2957
  if (i == 0) {
2958
- lineView.measure.map = builder.map;
2959
- lineView.measure.cache = {};
2960
  } else {
2961
- (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map)
2962
- ;(lineView.measure.caches || (lineView.measure.caches = [])).push({});
2963
  }
2964
  }
2965
 
2966
  // See issue #2901
2967
  if (webkit) {
2968
- var last = builder.content.lastChild;
2969
  if (/\bcm-tab\b/.test(last.className) || (last.querySelector && last.querySelector(".cm-tab")))
2970
- { builder.content.className = "cm-tab-wrap-hack"; }
2971
  }
2972
 
2973
- signal(cm, "renderLine", cm, lineView.line, builder.pre);
2974
  if (builder.pre.className)
2975
- { builder.textClass = joinClasses(builder.pre.className, builder.textClass || ""); }
2976
 
2977
  return builder
2978
  }
2979
 
2980
  function defaultSpecialCharPlaceholder(ch) {
2981
- var token = elt("span", "\u2022", "cm-invalidchar");
2982
- token.title = "\\u" + ch.charCodeAt(0).toString(16);
2983
- token.setAttribute("aria-label", token.title);
2984
  return token
2985
  }
2986
 
@@ -2988,75 +2980,75 @@ webpackJsonp([2],{
2988
  // the line map. Takes care to render special characters separately.
2989
  function buildToken(builder, text, style, startStyle, endStyle, title, css) {
2990
  if (!text) { return }
2991
- var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text;
2992
- var special = builder.cm.state.specialChars, mustWrap = false;
2993
- var content;
2994
  if (!special.test(text)) {
2995
- builder.col += text.length;
2996
- content = document.createTextNode(displayText);
2997
- builder.map.push(builder.pos, builder.pos + text.length, content);
2998
- if (ie && ie_version < 9) { mustWrap = true; }
2999
- builder.pos += text.length;
3000
  } else {
3001
- content = document.createDocumentFragment();
3002
- var pos = 0;
3003
  while (true) {
3004
- special.lastIndex = pos;
3005
- var m = special.exec(text);
3006
- var skipped = m ? m.index - pos : text.length - pos;
3007
  if (skipped) {
3008
- var txt = document.createTextNode(displayText.slice(pos, pos + skipped));
3009
- if (ie && ie_version < 9) { content.appendChild(elt("span", [txt])); }
3010
- else { content.appendChild(txt); }
3011
- builder.map.push(builder.pos, builder.pos + skipped, txt);
3012
- builder.col += skipped;
3013
- builder.pos += skipped;
3014
  }
3015
  if (!m) { break }
3016
- pos += skipped + 1;
3017
- var txt$1 = (void 0);
3018
  if (m[0] == "\t") {
3019
- var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;
3020
- txt$1 = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab"));
3021
- txt$1.setAttribute("role", "presentation");
3022
- txt$1.setAttribute("cm-text", "\t");
3023
- builder.col += tabWidth;
3024
  } else if (m[0] == "\r" || m[0] == "\n") {
3025
- txt$1 = content.appendChild(elt("span", m[0] == "\r" ? "\u240d" : "\u2424", "cm-invalidchar"));
3026
- txt$1.setAttribute("cm-text", m[0]);
3027
- builder.col += 1;
3028
  } else {
3029
- txt$1 = builder.cm.options.specialCharPlaceholder(m[0]);
3030
- txt$1.setAttribute("cm-text", m[0]);
3031
- if (ie && ie_version < 9) { content.appendChild(elt("span", [txt$1])); }
3032
- else { content.appendChild(txt$1); }
3033
- builder.col += 1;
3034
  }
3035
- builder.map.push(builder.pos, builder.pos + 1, txt$1);
3036
- builder.pos++;
3037
  }
3038
  }
3039
- builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32;
3040
  if (style || startStyle || endStyle || mustWrap || css) {
3041
- var fullStyle = style || "";
3042
- if (startStyle) { fullStyle += startStyle; }
3043
- if (endStyle) { fullStyle += endStyle; }
3044
- var token = elt("span", [content], fullStyle, css);
3045
- if (title) { token.title = title; }
3046
  return builder.content.appendChild(token)
3047
  }
3048
- builder.content.appendChild(content);
3049
  }
3050
 
3051
  function splitSpaces(text, trailingBefore) {
3052
  if (text.length > 1 && !/ /.test(text)) { return text }
3053
- var spaceBefore = trailingBefore, result = "";
3054
  for (var i = 0; i < text.length; i++) {
3055
- var ch = text.charAt(i);
3056
  if (ch == " " && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32))
3057
- { ch = "\u00a0"; }
3058
- result += ch;
3059
- spaceBefore = ch == " ";
3060
  }
3061
  return result
3062
  }
@@ -3065,106 +3057,106 @@ webpackJsonp([2],{
3065
  // right-to-left text.
3066
  function buildTokenBadBidi(inner, order) {
3067
  return function (builder, text, style, startStyle, endStyle, title, css) {
3068
- style = style ? style + " cm-force-border" : "cm-force-border";
3069
- var start = builder.pos, end = start + text.length;
3070
  for (;;) {
3071
  // Find the part that overlaps with the start of this text
3072
- var part = (void 0);
3073
  for (var i = 0; i < order.length; i++) {
3074
- part = order[i];
3075
  if (part.to > start && part.from <= start) { break }
3076
  }
3077
  if (part.to >= end) { return inner(builder, text, style, startStyle, endStyle, title, css) }
3078
- inner(builder, text.slice(0, part.to - start), style, startStyle, null, title, css);
3079
- startStyle = null;
3080
- text = text.slice(part.to - start);
3081
- start = part.to;
3082
  }
3083
  }
3084
  }
3085
 
3086
  function buildCollapsedSpan(builder, size, marker, ignoreWidget) {
3087
- var widget = !ignoreWidget && marker.widgetNode;
3088
- if (widget) { builder.map.push(builder.pos, builder.pos + size, widget); }
3089
  if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {
3090
  if (!widget)
3091
- { widget = builder.content.appendChild(document.createElement("span")); }
3092
- widget.setAttribute("cm-marker", marker.id);
3093
  }
3094
  if (widget) {
3095
- builder.cm.display.input.setUneditable(widget);
3096
- builder.content.appendChild(widget);
3097
  }
3098
- builder.pos += size;
3099
- builder.trailingSpace = false;
3100
  }
3101
 
3102
  // Outputs a number of spans to make up a line, taking highlighting
3103
  // and marked text into account.
3104
  function insertLineContent(line, builder, styles) {
3105
- var spans = line.markedSpans, allText = line.text, at = 0;
3106
  if (!spans) {
3107
  for (var i$1 = 1; i$1 < styles.length; i$1+=2)
3108
- { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }
3109
  return
3110
  }
3111
 
3112
- var len = allText.length, pos = 0, i = 1, text = "", style, css;
3113
- var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;
3114
  for (;;) {
3115
  if (nextChange == pos) { // Update current marker set
3116
- spanStyle = spanEndStyle = spanStartStyle = title = css = "";
3117
- collapsed = null; nextChange = Infinity;
3118
- var foundBookmarks = [], endStyles = (void 0);
3119
  for (var j = 0; j < spans.length; ++j) {
3120
- var sp = spans[j], m = sp.marker;
3121
  if (m.type == "bookmark" && sp.from == pos && m.widgetNode) {
3122
- foundBookmarks.push(m);
3123
  } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {
3124
  if (sp.to != null && sp.to != pos && nextChange > sp.to) {
3125
- nextChange = sp.to;
3126
- spanEndStyle = "";
3127
  }
3128
- if (m.className) { spanStyle += " " + m.className; }
3129
- if (m.css) { css = (css ? css + ";" : "") + m.css; }
3130
- if (m.startStyle && sp.from == pos) { spanStartStyle += " " + m.startStyle; }
3131
- if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }
3132
- if (m.title && !title) { title = m.title; }
3133
  if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))
3134
- { collapsed = sp; }
3135
  } else if (sp.from > pos && nextChange > sp.from) {
3136
- nextChange = sp.from;
3137
  }
3138
  }
3139
  if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)
3140
- { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += " " + endStyles[j$1]; } } }
3141
 
3142
  if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)
3143
- { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }
3144
  if (collapsed && (collapsed.from || 0) == pos) {
3145
  buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,
3146
- collapsed.marker, collapsed.from == null);
3147
  if (collapsed.to == null) { return }
3148
- if (collapsed.to == pos) { collapsed = false; }
3149
  }
3150
  }
3151
  if (pos >= len) { break }
3152
 
3153
- var upto = Math.min(len, nextChange);
3154
  while (true) {
3155
  if (text) {
3156
- var end = pos + text.length;
3157
  if (!collapsed) {
3158
- var tokenText = end > upto ? text.slice(0, upto - pos) : text;
3159
  builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,
3160
- spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", title, css);
3161
  }
3162
  if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}
3163
- pos = end;
3164
- spanStartStyle = "";
3165
  }
3166
- text = allText.slice(at, at = styles[i++]);
3167
- style = interpretTokenStyle(styles[i++], builder.cm.options);
3168
  }
3169
  }
3170
  }
@@ -3175,67 +3167,67 @@ webpackJsonp([2],{
3175
  // logical lines, if those are connected by collapsed ranges.
3176
  function LineView(doc, line, lineN) {
3177
  // The starting line
3178
- this.line = line;
3179
  // Continuing lines, if any
3180
- this.rest = visualLineContinued(line);
3181
  // Number of logical lines in this visual line
3182
- this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;
3183
- this.node = this.text = null;
3184
- this.hidden = lineIsHidden(doc, line);
3185
  }
3186
 
3187
  // Create a range of LineView objects for the given lines.
3188
  function buildViewArray(cm, from, to) {
3189
- var array = [], nextPos;
3190
  for (var pos = from; pos < to; pos = nextPos) {
3191
- var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);
3192
- nextPos = pos + view.size;
3193
- array.push(view);
3194
  }
3195
  return array
3196
  }
3197
 
3198
- var operationGroup = null;
3199
 
3200
  function pushOperation(op) {
3201
  if (operationGroup) {
3202
- operationGroup.ops.push(op);
3203
  } else {
3204
  op.ownsGroup = operationGroup = {
3205
  ops: [op],
3206
  delayedCallbacks: []
3207
- };
3208
  }
3209
  }
3210
 
3211
  function fireCallbacksForOps(group) {
3212
  // Calls delayed callbacks and cursorActivity handlers until no
3213
  // new ones appear
3214
- var callbacks = group.delayedCallbacks, i = 0;
3215
  do {
3216
  for (; i < callbacks.length; i++)
3217
- { callbacks[i].call(null); }
3218
  for (var j = 0; j < group.ops.length; j++) {
3219
- var op = group.ops[j];
3220
  if (op.cursorActivityHandlers)
3221
  { while (op.cursorActivityCalled < op.cursorActivityHandlers.length)
3222
- { op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm); } }
3223
  }
3224
  } while (i < callbacks.length)
3225
  }
3226
 
3227
  function finishOperation(op, endCb) {
3228
- var group = op.ownsGroup;
3229
  if (!group) { return }
3230
 
3231
- try { fireCallbacksForOps(group); }
3232
  finally {
3233
- operationGroup = null;
3234
- endCb(group);
3235
  }
3236
  }
3237
 
3238
- var orphanDelayedCallbacks = null;
3239
 
3240
  // Often, we want to signal events at a point where we are in the
3241
  // middle of some work, but don't want the handler to start calling
@@ -3245,19 +3237,19 @@ webpackJsonp([2],{
3245
  // them to be executed when the last operation ends, or, if no
3246
  // operation is active, when a timeout fires.
3247
  function signalLater(emitter, type /*, values...*/) {
3248
- var arr = getHandlers(emitter, type);
3249
  if (!arr.length) { return }
3250
- var args = Array.prototype.slice.call(arguments, 2), list;
3251
  if (operationGroup) {
3252
- list = operationGroup.delayedCallbacks;
3253
  } else if (orphanDelayedCallbacks) {
3254
- list = orphanDelayedCallbacks;
3255
  } else {
3256
- list = orphanDelayedCallbacks = [];
3257
- setTimeout(fireOrphanDelayed, 0);
3258
  }
3259
  var loop = function ( i ) {
3260
- list.push(function () { return arr[i].apply(null, args); });
3261
  };
3262
 
3263
  for (var i = 0; i < arr.length; ++i)
@@ -3265,9 +3257,9 @@ webpackJsonp([2],{
3265
  }
3266
 
3267
  function fireOrphanDelayed() {
3268
- var delayed = orphanDelayedCallbacks;
3269
- orphanDelayedCallbacks = null;
3270
- for (var i = 0; i < delayed.length; ++i) { delayed[i](); }
3271
  }
3272
 
3273
  // When an aspect of a line changes, a string is added to
@@ -3275,48 +3267,47 @@ webpackJsonp([2],{
3275
  // DOM structure.
3276
  function updateLineForChanges(cm, lineView, lineN, dims) {
3277
  for (var j = 0; j < lineView.changes.length; j++) {
3278
- var type = lineView.changes[j];
3279
- if (type == "text") { updateLineText(cm, lineView); }
3280
- else if (type == "gutter") { updateLineGutter(cm, lineView, lineN, dims); }
3281
- else if (type == "class") { updateLineClasses(cm, lineView); }
3282
- else if (type == "widget") { updateLineWidgets(cm, lineView, dims); }
3283
  }
3284
- lineView.changes = null;
3285
  }
3286
 
3287
  // Lines with gutter elements, widgets or a background class need to
3288
  // be wrapped, and have the extra elements added to the wrapper div
3289
  function ensureLineWrapped(lineView) {
3290
  if (lineView.node == lineView.text) {
3291
- lineView.node = elt("div", null, null, "position: relative");
3292
  if (lineView.text.parentNode)
3293
- { lineView.text.parentNode.replaceChild(lineView.node, lineView.text); }
3294
- lineView.node.appendChild(lineView.text);
3295
- if (ie && ie_version < 8) { lineView.node.style.zIndex = 2; }
3296
  }
3297
  return lineView.node
3298
  }
3299
 
3300
- function updateLineBackground(cm, lineView) {
3301
- var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass;
3302
- if (cls) { cls += " CodeMirror-linebackground"; }
3303
  if (lineView.background) {
3304
- if (cls) { lineView.background.className = cls; }
3305
- else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }
3306
  } else if (cls) {
3307
- var wrap = ensureLineWrapped(lineView);
3308
- lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild);
3309
- cm.display.input.setUneditable(lineView.background);
3310
  }
3311
  }
3312
 
3313
  // Wrapper around buildLineContent which will reuse the structure
3314
  // in display.externalMeasured when possible.
3315
  function getLineContent(cm, lineView) {
3316
- var ext = cm.display.externalMeasured;
3317
  if (ext && ext.line == lineView.line) {
3318
- cm.display.externalMeasured = null;
3319
- lineView.measure = ext.measure;
3320
  return ext.built
3321
  }
3322
  return buildLineContent(cm, lineView)
@@ -3326,144 +3317,143 @@ webpackJsonp([2],{
3326
  // classes because the mode may output tokens that influence these
3327
  // classes.
3328
  function updateLineText(cm, lineView) {
3329
- var cls = lineView.text.className;
3330
- var built = getLineContent(cm, lineView);
3331
- if (lineView.text == lineView.node) { lineView.node = built.pre; }
3332
- lineView.text.parentNode.replaceChild(built.pre, lineView.text);
3333
- lineView.text = built.pre;
3334
  if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {
3335
- lineView.bgClass = built.bgClass;
3336
- lineView.textClass = built.textClass;
3337
- updateLineClasses(cm, lineView);
3338
  } else if (cls) {
3339
- lineView.text.className = cls;
3340
  }
3341
  }
3342
 
3343
- function updateLineClasses(cm, lineView) {
3344
- updateLineBackground(cm, lineView);
3345
  if (lineView.line.wrapClass)
3346
- { ensureLineWrapped(lineView).className = lineView.line.wrapClass; }
3347
  else if (lineView.node != lineView.text)
3348
- { lineView.node.className = ""; }
3349
- var textClass = lineView.textClass ? lineView.textClass + " " + (lineView.line.textClass || "") : lineView.line.textClass;
3350
- lineView.text.className = textClass || "";
3351
  }
3352
 
3353
  function updateLineGutter(cm, lineView, lineN, dims) {
3354
  if (lineView.gutter) {
3355
- lineView.node.removeChild(lineView.gutter);
3356
- lineView.gutter = null;
3357
  }
3358
  if (lineView.gutterBackground) {
3359
- lineView.node.removeChild(lineView.gutterBackground);
3360
- lineView.gutterBackground = null;
3361
  }
3362
  if (lineView.line.gutterClass) {
3363
- var wrap = ensureLineWrapped(lineView);
3364
  lineView.gutterBackground = elt("div", null, "CodeMirror-gutter-background " + lineView.line.gutterClass,
3365
- ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px; width: " + (dims.gutterTotalWidth) + "px"));
3366
- cm.display.input.setUneditable(lineView.gutterBackground);
3367
- wrap.insertBefore(lineView.gutterBackground, lineView.text);
3368
  }
3369
- var markers = lineView.line.gutterMarkers;
3370
  if (cm.options.lineNumbers || markers) {
3371
- var wrap$1 = ensureLineWrapped(lineView);
3372
- var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px"));
3373
- cm.display.input.setUneditable(gutterWrap);
3374
- wrap$1.insertBefore(gutterWrap, lineView.text);
3375
  if (lineView.line.gutterClass)
3376
- { gutterWrap.className += " " + lineView.line.gutterClass; }
3377
  if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"]))
3378
  { lineView.lineNumber = gutterWrap.appendChild(
3379
  elt("div", lineNumberFor(cm.options, lineN),
3380
  "CodeMirror-linenumber CodeMirror-gutter-elt",
3381
- ("left: " + (dims.gutterLeft["CodeMirror-linenumbers"]) + "px; width: " + (cm.display.lineNumInnerWidth) + "px"))); }
3382
  if (markers) { for (var k = 0; k < cm.options.gutters.length; ++k) {
3383
- var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id];
3384
  if (found)
3385
  { gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt",
3386
- ("left: " + (dims.gutterLeft[id]) + "px; width: " + (dims.gutterWidth[id]) + "px"))); }
3387
  } }
3388
  }
3389
  }
3390
 
3391
  function updateLineWidgets(cm, lineView, dims) {
3392
- if (lineView.alignable) { lineView.alignable = null; }
3393
  for (var node = lineView.node.firstChild, next = (void 0); node; node = next) {
3394
- next = node.nextSibling;
3395
  if (node.className == "CodeMirror-linewidget")
3396
- { lineView.node.removeChild(node); }
3397
  }
3398
- insertLineWidgets(cm, lineView, dims);
3399
  }
3400
 
3401
  // Build a line's DOM representation from scratch
3402
  function buildLineElement(cm, lineView, lineN, dims) {
3403
- var built = getLineContent(cm, lineView);
3404
- lineView.text = lineView.node = built.pre;
3405
- if (built.bgClass) { lineView.bgClass = built.bgClass; }
3406
- if (built.textClass) { lineView.textClass = built.textClass; }
3407
-
3408
- updateLineClasses(cm, lineView);
3409
- updateLineGutter(cm, lineView, lineN, dims);
3410
- insertLineWidgets(cm, lineView, dims);
3411
  return lineView.node
3412
  }
3413
 
3414
  // A lineView may contain multiple logical lines (when merged by
3415
  // collapsed spans). The widgets for all of them need to be drawn.
3416
  function insertLineWidgets(cm, lineView, dims) {
3417
- insertLineWidgetsFor(cm, lineView.line, lineView, dims, true);
3418
  if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)
3419
- { insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); } }
3420
  }
3421
 
3422
  function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {
3423
  if (!line.widgets) { return }
3424
- var wrap = ensureLineWrapped(lineView);
3425
  for (var i = 0, ws = line.widgets; i < ws.length; ++i) {
3426
- var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget");
3427
- if (!widget.handleMouseEvents) { node.setAttribute("cm-ignore-events", "true"); }
3428
- positionLineWidget(widget, node, lineView, dims);
3429
- cm.display.input.setUneditable(node);
3430
  if (allowAbove && widget.above)
3431
- { wrap.insertBefore(node, lineView.gutter || lineView.text); }
3432
  else
3433
- { wrap.appendChild(node); }
3434
- signalLater(widget, "redraw");
3435
  }
3436
  }
3437
 
3438
  function positionLineWidget(widget, node, lineView, dims) {
3439
  if (widget.noHScroll) {
3440
- (lineView.alignable || (lineView.alignable = [])).push(node);
3441
- var width = dims.wrapperWidth;
3442
- node.style.left = dims.fixedPos + "px";
3443
  if (!widget.coverGutter) {
3444
- width -= dims.gutterTotalWidth;
3445
- node.style.paddingLeft = dims.gutterTotalWidth + "px";
3446
  }
3447
- node.style.width = width + "px";
3448
  }
3449
  if (widget.coverGutter) {
3450
- node.style.zIndex = 5;
3451
- node.style.position = "relative";
3452
- if (!widget.noHScroll) { node.style.marginLeft = -dims.gutterTotalWidth + "px"; }
3453
  }
3454
  }
3455
 
3456
  function widgetHeight(widget) {
3457
  if (widget.height != null) { return widget.height }
3458
- var cm = widget.doc.cm;
3459
  if (!cm) { return 0 }
3460
  if (!contains(document.body, widget.node)) {
3461
- var parentStyle = "position: relative;";
3462
  if (widget.coverGutter)
3463
- { parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;"; }
3464
  if (widget.noHScroll)
3465
- { parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;"; }
3466
- removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle));
3467
  }
3468
  return widget.height = widget.node.parentNode.offsetHeight
3469
  }
@@ -3483,10 +3473,10 @@ webpackJsonp([2],{
3483
  function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight}
3484
  function paddingH(display) {
3485
  if (display.cachedPaddingH) { return display.cachedPaddingH }
3486
- var e = removeChildrenAndAdd(display.measure, elt("pre", "x"));
3487
- var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;
3488
- var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};
3489
- if (!isNaN(data.left) && !isNaN(data.right)) { display.cachedPaddingH = data; }
3490
  return data
3491
  }
3492
 
@@ -3503,20 +3493,20 @@ webpackJsonp([2],{
3503
  // line. When lineWrapping is on, there might be more than one
3504
  // height.
3505
  function ensureLineHeights(cm, lineView, rect) {
3506
- var wrapping = cm.options.lineWrapping;
3507
- var curWidth = wrapping && displayWidth(cm);
3508
  if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {
3509
- var heights = lineView.measure.heights = [];
3510
  if (wrapping) {
3511
- lineView.measure.width = curWidth;
3512
- var rects = lineView.text.firstChild.getClientRects();
3513
  for (var i = 0; i < rects.length - 1; i++) {
3514
- var cur = rects[i], next = rects[i + 1];
3515
  if (Math.abs(cur.bottom - next.bottom) > 2)
3516
- { heights.push((cur.bottom + next.top) / 2 - rect.top); }
3517
  }
3518
  }
3519
- heights.push(rect.bottom - rect.top);
3520
  }
3521
  }
3522
 
@@ -3537,13 +3527,13 @@ webpackJsonp([2],{
3537
  // Render a line into the hidden node display.externalMeasured. Used
3538
  // when measurement is needed for a line that's not in the viewport.
3539
  function updateExternalMeasurement(cm, line) {
3540
- line = visualLine(line);
3541
- var lineN = lineNo(line);
3542
- var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);
3543
- view.lineN = lineN;
3544
- var built = view.built = buildLineContent(cm, view);
3545
- view.text = built.pre;
3546
- removeChildrenAndAdd(cm.display.lineMeasure, built.pre);
3547
  return view
3548
  }
3549
 
@@ -3557,7 +3547,7 @@ webpackJsonp([2],{
3557
  function findViewForLine(cm, lineN) {
3558
  if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)
3559
  { return cm.display.view[findViewIndex(cm, lineN)] }
3560
- var ext = cm.display.externalMeasured;
3561
  if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)
3562
  { return ext }
3563
  }
@@ -3568,18 +3558,18 @@ webpackJsonp([2],{
3568
  // measurements in a row, can thus ensure that the set-up work is
3569
  // only done once.
3570
  function prepareMeasureForLine(cm, line) {
3571
- var lineN = lineNo(line);
3572
- var view = findViewForLine(cm, lineN);
3573
  if (view && !view.text) {
3574
- view = null;
3575
  } else if (view && view.changes) {
3576
- updateLineForChanges(cm, view, lineN, getDimensions(cm));
3577
- cm.curOp.forceUpdate = true;
3578
  }
3579
  if (!view)
3580
- { view = updateExternalMeasurement(cm, line); }
3581
 
3582
- var info = mapFromLineView(view, line, lineN);
3583
  return {
3584
  line: line, view: view, rect: null,
3585
  map: info.map, cache: info.cache, before: info.before,
@@ -3590,58 +3580,58 @@ webpackJsonp([2],{
3590
  // Given a prepared measurement object, measures the position of an
3591
  // actual character (or fetches it from the cache).
3592
  function measureCharPrepared(cm, prepared, ch, bias, varHeight) {
3593
- if (prepared.before) { ch = -1; }
3594
- var key = ch + (bias || ""), found;
3595
  if (prepared.cache.hasOwnProperty(key)) {
3596
- found = prepared.cache[key];
3597
  } else {
3598
  if (!prepared.rect)
3599
- { prepared.rect = prepared.view.text.getBoundingClientRect(); }
3600
  if (!prepared.hasHeights) {
3601
- ensureLineHeights(cm, prepared.view, prepared.rect);
3602
- prepared.hasHeights = true;
3603
  }
3604
- found = measureCharInner(cm, prepared, ch, bias);
3605
- if (!found.bogus) { prepared.cache[key] = found; }
3606
  }
3607
  return {left: found.left, right: found.right,
3608
  top: varHeight ? found.rtop : found.top,
3609
  bottom: varHeight ? found.rbottom : found.bottom}
3610
  }
3611
 
3612
- var nullRect = {left: 0, right: 0, top: 0, bottom: 0};
3613
 
3614
- function nodeAndOffsetInLineMap(map$$1, ch, bias) {
3615
- var node, start, end, collapse, mStart, mEnd;
3616
  // First, search the line map for the text node corresponding to,
3617
  // or closest to, the target character.
3618
- for (var i = 0; i < map$$1.length; i += 3) {
3619
- mStart = map$$1[i];
3620
- mEnd = map$$1[i + 1];
3621
  if (ch < mStart) {
3622
- start = 0; end = 1;
3623
- collapse = "left";
3624
  } else if (ch < mEnd) {
3625
- start = ch - mStart;
3626
- end = start + 1;
3627
- } else if (i == map$$1.length - 3 || ch == mEnd && map$$1[i + 3] > ch) {
3628
- end = mEnd - mStart;
3629
- start = end - 1;
3630
- if (ch >= mEnd) { collapse = "right"; }
3631
  }
3632
  if (start != null) {
3633
- node = map$$1[i + 2];
3634
  if (mStart == mEnd && bias == (node.insertLeft ? "left" : "right"))
3635
- { collapse = bias; }
3636
  if (bias == "left" && start == 0)
3637
- { while (i && map$$1[i - 2] == map$$1[i - 3] && map$$1[i - 1].insertLeft) {
3638
- node = map$$1[(i -= 3) + 2];
3639
- collapse = "left";
3640
  } }
3641
  if (bias == "right" && start == mEnd - mStart)
3642
- { while (i < map$$1.length - 3 && map$$1[i + 3] == map$$1[i + 4] && !map$$1[i + 5].insertLeft) {
3643
- node = map$$1[(i += 3) + 2];
3644
- collapse = "right";
3645
  } }
3646
  break
3647
  }
@@ -3650,7 +3640,7 @@ webpackJsonp([2],{
3650
  }
3651
 
3652
  function getUsefulRect(rects, bias) {
3653
- var rect = nullRect;
3654
  if (bias == "left") { for (var i = 0; i < rects.length; i++) {
3655
  if ((rect = rects[i]).left != rect.right) { break }
3656
  } } else { for (var i$1 = rects.length - 1; i$1 >= 0; i$1--) {
@@ -3660,52 +3650,52 @@ webpackJsonp([2],{
3660
  }
3661
 
3662
  function measureCharInner(cm, prepared, ch, bias) {
3663
- var place = nodeAndOffsetInLineMap(prepared.map, ch, bias);
3664
- var node = place.node, start = place.start, end = place.end, collapse = place.collapse;
3665
 
3666
- var rect;
3667
  if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.
3668
  for (var i$1 = 0; i$1 < 4; i$1++) { // Retry a maximum of 4 times when nonsense rectangles are returned
3669
- while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) { --start; }
3670
- while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) { ++end; }
3671
  if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart)
3672
- { rect = node.parentNode.getBoundingClientRect(); }
3673
  else
3674
- { rect = getUsefulRect(range(node, start, end).getClientRects(), bias); }
3675
  if (rect.left || rect.right || start == 0) { break }
3676
- end = start;
3677
- start = start - 1;
3678
- collapse = "right";
3679
  }
3680
- if (ie && ie_version < 11) { rect = maybeUpdateRectForZooming(cm.display.measure, rect); }
3681
  } else { // If it is a widget, simply get the box for the whole widget.
3682
- if (start > 0) { collapse = bias = "right"; }
3683
- var rects;
3684
  if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1)
3685
- { rect = rects[bias == "right" ? rects.length - 1 : 0]; }
3686
  else
3687
- { rect = node.getBoundingClientRect(); }
3688
  }
3689
  if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {
3690
- var rSpan = node.parentNode.getClientRects()[0];
3691
  if (rSpan)
3692
- { rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom}; }
3693
  else
3694
- { rect = nullRect; }
3695
  }
3696
 
3697
- var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top;
3698
- var mid = (rtop + rbot) / 2;
3699
- var heights = prepared.view.measure.heights;
3700
- var i = 0;
3701
  for (; i < heights.length - 1; i++)
3702
  { if (mid < heights[i]) { break } }
3703
- var top = i ? heights[i - 1] : 0, bot = heights[i];
3704
  var result = {left: (collapse == "right" ? rect.right : rect.left) - prepared.rect.left,
3705
  right: (collapse == "left" ? rect.left : rect.right) - prepared.rect.left,
3706
- top: top, bottom: bot};
3707
- if (!rect.left && !rect.right) { result.bogus = true; }
3708
- if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; }
3709
 
3710
  return result
3711
  }
@@ -3716,33 +3706,33 @@ webpackJsonp([2],{
3716
  if (!window.screen || screen.logicalXDPI == null ||
3717
  screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))
3718
  { return rect }
3719
- var scaleX = screen.logicalXDPI / screen.deviceXDPI;
3720
- var scaleY = screen.logicalYDPI / screen.deviceYDPI;
3721
  return {left: rect.left * scaleX, right: rect.right * scaleX,
3722
  top: rect.top * scaleY, bottom: rect.bottom * scaleY}
3723
  }
3724
 
3725
  function clearLineMeasurementCacheFor(lineView) {
3726
  if (lineView.measure) {
3727
- lineView.measure.cache = {};
3728
- lineView.measure.heights = null;
3729
  if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)
3730
- { lineView.measure.caches[i] = {}; } }
3731
  }
3732
  }
3733
 
3734
  function clearLineMeasurementCache(cm) {
3735
- cm.display.externalMeasure = null;
3736
- removeChildren(cm.display.lineMeasure);
3737
  for (var i = 0; i < cm.display.view.length; i++)
3738
- { clearLineMeasurementCacheFor(cm.display.view[i]); }
3739
  }
3740
 
3741
  function clearCaches(cm) {
3742
- clearLineMeasurementCache(cm);
3743
- cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;
3744
- if (!cm.options.lineWrapping) { cm.display.maxLineChanged = true; }
3745
- cm.display.lineNumChars = null;
3746
  }
3747
 
3748
  function pageScrollX() { return window.pageXOffset || (document.documentElement || document.body).scrollLeft }
@@ -3754,21 +3744,21 @@ webpackJsonp([2],{
3754
  // or "page".
3755
  function intoCoordSystem(cm, lineObj, rect, context, includeWidgets) {
3756
  if (!includeWidgets && lineObj.widgets) { for (var i = 0; i < lineObj.widgets.length; ++i) { if (lineObj.widgets[i].above) {
3757
- var size = widgetHeight(lineObj.widgets[i]);
3758
- rect.top += size; rect.bottom += size;
3759
  } } }
3760
  if (context == "line") { return rect }
3761
- if (!context) { context = "local"; }
3762
- var yOff = heightAtLine(lineObj);
3763
- if (context == "local") { yOff += paddingTop(cm.display); }
3764
- else { yOff -= cm.display.viewOffset; }
3765
  if (context == "page" || context == "window") {
3766
- var lOff = cm.display.lineSpace.getBoundingClientRect();
3767
- yOff += lOff.top + (context == "window" ? 0 : pageScrollY());
3768
- var xOff = lOff.left + (context == "window" ? 0 : pageScrollX());
3769
- rect.left += xOff; rect.right += xOff;
3770
  }
3771
- rect.top += yOff; rect.bottom += yOff;
3772
  return rect
3773
  }
3774
 
@@ -3776,23 +3766,23 @@ webpackJsonp([2],{
3776
  // Context may be "window", "page", "div", or "local"./null.
3777
  function fromCoordSystem(cm, coords, context) {
3778
  if (context == "div") { return coords }
3779
- var left = coords.left, top = coords.top;
3780
  // First move into "page" coordinate system
3781
  if (context == "page") {
3782
- left -= pageScrollX();
3783
- top -= pageScrollY();
3784
  } else if (context == "local" || !context) {
3785
- var localBox = cm.display.sizer.getBoundingClientRect();
3786
- left += localBox.left;
3787
- top += localBox.top;
3788
  }
3789
 
3790
- var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();
3791
  return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}
3792
  }
3793
 
3794
  function charCoords(cm, pos, context, lineObj, bias) {
3795
- if (!lineObj) { lineObj = getLine(cm.doc, pos.line); }
3796
  return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context)
3797
  }
3798
 
@@ -3813,42 +3803,42 @@ webpackJsonp([2],{
3813
  // Every position after the last character on a line is considered to stick
3814
  // to the last character on the line.
3815
  function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {
3816
- lineObj = lineObj || getLine(cm.doc, pos.line);
3817
- if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }
3818
  function get(ch, right) {
3819
- var m = measureCharPrepared(cm, preparedMeasure, ch, right ? "right" : "left", varHeight);
3820
- if (right) { m.left = m.right; } else { m.right = m.left; }
3821
  return intoCoordSystem(cm, lineObj, m, context)
3822
  }
3823
- var order = getOrder(lineObj, cm.doc.direction), ch = pos.ch, sticky = pos.sticky;
3824
  if (ch >= lineObj.text.length) {
3825
- ch = lineObj.text.length;
3826
- sticky = "before";
3827
  } else if (ch <= 0) {
3828
- ch = 0;
3829
- sticky = "after";
3830
  }
3831
  if (!order) { return get(sticky == "before" ? ch - 1 : ch, sticky == "before") }
3832
 
3833
  function getBidi(ch, partPos, invert) {
3834
- var part = order[partPos], right = (part.level % 2) != 0;
3835
  return get(invert ? ch - 1 : ch, right != invert)
3836
  }
3837
- var partPos = getBidiPartAt(order, ch, sticky);
3838
- var other = bidiOther;
3839
- var val = getBidi(ch, partPos, sticky == "before");
3840
- if (other != null) { val.other = getBidi(ch, other, sticky != "before"); }
3841
  return val
3842
  }
3843
 
3844
  // Used to cheaply estimate the coordinates for a position. Used for
3845
  // intermediate scroll updates.
3846
  function estimateCoords(cm, pos) {
3847
- var left = 0;
3848
- pos = clipPos(cm.doc, pos);
3849
- if (!cm.options.lineWrapping) { left = charWidth(cm.display) * pos.ch; }
3850
- var lineObj = getLine(cm.doc, pos.line);
3851
- var top = heightAtLine(lineObj) + paddingTop(cm.display);
3852
  return {left: left, right: left, top: top, bottom: top + lineObj.height}
3853
  }
3854
 
@@ -3859,139 +3849,139 @@ webpackJsonp([2],{
3859
  // is true, that means the coordinates lie outside the line's
3860
  // vertical range.
3861
  function PosWithInfo(line, ch, sticky, outside, xRel) {
3862
- var pos = Pos(line, ch, sticky);
3863
- pos.xRel = xRel;
3864
- if (outside) { pos.outside = true; }
3865
  return pos
3866
  }
3867
 
3868
  // Compute the character position closest to the given coordinates.
3869
  // Input must be lineSpace-local ("div" coordinate system).
3870
  function coordsChar(cm, x, y) {
3871
- var doc = cm.doc;
3872
- y += cm.display.viewOffset;
3873
  if (y < 0) { return PosWithInfo(doc.first, 0, null, true, -1) }
3874
- var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1;
3875
  if (lineN > last)
3876
  { return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, true, 1) }
3877
- if (x < 0) { x = 0; }
3878
 
3879
- var lineObj = getLine(doc, lineN);
3880
  for (;;) {
3881
- var found = coordsCharInner(cm, lineObj, lineN, x, y);
3882
- var merged = collapsedSpanAtEnd(lineObj);
3883
- var mergedPos = merged && merged.find(0, true);
3884
  if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0))
3885
- { lineN = lineNo(lineObj = mergedPos.to.line); }
3886
  else
3887
  { return found }
3888
  }
3889
  }
3890
 
3891
  function wrappedLineExtent(cm, lineObj, preparedMeasure, y) {
3892
- var measure = function (ch) { return intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, ch), "line"); };
3893
- var end = lineObj.text.length;
3894
- var begin = findFirst(function (ch) { return measure(ch - 1).bottom <= y; }, end, 0);
3895
- end = findFirst(function (ch) { return measure(ch).top > y; }, begin, end);
3896
  return {begin: begin, end: end}
3897
  }
3898
 
3899
  function wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) {
3900
- var targetTop = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, target), "line").top;
3901
  return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop)
3902
  }
3903
 
3904
- function coordsCharInner(cm, lineObj, lineNo$$1, x, y) {
3905
- y -= heightAtLine(lineObj);
3906
- var begin = 0, end = lineObj.text.length;
3907
- var preparedMeasure = prepareMeasureForLine(cm, lineObj);
3908
- var pos;
3909
- var order = getOrder(lineObj, cm.doc.direction);
3910
  if (order) {
3911
  if (cm.options.lineWrapping) {
3912
- var assign;
3913
- ((assign = wrappedLineExtent(cm, lineObj, preparedMeasure, y), begin = assign.begin, end = assign.end, assign));
3914
  }
3915
- pos = new Pos(lineNo$$1, begin);
3916
- var beginLeft = cursorCoords(cm, pos, "line", lineObj, preparedMeasure).left;
3917
- var dir = beginLeft < x ? 1 : -1;
3918
- var prevDiff, diff = beginLeft - x, prevPos;
3919
  do {
3920
- prevDiff = diff;
3921
- prevPos = pos;
3922
- pos = moveVisually(cm, lineObj, pos, dir);
3923
  if (pos == null || pos.ch < begin || end <= (pos.sticky == "before" ? pos.ch - 1 : pos.ch)) {
3924
- pos = prevPos;
3925
  break
3926
  }
3927
- diff = cursorCoords(cm, pos, "line", lineObj, preparedMeasure).left - x;
3928
  } while ((dir < 0) != (diff < 0) && (Math.abs(diff) <= Math.abs(prevDiff)))
3929
  if (Math.abs(diff) > Math.abs(prevDiff)) {
3930
  if ((diff < 0) == (prevDiff < 0)) { throw new Error("Broke out of infinite loop in coordsCharInner") }
3931
- pos = prevPos;
3932
  }
3933
  } else {
3934
  var ch = findFirst(function (ch) {
3935
- var box = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, ch), "line");
3936
  if (box.top > y) {
3937
  // For the cursor stickiness
3938
- end = Math.min(ch, end);
3939
  return true
3940
  }
3941
  else if (box.bottom <= y) { return false }
3942
  else if (box.left > x) { return true }
3943
  else if (box.right < x) { return false }
3944
  else { return (x - box.left < box.right - x) }
3945
- }, begin, end);
3946
- ch = skipExtendingChars(lineObj.text, ch, 1);
3947
- pos = new Pos(lineNo$$1, ch, ch == end ? "before" : "after");
3948
  }
3949
- var coords = cursorCoords(cm, pos, "line", lineObj, preparedMeasure);
3950
- if (y < coords.top || coords.bottom < y) { pos.outside = true; }
3951
- pos.xRel = x < coords.left ? -1 : (x > coords.right ? 1 : 0);
3952
  return pos
3953
  }
3954
 
3955
- var measureText;
3956
  // Compute the default text height.
3957
  function textHeight(display) {
3958
  if (display.cachedTextHeight != null) { return display.cachedTextHeight }
3959
  if (measureText == null) {
3960
- measureText = elt("pre");
3961
  // Measure a bunch of lines, for browsers that compute
3962
  // fractional heights.
3963
  for (var i = 0; i < 49; ++i) {
3964
- measureText.appendChild(document.createTextNode("x"));
3965
- measureText.appendChild(elt("br"));
3966
  }
3967
- measureText.appendChild(document.createTextNode("x"));
3968
  }
3969
- removeChildrenAndAdd(display.measure, measureText);
3970
- var height = measureText.offsetHeight / 50;
3971
- if (height > 3) { display.cachedTextHeight = height; }
3972
- removeChildren(display.measure);
3973
  return height || 1
3974
  }
3975
 
3976
  // Compute the default character width.
3977
  function charWidth(display) {
3978
  if (display.cachedCharWidth != null) { return display.cachedCharWidth }
3979
- var anchor = elt("span", "xxxxxxxxxx");
3980
- var pre = elt("pre", [anchor]);
3981
- removeChildrenAndAdd(display.measure, pre);
3982
- var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;
3983
- if (width > 2) { display.cachedCharWidth = width; }
3984
  return width || 10
3985
  }
3986
 
3987
  // Do a bulk-read of the DOM positions and sizes needed to draw the
3988
  // view, so that we don't interleave reading and writing to the DOM.
3989
  function getDimensions(cm) {
3990
- var d = cm.display, left = {}, width = {};
3991
- var gutterLeft = d.gutters.clientLeft;
3992
  for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {
3993
- left[cm.options.gutters[i]] = n.offsetLeft + n.clientLeft + gutterLeft;
3994
- width[cm.options.gutters[i]] = n.clientWidth;
3995
  }
3996
  return {fixedPos: compensateForHScroll(d),
3997
  gutterTotalWidth: d.gutters.offsetWidth,
@@ -4011,14 +4001,14 @@ webpackJsonp([2],{
4011
  // first approximation until the line becomes visible (and is thus
4012
  // properly measurable).
4013
  function estimateHeight(cm) {
4014
- var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;
4015
- var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);
4016
  return function (line) {
4017
  if (lineIsHidden(cm.doc, line)) { return 0 }
4018
 
4019
- var widgetsHeight = 0;
4020
  if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {
4021
- if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }
4022
  } }
4023
 
4024
  if (wrapping)
@@ -4029,11 +4019,11 @@ webpackJsonp([2],{
4029
  }
4030
 
4031
  function estimateLineHeights(cm) {
4032
- var doc = cm.doc, est = estimateHeight(cm);
4033
  doc.iter(function (line) {
4034
- var estHeight = est(line);
4035
- if (estHeight != line.height) { updateLineHeight(line, estHeight); }
4036
- });
4037
  }
4038
 
4039
  // Given a mouse event, find the corresponding position. If liberal
@@ -4042,17 +4032,17 @@ webpackJsonp([2],{
4042
  // selections, and tries to estimate a character position even for
4043
  // coordinates beyond the right of the text.
4044
  function posFromMouse(cm, e, liberal, forRect) {
4045
- var display = cm.display;
4046
  if (!liberal && e_target(e).getAttribute("cm-not-content") == "true") { return null }
4047
 
4048
- var x, y, space = display.lineSpace.getBoundingClientRect();
4049
  // Fails unpredictably on IE[67] when mouse is dragged around quickly.
4050
- try { x = e.clientX - space.left; y = e.clientY - space.top; }
4051
  catch (e) { return null }
4052
- var coords = coordsChar(cm, x, y), line;
4053
  if (forRect && coords.xRel == 1 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {
4054
- var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;
4055
- coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff));
4056
  }
4057
  return coords
4058
  }
@@ -4061,206 +4051,206 @@ webpackJsonp([2],{
4061
  // when the line isn't visible.
4062
  function findViewIndex(cm, n) {
4063
  if (n >= cm.display.viewTo) { return null }
4064
- n -= cm.display.viewFrom;
4065
  if (n < 0) { return null }
4066
- var view = cm.display.view;
4067
  for (var i = 0; i < view.length; i++) {
4068
- n -= view[i].size;
4069
  if (n < 0) { return i }
4070
  }
4071
  }
4072
 
4073
  function updateSelection(cm) {
4074
- cm.display.input.showSelection(cm.display.input.prepareSelection());
4075
  }
4076
 
4077
  function prepareSelection(cm, primary) {
4078
- var doc = cm.doc, result = {};
4079
- var curFragment = result.cursors = document.createDocumentFragment();
4080
- var selFragment = result.selection = document.createDocumentFragment();
4081
 
4082
  for (var i = 0; i < doc.sel.ranges.length; i++) {
4083
  if (primary === false && i == doc.sel.primIndex) { continue }
4084
- var range$$1 = doc.sel.ranges[i];
4085
- if (range$$1.from().line >= cm.display.viewTo || range$$1.to().line < cm.display.viewFrom) { continue }
4086
- var collapsed = range$$1.empty();
4087
  if (collapsed || cm.options.showCursorWhenSelecting)
4088
- { drawSelectionCursor(cm, range$$1.head, curFragment); }
4089
  if (!collapsed)
4090
- { drawSelectionRange(cm, range$$1, selFragment); }
4091
  }
4092
  return result
4093
  }
4094
 
4095
  // Draws a cursor for the given range
4096
  function drawSelectionCursor(cm, head, output) {
4097
- var pos = cursorCoords(cm, head, "div", null, null, !cm.options.singleCursorHeightPerLine);
4098
 
4099
- var cursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor"));
4100
- cursor.style.left = pos.left + "px";
4101
- cursor.style.top = pos.top + "px";
4102
- cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px";
4103
 
4104
  if (pos.other) {
4105
  // Secondary cursor, shown when on a 'jump' in bi-directional text
4106
- var otherCursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor"));
4107
- otherCursor.style.display = "";
4108
- otherCursor.style.left = pos.other.left + "px";
4109
- otherCursor.style.top = pos.other.top + "px";
4110
- otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px";
4111
  }
4112
  }
4113
 
4114
  // Draws the given range as a highlighted selection
4115
- function drawSelectionRange(cm, range$$1, output) {
4116
- var display = cm.display, doc = cm.doc;
4117
- var fragment = document.createDocumentFragment();
4118
- var padding = paddingH(cm.display), leftSide = padding.left;
4119
- var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;
4120
 
4121
  function add(left, top, width, bottom) {
4122
- if (top < 0) { top = 0; }
4123
- top = Math.round(top);
4124
- bottom = Math.round(bottom);
4125
- fragment.appendChild(elt("div", null, "CodeMirror-selected", ("position: absolute; left: " + left + "px;\n top: " + top + "px; width: " + (width == null ? rightSide - left : width) + "px;\n height: " + (bottom - top) + "px")));
4126
  }
4127
 
4128
  function drawForLine(line, fromArg, toArg) {
4129
- var lineObj = getLine(doc, line);
4130
- var lineLen = lineObj.text.length;
4131
- var start, end;
4132
  function coords(ch, bias) {
4133
  return charCoords(cm, Pos(line, ch), "div", lineObj, bias)
4134
  }
4135
 
4136
- iterateBidiSections(getOrder(lineObj, doc.direction), fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir) {
4137
- var leftPos = coords(from, "left"), rightPos, left, right;
4138
  if (from == to) {
4139
- rightPos = leftPos;
4140
- left = right = leftPos.left;
4141
  } else {
4142
- rightPos = coords(to - 1, "right");
4143
- if (dir == "rtl") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }
4144
- left = leftPos.left;
4145
- right = rightPos.right;
4146
  }
4147
- if (fromArg == null && from == 0) { left = leftSide; }
4148
  if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part
4149
- add(left, leftPos.top, null, leftPos.bottom);
4150
- left = leftSide;
4151
- if (leftPos.bottom < rightPos.top) { add(left, leftPos.bottom, null, rightPos.top); }
4152
  }
4153
- if (toArg == null && to == lineLen) { right = rightSide; }
4154
  if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)
4155
- { start = leftPos; }
4156
  if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)
4157
- { end = rightPos; }
4158
- if (left < leftSide + 1) { left = leftSide; }
4159
- add(left, rightPos.top, right - left, rightPos.bottom);
4160
- });
4161
  return {start: start, end: end}
4162
  }
4163
 
4164
- var sFrom = range$$1.from(), sTo = range$$1.to();
4165
  if (sFrom.line == sTo.line) {
4166
- drawForLine(sFrom.line, sFrom.ch, sTo.ch);
4167
  } else {
4168
- var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);
4169
- var singleVLine = visualLine(fromLine) == visualLine(toLine);
4170
- var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;
4171
- var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;
4172
  if (singleVLine) {
4173
  if (leftEnd.top < rightStart.top - 2) {
4174
- add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);
4175
- add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);
4176
  } else {
4177
- add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);
4178
  }
4179
  }
4180
  if (leftEnd.bottom < rightStart.top)
4181
- { add(leftSide, leftEnd.bottom, null, rightStart.top); }
4182
  }
4183
 
4184
- output.appendChild(fragment);
4185
  }
4186
 
4187
  // Cursor-blinking
4188
  function restartBlink(cm) {
4189
  if (!cm.state.focused) { return }
4190
- var display = cm.display;
4191
- clearInterval(display.blinker);
4192
- var on = true;
4193
- display.cursorDiv.style.visibility = "";
4194
  if (cm.options.cursorBlinkRate > 0)
4195
  { display.blinker = setInterval(function () { return display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden"; },
4196
- cm.options.cursorBlinkRate); }
4197
  else if (cm.options.cursorBlinkRate < 0)
4198
- { display.cursorDiv.style.visibility = "hidden"; }
4199
  }
4200
 
4201
  function ensureFocus(cm) {
4202
- if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); }
4203
  }
4204
 
4205
  function delayBlurEvent(cm) {
4206
- cm.state.delayingBlurEvent = true;
4207
  setTimeout(function () { if (cm.state.delayingBlurEvent) {
4208
- cm.state.delayingBlurEvent = false;
4209
- onBlur(cm);
4210
- } }, 100);
4211
  }
4212
 
4213
  function onFocus(cm, e) {
4214
- if (cm.state.delayingBlurEvent) { cm.state.delayingBlurEvent = false; }
4215
 
4216
  if (cm.options.readOnly == "nocursor") { return }
4217
  if (!cm.state.focused) {
4218
- signal(cm, "focus", cm, e);
4219
- cm.state.focused = true;
4220
- addClass(cm.display.wrapper, "CodeMirror-focused");
4221
  // This test prevents this from firing when a context
4222
  // menu is closed (since the input reset would kill the
4223
  // select-all detection hack)
4224
  if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {
4225
- cm.display.input.reset();
4226
- if (webkit) { setTimeout(function () { return cm.display.input.reset(true); }, 20); } // Issue #1730
4227
  }
4228
- cm.display.input.receivedFocus();
4229
  }
4230
- restartBlink(cm);
4231
  }
4232
  function onBlur(cm, e) {
4233
  if (cm.state.delayingBlurEvent) { return }
4234
 
4235
  if (cm.state.focused) {
4236
- signal(cm, "blur", cm, e);
4237
- cm.state.focused = false;
4238
- rmClass(cm.display.wrapper, "CodeMirror-focused");
4239
  }
4240
- clearInterval(cm.display.blinker);
4241
- setTimeout(function () { if (!cm.state.focused) { cm.display.shift = false; } }, 150);
4242
  }
4243
 
4244
  // Re-align line numbers and gutter marks to compensate for
4245
  // horizontal scrolling.
4246
  function alignHorizontally(cm) {
4247
- var display = cm.display, view = display.view;
4248
  if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) { return }
4249
- var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;
4250
- var gutterW = display.gutters.offsetWidth, left = comp + "px";
4251
  for (var i = 0; i < view.length; i++) { if (!view[i].hidden) {
4252
  if (cm.options.fixedGutter) {
4253
  if (view[i].gutter)
4254
- { view[i].gutter.style.left = left; }
4255
  if (view[i].gutterBackground)
4256
- { view[i].gutterBackground.style.left = left; }
4257
  }
4258
- var align = view[i].alignable;
4259
  if (align) { for (var j = 0; j < align.length; j++)
4260
- { align[j].style.left = left; } }
4261
  } }
4262
  if (cm.options.fixedGutter)
4263
- { display.gutters.style.left = (comp + gutterW) + "px"; }
4264
  }
4265
 
4266
  // Used to ensure that the line number gutter is still the right
@@ -4268,17 +4258,17 @@ webpackJsonp([2],{
4268
  // is needed.
4269
  function maybeUpdateLineNumberWidth(cm) {
4270
  if (!cm.options.lineNumbers) { return false }
4271
- var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;
4272
  if (last.length != display.lineNumChars) {
4273
  var test = display.measure.appendChild(elt("div", [elt("div", last)],
4274
- "CodeMirror-linenumber CodeMirror-gutter-elt"));
4275
- var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;
4276
- display.lineGutter.style.width = "";
4277
- display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1;
4278
- display.lineNumWidth = display.lineNumInnerWidth + padding;
4279
- display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;
4280
- display.lineGutter.style.width = display.lineNumWidth + "px";
4281
- updateGutterSpace(cm);
4282
  return true
4283
  }
4284
  return false
@@ -4287,26 +4277,26 @@ webpackJsonp([2],{
4287
  // Read the actual heights of the rendered lines, and update their
4288
  // stored heights to match.
4289
  function updateHeightsInViewport(cm) {
4290
- var display = cm.display;
4291
- var prevBottom = display.lineDiv.offsetTop;
4292
  for (var i = 0; i < display.view.length; i++) {
4293
- var cur = display.view[i], height = (void 0);
4294
  if (cur.hidden) { continue }
4295
  if (ie && ie_version < 8) {
4296
- var bot = cur.node.offsetTop + cur.node.offsetHeight;
4297
- height = bot - prevBottom;
4298
- prevBottom = bot;
4299
  } else {
4300
- var box = cur.node.getBoundingClientRect();
4301
- height = box.bottom - box.top;
4302
  }
4303
- var diff = cur.line.height - height;
4304
- if (height < 2) { height = textHeight(display); }
4305
  if (diff > .001 || diff < -.001) {
4306
- updateLineHeight(cur.line, height);
4307
- updateWidgetHeight(cur.line);
4308
  if (cur.rest) { for (var j = 0; j < cur.rest.length; j++)
4309
- { updateWidgetHeight(cur.rest[j]); } }
4310
  }
4311
  }
4312
  }
@@ -4315,28 +4305,28 @@ webpackJsonp([2],{
4315
  // given line.
4316
  function updateWidgetHeight(line) {
4317
  if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i)
4318
- { line.widgets[i].height = line.widgets[i].node.parentNode.offsetHeight; } }
4319
  }
4320
 
4321
  // Compute the lines that are visible in a given viewport (defaults
4322
  // the the current scroll position). viewport may contain top,
4323
  // height, and ensure (see op.scrollToPos) properties.
4324
  function visibleLines(display, doc, viewport) {
4325
- var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;
4326
- top = Math.floor(top - paddingTop(display));
4327
- var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;
4328
 
4329
- var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom);
4330
  // Ensure is a {from: {line, ch}, to: {line, ch}} object, and
4331
  // forces those lines into the viewport (if possible).
4332
  if (viewport && viewport.ensure) {
4333
- var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line;
4334
  if (ensureFrom < from) {
4335
- from = ensureFrom;
4336
- to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight);
4337
  } else if (Math.min(ensureTo, doc.lastLine()) >= to) {
4338
- from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight);
4339
- to = ensureTo;
4340
  }
4341
  }
4342
  return {from: from, to: Math.max(to, from + 1)}
@@ -4346,22 +4336,22 @@ webpackJsonp([2],{
4346
  // covers the visible area.
4347
  function setScrollTop(cm, val) {
4348
  if (Math.abs(cm.doc.scrollTop - val) < 2) { return }
4349
- cm.doc.scrollTop = val;
4350
- if (!gecko) { updateDisplaySimple(cm, {top: val}); }
4351
- if (cm.display.scroller.scrollTop != val) { cm.display.scroller.scrollTop = val; }
4352
- cm.display.scrollbars.setScrollTop(val);
4353
- if (gecko) { updateDisplaySimple(cm); }
4354
- startWorker(cm, 100);
4355
  }
4356
  // Sync scroller and scrollbar, ensure the gutter elements are
4357
  // aligned.
4358
  function setScrollLeft(cm, val, isScroller) {
4359
  if (isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) { return }
4360
- val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth);
4361
- cm.doc.scrollLeft = val;
4362
- alignHorizontally(cm);
4363
- if (cm.display.scroller.scrollLeft != val) { cm.display.scroller.scrollLeft = val; }
4364
- cm.display.scrollbars.setScrollLeft(val);
4365
  }
4366
 
4367
  // Since the delta values reported on mouse wheel events are
@@ -4381,32 +4371,32 @@ webpackJsonp([2],{
4381
  // know one. These don't have to be accurate -- the result of them
4382
  // being wrong would just be a slight flicker on the first wheel
4383
  // scroll (if it is large enough).
4384
- if (ie) { wheelPixelsPerUnit = -.53; }
4385
- else if (gecko) { wheelPixelsPerUnit = 15; }
4386
- else if (chrome) { wheelPixelsPerUnit = -.7; }
4387
- else if (safari) { wheelPixelsPerUnit = -1/3; }
4388
 
4389
  function wheelEventDelta(e) {
4390
- var dx = e.wheelDeltaX, dy = e.wheelDeltaY;
4391
- if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) { dx = e.detail; }
4392
- if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) { dy = e.detail; }
4393
- else if (dy == null) { dy = e.wheelDelta; }
4394
  return {x: dx, y: dy}
4395
  }
4396
  function wheelEventPixels(e) {
4397
- var delta = wheelEventDelta(e);
4398
- delta.x *= wheelPixelsPerUnit;
4399
- delta.y *= wheelPixelsPerUnit;
4400
  return delta
4401
  }
4402
 
4403
  function onScrollWheel(cm, e) {
4404
- var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;
4405
 
4406
- var display = cm.display, scroll = display.scroller;
4407
  // Quit if there's nothing to scroll here
4408
- var canScrollX = scroll.scrollWidth > scroll.clientWidth;
4409
- var canScrollY = scroll.scrollHeight > scroll.clientHeight;
4410
  if (!(dx && canScrollX || dy && canScrollY)) { return }
4411
 
4412
  // Webkit browsers on OS X abort momentum scrolls when the target
@@ -4417,7 +4407,7 @@ webpackJsonp([2],{
4417
  outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) {
4418
  for (var i = 0; i < view.length; i++) {
4419
  if (view[i].node == cur) {
4420
- cm.display.currentWheelTarget = cur;
4421
  break outer
4422
  }
4423
  }
@@ -4432,45 +4422,45 @@ webpackJsonp([2],{
4432
  // better than glitching out.
4433
  if (dx && !gecko && !presto && wheelPixelsPerUnit != null) {
4434
  if (dy && canScrollY)
4435
- { setScrollTop(cm, Math.max(0, Math.min(scroll.scrollTop + dy * wheelPixelsPerUnit, scroll.scrollHeight - scroll.clientHeight))); }
4436
- setScrollLeft(cm, Math.max(0, Math.min(scroll.scrollLeft + dx * wheelPixelsPerUnit, scroll.scrollWidth - scroll.clientWidth)));
4437
  // Only prevent default scrolling if vertical scrolling is
4438
  // actually possible. Otherwise, it causes vertical scroll
4439
  // jitter on OSX trackpads when deltaX is small and deltaY
4440
  // is large (issue #3579)
4441
  if (!dy || (dy && canScrollY))
4442
- { e_preventDefault(e); }
4443
- display.wheelStartX = null; // Abort measurement, if in progress
4444
  return
4445
  }
4446
 
4447
  // 'Project' the visible viewport to cover the area that is being
4448
  // scrolled into view (if we know enough to estimate it).
4449
  if (dy && wheelPixelsPerUnit != null) {
4450
- var pixels = dy * wheelPixelsPerUnit;
4451
- var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;
4452
- if (pixels < 0) { top = Math.max(0, top + pixels - 50); }
4453
- else { bot = Math.min(cm.doc.height, bot + pixels + 50); }
4454
- updateDisplaySimple(cm, {top: top, bottom: bot});
4455
  }
4456
 
4457
  if (wheelSamples < 20) {
4458
  if (display.wheelStartX == null) {
4459
- display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;
4460
- display.wheelDX = dx; display.wheelDY = dy;
4461
  setTimeout(function () {
4462
  if (display.wheelStartX == null) { return }
4463
- var movedX = scroll.scrollLeft - display.wheelStartX;
4464
- var movedY = scroll.scrollTop - display.wheelStartY;
4465
  var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||
4466
- (movedX && display.wheelDX && movedX / display.wheelDX);
4467
- display.wheelStartX = display.wheelStartY = null;
4468
  if (!sample) { return }
4469
- wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);
4470
- ++wheelSamples;
4471
- }, 200);
4472
  } else {
4473
- display.wheelDX += dx; display.wheelDY += dy;
4474
  }
4475
  }
4476
  }
@@ -4480,8 +4470,8 @@ webpackJsonp([2],{
4480
  // Prepare DOM reads needed to update the scrollbars. Done in one
4481
  // shot to minimize update/measure roundtrips.
4482
  function measureForScrollbars(cm) {
4483
- var d = cm.display, gutterW = d.gutters.offsetWidth;
4484
- var docH = Math.round(cm.doc.height + paddingVert(cm.display));
4485
  return {
4486
  clientHeight: d.scroller.clientHeight,
4487
  viewHeight: d.wrapper.clientHeight,
@@ -4496,80 +4486,80 @@ webpackJsonp([2],{
4496
  }
4497
 
4498
  var NativeScrollbars = function(place, scroll, cm) {
4499
- this.cm = cm;
4500
- var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar");
4501
- var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar");
4502
- place(vert); place(horiz);
4503
 
4504
  on(vert, "scroll", function () {
4505
- if (vert.clientHeight) { scroll(vert.scrollTop, "vertical"); }
4506
- });
4507
  on(horiz, "scroll", function () {
4508
- if (horiz.clientWidth) { scroll(horiz.scrollLeft, "horizontal"); }
4509
- });
4510
 
4511
- this.checkedZeroWidth = false;
4512
  // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).
4513
- if (ie && ie_version < 8) { this.horiz.style.minHeight = this.vert.style.minWidth = "18px"; }
4514
  };
4515
 
4516
  NativeScrollbars.prototype.update = function (measure) {
4517
- var needsH = measure.scrollWidth > measure.clientWidth + 1;
4518
- var needsV = measure.scrollHeight > measure.clientHeight + 1;
4519
- var sWidth = measure.nativeBarWidth;
4520
 
4521
  if (needsV) {
4522
- this.vert.style.display = "block";
4523
- this.vert.style.bottom = needsH ? sWidth + "px" : "0";
4524
- var totalHeight = measure.viewHeight - (needsH ? sWidth : 0);
4525
  // A bug in IE8 can cause this value to be negative, so guard it.
4526
  this.vert.firstChild.style.height =
4527
- Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px";
4528
  } else {
4529
- this.vert.style.display = "";
4530
- this.vert.firstChild.style.height = "0";
4531
  }
4532
 
4533
  if (needsH) {
4534
- this.horiz.style.display = "block";
4535
- this.horiz.style.right = needsV ? sWidth + "px" : "0";
4536
- this.horiz.style.left = measure.barLeft + "px";
4537
- var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0);
4538
  this.horiz.firstChild.style.width =
4539
- Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + "px";
4540
  } else {
4541
- this.horiz.style.display = "";
4542
- this.horiz.firstChild.style.width = "0";
4543
  }
4544
 
4545
  if (!this.checkedZeroWidth && measure.clientHeight > 0) {
4546
- if (sWidth == 0) { this.zeroWidthHack(); }
4547
- this.checkedZeroWidth = true;
4548
  }
4549
 
4550
  return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0}
4551
  };
4552
 
4553
  NativeScrollbars.prototype.setScrollLeft = function (pos) {
4554
- if (this.horiz.scrollLeft != pos) { this.horiz.scrollLeft = pos; }
4555
- if (this.disableHoriz) { this.enableZeroWidthBar(this.horiz, this.disableHoriz); }
4556
  };
4557
 
4558
  NativeScrollbars.prototype.setScrollTop = function (pos) {
4559
- if (this.vert.scrollTop != pos) { this.vert.scrollTop = pos; }
4560
- if (this.disableVert) { this.enableZeroWidthBar(this.vert, this.disableVert); }
4561
  };
4562
 
4563
  NativeScrollbars.prototype.zeroWidthHack = function () {
4564
- var w = mac && !mac_geMountainLion ? "12px" : "18px";
4565
- this.horiz.style.height = this.vert.style.width = w;
4566
- this.horiz.style.pointerEvents = this.vert.style.pointerEvents = "none";
4567
- this.disableHoriz = new Delayed;
4568
- this.disableVert = new Delayed;
4569
  };
4570
 
4571
  NativeScrollbars.prototype.enableZeroWidthBar = function (bar, delay) {
4572
- bar.style.pointerEvents = "auto";
4573
  function maybeDisable() {
4574
  // To find out whether the scrollbar is still visible, we
4575
  // check whether the element under the pixel in the bottom
@@ -4577,18 +4567,18 @@ webpackJsonp([2],{
4577
  // itself (when the bar is still visible) or its filler child
4578
  // (when the bar is hidden). If it is still visible, we keep
4579
  // it enabled, if it's hidden, we disable pointer events.
4580
- var box = bar.getBoundingClientRect();
4581
- var elt$$1 = document.elementFromPoint(box.left + 1, box.bottom - 1);
4582
- if (elt$$1 != bar) { bar.style.pointerEvents = "none"; }
4583
- else { delay.set(1000, maybeDisable); }
4584
  }
4585
- delay.set(1000, maybeDisable);
4586
  };
4587
 
4588
  NativeScrollbars.prototype.clear = function () {
4589
- var parent = this.horiz.parentNode;
4590
- parent.removeChild(this.horiz);
4591
- parent.removeChild(this.vert);
4592
  };
4593
 
4594
  var NullScrollbars = function () {};
@@ -4599,78 +4589,78 @@ webpackJsonp([2],{
4599
  NullScrollbars.prototype.clear = function () {};
4600
 
4601
  function updateScrollbars(cm, measure) {
4602
- if (!measure) { measure = measureForScrollbars(cm); }
4603
- var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight;
4604
- updateScrollbarsInner(cm, measure);
4605
  for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) {
4606
  if (startWidth != cm.display.barWidth && cm.options.lineWrapping)
4607
- { updateHeightsInViewport(cm); }
4608
- updateScrollbarsInner(cm, measureForScrollbars(cm));
4609
- startWidth = cm.display.barWidth; startHeight = cm.display.barHeight;
4610
  }
4611
  }
4612
 
4613
  // Re-synchronize the fake scrollbars with the actual size of the
4614
  // content.
4615
  function updateScrollbarsInner(cm, measure) {
4616
- var d = cm.display;
4617
- var sizes = d.scrollbars.update(measure);
4618
 
4619
- d.sizer.style.paddingRight = (d.barWidth = sizes.right) + "px";
4620
- d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + "px";
4621
- d.heightForcer.style.borderBottom = sizes.bottom + "px solid transparent";
4622
 
4623
  if (sizes.right && sizes.bottom) {
4624
- d.scrollbarFiller.style.display = "block";
4625
- d.scrollbarFiller.style.height = sizes.bottom + "px";
4626
- d.scrollbarFiller.style.width = sizes.right + "px";
4627
- } else { d.scrollbarFiller.style.display = ""; }
4628
  if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {
4629
- d.gutterFiller.style.display = "block";
4630
- d.gutterFiller.style.height = sizes.bottom + "px";
4631
- d.gutterFiller.style.width = measure.gutterWidth + "px";
4632
- } else { d.gutterFiller.style.display = ""; }
4633
  }
4634
 
4635
- var scrollbarModel = {"native": NativeScrollbars, "null": NullScrollbars};
4636
 
4637
  function initScrollbars(cm) {
4638
  if (cm.display.scrollbars) {
4639
- cm.display.scrollbars.clear();
4640
  if (cm.display.scrollbars.addClass)
4641
- { rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); }
4642
  }
4643
 
4644
  cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle](function (node) {
4645
- cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);
4646
  // Prevent clicks in the scrollbars from killing focus
4647
  on(node, "mousedown", function () {
4648
- if (cm.state.focused) { setTimeout(function () { return cm.display.input.focus(); }, 0); }
4649
- });
4650
- node.setAttribute("cm-not-content", "true");
4651
  }, function (pos, axis) {
4652
- if (axis == "horizontal") { setScrollLeft(cm, pos); }
4653
- else { setScrollTop(cm, pos); }
4654
- }, cm);
4655
  if (cm.display.scrollbars.addClass)
4656
- { addClass(cm.display.wrapper, cm.display.scrollbars.addClass); }
4657
  }
4658
 
4659
  // SCROLLING THINGS INTO VIEW
4660
 
4661
  // If an editor sits on the top or bottom of the window, partially
4662
  // scrolled out of view, this ensures that the cursor is visible.
4663
- function maybeScrollWindow(cm, rect) {
4664
  if (signalDOMEvent(cm, "scrollCursorIntoView")) { return }
4665
 
4666
- var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;
4667
- if (rect.top + box.top < 0) { doScroll = true; }
4668
- else if (rect.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) { doScroll = false; }
4669
  if (doScroll != null && !phantom) {
4670
- var scrollNode = elt("div", "\u200b", null, ("position: absolute;\n top: " + (rect.top - display.viewOffset - paddingTop(cm.display)) + "px;\n height: " + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + "px;\n left: " + (rect.left) + "px; width: " + (Math.max(2, rect.right - rect.left)) + "px;"));
4671
- cm.display.lineSpace.appendChild(scrollNode);
4672
- scrollNode.scrollIntoView(doScroll);
4673
- cm.display.lineSpace.removeChild(scrollNode);
4674
  }
4675
  }
4676
 
@@ -4678,90 +4668,89 @@ webpackJsonp([2],{
4678
  // it actually became visible (as line heights are accurately
4679
  // measured, the position of something may 'drift' during drawing).
4680
  function scrollPosIntoView(cm, pos, end, margin) {
4681
- if (margin == null) { margin = 0; }
4682
- var rect;
4683
  for (var limit = 0; limit < 5; limit++) {
4684
- var changed = false;
4685
- var coords = cursorCoords(cm, pos);
4686
- var endCoords = !end || end == pos ? coords : cursorCoords(cm, end);
4687
- rect = {left: Math.min(coords.left, endCoords.left),
4688
- top: Math.min(coords.top, endCoords.top) - margin,
4689
- right: Math.max(coords.left, endCoords.left),
4690
- bottom: Math.max(coords.bottom, endCoords.bottom) + margin};
4691
- var scrollPos = calculateScrollPos(cm, rect);
4692
- var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;
4693
  if (scrollPos.scrollTop != null) {
4694
- setScrollTop(cm, scrollPos.scrollTop);
4695
- if (Math.abs(cm.doc.scrollTop - startTop) > 1) { changed = true; }
4696
  }
4697
  if (scrollPos.scrollLeft != null) {
4698
- setScrollLeft(cm, scrollPos.scrollLeft);
4699
- if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { changed = true; }
4700
  }
4701
  if (!changed) { break }
4702
  }
4703
- return rect
4704
  }
4705
 
4706
  // Scroll a given set of coordinates into view (immediately).
4707
- function scrollIntoView(cm, rect) {
4708
- var scrollPos = calculateScrollPos(cm, rect);
4709
- if (scrollPos.scrollTop != null) { setScrollTop(cm, scrollPos.scrollTop); }
4710
- if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }
4711
  }
4712
 
4713
  // Calculate a new scroll position needed to scroll the given
4714
  // rectangle into view. Returns an object with scrollTop and
4715
  // scrollLeft properties. When these are undefined, the
4716
  // vertical/horizontal position does not need to be adjusted.
4717
- function calculateScrollPos(cm, rect) {
4718
- var display = cm.display, snapMargin = textHeight(cm.display);
4719
- if (rect.top < 0) { rect.top = 0; }
4720
- var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;
4721
- var screen = displayHeight(cm), result = {};
4722
- if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }
4723
- var docBottom = cm.doc.height + paddingVert(display);
4724
- var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;
4725
- if (rect.top < screentop) {
4726
- result.scrollTop = atTop ? 0 : rect.top;
4727
- } else if (rect.bottom > screentop + screen) {
4728
- var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);
4729
- if (newTop != screentop) { result.scrollTop = newTop; }
4730
- }
4731
-
4732
- var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;
4733
- var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);
4734
- var tooWide = rect.right - rect.left > screenw;
4735
- if (tooWide) { rect.right = rect.left + screenw; }
4736
- if (rect.left < 10)
4737
- { result.scrollLeft = 0; }
4738
- else if (rect.left < screenleft)
4739
- { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }
4740
- else if (rect.right > screenw + screenleft - 3)
4741
- { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }
4742
  return result
4743
  }
4744
 
4745
  // Store a relative adjustment to the scroll position in the current
4746
  // operation (to be applied when the operation finishes).
4747
  function addToScrollPos(cm, left, top) {
4748
- if (left != null || top != null) { resolveScrollToPos(cm); }
4749
  if (left != null)
4750
- { cm.curOp.scrollLeft = (cm.curOp.scrollLeft == null ? cm.doc.scrollLeft : cm.curOp.scrollLeft) + left; }
4751
  if (top != null)
4752
- { cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top; }
4753
  }
4754
 
4755
  // Make sure that at the end of the operation the current cursor is
4756
  // shown.
4757
  function ensureCursorVisible(cm) {
4758
- resolveScrollToPos(cm);
4759
- var cur = cm.getCursor(), from = cur, to = cur;
4760
  if (!cm.options.lineWrapping) {
4761
- from = cur.ch ? Pos(cur.line, cur.ch - 1) : cur;
4762
- to = Pos(cur.line, cur.ch + 1);
4763
  }
4764
- cm.curOp.scrollToPos = {from: from, to: to, margin: cm.options.cursorScrollMargin};
4765
  }
4766
 
4767
  // When an operation has its scrollToPos property set, and another
@@ -4769,17 +4758,15 @@ webpackJsonp([2],{
4769
  // 'simulates' scrolling that position into view in a cheap way, so
4770
  // that the effect of intermediate scroll commands is not ignored.
4771
  function resolveScrollToPos(cm) {
4772
- var range$$1 = cm.curOp.scrollToPos;
4773
- if (range$$1) {
4774
- cm.curOp.scrollToPos = null;
4775
- var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);
4776
- var sPos = calculateScrollPos(cm, {
4777
- left: Math.min(from.left, to.left),
4778
- top: Math.min(from.top, to.top) - range$$1.margin,
4779
- right: Math.max(from.right, to.right),
4780
- bottom: Math.max(from.bottom, to.bottom) + range$$1.margin
4781
- });
4782
- cm.scrollTo(sPos.scrollLeft, sPos.scrollTop);
4783
  }
4784
  }
4785
 
@@ -4789,7 +4776,7 @@ webpackJsonp([2],{
4789
  // error-prone). Instead, display updates are batched and then all
4790
  // combined and executed at once.
4791
 
4792
- var nextOpId = 0;
4793
  // Start a new operation.
4794
  function startOperation(cm) {
4795
  cm.curOp = {
@@ -4808,159 +4795,159 @@ webpackJsonp([2],{
4808
  scrollToPos: null, // Used to scroll to a specific position
4809
  focus: false,
4810
  id: ++nextOpId // Unique ID
4811
- };
4812
- pushOperation(cm.curOp);
4813
  }
4814
 
4815
  // Finish an operation, updating the display and signalling delayed events
4816
  function endOperation(cm) {
4817
- var op = cm.curOp;
4818
  finishOperation(op, function (group) {
4819
  for (var i = 0; i < group.ops.length; i++)
4820
- { group.ops[i].cm.curOp = null; }
4821
- endOperations(group);
4822
- });
4823
  }
4824
 
4825
  // The DOM updates done when an operation finishes are batched so
4826
  // that the minimum number of relayouts are required.
4827
  function endOperations(group) {
4828
- var ops = group.ops;
4829
  for (var i = 0; i < ops.length; i++) // Read DOM
4830
- { endOperation_R1(ops[i]); }
4831
  for (var i$1 = 0; i$1 < ops.length; i$1++) // Write DOM (maybe)
4832
- { endOperation_W1(ops[i$1]); }
4833
  for (var i$2 = 0; i$2 < ops.length; i$2++) // Read DOM
4834
- { endOperation_R2(ops[i$2]); }
4835
  for (var i$3 = 0; i$3 < ops.length; i$3++) // Write DOM (maybe)
4836
- { endOperation_W2(ops[i$3]); }
4837
  for (var i$4 = 0; i$4 < ops.length; i$4++) // Read DOM
4838
- { endOperation_finish(ops[i$4]); }
4839
  }
4840
 
4841
  function endOperation_R1(op) {
4842
- var cm = op.cm, display = cm.display;
4843
- maybeClipScrollbars(cm);
4844
- if (op.updateMaxLine) { findMaxLine(cm); }
4845
 
4846
  op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null ||
4847
  op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom ||
4848
  op.scrollToPos.to.line >= display.viewTo) ||
4849
- display.maxLineChanged && cm.options.lineWrapping;
4850
  op.update = op.mustUpdate &&
4851
- new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate);
4852
  }
4853
 
4854
  function endOperation_W1(op) {
4855
- op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update);
4856
  }
4857
 
4858
  function endOperation_R2(op) {
4859
- var cm = op.cm, display = cm.display;
4860
- if (op.updatedDisplay) { updateHeightsInViewport(cm); }
4861
 
4862
- op.barMeasure = measureForScrollbars(cm);
4863
 
4864
  // If the max line changed since it was last measured, measure it,
4865
  // and ensure the document's width matches it.
4866
  // updateDisplay_W2 will use these properties to do the actual resizing
4867
  if (display.maxLineChanged && !cm.options.lineWrapping) {
4868
- op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;
4869
- cm.display.sizerWidth = op.adjustWidthTo;
4870
  op.barMeasure.scrollWidth =
4871
- Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);
4872
- op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm));
4873
  }
4874
 
4875
  if (op.updatedDisplay || op.selectionChanged)
4876
- { op.preparedSelection = display.input.prepareSelection(op.focus); }
4877
  }
4878
 
4879
  function endOperation_W2(op) {
4880
- var cm = op.cm;
4881
 
4882
  if (op.adjustWidthTo != null) {
4883
- cm.display.sizer.style.minWidth = op.adjustWidthTo + "px";
4884
  if (op.maxScrollLeft < cm.doc.scrollLeft)
4885
- { setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true); }
4886
- cm.display.maxLineChanged = false;
4887
  }
4888
 
4889
- var takeFocus = op.focus && op.focus == activeElt() && (!document.hasFocus || document.hasFocus());
4890
  if (op.preparedSelection)
4891
- { cm.display.input.showSelection(op.preparedSelection, takeFocus); }
4892
  if (op.updatedDisplay || op.startHeight != cm.doc.height)
4893
- { updateScrollbars(cm, op.barMeasure); }
4894
  if (op.updatedDisplay)
4895
- { setDocumentHeight(cm, op.barMeasure); }
4896
 
4897
- if (op.selectionChanged) { restartBlink(cm); }
4898
 
4899
  if (cm.state.focused && op.updateInput)
4900
- { cm.display.input.reset(op.typing); }
4901
- if (takeFocus) { ensureFocus(op.cm); }
4902
  }
4903
 
4904
  function endOperation_finish(op) {
4905
- var cm = op.cm, display = cm.display, doc = cm.doc;
4906
 
4907
- if (op.updatedDisplay) { postUpdateDisplay(cm, op.update); }
4908
 
4909
  // Abort mouse wheel delta measurement, when scrolling explicitly
4910
  if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos))
4911
- { display.wheelStartX = display.wheelStartY = null; }
4912
 
4913
  // Propagate the scroll position to the actual DOM scroller
4914
  if (op.scrollTop != null && (display.scroller.scrollTop != op.scrollTop || op.forceScroll)) {
4915
- doc.scrollTop = Math.max(0, Math.min(display.scroller.scrollHeight - display.scroller.clientHeight, op.scrollTop));
4916
- display.scrollbars.setScrollTop(doc.scrollTop);
4917
- display.scroller.scrollTop = doc.scrollTop;
4918
  }
4919
  if (op.scrollLeft != null && (display.scroller.scrollLeft != op.scrollLeft || op.forceScroll)) {
4920
- doc.scrollLeft = Math.max(0, Math.min(display.scroller.scrollWidth - display.scroller.clientWidth, op.scrollLeft));
4921
- display.scrollbars.setScrollLeft(doc.scrollLeft);
4922
- display.scroller.scrollLeft = doc.scrollLeft;
4923
- alignHorizontally(cm);
4924
  }
4925
  // If we need to scroll a specific position into view, do so.
4926
  if (op.scrollToPos) {
4927
- var rect = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from),
4928
- clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin);
4929
- maybeScrollWindow(cm, rect);
4930
  }
4931
 
4932
  // Fire events for markers that are hidden/unidden by editing or
4933
  // undoing
4934
- var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;
4935
  if (hidden) { for (var i = 0; i < hidden.length; ++i)
4936
- { if (!hidden[i].lines.length) { signal(hidden[i], "hide"); } } }
4937
  if (unhidden) { for (var i$1 = 0; i$1 < unhidden.length; ++i$1)
4938
- { if (unhidden[i$1].lines.length) { signal(unhidden[i$1], "unhide"); } } }
4939
 
4940
  if (display.wrapper.offsetHeight)
4941
- { doc.scrollTop = cm.display.scroller.scrollTop; }
4942
 
4943
  // Fire change events, and delayed event handlers
4944
  if (op.changeObjs)
4945
- { signal(cm, "changes", cm, op.changeObjs); }
4946
  if (op.update)
4947
- { op.update.finish(); }
4948
  }
4949
 
4950
  // Run the given function in an operation
4951
  function runInOp(cm, f) {
4952
  if (cm.curOp) { return f() }
4953
- startOperation(cm);
4954
  try { return f() }
4955
- finally { endOperation(cm); }
4956
  }
4957
  // Wraps a function in an operation. Returns the wrapped function.
4958
  function operation(cm, f) {
4959
  return function() {
4960
  if (cm.curOp) { return f.apply(cm, arguments) }
4961
- startOperation(cm);
4962
  try { return f.apply(cm, arguments) }
4963
- finally { endOperation(cm); }
4964
  }
4965
  }
4966
  // Used to add methods to editor and doc instances, wrapping them in
@@ -4968,18 +4955,18 @@ webpackJsonp([2],{
4968
  function methodOp(f) {
4969
  return function() {
4970
  if (this.curOp) { return f.apply(this, arguments) }
4971
- startOperation(this);
4972
  try { return f.apply(this, arguments) }
4973
- finally { endOperation(this); }
4974
  }
4975
  }
4976
  function docMethodOp(f) {
4977
  return function() {
4978
- var cm = this.cm;
4979
  if (!cm || cm.curOp) { return f.apply(this, arguments) }
4980
- startOperation(cm);
4981
  try { return f.apply(this, arguments) }
4982
- finally { endOperation(cm); }
4983
  }
4984
  }
4985
 
@@ -4990,111 +4977,111 @@ webpackJsonp([2],{
4990
  // lines are divided into visual lines. regLineChange (below)
4991
  // registers single-line changes.
4992
  function regChange(cm, from, to, lendiff) {
4993
- if (from == null) { from = cm.doc.first; }
4994
- if (to == null) { to = cm.doc.first + cm.doc.size; }
4995
- if (!lendiff) { lendiff = 0; }
4996
 
4997
- var display = cm.display;
4998
  if (lendiff && to < display.viewTo &&
4999
  (display.updateLineNumbers == null || display.updateLineNumbers > from))
5000
- { display.updateLineNumbers = from; }
5001
 
5002
- cm.curOp.viewChanged = true;
5003
 
5004
  if (from >= display.viewTo) { // Change after
5005
  if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo)
5006
- { resetView(cm); }
5007
  } else if (to <= display.viewFrom) { // Change before
5008
  if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) {
5009
- resetView(cm);
5010
  } else {
5011
- display.viewFrom += lendiff;
5012
- display.viewTo += lendiff;
5013
  }
5014
  } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap
5015
- resetView(cm);
5016
  } else if (from <= display.viewFrom) { // Top overlap
5017
- var cut = viewCuttingPoint(cm, to, to + lendiff, 1);
5018
  if (cut) {
5019
- display.view = display.view.slice(cut.index);
5020
- display.viewFrom = cut.lineN;
5021
- display.viewTo += lendiff;
5022
  } else {
5023
- resetView(cm);
5024
  }
5025
  } else if (to >= display.viewTo) { // Bottom overlap
5026
- var cut$1 = viewCuttingPoint(cm, from, from, -1);
5027
  if (cut$1) {
5028
- display.view = display.view.slice(0, cut$1.index);
5029
- display.viewTo = cut$1.lineN;
5030
  } else {
5031
- resetView(cm);
5032
  }
5033
  } else { // Gap in the middle
5034
- var cutTop = viewCuttingPoint(cm, from, from, -1);
5035
- var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1);
5036
  if (cutTop && cutBot) {
5037
  display.view = display.view.slice(0, cutTop.index)
5038
  .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN))
5039
- .concat(display.view.slice(cutBot.index));
5040
- display.viewTo += lendiff;
5041
  } else {
5042
- resetView(cm);
5043
  }
5044
  }
5045
 
5046
- var ext = display.externalMeasured;
5047
  if (ext) {
5048
  if (to < ext.lineN)
5049
- { ext.lineN += lendiff; }
5050
  else if (from < ext.lineN + ext.size)
5051
- { display.externalMeasured = null; }
5052
  }
5053
  }
5054
 
5055
  // Register a change to a single line. Type must be one of "text",
5056
  // "gutter", "class", "widget"
5057
  function regLineChange(cm, line, type) {
5058
- cm.curOp.viewChanged = true;
5059
- var display = cm.display, ext = cm.display.externalMeasured;
5060
  if (ext && line >= ext.lineN && line < ext.lineN + ext.size)
5061
- { display.externalMeasured = null; }
5062
 
5063
  if (line < display.viewFrom || line >= display.viewTo) { return }
5064
- var lineView = display.view[findViewIndex(cm, line)];
5065
  if (lineView.node == null) { return }
5066
- var arr = lineView.changes || (lineView.changes = []);
5067
- if (indexOf(arr, type) == -1) { arr.push(type); }
5068
  }
5069
 
5070
  // Clear the view.
5071
  function resetView(cm) {
5072
- cm.display.viewFrom = cm.display.viewTo = cm.doc.first;
5073
- cm.display.view = [];
5074
- cm.display.viewOffset = 0;
5075
  }
5076
 
5077
  function viewCuttingPoint(cm, oldN, newN, dir) {
5078
- var index = findViewIndex(cm, oldN), diff, view = cm.display.view;
5079
  if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size)
5080
  { return {index: index, lineN: newN} }
5081
- var n = cm.display.viewFrom;
5082
  for (var i = 0; i < index; i++)
5083
- { n += view[i].size; }
5084
  if (n != oldN) {
5085
  if (dir > 0) {
5086
  if (index == view.length - 1) { return null }
5087
- diff = (n + view[index].size) - oldN;
5088
- index++;
5089
  } else {
5090
- diff = n - oldN;
5091
  }
5092
- oldN += diff; newN += diff;
5093
  }
5094
  while (visualLineNo(cm.doc, newN) != newN) {
5095
  if (index == (dir < 0 ? 0 : view.length - 1)) { return null }
5096
- newN += dir * view[index - (dir < 0 ? 1 : 0)].size;
5097
- index += dir;
5098
  }
5099
  return {index: index, lineN: newN}
5100
  }
@@ -5102,31 +5089,31 @@ webpackJsonp([2],{
5102
  // Force the view to cover a given range, adding empty view element
5103
  // or clipping off existing ones as needed.
5104
  function adjustView(cm, from, to) {
5105
- var display = cm.display, view = display.view;
5106
  if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) {
5107
- display.view = buildViewArray(cm, from, to);
5108
- display.viewFrom = from;
5109
  } else {
5110
  if (display.viewFrom > from)
5111
- { display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view); }
5112
  else if (display.viewFrom < from)
5113
- { display.view = display.view.slice(findViewIndex(cm, from)); }
5114
- display.viewFrom = from;
5115
  if (display.viewTo < to)
5116
- { display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)); }
5117
  else if (display.viewTo > to)
5118
- { display.view = display.view.slice(0, findViewIndex(cm, to)); }
5119
  }
5120
- display.viewTo = to;
5121
  }
5122
 
5123
  // Count the number of lines in the view whose DOM representation is
5124
  // out of date (or nonexistent).
5125
  function countDirtyView(cm) {
5126
- var view = cm.display.view, dirty = 0;
5127
  for (var i = 0; i < view.length; i++) {
5128
- var lineView = view[i];
5129
- if (!lineView.hidden && (!lineView.node || lineView.changes)) { ++dirty; }
5130
  }
5131
  return dirty
5132
  }
@@ -5135,83 +5122,83 @@ webpackJsonp([2],{
5135
 
5136
  function startWorker(cm, time) {
5137
  if (cm.doc.mode.startState && cm.doc.frontier < cm.display.viewTo)
5138
- { cm.state.highlight.set(time, bind(highlightWorker, cm)); }
5139
  }
5140
 
5141
  function highlightWorker(cm) {
5142
- var doc = cm.doc;
5143
- if (doc.frontier < doc.first) { doc.frontier = doc.first; }
5144
  if (doc.frontier >= cm.display.viewTo) { return }
5145
- var end = +new Date + cm.options.workTime;
5146
- var state = copyState(doc.mode, getStateBefore(cm, doc.frontier));
5147
- var changedLines = [];
5148
 
5149
  doc.iter(doc.frontier, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function (line) {
5150
  if (doc.frontier >= cm.display.viewFrom) { // Visible
5151
- var oldStyles = line.styles, tooLong = line.text.length > cm.options.maxHighlightLength;
5152
- var highlighted = highlightLine(cm, line, tooLong ? copyState(doc.mode, state) : state, true);
5153
- line.styles = highlighted.styles;
5154
- var oldCls = line.styleClasses, newCls = highlighted.classes;
5155
- if (newCls) { line.styleClasses = newCls; }
5156
- else if (oldCls) { line.styleClasses = null; }
5157
  var ischange = !oldStyles || oldStyles.length != line.styles.length ||
5158
- oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass);
5159
- for (var i = 0; !ischange && i < oldStyles.length; ++i) { ischange = oldStyles[i] != line.styles[i]; }
5160
- if (ischange) { changedLines.push(doc.frontier); }
5161
- line.stateAfter = tooLong ? state : copyState(doc.mode, state);
5162
  } else {
5163
  if (line.text.length <= cm.options.maxHighlightLength)
5164
- { processLine(cm, line.text, state); }
5165
- line.stateAfter = doc.frontier % 5 == 0 ? copyState(doc.mode, state) : null;
5166
  }
5167
- ++doc.frontier;
5168
  if (+new Date > end) {
5169
- startWorker(cm, cm.options.workDelay);
5170
  return true
5171
  }
5172
- });
5173
  if (changedLines.length) { runInOp(cm, function () {
5174
  for (var i = 0; i < changedLines.length; i++)
5175
- { regLineChange(cm, changedLines[i], "text"); }
5176
- }); }
5177
  }
5178
 
5179
  // DISPLAY DRAWING
5180
 
5181
  var DisplayUpdate = function(cm, viewport, force) {
5182
- var display = cm.display;
5183
 
5184
- this.viewport = viewport;
5185
  // Store some values that we'll need later (but don't want to force a relayout for)
5186
- this.visible = visibleLines(display, cm.doc, viewport);
5187
- this.editorIsHidden = !display.wrapper.offsetWidth;
5188
- this.wrapperHeight = display.wrapper.clientHeight;
5189
- this.wrapperWidth = display.wrapper.clientWidth;
5190
- this.oldDisplayWidth = displayWidth(cm);
5191
- this.force = force;
5192
- this.dims = getDimensions(cm);
5193
- this.events = [];
5194
  };
5195
 
5196
  DisplayUpdate.prototype.signal = function (emitter, type) {
5197
  if (hasHandler(emitter, type))
5198
- { this.events.push(arguments); }
5199
  };
5200
  DisplayUpdate.prototype.finish = function () {
5201
  var this$1 = this;
5202
 
5203
  for (var i = 0; i < this.events.length; i++)
5204
- { signal.apply(null, this$1.events[i]); }
5205
  };
5206
 
5207
  function maybeClipScrollbars(cm) {
5208
- var display = cm.display;
5209
  if (!display.scrollbarsClipped && display.scroller.offsetWidth) {
5210
- display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth;
5211
- display.heightForcer.style.height = scrollGap(cm) + "px";
5212
- display.sizer.style.marginBottom = -display.nativeBarWidth + "px";
5213
- display.sizer.style.borderRightWidth = scrollGap(cm) + "px";
5214
- display.scrollbarsClipped = true;
5215
  }
5216
  }
5217
 
@@ -5219,10 +5206,10 @@ webpackJsonp([2],{
5219
  // (returning false) when there is nothing to be done and forced is
5220
  // false.
5221
  function updateDisplayIfNeeded(cm, update) {
5222
- var display = cm.display, doc = cm.doc;
5223
 
5224
  if (update.editorIsHidden) {
5225
- resetView(cm);
5226
  return false
5227
  }
5228
 
@@ -5234,101 +5221,101 @@ webpackJsonp([2],{
5234
  { return false }
5235
 
5236
  if (maybeUpdateLineNumberWidth(cm)) {
5237
- resetView(cm);
5238
- update.dims = getDimensions(cm);
5239
  }
5240
 
5241
  // Compute a suitable new viewport (from & to)
5242
- var end = doc.first + doc.size;
5243
- var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first);
5244
- var to = Math.min(end, update.visible.to + cm.options.viewportMargin);
5245
- if (display.viewFrom < from && from - display.viewFrom < 20) { from = Math.max(doc.first, display.viewFrom); }
5246
- if (display.viewTo > to && display.viewTo - to < 20) { to = Math.min(end, display.viewTo); }
5247
  if (sawCollapsedSpans) {
5248
- from = visualLineNo(cm.doc, from);
5249
- to = visualLineEndNo(cm.doc, to);
5250
  }
5251
 
5252
  var different = from != display.viewFrom || to != display.viewTo ||
5253
- display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth;
5254
- adjustView(cm, from, to);
5255
 
5256
- display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom));
5257
  // Position the mover div to align with the current scroll position
5258
- cm.display.mover.style.top = display.viewOffset + "px";
5259
 
5260
- var toUpdate = countDirtyView(cm);
5261
  if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view &&
5262
  (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo))
5263
  { return false }
5264
 
5265
  // For big changes, we hide the enclosing element during the
5266
  // update, since that speeds up the operations on most browsers.
5267
- var focused = activeElt();
5268
- if (toUpdate > 4) { display.lineDiv.style.display = "none"; }
5269
- patchDisplay(cm, display.updateLineNumbers, update.dims);
5270
- if (toUpdate > 4) { display.lineDiv.style.display = ""; }
5271
- display.renderedView = display.view;
5272
  // There might have been a widget with a focused element that got
5273
  // hidden or updated, if so re-focus it.
5274
- if (focused && activeElt() != focused && focused.offsetHeight) { focused.focus(); }
5275
 
5276
  // Prevent selection and cursors from interfering with the scroll
5277
  // width and height.
5278
- removeChildren(display.cursorDiv);
5279
- removeChildren(display.selectionDiv);
5280
- display.gutters.style.height = display.sizer.style.minHeight = 0;
5281
 
5282
  if (different) {
5283
- display.lastWrapHeight = update.wrapperHeight;
5284
- display.lastWrapWidth = update.wrapperWidth;
5285
- startWorker(cm, 400);
5286
  }
5287
 
5288
- display.updateLineNumbers = null;
5289
 
5290
  return true
5291
  }
5292
 
5293
  function postUpdateDisplay(cm, update) {
5294
- var viewport = update.viewport;
5295
 
5296
  for (var first = true;; first = false) {
5297
  if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {
5298
  // Clip forced viewport to actual scrollable area.
5299
  if (viewport && viewport.top != null)
5300
- { viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)}; }
5301
  // Updated line heights might result in the drawn area not
5302
  // actually covering the viewport. Keep looping until it does.
5303
- update.visible = visibleLines(cm.display, cm.doc, viewport);
5304
  if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)
5305
  { break }
5306
  }
5307
  if (!updateDisplayIfNeeded(cm, update)) { break }
5308
- updateHeightsInViewport(cm);
5309
- var barMeasure = measureForScrollbars(cm);
5310
- updateSelection(cm);
5311
- updateScrollbars(cm, barMeasure);
5312
- setDocumentHeight(cm, barMeasure);
5313
  }
5314
 
5315
- update.signal(cm, "update", cm);
5316
  if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {
5317
- update.signal(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo);
5318
- cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo;
5319
  }
5320
  }
5321
 
5322
  function updateDisplaySimple(cm, viewport) {
5323
- var update = new DisplayUpdate(cm, viewport);
5324
  if (updateDisplayIfNeeded(cm, update)) {
5325
- updateHeightsInViewport(cm);
5326
- postUpdateDisplay(cm, update);
5327
- var barMeasure = measureForScrollbars(cm);
5328
- updateSelection(cm);
5329
- updateScrollbars(cm, barMeasure);
5330
- setDocumentHeight(cm, barMeasure);
5331
- update.finish();
5332
  }
5333
  }
5334
 
@@ -5337,85 +5324,85 @@ webpackJsonp([2],{
5337
  // that are not there yet, and updating the ones that are out of
5338
  // date.
5339
  function patchDisplay(cm, updateNumbersFrom, dims) {
5340
- var display = cm.display, lineNumbers = cm.options.lineNumbers;
5341
- var container = display.lineDiv, cur = container.firstChild;
5342
 
5343
  function rm(node) {
5344
- var next = node.nextSibling;
5345
  // Works around a throw-scroll bug in OS X Webkit
5346
  if (webkit && mac && cm.display.currentWheelTarget == node)
5347
- { node.style.display = "none"; }
5348
  else
5349
- { node.parentNode.removeChild(node); }
5350
  return next
5351
  }
5352
 
5353
- var view = display.view, lineN = display.viewFrom;
5354
  // Loop over the elements in the view, syncing cur (the DOM nodes
5355
  // in display.lineDiv) with the view as we go.
5356
  for (var i = 0; i < view.length; i++) {
5357
- var lineView = view[i];
5358
  if (lineView.hidden) {
5359
  } else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet
5360
- var node = buildLineElement(cm, lineView, lineN, dims);
5361
- container.insertBefore(node, cur);
5362
  } else { // Already drawn
5363
- while (cur != lineView.node) { cur = rm(cur); }
5364
  var updateNumber = lineNumbers && updateNumbersFrom != null &&
5365
- updateNumbersFrom <= lineN && lineView.lineNumber;
5366
  if (lineView.changes) {
5367
- if (indexOf(lineView.changes, "gutter") > -1) { updateNumber = false; }
5368
- updateLineForChanges(cm, lineView, lineN, dims);
5369
  }
5370
  if (updateNumber) {
5371
- removeChildren(lineView.lineNumber);
5372
- lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)));
5373
  }
5374
- cur = lineView.node.nextSibling;
5375
  }
5376
- lineN += lineView.size;
5377
  }
5378
- while (cur) { cur = rm(cur); }
5379
  }
5380
 
5381
  function updateGutterSpace(cm) {
5382
- var width = cm.display.gutters.offsetWidth;
5383
- cm.display.sizer.style.marginLeft = width + "px";
5384
  }
5385
 
5386
  function setDocumentHeight(cm, measure) {
5387
- cm.display.sizer.style.minHeight = measure.docHeight + "px";
5388
- cm.display.heightForcer.style.top = measure.docHeight + "px";
5389
- cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + "px";
5390
  }
5391
 
5392
  // Rebuild the gutter elements, ensure the margin to the left of the
5393
  // code matches their width.
5394
  function updateGutters(cm) {
5395
- var gutters = cm.display.gutters, specs = cm.options.gutters;
5396
- removeChildren(gutters);
5397
- var i = 0;
5398
  for (; i < specs.length; ++i) {
5399
- var gutterClass = specs[i];
5400
- var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + gutterClass));
5401
  if (gutterClass == "CodeMirror-linenumbers") {
5402
- cm.display.lineGutter = gElt;
5403
- gElt.style.width = (cm.display.lineNumWidth || 1) + "px";
5404
  }
5405
  }
5406
- gutters.style.display = i ? "" : "none";
5407
- updateGutterSpace(cm);
5408
  }
5409
 
5410
  // Make sure the gutters options contains the element
5411
  // "CodeMirror-linenumbers" when the lineNumbers option is true.
5412
  function setGuttersForLineNumbers(options) {
5413
- var found = indexOf(options.gutters, "CodeMirror-linenumbers");
5414
  if (found == -1 && options.lineNumbers) {
5415
- options.gutters = options.gutters.concat(["CodeMirror-linenumbers"]);
5416
  } else if (found > -1 && !options.lineNumbers) {
5417
- options.gutters = options.gutters.slice(0);
5418
- options.gutters.splice(found, 1);
5419
  }
5420
  }
5421
 
@@ -5425,8 +5412,8 @@ webpackJsonp([2],{
5425
  // which one is the primary selection (the one that's scrolled into
5426
  // view, that getCursor returns, etc).
5427
  var Selection = function(ranges, primIndex) {
5428
- this.ranges = ranges;
5429
- this.primIndex = primIndex;
5430
  };
5431
 
5432
  Selection.prototype.primary = function () { return this.ranges[this.primIndex] };
@@ -5437,7 +5424,7 @@ webpackJsonp([2],{
5437
  if (other == this) { return true }
5438
  if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) { return false }
5439
  for (var i = 0; i < this.ranges.length; i++) {
5440
- var here = this$1.ranges[i], there = other.ranges[i];
5441
  if (!equalCursorPos(here.anchor, there.anchor) || !equalCursorPos(here.head, there.head)) { return false }
5442
  }
5443
  return true
@@ -5446,9 +5433,9 @@ webpackJsonp([2],{
5446
  Selection.prototype.deepCopy = function () {
5447
  var this$1 = this;
5448
 
5449
- var out = [];
5450
  for (var i = 0; i < this.ranges.length; i++)
5451
- { out[i] = new Range(copyPos(this$1.ranges[i].anchor), copyPos(this$1.ranges[i].head)); }
5452
  return new Selection(out, this.primIndex)
5453
  };
5454
 
@@ -5463,9 +5450,9 @@ webpackJsonp([2],{
5463
  Selection.prototype.contains = function (pos, end) {
5464
  var this$1 = this;
5465
 
5466
- if (!end) { end = pos; }
5467
  for (var i = 0; i < this.ranges.length; i++) {
5468
- var range = this$1.ranges[i];
5469
  if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0)
5470
  { return i }
5471
  }
@@ -5473,7 +5460,7 @@ webpackJsonp([2],{
5473
  };
5474
 
5475
  var Range = function(anchor, head) {
5476
- this.anchor = anchor; this.head = head;
5477
  };
5478
 
5479
  Range.prototype.from = function () { return minPos(this.anchor, this.head) };
@@ -5484,16 +5471,16 @@ webpackJsonp([2],{
5484
  // build a selection out of it. 'Consumes' ranges array (modifying
5485
  // it).
5486
  function normalizeSelection(ranges, primIndex) {
5487
- var prim = ranges[primIndex];
5488
- ranges.sort(function (a, b) { return cmp(a.from(), b.from()); });
5489
- primIndex = indexOf(ranges, prim);
5490
  for (var i = 1; i < ranges.length; i++) {
5491
- var cur = ranges[i], prev = ranges[i - 1];
5492
  if (cmp(prev.to(), cur.from()) >= 0) {
5493
- var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to());
5494
- var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head;
5495
- if (i <= primIndex) { --primIndex; }
5496
- ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to));
5497
  }
5498
  }
5499
  return new Selection(ranges, primIndex)
@@ -5517,17 +5504,17 @@ webpackJsonp([2],{
5517
  if (cmp(pos, change.from) < 0) { return pos }
5518
  if (cmp(pos, change.to) <= 0) { return changeEnd(change) }
5519
 
5520
- var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;
5521
- if (pos.line == change.to.line) { ch += changeEnd(change).ch - change.to.ch; }
5522
  return Pos(line, ch)
5523
  }
5524
 
5525
  function computeSelAfterChange(doc, change) {
5526
- var out = [];
5527
  for (var i = 0; i < doc.sel.ranges.length; i++) {
5528
- var range = doc.sel.ranges[i];
5529
  out.push(new Range(adjustForChange(range.anchor, change),
5530
- adjustForChange(range.head, change)));
5531
  }
5532
  return normalizeSelection(out, doc.sel.primIndex)
5533
  }
@@ -5542,19 +5529,19 @@ webpackJsonp([2],{
5542
  // Used by replaceSelections to allow moving the selection to the
5543
  // start or around the replaced test. Hint may be "start" or "around".
5544
  function computeReplacedSel(doc, changes, hint) {
5545
- var out = [];
5546
- var oldPrev = Pos(doc.first, 0), newPrev = oldPrev;
5547
  for (var i = 0; i < changes.length; i++) {
5548
- var change = changes[i];
5549
- var from = offsetPos(change.from, oldPrev, newPrev);
5550
- var to = offsetPos(changeEnd(change), oldPrev, newPrev);
5551
- oldPrev = change.to;
5552
- newPrev = to;
5553
  if (hint == "around") {
5554
- var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0;
5555
- out[i] = new Range(inv ? to : from, inv ? from : to);
5556
  } else {
5557
- out[i] = new Range(from, from);
5558
  }
5559
  }
5560
  return new Selection(out, doc.sel.primIndex)
@@ -5563,19 +5550,19 @@ webpackJsonp([2],{
5563
  // Used to get the editor into a consistent state again when options change.
5564
 
5565
  function loadMode(cm) {
5566
- cm.doc.mode = getMode(cm.options, cm.doc.modeOption);
5567
- resetModeState(cm);
5568
  }
5569
 
5570
  function resetModeState(cm) {
5571
  cm.doc.iter(function (line) {
5572
- if (line.stateAfter) { line.stateAfter = null; }
5573
- if (line.styles) { line.styles = null; }
5574
- });
5575
- cm.doc.frontier = cm.doc.first;
5576
- startWorker(cm, 100);
5577
- cm.state.modeGen++;
5578
- if (cm.curOp) { regChange(cm); }
5579
  }
5580
 
5581
  // DOCUMENT DATA STRUCTURE
@@ -5589,117 +5576,105 @@ webpackJsonp([2],{
5589
  }
5590
 
5591
  // Perform a change on the document data structure.
5592
- function updateDoc(doc, change, markedSpans, estimateHeight$$1) {
5593
  function spansFor(n) {return markedSpans ? markedSpans[n] : null}
5594
  function update(line, text, spans) {
5595
- updateLine(line, text, spans, estimateHeight$$1);
5596
- signalLater(line, "change", line, change);
5597
  }
5598
  function linesFor(start, end) {
5599
- var result = [];
5600
  for (var i = start; i < end; ++i)
5601
- { result.push(new Line(text[i], spansFor(i), estimateHeight$$1)); }
5602
  return result
5603
  }
5604
 
5605
- var from = change.from, to = change.to, text = change.text;
5606
- var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line);
5607
- var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line;
5608
 
5609
  // Adjust the line structure
5610
  if (change.full) {
5611
- doc.insert(0, linesFor(0, text.length));
5612
- doc.remove(text.length, doc.size - text.length);
5613
  } else if (isWholeLineUpdate(doc, change)) {
5614
  // This is a whole-line replace. Treated specially to make
5615
  // sure line objects move the way they are supposed to.
5616
- var added = linesFor(0, text.length - 1);
5617
- update(lastLine, lastLine.text, lastSpans);
5618
- if (nlines) { doc.remove(from.line, nlines); }
5619
- if (added.length) { doc.insert(from.line, added); }
5620
  } else if (firstLine == lastLine) {
5621
  if (text.length == 1) {
5622
- update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);
5623
  } else {
5624
- var added$1 = linesFor(1, text.length - 1);
5625
- added$1.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight$$1));
5626
- update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
5627
- doc.insert(from.line + 1, added$1);
5628
  }
5629
  } else if (text.length == 1) {
5630
- update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));
5631
- doc.remove(from.line + 1, nlines);
5632
  } else {
5633
- update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
5634
- update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);
5635
- var added$2 = linesFor(1, text.length - 1);
5636
- if (nlines > 1) { doc.remove(from.line + 1, nlines - 1); }
5637
- doc.insert(from.line + 1, added$2);
5638
  }
5639
 
5640
- signalLater(doc, "change", doc, change);
5641
  }
5642
 
5643
  // Call f for all linked documents.
5644
  function linkedDocs(doc, f, sharedHistOnly) {
5645
  function propagate(doc, skip, sharedHist) {
5646
  if (doc.linked) { for (var i = 0; i < doc.linked.length; ++i) {
5647
- var rel = doc.linked[i];
5648
  if (rel.doc == skip) { continue }
5649
- var shared = sharedHist && rel.sharedHist;
5650
  if (sharedHistOnly && !shared) { continue }
5651
- f(rel.doc, shared);
5652
- propagate(rel.doc, doc, shared);
5653
  } }
5654
  }
5655
- propagate(doc, null, true);
5656
  }
5657
 
5658
  // Attach a document to an editor.
5659
  function attachDoc(cm, doc) {
5660
  if (doc.cm) { throw new Error("This document is already in use.") }
5661
- cm.doc = doc;
5662
- doc.cm = cm;
5663
- estimateLineHeights(cm);
5664
- loadMode(cm);
5665
- setDirectionClass(cm);
5666
- if (!cm.options.lineWrapping) { findMaxLine(cm); }
5667
- cm.options.mode = doc.modeOption;
5668
- regChange(cm);
5669
- }
5670
-
5671
- function setDirectionClass(cm) {
5672
- (cm.doc.direction == "rtl" ? addClass : rmClass)(cm.display.lineDiv, "CodeMirror-rtl");
5673
- }
5674
-
5675
- function directionChanged(cm) {
5676
- runInOp(cm, function () {
5677
- setDirectionClass(cm);
5678
- regChange(cm);
5679
- });
5680
  }
5681
 
5682
  function History(startGen) {
5683
  // Arrays of change events and selections. Doing something adds an
5684
  // event to done and clears undo. Undoing moves events from done
5685
  // to undone, redoing moves them in the other direction.
5686
- this.done = []; this.undone = [];
5687
- this.undoDepth = Infinity;
5688
  // Used to track when changes can be merged into a single undo
5689
  // event
5690
- this.lastModTime = this.lastSelTime = 0;
5691
- this.lastOp = this.lastSelOp = null;
5692
- this.lastOrigin = this.lastSelOrigin = null;
5693
  // Used by the isClean() method
5694
- this.generation = this.maxGeneration = startGen || 1;
5695
  }
5696
 
5697
  // Create a history change event from an updateDoc-style change
5698
  // object.
5699
  function historyChangeFromChange(doc, change) {
5700
- var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)};
5701
- attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);
5702
- linkedDocs(doc, function (doc) { return attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); }, true);
5703
  return histChange
5704
  }
5705
 
@@ -5707,8 +5682,8 @@ webpackJsonp([2],{
5707
  // a change event.
5708
  function clearSelectionEvents(array) {
5709
  while (array.length) {
5710
- var last = lst(array);
5711
- if (last.ranges) { array.pop(); }
5712
  else { break }
5713
  }
5714
  }
@@ -5717,12 +5692,12 @@ webpackJsonp([2],{
5717
  // events that are in the way.
5718
  function lastChangeEvent(hist, force) {
5719
  if (force) {
5720
- clearSelectionEvents(hist.done);
5721
  return lst(hist.done)
5722
  } else if (hist.done.length && !lst(hist.done).ranges) {
5723
  return lst(hist.done)
5724
  } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {
5725
- hist.done.pop();
5726
  return lst(hist.done)
5727
  }
5728
  }
@@ -5731,10 +5706,10 @@ webpackJsonp([2],{
5731
  // a single operation, or are close together with an origin that
5732
  // allows merging (starting with "+") into a single event.
5733
  function addChangeToHistory(doc, change, selAfter, opId) {
5734
- var hist = doc.history;
5735
- hist.undone.length = 0;
5736
- var time = +new Date, cur;
5737
- var last;
5738
 
5739
  if ((hist.lastOp == opId ||
5740
  hist.lastOrigin == change.origin && change.origin &&
@@ -5742,39 +5717,39 @@ webpackJsonp([2],{
5742
  change.origin.charAt(0) == "*")) &&
5743
  (cur = lastChangeEvent(hist, hist.lastOp == opId))) {
5744
  // Merge this change into the last event
5745
- last = lst(cur.changes);
5746
  if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) {
5747
  // Optimized case for simple insertion -- don't want to add
5748
  // new changesets for every character typed
5749
- last.to = changeEnd(change);
5750
  } else {
5751
  // Add new sub-event
5752
- cur.changes.push(historyChangeFromChange(doc, change));
5753
  }
5754
  } else {
5755
  // Can not be merged, start a new event.
5756
- var before = lst(hist.done);
5757
  if (!before || !before.ranges)
5758
- { pushSelectionToHistory(doc.sel, hist.done); }
5759
  cur = {changes: [historyChangeFromChange(doc, change)],
5760
- generation: hist.generation};
5761
- hist.done.push(cur);
5762
  while (hist.done.length > hist.undoDepth) {
5763
- hist.done.shift();
5764
- if (!hist.done[0].ranges) { hist.done.shift(); }
5765
  }
5766
  }
5767
- hist.done.push(selAfter);
5768
- hist.generation = ++hist.maxGeneration;
5769
- hist.lastModTime = hist.lastSelTime = time;
5770
- hist.lastOp = hist.lastSelOp = opId;
5771
- hist.lastOrigin = hist.lastSelOrigin = change.origin;
5772
 
5773
- if (!last) { signal(doc, "historyAdded"); }
5774
  }
5775
 
5776
  function selectionEventCanBeMerged(doc, origin, prev, sel) {
5777
- var ch = origin.charAt(0);
5778
  return ch == "*" ||
5779
  ch == "+" &&
5780
  prev.ranges.length == sel.ranges.length &&
@@ -5787,7 +5762,7 @@ webpackJsonp([2],{
5787
  // selection into the 'done' array when it was significantly
5788
  // different (in number of selected ranges, emptiness, or time).
5789
  function addSelectionToHistory(doc, sel, opId, options) {
5790
- var hist = doc.history, origin = options && options.origin;
5791
 
5792
  // A new event is started when the previous origin does not match
5793
  // the current, or the origins don't allow matching. Origins
@@ -5797,52 +5772,52 @@ webpackJsonp([2],{
5797
  (origin && hist.lastSelOrigin == origin &&
5798
  (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin ||
5799
  selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))))
5800
- { hist.done[hist.done.length - 1] = sel; }
5801
  else
5802
- { pushSelectionToHistory(sel, hist.done); }
5803
 
5804
- hist.lastSelTime = +new Date;
5805
- hist.lastSelOrigin = origin;
5806
- hist.lastSelOp = opId;
5807
  if (options && options.clearRedo !== false)
5808
- { clearSelectionEvents(hist.undone); }
5809
  }
5810
 
5811
  function pushSelectionToHistory(sel, dest) {
5812
- var top = lst(dest);
5813
  if (!(top && top.ranges && top.equals(sel)))
5814
- { dest.push(sel); }
5815
  }
5816
 
5817
  // Used to store marked span information in the history.
5818
  function attachLocalSpans(doc, change, from, to) {
5819
- var existing = change["spans_" + doc.id], n = 0;
5820
  doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function (line) {
5821
  if (line.markedSpans)
5822
- { (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans; }
5823
- ++n;
5824
- });
5825
  }
5826
 
5827
  // When un/re-doing restores text containing marked spans, those
5828
  // that have been explicitly cleared should not be restored.
5829
  function removeClearedSpans(spans) {
5830
  if (!spans) { return null }
5831
- var out;
5832
  for (var i = 0; i < spans.length; ++i) {
5833
- if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }
5834
- else if (out) { out.push(spans[i]); }
5835
  }
5836
  return !out ? spans : out.length ? out : null
5837
  }
5838
 
5839
  // Retrieve and filter the old marked spans stored in a change event.
5840
  function getOldSpans(doc, change) {
5841
- var found = change["spans_" + doc.id];
5842
  if (!found) { return null }
5843
- var nw = [];
5844
  for (var i = 0; i < change.text.length; ++i)
5845
- { nw.push(removeClearedSpans(found[i])); }
5846
  return nw
5847
  }
5848
 
@@ -5851,22 +5826,22 @@ webpackJsonp([2],{
5851
  // existed in the history (so that deleting around a span and then
5852
  // undoing brings back the span).
5853
  function mergeOldSpans(doc, change) {
5854
- var old = getOldSpans(doc, change);
5855
- var stretched = stretchSpansOverChange(doc, change);
5856
  if (!old) { return stretched }
5857
  if (!stretched) { return old }
5858
 
5859
  for (var i = 0; i < old.length; ++i) {
5860
- var oldCur = old[i], stretchCur = stretched[i];
5861
  if (oldCur && stretchCur) {
5862
  spans: for (var j = 0; j < stretchCur.length; ++j) {
5863
- var span = stretchCur[j];
5864
  for (var k = 0; k < oldCur.length; ++k)
5865
  { if (oldCur[k].marker == span.marker) { continue spans } }
5866
- oldCur.push(span);
5867
  }
5868
  } else if (stretchCur) {
5869
- old[i] = stretchCur;
5870
  }
5871
  }
5872
  return old
@@ -5875,22 +5850,22 @@ webpackJsonp([2],{
5875
  // Used both to provide a JSON-safe object in .getHistory, and, when
5876
  // detaching a document, to split the history in two
5877
  function copyHistoryArray(events, newGroup, instantiateSel) {
5878
- var copy = [];
5879
  for (var i = 0; i < events.length; ++i) {
5880
- var event = events[i];
5881
  if (event.ranges) {
5882
- copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);
5883
  continue
5884
  }
5885
- var changes = event.changes, newChanges = [];
5886
- copy.push({changes: newChanges});
5887
  for (var j = 0; j < changes.length; ++j) {
5888
- var change = changes[j], m = (void 0);
5889
- newChanges.push({from: change.from, to: change.to, text: change.text});
5890
  if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\d+)$/)) {
5891
  if (indexOf(newGroup, Number(m[1])) > -1) {
5892
- lst(newChanges)[prop] = change[prop];
5893
- delete change[prop];
5894
  }
5895
  } } }
5896
  }
@@ -5908,14 +5883,14 @@ webpackJsonp([2],{
5908
  // Used for cursor motion and such.
5909
  function extendRange(doc, range, head, other) {
5910
  if (doc.cm && doc.cm.display.shift || doc.extend) {
5911
- var anchor = range.anchor;
5912
  if (other) {
5913
- var posBefore = cmp(head, anchor) < 0;
5914
  if (posBefore != (cmp(other, anchor) < 0)) {
5915
- anchor = head;
5916
- head = other;
5917
  } else if (posBefore != (cmp(head, other) < 0)) {
5918
- head = other;
5919
  }
5920
  }
5921
  return new Range(anchor, head)
@@ -5926,29 +5901,29 @@ webpackJsonp([2],{
5926
 
5927
  // Extend the primary selection range, discard the rest.
5928
  function extendSelection(doc, head, other, options) {
5929
- setSelection(doc, new Selection([extendRange(doc, doc.sel.primary(), head, other)], 0), options);
5930
  }
5931
 
5932
  // Extend all selections (pos is an array of selections with length
5933
  // equal the number of selections)
5934
  function extendSelections(doc, heads, options) {
5935
- var out = [];
5936
  for (var i = 0; i < doc.sel.ranges.length; i++)
5937
- { out[i] = extendRange(doc, doc.sel.ranges[i], heads[i], null); }
5938
- var newSel = normalizeSelection(out, doc.sel.primIndex);
5939
- setSelection(doc, newSel, options);
5940
  }
5941
 
5942
  // Updates a single range in the selection.
5943
  function replaceOneSelection(doc, i, range, options) {
5944
- var ranges = doc.sel.ranges.slice(0);
5945
- ranges[i] = range;
5946
- setSelection(doc, normalizeSelection(ranges, doc.sel.primIndex), options);
5947
  }
5948
 
5949
  // Reset the selection to a single range.
5950
  function setSimpleSelection(doc, anchor, head, options) {
5951
- setSelection(doc, simpleSelection(anchor, head), options);
5952
  }
5953
 
5954
  // Give beforeSelectionChange handlers a change to influence a
@@ -5959,90 +5934,90 @@ webpackJsonp([2],{
5959
  update: function(ranges) {
5960
  var this$1 = this;
5961
 
5962
- this.ranges = [];
5963
  for (var i = 0; i < ranges.length; i++)
5964
  { this$1.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),
5965
- clipPos(doc, ranges[i].head)); }
5966
  },
5967
  origin: options && options.origin
5968
- };
5969
- signal(doc, "beforeSelectionChange", doc, obj);
5970
- if (doc.cm) { signal(doc.cm, "beforeSelectionChange", doc.cm, obj); }
5971
  if (obj.ranges != sel.ranges) { return normalizeSelection(obj.ranges, obj.ranges.length - 1) }
5972
  else { return sel }
5973
  }
5974
 
5975
  function setSelectionReplaceHistory(doc, sel, options) {
5976
- var done = doc.history.done, last = lst(done);
5977
  if (last && last.ranges) {
5978
- done[done.length - 1] = sel;
5979
- setSelectionNoUndo(doc, sel, options);
5980
  } else {
5981
- setSelection(doc, sel, options);
5982
  }
5983
  }
5984
 
5985
  // Set a new selection.
5986
  function setSelection(doc, sel, options) {
5987
- setSelectionNoUndo(doc, sel, options);
5988
- addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options);
5989
  }
5990
 
5991
  function setSelectionNoUndo(doc, sel, options) {
5992
  if (hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange"))
5993
- { sel = filterSelectionChange(doc, sel, options); }
5994
 
5995
  var bias = options && options.bias ||
5996
- (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);
5997
- setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));
5998
 
5999
  if (!(options && options.scroll === false) && doc.cm)
6000
- { ensureCursorVisible(doc.cm); }
6001
  }
6002
 
6003
  function setSelectionInner(doc, sel) {
6004
  if (sel.equals(doc.sel)) { return }
6005
 
6006
- doc.sel = sel;
6007
 
6008
  if (doc.cm) {
6009
- doc.cm.curOp.updateInput = doc.cm.curOp.selectionChanged = true;
6010
- signalCursorActivity(doc.cm);
6011
  }
6012
- signalLater(doc, "cursorActivity", doc);
6013
  }
6014
 
6015
  // Verify that the selection does not partially select any atomic
6016
  // marked ranges.
6017
  function reCheckSelection(doc) {
6018
- setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false), sel_dontScroll);
6019
  }
6020
 
6021
  // Return a selection that does not partially select any atomic
6022
  // ranges.
6023
  function skipAtomicInSelection(doc, sel, bias, mayClear) {
6024
- var out;
6025
  for (var i = 0; i < sel.ranges.length; i++) {
6026
- var range = sel.ranges[i];
6027
- var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i];
6028
- var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear);
6029
- var newHead = skipAtomic(doc, range.head, old && old.head, bias, mayClear);
6030
  if (out || newAnchor != range.anchor || newHead != range.head) {
6031
- if (!out) { out = sel.ranges.slice(0, i); }
6032
- out[i] = new Range(newAnchor, newHead);
6033
  }
6034
  }
6035
  return out ? normalizeSelection(out, sel.primIndex) : sel
6036
  }
6037
 
6038
  function skipAtomicInner(doc, pos, oldPos, dir, mayClear) {
6039
- var line = getLine(doc, pos.line);
6040
  if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {
6041
- var sp = line.markedSpans[i], m = sp.marker;
6042
  if ((sp.from == null || (m.inclusiveLeft ? sp.from <= pos.ch : sp.from < pos.ch)) &&
6043
  (sp.to == null || (m.inclusiveRight ? sp.to >= pos.ch : sp.to > pos.ch))) {
6044
  if (mayClear) {
6045
- signal(m, "beforeCursorEnter");
6046
  if (m.explicitlyCleared) {
6047
  if (!line.markedSpans) { break }
6048
  else {--i; continue}
@@ -6051,16 +6026,16 @@ webpackJsonp([2],{
6051
  if (!m.atomic) { continue }
6052
 
6053
  if (oldPos) {
6054
- var near = m.find(dir < 0 ? 1 : -1), diff = (void 0);
6055
  if (dir < 0 ? m.inclusiveRight : m.inclusiveLeft)
6056
- { near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null); }
6057
  if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0))
6058
  { return skipAtomicInner(doc, near, pos, dir, mayClear) }
6059
  }
6060
 
6061
- var far = m.find(dir < 0 ? -1 : 1);
6062
  if (dir < 0 ? m.inclusiveLeft : m.inclusiveRight)
6063
- { far = movePos(doc, far, dir, far.line == pos.line ? line : null); }
6064
  return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null
6065
  }
6066
  } }
@@ -6069,13 +6044,13 @@ webpackJsonp([2],{
6069
 
6070
  // Ensure a given position is not inside an atomic range.
6071
  function skipAtomic(doc, pos, oldPos, bias, mayClear) {
6072
- var dir = bias || 1;
6073
  var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) ||
6074
  (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) ||
6075
  skipAtomicInner(doc, pos, oldPos, -dir, mayClear) ||
6076
- (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true));
6077
  if (!found) {
6078
- doc.cantEdit = true;
6079
  return Pos(doc.first, 0)
6080
  }
6081
  return found
@@ -6094,7 +6069,7 @@ webpackJsonp([2],{
6094
  }
6095
 
6096
  function selectAll(cm) {
6097
- cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);
6098
  }
6099
 
6100
  // UPDATING
@@ -6108,15 +6083,15 @@ webpackJsonp([2],{
6108
  text: change.text,
6109
  origin: change.origin,
6110
  cancel: function () { return obj.canceled = true; }
6111
- };
6112
  if (update) { obj.update = function (from, to, text, origin) {
6113
- if (from) { obj.from = clipPos(doc, from); }
6114
- if (to) { obj.to = clipPos(doc, to); }
6115
- if (text) { obj.text = text; }
6116
- if (origin !== undefined) { obj.origin = origin; }
6117
- }; }
6118
- signal(doc, "beforeChange", doc, obj);
6119
- if (doc.cm) { signal(doc.cm, "beforeChange", doc.cm, obj); }
6120
 
6121
  if (obj.canceled) { return null }
6122
  return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin}
@@ -6131,101 +6106,101 @@ webpackJsonp([2],{
6131
  }
6132
 
6133
  if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) {
6134
- change = filterChange(doc, change, true);
6135
  if (!change) { return }
6136
  }
6137
 
6138
  // Possibly split or suppress the update based on the presence
6139
  // of read-only spans in its range.
6140
- var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);
6141
  if (split) {
6142
  for (var i = split.length - 1; i >= 0; --i)
6143
- { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [""] : change.text}); }
6144
  } else {
6145
- makeChangeInner(doc, change);
6146
  }
6147
  }
6148
 
6149
  function makeChangeInner(doc, change) {
6150
  if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) { return }
6151
- var selAfter = computeSelAfterChange(doc, change);
6152
- addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);
6153
 
6154
- makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));
6155
- var rebased = [];
6156
 
6157
  linkedDocs(doc, function (doc, sharedHist) {
6158
  if (!sharedHist && indexOf(rebased, doc.history) == -1) {
6159
- rebaseHist(doc.history, change);
6160
- rebased.push(doc.history);
6161
  }
6162
- makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));
6163
- });
6164
  }
6165
 
6166
  // Revert a change stored in a document's history.
6167
  function makeChangeFromHistory(doc, type, allowSelectionOnly) {
6168
  if (doc.cm && doc.cm.state.suppressEdits && !allowSelectionOnly) { return }
6169
 
6170
- var hist = doc.history, event, selAfter = doc.sel;
6171
- var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done;
6172
 
6173
  // Verify that there is a useable event (so that ctrl-z won't
6174
  // needlessly clear selection events)
6175
- var i = 0;
6176
  for (; i < source.length; i++) {
6177
- event = source[i];
6178
  if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges)
6179
  { break }
6180
  }
6181
  if (i == source.length) { return }
6182
- hist.lastOrigin = hist.lastSelOrigin = null;
6183
 
6184
  for (;;) {
6185
- event = source.pop();
6186
  if (event.ranges) {
6187
- pushSelectionToHistory(event, dest);
6188
  if (allowSelectionOnly && !event.equals(doc.sel)) {
6189
- setSelection(doc, event, {clearRedo: false});
6190
  return
6191
  }
6192
- selAfter = event;
6193
  }
6194
  else { break }
6195
  }
6196
 
6197
  // Build up a reverse change object to add to the opposite history
6198
  // stack (redo when undoing, and vice versa).
6199
- var antiChanges = [];
6200
- pushSelectionToHistory(selAfter, dest);
6201
- dest.push({changes: antiChanges, generation: hist.generation});
6202
- hist.generation = event.generation || ++hist.maxGeneration;
6203
 
6204
- var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange");
6205
 
6206
  var loop = function ( i ) {
6207
- var change = event.changes[i];
6208
- change.origin = type;
6209
  if (filter && !filterChange(doc, change, false)) {
6210
- source.length = 0;
6211
  return {}
6212
  }
6213
 
6214
- antiChanges.push(historyChangeFromChange(doc, change));
6215
 
6216
- var after = i ? computeSelAfterChange(doc, change) : lst(source);
6217
- makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));
6218
- if (!i && doc.cm) { doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}); }
6219
- var rebased = [];
6220
 
6221
  // Propagate to the linked documents
6222
  linkedDocs(doc, function (doc, sharedHist) {
6223
  if (!sharedHist && indexOf(rebased, doc.history) == -1) {
6224
- rebaseHist(doc.history, change);
6225
- rebased.push(doc.history);
6226
  }
6227
- makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));
6228
- });
6229
  };
6230
 
6231
  for (var i$1 = event.changes.length - 1; i$1 >= 0; --i$1) {
@@ -6239,15 +6214,15 @@ webpackJsonp([2],{
6239
  // above or below them in the parent document.
6240
  function shiftDoc(doc, distance) {
6241
  if (distance == 0) { return }
6242
- doc.first += distance;
6243
  doc.sel = new Selection(map(doc.sel.ranges, function (range) { return new Range(
6244
  Pos(range.anchor.line + distance, range.anchor.ch),
6245
  Pos(range.head.line + distance, range.head.ch)
6246
- ); }), doc.sel.primIndex);
6247
  if (doc.cm) {
6248
- regChange(doc.cm, doc.first, doc.first - distance, distance);
6249
  for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++)
6250
- { regLineChange(doc.cm, l, "gutter"); }
6251
  }
6252
  }
6253
 
@@ -6258,108 +6233,108 @@ webpackJsonp([2],{
6258
  { return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans) }
6259
 
6260
  if (change.to.line < doc.first) {
6261
- shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));
6262
  return
6263
  }
6264
  if (change.from.line > doc.lastLine()) { return }
6265
 
6266
  // Clip the change to the size of this doc
6267
  if (change.from.line < doc.first) {
6268
- var shift = change.text.length - 1 - (doc.first - change.from.line);
6269
- shiftDoc(doc, shift);
6270
  change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),
6271
- text: [lst(change.text)], origin: change.origin};
6272
  }
6273
- var last = doc.lastLine();
6274
  if (change.to.line > last) {
6275
  change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),
6276
- text: [change.text[0]], origin: change.origin};
6277
  }
6278
 
6279
- change.removed = getBetween(doc, change.from, change.to);
6280
 
6281
- if (!selAfter) { selAfter = computeSelAfterChange(doc, change); }
6282
- if (doc.cm) { makeChangeSingleDocInEditor(doc.cm, change, spans); }
6283
- else { updateDoc(doc, change, spans); }
6284
- setSelectionNoUndo(doc, selAfter, sel_dontScroll);
6285
  }
6286
 
6287
  // Handle the interaction of a change to a document with the editor
6288
  // that this document is part of.
6289
  function makeChangeSingleDocInEditor(cm, change, spans) {
6290
- var doc = cm.doc, display = cm.display, from = change.from, to = change.to;
6291
 
6292
- var recomputeMaxLength = false, checkWidthStart = from.line;
6293
  if (!cm.options.lineWrapping) {
6294
- checkWidthStart = lineNo(visualLine(getLine(doc, from.line)));
6295
  doc.iter(checkWidthStart, to.line + 1, function (line) {
6296
  if (line == display.maxLine) {
6297
- recomputeMaxLength = true;
6298
  return true
6299
  }
6300
- });
6301
  }
6302
 
6303
  if (doc.sel.contains(change.from, change.to) > -1)
6304
- { signalCursorActivity(cm); }
6305
 
6306
- updateDoc(doc, change, spans, estimateHeight(cm));
6307
 
6308
  if (!cm.options.lineWrapping) {
6309
  doc.iter(checkWidthStart, from.line + change.text.length, function (line) {
6310
- var len = lineLength(line);
6311
  if (len > display.maxLineLength) {
6312
- display.maxLine = line;
6313
- display.maxLineLength = len;
6314
- display.maxLineChanged = true;
6315
- recomputeMaxLength = false;
6316
  }
6317
- });
6318
- if (recomputeMaxLength) { cm.curOp.updateMaxLine = true; }
6319
  }
6320
 
6321
  // Adjust frontier, schedule worker
6322
- doc.frontier = Math.min(doc.frontier, from.line);
6323
- startWorker(cm, 400);
6324
 
6325
- var lendiff = change.text.length - (to.line - from.line) - 1;
6326
  // Remember that these lines changed, for updating the display
6327
  if (change.full)
6328
- { regChange(cm); }
6329
  else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change))
6330
- { regLineChange(cm, from.line, "text"); }
6331
  else
6332
- { regChange(cm, from.line, to.line + 1, lendiff); }
6333
 
6334
- var changesHandler = hasHandler(cm, "changes"), changeHandler = hasHandler(cm, "change");
6335
  if (changeHandler || changesHandler) {
6336
  var obj = {
6337
  from: from, to: to,
6338
  text: change.text,
6339
  removed: change.removed,
6340
  origin: change.origin
6341
- };
6342
- if (changeHandler) { signalLater(cm, "change", cm, obj); }
6343
- if (changesHandler) { (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj); }
6344
  }
6345
- cm.display.selForContextMenu = null;
6346
  }
6347
 
6348
  function replaceRange(doc, code, from, to, origin) {
6349
- if (!to) { to = from; }
6350
- if (cmp(to, from) < 0) { var tmp = to; to = from; from = tmp; }
6351
- if (typeof code == "string") { code = doc.splitLines(code); }
6352
- makeChange(doc, {from: from, to: to, text: code, origin: origin});
6353
  }
6354
 
6355
  // Rebasing/resetting history to deal with externally-sourced changes
6356
 
6357
  function rebaseHistSelSingle(pos, from, to, diff) {
6358
  if (to < pos.line) {
6359
- pos.line += diff;
6360
  } else if (from < pos.line) {
6361
- pos.line = from;
6362
- pos.ch = 0;
6363
  }
6364
  }
6365
 
@@ -6372,47 +6347,47 @@ webpackJsonp([2],{
6372
  // shared position objects being unsafely updated.
6373
  function rebaseHistArray(array, from, to, diff) {
6374
  for (var i = 0; i < array.length; ++i) {
6375
- var sub = array[i], ok = true;
6376
  if (sub.ranges) {
6377
- if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; }
6378
  for (var j = 0; j < sub.ranges.length; j++) {
6379
- rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff);
6380
- rebaseHistSelSingle(sub.ranges[j].head, from, to, diff);
6381
  }
6382
  continue
6383
  }
6384
  for (var j$1 = 0; j$1 < sub.changes.length; ++j$1) {
6385
- var cur = sub.changes[j$1];
6386
  if (to < cur.from.line) {
6387
- cur.from = Pos(cur.from.line + diff, cur.from.ch);
6388
- cur.to = Pos(cur.to.line + diff, cur.to.ch);
6389
  } else if (from <= cur.to.line) {
6390
- ok = false;
6391
  break
6392
  }
6393
  }
6394
  if (!ok) {
6395
- array.splice(0, i + 1);
6396
- i = 0;
6397
  }
6398
  }
6399
  }
6400
 
6401
  function rebaseHist(hist, change) {
6402
- var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;
6403
- rebaseHistArray(hist.done, from, to, diff);
6404
- rebaseHistArray(hist.undone, from, to, diff);
6405
  }
6406
 
6407
  // Utility for applying a change to a line by handle or number,
6408
  // returning the number and optionally registering the line as
6409
  // changed.
6410
  function changeLine(doc, handle, changeType, op) {
6411
- var no = handle, line = handle;
6412
- if (typeof handle == "number") { line = getLine(doc, clipLine(doc, handle)); }
6413
- else { no = lineNo(handle); }
6414
  if (no == null) { return null }
6415
- if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }
6416
  return line
6417
  }
6418
 
@@ -6432,14 +6407,14 @@ webpackJsonp([2],{
6432
  var LeafChunk = function(lines) {
6433
  var this$1 = this;
6434
 
6435
- this.lines = lines;
6436
- this.parent = null;
6437
- var height = 0;
6438
  for (var i = 0; i < lines.length; ++i) {
6439
- lines[i].parent = this$1;
6440
- height += lines[i].height;
6441
  }
6442
- this.height = height;
6443
  };
6444
 
6445
  LeafChunk.prototype.chunkSize = function () { return this.lines.length };
@@ -6449,17 +6424,17 @@ webpackJsonp([2],{
6449
  var this$1 = this;
6450
 
6451
  for (var i = at, e = at + n; i < e; ++i) {
6452
- var line = this$1.lines[i];
6453
- this$1.height -= line.height;
6454
- cleanUpLine(line);
6455
- signalLater(line, "delete");
6456
  }
6457
- this.lines.splice(at, n);
6458
  };
6459
 
6460
  // Helper used to collapse a small branch into a single leaf.
6461
  LeafChunk.prototype.collapse = function (lines) {
6462
- lines.push.apply(lines, this.lines);
6463
  };
6464
 
6465
  // Insert the given array of lines at offset 'at', count them as
@@ -6467,9 +6442,9 @@ webpackJsonp([2],{
6467
  LeafChunk.prototype.insertInner = function (at, lines, height) {
6468
  var this$1 = this;
6469
 
6470
- this.height += height;
6471
- this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));
6472
- for (var i = 0; i < lines.length; ++i) { lines[i].parent = this$1; }
6473
  };
6474
 
6475
  // Used to iterate over a part of the tree.
@@ -6483,16 +6458,16 @@ webpackJsonp([2],{
6483
  var BranchChunk = function(children) {
6484
  var this$1 = this;
6485
 
6486
- this.children = children;
6487
- var size = 0, height = 0;
6488
  for (var i = 0; i < children.length; ++i) {
6489
- var ch = children[i];
6490
- size += ch.chunkSize(); height += ch.height;
6491
- ch.parent = this$1;
6492
  }
6493
- this.size = size;
6494
- this.height = height;
6495
- this.parent = null;
6496
  };
6497
 
6498
  BranchChunk.prototype.chunkSize = function () { return this.size };
@@ -6500,97 +6475,97 @@ webpackJsonp([2],{
6500
  BranchChunk.prototype.removeInner = function (at, n) {
6501
  var this$1 = this;
6502
 
6503
- this.size -= n;
6504
  for (var i = 0; i < this.children.length; ++i) {
6505
- var child = this$1.children[i], sz = child.chunkSize();
6506
  if (at < sz) {
6507
- var rm = Math.min(n, sz - at), oldHeight = child.height;
6508
- child.removeInner(at, rm);
6509
- this$1.height -= oldHeight - child.height;
6510
- if (sz == rm) { this$1.children.splice(i--, 1); child.parent = null; }
6511
  if ((n -= rm) == 0) { break }
6512
- at = 0;
6513
- } else { at -= sz; }
6514
  }
6515
  // If the result is smaller than 25 lines, ensure that it is a
6516
  // single leaf node.
6517
  if (this.size - n < 25 &&
6518
  (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) {
6519
- var lines = [];
6520
- this.collapse(lines);
6521
- this.children = [new LeafChunk(lines)];
6522
- this.children[0].parent = this;
6523
  }
6524
  };
6525
 
6526
  BranchChunk.prototype.collapse = function (lines) {
6527
  var this$1 = this;
6528
 
6529
- for (var i = 0; i < this.children.length; ++i) { this$1.children[i].collapse(lines); }
6530
  };
6531
 
6532
  BranchChunk.prototype.insertInner = function (at, lines, height) {
6533
  var this$1 = this;
6534
 
6535
- this.size += lines.length;
6536
- this.height += height;
6537
  for (var i = 0; i < this.children.length; ++i) {
6538
- var child = this$1.children[i], sz = child.chunkSize();
6539
  if (at <= sz) {
6540
- child.insertInner(at, lines, height);
6541
  if (child.lines && child.lines.length > 50) {
6542
  // To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it's never spliced.
6543
  // Instead, small slices are taken. They're taken in order because sequential memory accesses are fastest.
6544
- var remaining = child.lines.length % 25 + 25;
6545
  for (var pos = remaining; pos < child.lines.length;) {
6546
- var leaf = new LeafChunk(child.lines.slice(pos, pos += 25));
6547
- child.height -= leaf.height;
6548
- this$1.children.splice(++i, 0, leaf);
6549
- leaf.parent = this$1;
6550
  }
6551
- child.lines = child.lines.slice(0, remaining);
6552
- this$1.maybeSpill();
6553
  }
6554
  break
6555
  }
6556
- at -= sz;
6557
  }
6558
  };
6559
 
6560
  // When a node has grown, check whether it should be split.
6561
  BranchChunk.prototype.maybeSpill = function () {
6562
  if (this.children.length <= 10) { return }
6563
- var me = this;
6564
  do {
6565
- var spilled = me.children.splice(me.children.length - 5, 5);
6566
- var sibling = new BranchChunk(spilled);
6567
  if (!me.parent) { // Become the parent node
6568
- var copy = new BranchChunk(me.children);
6569
- copy.parent = me;
6570
- me.children = [copy, sibling];
6571
- me = copy;
6572
  } else {
6573
- me.size -= sibling.size;
6574
- me.height -= sibling.height;
6575
- var myIndex = indexOf(me.parent.children, me);
6576
- me.parent.children.splice(myIndex + 1, 0, sibling);
6577
  }
6578
- sibling.parent = me.parent;
6579
  } while (me.children.length > 10)
6580
- me.parent.maybeSpill();
6581
  };
6582
 
6583
  BranchChunk.prototype.iterN = function (at, n, op) {
6584
  var this$1 = this;
6585
 
6586
  for (var i = 0; i < this.children.length; ++i) {
6587
- var child = this$1.children[i], sz = child.chunkSize();
6588
  if (at < sz) {
6589
- var used = Math.min(n, sz - at);
6590
  if (child.iterN(at, used, op)) { return true }
6591
  if ((n -= used) == 0) { break }
6592
- at = 0;
6593
- } else { at -= sz; }
6594
  }
6595
  };
6596
 
@@ -6600,70 +6575,70 @@ webpackJsonp([2],{
6600
  var this$1 = this;
6601
 
6602
  if (options) { for (var opt in options) { if (options.hasOwnProperty(opt))
6603
- { this$1[opt] = options[opt]; } } }
6604
- this.doc = doc;
6605
- this.node = node;
6606
  };
6607
 
6608
  LineWidget.prototype.clear = function () {
6609
  var this$1 = this;
6610
 
6611
- var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line);
6612
  if (no == null || !ws) { return }
6613
- for (var i = 0; i < ws.length; ++i) { if (ws[i] == this$1) { ws.splice(i--, 1); } }
6614
- if (!ws.length) { line.widgets = null; }
6615
- var height = widgetHeight(this);
6616
- updateLineHeight(line, Math.max(0, line.height - height));
6617
  if (cm) {
6618
  runInOp(cm, function () {
6619
- adjustScrollWhenAboveVisible(cm, line, -height);
6620
- regLineChange(cm, no, "widget");
6621
- });
6622
- signalLater(cm, "lineWidgetCleared", cm, this, no);
6623
  }
6624
  };
6625
 
6626
  LineWidget.prototype.changed = function () {
6627
  var this$1 = this;
6628
 
6629
- var oldH = this.height, cm = this.doc.cm, line = this.line;
6630
- this.height = null;
6631
- var diff = widgetHeight(this) - oldH;
6632
  if (!diff) { return }
6633
- updateLineHeight(line, line.height + diff);
6634
  if (cm) {
6635
  runInOp(cm, function () {
6636
- cm.curOp.forceUpdate = true;
6637
- adjustScrollWhenAboveVisible(cm, line, diff);
6638
- signalLater(cm, "lineWidgetChanged", cm, this$1, lineNo(line));
6639
- });
6640
  }
6641
  };
6642
- eventMixin(LineWidget);
6643
 
6644
  function adjustScrollWhenAboveVisible(cm, line, diff) {
6645
  if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop))
6646
- { addToScrollPos(cm, null, diff); }
6647
  }
6648
 
6649
  function addLineWidget(doc, handle, node, options) {
6650
- var widget = new LineWidget(doc, node, options);
6651
- var cm = doc.cm;
6652
- if (cm && widget.noHScroll) { cm.display.alignWidgets = true; }
6653
  changeLine(doc, handle, "widget", function (line) {
6654
- var widgets = line.widgets || (line.widgets = []);
6655
- if (widget.insertAt == null) { widgets.push(widget); }
6656
- else { widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget); }
6657
- widget.line = line;
6658
  if (cm && !lineIsHidden(doc, line)) {
6659
- var aboveVisible = heightAtLine(line) < doc.scrollTop;
6660
- updateLineHeight(line, line.height + widgetHeight(widget));
6661
- if (aboveVisible) { addToScrollPos(cm, null, widget.height); }
6662
- cm.curOp.forceUpdate = true;
6663
  }
6664
  return true
6665
- });
6666
- signalLater(cm, "lineWidgetAdded", cm, widget, typeof handle == "number" ? handle : lineNo(handle));
6667
  return widget
6668
  }
6669
 
@@ -6682,13 +6657,13 @@ webpackJsonp([2],{
6682
  // Collapsed markers have unique ids, in order to be able to order
6683
  // them, which is needed for uniquely determining an outer marker
6684
  // when they overlap (they may nest, but not partially overlap).
6685
- var nextMarkerId = 0;
6686
 
6687
  var TextMarker = function(doc, type) {
6688
- this.lines = [];
6689
- this.type = type;
6690
- this.doc = doc;
6691
- this.id = ++nextMarkerId;
6692
  };
6693
 
6694
  // Clear the marker.
@@ -6696,44 +6671,44 @@ webpackJsonp([2],{
6696
  var this$1 = this;
6697
 
6698
  if (this.explicitlyCleared) { return }
6699
- var cm = this.doc.cm, withOp = cm && !cm.curOp;
6700
- if (withOp) { startOperation(cm); }
6701
  if (hasHandler(this, "clear")) {
6702
- var found = this.find();
6703
- if (found) { signalLater(this, "clear", found.from, found.to); }
6704
  }
6705
- var min = null, max = null;
6706
  for (var i = 0; i < this.lines.length; ++i) {
6707
- var line = this$1.lines[i];
6708
- var span = getMarkedSpanFor(line.markedSpans, this$1);
6709
- if (cm && !this$1.collapsed) { regLineChange(cm, lineNo(line), "text"); }
6710
  else if (cm) {
6711
- if (span.to != null) { max = lineNo(line); }
6712
- if (span.from != null) { min = lineNo(line); }
6713
  }
6714
- line.markedSpans = removeMarkedSpan(line.markedSpans, span);
6715
  if (span.from == null && this$1.collapsed && !lineIsHidden(this$1.doc, line) && cm)
6716
- { updateLineHeight(line, textHeight(cm.display)); }
6717
  }
6718
  if (cm && this.collapsed && !cm.options.lineWrapping) { for (var i$1 = 0; i$1 < this.lines.length; ++i$1) {
6719
- var visual = visualLine(this$1.lines[i$1]), len = lineLength(visual);
6720
  if (len > cm.display.maxLineLength) {
6721
- cm.display.maxLine = visual;
6722
- cm.display.maxLineLength = len;
6723
- cm.display.maxLineChanged = true;
6724
  }
6725
  } }
6726
 
6727
- if (min != null && cm && this.collapsed) { regChange(cm, min, max + 1); }
6728
- this.lines.length = 0;
6729
- this.explicitlyCleared = true;
6730
  if (this.atomic && this.doc.cantEdit) {
6731
- this.doc.cantEdit = false;
6732
- if (cm) { reCheckSelection(cm.doc); }
6733
  }
6734
- if (cm) { signalLater(cm, "markerCleared", cm, this, min, max); }
6735
- if (withOp) { endOperation(cm); }
6736
- if (this.parent) { this.parent.clear(); }
6737
  };
6738
 
6739
  // Find the position of the marker in the document. Returns a {from,
@@ -6744,17 +6719,17 @@ webpackJsonp([2],{
6744
  TextMarker.prototype.find = function (side, lineObj) {
6745
  var this$1 = this;
6746
 
6747
- if (side == null && this.type == "bookmark") { side = 1; }
6748
- var from, to;
6749
  for (var i = 0; i < this.lines.length; ++i) {
6750
- var line = this$1.lines[i];
6751
- var span = getMarkedSpanFor(line.markedSpans, this$1);
6752
  if (span.from != null) {
6753
- from = Pos(lineObj ? line : lineNo(line), span.from);
6754
  if (side == -1) { return from }
6755
  }
6756
  if (span.to != null) {
6757
- to = Pos(lineObj ? line : lineNo(line), span.to);
6758
  if (side == 1) { return to }
6759
  }
6760
  }
@@ -6766,43 +6741,44 @@ webpackJsonp([2],{
6766
  TextMarker.prototype.changed = function () {
6767
  var this$1 = this;
6768
 
6769
- var pos = this.find(-1, true), widget = this, cm = this.doc.cm;
6770
  if (!pos || !cm) { return }
6771
  runInOp(cm, function () {
6772
- var line = pos.line, lineN = lineNo(pos.line);
6773
- var view = findViewForLine(cm, lineN);
6774
  if (view) {
6775
- clearLineMeasurementCacheFor(view);
6776
- cm.curOp.selectionChanged = cm.curOp.forceUpdate = true;
6777
  }
6778
- cm.curOp.updateMaxLine = true;
6779
  if (!lineIsHidden(widget.doc, line) && widget.height != null) {
6780
- var oldHeight = widget.height;
6781
- widget.height = null;
6782
- var dHeight = widgetHeight(widget) - oldHeight;
6783
  if (dHeight)
6784
- { updateLineHeight(line, line.height + dHeight); }
6785
  }
6786
- signalLater(cm, "markerChanged", cm, this$1);
6787
- });
6788
  };
6789
 
6790
  TextMarker.prototype.attachLine = function (line) {
6791
  if (!this.lines.length && this.doc.cm) {
6792
- var op = this.doc.cm.curOp;
6793
  if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)
6794
- { (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); }
6795
  }
6796
- this.lines.push(line);
6797
  };
6798
 
6799
  TextMarker.prototype.detachLine = function (line) {
6800
- this.lines.splice(indexOf(this.lines, line), 1);
6801
  if (!this.lines.length && this.doc.cm) {
6802
- var op = this.doc.cm.curOp;(op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);
 
6803
  }
6804
  };
6805
- eventMixin(TextMarker);
6806
 
6807
  // Create a marker, wire it up to the right lines, and
6808
  function markText(doc, from, to, options, type) {
@@ -6813,63 +6789,64 @@ webpackJsonp([2],{
6813
  // Ensure we are in an operation.
6814
  if (doc.cm && !doc.cm.curOp) { return operation(doc.cm, markText)(doc, from, to, options, type) }
6815
 
6816
- var marker = new TextMarker(doc, type), diff = cmp(from, to);
6817
- if (options) { copyObj(options, marker, false); }
6818
  // Don't connect empty markers unless clearWhenEmpty is false
6819
  if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false)
6820
  { return marker }
6821
  if (marker.replacedWith) {
6822
  // Showing up as a widget implies collapsed (widget replaces text)
6823
- marker.collapsed = true;
6824
- marker.widgetNode = eltP("span", [marker.replacedWith], "CodeMirror-widget");
6825
- if (!options.handleMouseEvents) { marker.widgetNode.setAttribute("cm-ignore-events", "true"); }
6826
- if (options.insertLeft) { marker.widgetNode.insertLeft = true; }
 
6827
  }
6828
  if (marker.collapsed) {
6829
  if (conflictingCollapsedRange(doc, from.line, from, to, marker) ||
6830
  from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker))
6831
  { throw new Error("Inserting collapsed marker partially overlapping an existing one") }
6832
- seeCollapsedSpans();
6833
  }
6834
 
6835
  if (marker.addToHistory)
6836
- { addChangeToHistory(doc, {from: from, to: to, origin: "markText"}, doc.sel, NaN); }
6837
 
6838
- var curLine = from.line, cm = doc.cm, updateMaxLine;
6839
  doc.iter(curLine, to.line + 1, function (line) {
6840
  if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine)
6841
- { updateMaxLine = true; }
6842
- if (marker.collapsed && curLine != from.line) { updateLineHeight(line, 0); }
6843
  addMarkedSpan(line, new MarkedSpan(marker,
6844
  curLine == from.line ? from.ch : null,
6845
- curLine == to.line ? to.ch : null));
6846
- ++curLine;
6847
- });
6848
  // lineIsHidden depends on the presence of the spans, so needs a second pass
6849
  if (marker.collapsed) { doc.iter(from.line, to.line + 1, function (line) {
6850
- if (lineIsHidden(doc, line)) { updateLineHeight(line, 0); }
6851
- }); }
6852
 
6853
- if (marker.clearOnEnter) { on(marker, "beforeCursorEnter", function () { return marker.clear(); }); }
6854
 
6855
  if (marker.readOnly) {
6856
- seeReadOnlySpans();
6857
  if (doc.history.done.length || doc.history.undone.length)
6858
- { doc.clearHistory(); }
6859
  }
6860
  if (marker.collapsed) {
6861
- marker.id = ++nextMarkerId;
6862
- marker.atomic = true;
6863
  }
6864
  if (cm) {
6865
  // Sync editor state
6866
- if (updateMaxLine) { cm.curOp.updateMaxLine = true; }
6867
  if (marker.collapsed)
6868
- { regChange(cm, from.line, to.line + 1); }
6869
  else if (marker.className || marker.title || marker.startStyle || marker.endStyle || marker.css)
6870
- { for (var i = from.line; i <= to.line; i++) { regLineChange(cm, i, "text"); } }
6871
- if (marker.atomic) { reCheckSelection(cm.doc); }
6872
- signalLater(cm, "markerAdded", cm, marker);
6873
  }
6874
  return marker
6875
  }
@@ -6882,39 +6859,39 @@ webpackJsonp([2],{
6882
  var SharedTextMarker = function(markers, primary) {
6883
  var this$1 = this;
6884
 
6885
- this.markers = markers;
6886
- this.primary = primary;
6887
  for (var i = 0; i < markers.length; ++i)
6888
- { markers[i].parent = this$1; }
6889
  };
6890
 
6891
  SharedTextMarker.prototype.clear = function () {
6892
  var this$1 = this;
6893
 
6894
  if (this.explicitlyCleared) { return }
6895
- this.explicitlyCleared = true;
6896
  for (var i = 0; i < this.markers.length; ++i)
6897
- { this$1.markers[i].clear(); }
6898
- signalLater(this, "clear");
6899
  };
6900
 
6901
  SharedTextMarker.prototype.find = function (side, lineObj) {
6902
  return this.primary.find(side, lineObj)
6903
  };
6904
- eventMixin(SharedTextMarker);
6905
 
6906
  function markTextShared(doc, from, to, options, type) {
6907
- options = copyObj(options);
6908
- options.shared = false;
6909
- var markers = [markText(doc, from, to, options, type)], primary = markers[0];
6910
- var widget = options.widgetNode;
6911
  linkedDocs(doc, function (doc) {
6912
- if (widget) { options.widgetNode = widget.cloneNode(true); }
6913
- markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));
6914
  for (var i = 0; i < doc.linked.length; ++i)
6915
  { if (doc.linked[i].isParent) { return } }
6916
- primary = lst(markers);
6917
- });
6918
  return new SharedTextMarker(markers, primary)
6919
  }
6920
 
@@ -6924,25 +6901,25 @@ webpackJsonp([2],{
6924
 
6925
  function copySharedMarkers(doc, markers) {
6926
  for (var i = 0; i < markers.length; i++) {
6927
- var marker = markers[i], pos = marker.find();
6928
- var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to);
6929
  if (cmp(mFrom, mTo)) {
6930
- var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type);
6931
- marker.markers.push(subMark);
6932
- subMark.parent = marker;
6933
  }
6934
  }
6935
  }
6936
 
6937
  function detachSharedMarkers(markers) {
6938
  var loop = function ( i ) {
6939
- var marker = markers[i], linked = [marker.primary.doc];
6940
- linkedDocs(marker.primary.doc, function (d) { return linked.push(d); });
6941
  for (var j = 0; j < marker.markers.length; j++) {
6942
- var subMarker = marker.markers[j];
6943
  if (indexOf(linked, subMarker.doc) == -1) {
6944
- subMarker.parent = null;
6945
- marker.markers.splice(j--, 1);
6946
  }
6947
  }
6948
  };
@@ -6950,30 +6927,29 @@ webpackJsonp([2],{
6950
  for (var i = 0; i < markers.length; i++) loop( i );
6951
  }
6952
 
6953
- var nextDocId = 0;
6954
- var Doc = function(text, mode, firstLine, lineSep, direction) {
6955
- if (!(this instanceof Doc)) { return new Doc(text, mode, firstLine, lineSep, direction) }
6956
- if (firstLine == null) { firstLine = 0; }
6957
-
6958
- BranchChunk.call(this, [new LeafChunk([new Line("", null)])]);
6959
- this.first = firstLine;
6960
- this.scrollTop = this.scrollLeft = 0;
6961
- this.cantEdit = false;
6962
- this.cleanGeneration = 1;
6963
- this.frontier = firstLine;
6964
- var start = Pos(firstLine, 0);
6965
- this.sel = simpleSelection(start);
6966
- this.history = new History(null);
6967
- this.id = ++nextDocId;
6968
- this.modeOption = mode;
6969
- this.lineSep = lineSep;
6970
- this.direction = (direction == "rtl") ? "rtl" : "ltr";
6971
- this.extend = false;
6972
-
6973
- if (typeof text == "string") { text = this.splitLines(text); }
6974
- updateDoc(this, {from: start, to: start, text: text});
6975
- setSelection(this, simpleSelection(start), sel_dontScroll);
6976
- };
6977
 
6978
  Doc.prototype = createObj(BranchChunk.prototype, {
6979
  constructor: Doc,
@@ -6982,39 +6958,39 @@ webpackJsonp([2],{
6982
  // three, it iterates over the range given by the first two (with
6983
  // the second being non-inclusive).
6984
  iter: function(from, to, op) {
6985
- if (op) { this.iterN(from - this.first, to - from, op); }
6986
- else { this.iterN(this.first, this.first + this.size, from); }
6987
  },
6988
 
6989
  // Non-public interface for adding and removing lines.
6990
  insert: function(at, lines) {
6991
- var height = 0;
6992
- for (var i = 0; i < lines.length; ++i) { height += lines[i].height; }
6993
- this.insertInner(at - this.first, lines, height);
6994
  },
6995
- remove: function(at, n) { this.removeInner(at - this.first, n); },
6996
 
6997
  // From here, the methods are part of the public interface. Most
6998
  // are also available from CodeMirror (editor) instances.
6999
 
7000
  getValue: function(lineSep) {
7001
- var lines = getLines(this, this.first, this.first + this.size);
7002
  if (lineSep === false) { return lines }
7003
  return lines.join(lineSep || this.lineSeparator())
7004
  },
7005
  setValue: docMethodOp(function(code) {
7006
- var top = Pos(this.first, 0), last = this.first + this.size - 1;
7007
  makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),
7008
- text: this.splitLines(code), origin: "setValue", full: true}, true);
7009
- setSelection(this, simpleSelection(top));
7010
  }),
7011
  replaceRange: function(code, from, to, origin) {
7012
- from = clipPos(this, from);
7013
- to = to ? clipPos(this, to) : from;
7014
- replaceRange(this, code, from, to, origin);
7015
  },
7016
  getRange: function(from, to, lineSep) {
7017
- var lines = getBetween(this, clipPos(this, from), clipPos(this, to));
7018
  if (lineSep === false) { return lines }
7019
  return lines.join(lineSep || this.lineSeparator())
7020
  },
@@ -7025,7 +7001,7 @@ webpackJsonp([2],{
7025
  getLineNumber: function(line) {return lineNo(line)},
7026
 
7027
  getLineHandleVisualStart: function(line) {
7028
- if (typeof line == "number") { line = getLine(this, line); }
7029
  return visualLine(line)
7030
  },
7031
 
@@ -7036,56 +7012,56 @@ webpackJsonp([2],{
7036
  clipPos: function(pos) {return clipPos(this, pos)},
7037
 
7038
  getCursor: function(start) {
7039
- var range$$1 = this.sel.primary(), pos;
7040
- if (start == null || start == "head") { pos = range$$1.head; }
7041
- else if (start == "anchor") { pos = range$$1.anchor; }
7042
- else if (start == "end" || start == "to" || start === false) { pos = range$$1.to(); }
7043
- else { pos = range$$1.from(); }
7044
  return pos
7045
  },
7046
  listSelections: function() { return this.sel.ranges },
7047
  somethingSelected: function() {return this.sel.somethingSelected()},
7048
 
7049
  setCursor: docMethodOp(function(line, ch, options) {
7050
- setSimpleSelection(this, clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line), null, options);
7051
  }),
7052
  setSelection: docMethodOp(function(anchor, head, options) {
7053
- setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options);
7054
  }),
7055
  extendSelection: docMethodOp(function(head, other, options) {
7056
- extendSelection(this, clipPos(this, head), other && clipPos(this, other), options);
7057
  }),
7058
  extendSelections: docMethodOp(function(heads, options) {
7059
- extendSelections(this, clipPosArray(this, heads), options);
7060
  }),
7061
  extendSelectionsBy: docMethodOp(function(f, options) {
7062
- var heads = map(this.sel.ranges, f);
7063
- extendSelections(this, clipPosArray(this, heads), options);
7064
  }),
7065
  setSelections: docMethodOp(function(ranges, primary, options) {
7066
  var this$1 = this;
7067
 
7068
  if (!ranges.length) { return }
7069
- var out = [];
7070
  for (var i = 0; i < ranges.length; i++)
7071
  { out[i] = new Range(clipPos(this$1, ranges[i].anchor),
7072
- clipPos(this$1, ranges[i].head)); }
7073
- if (primary == null) { primary = Math.min(ranges.length - 1, this.sel.primIndex); }
7074
- setSelection(this, normalizeSelection(out, primary), options);
7075
  }),
7076
  addSelection: docMethodOp(function(anchor, head, options) {
7077
- var ranges = this.sel.ranges.slice(0);
7078
- ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor)));
7079
- setSelection(this, normalizeSelection(ranges, ranges.length - 1), options);
7080
  }),
7081
 
7082
  getSelection: function(lineSep) {
7083
  var this$1 = this;
7084
 
7085
- var ranges = this.sel.ranges, lines;
7086
  for (var i = 0; i < ranges.length; i++) {
7087
- var sel = getBetween(this$1, ranges[i].from(), ranges[i].to());
7088
- lines = lines ? lines.concat(sel) : sel;
7089
  }
7090
  if (lineSep === false) { return lines }
7091
  else { return lines.join(lineSep || this.lineSeparator()) }
@@ -7093,56 +7069,56 @@ webpackJsonp([2],{
7093
  getSelections: function(lineSep) {
7094
  var this$1 = this;
7095
 
7096
- var parts = [], ranges = this.sel.ranges;
7097
  for (var i = 0; i < ranges.length; i++) {
7098
- var sel = getBetween(this$1, ranges[i].from(), ranges[i].to());
7099
- if (lineSep !== false) { sel = sel.join(lineSep || this$1.lineSeparator()); }
7100
- parts[i] = sel;
7101
  }
7102
  return parts
7103
  },
7104
  replaceSelection: function(code, collapse, origin) {
7105
- var dup = [];
7106
  for (var i = 0; i < this.sel.ranges.length; i++)
7107
- { dup[i] = code; }
7108
- this.replaceSelections(dup, collapse, origin || "+input");
7109
  },
7110
  replaceSelections: docMethodOp(function(code, collapse, origin) {
7111
  var this$1 = this;
7112
 
7113
- var changes = [], sel = this.sel;
7114
  for (var i = 0; i < sel.ranges.length; i++) {
7115
- var range$$1 = sel.ranges[i];
7116
- changes[i] = {from: range$$1.from(), to: range$$1.to(), text: this$1.splitLines(code[i]), origin: origin};
7117
  }
7118
- var newSel = collapse && collapse != "end" && computeReplacedSel(this, changes, collapse);
7119
  for (var i$1 = changes.length - 1; i$1 >= 0; i$1--)
7120
- { makeChange(this$1, changes[i$1]); }
7121
- if (newSel) { setSelectionReplaceHistory(this, newSel); }
7122
- else if (this.cm) { ensureCursorVisible(this.cm); }
7123
  }),
7124
- undo: docMethodOp(function() {makeChangeFromHistory(this, "undo");}),
7125
- redo: docMethodOp(function() {makeChangeFromHistory(this, "redo");}),
7126
- undoSelection: docMethodOp(function() {makeChangeFromHistory(this, "undo", true);}),
7127
- redoSelection: docMethodOp(function() {makeChangeFromHistory(this, "redo", true);}),
7128
 
7129
- setExtending: function(val) {this.extend = val;},
7130
  getExtending: function() {return this.extend},
7131
 
7132
  historySize: function() {
7133
- var hist = this.history, done = 0, undone = 0;
7134
- for (var i = 0; i < hist.done.length; i++) { if (!hist.done[i].ranges) { ++done; } }
7135
- for (var i$1 = 0; i$1 < hist.undone.length; i$1++) { if (!hist.undone[i$1].ranges) { ++undone; } }
7136
  return {undo: done, redo: undone}
7137
  },
7138
- clearHistory: function() {this.history = new History(this.history.maxGeneration);},
7139
 
7140
  markClean: function() {
7141
- this.cleanGeneration = this.changeGeneration(true);
7142
  },
7143
  changeGeneration: function(forceSplit) {
7144
  if (forceSplit)
7145
- { this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null; }
7146
  return this.history.generation
7147
  },
7148
  isClean: function (gen) {
@@ -7154,16 +7130,16 @@ webpackJsonp([2],{
7154
  undone: copyHistoryArray(this.history.undone)}
7155
  },
7156
  setHistory: function(histData) {
7157
- var hist = this.history = new History(this.history.maxGeneration);
7158
- hist.done = copyHistoryArray(histData.done.slice(0), null, true);
7159
- hist.undone = copyHistoryArray(histData.undone.slice(0), null, true);
7160
  },
7161
 
7162
  setGutterMarker: docMethodOp(function(line, gutterID, value) {
7163
  return changeLine(this, line, "gutter", function (line) {
7164
- var markers = line.gutterMarkers || (line.gutterMarkers = {});
7165
- markers[gutterID] = value;
7166
- if (!value && isEmpty(markers)) { line.gutterMarkers = null; }
7167
  return true
7168
  })
7169
  }),
@@ -7174,23 +7150,23 @@ webpackJsonp([2],{
7174
  this.iter(function (line) {
7175
  if (line.gutterMarkers && line.gutterMarkers[gutterID]) {
7176
  changeLine(this$1, line, "gutter", function () {
7177
- line.gutterMarkers[gutterID] = null;
7178
- if (isEmpty(line.gutterMarkers)) { line.gutterMarkers = null; }
7179
  return true
7180
- });
7181
  }
7182
- });
7183
  }),
7184
 
7185
  lineInfo: function(line) {
7186
- var n;
7187
  if (typeof line == "number") {
7188
  if (!isLine(this, line)) { return null }
7189
- n = line;
7190
- line = getLine(this, line);
7191
  if (!line) { return null }
7192
  } else {
7193
- n = lineNo(line);
7194
  if (n == null) { return null }
7195
  }
7196
  return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,
@@ -7202,10 +7178,10 @@ webpackJsonp([2],{
7202
  return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function (line) {
7203
  var prop = where == "text" ? "textClass"
7204
  : where == "background" ? "bgClass"
7205
- : where == "gutter" ? "gutterClass" : "wrapClass";
7206
- if (!line[prop]) { line[prop] = cls; }
7207
  else if (classTest(cls).test(line[prop])) { return false }
7208
- else { line[prop] += " " + cls; }
7209
  return true
7210
  })
7211
  }),
@@ -7213,15 +7189,15 @@ webpackJsonp([2],{
7213
  return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function (line) {
7214
  var prop = where == "text" ? "textClass"
7215
  : where == "background" ? "bgClass"
7216
- : where == "gutter" ? "gutterClass" : "wrapClass";
7217
- var cur = line[prop];
7218
  if (!cur) { return false }
7219
- else if (cls == null) { line[prop] = null; }
7220
  else {
7221
- var found = cur.match(classTest(cls));
7222
  if (!found) { return false }
7223
- var end = found.index + found[0].length;
7224
- line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null;
7225
  }
7226
  return true
7227
  })
@@ -7230,7 +7206,7 @@ webpackJsonp([2],{
7230
  addLineWidget: docMethodOp(function(handle, node, options) {
7231
  return addLineWidget(this, handle, node, options)
7232
  }),
7233
- removeLineWidget: function(widget) { widget.clear(); },
7234
 
7235
  markText: function(from, to, options) {
7236
  return markText(this, clipPos(this, from), clipPos(this, to), options, options && options.type || "range")
@@ -7239,116 +7215,116 @@ webpackJsonp([2],{
7239
  var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),
7240
  insertLeft: options && options.insertLeft,
7241
  clearWhenEmpty: false, shared: options && options.shared,
7242
- handleMouseEvents: options && options.handleMouseEvents};
7243
- pos = clipPos(this, pos);
7244
  return markText(this, pos, pos, realOpts, "bookmark")
7245
  },
7246
  findMarksAt: function(pos) {
7247
- pos = clipPos(this, pos);
7248
- var markers = [], spans = getLine(this, pos.line).markedSpans;
7249
  if (spans) { for (var i = 0; i < spans.length; ++i) {
7250
- var span = spans[i];
7251
  if ((span.from == null || span.from <= pos.ch) &&
7252
  (span.to == null || span.to >= pos.ch))
7253
- { markers.push(span.marker.parent || span.marker); }
7254
  } }
7255
  return markers
7256
  },
7257
  findMarks: function(from, to, filter) {
7258
- from = clipPos(this, from); to = clipPos(this, to);
7259
- var found = [], lineNo$$1 = from.line;
7260
  this.iter(from.line, to.line + 1, function (line) {
7261
- var spans = line.markedSpans;
7262
  if (spans) { for (var i = 0; i < spans.length; i++) {
7263
- var span = spans[i];
7264
- if (!(span.to != null && lineNo$$1 == from.line && from.ch >= span.to ||
7265
- span.from == null && lineNo$$1 != from.line ||
7266
- span.from != null && lineNo$$1 == to.line && span.from >= to.ch) &&
7267
  (!filter || filter(span.marker)))
7268
- { found.push(span.marker.parent || span.marker); }
7269
  } }
7270
- ++lineNo$$1;
7271
- });
7272
  return found
7273
  },
7274
  getAllMarks: function() {
7275
- var markers = [];
7276
  this.iter(function (line) {
7277
- var sps = line.markedSpans;
7278
  if (sps) { for (var i = 0; i < sps.length; ++i)
7279
- { if (sps[i].from != null) { markers.push(sps[i].marker); } } }
7280
- });
7281
  return markers
7282
  },
7283
 
7284
  posFromIndex: function(off) {
7285
- var ch, lineNo$$1 = this.first, sepSize = this.lineSeparator().length;
7286
  this.iter(function (line) {
7287
- var sz = line.text.length + sepSize;
7288
  if (sz > off) { ch = off; return true }
7289
- off -= sz;
7290
- ++lineNo$$1;
7291
- });
7292
- return clipPos(this, Pos(lineNo$$1, ch))
7293
  },
7294
  indexFromPos: function (coords) {
7295
- coords = clipPos(this, coords);
7296
- var index = coords.ch;
7297
  if (coords.line < this.first || coords.ch < 0) { return 0 }
7298
- var sepSize = this.lineSeparator().length;
7299
  this.iter(this.first, coords.line, function (line) { // iter aborts when callback returns a truthy value
7300
- index += line.text.length + sepSize;
7301
- });
7302
  return index
7303
  },
7304
 
7305
  copy: function(copyHistory) {
7306
  var doc = new Doc(getLines(this, this.first, this.first + this.size),
7307
- this.modeOption, this.first, this.lineSep, this.direction);
7308
- doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;
7309
- doc.sel = this.sel;
7310
- doc.extend = false;
7311
  if (copyHistory) {
7312
- doc.history.undoDepth = this.history.undoDepth;
7313
- doc.setHistory(this.getHistory());
7314
  }
7315
  return doc
7316
  },
7317
 
7318
  linkedDoc: function(options) {
7319
- if (!options) { options = {}; }
7320
- var from = this.first, to = this.first + this.size;
7321
- if (options.from != null && options.from > from) { from = options.from; }
7322
- if (options.to != null && options.to < to) { to = options.to; }
7323
- var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep, this.direction);
7324
  if (options.sharedHist) { copy.history = this.history
7325
- ; }(this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});
7326
- copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];
7327
- copySharedMarkers(copy, findSharedMarkers(this));
7328
  return copy
7329
  },
7330
  unlinkDoc: function(other) {
7331
  var this$1 = this;
7332
 
7333
- if (other instanceof CodeMirror$1) { other = other.doc; }
7334
  if (this.linked) { for (var i = 0; i < this.linked.length; ++i) {
7335
- var link = this$1.linked[i];
7336
  if (link.doc != other) { continue }
7337
- this$1.linked.splice(i, 1);
7338
- other.unlinkDoc(this$1);
7339
- detachSharedMarkers(findSharedMarkers(this$1));
7340
  break
7341
  } }
7342
  // If the histories were shared, split them again
7343
  if (other.history == this.history) {
7344
- var splitIds = [other.id];
7345
- linkedDocs(other, function (doc) { return splitIds.push(doc.id); }, true);
7346
- other.history = new History(null);
7347
- other.history.done = copyHistoryArray(this.history.done, splitIds);
7348
- other.history.undone = copyHistoryArray(this.history.undone, splitIds);
7349
  }
7350
  },
7351
- iterLinkedDocs: function(f) {linkedDocs(this, f);},
7352
 
7353
  getMode: function() {return this.mode},
7354
  getEditor: function() {return this.cm},
@@ -7357,78 +7333,70 @@ webpackJsonp([2],{
7357
  if (this.lineSep) { return str.split(this.lineSep) }
7358
  return splitLinesAuto(str)
7359
  },
7360
- lineSeparator: function() { return this.lineSep || "\n" },
7361
-
7362
- setDirection: docMethodOp(function (dir) {
7363
- if (dir != "rtl") { dir = "ltr"; }
7364
- if (dir == this.direction) { return }
7365
- this.direction = dir;
7366
- this.iter(function (line) { return line.order = null; });
7367
- if (this.cm) { directionChanged(this.cm); }
7368
- })
7369
- });
7370
 
7371
  // Public alias.
7372
- Doc.prototype.eachLine = Doc.prototype.iter;
7373
 
7374
  // Kludge to work around strange IE behavior where it'll sometimes
7375
  // re-fire a series of drag-related events right after the drop (#1551)
7376
- var lastDrop = 0;
7377
 
7378
  function onDrop(e) {
7379
- var cm = this;
7380
- clearDragCursor(cm);
7381
  if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e))
7382
  { return }
7383
- e_preventDefault(e);
7384
- if (ie) { lastDrop = +new Date; }
7385
- var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files;
7386
  if (!pos || cm.isReadOnly()) { return }
7387
  // Might be a file drop, in which case we simply extract the text
7388
  // and insert it.
7389
  if (files && files.length && window.FileReader && window.File) {
7390
- var n = files.length, text = Array(n), read = 0;
7391
  var loadFile = function (file, i) {
7392
  if (cm.options.allowDropFileTypes &&
7393
  indexOf(cm.options.allowDropFileTypes, file.type) == -1)
7394
  { return }
7395
 
7396
- var reader = new FileReader;
7397
  reader.onload = operation(cm, function () {
7398
- var content = reader.result;
7399
- if (/[\x00-\x08\x0e-\x1f]{2}/.test(content)) { content = ""; }
7400
- text[i] = content;
7401
  if (++read == n) {
7402
- pos = clipPos(cm.doc, pos);
7403
  var change = {from: pos, to: pos,
7404
  text: cm.doc.splitLines(text.join(cm.doc.lineSeparator())),
7405
- origin: "paste"};
7406
- makeChange(cm.doc, change);
7407
- setSelectionReplaceHistory(cm.doc, simpleSelection(pos, changeEnd(change)));
7408
  }
7409
- });
7410
- reader.readAsText(file);
7411
- };
7412
- for (var i = 0; i < n; ++i) { loadFile(files[i], i); }
7413
  } else { // Normal drop
7414
  // Don't do a replace if the drop happened inside of the selected text.
7415
  if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {
7416
- cm.state.draggingText(e);
7417
  // Ensure the editor is re-focused
7418
- setTimeout(function () { return cm.display.input.focus(); }, 20);
7419
  return
7420
  }
7421
  try {
7422
- var text$1 = e.dataTransfer.getData("Text");
7423
  if (text$1) {
7424
- var selected;
7425
  if (cm.state.draggingText && !cm.state.draggingText.copy)
7426
- { selected = cm.listSelections(); }
7427
- setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));
7428
  if (selected) { for (var i$1 = 0; i$1 < selected.length; ++i$1)
7429
- { replaceRange(cm.doc, "", selected[i$1].anchor, selected[i$1].head, "drag"); } }
7430
- cm.replaceSelection(text$1, "around", "paste");
7431
- cm.display.input.focus();
7432
  }
7433
  }
7434
  catch(e){}
@@ -7439,41 +7407,41 @@ webpackJsonp([2],{
7439
  if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return }
7440
  if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) { return }
7441
 
7442
- e.dataTransfer.setData("Text", cm.getSelection());
7443
- e.dataTransfer.effectAllowed = "copyMove";
7444
 
7445
  // Use dummy image instead of default browsers image.
7446
  // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.
7447
  if (e.dataTransfer.setDragImage && !safari) {
7448
- var img = elt("img", null, null, "position: fixed; left: 0; top: 0;");
7449
- img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
7450
  if (presto) {
7451
- img.width = img.height = 1;
7452
- cm.display.wrapper.appendChild(img);
7453
  // Force a relayout, or Opera won't use our image for some obscure reason
7454
- img._top = img.offsetTop;
7455
  }
7456
- e.dataTransfer.setDragImage(img, 0, 0);
7457
- if (presto) { img.parentNode.removeChild(img); }
7458
  }
7459
  }
7460
 
7461
  function onDragOver(cm, e) {
7462
- var pos = posFromMouse(cm, e);
7463
  if (!pos) { return }
7464
- var frag = document.createDocumentFragment();
7465
- drawSelectionCursor(cm, pos, frag);
7466
  if (!cm.display.dragCursor) {
7467
- cm.display.dragCursor = elt("div", null, "CodeMirror-cursors CodeMirror-dragcursors");
7468
- cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv);
7469
  }
7470
- removeChildrenAndAdd(cm.display.dragCursor, frag);
7471
  }
7472
 
7473
  function clearDragCursor(cm) {
7474
  if (cm.display.dragCursor) {
7475
- cm.display.lineSpace.removeChild(cm.display.dragCursor);
7476
- cm.display.dragCursor = null;
7477
  }
7478
  }
7479
 
@@ -7483,40 +7451,40 @@ webpackJsonp([2],{
7483
 
7484
  function forEachCodeMirror(f) {
7485
  if (!document.body.getElementsByClassName) { return }
7486
- var byClass = document.body.getElementsByClassName("CodeMirror");
7487
  for (var i = 0; i < byClass.length; i++) {
7488
- var cm = byClass[i].CodeMirror;
7489
- if (cm) { f(cm); }
7490
  }
7491
  }
7492
 
7493
- var globalsRegistered = false;
7494
  function ensureGlobalHandlers() {
7495
  if (globalsRegistered) { return }
7496
- registerGlobalHandlers();
7497
- globalsRegistered = true;
7498
  }
7499
  function registerGlobalHandlers() {
7500
  // When the window resizes, we need to refresh active editors.
7501
- var resizeTimer;
7502
  on(window, "resize", function () {
7503
  if (resizeTimer == null) { resizeTimer = setTimeout(function () {
7504
- resizeTimer = null;
7505
- forEachCodeMirror(onResize);
7506
- }, 100); }
7507
- });
7508
  // When the window loses focus, we want to show the editor as blurred
7509
- on(window, "blur", function () { return forEachCodeMirror(onBlur); });
7510
  }
7511
  // Called when the window resizes
7512
  function onResize(cm) {
7513
- var d = cm.display;
7514
  if (d.lastWrapHeight == d.wrapper.clientHeight && d.lastWrapWidth == d.wrapper.clientWidth)
7515
  { return }
7516
  // Might be a text scaling operation, clear size caches.
7517
- d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;
7518
- d.scrollbarsClipped = false;
7519
- cm.setSize();
7520
  }
7521
 
7522
  var keyNames = {
@@ -7528,16 +7496,16 @@ webpackJsonp([2],{
7528
  173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\",
7529
  221: "]", 222: "'", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete",
7530
  63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert"
7531
- };
7532
 
7533
  // Number keys
7534
- for (var i = 0; i < 10; i++) { keyNames[i + 48] = keyNames[i + 96] = String(i); }
7535
  // Alphabetic keys
7536
- for (var i$1 = 65; i$1 <= 90; i$1++) { keyNames[i$1] = String.fromCharCode(i$1); }
7537
  // Function keys
7538
- for (var i$2 = 1; i$2 <= 12; i$2++) { keyNames[i$2 + 111] = keyNames[i$2 + 63235] = "F" + i$2; }
7539
 
7540
- var keyMap = {};
7541
 
7542
  keyMap.basic = {
7543
  "Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown",
@@ -7546,7 +7514,7 @@ webpackJsonp([2],{
7546
  "Tab": "defaultTab", "Shift-Tab": "indentAuto",
7547
  "Enter": "newlineAndIndent", "Insert": "toggleOverwrite",
7548
  "Esc": "singleSelection"
7549
- };
7550
  // Note that the save and find-related commands aren't defined by
7551
  // default. User code or addons can define them. Unknown commands
7552
  // are simply ignored.
@@ -7559,7 +7527,7 @@ webpackJsonp([2],{
7559
  "Ctrl-[": "indentLess", "Ctrl-]": "indentMore",
7560
  "Ctrl-U": "undoSelection", "Shift-Ctrl-U": "redoSelection", "Alt-U": "redoSelection",
7561
  fallthrough: "basic"
7562
- };
7563
  // Very basic readline/emacs-style bindings, which are standard on Mac.
7564
  keyMap.emacsy = {
7565
  "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown",
@@ -7567,7 +7535,7 @@ webpackJsonp([2],{
7567
  "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore",
7568
  "Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars",
7569
  "Ctrl-O": "openLine"
7570
- };
7571
  keyMap.macDefault = {
7572
  "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo",
7573
  "Cmd-Home": "goDocStart", "Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goGroupLeft",
@@ -7577,27 +7545,27 @@ webpackJsonp([2],{
7577
  "Cmd-[": "indentLess", "Cmd-]": "indentMore", "Cmd-Backspace": "delWrappedLineLeft", "Cmd-Delete": "delWrappedLineRight",
7578
  "Cmd-U": "undoSelection", "Shift-Cmd-U": "redoSelection", "Ctrl-Up": "goDocStart", "Ctrl-Down": "goDocEnd",
7579
  fallthrough: ["basic", "emacsy"]
7580
- };
7581
- keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault;
7582
 
7583
  // KEYMAP DISPATCH
7584
 
7585
  function normalizeKeyName(name) {
7586
- var parts = name.split(/-(?!$)/);
7587
- name = parts[parts.length - 1];
7588
- var alt, ctrl, shift, cmd;
7589
  for (var i = 0; i < parts.length - 1; i++) {
7590
- var mod = parts[i];
7591
- if (/^(cmd|meta|m)$/i.test(mod)) { cmd = true; }
7592
- else if (/^a(lt)?$/i.test(mod)) { alt = true; }
7593
- else if (/^(c|ctrl|control)$/i.test(mod)) { ctrl = true; }
7594
- else if (/^s(hift)?$/i.test(mod)) { shift = true; }
7595
  else { throw new Error("Unrecognized modifier name: " + mod) }
7596
  }
7597
- if (alt) { name = "Alt-" + name; }
7598
- if (ctrl) { name = "Ctrl-" + name; }
7599
- if (cmd) { name = "Cmd-" + name; }
7600
- if (shift) { name = "Shift-" + name; }
7601
  return name
7602
  }
7603
 
@@ -7607,44 +7575,44 @@ webpackJsonp([2],{
7607
  // new normalized keymap, and then updates the old object to reflect
7608
  // this.
7609
  function normalizeKeyMap(keymap) {
7610
- var copy = {};
7611
  for (var keyname in keymap) { if (keymap.hasOwnProperty(keyname)) {
7612
- var value = keymap[keyname];
7613
  if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) { continue }
7614
  if (value == "...") { delete keymap[keyname]; continue }
7615
 
7616
- var keys = map(keyname.split(" "), normalizeKeyName);
7617
  for (var i = 0; i < keys.length; i++) {
7618
- var val = (void 0), name = (void 0);
7619
  if (i == keys.length - 1) {
7620
- name = keys.join(" ");
7621
- val = value;
7622
  } else {
7623
- name = keys.slice(0, i + 1).join(" ");
7624
- val = "...";
7625
  }
7626
- var prev = copy[name];
7627
- if (!prev) { copy[name] = val; }
7628
  else if (prev != val) { throw new Error("Inconsistent bindings for " + name) }
7629
  }
7630
- delete keymap[keyname];
7631
  } }
7632
- for (var prop in copy) { keymap[prop] = copy[prop]; }
7633
  return keymap
7634
  }
7635
 
7636
- function lookupKey(key, map$$1, handle, context) {
7637
- map$$1 = getKeyMap(map$$1);
7638
- var found = map$$1.call ? map$$1.call(key, context) : map$$1[key];
7639
  if (found === false) { return "nothing" }
7640
  if (found === "...") { return "multi" }
7641
  if (found != null && handle(found)) { return "handled" }
7642
 
7643
- if (map$$1.fallthrough) {
7644
- if (Object.prototype.toString.call(map$$1.fallthrough) != "[object Array]")
7645
- { return lookupKey(key, map$$1.fallthrough, handle, context) }
7646
- for (var i = 0; i < map$$1.fallthrough.length; i++) {
7647
- var result = lookupKey(key, map$$1.fallthrough[i], handle, context);
7648
  if (result) { return result }
7649
  }
7650
  }
@@ -7653,19 +7621,19 @@ webpackJsonp([2],{
7653
  // Modifier key presses don't count as 'real' key presses for the
7654
  // purpose of keymap fallthrough.
7655
  function isModifierKey(value) {
7656
- var name = typeof value == "string" ? value : keyNames[value.keyCode];
7657
  return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod"
7658
  }
7659
 
7660
  // Look up the name of a key as indicated by an event object.
7661
  function keyName(event, noShift) {
7662
  if (presto && event.keyCode == 34 && event["char"]) { return false }
7663
- var base = keyNames[event.keyCode], name = base;
7664
  if (name == null || event.altGraphKey) { return false }
7665
- if (event.altKey && base != "Alt") { name = "Alt-" + name; }
7666
- if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") { name = "Ctrl-" + name; }
7667
- if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "Cmd") { name = "Cmd-" + name; }
7668
- if (!noShift && event.shiftKey && base != "Shift") { name = "Shift-" + name; }
7669
  return name
7670
  }
7671
 
@@ -7676,26 +7644,26 @@ webpackJsonp([2],{
7676
  // Helper for deleting text near the selection(s), used to implement
7677
  // backspace, delete, and similar functionality.
7678
  function deleteNearSelection(cm, compute) {
7679
- var ranges = cm.doc.sel.ranges, kill = [];
7680
  // Build up a set of ranges to kill first, merging overlapping
7681
  // ranges.
7682
  for (var i = 0; i < ranges.length; i++) {
7683
- var toKill = compute(ranges[i]);
7684
  while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) {
7685
- var replaced = kill.pop();
7686
  if (cmp(replaced.from, toKill.from) < 0) {
7687
- toKill.from = replaced.from;
7688
  break
7689
  }
7690
  }
7691
- kill.push(toKill);
7692
  }
7693
  // Next, remove those actual ranges.
7694
  runInOp(cm, function () {
7695
  for (var i = kill.length - 1; i >= 0; i--)
7696
- { replaceRange(cm.doc, "", kill[i].from, kill[i].to, "+delete"); }
7697
- ensureCursorVisible(cm);
7698
- });
7699
  }
7700
 
7701
  // Commands are parameter-less actions that can be performed on an
@@ -7705,7 +7673,7 @@ webpackJsonp([2],{
7705
  singleSelection: function (cm) { return cm.setSelection(cm.getCursor("anchor"), cm.getCursor("head"), sel_dontScroll); },
7706
  killLine: function (cm) { return deleteNearSelection(cm, function (range) {
7707
  if (range.empty()) {
7708
- var len = getLine(cm.doc, range.head.line).text.length;
7709
  if (range.head.ch == len && range.head.line < cm.lastLine())
7710
  { return {from: range.head, to: Pos(range.head.line + 1, 0)} }
7711
  else
@@ -7722,13 +7690,13 @@ webpackJsonp([2],{
7722
  from: Pos(range.from().line, 0), to: range.from()
7723
  }); }); },
7724
  delWrappedLineLeft: function (cm) { return deleteNearSelection(cm, function (range) {
7725
- var top = cm.charCoords(range.head, "div").top + 5;
7726
- var leftPos = cm.coordsChar({left: 0, top: top}, "div");
7727
  return {from: leftPos, to: range.from()}
7728
  }); },
7729
  delWrappedLineRight: function (cm) { return deleteNearSelection(cm, function (range) {
7730
- var top = cm.charCoords(range.head, "div").top + 5;
7731
- var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div");
7732
  return {from: range.from(), to: rightPos }
7733
  }); },
7734
  undo: function (cm) { return cm.undo(); },
@@ -7747,16 +7715,16 @@ webpackJsonp([2],{
7747
  {origin: "+move", bias: -1}
7748
  ); },
7749
  goLineRight: function (cm) { return cm.extendSelectionsBy(function (range) {
7750
- var top = cm.charCoords(range.head, "div").top + 5;
7751
  return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div")
7752
  }, sel_move); },
7753
  goLineLeft: function (cm) { return cm.extendSelectionsBy(function (range) {
7754
- var top = cm.charCoords(range.head, "div").top + 5;
7755
  return cm.coordsChar({left: 0, top: top}, "div")
7756
  }, sel_move); },
7757
  goLineLeftSmart: function (cm) { return cm.extendSelectionsBy(function (range) {
7758
- var top = cm.charCoords(range.head, "div").top + 5;
7759
- var pos = cm.coordsChar({left: 0, top: top}, "div");
7760
  if (pos.ch < cm.getLine(pos.line).search(/\S/)) { return lineStartSmart(cm, range.head) }
7761
  return pos
7762
  }, sel_move); },
@@ -7783,17 +7751,17 @@ webpackJsonp([2],{
7783
  indentLess: function (cm) { return cm.indentSelection("subtract"); },
7784
  insertTab: function (cm) { return cm.replaceSelection("\t"); },
7785
  insertSoftTab: function (cm) {
7786
- var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize;
7787
  for (var i = 0; i < ranges.length; i++) {
7788
- var pos = ranges[i].from();
7789
- var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize);
7790
- spaces.push(spaceStr(tabSize - col % tabSize));
7791
  }
7792
- cm.replaceSelections(spaces);
7793
  },
7794
  defaultTab: function (cm) {
7795
- if (cm.somethingSelected()) { cm.indentSelection("add"); }
7796
- else { cm.execCommand("insertTab"); }
7797
  },
7798
  // Swap the two chars left and right of each selection's head.
7799
  // Move cursor behind the two swapped characters afterwards.
@@ -7803,63 +7771,63 @@ webpackJsonp([2],{
7803
  // Doesn't do anything on an empty line.
7804
  // Doesn't do anything with non-empty selections.
7805
  transposeChars: function (cm) { return runInOp(cm, function () {
7806
- var ranges = cm.listSelections(), newSel = [];
7807
  for (var i = 0; i < ranges.length; i++) {
7808
  if (!ranges[i].empty()) { continue }
7809
- var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text;
7810
  if (line) {
7811
- if (cur.ch == line.length) { cur = new Pos(cur.line, cur.ch - 1); }
7812
  if (cur.ch > 0) {
7813
- cur = new Pos(cur.line, cur.ch + 1);
7814
  cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2),
7815
- Pos(cur.line, cur.ch - 2), cur, "+transpose");
7816
  } else if (cur.line > cm.doc.first) {
7817
- var prev = getLine(cm.doc, cur.line - 1).text;
7818
  if (prev) {
7819
- cur = new Pos(cur.line, 1);
7820
  cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() +
7821
  prev.charAt(prev.length - 1),
7822
- Pos(cur.line - 1, prev.length - 1), cur, "+transpose");
7823
  }
7824
  }
7825
  }
7826
- newSel.push(new Range(cur, cur));
7827
  }
7828
- cm.setSelections(newSel);
7829
  }); },
7830
  newlineAndIndent: function (cm) { return runInOp(cm, function () {
7831
- var sels = cm.listSelections();
7832
  for (var i = sels.length - 1; i >= 0; i--)
7833
- { cm.replaceRange(cm.doc.lineSeparator(), sels[i].anchor, sels[i].head, "+input"); }
7834
- sels = cm.listSelections();
7835
  for (var i$1 = 0; i$1 < sels.length; i$1++)
7836
- { cm.indentLine(sels[i$1].from().line, null, true); }
7837
- ensureCursorVisible(cm);
7838
  }); },
7839
  openLine: function (cm) { return cm.replaceSelection("\n", "start"); },
7840
  toggleOverwrite: function (cm) { return cm.toggleOverwrite(); }
7841
- };
7842
 
7843
 
7844
  function lineStart(cm, lineN) {
7845
- var line = getLine(cm.doc, lineN);
7846
- var visual = visualLine(line);
7847
- if (visual != line) { lineN = lineNo(visual); }
7848
  return endOfLine(true, cm, visual, lineN, 1)
7849
  }
7850
  function lineEnd(cm, lineN) {
7851
- var line = getLine(cm.doc, lineN);
7852
- var visual = visualLineEnd(line);
7853
- if (visual != line) { lineN = lineNo(visual); }
7854
  return endOfLine(true, cm, line, lineN, -1)
7855
  }
7856
  function lineStartSmart(cm, pos) {
7857
- var start = lineStart(cm, pos.line);
7858
- var line = getLine(cm.doc, start.line);
7859
- var order = getOrder(line, cm.doc.direction);
7860
  if (!order || order[0].level == 0) {
7861
- var firstNonWS = Math.max(0, line.text.search(/\S/));
7862
- var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch;
7863
  return Pos(start.line, inWS ? 0 : firstNonWS, start.sticky)
7864
  }
7865
  return start
@@ -7868,60 +7836,60 @@ webpackJsonp([2],{
7868
  // Run a handler that was bound to a key.
7869
  function doHandleBinding(cm, bound, dropShift) {
7870
  if (typeof bound == "string") {
7871
- bound = commands[bound];
7872
  if (!bound) { return false }
7873
  }
7874
  // Ensure previous input has been read, so that the handler sees a
7875
  // consistent view of the document
7876
- cm.display.input.ensurePolled();
7877
- var prevShift = cm.display.shift, done = false;
7878
  try {
7879
- if (cm.isReadOnly()) { cm.state.suppressEdits = true; }
7880
- if (dropShift) { cm.display.shift = false; }
7881
- done = bound(cm) != Pass;
7882
  } finally {
7883
- cm.display.shift = prevShift;
7884
- cm.state.suppressEdits = false;
7885
  }
7886
  return done
7887
  }
7888
 
7889
  function lookupKeyForEditor(cm, name, handle) {
7890
  for (var i = 0; i < cm.state.keyMaps.length; i++) {
7891
- var result = lookupKey(name, cm.state.keyMaps[i], handle, cm);
7892
  if (result) { return result }
7893
  }
7894
  return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm))
7895
  || lookupKey(name, cm.options.keyMap, handle, cm)
7896
  }
7897
 
7898
- var stopSeq = new Delayed;
7899
  function dispatchKey(cm, name, e, handle) {
7900
- var seq = cm.state.keySeq;
7901
  if (seq) {
7902
  if (isModifierKey(name)) { return "handled" }
7903
  stopSeq.set(50, function () {
7904
  if (cm.state.keySeq == seq) {
7905
- cm.state.keySeq = null;
7906
- cm.display.input.reset();
7907
  }
7908
- });
7909
- name = seq + " " + name;
7910
  }
7911
- var result = lookupKeyForEditor(cm, name, handle);
7912
 
7913
  if (result == "multi")
7914
- { cm.state.keySeq = name; }
7915
  if (result == "handled")
7916
- { signalLater(cm, "keyHandled", cm, name, e); }
7917
 
7918
  if (result == "handled" || result == "multi") {
7919
- e_preventDefault(e);
7920
- restartBlink(cm);
7921
  }
7922
 
7923
  if (seq && !result && /\'$/.test(name)) {
7924
- e_preventDefault(e);
7925
  return true
7926
  }
7927
  return !!result
@@ -7929,7 +7897,7 @@ webpackJsonp([2],{
7929
 
7930
  // Handle a key from the keydown event.
7931
  function handleKeyBinding(cm, e) {
7932
- var name = keyName(e, true);
7933
  if (!name) { return false }
7934
 
7935
  if (e.shiftKey && !cm.state.keySeq) {
@@ -7951,59 +7919,59 @@ webpackJsonp([2],{
7951
  return dispatchKey(cm, "'" + ch + "'", e, function (b) { return doHandleBinding(cm, b, true); })
7952
  }
7953
 
7954
- var lastStoppedKey = null;
7955
  function onKeyDown(e) {
7956
- var cm = this;
7957
- cm.curOp.focus = activeElt();
7958
  if (signalDOMEvent(cm, e)) { return }
7959
  // IE does strange things with escape.
7960
- if (ie && ie_version < 11 && e.keyCode == 27) { e.returnValue = false; }
7961
- var code = e.keyCode;
7962
- cm.display.shift = code == 16 || e.shiftKey;
7963
- var handled = handleKeyBinding(cm, e);
7964
  if (presto) {
7965
- lastStoppedKey = handled ? code : null;
7966
  // Opera has no cut event... we try to at least catch the key combo
7967
  if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))
7968
- { cm.replaceSelection("", null, "cut"); }
7969
  }
7970
 
7971
  // Turn mouse into crosshair when Alt is held on Mac.
7972
  if (code == 18 && !/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className))
7973
- { showCrossHair(cm); }
7974
  }
7975
 
7976
  function showCrossHair(cm) {
7977
- var lineDiv = cm.display.lineDiv;
7978
- addClass(lineDiv, "CodeMirror-crosshair");
7979
 
7980
  function up(e) {
7981
  if (e.keyCode == 18 || !e.altKey) {
7982
- rmClass(lineDiv, "CodeMirror-crosshair");
7983
- off(document, "keyup", up);
7984
- off(document, "mouseover", up);
7985
  }
7986
  }
7987
- on(document, "keyup", up);
7988
- on(document, "mouseover", up);
7989
  }
7990
 
7991
  function onKeyUp(e) {
7992
- if (e.keyCode == 16) { this.doc.sel.shift = false; }
7993
- signalDOMEvent(this, e);
7994
  }
7995
 
7996
  function onKeyPress(e) {
7997
- var cm = this;
7998
  if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) { return }
7999
- var keyCode = e.keyCode, charCode = e.charCode;
8000
  if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return}
8001
  if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) { return }
8002
- var ch = String.fromCharCode(charCode == null ? keyCode : charCode);
8003
  // Some browsers fire keypress events for backspace
8004
  if (ch == "\x08") { return }
8005
  if (handleCharBinding(cm, e, ch)) { return }
8006
- cm.display.input.onKeyPress(e);
8007
  }
8008
 
8009
  // A mouse down can be a single click, double click, triple click,
@@ -8012,43 +7980,43 @@ webpackJsonp([2],{
8012
  // middle-click-paste. Or it might be a click on something we should
8013
  // not interfere with, such as a scrollbar or widget.
8014
  function onMouseDown(e) {
8015
- var cm = this, display = cm.display;
8016
  if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) { return }
8017
- display.input.ensurePolled();
8018
- display.shift = e.shiftKey;
8019
 
8020
  if (eventInWidget(display, e)) {
8021
  if (!webkit) {
8022
  // Briefly turn off draggability, to allow widgets to do
8023
  // normal dragging things.
8024
- display.scroller.draggable = false;
8025
- setTimeout(function () { return display.scroller.draggable = true; }, 100);
8026
  }
8027
  return
8028
  }
8029
  if (clickInGutter(cm, e)) { return }
8030
- var start = posFromMouse(cm, e);
8031
- window.focus();
8032
 
8033
  switch (e_button(e)) {
8034
  case 1:
8035
  // #3261: make sure, that we're not starting a second selection
8036
  if (cm.state.selectingText)
8037
- { cm.state.selectingText(e); }
8038
  else if (start)
8039
- { leftButtonDown(cm, e, start); }
8040
  else if (e_target(e) == display.scroller)
8041
- { e_preventDefault(e); }
8042
  break
8043
  case 2:
8044
- if (webkit) { cm.state.lastMiddleDown = +new Date; }
8045
- if (start) { extendSelection(cm.doc, start); }
8046
- setTimeout(function () { return display.input.focus(); }, 20);
8047
- e_preventDefault(e);
8048
  break
8049
  case 3:
8050
- if (captureRightClick) { onContextMenu(cm, e); }
8051
- else { delayBlurEvent(cm); }
8052
  break
8053
  }
8054
  }
@@ -8056,228 +8024,228 @@ webpackJsonp([2],{
8056
  var lastClick;
8057
  var lastDoubleClick;
8058
  function leftButtonDown(cm, e, start) {
8059
- if (ie) { setTimeout(bind(ensureFocus, cm), 0); }
8060
- else { cm.curOp.focus = activeElt(); }
8061
 
8062
- var now = +new Date, type;
8063
  if (lastDoubleClick && lastDoubleClick.time > now - 400 && cmp(lastDoubleClick.pos, start) == 0) {
8064
- type = "triple";
8065
  } else if (lastClick && lastClick.time > now - 400 && cmp(lastClick.pos, start) == 0) {
8066
- type = "double";
8067
- lastDoubleClick = {time: now, pos: start};
8068
  } else {
8069
- type = "single";
8070
- lastClick = {time: now, pos: start};
8071
  }
8072
 
8073
- var sel = cm.doc.sel, modifier = mac ? e.metaKey : e.ctrlKey, contained;
8074
  if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() &&
8075
  type == "single" && (contained = sel.contains(start)) > -1 &&
8076
  (cmp((contained = sel.ranges[contained]).from(), start) < 0 || start.xRel > 0) &&
8077
  (cmp(contained.to(), start) > 0 || start.xRel < 0))
8078
- { leftButtonStartDrag(cm, e, start, modifier); }
8079
  else
8080
- { leftButtonSelect(cm, e, start, type, modifier); }
8081
  }
8082
 
8083
  // Start a text drag. When it ends, see if any dragging actually
8084
  // happen, and treat as a click if it didn't.
8085
  function leftButtonStartDrag(cm, e, start, modifier) {
8086
- var display = cm.display, startTime = +new Date;
8087
  var dragEnd = operation(cm, function (e2) {
8088
- if (webkit) { display.scroller.draggable = false; }
8089
- cm.state.draggingText = false;
8090
- off(document, "mouseup", dragEnd);
8091
- off(display.scroller, "drop", dragEnd);
8092
  if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) {
8093
- e_preventDefault(e2);
8094
  if (!modifier && +new Date - 200 < startTime)
8095
- { extendSelection(cm.doc, start); }
8096
  // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)
8097
  if (webkit || ie && ie_version == 9)
8098
- { setTimeout(function () {document.body.focus(); display.input.focus();}, 20); }
8099
  else
8100
- { display.input.focus(); }
8101
  }
8102
- });
8103
  // Let the drag handler handle this.
8104
- if (webkit) { display.scroller.draggable = true; }
8105
- cm.state.draggingText = dragEnd;
8106
- dragEnd.copy = mac ? e.altKey : e.ctrlKey;
8107
  // IE's approach to draggable
8108
- if (display.scroller.dragDrop) { display.scroller.dragDrop(); }
8109
- on(document, "mouseup", dragEnd);
8110
- on(display.scroller, "drop", dragEnd);
8111
  }
8112
 
8113
  // Normal selection, as opposed to text dragging.
8114
  function leftButtonSelect(cm, e, start, type, addNew) {
8115
- var display = cm.display, doc = cm.doc;
8116
- e_preventDefault(e);
8117
 
8118
- var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;
8119
  if (addNew && !e.shiftKey) {
8120
- ourIndex = doc.sel.contains(start);
8121
  if (ourIndex > -1)
8122
- { ourRange = ranges[ourIndex]; }
8123
  else
8124
- { ourRange = new Range(start, start); }
8125
  } else {
8126
- ourRange = doc.sel.primary();
8127
- ourIndex = doc.sel.primIndex;
8128
  }
8129
 
8130
  if (chromeOS ? e.shiftKey && e.metaKey : e.altKey) {
8131
- type = "rect";
8132
- if (!addNew) { ourRange = new Range(start, start); }
8133
- start = posFromMouse(cm, e, true, true);
8134
- ourIndex = -1;
8135
  } else if (type == "double") {
8136
- var word = cm.findWordAt(start);
8137
  if (cm.display.shift || doc.extend)
8138
- { ourRange = extendRange(doc, ourRange, word.anchor, word.head); }
8139
  else
8140
- { ourRange = word; }
8141
  } else if (type == "triple") {
8142
- var line = new Range(Pos(start.line, 0), clipPos(doc, Pos(start.line + 1, 0)));
8143
  if (cm.display.shift || doc.extend)
8144
- { ourRange = extendRange(doc, ourRange, line.anchor, line.head); }
8145
  else
8146
- { ourRange = line; }
8147
  } else {
8148
- ourRange = extendRange(doc, ourRange, start);
8149
  }
8150
 
8151
  if (!addNew) {
8152
- ourIndex = 0;
8153
- setSelection(doc, new Selection([ourRange], 0), sel_mouse);
8154
- startSel = doc.sel;
8155
  } else if (ourIndex == -1) {
8156
- ourIndex = ranges.length;
8157
  setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex),
8158
- {scroll: false, origin: "*mouse"});
8159
  } else if (ranges.length > 1 && ranges[ourIndex].empty() && type == "single" && !e.shiftKey) {
8160
  setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),
8161
- {scroll: false, origin: "*mouse"});
8162
- startSel = doc.sel;
8163
  } else {
8164
- replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);
8165
  }
8166
 
8167
- var lastPos = start;
8168
  function extendTo(pos) {
8169
  if (cmp(lastPos, pos) == 0) { return }
8170
- lastPos = pos;
8171
 
8172
  if (type == "rect") {
8173
- var ranges = [], tabSize = cm.options.tabSize;
8174
- var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);
8175
- var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);
8176
- var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);
8177
  for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));
8178
  line <= end; line++) {
8179
- var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);
8180
  if (left == right)
8181
- { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); }
8182
  else if (text.length > leftPos)
8183
- { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); }
8184
  }
8185
- if (!ranges.length) { ranges.push(new Range(start, start)); }
8186
  setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),
8187
- {origin: "*mouse", scroll: false});
8188
- cm.scrollIntoView(pos);
8189
  } else {
8190
- var oldRange = ourRange;
8191
- var anchor = oldRange.anchor, head = pos;
8192
  if (type != "single") {
8193
- var range$$1;
8194
  if (type == "double")
8195
- { range$$1 = cm.findWordAt(pos); }
8196
  else
8197
- { range$$1 = new Range(Pos(pos.line, 0), clipPos(doc, Pos(pos.line + 1, 0))); }
8198
- if (cmp(range$$1.anchor, anchor) > 0) {
8199
- head = range$$1.head;
8200
- anchor = minPos(oldRange.from(), range$$1.anchor);
8201
  } else {
8202
- head = range$$1.anchor;
8203
- anchor = maxPos(oldRange.to(), range$$1.head);
8204
  }
8205
  }
8206
- var ranges$1 = startSel.ranges.slice(0);
8207
- ranges$1[ourIndex] = new Range(clipPos(doc, anchor), head);
8208
- setSelection(doc, normalizeSelection(ranges$1, ourIndex), sel_mouse);
8209
  }
8210
  }
8211
 
8212
- var editorSize = display.wrapper.getBoundingClientRect();
8213
  // Used to ensure timeout re-tries don't fire when another extend
8214
  // happened in the meantime (clearTimeout isn't reliable -- at
8215
  // least on Chrome, the timeouts still happen even when cleared,
8216
  // if the clear happens after their scheduled firing time).
8217
- var counter = 0;
8218
 
8219
  function extend(e) {
8220
- var curCount = ++counter;
8221
- var cur = posFromMouse(cm, e, true, type == "rect");
8222
  if (!cur) { return }
8223
  if (cmp(cur, lastPos) != 0) {
8224
- cm.curOp.focus = activeElt();
8225
- extendTo(cur);
8226
- var visible = visibleLines(display, doc);
8227
  if (cur.line >= visible.to || cur.line < visible.from)
8228
- { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); }
8229
  } else {
8230
- var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;
8231
  if (outside) { setTimeout(operation(cm, function () {
8232
  if (counter != curCount) { return }
8233
- display.scroller.scrollTop += outside;
8234
- extend(e);
8235
- }), 50); }
8236
  }
8237
  }
8238
 
8239
  function done(e) {
8240
- cm.state.selectingText = false;
8241
- counter = Infinity;
8242
- e_preventDefault(e);
8243
- display.input.focus();
8244
- off(document, "mousemove", move);
8245
- off(document, "mouseup", up);
8246
- doc.history.lastSelOrigin = null;
8247
  }
8248
 
8249
  var move = operation(cm, function (e) {
8250
- if (!e_button(e)) { done(e); }
8251
- else { extend(e); }
8252
- });
8253
- var up = operation(cm, done);
8254
- cm.state.selectingText = up;
8255
- on(document, "mousemove", move);
8256
- on(document, "mouseup", up);
8257
  }
8258
 
8259
 
8260
  // Determines whether an event happened in the gutter, and fires the
8261
  // handlers for the corresponding event.
8262
  function gutterEvent(cm, e, type, prevent) {
8263
- var mX, mY;
8264
- try { mX = e.clientX; mY = e.clientY; }
8265
  catch(e) { return false }
8266
  if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) { return false }
8267
- if (prevent) { e_preventDefault(e); }
8268
 
8269
- var display = cm.display;
8270
- var lineBox = display.lineDiv.getBoundingClientRect();
8271
 
8272
  if (mY > lineBox.bottom || !hasHandler(cm, type)) { return e_defaultPrevented(e) }
8273
- mY -= lineBox.top - display.viewOffset;
8274
 
8275
  for (var i = 0; i < cm.options.gutters.length; ++i) {
8276
- var g = display.gutters.childNodes[i];
8277
  if (g && g.getBoundingClientRect().right >= mX) {
8278
- var line = lineAtHeight(cm.doc, mY);
8279
- var gutter = cm.options.gutters[i];
8280
- signal(cm, type, cm, line, gutter, e);
8281
  return e_defaultPrevented(e)
8282
  }
8283
  }
@@ -8295,7 +8263,7 @@ webpackJsonp([2],{
8295
  function onContextMenu(cm, e) {
8296
  if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }
8297
  if (signalDOMEvent(cm, e, "contextmenu")) { return }
8298
- cm.display.input.onContextMenu(e);
8299
  }
8300
 
8301
  function contextMenuInGutter(cm, e) {
@@ -8305,208 +8273,207 @@ webpackJsonp([2],{
8305
 
8306
  function themeChanged(cm) {
8307
  cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") +
8308
- cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-");
8309
- clearCaches(cm);
8310
  }
8311
 
8312
- var Init = {toString: function(){return "CodeMirror.Init"}};
8313
 
8314
- var defaults = {};
8315
- var optionHandlers = {};
8316
 
8317
  function defineOptions(CodeMirror) {
8318
- var optionHandlers = CodeMirror.optionHandlers;
8319
 
8320
  function option(name, deflt, handle, notOnInit) {
8321
- CodeMirror.defaults[name] = deflt;
8322
  if (handle) { optionHandlers[name] =
8323
- notOnInit ? function (cm, val, old) {if (old != Init) { handle(cm, val, old); }} : handle; }
8324
  }
8325
 
8326
- CodeMirror.defineOption = option;
8327
 
8328
  // Passed to option handlers when there is no old value.
8329
- CodeMirror.Init = Init;
8330
 
8331
  // These two are, on init, called from the constructor because they
8332
  // have to be initialized before the editor can start at all.
8333
- option("value", "", function (cm, val) { return cm.setValue(val); }, true);
8334
  option("mode", null, function (cm, val) {
8335
- cm.doc.modeOption = val;
8336
- loadMode(cm);
8337
- }, true);
8338
 
8339
- option("indentUnit", 2, loadMode, true);
8340
- option("indentWithTabs", false);
8341
- option("smartIndent", true);
8342
  option("tabSize", 4, function (cm) {
8343
- resetModeState(cm);
8344
- clearCaches(cm);
8345
- regChange(cm);
8346
- }, true);
8347
  option("lineSeparator", null, function (cm, val) {
8348
- cm.doc.lineSep = val;
8349
  if (!val) { return }
8350
- var newBreaks = [], lineNo = cm.doc.first;
8351
  cm.doc.iter(function (line) {
8352
  for (var pos = 0;;) {
8353
- var found = line.text.indexOf(val, pos);
8354
  if (found == -1) { break }
8355
- pos = found + val.length;
8356
- newBreaks.push(Pos(lineNo, found));
8357
  }
8358
- lineNo++;
8359
- });
8360
  for (var i = newBreaks.length - 1; i >= 0; i--)
8361
- { replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)); }
8362
- });
8363
- option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g, function (cm, val, old) {
8364
- cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g");
8365
- if (old != Init) { cm.refresh(); }
8366
- });
8367
- option("specialCharPlaceholder", defaultSpecialCharPlaceholder, function (cm) { return cm.refresh(); }, true);
8368
- option("electricChars", true);
8369
  option("inputStyle", mobile ? "contenteditable" : "textarea", function () {
8370
  throw new Error("inputStyle can not (yet) be changed in a running editor") // FIXME
8371
- }, true);
8372
- option("spellcheck", false, function (cm, val) { return cm.getInputField().spellcheck = val; }, true);
8373
- option("rtlMoveVisually", !windows);
8374
- option("wholeLineUpdateBefore", true);
8375
 
8376
  option("theme", "default", function (cm) {
8377
- themeChanged(cm);
8378
- guttersChanged(cm);
8379
- }, true);
8380
  option("keyMap", "default", function (cm, val, old) {
8381
- var next = getKeyMap(val);
8382
- var prev = old != Init && getKeyMap(old);
8383
- if (prev && prev.detach) { prev.detach(cm, next); }
8384
- if (next.attach) { next.attach(cm, prev || null); }
8385
- });
8386
- option("extraKeys", null);
8387
 
8388
- option("lineWrapping", false, wrappingChanged, true);
8389
  option("gutters", [], function (cm) {
8390
- setGuttersForLineNumbers(cm.options);
8391
- guttersChanged(cm);
8392
- }, true);
8393
  option("fixedGutter", true, function (cm, val) {
8394
- cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0";
8395
- cm.refresh();
8396
- }, true);
8397
- option("coverGutterNextToScrollbar", false, function (cm) { return updateScrollbars(cm); }, true);
8398
  option("scrollbarStyle", "native", function (cm) {
8399
- initScrollbars(cm);
8400
- updateScrollbars(cm);
8401
- cm.display.scrollbars.setScrollTop(cm.doc.scrollTop);
8402
- cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft);
8403
- }, true);
8404
  option("lineNumbers", false, function (cm) {
8405
- setGuttersForLineNumbers(cm.options);
8406
- guttersChanged(cm);
8407
- }, true);
8408
- option("firstLineNumber", 1, guttersChanged, true);
8409
- option("lineNumberFormatter", function (integer) { return integer; }, guttersChanged, true);
8410
- option("showCursorWhenSelecting", false, updateSelection, true);
8411
 
8412
- option("resetSelectionOnContextMenu", true);
8413
- option("lineWiseCopyCut", true);
8414
 
8415
  option("readOnly", false, function (cm, val) {
8416
  if (val == "nocursor") {
8417
- onBlur(cm);
8418
- cm.display.input.blur();
8419
- cm.display.disabled = true;
8420
  } else {
8421
- cm.display.disabled = false;
8422
  }
8423
- cm.display.input.readOnlyChanged(val);
8424
- });
8425
- option("disableInput", false, function (cm, val) {if (!val) { cm.display.input.reset(); }}, true);
8426
- option("dragDrop", true, dragDropChanged);
8427
- option("allowDropFileTypes", null);
8428
-
8429
- option("cursorBlinkRate", 530);
8430
- option("cursorScrollMargin", 0);
8431
- option("cursorHeight", 1, updateSelection, true);
8432
- option("singleCursorHeightPerLine", true, updateSelection, true);
8433
- option("workTime", 100);
8434
- option("workDelay", 100);
8435
- option("flattenSpans", true, resetModeState, true);
8436
- option("addModeClass", false, resetModeState, true);
8437
- option("pollInterval", 100);
8438
- option("undoDepth", 200, function (cm, val) { return cm.doc.history.undoDepth = val; });
8439
- option("historyEventDelay", 1250);
8440
- option("viewportMargin", 10, function (cm) { return cm.refresh(); }, true);
8441
- option("maxHighlightLength", 10000, resetModeState, true);
8442
  option("moveInputWithCursor", true, function (cm, val) {
8443
- if (!val) { cm.display.input.resetPosition(); }
8444
- });
8445
 
8446
- option("tabindex", null, function (cm, val) { return cm.display.input.getField().tabIndex = val || ""; });
8447
- option("autofocus", null);
8448
- option("direction", "ltr", function (cm, val) { return cm.doc.setDirection(val); }, true);
8449
  }
8450
 
8451
  function guttersChanged(cm) {
8452
- updateGutters(cm);
8453
- regChange(cm);
8454
- alignHorizontally(cm);
8455
  }
8456
 
8457
  function dragDropChanged(cm, value, old) {
8458
- var wasOn = old && old != Init;
8459
  if (!value != !wasOn) {
8460
- var funcs = cm.display.dragFunctions;
8461
- var toggle = value ? on : off;
8462
- toggle(cm.display.scroller, "dragstart", funcs.start);
8463
- toggle(cm.display.scroller, "dragenter", funcs.enter);
8464
- toggle(cm.display.scroller, "dragover", funcs.over);
8465
- toggle(cm.display.scroller, "dragleave", funcs.leave);
8466
- toggle(cm.display.scroller, "drop", funcs.drop);
8467
  }
8468
  }
8469
 
8470
  function wrappingChanged(cm) {
8471
  if (cm.options.lineWrapping) {
8472
- addClass(cm.display.wrapper, "CodeMirror-wrap");
8473
- cm.display.sizer.style.minWidth = "";
8474
- cm.display.sizerWidth = null;
8475
  } else {
8476
- rmClass(cm.display.wrapper, "CodeMirror-wrap");
8477
- findMaxLine(cm);
8478
  }
8479
- estimateLineHeights(cm);
8480
- regChange(cm);
8481
- clearCaches(cm);
8482
- setTimeout(function () { return updateScrollbars(cm); }, 100);
8483
  }
8484
 
8485
  // A CodeMirror instance represents an editor. This is the object
8486
  // that user code is usually dealing with.
8487
 
8488
- function CodeMirror$1(place, options) {
8489
  var this$1 = this;
8490
 
8491
- if (!(this instanceof CodeMirror$1)) { return new CodeMirror$1(place, options) }
8492
 
8493
- this.options = options = options ? copyObj(options) : {};
8494
  // Determine effective options based on given values and defaults.
8495
- copyObj(defaults, options, false);
8496
- setGuttersForLineNumbers(options);
8497
-
8498
- var doc = options.value;
8499
- if (typeof doc == "string") { doc = new Doc(doc, options.mode, null, options.lineSeparator, options.direction); }
8500
- this.doc = doc;
8501
-
8502
- var input = new CodeMirror$1.inputStyles[options.inputStyle](this);
8503
- var display = this.display = new Display(place, doc, input);
8504
- display.wrapper.CodeMirror = this;
8505
- updateGutters(this);
8506
- themeChanged(this);
8507
  if (options.lineWrapping)
8508
- { this.display.wrapper.className += " CodeMirror-wrap"; }
8509
- initScrollbars(this);
8510
 
8511
  this.state = {
8512
  keyMaps: [], // stores maps added by addKeyMap
@@ -8522,154 +8489,154 @@ webpackJsonp([2],{
8522
  highlight: new Delayed(), // stores highlight worker timeout
8523
  keySeq: null, // Unfinished key sequence
8524
  specialChars: null
8525
- };
8526
 
8527
- if (options.autofocus && !mobile) { display.input.focus(); }
8528
 
8529
  // Override magic textarea content restore that IE sometimes does
8530
  // on our hidden textarea on reload
8531
- if (ie && ie_version < 11) { setTimeout(function () { return this$1.display.input.reset(true); }, 20); }
8532
 
8533
- registerEventHandlers(this);
8534
- ensureGlobalHandlers();
8535
 
8536
- startOperation(this);
8537
- this.curOp.forceUpdate = true;
8538
- attachDoc(this, doc);
8539
 
8540
  if ((options.autofocus && !mobile) || this.hasFocus())
8541
- { setTimeout(bind(onFocus, this), 20); }
8542
  else
8543
- { onBlur(this); }
8544
 
8545
  for (var opt in optionHandlers) { if (optionHandlers.hasOwnProperty(opt))
8546
- { optionHandlers[opt](this$1, options[opt], Init); } }
8547
- maybeUpdateLineNumberWidth(this);
8548
- if (options.finishInit) { options.finishInit(this); }
8549
- for (var i = 0; i < initHooks.length; ++i) { initHooks[i](this$1); }
8550
- endOperation(this);
8551
  // Suppress optimizelegibility in Webkit, since it breaks text
8552
  // measuring on line wrapping boundaries.
8553
  if (webkit && options.lineWrapping &&
8554
  getComputedStyle(display.lineDiv).textRendering == "optimizelegibility")
8555
- { display.lineDiv.style.textRendering = "auto"; }
8556
  }
8557
 
8558
  // The default configuration options.
8559
- CodeMirror$1.defaults = defaults;
8560
  // Functions to run when options are changed.
8561
- CodeMirror$1.optionHandlers = optionHandlers;
8562
 
8563
  // Attach the necessary event handlers when initializing the editor
8564
  function registerEventHandlers(cm) {
8565
- var d = cm.display;
8566
- on(d.scroller, "mousedown", operation(cm, onMouseDown));
8567
  // Older IE's will not fire a second mousedown for a double click
8568
  if (ie && ie_version < 11)
8569
  { on(d.scroller, "dblclick", operation(cm, function (e) {
8570
  if (signalDOMEvent(cm, e)) { return }
8571
- var pos = posFromMouse(cm, e);
8572
  if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) { return }
8573
- e_preventDefault(e);
8574
- var word = cm.findWordAt(pos);
8575
- extendSelection(cm.doc, word.anchor, word.head);
8576
- })); }
8577
  else
8578
- { on(d.scroller, "dblclick", function (e) { return signalDOMEvent(cm, e) || e_preventDefault(e); }); }
8579
  // Some browsers fire contextmenu *after* opening the menu, at
8580
  // which point we can't mess with it anymore. Context menu is
8581
  // handled in onMouseDown for these browsers.
8582
- if (!captureRightClick) { on(d.scroller, "contextmenu", function (e) { return onContextMenu(cm, e); }); }
8583
 
8584
  // Used to suppress mouse event handling when a touch happens
8585
- var touchFinished, prevTouch = {end: 0};
8586
  function finishTouch() {
8587
  if (d.activeTouch) {
8588
- touchFinished = setTimeout(function () { return d.activeTouch = null; }, 1000);
8589
- prevTouch = d.activeTouch;
8590
- prevTouch.end = +new Date;
8591
  }
8592
  }
8593
  function isMouseLikeTouchEvent(e) {
8594
  if (e.touches.length != 1) { return false }
8595
- var touch = e.touches[0];
8596
  return touch.radiusX <= 1 && touch.radiusY <= 1
8597
  }
8598
  function farAway(touch, other) {
8599
  if (other.left == null) { return true }
8600
- var dx = other.left - touch.left, dy = other.top - touch.top;
8601
  return dx * dx + dy * dy > 20 * 20
8602
  }
8603
  on(d.scroller, "touchstart", function (e) {
8604
  if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e)) {
8605
- d.input.ensurePolled();
8606
- clearTimeout(touchFinished);
8607
- var now = +new Date;
8608
  d.activeTouch = {start: now, moved: false,
8609
- prev: now - prevTouch.end <= 300 ? prevTouch : null};
8610
  if (e.touches.length == 1) {
8611
- d.activeTouch.left = e.touches[0].pageX;
8612
- d.activeTouch.top = e.touches[0].pageY;
8613
  }
8614
  }
8615
- });
8616
  on(d.scroller, "touchmove", function () {
8617
- if (d.activeTouch) { d.activeTouch.moved = true; }
8618
- });
8619
  on(d.scroller, "touchend", function (e) {
8620
- var touch = d.activeTouch;
8621
  if (touch && !eventInWidget(d, e) && touch.left != null &&
8622
  !touch.moved && new Date - touch.start < 300) {
8623
- var pos = cm.coordsChar(d.activeTouch, "page"), range;
8624
  if (!touch.prev || farAway(touch, touch.prev)) // Single tap
8625
- { range = new Range(pos, pos); }
8626
  else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap
8627
- { range = cm.findWordAt(pos); }
8628
  else // Triple tap
8629
- { range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))); }
8630
- cm.setSelection(range.anchor, range.head);
8631
- cm.focus();
8632
- e_preventDefault(e);
8633
  }
8634
- finishTouch();
8635
- });
8636
- on(d.scroller, "touchcancel", finishTouch);
8637
 
8638
  // Sync scrolling between fake scrollbars and real scrollable
8639
  // area, ensure viewport is updated when scrolling.
8640
  on(d.scroller, "scroll", function () {
8641
  if (d.scroller.clientHeight) {
8642
- setScrollTop(cm, d.scroller.scrollTop);
8643
- setScrollLeft(cm, d.scroller.scrollLeft, true);
8644
- signal(cm, "scroll", cm);
8645
  }
8646
- });
8647
 
8648
  // Listen to wheel events in order to try and update the viewport on time.
8649
- on(d.scroller, "mousewheel", function (e) { return onScrollWheel(cm, e); });
8650
- on(d.scroller, "DOMMouseScroll", function (e) { return onScrollWheel(cm, e); });
8651
 
8652
  // Prevent wrapper from ever scrolling
8653
- on(d.wrapper, "scroll", function () { return d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });
8654
 
8655
  d.dragFunctions = {
8656
- enter: function (e) {if (!signalDOMEvent(cm, e)) { e_stop(e); }},
8657
- over: function (e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }},
8658
  start: function (e) { return onDragStart(cm, e); },
8659
  drop: operation(cm, onDrop),
8660
- leave: function (e) {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm); }}
8661
- };
8662
 
8663
- var inp = d.input.getField();
8664
- on(inp, "keyup", function (e) { return onKeyUp.call(cm, e); });
8665
- on(inp, "keydown", operation(cm, onKeyDown));
8666
- on(inp, "keypress", operation(cm, onKeyPress));
8667
- on(inp, "focus", function (e) { return onFocus(cm, e); });
8668
- on(inp, "blur", function (e) { return onBlur(cm, e); });
8669
  }
8670
 
8671
- var initHooks = [];
8672
- CodeMirror$1.defineInitHook = function (f) { return initHooks.push(f); };
8673
 
8674
  // Indent the given line. The how parameter can be "smart",
8675
  // "add"/null, "subtract", or "prev". When aggressive is false
@@ -8677,58 +8644,58 @@ webpackJsonp([2],{
8677
  // lines are not indented, and places where the mode returns Pass
8678
  // are left alone.
8679
  function indentLine(cm, n, how, aggressive) {
8680
- var doc = cm.doc, state;
8681
- if (how == null) { how = "add"; }
8682
  if (how == "smart") {
8683
  // Fall back to "prev" when the mode doesn't have an indentation
8684
  // method.
8685
- if (!doc.mode.indent) { how = "prev"; }
8686
- else { state = getStateBefore(cm, n); }
8687
  }
8688
 
8689
- var tabSize = cm.options.tabSize;
8690
- var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize);
8691
- if (line.stateAfter) { line.stateAfter = null; }
8692
- var curSpaceString = line.text.match(/^\s*/)[0], indentation;
8693
  if (!aggressive && !/\S/.test(line.text)) {
8694
- indentation = 0;
8695
- how = "not";
8696
  } else if (how == "smart") {
8697
- indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);
8698
  if (indentation == Pass || indentation > 150) {
8699
  if (!aggressive) { return }
8700
- how = "prev";
8701
  }
8702
  }
8703
  if (how == "prev") {
8704
- if (n > doc.first) { indentation = countColumn(getLine(doc, n-1).text, null, tabSize); }
8705
- else { indentation = 0; }
8706
  } else if (how == "add") {
8707
- indentation = curSpace + cm.options.indentUnit;
8708
  } else if (how == "subtract") {
8709
- indentation = curSpace - cm.options.indentUnit;
8710
  } else if (typeof how == "number") {
8711
- indentation = curSpace + how;
8712
  }
8713
- indentation = Math.max(0, indentation);
8714
 
8715
- var indentString = "", pos = 0;
8716
  if (cm.options.indentWithTabs)
8717
- { for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";} }
8718
- if (pos < indentation) { indentString += spaceStr(indentation - pos); }
8719
 
8720
  if (indentString != curSpaceString) {
8721
- replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input");
8722
- line.stateAfter = null;
8723
  return true
8724
  } else {
8725
  // Ensure that, if the cursor was in the whitespace at the start
8726
  // of the line, it is moved to the end of that space.
8727
  for (var i$1 = 0; i$1 < doc.sel.ranges.length; i$1++) {
8728
- var range = doc.sel.ranges[i$1];
8729
  if (range.head.line == n && range.head.ch < curSpaceString.length) {
8730
- var pos$1 = Pos(n, curSpaceString.length);
8731
- replaceOneSelection(doc, i$1, new Range(pos$1, pos$1));
8732
  break
8733
  }
8734
  }
@@ -8738,66 +8705,66 @@ webpackJsonp([2],{
8738
  // This will be set to a {lineWise: bool, text: [string]} object, so
8739
  // that, when pasting, we know what kind of selections the copied
8740
  // text was made out of.
8741
- var lastCopied = null;
8742
 
8743
  function setLastCopied(newLastCopied) {
8744
- lastCopied = newLastCopied;
8745
  }
8746
 
8747
  function applyTextInput(cm, inserted, deleted, sel, origin) {
8748
- var doc = cm.doc;
8749
- cm.display.shift = false;
8750
- if (!sel) { sel = doc.sel; }
8751
 
8752
- var paste = cm.state.pasteIncoming || origin == "paste";
8753
- var textLines = splitLinesAuto(inserted), multiPaste = null;
8754
  // When pasing N lines into N selections, insert one line per selection
8755
  if (paste && sel.ranges.length > 1) {
8756
  if (lastCopied && lastCopied.text.join("\n") == inserted) {
8757
  if (sel.ranges.length % lastCopied.text.length == 0) {
8758
- multiPaste = [];
8759
  for (var i = 0; i < lastCopied.text.length; i++)
8760
- { multiPaste.push(doc.splitLines(lastCopied.text[i])); }
8761
  }
8762
  } else if (textLines.length == sel.ranges.length) {
8763
- multiPaste = map(textLines, function (l) { return [l]; });
8764
  }
8765
  }
8766
 
8767
- var updateInput;
8768
  // Normal behavior is to insert the new text into every selection
8769
  for (var i$1 = sel.ranges.length - 1; i$1 >= 0; i$1--) {
8770
- var range$$1 = sel.ranges[i$1];
8771
- var from = range$$1.from(), to = range$$1.to();
8772
- if (range$$1.empty()) {
8773
  if (deleted && deleted > 0) // Handle deletion
8774
- { from = Pos(from.line, from.ch - deleted); }
8775
  else if (cm.state.overwrite && !paste) // Handle overwrite
8776
- { to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); }
8777
  else if (lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") == inserted)
8778
- { from = to = Pos(from.line, 0); }
8779
  }
8780
- updateInput = cm.curOp.updateInput;
8781
  var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines,
8782
- origin: origin || (paste ? "paste" : cm.state.cutIncoming ? "cut" : "+input")};
8783
- makeChange(cm.doc, changeEvent);
8784
- signalLater(cm, "inputRead", cm, changeEvent);
8785
  }
8786
  if (inserted && !paste)
8787
- { triggerElectric(cm, inserted); }
8788
 
8789
- ensureCursorVisible(cm);
8790
- cm.curOp.updateInput = updateInput;
8791
- cm.curOp.typing = true;
8792
- cm.state.pasteIncoming = cm.state.cutIncoming = false;
8793
  }
8794
 
8795
  function handlePaste(e, cm) {
8796
- var pasted = e.clipboardData && e.clipboardData.getData("Text");
8797
  if (pasted) {
8798
- e.preventDefault();
8799
  if (!cm.isReadOnly() && !cm.options.disableInput)
8800
- { runInOp(cm, function () { return applyTextInput(cm, pasted, 0, null, "paste"); }); }
8801
  return true
8802
  }
8803
  }
@@ -8805,56 +8772,56 @@ webpackJsonp([2],{
8805
  function triggerElectric(cm, inserted) {
8806
  // When an 'electric' character is inserted, immediately trigger a reindent
8807
  if (!cm.options.electricChars || !cm.options.smartIndent) { return }
8808
- var sel = cm.doc.sel;
8809
 
8810
  for (var i = sel.ranges.length - 1; i >= 0; i--) {
8811
- var range$$1 = sel.ranges[i];
8812
- if (range$$1.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range$$1.head.line)) { continue }
8813
- var mode = cm.getModeAt(range$$1.head);
8814
- var indented = false;
8815
  if (mode.electricChars) {
8816
  for (var j = 0; j < mode.electricChars.length; j++)
8817
  { if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {
8818
- indented = indentLine(cm, range$$1.head.line, "smart");
8819
  break
8820
  } }
8821
  } else if (mode.electricInput) {
8822
- if (mode.electricInput.test(getLine(cm.doc, range$$1.head.line).text.slice(0, range$$1.head.ch)))
8823
- { indented = indentLine(cm, range$$1.head.line, "smart"); }
8824
  }
8825
- if (indented) { signalLater(cm, "electricInput", cm, range$$1.head.line); }
8826
  }
8827
  }
8828
 
8829
  function copyableRanges(cm) {
8830
- var text = [], ranges = [];
8831
  for (var i = 0; i < cm.doc.sel.ranges.length; i++) {
8832
- var line = cm.doc.sel.ranges[i].head.line;
8833
- var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};
8834
- ranges.push(lineRange);
8835
- text.push(cm.getRange(lineRange.anchor, lineRange.head));
8836
  }
8837
  return {text: text, ranges: ranges}
8838
  }
8839
 
8840
  function disableBrowserMagic(field, spellcheck) {
8841
- field.setAttribute("autocorrect", "off");
8842
- field.setAttribute("autocapitalize", "off");
8843
- field.setAttribute("spellcheck", !!spellcheck);
8844
  }
8845
 
8846
  function hiddenTextarea() {
8847
- var te = elt("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none");
8848
- var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
8849
  // The textarea is kept positioned near the cursor to prevent the
8850
  // fact that it'll be scrolled into view on input from scrolling
8851
  // our fake cursor out of view. On webkit, when wrap=off, paste is
8852
  // very slow. So make the area wide instead.
8853
- if (webkit) { te.style.width = "1000px"; }
8854
- else { te.setAttribute("wrap", "off"); }
8855
  // If border: 0; -- iOS fails to open keyboard (issue #1287)
8856
- if (ios) { te.style.border = "1px solid black"; }
8857
- disableBrowserMagic(te);
8858
  return div
8859
  }
8860
 
@@ -8866,59 +8833,59 @@ webpackJsonp([2],{
8866
  // CodeMirror.prototype, for backwards compatibility and
8867
  // convenience.
8868
 
8869
- var addEditorMethods = function(CodeMirror) {
8870
- var optionHandlers = CodeMirror.optionHandlers;
8871
 
8872
- var helpers = CodeMirror.helpers = {};
8873
 
8874
  CodeMirror.prototype = {
8875
  constructor: CodeMirror,
8876
- focus: function(){window.focus(); this.display.input.focus();},
8877
 
8878
  setOption: function(option, value) {
8879
- var options = this.options, old = options[option];
8880
  if (options[option] == value && option != "mode") { return }
8881
- options[option] = value;
8882
  if (optionHandlers.hasOwnProperty(option))
8883
- { operation(this, optionHandlers[option])(this, value, old); }
8884
- signal(this, "optionChange", this, option);
8885
  },
8886
 
8887
  getOption: function(option) {return this.options[option]},
8888
  getDoc: function() {return this.doc},
8889
 
8890
- addKeyMap: function(map$$1, bottom) {
8891
- this.state.keyMaps[bottom ? "push" : "unshift"](getKeyMap(map$$1));
8892
  },
8893
- removeKeyMap: function(map$$1) {
8894
- var maps = this.state.keyMaps;
8895
  for (var i = 0; i < maps.length; ++i)
8896
- { if (maps[i] == map$$1 || maps[i].name == map$$1) {
8897
- maps.splice(i, 1);
8898
  return true
8899
  } }
8900
  },
8901
 
8902
  addOverlay: methodOp(function(spec, options) {
8903
- var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);
8904
  if (mode.startState) { throw new Error("Overlays may not be stateful.") }
8905
  insertSorted(this.state.overlays,
8906
  {mode: mode, modeSpec: spec, opaque: options && options.opaque,
8907
  priority: (options && options.priority) || 0},
8908
- function (overlay) { return overlay.priority; });
8909
- this.state.modeGen++;
8910
- regChange(this);
8911
  }),
8912
  removeOverlay: methodOp(function(spec) {
8913
  var this$1 = this;
8914
 
8915
- var overlays = this.state.overlays;
8916
  for (var i = 0; i < overlays.length; ++i) {
8917
- var cur = overlays[i].modeSpec;
8918
  if (cur == spec || typeof spec == "string" && cur.name == spec) {
8919
- overlays.splice(i, 1);
8920
- this$1.state.modeGen++;
8921
- regChange(this$1);
8922
  return
8923
  }
8924
  }
@@ -8926,30 +8893,30 @@ webpackJsonp([2],{
8926
 
8927
  indentLine: methodOp(function(n, dir, aggressive) {
8928
  if (typeof dir != "string" && typeof dir != "number") {
8929
- if (dir == null) { dir = this.options.smartIndent ? "smart" : "prev"; }
8930
- else { dir = dir ? "add" : "subtract"; }
8931
  }
8932
- if (isLine(this.doc, n)) { indentLine(this, n, dir, aggressive); }
8933
  }),
8934
  indentSelection: methodOp(function(how) {
8935
  var this$1 = this;
8936
 
8937
- var ranges = this.doc.sel.ranges, end = -1;
8938
  for (var i = 0; i < ranges.length; i++) {
8939
- var range$$1 = ranges[i];
8940
- if (!range$$1.empty()) {
8941
- var from = range$$1.from(), to = range$$1.to();
8942
- var start = Math.max(end, from.line);
8943
- end = Math.min(this$1.lastLine(), to.line - (to.ch ? 0 : 1)) + 1;
8944
  for (var j = start; j < end; ++j)
8945
- { indentLine(this$1, j, how); }
8946
- var newRanges = this$1.doc.sel.ranges;
8947
  if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0)
8948
- { replaceOneSelection(this$1.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll); }
8949
- } else if (range$$1.head.line > end) {
8950
- indentLine(this$1, range$$1.head.line, how, true);
8951
- end = range$$1.head.line;
8952
- if (i == this$1.doc.sel.primIndex) { ensureCursorVisible(this$1); }
8953
  }
8954
  }
8955
  }),
@@ -8965,23 +8932,23 @@ webpackJsonp([2],{
8965
  },
8966
 
8967
  getTokenTypeAt: function(pos) {
8968
- pos = clipPos(this.doc, pos);
8969
- var styles = getLineStyles(this, getLine(this.doc, pos.line));
8970
- var before = 0, after = (styles.length - 1) / 2, ch = pos.ch;
8971
- var type;
8972
- if (ch == 0) { type = styles[2]; }
8973
  else { for (;;) {
8974
- var mid = (before + after) >> 1;
8975
- if ((mid ? styles[mid * 2 - 1] : 0) >= ch) { after = mid; }
8976
- else if (styles[mid * 2 + 1] < ch) { before = mid + 1; }
8977
  else { type = styles[mid * 2 + 2]; break }
8978
  } }
8979
- var cut = type ? type.indexOf("overlay ") : -1;
8980
  return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1)
8981
  },
8982
 
8983
  getModeAt: function(pos) {
8984
- var mode = this.doc.mode;
8985
  if (!mode.innerMode) { return mode }
8986
  return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode
8987
  },
@@ -8993,40 +8960,40 @@ webpackJsonp([2],{
8993
  getHelpers: function(pos, type) {
8994
  var this$1 = this;
8995
 
8996
- var found = [];
8997
  if (!helpers.hasOwnProperty(type)) { return found }
8998
- var help = helpers[type], mode = this.getModeAt(pos);
8999
  if (typeof mode[type] == "string") {
9000
- if (help[mode[type]]) { found.push(help[mode[type]]); }
9001
  } else if (mode[type]) {
9002
  for (var i = 0; i < mode[type].length; i++) {
9003
- var val = help[mode[type][i]];
9004
- if (val) { found.push(val); }
9005
  }
9006
  } else if (mode.helperType && help[mode.helperType]) {
9007
- found.push(help[mode.helperType]);
9008
  } else if (help[mode.name]) {
9009
- found.push(help[mode.name]);
9010
  }
9011
  for (var i$1 = 0; i$1 < help._global.length; i$1++) {
9012
- var cur = help._global[i$1];
9013
  if (cur.pred(mode, this$1) && indexOf(found, cur.val) == -1)
9014
- { found.push(cur.val); }
9015
  }
9016
  return found
9017
  },
9018
 
9019
  getStateAfter: function(line, precise) {
9020
- var doc = this.doc;
9021
- line = clipLine(doc, line == null ? doc.first + doc.size - 1: line);
9022
  return getStateBefore(this, line + 1, precise)
9023
  },
9024
 
9025
  cursorCoords: function(start, mode) {
9026
- var pos, range$$1 = this.doc.sel.primary();
9027
- if (start == null) { pos = range$$1.head; }
9028
- else if (typeof start == "object") { pos = clipPos(this.doc, start); }
9029
- else { pos = start ? range$$1.from() : range$$1.to(); }
9030
  return cursorCoords(this, pos, mode || "page")
9031
  },
9032
 
@@ -9035,23 +9002,23 @@ webpackJsonp([2],{
9035
  },
9036
 
9037
  coordsChar: function(coords, mode) {
9038
- coords = fromCoordSystem(this, coords, mode || "page");
9039
  return coordsChar(this, coords.left, coords.top)
9040
  },
9041
 
9042
  lineAtHeight: function(height, mode) {
9043
- height = fromCoordSystem(this, {top: height, left: 0}, mode || "page").top;
9044
  return lineAtHeight(this.doc, height + this.display.viewOffset)
9045
  },
9046
  heightAtLine: function(line, mode, includeWidgets) {
9047
- var end = false, lineObj;
9048
  if (typeof line == "number") {
9049
- var last = this.doc.first + this.doc.size - 1;
9050
- if (line < this.doc.first) { line = this.doc.first; }
9051
- else if (line > last) { line = last; end = true; }
9052
- lineObj = getLine(this.doc, line);
9053
  } else {
9054
- lineObj = line;
9055
  }
9056
  return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || "page", includeWidgets || end).top +
9057
  (end ? this.doc.height - heightAtLine(lineObj) : 0)
@@ -9063,38 +9030,38 @@ webpackJsonp([2],{
9063
  getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo}},
9064
 
9065
  addWidget: function(pos, node, scroll, vert, horiz) {
9066
- var display = this.display;
9067
- pos = cursorCoords(this, clipPos(this.doc, pos));
9068
- var top = pos.bottom, left = pos.left;
9069
- node.style.position = "absolute";
9070
- node.setAttribute("cm-ignore-events", "true");
9071
- this.display.input.setUneditable(node);
9072
- display.sizer.appendChild(node);
9073
  if (vert == "over") {
9074
- top = pos.top;
9075
  } else if (vert == "above" || vert == "near") {
9076
  var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),
9077
- hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);
9078
  // Default to positioning above (if specified and possible); otherwise default to positioning below
9079
  if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)
9080
- { top = pos.top - node.offsetHeight; }
9081
  else if (pos.bottom + node.offsetHeight <= vspace)
9082
- { top = pos.bottom; }
9083
  if (left + node.offsetWidth > hspace)
9084
- { left = hspace - node.offsetWidth; }
9085
  }
9086
- node.style.top = top + "px";
9087
- node.style.left = node.style.right = "";
9088
  if (horiz == "right") {
9089
- left = display.sizer.clientWidth - node.offsetWidth;
9090
- node.style.right = "0px";
9091
  } else {
9092
- if (horiz == "left") { left = 0; }
9093
- else if (horiz == "middle") { left = (display.sizer.clientWidth - node.offsetWidth) / 2; }
9094
- node.style.left = left + "px";
9095
  }
9096
  if (scroll)
9097
- { scrollIntoView(this, {left: left, top: top, right: left + node.offsetWidth, bottom: top + node.offsetHeight}); }
9098
  },
9099
 
9100
  triggerOnKeyDown: methodOp(onKeyDown),
@@ -9106,16 +9073,16 @@ webpackJsonp([2],{
9106
  { return commands[cmd].call(null, this) }
9107
  },
9108
 
9109
- triggerElectric: methodOp(function(text) { triggerElectric(this, text); }),
9110
 
9111
  findPosH: function(from, amount, unit, visually) {
9112
  var this$1 = this;
9113
 
9114
- var dir = 1;
9115
- if (amount < 0) { dir = -1; amount = -amount; }
9116
- var cur = clipPos(this.doc, from);
9117
  for (var i = 0; i < amount; ++i) {
9118
- cur = findPosH(this$1.doc, cur, dir, unit, visually);
9119
  if (cur.hitSide) { break }
9120
  }
9121
  return cur
@@ -9124,36 +9091,36 @@ webpackJsonp([2],{
9124
  moveH: methodOp(function(dir, unit) {
9125
  var this$1 = this;
9126
 
9127
- this.extendSelectionsBy(function (range$$1) {
9128
- if (this$1.display.shift || this$1.doc.extend || range$$1.empty())
9129
- { return findPosH(this$1.doc, range$$1.head, dir, unit, this$1.options.rtlMoveVisually) }
9130
  else
9131
- { return dir < 0 ? range$$1.from() : range$$1.to() }
9132
- }, sel_move);
9133
  }),
9134
 
9135
  deleteH: methodOp(function(dir, unit) {
9136
- var sel = this.doc.sel, doc = this.doc;
9137
  if (sel.somethingSelected())
9138
- { doc.replaceSelection("", null, "+delete"); }
9139
  else
9140
- { deleteNearSelection(this, function (range$$1) {
9141
- var other = findPosH(doc, range$$1.head, dir, unit, false);
9142
- return dir < 0 ? {from: other, to: range$$1.head} : {from: range$$1.head, to: other}
9143
- }); }
9144
  }),
9145
 
9146
  findPosV: function(from, amount, unit, goalColumn) {
9147
  var this$1 = this;
9148
 
9149
- var dir = 1, x = goalColumn;
9150
- if (amount < 0) { dir = -1; amount = -amount; }
9151
- var cur = clipPos(this.doc, from);
9152
  for (var i = 0; i < amount; ++i) {
9153
- var coords = cursorCoords(this$1, cur, "div");
9154
- if (x == null) { x = coords.left; }
9155
- else { coords.left = x; }
9156
- cur = findPosV(this$1, coords, dir, unit);
9157
  if (cur.hitSide) { break }
9158
  }
9159
  return cur
@@ -9162,37 +9129,37 @@ webpackJsonp([2],{
9162
  moveV: methodOp(function(dir, unit) {
9163
  var this$1 = this;
9164
 
9165
- var doc = this.doc, goals = [];
9166
- var collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected();
9167
- doc.extendSelectionsBy(function (range$$1) {
9168
  if (collapse)
9169
- { return dir < 0 ? range$$1.from() : range$$1.to() }
9170
- var headPos = cursorCoords(this$1, range$$1.head, "div");
9171
- if (range$$1.goalColumn != null) { headPos.left = range$$1.goalColumn; }
9172
- goals.push(headPos.left);
9173
- var pos = findPosV(this$1, headPos, dir, unit);
9174
- if (unit == "page" && range$$1 == doc.sel.primary())
9175
- { addToScrollPos(this$1, null, charCoords(this$1, pos, "div").top - headPos.top); }
9176
  return pos
9177
- }, sel_move);
9178
  if (goals.length) { for (var i = 0; i < doc.sel.ranges.length; i++)
9179
- { doc.sel.ranges[i].goalColumn = goals[i]; } }
9180
  }),
9181
 
9182
  // Find the word at the given position (as returned by coordsChar).
9183
  findWordAt: function(pos) {
9184
- var doc = this.doc, line = getLine(doc, pos.line).text;
9185
- var start = pos.ch, end = pos.ch;
9186
  if (line) {
9187
- var helper = this.getHelper(pos, "wordChars");
9188
- if ((pos.sticky == "before" || end == line.length) && start) { --start; } else { ++end; }
9189
- var startChar = line.charAt(start);
9190
  var check = isWordChar(startChar, helper)
9191
  ? function (ch) { return isWordChar(ch, helper); }
9192
  : /\s/.test(startChar) ? function (ch) { return /\s/.test(ch); }
9193
- : function (ch) { return (!/\s/.test(ch) && !isWordChar(ch)); };
9194
- while (start > 0 && check(line.charAt(start - 1))) { --start; }
9195
- while (end < line.length && check(line.charAt(end))) { ++end; }
9196
  }
9197
  return new Range(Pos(pos.line, start), Pos(pos.line, end))
9198
  },
@@ -9200,94 +9167,92 @@ webpackJsonp([2],{
9200
  toggleOverwrite: function(value) {
9201
  if (value != null && value == this.state.overwrite) { return }
9202
  if (this.state.overwrite = !this.state.overwrite)
9203
- { addClass(this.display.cursorDiv, "CodeMirror-overwrite"); }
9204
  else
9205
- { rmClass(this.display.cursorDiv, "CodeMirror-overwrite"); }
9206
 
9207
- signal(this, "overwriteToggle", this, this.state.overwrite);
9208
  },
9209
  hasFocus: function() { return this.display.input.getField() == activeElt() },
9210
  isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit) },
9211
 
9212
  scrollTo: methodOp(function(x, y) {
9213
- if (x != null || y != null) { resolveScrollToPos(this); }
9214
- if (x != null) { this.curOp.scrollLeft = x; }
9215
- if (y != null) { this.curOp.scrollTop = y; }
9216
  }),
9217
  getScrollInfo: function() {
9218
- var scroller = this.display.scroller;
9219
  return {left: scroller.scrollLeft, top: scroller.scrollTop,
9220
  height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight,
9221
  width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth,
9222
  clientHeight: displayHeight(this), clientWidth: displayWidth(this)}
9223
  },
9224
 
9225
- scrollIntoView: methodOp(function(range$$1, margin) {
9226
- if (range$$1 == null) {
9227
- range$$1 = {from: this.doc.sel.primary().head, to: null};
9228
- if (margin == null) { margin = this.options.cursorScrollMargin; }
9229
- } else if (typeof range$$1 == "number") {
9230
- range$$1 = {from: Pos(range$$1, 0), to: null};
9231
- } else if (range$$1.from == null) {
9232
- range$$1 = {from: range$$1, to: null};
9233
  }
9234
- if (!range$$1.to) { range$$1.to = range$$1.from; }
9235
- range$$1.margin = margin || 0;
9236
 
9237
- if (range$$1.from.line != null) {
9238
- resolveScrollToPos(this);
9239
- this.curOp.scrollToPos = range$$1;
9240
  } else {
9241
- var sPos = calculateScrollPos(this, {
9242
- left: Math.min(range$$1.from.left, range$$1.to.left),
9243
- top: Math.min(range$$1.from.top, range$$1.to.top) - range$$1.margin,
9244
- right: Math.max(range$$1.from.right, range$$1.to.right),
9245
- bottom: Math.max(range$$1.from.bottom, range$$1.to.bottom) + range$$1.margin
9246
- });
9247
- this.scrollTo(sPos.scrollLeft, sPos.scrollTop);
9248
  }
9249
  }),
9250
 
9251
  setSize: methodOp(function(width, height) {
9252
  var this$1 = this;
9253
 
9254
- var interpret = function (val) { return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val; };
9255
- if (width != null) { this.display.wrapper.style.width = interpret(width); }
9256
- if (height != null) { this.display.wrapper.style.height = interpret(height); }
9257
- if (this.options.lineWrapping) { clearLineMeasurementCache(this); }
9258
- var lineNo$$1 = this.display.viewFrom;
9259
- this.doc.iter(lineNo$$1, this.display.viewTo, function (line) {
9260
  if (line.widgets) { for (var i = 0; i < line.widgets.length; i++)
9261
- { if (line.widgets[i].noHScroll) { regLineChange(this$1, lineNo$$1, "widget"); break } } }
9262
- ++lineNo$$1;
9263
- });
9264
- this.curOp.forceUpdate = true;
9265
- signal(this, "refresh", this);
9266
  }),
9267
 
9268
  operation: function(f){return runInOp(this, f)},
9269
 
9270
  refresh: methodOp(function() {
9271
- var oldHeight = this.display.cachedTextHeight;
9272
- regChange(this);
9273
- this.curOp.forceUpdate = true;
9274
- clearCaches(this);
9275
- this.scrollTo(this.doc.scrollLeft, this.doc.scrollTop);
9276
- updateGutterSpace(this);
9277
  if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5)
9278
- { estimateLineHeights(this); }
9279
- signal(this, "refresh", this);
9280
  }),
9281
 
9282
  swapDoc: methodOp(function(doc) {
9283
- var old = this.doc;
9284
- old.cm = null;
9285
- attachDoc(this, doc);
9286
- clearCaches(this);
9287
- this.display.input.reset();
9288
- this.scrollTo(doc.scrollLeft, doc.scrollTop);
9289
- this.curOp.forceScroll = true;
9290
- signalLater(this, "swapDoc", this, old);
9291
  return old
9292
  }),
9293
 
@@ -9295,18 +9260,18 @@ webpackJsonp([2],{
9295
  getWrapperElement: function(){return this.display.wrapper},
9296
  getScrollerElement: function(){return this.display.scroller},
9297
  getGutterElement: function(){return this.display.gutters}
9298
- };
9299
- eventMixin(CodeMirror);
9300
 
9301
  CodeMirror.registerHelper = function(type, name, value) {
9302
- if (!helpers.hasOwnProperty(type)) { helpers[type] = CodeMirror[type] = {_global: []}; }
9303
- helpers[type][name] = value;
9304
- };
9305
  CodeMirror.registerGlobalHelper = function(type, name, predicate, value) {
9306
- CodeMirror.registerHelper(type, name, value);
9307
- helpers[type]._global.push({pred: predicate, val: value});
9308
- };
9309
- };
9310
 
9311
  // Used for horizontal relative motion. Dir is -1 or 1 (left or
9312
  // right), unit can be "char", "column" (like char, but doesn't
@@ -9318,59 +9283,59 @@ webpackJsonp([2],{
9318
  // position. The resulting position will have a hitSide=true
9319
  // property if it reached the end of the document.
9320
  function findPosH(doc, pos, dir, unit, visually) {
9321
- var oldPos = pos;
9322
- var origDir = dir;
9323
- var lineObj = getLine(doc, pos.line);
9324
  function findNextLine() {
9325
- var l = pos.line + dir;
9326
  if (l < doc.first || l >= doc.first + doc.size) { return false }
9327
- pos = new Pos(l, pos.ch, pos.sticky);
9328
  return lineObj = getLine(doc, l)
9329
  }
9330
  function moveOnce(boundToLine) {
9331
- var next;
9332
  if (visually) {
9333
- next = moveVisually(doc.cm, lineObj, pos, dir);
9334
  } else {
9335
- next = moveLogically(lineObj, pos, dir);
9336
  }
9337
  if (next == null) {
9338
  if (!boundToLine && findNextLine())
9339
- { pos = endOfLine(visually, doc.cm, lineObj, pos.line, dir); }
9340
  else
9341
  { return false }
9342
  } else {
9343
- pos = next;
9344
  }
9345
  return true
9346
  }
9347
 
9348
  if (unit == "char") {
9349
- moveOnce();
9350
  } else if (unit == "column") {
9351
- moveOnce(true);
9352
  } else if (unit == "word" || unit == "group") {
9353
- var sawType = null, group = unit == "group";
9354
- var helper = doc.cm && doc.cm.getHelper(pos, "wordChars");
9355
  for (var first = true;; first = false) {
9356
  if (dir < 0 && !moveOnce(!first)) { break }
9357
- var cur = lineObj.text.charAt(pos.ch) || "\n";
9358
  var type = isWordChar(cur, helper) ? "w"
9359
  : group && cur == "\n" ? "n"
9360
  : !group || /\s/.test(cur) ? null
9361
- : "p";
9362
- if (group && !first && !type) { type = "s"; }
9363
  if (sawType && sawType != type) {
9364
- if (dir < 0) {dir = 1; moveOnce(); pos.sticky = "after";}
9365
  break
9366
  }
9367
 
9368
- if (type) { sawType = type; }
9369
  if (dir > 0 && !moveOnce(!first)) { break }
9370
  }
9371
  }
9372
- var result = skipAtomic(doc, pos, oldPos, origDir, true);
9373
- if (equalCursorPos(oldPos, result)) { result.hitSide = true; }
9374
  return result
9375
  }
9376
 
@@ -9378,21 +9343,21 @@ webpackJsonp([2],{
9378
  // "page" or "line". The resulting position will have a hitSide=true
9379
  // property if it reached the end of the document.
9380
  function findPosV(cm, pos, dir, unit) {
9381
- var doc = cm.doc, x = pos.left, y;
9382
  if (unit == "page") {
9383
- var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);
9384
- var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3);
9385
- y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount;
9386
 
9387
  } else if (unit == "line") {
9388
- y = dir > 0 ? pos.bottom + 3 : pos.top - 3;
9389
  }
9390
- var target;
9391
  for (;;) {
9392
- target = coordsChar(cm, x, y);
9393
  if (!target.outside) { break }
9394
  if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break }
9395
- y += dir * 5;
9396
  }
9397
  return target
9398
  }
@@ -9400,438 +9365,399 @@ webpackJsonp([2],{
9400
  // CONTENTEDITABLE INPUT STYLE
9401
 
9402
  var ContentEditableInput = function(cm) {
9403
- this.cm = cm;
9404
- this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null;
9405
- this.polling = new Delayed();
9406
- this.composing = null;
9407
- this.gracePeriod = false;
9408
- this.readDOMTimeout = null;
9409
  };
9410
 
9411
  ContentEditableInput.prototype.init = function (display) {
9412
  var this$1 = this;
9413
 
9414
- var input = this, cm = input.cm;
9415
- var div = input.div = display.lineDiv;
9416
- disableBrowserMagic(div, cm.options.spellcheck);
9417
 
9418
  on(div, "paste", function (e) {
9419
  if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }
9420
  // IE doesn't fire input events, so we schedule a read for the pasted content in this way
9421
- if (ie_version <= 11) { setTimeout(operation(cm, function () { return this$1.updateFromDOM(); }), 20); }
9422
- });
 
 
9423
 
9424
  on(div, "compositionstart", function (e) {
9425
- this$1.composing = {data: e.data, done: false};
9426
- });
9427
  on(div, "compositionupdate", function (e) {
9428
- if (!this$1.composing) { this$1.composing = {data: e.data, done: false}; }
9429
- });
9430
  on(div, "compositionend", function (e) {
9431
  if (this$1.composing) {
9432
- if (e.data != this$1.composing.data) { this$1.readFromDOMSoon(); }
9433
- this$1.composing.done = true;
9434
  }
9435
- });
9436
 
9437
- on(div, "touchstart", function () { return input.forceCompositionEnd(); });
9438
 
9439
  on(div, "input", function () {
9440
- if (!this$1.composing) { this$1.readFromDOMSoon(); }
9441
- });
9442
 
9443
  function onCopyCut(e) {
9444
  if (signalDOMEvent(cm, e)) { return }
9445
  if (cm.somethingSelected()) {
9446
- setLastCopied({lineWise: false, text: cm.getSelections()});
9447
- if (e.type == "cut") { cm.replaceSelection("", null, "cut"); }
9448
  } else if (!cm.options.lineWiseCopyCut) {
9449
  return
9450
  } else {
9451
- var ranges = copyableRanges(cm);
9452
- setLastCopied({lineWise: true, text: ranges.text});
9453
  if (e.type == "cut") {
9454
  cm.operation(function () {
9455
- cm.setSelections(ranges.ranges, 0, sel_dontScroll);
9456
- cm.replaceSelection("", null, "cut");
9457
- });
9458
  }
9459
  }
9460
  if (e.clipboardData) {
9461
- e.clipboardData.clearData();
9462
- var content = lastCopied.text.join("\n");
9463
  // iOS exposes the clipboard API, but seems to discard content inserted into it
9464
- e.clipboardData.setData("Text", content);
9465
  if (e.clipboardData.getData("Text") == content) {
9466
- e.preventDefault();
9467
  return
9468
  }
9469
  }
9470
  // Old-fashioned briefly-focus-a-textarea hack
9471
- var kludge = hiddenTextarea(), te = kludge.firstChild;
9472
- cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);
9473
- te.value = lastCopied.text.join("\n");
9474
- var hadFocus = document.activeElement;
9475
- selectInput(te);
9476
  setTimeout(function () {
9477
- cm.display.lineSpace.removeChild(kludge);
9478
- hadFocus.focus();
9479
- if (hadFocus == div) { input.showPrimarySelection(); }
9480
- }, 50);
9481
  }
9482
- on(div, "copy", onCopyCut);
9483
- on(div, "cut", onCopyCut);
9484
  };
9485
 
9486
  ContentEditableInput.prototype.prepareSelection = function () {
9487
- var result = prepareSelection(this.cm, false);
9488
- result.focus = this.cm.state.focused;
9489
  return result
9490
  };
9491
 
9492
  ContentEditableInput.prototype.showSelection = function (info, takeFocus) {
9493
  if (!info || !this.cm.display.view.length) { return }
9494
- if (info.focus || takeFocus) { this.showPrimarySelection(); }
9495
- this.showMultipleSelections(info);
9496
  };
9497
 
9498
  ContentEditableInput.prototype.showPrimarySelection = function () {
9499
- var sel = window.getSelection(), prim = this.cm.doc.sel.primary();
9500
- var curAnchor = domToPos(this.cm, sel.anchorNode, sel.anchorOffset);
9501
- var curFocus = domToPos(this.cm, sel.focusNode, sel.focusOffset);
9502
  if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad &&
9503
  cmp(minPos(curAnchor, curFocus), prim.from()) == 0 &&
9504
  cmp(maxPos(curAnchor, curFocus), prim.to()) == 0)
9505
  { return }
9506
 
9507
- var start = posToDOM(this.cm, prim.from());
9508
- var end = posToDOM(this.cm, prim.to());
9509
- if (!start && !end) {
9510
- sel.removeAllRanges();
9511
- return
9512
- }
9513
 
9514
- var view = this.cm.display.view;
9515
- var old = sel.rangeCount && sel.getRangeAt(0);
9516
  if (!start) {
9517
- start = {node: view[0].measure.map[2], offset: 0};
9518
  } else if (!end) { // FIXME dangerously hacky
9519
- var measure = view[view.length - 1].measure;
9520
- var map$$1 = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map;
9521
- end = {node: map$$1[map$$1.length - 1], offset: map$$1[map$$1.length - 2] - map$$1[map$$1.length - 3]};
9522
  }
9523
 
9524
- var rng;
9525
- try { rng = range(start.node, start.offset, end.offset, end.node); }
9526
  catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible
9527
  if (rng) {
9528
  if (!gecko && this.cm.state.focused) {
9529
- sel.collapse(start.node, start.offset);
9530
  if (!rng.collapsed) {
9531
- sel.removeAllRanges();
9532
- sel.addRange(rng);
9533
  }
9534
  } else {
9535
- sel.removeAllRanges();
9536
- sel.addRange(rng);
9537
  }
9538
- if (old && sel.anchorNode == null) { sel.addRange(old); }
9539
- else if (gecko) { this.startGracePeriod(); }
9540
  }
9541
- this.rememberSelection();
9542
  };
9543
 
9544
  ContentEditableInput.prototype.startGracePeriod = function () {
9545
  var this$1 = this;
9546
 
9547
- clearTimeout(this.gracePeriod);
9548
  this.gracePeriod = setTimeout(function () {
9549
- this$1.gracePeriod = false;
9550
  if (this$1.selectionChanged())
9551
- { this$1.cm.operation(function () { return this$1.cm.curOp.selectionChanged = true; }); }
9552
- }, 20);
9553
  };
9554
 
9555
  ContentEditableInput.prototype.showMultipleSelections = function (info) {
9556
- removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors);
9557
- removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection);
9558
  };
9559
 
9560
  ContentEditableInput.prototype.rememberSelection = function () {
9561
- var sel = window.getSelection();
9562
- this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;
9563
- this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;
9564
  };
9565
 
9566
  ContentEditableInput.prototype.selectionInEditor = function () {
9567
- var sel = window.getSelection();
9568
  if (!sel.rangeCount) { return false }
9569
- var node = sel.getRangeAt(0).commonAncestorContainer;
9570
  return contains(this.div, node)
9571
  };
9572
 
9573
  ContentEditableInput.prototype.focus = function () {
9574
  if (this.cm.options.readOnly != "nocursor") {
9575
  if (!this.selectionInEditor())
9576
- { this.showSelection(this.prepareSelection(), true); }
9577
- this.div.focus();
9578
  }
9579
  };
9580
- ContentEditableInput.prototype.blur = function () { this.div.blur(); };
9581
  ContentEditableInput.prototype.getField = function () { return this.div };
9582
 
9583
  ContentEditableInput.prototype.supportsTouch = function () { return true };
9584
 
9585
  ContentEditableInput.prototype.receivedFocus = function () {
9586
- var input = this;
9587
  if (this.selectionInEditor())
9588
- { this.pollSelection(); }
9589
  else
9590
- { runInOp(this.cm, function () { return input.cm.curOp.selectionChanged = true; }); }
9591
 
9592
  function poll() {
9593
  if (input.cm.state.focused) {
9594
- input.pollSelection();
9595
- input.polling.set(input.cm.options.pollInterval, poll);
9596
  }
9597
  }
9598
- this.polling.set(this.cm.options.pollInterval, poll);
9599
  };
9600
 
9601
  ContentEditableInput.prototype.selectionChanged = function () {
9602
- var sel = window.getSelection();
9603
  return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||
9604
  sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset
9605
  };
9606
 
9607
  ContentEditableInput.prototype.pollSelection = function () {
9608
- if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { return }
9609
- var sel = window.getSelection(), cm = this.cm;
9610
- // On Android Chrome (version 56, at least), backspacing into an
9611
- // uneditable block element will put the cursor in that element,
9612
- // and then, because it's not editable, hide the virtual keyboard.
9613
- // Because Android doesn't allow us to actually detect backspace
9614
- // presses in a sane way, this code checks for when that happens
9615
- // and simulates a backspace press in this case.
9616
- if (android && chrome && this.cm.options.gutters.length && isInGutter(sel.anchorNode)) {
9617
- this.cm.triggerOnKeyDown({type: "keydown", keyCode: 8, preventDefault: Math.abs});
9618
- this.blur();
9619
- this.focus();
9620
- return
9621
  }
9622
- if (this.composing) { return }
9623
- this.rememberSelection();
9624
- var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);
9625
- var head = domToPos(cm, sel.focusNode, sel.focusOffset);
9626
- if (anchor && head) { runInOp(cm, function () {
9627
- setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll);
9628
- if (anchor.bad || head.bad) { cm.curOp.selectionChanged = true; }
9629
- }); }
9630
  };
9631
 
9632
  ContentEditableInput.prototype.pollContent = function () {
9633
  if (this.readDOMTimeout != null) {
9634
- clearTimeout(this.readDOMTimeout);
9635
- this.readDOMTimeout = null;
9636
  }
9637
 
9638
- var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary();
9639
- var from = sel.from(), to = sel.to();
9640
  if (from.ch == 0 && from.line > cm.firstLine())
9641
- { from = Pos(from.line - 1, getLine(cm.doc, from.line - 1).length); }
9642
  if (to.ch == getLine(cm.doc, to.line).text.length && to.line < cm.lastLine())
9643
- { to = Pos(to.line + 1, 0); }
9644
  if (from.line < display.viewFrom || to.line > display.viewTo - 1) { return false }
9645
 
9646
- var fromIndex, fromLine, fromNode;
9647
  if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {
9648
- fromLine = lineNo(display.view[0].line);
9649
- fromNode = display.view[0].node;
9650
  } else {
9651
- fromLine = lineNo(display.view[fromIndex].line);
9652
- fromNode = display.view[fromIndex - 1].node.nextSibling;
9653
  }
9654
- var toIndex = findViewIndex(cm, to.line);
9655
- var toLine, toNode;
9656
  if (toIndex == display.view.length - 1) {
9657
- toLine = display.viewTo - 1;
9658
- toNode = display.lineDiv.lastChild;
9659
  } else {
9660
- toLine = lineNo(display.view[toIndex + 1].line) - 1;
9661
- toNode = display.view[toIndex + 1].node.previousSibling;
9662
  }
9663
 
9664
  if (!fromNode) { return false }
9665
- var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));
9666
- var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));
9667
  while (newText.length > 1 && oldText.length > 1) {
9668
- if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; }
9669
- else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; }
9670
  else { break }
9671
  }
9672
 
9673
- var cutFront = 0, cutEnd = 0;
9674
- var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length);
9675
  while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront))
9676
- { ++cutFront; }
9677
- var newBot = lst(newText), oldBot = lst(oldText);
9678
  var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0),
9679
- oldBot.length - (oldText.length == 1 ? cutFront : 0));
9680
  while (cutEnd < maxCutEnd &&
9681
  newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1))
9682
- { ++cutEnd; }
9683
- // Try to move start of change to start of selection if ambiguous
9684
- if (newText.length == 1 && oldText.length == 1 && fromLine == from.line) {
9685
- while (cutFront && cutFront > from.ch &&
9686
- newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) {
9687
- cutFront--;
9688
- cutEnd++;
9689
- }
9690
- }
9691
 
9692
- newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd).replace(/^\u200b+/, "");
9693
- newText[0] = newText[0].slice(cutFront).replace(/\u200b+$/, "");
9694
 
9695
- var chFrom = Pos(fromLine, cutFront);
9696
- var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0);
9697
  if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) {
9698
- replaceRange(cm.doc, newText, chFrom, chTo, "+input");
9699
  return true
9700
  }
9701
  };
9702
 
9703
  ContentEditableInput.prototype.ensurePolled = function () {
9704
- this.forceCompositionEnd();
9705
  };
9706
  ContentEditableInput.prototype.reset = function () {
9707
- this.forceCompositionEnd();
9708
  };
9709
  ContentEditableInput.prototype.forceCompositionEnd = function () {
9710
  if (!this.composing) { return }
9711
- clearTimeout(this.readDOMTimeout);
9712
- this.composing = null;
9713
- this.updateFromDOM();
9714
- this.div.blur();
9715
- this.div.focus();
9716
  };
9717
  ContentEditableInput.prototype.readFromDOMSoon = function () {
9718
  var this$1 = this;
9719
 
9720
  if (this.readDOMTimeout != null) { return }
9721
  this.readDOMTimeout = setTimeout(function () {
9722
- this$1.readDOMTimeout = null;
9723
  if (this$1.composing) {
9724
- if (this$1.composing.done) { this$1.composing = null; }
9725
  else { return }
9726
  }
9727
- this$1.updateFromDOM();
9728
- }, 80);
9729
- };
9730
-
9731
- ContentEditableInput.prototype.updateFromDOM = function () {
9732
- var this$1 = this;
9733
-
9734
- if (this.cm.isReadOnly() || !this.pollContent())
9735
- { runInOp(this.cm, function () { return regChange(this$1.cm); }); }
9736
  };
9737
 
9738
  ContentEditableInput.prototype.setUneditable = function (node) {
9739
- node.contentEditable = "false";
9740
  };
9741
 
9742
  ContentEditableInput.prototype.onKeyPress = function (e) {
9743
  if (e.charCode == 0) { return }
9744
- e.preventDefault();
9745
  if (!this.cm.isReadOnly())
9746
- { operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); }
9747
  };
9748
 
9749
  ContentEditableInput.prototype.readOnlyChanged = function (val) {
9750
- this.div.contentEditable = String(val != "nocursor");
9751
  };
9752
 
9753
  ContentEditableInput.prototype.onContextMenu = function () {};
9754
  ContentEditableInput.prototype.resetPosition = function () {};
9755
 
9756
- ContentEditableInput.prototype.needsContentAttribute = true;
9757
 
9758
  function posToDOM(cm, pos) {
9759
- var view = findViewForLine(cm, pos.line);
9760
  if (!view || view.hidden) { return null }
9761
- var line = getLine(cm.doc, pos.line);
9762
- var info = mapFromLineView(view, line, pos.line);
9763
 
9764
- var order = getOrder(line, cm.doc.direction), side = "left";
9765
  if (order) {
9766
- var partPos = getBidiPartAt(order, pos.ch);
9767
- side = partPos % 2 ? "right" : "left";
9768
  }
9769
- var result = nodeAndOffsetInLineMap(info.map, pos.ch, side);
9770
- result.offset = result.collapse == "right" ? result.end : result.start;
9771
  return result
9772
  }
9773
 
9774
- function isInGutter(node) {
9775
- for (var scan = node; scan; scan = scan.parentNode)
9776
- { if (/CodeMirror-gutter-wrapper/.test(scan.className)) { return true } }
9777
- return false
9778
- }
9779
-
9780
  function badPos(pos, bad) { if (bad) { pos.bad = true; } return pos }
9781
 
9782
  function domTextBetween(cm, from, to, fromLine, toLine) {
9783
- var text = "", closing = false, lineSep = cm.doc.lineSeparator();
9784
  function recognizeMarker(id) { return function (marker) { return marker.id == id; } }
9785
- function close() {
9786
- if (closing) {
9787
- text += lineSep;
9788
- closing = false;
9789
- }
9790
- }
9791
- function addText(str) {
9792
- if (str) {
9793
- close();
9794
- text += str;
9795
- }
9796
- }
9797
  function walk(node) {
9798
  if (node.nodeType == 1) {
9799
- var cmText = node.getAttribute("cm-text");
9800
  if (cmText != null) {
9801
- addText(cmText || node.textContent.replace(/\u200b/g, ""));
 
9802
  return
9803
  }
9804
- var markerID = node.getAttribute("cm-marker"), range$$1;
9805
  if (markerID) {
9806
- var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));
9807
- if (found.length && (range$$1 = found[0].find()))
9808
- { addText(getBetween(cm.doc, range$$1.from, range$$1.to).join(lineSep)); }
9809
  return
9810
  }
9811
  if (node.getAttribute("contenteditable") == "false") { return }
9812
- var isBlock = /^(pre|div|p)$/i.test(node.nodeName);
9813
- if (isBlock) { close(); }
9814
  for (var i = 0; i < node.childNodes.length; i++)
9815
- { walk(node.childNodes[i]); }
9816
- if (isBlock) { closing = true; }
 
9817
  } else if (node.nodeType == 3) {
9818
- addText(node.nodeValue);
 
 
 
 
 
 
9819
  }
9820
  }
9821
  for (;;) {
9822
- walk(from);
9823
  if (from == to) { break }
9824
- from = from.nextSibling;
9825
  }
9826
  return text
9827
  }
9828
 
9829
  function domToPos(cm, node, offset) {
9830
- var lineNode;
9831
  if (node == cm.display.lineDiv) {
9832
- lineNode = cm.display.lineDiv.childNodes[offset];
9833
  if (!lineNode) { return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true) }
9834
- node = null; offset = 0;
9835
  } else {
9836
  for (lineNode = node;; lineNode = lineNode.parentNode) {
9837
  if (!lineNode || lineNode == cm.display.lineDiv) { return null }
@@ -9839,196 +9765,196 @@ webpackJsonp([2],{
9839
  }
9840
  }
9841
  for (var i = 0; i < cm.display.view.length; i++) {
9842
- var lineView = cm.display.view[i];
9843
  if (lineView.node == lineNode)
9844
  { return locateNodeInLineView(lineView, node, offset) }
9845
  }
9846
  }
9847
 
9848
  function locateNodeInLineView(lineView, node, offset) {
9849
- var wrapper = lineView.text.firstChild, bad = false;
9850
  if (!node || !contains(wrapper, node)) { return badPos(Pos(lineNo(lineView.line), 0), true) }
9851
  if (node == wrapper) {
9852
- bad = true;
9853
- node = wrapper.childNodes[offset];
9854
- offset = 0;
9855
  if (!node) {
9856
- var line = lineView.rest ? lst(lineView.rest) : lineView.line;
9857
  return badPos(Pos(lineNo(line), line.text.length), bad)
9858
  }
9859
  }
9860
 
9861
- var textNode = node.nodeType == 3 ? node : null, topNode = node;
9862
  if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {
9863
- textNode = node.firstChild;
9864
- if (offset) { offset = textNode.nodeValue.length; }
9865
  }
9866
- while (topNode.parentNode != wrapper) { topNode = topNode.parentNode; }
9867
- var measure = lineView.measure, maps = measure.maps;
9868
 
9869
  function find(textNode, topNode, offset) {
9870
  for (var i = -1; i < (maps ? maps.length : 0); i++) {
9871
- var map$$1 = i < 0 ? measure.map : maps[i];
9872
- for (var j = 0; j < map$$1.length; j += 3) {
9873
- var curNode = map$$1[j + 2];
9874
  if (curNode == textNode || curNode == topNode) {
9875
- var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]);
9876
- var ch = map$$1[j] + offset;
9877
- if (offset < 0 || curNode != textNode) { ch = map$$1[j + (offset ? 1 : 0)]; }
9878
  return Pos(line, ch)
9879
  }
9880
  }
9881
  }
9882
  }
9883
- var found = find(textNode, topNode, offset);
9884
  if (found) { return badPos(found, bad) }
9885
 
9886
  // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems
9887
  for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) {
9888
- found = find(after, after.firstChild, 0);
9889
  if (found)
9890
  { return badPos(Pos(found.line, found.ch - dist), bad) }
9891
  else
9892
- { dist += after.textContent.length; }
9893
  }
9894
  for (var before = topNode.previousSibling, dist$1 = offset; before; before = before.previousSibling) {
9895
- found = find(before, before.firstChild, -1);
9896
  if (found)
9897
  { return badPos(Pos(found.line, found.ch + dist$1), bad) }
9898
  else
9899
- { dist$1 += before.textContent.length; }
9900
  }
9901
  }
9902
 
9903
  // TEXTAREA INPUT STYLE
9904
 
9905
  var TextareaInput = function(cm) {
9906
- this.cm = cm;
9907
  // See input.poll and input.reset
9908
- this.prevInput = "";
9909
 
9910
  // Flag that indicates whether we expect input to appear real soon
9911
  // now (after some event like 'keypress' or 'input') and are
9912
  // polling intensively.
9913
- this.pollingFast = false;
9914
  // Self-resetting timeout for the poller
9915
- this.polling = new Delayed();
9916
  // Tracks when input.reset has punted to just putting a short
9917
  // string into the textarea instead of the full selection.
9918
- this.inaccurateSelection = false;
9919
  // Used to work around IE issue with selection being forgotten when focus moves away from textarea
9920
- this.hasSelection = false;
9921
- this.composing = null;
9922
  };
9923
 
9924
  TextareaInput.prototype.init = function (display) {
9925
  var this$1 = this;
9926
 
9927
- var input = this, cm = this.cm;
9928
 
9929
  // Wraps and hides input textarea
9930
- var div = this.wrapper = hiddenTextarea();
9931
  // The semihidden textarea that is focused when the editor is
9932
  // focused, and receives input.
9933
- var te = this.textarea = div.firstChild;
9934
- display.wrapper.insertBefore(div, display.wrapper.firstChild);
9935
 
9936
  // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)
9937
- if (ios) { te.style.width = "0px"; }
9938
 
9939
  on(te, "input", function () {
9940
- if (ie && ie_version >= 9 && this$1.hasSelection) { this$1.hasSelection = null; }
9941
- input.poll();
9942
- });
9943
 
9944
  on(te, "paste", function (e) {
9945
  if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }
9946
 
9947
- cm.state.pasteIncoming = true;
9948
- input.fastPoll();
9949
- });
9950
 
9951
  function prepareCopyCut(e) {
9952
  if (signalDOMEvent(cm, e)) { return }
9953
  if (cm.somethingSelected()) {
9954
- setLastCopied({lineWise: false, text: cm.getSelections()});
9955
  if (input.inaccurateSelection) {
9956
- input.prevInput = "";
9957
- input.inaccurateSelection = false;
9958
- te.value = lastCopied.text.join("\n");
9959
- selectInput(te);
9960
  }
9961
  } else if (!cm.options.lineWiseCopyCut) {
9962
  return
9963
  } else {
9964
- var ranges = copyableRanges(cm);
9965
- setLastCopied({lineWise: true, text: ranges.text});
9966
  if (e.type == "cut") {
9967
- cm.setSelections(ranges.ranges, null, sel_dontScroll);
9968
  } else {
9969
- input.prevInput = "";
9970
- te.value = ranges.text.join("\n");
9971
- selectInput(te);
9972
  }
9973
  }
9974
- if (e.type == "cut") { cm.state.cutIncoming = true; }
9975
  }
9976
- on(te, "cut", prepareCopyCut);
9977
- on(te, "copy", prepareCopyCut);
9978
 
9979
  on(display.scroller, "paste", function (e) {
9980
  if (eventInWidget(display, e) || signalDOMEvent(cm, e)) { return }
9981
- cm.state.pasteIncoming = true;
9982
- input.focus();
9983
- });
9984
 
9985
  // Prevent normal selection in the editor (we handle our own)
9986
  on(display.lineSpace, "selectstart", function (e) {
9987
- if (!eventInWidget(display, e)) { e_preventDefault(e); }
9988
- });
9989
 
9990
  on(te, "compositionstart", function () {
9991
- var start = cm.getCursor("from");
9992
- if (input.composing) { input.composing.range.clear(); }
9993
  input.composing = {
9994
  start: start,
9995
  range: cm.markText(start, cm.getCursor("to"), {className: "CodeMirror-composing"})
9996
- };
9997
- });
9998
  on(te, "compositionend", function () {
9999
  if (input.composing) {
10000
- input.poll();
10001
- input.composing.range.clear();
10002
- input.composing = null;
10003
  }
10004
- });
10005
  };
10006
 
10007
  TextareaInput.prototype.prepareSelection = function () {
10008
  // Redraw the selection and/or cursor
10009
- var cm = this.cm, display = cm.display, doc = cm.doc;
10010
- var result = prepareSelection(cm);
10011
 
10012
  // Move the hidden textarea near the cursor to prevent scrolling artifacts
10013
  if (cm.options.moveInputWithCursor) {
10014
- var headPos = cursorCoords(cm, doc.sel.primary().head, "div");
10015
- var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect();
10016
  result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,
10017
- headPos.top + lineOff.top - wrapOff.top));
10018
  result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,
10019
- headPos.left + lineOff.left - wrapOff.left));
10020
  }
10021
 
10022
  return result
10023
  };
10024
 
10025
  TextareaInput.prototype.showSelection = function (drawn) {
10026
- var cm = this.cm, display = cm.display;
10027
- removeChildrenAndAdd(display.cursorDiv, drawn.cursors);
10028
- removeChildrenAndAdd(display.selectionDiv, drawn.selection);
10029
  if (drawn.teTop != null) {
10030
- this.wrapper.style.top = drawn.teTop + "px";
10031
- this.wrapper.style.left = drawn.teLeft + "px";
10032
  }
10033
  };
10034
 
@@ -10036,21 +9962,21 @@ webpackJsonp([2],{
10036
  // when not typing and nothing is selected)
10037
  TextareaInput.prototype.reset = function (typing) {
10038
  if (this.contextMenuPending) { return }
10039
- var minimal, selected, cm = this.cm, doc = cm.doc;
10040
  if (cm.somethingSelected()) {
10041
- this.prevInput = "";
10042
- var range$$1 = doc.sel.primary();
10043
  minimal = hasCopyEvent &&
10044
- (range$$1.to().line - range$$1.from().line > 100 || (selected = cm.getSelection()).length > 1000);
10045
- var content = minimal ? "-" : selected || cm.getSelection();
10046
- this.textarea.value = content;
10047
- if (cm.state.focused) { selectInput(this.textarea); }
10048
- if (ie && ie_version >= 9) { this.hasSelection = content; }
10049
  } else if (!typing) {
10050
- this.prevInput = this.textarea.value = "";
10051
- if (ie && ie_version >= 9) { this.hasSelection = null; }
10052
  }
10053
- this.inaccurateSelection = minimal;
10054
  };
10055
 
10056
  TextareaInput.prototype.getField = function () { return this.textarea };
@@ -10059,18 +9985,18 @@ webpackJsonp([2],{
10059
 
10060
  TextareaInput.prototype.focus = function () {
10061
  if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt() != this.textarea)) {
10062
- try { this.textarea.focus(); }
10063
  catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM
10064
  }
10065
  };
10066
 
10067
- TextareaInput.prototype.blur = function () { this.textarea.blur(); };
10068
 
10069
  TextareaInput.prototype.resetPosition = function () {
10070
- this.wrapper.style.top = this.wrapper.style.left = 0;
10071
  };
10072
 
10073
- TextareaInput.prototype.receivedFocus = function () { this.slowPoll(); };
10074
 
10075
  // Poll for input changes, using the normal rate of polling. This
10076
  // runs as long as the editor is focused.
@@ -10079,23 +10005,23 @@ webpackJsonp([2],{
10079
 
10080
  if (this.pollingFast) { return }
10081
  this.polling.set(this.cm.options.pollInterval, function () {
10082
- this$1.poll();
10083
- if (this$1.cm.state.focused) { this$1.slowPoll(); }
10084
- });
10085
  };
10086
 
10087
  // When an event has just come in that is likely to add or change
10088
  // something in the input textarea, we poll faster, to ensure that
10089
  // the change appears on the screen quickly.
10090
  TextareaInput.prototype.fastPoll = function () {
10091
- var missed = false, input = this;
10092
- input.pollingFast = true;
10093
  function p() {
10094
- var changed = input.poll();
10095
- if (!changed && !missed) {missed = true; input.polling.set(60, p);}
10096
- else {input.pollingFast = false; input.slowPoll();}
10097
  }
10098
- input.polling.set(20, p);
10099
  };
10100
 
10101
  // Read input from the textarea, and update the document to match.
@@ -10107,7 +10033,7 @@ webpackJsonp([2],{
10107
  TextareaInput.prototype.poll = function () {
10108
  var this$1 = this;
10109
 
10110
- var cm = this.cm, input = this.textarea, prevInput = this.prevInput;
10111
  // Since this is called a *lot*, try to bail out as cheaply as
10112
  // possible when it is clear that nothing happened. hasSelection
10113
  // will be the case when there is a lot of text in the textarea,
@@ -10117,7 +10043,7 @@ webpackJsonp([2],{
10117
  cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq)
10118
  { return false }
10119
 
10120
- var text = input.value;
10121
  // If nothing changed, bail.
10122
  if (text == prevInput && !cm.somethingSelected()) { return false }
10123
  // Work around nonsensical selection resetting in IE9/10, and
@@ -10125,291 +10051,290 @@ webpackJsonp([2],{
10125
  // some key combos in Mac (#2689).
10126
  if (ie && ie_version >= 9 && this.hasSelection === text ||
10127
  mac && /[\uf700-\uf7ff]/.test(text)) {
10128
- cm.display.input.reset();
10129
  return false
10130
  }
10131
 
10132
  if (cm.doc.sel == cm.display.selForContextMenu) {
10133
- var first = text.charCodeAt(0);
10134
- if (first == 0x200b && !prevInput) { prevInput = "\u200b"; }
10135
  if (first == 0x21da) { this.reset(); return this.cm.execCommand("undo") }
10136
  }
10137
  // Find the part of the input that is actually new
10138
- var same = 0, l = Math.min(prevInput.length, text.length);
10139
- while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) { ++same; }
10140
 
10141
  runInOp(cm, function () {
10142
  applyTextInput(cm, text.slice(same), prevInput.length - same,
10143
- null, this$1.composing ? "*compose" : null);
10144
 
10145
  // Don't leave long text in the textarea, since it makes further polling slow
10146
- if (text.length > 1000 || text.indexOf("\n") > -1) { input.value = this$1.prevInput = ""; }
10147
- else { this$1.prevInput = text; }
10148
 
10149
  if (this$1.composing) {
10150
- this$1.composing.range.clear();
10151
  this$1.composing.range = cm.markText(this$1.composing.start, cm.getCursor("to"),
10152
- {className: "CodeMirror-composing"});
10153
  }
10154
- });
10155
  return true
10156
  };
10157
 
10158
  TextareaInput.prototype.ensurePolled = function () {
10159
- if (this.pollingFast && this.poll()) { this.pollingFast = false; }
10160
  };
10161
 
10162
  TextareaInput.prototype.onKeyPress = function () {
10163
- if (ie && ie_version >= 9) { this.hasSelection = null; }
10164
- this.fastPoll();
10165
  };
10166
 
10167
  TextareaInput.prototype.onContextMenu = function (e) {
10168
- var input = this, cm = input.cm, display = cm.display, te = input.textarea;
10169
- var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;
10170
  if (!pos || presto) { return } // Opera is difficult.
10171
 
10172
  // Reset the current text selection only if the click is done outside of the selection
10173
  // and 'resetSelectionOnContextMenu' option is true.
10174
- var reset = cm.options.resetSelectionOnContextMenu;
10175
  if (reset && cm.doc.sel.contains(pos) == -1)
10176
- { operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll); }
10177
-
10178
- var oldCSS = te.style.cssText, oldWrapperCSS = input.wrapper.style.cssText;
10179
- input.wrapper.style.cssText = "position: absolute";
10180
- var wrapperBox = input.wrapper.getBoundingClientRect();
10181
- te.style.cssText = "position: absolute; width: 30px; height: 30px;\n top: " + (e.clientY - wrapperBox.top - 5) + "px; left: " + (e.clientX - wrapperBox.left - 5) + "px;\n z-index: 1000; background: " + (ie ? "rgba(255, 255, 255, .05)" : "transparent") + ";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";
10182
- var oldScrollY;
10183
- if (webkit) { oldScrollY = window.scrollY; } // Work around Chrome issue (#2712)
10184
- display.input.focus();
10185
- if (webkit) { window.scrollTo(null, oldScrollY); }
10186
- display.input.reset();
10187
  // Adds "Select all" to context menu in FF
10188
- if (!cm.somethingSelected()) { te.value = input.prevInput = " "; }
10189
- input.contextMenuPending = true;
10190
- display.selForContextMenu = cm.doc.sel;
10191
- clearTimeout(display.detectingSelectAll);
10192
 
10193
  // Select-all will be greyed out if there's nothing to select, so
10194
  // this adds a zero-width space so that we can later check whether
10195
  // it got selected.
10196
  function prepareSelectAllHack() {
10197
  if (te.selectionStart != null) {
10198
- var selected = cm.somethingSelected();
10199
- var extval = "\u200b" + (selected ? te.value : "");
10200
- te.value = "\u21da"; // Used to catch context-menu undo
10201
- te.value = extval;
10202
- input.prevInput = selected ? "" : "\u200b";
10203
- te.selectionStart = 1; te.selectionEnd = extval.length;
10204
  // Re-set this, in case some other handler touched the
10205
  // selection in the meantime.
10206
- display.selForContextMenu = cm.doc.sel;
10207
  }
10208
  }
10209
  function rehide() {
10210
- input.contextMenuPending = false;
10211
- input.wrapper.style.cssText = oldWrapperCSS;
10212
- te.style.cssText = oldCSS;
10213
- if (ie && ie_version < 9) { display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos); }
10214
 
10215
  // Try to detect the user choosing select-all
10216
  if (te.selectionStart != null) {
10217
- if (!ie || (ie && ie_version < 9)) { prepareSelectAllHack(); }
10218
  var i = 0, poll = function () {
10219
  if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 &&
10220
  te.selectionEnd > 0 && input.prevInput == "\u200b") {
10221
- operation(cm, selectAll)(cm);
10222
  } else if (i++ < 10) {
10223
- display.detectingSelectAll = setTimeout(poll, 500);
10224
  } else {
10225
- display.selForContextMenu = null;
10226
- display.input.reset();
10227
  }
10228
- };
10229
- display.detectingSelectAll = setTimeout(poll, 200);
10230
  }
10231
  }
10232
 
10233
- if (ie && ie_version >= 9) { prepareSelectAllHack(); }
10234
  if (captureRightClick) {
10235
- e_stop(e);
10236
  var mouseup = function () {
10237
- off(window, "mouseup", mouseup);
10238
- setTimeout(rehide, 20);
10239
- };
10240
- on(window, "mouseup", mouseup);
10241
  } else {
10242
- setTimeout(rehide, 50);
10243
  }
10244
  };
10245
 
10246
  TextareaInput.prototype.readOnlyChanged = function (val) {
10247
- if (!val) { this.reset(); }
10248
  };
10249
 
10250
  TextareaInput.prototype.setUneditable = function () {};
10251
 
10252
- TextareaInput.prototype.needsContentAttribute = false;
10253
 
10254
  function fromTextArea(textarea, options) {
10255
- options = options ? copyObj(options) : {};
10256
- options.value = textarea.value;
10257
  if (!options.tabindex && textarea.tabIndex)
10258
- { options.tabindex = textarea.tabIndex; }
10259
  if (!options.placeholder && textarea.placeholder)
10260
- { options.placeholder = textarea.placeholder; }
10261
  // Set autofocus to true if this textarea is focused, or if it has
10262
  // autofocus and no other element is focused.
10263
  if (options.autofocus == null) {
10264
- var hasFocus = activeElt();
10265
  options.autofocus = hasFocus == textarea ||
10266
- textarea.getAttribute("autofocus") != null && hasFocus == document.body;
10267
  }
10268
 
10269
- function save() {textarea.value = cm.getValue();}
10270
 
10271
- var realSubmit;
10272
  if (textarea.form) {
10273
- on(textarea.form, "submit", save);
10274
  // Deplorable hack to make the submit method do the right thing.
10275
  if (!options.leaveSubmitMethodAlone) {
10276
- var form = textarea.form;
10277
- realSubmit = form.submit;
10278
  try {
10279
  var wrappedSubmit = form.submit = function () {
10280
- save();
10281
- form.submit = realSubmit;
10282
- form.submit();
10283
- form.submit = wrappedSubmit;
10284
- };
10285
  } catch(e) {}
10286
  }
10287
  }
10288
 
10289
  options.finishInit = function (cm) {
10290
- cm.save = save;
10291
- cm.getTextArea = function () { return textarea; };
10292
  cm.toTextArea = function () {
10293
- cm.toTextArea = isNaN; // Prevent this from being ran twice
10294
- save();
10295
- textarea.parentNode.removeChild(cm.getWrapperElement());
10296
- textarea.style.display = "";
10297
  if (textarea.form) {
10298
- off(textarea.form, "submit", save);
10299
  if (typeof textarea.form.submit == "function")
10300
- { textarea.form.submit = realSubmit; }
10301
  }
10302
- };
10303
- };
10304
 
10305
- textarea.style.display = "none";
10306
- var cm = CodeMirror$1(function (node) { return textarea.parentNode.insertBefore(node, textarea.nextSibling); },
10307
- options);
10308
  return cm
10309
  }
10310
 
10311
  function addLegacyProps(CodeMirror) {
10312
- CodeMirror.off = off;
10313
- CodeMirror.on = on;
10314
- CodeMirror.wheelEventPixels = wheelEventPixels;
10315
- CodeMirror.Doc = Doc;
10316
- CodeMirror.splitLines = splitLinesAuto;
10317
- CodeMirror.countColumn = countColumn;
10318
- CodeMirror.findColumn = findColumn;
10319
- CodeMirror.isWordChar = isWordCharBasic;
10320
- CodeMirror.Pass = Pass;
10321
- CodeMirror.signal = signal;
10322
- CodeMirror.Line = Line;
10323
- CodeMirror.changeEnd = changeEnd;
10324
- CodeMirror.scrollbarModel = scrollbarModel;
10325
- CodeMirror.Pos = Pos;
10326
- CodeMirror.cmpPos = cmp;
10327
- CodeMirror.modes = modes;
10328
- CodeMirror.mimeModes = mimeModes;
10329
- CodeMirror.resolveMode = resolveMode;
10330
- CodeMirror.getMode = getMode;
10331
- CodeMirror.modeExtensions = modeExtensions;
10332
- CodeMirror.extendMode = extendMode;
10333
- CodeMirror.copyState = copyState;
10334
- CodeMirror.startState = startState;
10335
- CodeMirror.innerMode = innerMode;
10336
- CodeMirror.commands = commands;
10337
- CodeMirror.keyMap = keyMap;
10338
- CodeMirror.keyName = keyName;
10339
- CodeMirror.isModifierKey = isModifierKey;
10340
- CodeMirror.lookupKey = lookupKey;
10341
- CodeMirror.normalizeKeyMap = normalizeKeyMap;
10342
- CodeMirror.StringStream = StringStream;
10343
- CodeMirror.SharedTextMarker = SharedTextMarker;
10344
- CodeMirror.TextMarker = TextMarker;
10345
- CodeMirror.LineWidget = LineWidget;
10346
- CodeMirror.e_preventDefault = e_preventDefault;
10347
- CodeMirror.e_stopPropagation = e_stopPropagation;
10348
- CodeMirror.e_stop = e_stop;
10349
- CodeMirror.addClass = addClass;
10350
- CodeMirror.contains = contains;
10351
- CodeMirror.rmClass = rmClass;
10352
- CodeMirror.keyNames = keyNames;
10353
  }
10354
 
10355
  // EDITOR CONSTRUCTOR
10356
 
10357
- defineOptions(CodeMirror$1);
10358
 
10359
- addEditorMethods(CodeMirror$1);
10360
 
10361
  // Set up methods on CodeMirror's prototype to redirect to the editor's document.
10362
- var dontDelegate = "iter insert remove copy getEditor constructor".split(" ");
10363
  for (var prop in Doc.prototype) { if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)
10364
- { CodeMirror$1.prototype[prop] = (function(method) {
10365
  return function() {return method.apply(this.doc, arguments)}
10366
- })(Doc.prototype[prop]); } }
10367
 
10368
- eventMixin(Doc);
10369
 
10370
  // INPUT HANDLING
10371
 
10372
- CodeMirror$1.inputStyles = {"textarea": TextareaInput, "contenteditable": ContentEditableInput};
10373
 
10374
  // MODE DEFINITION AND QUERYING
10375
 
10376
  // Extra arguments are stored as the mode's dependencies, which is
10377
  // used by (legacy) mechanisms like loadmode.js to automatically
10378
  // load a mode. (Preferred mechanism is the require/define calls.)
10379
- CodeMirror$1.defineMode = function(name/*, mode, …*/) {
10380
- if (!CodeMirror$1.defaults.mode && name != "null") { CodeMirror$1.defaults.mode = name; }
10381
- defineMode.apply(this, arguments);
10382
- };
10383
 
10384
- CodeMirror$1.defineMIME = defineMIME;
10385
 
10386
  // Minimal default mode.
10387
- CodeMirror$1.defineMode("null", function () { return ({token: function (stream) { return stream.skipToEnd(); }}); });
10388
- CodeMirror$1.defineMIME("text/plain", "null");
10389
 
10390
  // EXTENSIONS
10391
 
10392
- CodeMirror$1.defineExtension = function (name, func) {
10393
- CodeMirror$1.prototype[name] = func;
10394
- };
10395
- CodeMirror$1.defineDocExtension = function (name, func) {
10396
- Doc.prototype[name] = func;
10397
- };
10398
 
10399
- CodeMirror$1.fromTextArea = fromTextArea;
10400
 
10401
- addLegacyProps(CodeMirror$1);
10402
 
10403
- CodeMirror$1.version = "5.25.0";
10404
 
10405
- return CodeMirror$1;
10406
 
10407
  })));
10408
 
10409
-
10410
  /***/ },
10411
 
10412
- /***/ 454:
10413
  /***/ function(module, exports, __webpack_require__) {
10414
 
10415
  // CodeMirror, copyright (c) by Marijn Haverbeke and others
@@ -10417,7 +10342,7 @@ webpackJsonp([2],{
10417
 
10418
  (function(mod) {
10419
  if (true) // CommonJS
10420
- mod(__webpack_require__(452));
10421
  else if (typeof define == "function" && define.amd) // AMD
10422
  define(["../../lib/codemirror"], mod);
10423
  else // Plain browser env
@@ -11081,7 +11006,7 @@ webpackJsonp([2],{
11081
  "small", "small-caps", "small-caption", "smaller", "soft-light", "solid", "somali",
11082
  "source-atop", "source-in", "source-out", "source-over", "space", "space-around", "space-between", "spell-out", "square",
11083
  "square-button", "start", "static", "status-bar", "stretch", "stroke", "sub",
11084
- "subpixel-antialiased", "super", "sw-resize", "symbolic", "symbols", "system-ui", "table",
11085
  "table-caption", "table-cell", "table-column", "table-column-group",
11086
  "table-footer-group", "table-header-group", "table-row", "table-row-group",
11087
  "tamil",
3
  /***/ 0:
4
  /***/ function(module, exports, __webpack_require__) {
5
 
6
+ __webpack_require__(443);
7
+ __webpack_require__(445);
8
+ module.exports = __webpack_require__(447);
9
 
10
 
11
  /***/ },
12
 
13
+ /***/ 443:
14
  /***/ function(module, exports, __webpack_require__) {
15
 
16
+ /* WEBPACK VAR INJECTION */(function(global) {module.exports = global["WysijaForm"] = __webpack_require__(444);
17
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
18
 
19
  /***/ },
20
 
21
+ /***/ 444:
22
  /***/ function(module, exports) {
23
 
24
  /*
1089
 
1090
  /***/ },
1091
 
1092
+ /***/ 445:
1093
  /***/ function(module, exports, __webpack_require__) {
1094
 
1095
+ /* WEBPACK VAR INJECTION */(function(global) {module.exports = global["CodeMirror"] = __webpack_require__(446);
1096
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
1097
 
1098
  /***/ },
1099
 
1100
+ /***/ 446:
1101
  /***/ function(module, exports, __webpack_require__) {
1102
 
1103
  // CodeMirror, copyright (c) by Marijn Haverbeke and others
1110
  // at http://marijnhaverbeke.nl/blog/#cm-internals .
1111
 
1112
  (function (global, factory) {
1113
+ true ? module.exports = factory() :
1114
+ typeof define === 'function' && define.amd ? define(factory) :
1115
+ (global.CodeMirror = factory());
1116
  }(this, (function () { 'use strict';
1117
 
1118
  // Kludges for bugs and behavior differences that can't be feature
1119
  // detected are enabled based on userAgent etc sniffing.
1120
+ var userAgent = navigator.userAgent
1121
+ var platform = navigator.platform
1122
+
1123
+ var gecko = /gecko\/\d/i.test(userAgent)
1124
+ var ie_upto10 = /MSIE \d/.test(userAgent)
1125
+ var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(userAgent)
1126
+ var edge = /Edge\/(\d+)/.exec(userAgent)
1127
+ var ie = ie_upto10 || ie_11up || edge
1128
+ var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1])
1129
+ var webkit = !edge && /WebKit\//.test(userAgent)
1130
+ var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(userAgent)
1131
+ var chrome = !edge && /Chrome\//.test(userAgent)
1132
+ var presto = /Opera\//.test(userAgent)
1133
+ var safari = /Apple Computer/.test(navigator.vendor)
1134
+ var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(userAgent)
1135
+ var phantom = /PhantomJS/.test(userAgent)
1136
+
1137
+ var ios = !edge && /AppleWebKit/.test(userAgent) && /Mobile\/\w+/.test(userAgent)
 
1138
  // This is woefully incomplete. Suggestions for alternative methods welcome.
1139
+ var mobile = ios || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent)
1140
+ var mac = ios || /Mac/.test(platform)
1141
+ var chromeOS = /\bCrOS\b/.test(userAgent)
1142
+ var windows = /win/i.test(platform)
1143
+
1144
+ var presto_version = presto && userAgent.match(/Version\/(\d*\.\d*)/)
1145
+ if (presto_version) { presto_version = Number(presto_version[1]) }
1146
+ if (presto_version && presto_version >= 15) { presto = false; webkit = true }
1147
  // Some browsers use the wrong event properties to signal cmd/ctrl on OS X
1148
+ var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11))
1149
+ var captureRightClick = gecko || (ie && ie_version >= 9)
1150
 
1151
  function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*") }
1152
 
1153
  var rmClass = function(node, cls) {
1154
+ var current = node.className
1155
+ var match = classTest(cls).exec(current)
1156
  if (match) {
1157
+ var after = current.slice(match.index + match[0].length)
1158
+ node.className = current.slice(0, match.index) + (after ? match[1] + after : "")
1159
  }
1160
+ }
1161
 
1162
  function removeChildren(e) {
1163
  for (var count = e.childNodes.length; count > 0; --count)
1164
+ { e.removeChild(e.firstChild) }
1165
  return e
1166
  }
1167
 
1170
  }
1171
 
1172
  function elt(tag, content, className, style) {
1173
+ var e = document.createElement(tag)
1174
+ if (className) { e.className = className }
1175
+ if (style) { e.style.cssText = style }
1176
+ if (typeof content == "string") { e.appendChild(document.createTextNode(content)) }
1177
+ else if (content) { for (var i = 0; i < content.length; ++i) { e.appendChild(content[i]) } }
 
 
 
 
 
 
1178
  return e
1179
  }
1180
 
1181
+ var range
1182
  if (document.createRange) { range = function(node, start, end, endNode) {
1183
+ var r = document.createRange()
1184
+ r.setEnd(endNode || node, end)
1185
+ r.setStart(node, start)
1186
  return r
1187
+ } }
1188
  else { range = function(node, start, end) {
1189
+ var r = document.body.createTextRange()
1190
+ try { r.moveToElementText(node.parentNode) }
1191
  catch(e) { return r }
1192
+ r.collapse(true)
1193
+ r.moveEnd("character", end)
1194
+ r.moveStart("character", start)
1195
  return r
1196
+ } }
1197
 
1198
  function contains(parent, child) {
1199
  if (child.nodeType == 3) // Android browser always returns false when child is a textnode
1200
+ { child = child.parentNode }
1201
  if (parent.contains)
1202
  { return parent.contains(child) }
1203
  do {
1204
+ if (child.nodeType == 11) { child = child.host }
1205
  if (child == parent) { return true }
1206
  } while (child = child.parentNode)
1207
  }
1210
  // IE and Edge may throw an "Unspecified Error" when accessing document.activeElement.
1211
  // IE < 10 will throw when accessed while the page is loading or in an iframe.
1212
  // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable.
1213
+ var activeElement
1214
  try {
1215
+ activeElement = document.activeElement
1216
  } catch(e) {
1217
+ activeElement = document.body || null
1218
  }
1219
+ while (activeElement && activeElement.root && activeElement.root.activeElement)
1220
+ { activeElement = activeElement.root.activeElement }
1221
  return activeElement
1222
  }
1223
 
1224
  function addClass(node, cls) {
1225
+ var current = node.className
1226
+ if (!classTest(cls).test(current)) { node.className += (current ? " " : "") + cls }
1227
  }
1228
  function joinClasses(a, b) {
1229
+ var as = a.split(" ")
1230
  for (var i = 0; i < as.length; i++)
1231
+ { if (as[i] && !classTest(as[i]).test(b)) { b += " " + as[i] } }
1232
  return b
1233
  }
1234
 
1235
+ var selectInput = function(node) { node.select() }
1236
  if (ios) // Mobile Safari apparently has a bug where select() is broken.
1237
+ { selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length } }
1238
  else if (ie) // Suppress mysterious IE10 errors
1239
+ { selectInput = function(node) { try { node.select() } catch(_e) {} } }
1240
 
1241
  function bind(f) {
1242
+ var args = Array.prototype.slice.call(arguments, 1)
1243
  return function(){return f.apply(null, args)}
1244
  }
1245
 
1246
  function copyObj(obj, target, overwrite) {
1247
+ if (!target) { target = {} }
1248
  for (var prop in obj)
1249
  { if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))
1250
+ { target[prop] = obj[prop] } }
1251
  return target
1252
  }
1253
 
1255
  // Used mostly to find indentation.
1256
  function countColumn(string, end, tabSize, startIndex, startValue) {
1257
  if (end == null) {
1258
+ end = string.search(/[^\s\u00a0]/)
1259
+ if (end == -1) { end = string.length }
1260
  }
1261
  for (var i = startIndex || 0, n = startValue || 0;;) {
1262
+ var nextTab = string.indexOf("\t", i)
1263
  if (nextTab < 0 || nextTab >= end)
1264
  { return n + (end - i) }
1265
+ n += nextTab - i
1266
+ n += tabSize - (n % tabSize)
1267
+ i = nextTab + 1
1268
  }
1269
  }
1270
 
1271
+ var Delayed = function() {this.id = null};
1272
  Delayed.prototype.set = function (ms, f) {
1273
+ clearTimeout(this.id)
1274
+ this.id = setTimeout(f, ms)
1275
  };
1276
 
1277
  function indexOf(array, elt) {
1281
  }
1282
 
1283
  // Number of pixels added to scroller and sizer to hide scrollbar
1284
+ var scrollerGap = 30
1285
 
1286
  // Returned or thrown by various protocols to signal 'I'm not
1287
  // handling this'.
1288
+ var Pass = {toString: function(){return "CodeMirror.Pass"}}
1289
 
1290
  // Reused option objects for setSelection & friends
1291
  var sel_dontScroll = {scroll: false};
1292
  var sel_mouse = {origin: "*mouse"};
1293
  var sel_move = {origin: "+move"};
 
1294
  // The inverse of countColumn -- find the offset that corresponds to
1295
  // a particular column.
1296
  function findColumn(string, goal, tabSize) {
1297
  for (var pos = 0, col = 0;;) {
1298
+ var nextTab = string.indexOf("\t", pos)
1299
+ if (nextTab == -1) { nextTab = string.length }
1300
+ var skipped = nextTab - pos
1301
  if (nextTab == string.length || col + skipped >= goal)
1302
  { return pos + Math.min(skipped, goal - col) }
1303
+ col += nextTab - pos
1304
+ col += tabSize - (col % tabSize)
1305
+ pos = nextTab + 1
1306
  if (col >= goal) { return pos }
1307
  }
1308
  }
1309
 
1310
+ var spaceStrs = [""]
1311
  function spaceStr(n) {
1312
  while (spaceStrs.length <= n)
1313
+ { spaceStrs.push(lst(spaceStrs) + " ") }
1314
  return spaceStrs[n]
1315
  }
1316
 
1317
  function lst(arr) { return arr[arr.length-1] }
1318
 
1319
  function map(array, f) {
1320
+ var out = []
1321
+ for (var i = 0; i < array.length; i++) { out[i] = f(array[i], i) }
1322
  return out
1323
  }
1324
 
1325
  function insertSorted(array, value, score) {
1326
+ var pos = 0, priority = score(value)
1327
+ while (pos < array.length && score(array[pos]) <= priority) { pos++ }
1328
+ array.splice(pos, 0, value)
1329
  }
1330
 
1331
  function nothing() {}
1332
 
1333
  function createObj(base, props) {
1334
+ var inst
1335
  if (Object.create) {
1336
+ inst = Object.create(base)
1337
  } else {
1338
+ nothing.prototype = base
1339
+ inst = new nothing()
1340
  }
1341
+ if (props) { copyObj(props, inst) }
1342
  return inst
1343
  }
1344
 
1345
+ var nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/
1346
  function isWordCharBasic(ch) {
1347
  return /\w/.test(ch) || ch > "\x80" &&
1348
  (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch))
1363
  // as editing and measuring is concerned. This is not fully correct,
1364
  // since some scripts/fonts/browsers also treat other configurations
1365
  // of code points as a group.
1366
+ var extendingChars = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/
1367
  function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch) }
1368
 
1369
  // Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range.
1370
  function skipExtendingChars(str, pos, dir) {
1371
+ while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir }
1372
  return pos
1373
  }
1374
 
1377
  function findFirst(pred, from, to) {
1378
  for (;;) {
1379
  if (Math.abs(from - to) <= 1) { return pred(from) ? from : to }
1380
+ var mid = Math.floor((from + to) / 2)
1381
+ if (pred(mid)) { to = mid }
1382
+ else { from = mid }
1383
  }
1384
  }
1385
 
1388
  // display-related state.
1389
 
1390
  function Display(place, doc, input) {
1391
+ var d = this
1392
+ this.input = input
1393
 
1394
  // Covers bottom-right square when both scrollbars are present.
1395
+ d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler")
1396
+ d.scrollbarFiller.setAttribute("cm-not-content", "true")
1397
  // Covers bottom of gutter when coverGutterNextToScrollbar is on
1398
  // and h scrollbar is present.
1399
+ d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler")
1400
+ d.gutterFiller.setAttribute("cm-not-content", "true")
1401
  // Will contain the actual code, positioned to cover the viewport.
1402
+ d.lineDiv = elt("div", null, "CodeMirror-code")
1403
  // Elements are added to these to represent selection and cursors.
1404
+ d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1")
1405
+ d.cursorDiv = elt("div", null, "CodeMirror-cursors")
1406
  // A visibility: hidden element used to find the size of things.
1407
+ d.measure = elt("div", null, "CodeMirror-measure")
1408
  // When lines outside of the viewport are measured, they are drawn in this.
1409
+ d.lineMeasure = elt("div", null, "CodeMirror-measure")
1410
  // Wraps everything that needs to exist inside the vertically-padded coordinate system
1411
+ d.lineSpace = elt("div", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],
1412
+ null, "position: relative; outline: none")
 
1413
  // Moved around its parent to cover visible view.
1414
+ d.mover = elt("div", [elt("div", [d.lineSpace], "CodeMirror-lines")], null, "position: relative")
1415
  // Set to the height of the document, allowing scrolling.
1416
+ d.sizer = elt("div", [d.mover], "CodeMirror-sizer")
1417
+ d.sizerWidth = null
1418
  // Behavior of elts with overflow: auto and padding is
1419
  // inconsistent across browsers. This is used to ensure the
1420
  // scrollable area is big enough.
1421
+ d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerGap + "px; width: 1px;")
1422
  // Will contain the gutters, if any.
1423
+ d.gutters = elt("div", null, "CodeMirror-gutters")
1424
+ d.lineGutter = null
1425
  // Actual scrollable element.
1426
+ d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll")
1427
+ d.scroller.setAttribute("tabIndex", "-1")
1428
  // The element in which the editor lives.
1429
+ d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror")
1430
 
1431
  // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)
1432
+ if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0 }
1433
+ if (!webkit && !(gecko && mobile)) { d.scroller.draggable = true }
1434
 
1435
  if (place) {
1436
+ if (place.appendChild) { place.appendChild(d.wrapper) }
1437
+ else { place(d.wrapper) }
1438
  }
1439
 
1440
  // Current rendered range (may be bigger than the view window).
1441
+ d.viewFrom = d.viewTo = doc.first
1442
+ d.reportedViewFrom = d.reportedViewTo = doc.first
1443
  // Information about the rendered lines.
1444
+ d.view = []
1445
+ d.renderedView = null
1446
  // Holds info about a single rendered line when it was rendered
1447
  // for measurement, while not in view.
1448
+ d.externalMeasured = null
1449
  // Empty space (in pixels) above the view
1450
+ d.viewOffset = 0
1451
+ d.lastWrapHeight = d.lastWrapWidth = 0
1452
+ d.updateLineNumbers = null
1453
 
1454
+ d.nativeBarWidth = d.barHeight = d.barWidth = 0
1455
+ d.scrollbarsClipped = false
1456
 
1457
  // Used to only resize the line number gutter when necessary (when
1458
  // the amount of lines crosses a boundary that makes its width change)
1459
+ d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null
1460
  // Set to true when a non-horizontal-scrolling line widget is
1461
  // added. As an optimization, line widget aligning is skipped when
1462
  // this is false.
1463
+ d.alignWidgets = false
1464
 
1465
+ d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null
1466
 
1467
  // Tracks the maximum line length so that the horizontal scrollbar
1468
  // can be kept static when scrolling.
1469
+ d.maxLine = null
1470
+ d.maxLineLength = 0
1471
+ d.maxLineChanged = false
1472
 
1473
  // Used for measuring wheel scrolling granularity
1474
+ d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null
1475
 
1476
  // True when shift is held down.
1477
+ d.shift = false
1478
 
1479
  // Used to track whether anything happened since the context menu
1480
  // was opened.
1481
+ d.selForContextMenu = null
1482
 
1483
+ d.activeTouch = null
1484
 
1485
+ input.init(d)
1486
  }
1487
 
1488
  // Find the line object corresponding to the given line number.
1489
  function getLine(doc, n) {
1490
+ n -= doc.first
1491
  if (n < 0 || n >= doc.size) { throw new Error("There is no line " + (n + doc.first) + " in the document.") }
1492
+ var chunk = doc
1493
  while (!chunk.lines) {
1494
  for (var i = 0;; ++i) {
1495
+ var child = chunk.children[i], sz = child.chunkSize()
1496
  if (n < sz) { chunk = child; break }
1497
+ n -= sz
1498
  }
1499
  }
1500
  return chunk.lines[n]
1503
  // Get the part of a document between two positions, as an array of
1504
  // strings.
1505
  function getBetween(doc, start, end) {
1506
+ var out = [], n = start.line
1507
  doc.iter(start.line, end.line + 1, function (line) {
1508
+ var text = line.text
1509
+ if (n == end.line) { text = text.slice(0, end.ch) }
1510
+ if (n == start.line) { text = text.slice(start.ch) }
1511
+ out.push(text)
1512
+ ++n
1513
+ })
1514
  return out
1515
  }
1516
  // Get the lines between from and to, as array of strings.
1517
  function getLines(doc, from, to) {
1518
+ var out = []
1519
+ doc.iter(from, to, function (line) { out.push(line.text) }) // iter aborts when callback returns truthy value
1520
  return out
1521
  }
1522
 
1523
  // Update the height of a line, propagating the height change
1524
  // upwards to parent nodes.
1525
  function updateLineHeight(line, height) {
1526
+ var diff = height - line.height
1527
+ if (diff) { for (var n = line; n; n = n.parent) { n.height += diff } }
1528
  }
1529
 
1530
  // Given a line object, find its line number by walking up through
1531
  // its parent links.
1532
  function lineNo(line) {
1533
  if (line.parent == null) { return null }
1534
+ var cur = line.parent, no = indexOf(cur.lines, line)
1535
  for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {
1536
  for (var i = 0;; ++i) {
1537
  if (chunk.children[i] == cur) { break }
1538
+ no += chunk.children[i].chunkSize()
1539
  }
1540
  }
1541
  return no + cur.first
1544
  // Find the line at the given vertical position, using the height
1545
  // information in the document tree.
1546
  function lineAtHeight(chunk, h) {
1547
+ var n = chunk.first
1548
  outer: do {
1549
  for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {
1550
+ var child = chunk.children[i$1], ch = child.height
1551
  if (h < ch) { chunk = child; continue outer }
1552
+ h -= ch
1553
+ n += child.chunkSize()
1554
  }
1555
  return n
1556
  } while (!chunk.lines)
1557
+ var i = 0
1558
  for (; i < chunk.lines.length; ++i) {
1559
+ var line = chunk.lines[i], lh = line.height
1560
  if (h < lh) { break }
1561
+ h -= lh
1562
  }
1563
  return n + i
1564
  }
1574
  if ( sticky === void 0 ) sticky = null;
1575
 
1576
  if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }
1577
+ this.line = line
1578
+ this.ch = ch
1579
+ this.sticky = sticky
1580
  }
1581
 
1582
  // Compare two positions, return 0 if they are the same, a negative
1594
  function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1))}
1595
  function clipPos(doc, pos) {
1596
  if (pos.line < doc.first) { return Pos(doc.first, 0) }
1597
+ var last = doc.first + doc.size - 1
1598
  if (pos.line > last) { return Pos(last, getLine(doc, last).text.length) }
1599
  return clipToLen(pos, getLine(doc, pos.line).text.length)
1600
  }
1601
  function clipToLen(pos, linelen) {
1602
+ var ch = pos.ch
1603
  if (ch == null || ch > linelen) { return Pos(pos.line, linelen) }
1604
  else if (ch < 0) { return Pos(pos.line, 0) }
1605
  else { return pos }
1606
  }
1607
  function clipPosArray(doc, array) {
1608
+ var out = []
1609
+ for (var i = 0; i < array.length; i++) { out[i] = clipPos(doc, array[i]) }
1610
  return out
1611
  }
1612
 
1613
  // Optimize some code when these features are not used.
1614
  var sawReadOnlySpans = false;
1615
  var sawCollapsedSpans = false;
 
1616
  function seeReadOnlySpans() {
1617
+ sawReadOnlySpans = true
1618
  }
1619
 
1620
  function seeCollapsedSpans() {
1621
+ sawCollapsedSpans = true
1622
  }
1623
 
1624
  // TEXTMARKER SPANS
1625
 
1626
  function MarkedSpan(marker, from, to) {
1627
+ this.marker = marker
1628
+ this.from = from; this.to = to
1629
  }
1630
 
1631
  // Search an array of spans for a span matching the given marker.
1632
  function getMarkedSpanFor(spans, marker) {
1633
  if (spans) { for (var i = 0; i < spans.length; ++i) {
1634
+ var span = spans[i]
1635
  if (span.marker == marker) { return span }
1636
  } }
1637
  }
1638
  // Remove a span from an array, returning undefined if no spans are
1639
  // left (we don't store arrays for lines without spans).
1640
  function removeMarkedSpan(spans, span) {
1641
+ var r
1642
  for (var i = 0; i < spans.length; ++i)
1643
+ { if (spans[i] != span) { (r || (r = [])).push(spans[i]) } }
1644
  return r
1645
  }
1646
  // Add a span to a line.
1647
  function addMarkedSpan(line, span) {
1648
+ line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span]
1649
+ span.marker.attachLine(line)
1650
  }
1651
 
1652
  // Used for the algorithm that adjusts markers for a change in the
1654
  // character position, returning an array of remaining chunks (or
1655
  // undefined if nothing remains).
1656
  function markedSpansBefore(old, startCh, isInsert) {
1657
+ var nw
1658
  if (old) { for (var i = 0; i < old.length; ++i) {
1659
+ var span = old[i], marker = span.marker
1660
+ var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh)
1661
  if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) {
1662
+ var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh)
1663
+ ;(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to))
1664
  }
1665
  } }
1666
  return nw
1667
  }
1668
  function markedSpansAfter(old, endCh, isInsert) {
1669
+ var nw
1670
  if (old) { for (var i = 0; i < old.length; ++i) {
1671
+ var span = old[i], marker = span.marker
1672
+ var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh)
1673
  if (endsAfter || span.from == endCh && marker.type == "bookmark" && (!isInsert || span.marker.insertLeft)) {
1674
+ var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh)
1675
+ ;(nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,
1676
+ span.to == null ? null : span.to - endCh))
1677
  }
1678
  } }
1679
  return nw
1687
  // arrays with one element for each line in (after) the change.
1688
  function stretchSpansOverChange(doc, change) {
1689
  if (change.full) { return null }
1690
+ var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans
1691
+ var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans
1692
  if (!oldFirst && !oldLast) { return null }
1693
 
1694
+ var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0
1695
  // Get the spans that 'stick out' on both sides
1696
+ var first = markedSpansBefore(oldFirst, startCh, isInsert)
1697
+ var last = markedSpansAfter(oldLast, endCh, isInsert)
1698
 
1699
  // Next, merge those two ends
1700
+ var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0)
1701
  if (first) {
1702
  // Fix up .to properties of first
1703
  for (var i = 0; i < first.length; ++i) {
1704
+ var span = first[i]
1705
  if (span.to == null) {
1706
+ var found = getMarkedSpanFor(last, span.marker)
1707
+ if (!found) { span.to = startCh }
1708
+ else if (sameLine) { span.to = found.to == null ? null : found.to + offset }
1709
  }
1710
  }
1711
  }
1712
  if (last) {
1713
  // Fix up .from in last (or move them into first in case of sameLine)
1714
  for (var i$1 = 0; i$1 < last.length; ++i$1) {
1715
+ var span$1 = last[i$1]
1716
+ if (span$1.to != null) { span$1.to += offset }
1717
  if (span$1.from == null) {
1718
+ var found$1 = getMarkedSpanFor(first, span$1.marker)
1719
  if (!found$1) {
1720
+ span$1.from = offset
1721
+ if (sameLine) { (first || (first = [])).push(span$1) }
1722
  }
1723
  } else {
1724
+ span$1.from += offset
1725
+ if (sameLine) { (first || (first = [])).push(span$1) }
1726
  }
1727
  }
1728
  }
1729
  // Make sure we didn't create any zero-length spans
1730
+ if (first) { first = clearEmptySpans(first) }
1731
+ if (last && last != first) { last = clearEmptySpans(last) }
1732
 
1733
+ var newMarkers = [first]
1734
  if (!sameLine) {
1735
  // Fill gap with whole-line-spans
1736
+ var gap = change.text.length - 2, gapMarkers
1737
  if (gap > 0 && first)
1738
  { for (var i$2 = 0; i$2 < first.length; ++i$2)
1739
  { if (first[i$2].to == null)
1740
+ { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)) } } }
1741
  for (var i$3 = 0; i$3 < gap; ++i$3)
1742
+ { newMarkers.push(gapMarkers) }
1743
+ newMarkers.push(last)
1744
  }
1745
  return newMarkers
1746
  }
1749
  // option of false.
1750
  function clearEmptySpans(spans) {
1751
  for (var i = 0; i < spans.length; ++i) {
1752
+ var span = spans[i]
1753
  if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)
1754
+ { spans.splice(i--, 1) }
1755
  }
1756
  if (!spans.length) { return null }
1757
  return spans
1759
 
1760
  // Used to 'clip' out readOnly ranges when making a change.
1761
  function removeReadOnlyRanges(doc, from, to) {
1762
+ var markers = null
1763
  doc.iter(from.line, to.line + 1, function (line) {
1764
  if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {
1765
+ var mark = line.markedSpans[i].marker
1766
  if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))
1767
+ { (markers || (markers = [])).push(mark) }
1768
  } }
1769
+ })
1770
  if (!markers) { return null }
1771
+ var parts = [{from: from, to: to}]
1772
  for (var i = 0; i < markers.length; ++i) {
1773
+ var mk = markers[i], m = mk.find(0)
1774
  for (var j = 0; j < parts.length; ++j) {
1775
+ var p = parts[j]
1776
  if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }
1777
+ var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to)
1778
  if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)
1779
+ { newParts.push({from: p.from, to: m.from}) }
1780
  if (dto > 0 || !mk.inclusiveRight && !dto)
1781
+ { newParts.push({from: m.to, to: p.to}) }
1782
+ parts.splice.apply(parts, newParts)
1783
+ j += newParts.length - 3
1784
  }
1785
  }
1786
  return parts
1788
 
1789
  // Connect or disconnect spans from a line.
1790
  function detachMarkedSpans(line) {
1791
+ var spans = line.markedSpans
1792
  if (!spans) { return }
1793
  for (var i = 0; i < spans.length; ++i)
1794
+ { spans[i].marker.detachLine(line) }
1795
+ line.markedSpans = null
1796
  }
1797
  function attachMarkedSpans(line, spans) {
1798
  if (!spans) { return }
1799
  for (var i = 0; i < spans.length; ++i)
1800
+ { spans[i].marker.attachLine(line) }
1801
+ line.markedSpans = spans
1802
  }
1803
 
1804
  // Helpers used when computing which overlapping collapsed span
1810
  // spans is larger (and thus includes the other). Falls back to
1811
  // comparing ids when the spans cover exactly the same range.
1812
  function compareCollapsedMarkers(a, b) {
1813
+ var lenDiff = a.lines.length - b.lines.length
1814
  if (lenDiff != 0) { return lenDiff }
1815
+ var aPos = a.find(), bPos = b.find()
1816
+ var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b)
1817
  if (fromCmp) { return -fromCmp }
1818
+ var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b)
1819
  if (toCmp) { return toCmp }
1820
  return b.id - a.id
1821
  }
1823
  // Find out whether a line ends or starts in a collapsed span. If
1824
  // so, return the marker for that span.
1825
  function collapsedSpanAtSide(line, start) {
1826
+ var sps = sawCollapsedSpans && line.markedSpans, found
1827
  if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {
1828
+ sp = sps[i]
1829
  if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&
1830
  (!found || compareCollapsedMarkers(found, sp.marker) < 0))
1831
+ { found = sp.marker }
1832
  } }
1833
  return found
1834
  }
1838
  // Test whether there exists a collapsed span that partially
1839
  // overlaps (covers the start or end, but not both) of a new span.
1840
  // Such overlap is not allowed.
1841
+ function conflictingCollapsedRange(doc, lineNo, from, to, marker) {
1842
+ var line = getLine(doc, lineNo)
1843
+ var sps = sawCollapsedSpans && line.markedSpans
1844
  if (sps) { for (var i = 0; i < sps.length; ++i) {
1845
+ var sp = sps[i]
1846
  if (!sp.marker.collapsed) { continue }
1847
+ var found = sp.marker.find(0)
1848
+ var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker)
1849
+ var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker)
1850
  if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }
1851
  if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||
1852
  fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))
1859
  // visual line. This finds the start of the visual line that the
1860
  // given line is part of (usually that is the line itself).
1861
  function visualLine(line) {
1862
+ var merged
1863
  while (merged = collapsedSpanAtStart(line))
1864
+ { line = merged.find(-1, true).line }
1865
  return line
1866
  }
1867
 
1868
  function visualLineEnd(line) {
1869
+ var merged
1870
  while (merged = collapsedSpanAtEnd(line))
1871
+ { line = merged.find(1, true).line }
1872
  return line
1873
  }
1874
 
1875
  // Returns an array of logical lines that continue the visual line
1876
  // started by the argument, or undefined if there are no such lines.
1877
  function visualLineContinued(line) {
1878
+ var merged, lines
1879
  while (merged = collapsedSpanAtEnd(line)) {
1880
  line = merged.find(1, true).line
1881
+ ;(lines || (lines = [])).push(line)
1882
  }
1883
  return lines
1884
  }
1886
  // Get the line number of the start of the visual line that the
1887
  // given line number is part of.
1888
  function visualLineNo(doc, lineN) {
1889
+ var line = getLine(doc, lineN), vis = visualLine(line)
1890
  if (line == vis) { return lineN }
1891
  return lineNo(vis)
1892
  }
1895
  // the given line.
1896
  function visualLineEndNo(doc, lineN) {
1897
  if (lineN > doc.lastLine()) { return lineN }
1898
+ var line = getLine(doc, lineN), merged
1899
  if (!lineIsHidden(doc, line)) { return lineN }
1900
  while (merged = collapsedSpanAtEnd(line))
1901
+ { line = merged.find(1, true).line }
1902
  return lineNo(line) + 1
1903
  }
1904
 
1906
  // are part of a visual line that starts with another line, or when
1907
  // they are entirely covered by collapsed, non-widget span.
1908
  function lineIsHidden(doc, line) {
1909
+ var sps = sawCollapsedSpans && line.markedSpans
1910
  if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {
1911
+ sp = sps[i]
1912
  if (!sp.marker.collapsed) { continue }
1913
  if (sp.from == null) { return true }
1914
  if (sp.marker.widgetNode) { continue }
1918
  }
1919
  function lineIsHiddenInner(doc, line, span) {
1920
  if (span.to == null) {
1921
+ var end = span.marker.find(1, true)
1922
  return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker))
1923
  }
1924
  if (span.marker.inclusiveRight && span.to == line.text.length)
1925
  { return true }
1926
  for (var sp = (void 0), i = 0; i < line.markedSpans.length; ++i) {
1927
+ sp = line.markedSpans[i]
1928
  if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&
1929
  (sp.to == null || sp.to != span.from) &&
1930
  (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&
1934
 
1935
  // Find the height above the given line.
1936
  function heightAtLine(lineObj) {
1937
+ lineObj = visualLine(lineObj)
1938
 
1939
+ var h = 0, chunk = lineObj.parent
1940
  for (var i = 0; i < chunk.lines.length; ++i) {
1941
+ var line = chunk.lines[i]
1942
  if (line == lineObj) { break }
1943
+ else { h += line.height }
1944
  }
1945
  for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {
1946
  for (var i$1 = 0; i$1 < p.children.length; ++i$1) {
1947
+ var cur = p.children[i$1]
1948
  if (cur == chunk) { break }
1949
+ else { h += cur.height }
1950
  }
1951
  }
1952
  return h
1957
  // other lines onto it.
1958
  function lineLength(line) {
1959
  if (line.height == 0) { return 0 }
1960
+ var len = line.text.length, merged, cur = line
1961
  while (merged = collapsedSpanAtStart(cur)) {
1962
+ var found = merged.find(0, true)
1963
+ cur = found.from.line
1964
+ len += found.from.ch - found.to.ch
1965
  }
1966
+ cur = line
1967
  while (merged = collapsedSpanAtEnd(cur)) {
1968
+ var found$1 = merged.find(0, true)
1969
+ len -= cur.text.length - found$1.from.ch
1970
+ cur = found$1.to.line
1971
+ len += cur.text.length - found$1.to.ch
1972
  }
1973
  return len
1974
  }
1975
 
1976
  // Find the longest line in the document.
1977
  function findMaxLine(cm) {
1978
+ var d = cm.display, doc = cm.doc
1979
+ d.maxLine = getLine(doc, doc.first)
1980
+ d.maxLineLength = lineLength(d.maxLine)
1981
+ d.maxLineChanged = true
1982
  doc.iter(function (line) {
1983
+ var len = lineLength(line)
1984
  if (len > d.maxLineLength) {
1985
+ d.maxLineLength = len
1986
+ d.maxLine = line
1987
  }
1988
+ })
1989
  }
1990
 
1991
  // BIDI HELPERS
1992
 
1993
  function iterateBidiSections(order, from, to, f) {
1994
  if (!order) { return f(from, to, "ltr") }
1995
+ var found = false
1996
  for (var i = 0; i < order.length; ++i) {
1997
+ var part = order[i]
1998
  if (part.from < to && part.to > from || from == to && part.to == from) {
1999
+ f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr")
2000
+ found = true
2001
  }
2002
  }
2003
+ if (!found) { f(from, to, "ltr") }
2004
  }
2005
 
2006
+ var bidiOther = null
2007
  function getBidiPartAt(order, ch, sticky) {
2008
+ var found
2009
+ bidiOther = null
2010
  for (var i = 0; i < order.length; ++i) {
2011
+ var cur = order[i]
2012
  if (cur.from < ch && cur.to > ch) { return i }
2013
  if (cur.to == ch) {
2014
+ if (cur.from != cur.to && sticky == "before") { found = i }
2015
+ else { bidiOther = i }
2016
  }
2017
  if (cur.from == ch) {
2018
+ if (cur.from != cur.to && sticky != "before") { found = i }
2019
+ else { bidiOther = i }
2020
  }
2021
  }
2022
  return found != null ? found : bidiOther
2047
  // objects) in the order in which they occur visually.
2048
  var bidiOrdering = (function() {
2049
  // Character types for codepoints 0 to 0xff
2050
+ var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN"
2051
  // Character types for codepoints 0x600 to 0x6f9
2052
+ var arabicTypes = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111"
2053
  function charType(code) {
2054
  if (code <= 0xf7) { return lowTypes.charAt(code) }
2055
  else if (0x590 <= code && code <= 0x5f4) { return "R" }
2060
  else { return "L" }
2061
  }
2062
 
2063
+ var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/
2064
+ var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/
2065
+ // Browsers seem to always treat the boundaries of block elements as being L.
2066
+ var outerType = "L"
2067
 
2068
  function BidiSpan(level, from, to) {
2069
+ this.level = level
2070
+ this.from = from; this.to = to
2071
  }
2072
 
2073
+ return function(str) {
2074
+ if (!bidiRE.test(str)) { return false }
2075
+ var len = str.length, types = []
 
 
2076
  for (var i = 0; i < len; ++i)
2077
+ { types.push(charType(str.charCodeAt(i))) }
2078
 
2079
  // W1. Examine each non-spacing mark (NSM) in the level run, and
2080
  // change the type of the NSM to the type of the previous
2081
  // character. If the NSM is at the start of the level run, it will
2082
  // get the type of sor.
2083
  for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) {
2084
+ var type = types[i$1]
2085
+ if (type == "m") { types[i$1] = prev }
2086
+ else { prev = type }
2087
  }
2088
 
2089
  // W2. Search backwards from each instance of a European number
2092
  // number.
2093
  // W3. Change all ALs to R.
2094
  for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) {
2095
+ var type$1 = types[i$2]
2096
+ if (type$1 == "1" && cur == "r") { types[i$2] = "n" }
2097
+ else if (isStrong.test(type$1)) { cur = type$1; if (type$1 == "r") { types[i$2] = "R" } }
2098
  }
2099
 
2100
  // W4. A single European separator between two European numbers
2101
  // changes to a European number. A single common separator between
2102
  // two numbers of the same type changes to that type.
2103
  for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) {
2104
+ var type$2 = types[i$3]
2105
+ if (type$2 == "+" && prev$1 == "1" && types[i$3+1] == "1") { types[i$3] = "1" }
2106
  else if (type$2 == "," && prev$1 == types[i$3+1] &&
2107
+ (prev$1 == "1" || prev$1 == "n")) { types[i$3] = prev$1 }
2108
+ prev$1 = type$2
2109
  }
2110
 
2111
  // W5. A sequence of European terminators adjacent to European
2113
  // W6. Otherwise, separators and terminators change to Other
2114
  // Neutral.
2115
  for (var i$4 = 0; i$4 < len; ++i$4) {
2116
+ var type$3 = types[i$4]
2117
+ if (type$3 == ",") { types[i$4] = "N" }
2118
  else if (type$3 == "%") {
2119
+ var end = (void 0)
2120
  for (end = i$4 + 1; end < len && types[end] == "%"; ++end) {}
2121
+ var replace = (i$4 && types[i$4-1] == "!") || (end < len && types[end] == "1") ? "1" : "N"
2122
+ for (var j = i$4; j < end; ++j) { types[j] = replace }
2123
+ i$4 = end - 1
2124
  }
2125
  }
2126
 
2128
  // until the first strong type (R, L, or sor) is found. If an L is
2129
  // found, then change the type of the European number to L.
2130
  for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) {
2131
+ var type$4 = types[i$5]
2132
+ if (cur$1 == "L" && type$4 == "1") { types[i$5] = "L" }
2133
+ else if (isStrong.test(type$4)) { cur$1 = type$4 }
2134
  }
2135
 
2136
  // N1. A sequence of neutrals takes the direction of the
2141
  // N2. Any remaining neutrals take the embedding direction.
2142
  for (var i$6 = 0; i$6 < len; ++i$6) {
2143
  if (isNeutral.test(types[i$6])) {
2144
+ var end$1 = (void 0)
2145
  for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {}
2146
+ var before = (i$6 ? types[i$6-1] : outerType) == "L"
2147
+ var after = (end$1 < len ? types[end$1] : outerType) == "L"
2148
+ var replace$1 = before || after ? "L" : "R"
2149
+ for (var j$1 = i$6; j$1 < end$1; ++j$1) { types[j$1] = replace$1 }
2150
+ i$6 = end$1 - 1
2151
  }
2152
  }
2153
 
2156
  // levels (0, 1, 2) in an implementation that doesn't take
2157
  // explicit embedding into account, we can build up the order on
2158
  // the fly, without following the level-based algorithm.
2159
+ var order = [], m
2160
  for (var i$7 = 0; i$7 < len;) {
2161
  if (countsAsLeft.test(types[i$7])) {
2162
+ var start = i$7
2163
  for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {}
2164
+ order.push(new BidiSpan(0, start, i$7))
2165
  } else {
2166
+ var pos = i$7, at = order.length
2167
  for (++i$7; i$7 < len && types[i$7] != "L"; ++i$7) {}
2168
  for (var j$2 = pos; j$2 < i$7;) {
2169
  if (countsAsNum.test(types[j$2])) {
2170
+ if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)) }
2171
+ var nstart = j$2
2172
  for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {}
2173
+ order.splice(at, 0, new BidiSpan(2, nstart, j$2))
2174
+ pos = j$2
2175
+ } else { ++j$2 }
2176
  }
2177
+ if (pos < i$7) { order.splice(at, 0, new BidiSpan(1, pos, i$7)) }
2178
  }
2179
  }
2180
  if (order[0].level == 1 && (m = str.match(/^\s+/))) {
2181
+ order[0].from = m[0].length
2182
+ order.unshift(new BidiSpan(0, 0, m[0].length))
2183
  }
2184
  if (lst(order).level == 1 && (m = str.match(/\s+$/))) {
2185
+ lst(order).to -= m[0].length
2186
+ order.push(new BidiSpan(0, len - m[0].length, len))
2187
  }
2188
 
2189
+ return order
2190
  }
2191
+ })()
2192
 
2193
  // Get the bidi ordering for the given line (and cache it). Returns
2194
  // false for lines that are fully left-to-right, and an array of
2195
  // BidiSpan objects otherwise.
2196
+ function getOrder(line) {
2197
+ var order = line.order
2198
+ if (order == null) { order = line.order = bidiOrdering(line.text) }
2199
  return order
2200
  }
2201
 
2202
  function moveCharLogically(line, ch, dir) {
2203
+ var target = skipExtendingChars(line.text, ch + dir, dir)
2204
  return target < 0 || target > line.text.length ? null : target
2205
  }
2206
 
2207
  function moveLogically(line, start, dir) {
2208
+ var ch = moveCharLogically(line, start.ch, dir)
2209
  return ch == null ? null : new Pos(start.line, ch, dir < 0 ? "after" : "before")
2210
  }
2211
 
2212
  function endOfLine(visually, cm, lineObj, lineNo, dir) {
2213
  if (visually) {
2214
+ var order = getOrder(lineObj)
2215
  if (order) {
2216
+ var part = dir < 0 ? lst(order) : order[0]
2217
+ var moveInStorageOrder = (dir < 0) == (part.level == 1)
2218
+ var sticky = moveInStorageOrder ? "after" : "before"
2219
+ var ch
2220
  // With a wrapped rtl chunk (possibly spanning multiple bidi parts),
2221
  // it could be that the last bidi part is not on the last visual line,
2222
  // since visual lines contain content order-consecutive chunks.
2224
  // in the rtl chunk that is on the last line (that is, the same line
2225
  // as the last (content-order) character).
2226
  if (part.level > 0) {
2227
+ var prep = prepareMeasureForLine(cm, lineObj)
2228
+ ch = dir < 0 ? lineObj.text.length - 1 : 0
2229
+ var targetTop = measureCharPrepared(cm, prep, ch).top
2230
+ ch = findFirst(function (ch) { return measureCharPrepared(cm, prep, ch).top == targetTop; }, (dir < 0) == (part.level == 1) ? part.from : part.to - 1, ch)
2231
+ if (sticky == "before") { ch = moveCharLogically(lineObj, ch, 1, true) }
2232
+ } else { ch = dir < 0 ? part.to : part.from }
2233
  return new Pos(lineNo, ch, sticky)
2234
  }
2235
  }
2237
  }
2238
 
2239
  function moveVisually(cm, line, start, dir) {
2240
+ var bidi = getOrder(line)
2241
  if (!bidi) { return moveLogically(line, start, dir) }
2242
  if (start.ch >= line.text.length) {
2243
+ start.ch = line.text.length
2244
+ start.sticky = "before"
2245
  } else if (start.ch <= 0) {
2246
+ start.ch = 0
2247
+ start.sticky = "after"
2248
  }
2249
+ var partPos = getBidiPartAt(bidi, start.ch, start.sticky), part = bidi[partPos]
2250
+ if (part.level % 2 == 0 && (dir > 0 ? part.to > start.ch : part.from < start.ch)) {
2251
+ // Case 1: We move within an ltr part. Even with wrapped lines,
2252
  // nothing interesting happens.
2253
  return moveLogically(line, start, dir)
2254
  }
2255
 
2256
+ var mv = function (pos, dir) { return moveCharLogically(line, pos instanceof Pos ? pos.ch : pos, dir); }
2257
+ var prep
2258
  var getWrappedLineExtent = function (ch) {
2259
  if (!cm.options.lineWrapping) { return {begin: 0, end: line.text.length} }
2260
+ prep = prep || prepareMeasureForLine(cm, line)
2261
  return wrappedLineExtentChar(cm, line, prep, ch)
2262
+ }
2263
+ var wrappedLineExtent = getWrappedLineExtent(start.sticky == "before" ? mv(start, -1) : start.ch)
2264
+
2265
+ if (part.level % 2 == 1) {
2266
+ var ch = mv(start, -dir)
2267
+ if (ch != null && (dir > 0 ? ch >= part.from && ch >= wrappedLineExtent.begin : ch <= part.to && ch <= wrappedLineExtent.end)) {
2268
+ // Case 2: We move within an rtl part on the same visual line
2269
+ var sticky = dir < 0 ? "before" : "after"
 
2270
  return new Pos(start.line, ch, sticky)
2271
  }
2272
  }
2277
  var searchInVisualLine = function (partPos, dir, wrappedLineExtent) {
2278
  var getRes = function (ch, moveInStorageOrder) { return moveInStorageOrder
2279
  ? new Pos(start.line, mv(ch, 1), "before")
2280
+ : new Pos(start.line, ch, "after"); }
2281
 
2282
  for (; partPos >= 0 && partPos < bidi.length; partPos += dir) {
2283
+ var part = bidi[partPos]
2284
+ var moveInStorageOrder = (dir > 0) == (part.level != 1)
2285
+ var ch = moveInStorageOrder ? wrappedLineExtent.begin : mv(wrappedLineExtent.end, -1)
2286
  if (part.from <= ch && ch < part.to) { return getRes(ch, moveInStorageOrder) }
2287
+ ch = moveInStorageOrder ? part.from : mv(part.to, -1)
2288
  if (wrappedLineExtent.begin <= ch && ch < wrappedLineExtent.end) { return getRes(ch, moveInStorageOrder) }
2289
  }
2290
+ }
2291
 
2292
  // Case 3a: Look for other bidi parts on the same visual line
2293
+ var res = searchInVisualLine(partPos + dir, dir, wrappedLineExtent)
2294
  if (res) { return res }
2295
 
2296
  // Case 3b: Look for other bidi parts on the next visual line
2297
+ var nextCh = dir > 0 ? wrappedLineExtent.end : mv(wrappedLineExtent.begin, -1)
2298
  if (nextCh != null && !(dir > 0 && nextCh == line.text.length)) {
2299
+ res = searchInVisualLine(dir > 0 ? 0 : bidi.length - 1, dir, getWrappedLineExtent(nextCh))
2300
  if (res) { return res }
2301
  }
2302
 
2309
  // Lightweight event framework. on/off also work on DOM nodes,
2310
  // registering native DOM handlers.
2311
 
2312
+ var noHandlers = []
2313
 
2314
  var on = function(emitter, type, f) {
2315
  if (emitter.addEventListener) {
2316
+ emitter.addEventListener(type, f, false)
2317
  } else if (emitter.attachEvent) {
2318
+ emitter.attachEvent("on" + type, f)
2319
  } else {
2320
+ var map = emitter._handlers || (emitter._handlers = {})
2321
+ map[type] = (map[type] || noHandlers).concat(f)
2322
  }
2323
+ }
2324
 
2325
  function getHandlers(emitter, type) {
2326
  return emitter._handlers && emitter._handlers[type] || noHandlers
2328
 
2329
  function off(emitter, type, f) {
2330
  if (emitter.removeEventListener) {
2331
+ emitter.removeEventListener(type, f, false)
2332
  } else if (emitter.detachEvent) {
2333
+ emitter.detachEvent("on" + type, f)
2334
  } else {
2335
+ var map = emitter._handlers, arr = map && map[type]
2336
  if (arr) {
2337
+ var index = indexOf(arr, f)
2338
  if (index > -1)
2339
+ { map[type] = arr.slice(0, index).concat(arr.slice(index + 1)) }
2340
  }
2341
  }
2342
  }
2343
 
2344
  function signal(emitter, type /*, values...*/) {
2345
+ var handlers = getHandlers(emitter, type)
2346
  if (!handlers.length) { return }
2347
+ var args = Array.prototype.slice.call(arguments, 2)
2348
+ for (var i = 0; i < handlers.length; ++i) { handlers[i].apply(null, args) }
2349
  }
2350
 
2351
  // The DOM events that CodeMirror handles can be overridden by
2353
  // and preventDefault-ing the event in that handler.
2354
  function signalDOMEvent(cm, e, override) {
2355
  if (typeof e == "string")
2356
+ { e = {type: e, preventDefault: function() { this.defaultPrevented = true }} }
2357
+ signal(cm, override || e.type, cm, e)
2358
  return e_defaultPrevented(e) || e.codemirrorIgnore
2359
  }
2360
 
2361
  function signalCursorActivity(cm) {
2362
+ var arr = cm._handlers && cm._handlers.cursorActivity
2363
  if (!arr) { return }
2364
+ var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = [])
2365
  for (var i = 0; i < arr.length; ++i) { if (indexOf(set, arr[i]) == -1)
2366
+ { set.push(arr[i]) } }
2367
  }
2368
 
2369
  function hasHandler(emitter, type) {
2373
  // Add on and off methods to a constructor's prototype, to make
2374
  // registering events on such objects more convenient.
2375
  function eventMixin(ctor) {
2376
+ ctor.prototype.on = function(type, f) {on(this, type, f)}
2377
+ ctor.prototype.off = function(type, f) {off(this, type, f)}
2378
  }
2379
 
2380
  // Due to the fact that we still support jurassic IE versions, some
2381
  // compatibility wrappers are needed.
2382
 
2383
  function e_preventDefault(e) {
2384
+ if (e.preventDefault) { e.preventDefault() }
2385
+ else { e.returnValue = false }
2386
  }
2387
  function e_stopPropagation(e) {
2388
+ if (e.stopPropagation) { e.stopPropagation() }
2389
+ else { e.cancelBubble = true }
2390
  }
2391
  function e_defaultPrevented(e) {
2392
  return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false
2393
  }
2394
+ function e_stop(e) {e_preventDefault(e); e_stopPropagation(e)}
2395
 
2396
  function e_target(e) {return e.target || e.srcElement}
2397
  function e_button(e) {
2398
+ var b = e.which
2399
  if (b == null) {
2400
+ if (e.button & 1) { b = 1 }
2401
+ else if (e.button & 2) { b = 3 }
2402
+ else if (e.button & 4) { b = 2 }
2403
  }
2404
+ if (mac && e.ctrlKey && b == 1) { b = 3 }
2405
  return b
2406
  }
2407
 
2410
  // There is *some* kind of drag-and-drop support in IE6-8, but I
2411
  // couldn't get it to work yet.
2412
  if (ie && ie_version < 9) { return false }
2413
+ var div = elt('div')
2414
  return "draggable" in div || "dragDrop" in div
2415
+ }()
2416
 
2417
+ var zwspSupported
2418
  function zeroWidthElement(measure) {
2419
  if (zwspSupported == null) {
2420
+ var test = elt("span", "\u200b")
2421
+ removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")]))
2422
  if (measure.firstChild.offsetHeight != 0)
2423
+ { zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8) }
2424
  }
2425
  var node = zwspSupported ? elt("span", "\u200b") :
2426
+ elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px")
2427
+ node.setAttribute("cm-text", "")
2428
  return node
2429
  }
2430
 
2431
  // Feature-detect IE's crummy client rect reporting for bidi text
2432
+ var badBidiRects
2433
  function hasBadBidiRects(measure) {
2434
  if (badBidiRects != null) { return badBidiRects }
2435
+ var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA"))
2436
+ var r0 = range(txt, 0, 1).getBoundingClientRect()
2437
+ var r1 = range(txt, 1, 2).getBoundingClientRect()
2438
+ removeChildren(measure)
2439
  if (!r0 || r0.left == r0.right) { return false } // Safari returns null in some cases (#2780)
2440
  return badBidiRects = (r1.right - r0.right < 3)
2441
  }
2443
  // See if "".split is the broken IE version, if so, provide an
2444
  // alternative way to split lines.
2445
  var splitLinesAuto = "\n\nb".split(/\n/).length != 3 ? function (string) {
2446
+ var pos = 0, result = [], l = string.length
2447
  while (pos <= l) {
2448
+ var nl = string.indexOf("\n", pos)
2449
+ if (nl == -1) { nl = string.length }
2450
+ var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl)
2451
+ var rt = line.indexOf("\r")
2452
  if (rt != -1) {
2453
+ result.push(line.slice(0, rt))
2454
+ pos += rt + 1
2455
  } else {
2456
+ result.push(line)
2457
+ pos = nl + 1
2458
  }
2459
  }
2460
  return result
2461
+ } : function (string) { return string.split(/\r\n?|\n/); }
2462
 
2463
  var hasSelection = window.getSelection ? function (te) {
2464
  try { return te.selectionStart != te.selectionEnd }
2465
  catch(e) { return false }
2466
  } : function (te) {
2467
+ var range
2468
+ try {range = te.ownerDocument.selection.createRange()}
2469
  catch(e) {}
2470
+ if (!range || range.parentElement() != te) { return false }
2471
+ return range.compareEndPoints("StartToEnd", range) != 0
2472
+ }
2473
 
2474
  var hasCopyEvent = (function () {
2475
+ var e = elt("div")
2476
  if ("oncopy" in e) { return true }
2477
+ e.setAttribute("oncopy", "return;")
2478
  return typeof e.oncopy == "function"
2479
+ })()
2480
 
2481
+ var badZoomedRects = null
2482
  function hasBadZoomedRects(measure) {
2483
  if (badZoomedRects != null) { return badZoomedRects }
2484
+ var node = removeChildrenAndAdd(measure, elt("span", "x"))
2485
+ var normal = node.getBoundingClientRect()
2486
+ var fromRange = range(node, 0, 1).getBoundingClientRect()
2487
  return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1
2488
  }
2489
 
 
2490
  var modes = {};
2491
  var mimeModes = {};
 
2492
  // Extra arguments are stored as the mode's dependencies, which is
2493
  // used by (legacy) mechanisms like loadmode.js to automatically
2494
  // load a mode. (Preferred mechanism is the require/define calls.)
2495
  function defineMode(name, mode) {
2496
  if (arguments.length > 2)
2497
+ { mode.dependencies = Array.prototype.slice.call(arguments, 2) }
2498
+ modes[name] = mode
2499
  }
2500
 
2501
  function defineMIME(mime, spec) {
2502
+ mimeModes[mime] = spec
2503
  }
2504
 
2505
  // Given a MIME type, a {name, ...options} config object, or a name
2506
  // string, return a mode config object.
2507
  function resolveMode(spec) {
2508
  if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) {
2509
+ spec = mimeModes[spec]
2510
  } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) {
2511
+ var found = mimeModes[spec.name]
2512
+ if (typeof found == "string") { found = {name: found} }
2513
+ spec = createObj(found, spec)
2514
+ spec.name = found.name
2515
  } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) {
2516
  return resolveMode("application/xml")
2517
  } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(spec)) {
2524
  // Given a mode spec (anything that resolveMode accepts), find and
2525
  // initialize an actual mode object.
2526
  function getMode(options, spec) {
2527
+ spec = resolveMode(spec)
2528
+ var mfactory = modes[spec.name]
2529
  if (!mfactory) { return getMode(options, "text/plain") }
2530
+ var modeObj = mfactory(options, spec)
2531
  if (modeExtensions.hasOwnProperty(spec.name)) {
2532
+ var exts = modeExtensions[spec.name]
2533
  for (var prop in exts) {
2534
  if (!exts.hasOwnProperty(prop)) { continue }
2535
+ if (modeObj.hasOwnProperty(prop)) { modeObj["_" + prop] = modeObj[prop] }
2536
+ modeObj[prop] = exts[prop]
2537
  }
2538
  }
2539
+ modeObj.name = spec.name
2540
+ if (spec.helperType) { modeObj.helperType = spec.helperType }
2541
  if (spec.modeProps) { for (var prop$1 in spec.modeProps)
2542
+ { modeObj[prop$1] = spec.modeProps[prop$1] } }
2543
 
2544
  return modeObj
2545
  }
2546
 
2547
  // This can be used to attach properties to mode objects from
2548
  // outside the actual mode definition.
2549
+ var modeExtensions = {}
2550
  function extendMode(mode, properties) {
2551
+ var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {})
2552
+ copyObj(properties, exts)
2553
  }
2554
 
2555
  function copyState(mode, state) {
2556
  if (state === true) { return state }
2557
  if (mode.copyState) { return mode.copyState(state) }
2558
+ var nstate = {}
2559
  for (var n in state) {
2560
+ var val = state[n]
2561
+ if (val instanceof Array) { val = val.concat([]) }
2562
+ nstate[n] = val
2563
  }
2564
  return nstate
2565
  }
2567
  // Given a mode and a state (for that mode), find the inner mode and
2568
  // state at the position that the state refers to.
2569
  function innerMode(mode, state) {
2570
+ var info
2571
  while (mode.innerMode) {
2572
+ info = mode.innerMode(state)
2573
  if (!info || info.mode == mode) { break }
2574
+ state = info.state
2575
+ mode = info.mode
2576
  }
2577
  return info || {mode: mode, state: state}
2578
  }
2587
  // parsers more succinct.
2588
 
2589
  var StringStream = function(string, tabSize) {
2590
+ this.pos = this.start = 0
2591
+ this.string = string
2592
+ this.tabSize = tabSize || 8
2593
+ this.lastColumnPos = this.lastColumnValue = 0
2594
+ this.lineStart = 0
2595
  };
2596
 
2597
  StringStream.prototype.eol = function () {return this.pos >= this.string.length};
2602
  { return this.string.charAt(this.pos++) }
2603
  };
2604
  StringStream.prototype.eat = function (match) {
2605
+ var ch = this.string.charAt(this.pos)
2606
+ var ok
2607
+ if (typeof match == "string") { ok = ch == match }
2608
+ else { ok = ch && (match.test ? match.test(ch) : match(ch)) }
2609
  if (ok) {++this.pos; return ch}
2610
  };
2611
  StringStream.prototype.eatWhile = function (match) {
2612
+ var start = this.pos
2613
  while (this.eat(match)){}
2614
  return this.pos > start
2615
  };
2616
  StringStream.prototype.eatSpace = function () {
2617
  var this$1 = this;
2618
 
2619
+ var start = this.pos
2620
+ while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) { ++this$1.pos }
2621
  return this.pos > start
2622
  };
2623
+ StringStream.prototype.skipToEnd = function () {this.pos = this.string.length};
2624
  StringStream.prototype.skipTo = function (ch) {
2625
+ var found = this.string.indexOf(ch, this.pos)
2626
  if (found > -1) {this.pos = found; return true}
2627
  };
2628
+ StringStream.prototype.backUp = function (n) {this.pos -= n};
2629
  StringStream.prototype.column = function () {
2630
  if (this.lastColumnPos < this.start) {
2631
+ this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue)
2632
+ this.lastColumnPos = this.start
2633
  }
2634
  return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)
2635
  };
2639
  };
2640
  StringStream.prototype.match = function (pattern, consume, caseInsensitive) {
2641
  if (typeof pattern == "string") {
2642
+ var cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; }
2643
+ var substr = this.string.substr(this.pos, pattern.length)
2644
  if (cased(substr) == cased(pattern)) {
2645
+ if (consume !== false) { this.pos += pattern.length }
2646
  return true
2647
  }
2648
  } else {
2649
+ var match = this.string.slice(this.pos).match(pattern)
2650
  if (match && match.index > 0) { return null }
2651
+ if (match && consume !== false) { this.pos += match[0].length }
2652
  return match
2653
  }
2654
  };
2655
  StringStream.prototype.current = function (){return this.string.slice(this.start, this.pos)};
2656
  StringStream.prototype.hideFirstChars = function (n, inner) {
2657
+ this.lineStart += n
2658
  try { return inner() }
2659
+ finally { this.lineStart -= n }
2660
  };
2661
 
2662
  // Compute a style array (an array starting with a mode generation
2666
  function highlightLine(cm, line, state, forceToEnd) {
2667
  // A styles array always starts with a number identifying the
2668
  // mode/overlays that it is based on (for easy invalidation).
2669
+ var st = [cm.state.modeGen], lineClasses = {}
2670
  // Compute the base array of styles
2671
  runMode(cm, line.text, cm.doc.mode, state, function (end, style) { return st.push(end, style); },
2672
+ lineClasses, forceToEnd)
2673
 
2674
  // Run overlays, adjust style array.
2675
  var loop = function ( o ) {
2676
+ var overlay = cm.state.overlays[o], i = 1, at = 0
2677
  runMode(cm, line.text, overlay.mode, true, function (end, style) {
2678
+ var start = i
2679
  // Ensure there's a token end at the current position, and that i points at it
2680
  while (at < end) {
2681
+ var i_end = st[i]
2682
  if (i_end > end)
2683
+ { st.splice(i, 1, end, st[i+1], i_end) }
2684
+ i += 2
2685
+ at = Math.min(end, i_end)
2686
  }
2687
  if (!style) { return }
2688
  if (overlay.opaque) {
2689
+ st.splice(start, i - start, end, "overlay " + style)
2690
+ i = start + 2
2691
  } else {
2692
  for (; start < i; start += 2) {
2693
+ var cur = st[start+1]
2694
+ st[start+1] = (cur ? cur + " " : "") + "overlay " + style
2695
  }
2696
  }
2697
+ }, lineClasses)
2698
  };
2699
 
2700
  for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );
2704
 
2705
  function getLineStyles(cm, line, updateFrontier) {
2706
  if (!line.styles || line.styles[0] != cm.state.modeGen) {
2707
+ var state = getStateBefore(cm, lineNo(line))
2708
+ var result = highlightLine(cm, line, line.text.length > cm.options.maxHighlightLength ? copyState(cm.doc.mode, state) : state)
2709
+ line.stateAfter = state
2710
+ line.styles = result.styles
2711
+ if (result.classes) { line.styleClasses = result.classes }
2712
+ else if (line.styleClasses) { line.styleClasses = null }
2713
+ if (updateFrontier === cm.doc.frontier) { cm.doc.frontier++ }
2714
  }
2715
  return line.styles
2716
  }
2717
 
2718
  function getStateBefore(cm, n, precise) {
2719
+ var doc = cm.doc, display = cm.display
2720
  if (!doc.mode.startState) { return true }
2721
+ var pos = findStartLine(cm, n, precise), state = pos > doc.first && getLine(doc, pos-1).stateAfter
2722
+ if (!state) { state = startState(doc.mode) }
2723
+ else { state = copyState(doc.mode, state) }
2724
  doc.iter(pos, n, function (line) {
2725
+ processLine(cm, line.text, state)
2726
+ var save = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo
2727
+ line.stateAfter = save ? copyState(doc.mode, state) : null
2728
+ ++pos
2729
+ })
2730
+ if (precise) { doc.frontier = pos }
2731
  return state
2732
  }
2733
 
2735
  // update state, but don't save a style array. Used for lines that
2736
  // aren't currently visible.
2737
  function processLine(cm, text, state, startAt) {
2738
+ var mode = cm.doc.mode
2739
+ var stream = new StringStream(text, cm.options.tabSize)
2740
+ stream.start = stream.pos = startAt || 0
2741
+ if (text == "") { callBlankLine(mode, state) }
2742
  while (!stream.eol()) {
2743
+ readToken(mode, stream, state)
2744
+ stream.start = stream.pos
2745
  }
2746
  }
2747
 
2748
  function callBlankLine(mode, state) {
2749
  if (mode.blankLine) { return mode.blankLine(state) }
2750
  if (!mode.innerMode) { return }
2751
+ var inner = innerMode(mode, state)
2752
  if (inner.mode.blankLine) { return inner.mode.blankLine(inner.state) }
2753
  }
2754
 
2755
  function readToken(mode, stream, state, inner) {
2756
  for (var i = 0; i < 10; i++) {
2757
+ if (inner) { inner[0] = innerMode(mode, state).mode }
2758
+ var style = mode.token(stream, state)
2759
  if (stream.pos > stream.start) { return style }
2760
  }
2761
  throw new Error("Mode " + mode.name + " failed to advance stream.")
2768
  string: stream.current(),
2769
  type: style || null,
2770
  state: copy ? copyState(doc.mode, state) : state
2771
+ }); }
2772
 
2773
+ var doc = cm.doc, mode = doc.mode, style
2774
+ pos = clipPos(doc, pos)
2775
+ var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise)
2776
+ var stream = new StringStream(line.text, cm.options.tabSize), tokens
2777
+ if (asArray) { tokens = [] }
2778
  while ((asArray || stream.pos < pos.ch) && !stream.eol()) {
2779
+ stream.start = stream.pos
2780
+ style = readToken(mode, stream, state)
2781
+ if (asArray) { tokens.push(getObj(true)) }
2782
  }
2783
  return asArray ? tokens : getObj()
2784
  }
2785
 
2786
  function extractLineClasses(type, output) {
2787
  if (type) { for (;;) {
2788
+ var lineClass = type.match(/(?:^|\s+)line-(background-)?(\S+)/)
2789
  if (!lineClass) { break }
2790
+ type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length)
2791
+ var prop = lineClass[1] ? "bgClass" : "textClass"
2792
  if (output[prop] == null)
2793
+ { output[prop] = lineClass[2] }
2794
  else if (!(new RegExp("(?:^|\s)" + lineClass[2] + "(?:$|\s)")).test(output[prop]))
2795
+ { output[prop] += " " + lineClass[2] }
2796
  } }
2797
  return type
2798
  }
2799
 
2800
  // Run the given mode's parser over a line, calling f for each token.
2801
  function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) {
2802
+ var flattenSpans = mode.flattenSpans
2803
+ if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans }
2804
+ var curStart = 0, curStyle = null
2805
+ var stream = new StringStream(text, cm.options.tabSize), style
2806
+ var inner = cm.options.addModeClass && [null]
2807
+ if (text == "") { extractLineClasses(callBlankLine(mode, state), lineClasses) }
2808
  while (!stream.eol()) {
2809
  if (stream.pos > cm.options.maxHighlightLength) {
2810
+ flattenSpans = false
2811
+ if (forceToEnd) { processLine(cm, text, state, stream.pos) }
2812
+ stream.pos = text.length
2813
+ style = null
2814
  } else {
2815
+ style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses)
2816
  }
2817
  if (inner) {
2818
+ var mName = inner[0].name
2819
+ if (mName) { style = "m-" + (style ? mName + " " + style : mName) }
2820
  }
2821
  if (!flattenSpans || curStyle != style) {
2822
  while (curStart < stream.start) {
2823
+ curStart = Math.min(stream.start, curStart + 5000)
2824
+ f(curStart, curStyle)
2825
  }
2826
+ curStyle = style
2827
  }
2828
+ stream.start = stream.pos
2829
  }
2830
  while (curStart < stream.pos) {
2831
  // Webkit seems to refuse to render text nodes longer than 57444
2832
  // characters, and returns inaccurate measurements in nodes
2833
  // starting around 5000 chars.
2834
+ var pos = Math.min(stream.pos, curStart + 5000)
2835
+ f(pos, curStyle)
2836
+ curStart = pos
2837
  }
2838
  }
2839
 
2843
  // smallest indentation, which tends to need the least context to
2844
  // parse correctly.
2845
  function findStartLine(cm, n, precise) {
2846
+ var minindent, minline, doc = cm.doc
2847
+ var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100)
2848
  for (var search = n; search > lim; --search) {
2849
  if (search <= doc.first) { return doc.first }
2850
+ var line = getLine(doc, search - 1)
2851
  if (line.stateAfter && (!precise || search <= doc.frontier)) { return search }
2852
+ var indented = countColumn(line.text, null, cm.options.tabSize)
2853
  if (minline == null || minindent > indented) {
2854
+ minline = search - 1
2855
+ minindent = indented
2856
  }
2857
  }
2858
  return minline
2863
  // Line objects. These hold state related to a line, including
2864
  // highlighting info (the styles array).
2865
  var Line = function(text, markedSpans, estimateHeight) {
2866
+ this.text = text
2867
+ attachMarkedSpans(this, markedSpans)
2868
+ this.height = estimateHeight ? estimateHeight(this) : 1
2869
  };
2870
 
2871
  Line.prototype.lineNo = function () { return lineNo(this) };
2872
+ eventMixin(Line)
2873
 
2874
  // Change the content (text, markers) of a line. Automatically
2875
  // invalidates cached information and tries to re-estimate the
2876
  // line's height.
2877
  function updateLine(line, text, markedSpans, estimateHeight) {
2878
+ line.text = text
2879
+ if (line.stateAfter) { line.stateAfter = null }
2880
+ if (line.styles) { line.styles = null }
2881
+ if (line.order != null) { line.order = null }
2882
+ detachMarkedSpans(line)
2883
+ attachMarkedSpans(line, markedSpans)
2884
+ var estHeight = estimateHeight ? estimateHeight(line) : 1
2885
+ if (estHeight != line.height) { updateLineHeight(line, estHeight) }
2886
  }
2887
 
2888
  // Detach a line from the document tree and its markers.
2889
  function cleanUpLine(line) {
2890
+ line.parent = null
2891
+ detachMarkedSpans(line)
2892
  }
2893
 
2894
  // Convert a style as returned by a mode (either null, or a string
2898
  var styleToClassCacheWithMode = {};
2899
  function interpretTokenStyle(style, options) {
2900
  if (!style || /^\s*$/.test(style)) { return null }
2901
+ var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache
2902
  return cache[style] ||
2903
  (cache[style] = style.replace(/\S+/g, "cm-$&"))
2904
  }
2912
  // The padding-right forces the element to have a 'border', which
2913
  // is needed on Webkit to be able to get line-level bounding
2914
  // rectangles for it (in measureChar).
2915
+ var content = elt("span", null, null, webkit ? "padding-right: .1px" : null)
2916
+ var builder = {pre: elt("pre", [content], "CodeMirror-line"), content: content,
2917
  col: 0, pos: 0, cm: cm,
2918
  trailingSpace: false,
2919
+ splitSpaces: (ie || webkit) && cm.getOption("lineWrapping")}
2920
+ // hide from accessibility tree
2921
+ content.setAttribute("role", "presentation")
2922
+ builder.pre.setAttribute("role", "presentation")
2923
+ lineView.measure = {}
2924
 
2925
  // Iterate over the logical lines that make up this visual line.
2926
  for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {
2927
+ var line = i ? lineView.rest[i - 1] : lineView.line, order = (void 0)
2928
+ builder.pos = 0
2929
+ builder.addToken = buildToken
2930
  // Optionally wire in some hacks into the token-rendering
2931
  // algorithm, to deal with browser quirks.
2932
+ if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line)))
2933
+ { builder.addToken = buildTokenBadBidi(builder.addToken, order) }
2934
+ builder.map = []
2935
+ var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line)
2936
+ insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate))
2937
  if (line.styleClasses) {
2938
  if (line.styleClasses.bgClass)
2939
+ { builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || "") }
2940
  if (line.styleClasses.textClass)
2941
+ { builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || "") }
2942
  }
2943
 
2944
  // Ensure at least a single node is present, for measuring.
2945
  if (builder.map.length == 0)
2946
+ { builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))) }
2947
 
2948
  // Store the map and a cache object for the current logical line
2949
  if (i == 0) {
2950
+ lineView.measure.map = builder.map
2951
+ lineView.measure.cache = {}
2952
  } else {
2953
+ ;(lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map)
2954
+ ;(lineView.measure.caches || (lineView.measure.caches = [])).push({})
2955
  }
2956
  }
2957
 
2958
  // See issue #2901
2959
  if (webkit) {
2960
+ var last = builder.content.lastChild
2961
  if (/\bcm-tab\b/.test(last.className) || (last.querySelector && last.querySelector(".cm-tab")))
2962
+ { builder.content.className = "cm-tab-wrap-hack" }
2963
  }
2964
 
2965
+ signal(cm, "renderLine", cm, lineView.line, builder.pre)
2966
  if (builder.pre.className)
2967
+ { builder.textClass = joinClasses(builder.pre.className, builder.textClass || "") }
2968
 
2969
  return builder
2970
  }
2971
 
2972
  function defaultSpecialCharPlaceholder(ch) {
2973
+ var token = elt("span", "\u2022", "cm-invalidchar")
2974
+ token.title = "\\u" + ch.charCodeAt(0).toString(16)
2975
+ token.setAttribute("aria-label", token.title)
2976
  return token
2977
  }
2978
 
2980
  // the line map. Takes care to render special characters separately.
2981
  function buildToken(builder, text, style, startStyle, endStyle, title, css) {
2982
  if (!text) { return }
2983
+ var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text
2984
+ var special = builder.cm.state.specialChars, mustWrap = false
2985
+ var content
2986
  if (!special.test(text)) {
2987
+ builder.col += text.length
2988
+ content = document.createTextNode(displayText)
2989
+ builder.map.push(builder.pos, builder.pos + text.length, content)
2990
+ if (ie && ie_version < 9) { mustWrap = true }
2991
+ builder.pos += text.length
2992
  } else {
2993
+ content = document.createDocumentFragment()
2994
+ var pos = 0
2995
  while (true) {
2996
+ special.lastIndex = pos
2997
+ var m = special.exec(text)
2998
+ var skipped = m ? m.index - pos : text.length - pos
2999
  if (skipped) {
3000
+ var txt = document.createTextNode(displayText.slice(pos, pos + skipped))
3001
+ if (ie && ie_version < 9) { content.appendChild(elt("span", [txt])) }
3002
+ else { content.appendChild(txt) }
3003
+ builder.map.push(builder.pos, builder.pos + skipped, txt)
3004
+ builder.col += skipped
3005
+ builder.pos += skipped
3006
  }
3007
  if (!m) { break }
3008
+ pos += skipped + 1
3009
+ var txt$1 = (void 0)
3010
  if (m[0] == "\t") {
3011
+ var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize
3012
+ txt$1 = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab"))
3013
+ txt$1.setAttribute("role", "presentation")
3014
+ txt$1.setAttribute("cm-text", "\t")
3015
+ builder.col += tabWidth
3016
  } else if (m[0] == "\r" || m[0] == "\n") {
3017
+ txt$1 = content.appendChild(elt("span", m[0] == "\r" ? "\u240d" : "\u2424", "cm-invalidchar"))
3018
+ txt$1.setAttribute("cm-text", m[0])
3019
+ builder.col += 1
3020
  } else {
3021
+ txt$1 = builder.cm.options.specialCharPlaceholder(m[0])
3022
+ txt$1.setAttribute("cm-text", m[0])
3023
+ if (ie && ie_version < 9) { content.appendChild(elt("span", [txt$1])) }
3024
+ else { content.appendChild(txt$1) }
3025
+ builder.col += 1
3026
  }
3027
+ builder.map.push(builder.pos, builder.pos + 1, txt$1)
3028
+ builder.pos++
3029
  }
3030
  }
3031
+ builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32
3032
  if (style || startStyle || endStyle || mustWrap || css) {
3033
+ var fullStyle = style || ""
3034
+ if (startStyle) { fullStyle += startStyle }
3035
+ if (endStyle) { fullStyle += endStyle }
3036
+ var token = elt("span", [content], fullStyle, css)
3037
+ if (title) { token.title = title }
3038
  return builder.content.appendChild(token)
3039
  }
3040
+ builder.content.appendChild(content)
3041
  }
3042
 
3043
  function splitSpaces(text, trailingBefore) {
3044
  if (text.length > 1 && !/ /.test(text)) { return text }
3045
+ var spaceBefore = trailingBefore, result = ""
3046
  for (var i = 0; i < text.length; i++) {
3047
+ var ch = text.charAt(i)
3048
  if (ch == " " && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32))
3049
+ { ch = "\u00a0" }
3050
+ result += ch
3051
+ spaceBefore = ch == " "
3052
  }
3053
  return result
3054
  }
3057
  // right-to-left text.
3058
  function buildTokenBadBidi(inner, order) {
3059
  return function (builder, text, style, startStyle, endStyle, title, css) {
3060
+ style = style ? style + " cm-force-border" : "cm-force-border"
3061
+ var start = builder.pos, end = start + text.length
3062
  for (;;) {
3063
  // Find the part that overlaps with the start of this text
3064
+ var part = (void 0)
3065
  for (var i = 0; i < order.length; i++) {
3066
+ part = order[i]
3067
  if (part.to > start && part.from <= start) { break }
3068
  }
3069
  if (part.to >= end) { return inner(builder, text, style, startStyle, endStyle, title, css) }
3070
+ inner(builder, text.slice(0, part.to - start), style, startStyle, null, title, css)
3071
+ startStyle = null
3072
+ text = text.slice(part.to - start)
3073
+ start = part.to
3074
  }
3075
  }
3076
  }
3077
 
3078
  function buildCollapsedSpan(builder, size, marker, ignoreWidget) {
3079
+ var widget = !ignoreWidget && marker.widgetNode
3080
+ if (widget) { builder.map.push(builder.pos, builder.pos + size, widget) }
3081
  if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {
3082
  if (!widget)
3083
+ { widget = builder.content.appendChild(document.createElement("span")) }
3084
+ widget.setAttribute("cm-marker", marker.id)
3085
  }
3086
  if (widget) {
3087
+ builder.cm.display.input.setUneditable(widget)
3088
+ builder.content.appendChild(widget)
3089
  }
3090
+ builder.pos += size
3091
+ builder.trailingSpace = false
3092
  }
3093
 
3094
  // Outputs a number of spans to make up a line, taking highlighting
3095
  // and marked text into account.
3096
  function insertLineContent(line, builder, styles) {
3097
+ var spans = line.markedSpans, allText = line.text, at = 0
3098
  if (!spans) {
3099
  for (var i$1 = 1; i$1 < styles.length; i$1+=2)
3100
+ { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)) }
3101
  return
3102
  }
3103
 
3104
+ var len = allText.length, pos = 0, i = 1, text = "", style, css
3105
+ var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed
3106
  for (;;) {
3107
  if (nextChange == pos) { // Update current marker set
3108
+ spanStyle = spanEndStyle = spanStartStyle = title = css = ""
3109
+ collapsed = null; nextChange = Infinity
3110
+ var foundBookmarks = [], endStyles = (void 0)
3111
  for (var j = 0; j < spans.length; ++j) {
3112
+ var sp = spans[j], m = sp.marker
3113
  if (m.type == "bookmark" && sp.from == pos && m.widgetNode) {
3114
+ foundBookmarks.push(m)
3115
  } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {
3116
  if (sp.to != null && sp.to != pos && nextChange > sp.to) {
3117
+ nextChange = sp.to
3118
+ spanEndStyle = ""
3119
  }
3120
+ if (m.className) { spanStyle += " " + m.className }
3121
+ if (m.css) { css = (css ? css + ";" : "") + m.css }
3122
+ if (m.startStyle && sp.from == pos) { spanStartStyle += " " + m.startStyle }
3123
+ if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to) }
3124
+ if (m.title && !title) { title = m.title }
3125
  if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))
3126
+ { collapsed = sp }
3127
  } else if (sp.from > pos && nextChange > sp.from) {
3128
+ nextChange = sp.from
3129
  }
3130
  }
3131
  if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)
3132
+ { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += " " + endStyles[j$1] } } }
3133
 
3134
  if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)
3135
+ { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]) } }
3136
  if (collapsed && (collapsed.from || 0) == pos) {
3137
  buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,
3138
+ collapsed.marker, collapsed.from == null)
3139
  if (collapsed.to == null) { return }
3140
+ if (collapsed.to == pos) { collapsed = false }
3141
  }
3142
  }
3143
  if (pos >= len) { break }
3144
 
3145
+ var upto = Math.min(len, nextChange)
3146
  while (true) {
3147
  if (text) {
3148
+ var end = pos + text.length
3149
  if (!collapsed) {
3150
+ var tokenText = end > upto ? text.slice(0, upto - pos) : text
3151
  builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,
3152
+ spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", title, css)
3153
  }
3154
  if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}
3155
+ pos = end
3156
+ spanStartStyle = ""
3157
  }
3158
+ text = allText.slice(at, at = styles[i++])
3159
+ style = interpretTokenStyle(styles[i++], builder.cm.options)
3160
  }
3161
  }
3162
  }
3167
  // logical lines, if those are connected by collapsed ranges.
3168
  function LineView(doc, line, lineN) {
3169
  // The starting line
3170
+ this.line = line
3171
  // Continuing lines, if any
3172
+ this.rest = visualLineContinued(line)
3173
  // Number of logical lines in this visual line
3174
+ this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1
3175
+ this.node = this.text = null
3176
+ this.hidden = lineIsHidden(doc, line)
3177
  }
3178
 
3179
  // Create a range of LineView objects for the given lines.
3180
  function buildViewArray(cm, from, to) {
3181
+ var array = [], nextPos
3182
  for (var pos = from; pos < to; pos = nextPos) {
3183
+ var view = new LineView(cm.doc, getLine(cm.doc, pos), pos)
3184
+ nextPos = pos + view.size
3185
+ array.push(view)
3186
  }
3187
  return array
3188
  }
3189
 
3190
+ var operationGroup = null
3191
 
3192
  function pushOperation(op) {
3193
  if (operationGroup) {
3194
+ operationGroup.ops.push(op)
3195
  } else {
3196
  op.ownsGroup = operationGroup = {
3197
  ops: [op],
3198
  delayedCallbacks: []
3199
+ }
3200
  }
3201
  }
3202
 
3203
  function fireCallbacksForOps(group) {
3204
  // Calls delayed callbacks and cursorActivity handlers until no
3205
  // new ones appear
3206
+ var callbacks = group.delayedCallbacks, i = 0
3207
  do {
3208
  for (; i < callbacks.length; i++)
3209
+ { callbacks[i].call(null) }
3210
  for (var j = 0; j < group.ops.length; j++) {
3211
+ var op = group.ops[j]
3212
  if (op.cursorActivityHandlers)
3213
  { while (op.cursorActivityCalled < op.cursorActivityHandlers.length)
3214
+ { op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm) } }
3215
  }
3216
  } while (i < callbacks.length)
3217
  }
3218
 
3219
  function finishOperation(op, endCb) {
3220
+ var group = op.ownsGroup
3221
  if (!group) { return }
3222
 
3223
+ try { fireCallbacksForOps(group) }
3224
  finally {
3225
+ operationGroup = null
3226
+ endCb(group)
3227
  }
3228
  }
3229
 
3230
+ var orphanDelayedCallbacks = null
3231
 
3232
  // Often, we want to signal events at a point where we are in the
3233
  // middle of some work, but don't want the handler to start calling
3237
  // them to be executed when the last operation ends, or, if no
3238
  // operation is active, when a timeout fires.
3239
  function signalLater(emitter, type /*, values...*/) {
3240
+ var arr = getHandlers(emitter, type)
3241
  if (!arr.length) { return }
3242
+ var args = Array.prototype.slice.call(arguments, 2), list
3243
  if (operationGroup) {
3244
+ list = operationGroup.delayedCallbacks
3245
  } else if (orphanDelayedCallbacks) {
3246
+ list = orphanDelayedCallbacks
3247
  } else {
3248
+ list = orphanDelayedCallbacks = []
3249
+ setTimeout(fireOrphanDelayed, 0)
3250
  }
3251
  var loop = function ( i ) {
3252
+ list.push(function () { return arr[i].apply(null, args); })
3253
  };
3254
 
3255
  for (var i = 0; i < arr.length; ++i)
3257
  }
3258
 
3259
  function fireOrphanDelayed() {
3260
+ var delayed = orphanDelayedCallbacks
3261
+ orphanDelayedCallbacks = null
3262
+ for (var i = 0; i < delayed.length; ++i) { delayed[i]() }
3263
  }
3264
 
3265
  // When an aspect of a line changes, a string is added to
3267
  // DOM structure.
3268
  function updateLineForChanges(cm, lineView, lineN, dims) {
3269
  for (var j = 0; j < lineView.changes.length; j++) {
3270
+ var type = lineView.changes[j]
3271
+ if (type == "text") { updateLineText(cm, lineView) }
3272
+ else if (type == "gutter") { updateLineGutter(cm, lineView, lineN, dims) }
3273
+ else if (type == "class") { updateLineClasses(lineView) }
3274
+ else if (type == "widget") { updateLineWidgets(cm, lineView, dims) }
3275
  }
3276
+ lineView.changes = null
3277
  }
3278
 
3279
  // Lines with gutter elements, widgets or a background class need to
3280
  // be wrapped, and have the extra elements added to the wrapper div
3281
  function ensureLineWrapped(lineView) {
3282
  if (lineView.node == lineView.text) {
3283
+ lineView.node = elt("div", null, null, "position: relative")
3284
  if (lineView.text.parentNode)
3285
+ { lineView.text.parentNode.replaceChild(lineView.node, lineView.text) }
3286
+ lineView.node.appendChild(lineView.text)
3287
+ if (ie && ie_version < 8) { lineView.node.style.zIndex = 2 }
3288
  }
3289
  return lineView.node
3290
  }
3291
 
3292
+ function updateLineBackground(lineView) {
3293
+ var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass
3294
+ if (cls) { cls += " CodeMirror-linebackground" }
3295
  if (lineView.background) {
3296
+ if (cls) { lineView.background.className = cls }
3297
+ else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null }
3298
  } else if (cls) {
3299
+ var wrap = ensureLineWrapped(lineView)
3300
+ lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild)
 
3301
  }
3302
  }
3303
 
3304
  // Wrapper around buildLineContent which will reuse the structure
3305
  // in display.externalMeasured when possible.
3306
  function getLineContent(cm, lineView) {
3307
+ var ext = cm.display.externalMeasured
3308
  if (ext && ext.line == lineView.line) {
3309
+ cm.display.externalMeasured = null
3310
+ lineView.measure = ext.measure
3311
  return ext.built
3312
  }
3313
  return buildLineContent(cm, lineView)
3317
  // classes because the mode may output tokens that influence these
3318
  // classes.
3319
  function updateLineText(cm, lineView) {
3320
+ var cls = lineView.text.className
3321
+ var built = getLineContent(cm, lineView)
3322
+ if (lineView.text == lineView.node) { lineView.node = built.pre }
3323
+ lineView.text.parentNode.replaceChild(built.pre, lineView.text)
3324
+ lineView.text = built.pre
3325
  if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {
3326
+ lineView.bgClass = built.bgClass
3327
+ lineView.textClass = built.textClass
3328
+ updateLineClasses(lineView)
3329
  } else if (cls) {
3330
+ lineView.text.className = cls
3331
  }
3332
  }
3333
 
3334
+ function updateLineClasses(lineView) {
3335
+ updateLineBackground(lineView)
3336
  if (lineView.line.wrapClass)
3337
+ { ensureLineWrapped(lineView).className = lineView.line.wrapClass }
3338
  else if (lineView.node != lineView.text)
3339
+ { lineView.node.className = "" }
3340
+ var textClass = lineView.textClass ? lineView.textClass + " " + (lineView.line.textClass || "") : lineView.line.textClass
3341
+ lineView.text.className = textClass || ""
3342
  }
3343
 
3344
  function updateLineGutter(cm, lineView, lineN, dims) {
3345
  if (lineView.gutter) {
3346
+ lineView.node.removeChild(lineView.gutter)
3347
+ lineView.gutter = null
3348
  }
3349
  if (lineView.gutterBackground) {
3350
+ lineView.node.removeChild(lineView.gutterBackground)
3351
+ lineView.gutterBackground = null
3352
  }
3353
  if (lineView.line.gutterClass) {
3354
+ var wrap = ensureLineWrapped(lineView)
3355
  lineView.gutterBackground = elt("div", null, "CodeMirror-gutter-background " + lineView.line.gutterClass,
3356
+ ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px; width: " + (dims.gutterTotalWidth) + "px"))
3357
+ wrap.insertBefore(lineView.gutterBackground, lineView.text)
 
3358
  }
3359
+ var markers = lineView.line.gutterMarkers
3360
  if (cm.options.lineNumbers || markers) {
3361
+ var wrap$1 = ensureLineWrapped(lineView)
3362
+ var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px"))
3363
+ cm.display.input.setUneditable(gutterWrap)
3364
+ wrap$1.insertBefore(gutterWrap, lineView.text)
3365
  if (lineView.line.gutterClass)
3366
+ { gutterWrap.className += " " + lineView.line.gutterClass }
3367
  if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"]))
3368
  { lineView.lineNumber = gutterWrap.appendChild(
3369
  elt("div", lineNumberFor(cm.options, lineN),
3370
  "CodeMirror-linenumber CodeMirror-gutter-elt",
3371
+ ("left: " + (dims.gutterLeft["CodeMirror-linenumbers"]) + "px; width: " + (cm.display.lineNumInnerWidth) + "px"))) }
3372
  if (markers) { for (var k = 0; k < cm.options.gutters.length; ++k) {
3373
+ var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id]
3374
  if (found)
3375
  { gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt",
3376
+ ("left: " + (dims.gutterLeft[id]) + "px; width: " + (dims.gutterWidth[id]) + "px"))) }
3377
  } }
3378
  }
3379
  }
3380
 
3381
  function updateLineWidgets(cm, lineView, dims) {
3382
+ if (lineView.alignable) { lineView.alignable = null }
3383
  for (var node = lineView.node.firstChild, next = (void 0); node; node = next) {
3384
+ next = node.nextSibling
3385
  if (node.className == "CodeMirror-linewidget")
3386
+ { lineView.node.removeChild(node) }
3387
  }
3388
+ insertLineWidgets(cm, lineView, dims)
3389
  }
3390
 
3391
  // Build a line's DOM representation from scratch
3392
  function buildLineElement(cm, lineView, lineN, dims) {
3393
+ var built = getLineContent(cm, lineView)
3394
+ lineView.text = lineView.node = built.pre
3395
+ if (built.bgClass) { lineView.bgClass = built.bgClass }
3396
+ if (built.textClass) { lineView.textClass = built.textClass }
3397
+
3398
+ updateLineClasses(lineView)
3399
+ updateLineGutter(cm, lineView, lineN, dims)
3400
+ insertLineWidgets(cm, lineView, dims)
3401
  return lineView.node
3402
  }
3403
 
3404
  // A lineView may contain multiple logical lines (when merged by
3405
  // collapsed spans). The widgets for all of them need to be drawn.
3406
  function insertLineWidgets(cm, lineView, dims) {
3407
+ insertLineWidgetsFor(cm, lineView.line, lineView, dims, true)
3408
  if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)
3409
+ { insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false) } }
3410
  }
3411
 
3412
  function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {
3413
  if (!line.widgets) { return }
3414
+ var wrap = ensureLineWrapped(lineView)
3415
  for (var i = 0, ws = line.widgets; i < ws.length; ++i) {
3416
+ var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget")
3417
+ if (!widget.handleMouseEvents) { node.setAttribute("cm-ignore-events", "true") }
3418
+ positionLineWidget(widget, node, lineView, dims)
3419
+ cm.display.input.setUneditable(node)
3420
  if (allowAbove && widget.above)
3421
+ { wrap.insertBefore(node, lineView.gutter || lineView.text) }
3422
  else
3423
+ { wrap.appendChild(node) }
3424
+ signalLater(widget, "redraw")
3425
  }
3426
  }
3427
 
3428
  function positionLineWidget(widget, node, lineView, dims) {
3429
  if (widget.noHScroll) {
3430
+ ;(lineView.alignable || (lineView.alignable = [])).push(node)
3431
+ var width = dims.wrapperWidth
3432
+ node.style.left = dims.fixedPos + "px"
3433
  if (!widget.coverGutter) {
3434
+ width -= dims.gutterTotalWidth
3435
+ node.style.paddingLeft = dims.gutterTotalWidth + "px"
3436
  }
3437
+ node.style.width = width + "px"
3438
  }
3439
  if (widget.coverGutter) {
3440
+ node.style.zIndex = 5
3441
+ node.style.position = "relative"
3442
+ if (!widget.noHScroll) { node.style.marginLeft = -dims.gutterTotalWidth + "px" }
3443
  }
3444
  }
3445
 
3446
  function widgetHeight(widget) {
3447
  if (widget.height != null) { return widget.height }
3448
+ var cm = widget.doc.cm
3449
  if (!cm) { return 0 }
3450
  if (!contains(document.body, widget.node)) {
3451
+ var parentStyle = "position: relative;"
3452
  if (widget.coverGutter)
3453
+ { parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;" }
3454
  if (widget.noHScroll)
3455
+ { parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;" }
3456
+ removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle))
3457
  }
3458
  return widget.height = widget.node.parentNode.offsetHeight
3459
  }
3473
  function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight}
3474
  function paddingH(display) {
3475
  if (display.cachedPaddingH) { return display.cachedPaddingH }
3476
+ var e = removeChildrenAndAdd(display.measure, elt("pre", "x"))
3477
+ var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle
3478
+ var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)}
3479
+ if (!isNaN(data.left) && !isNaN(data.right)) { display.cachedPaddingH = data }
3480
  return data
3481
  }
3482
 
3493
  // line. When lineWrapping is on, there might be more than one
3494
  // height.
3495
  function ensureLineHeights(cm, lineView, rect) {
3496
+ var wrapping = cm.options.lineWrapping
3497
+ var curWidth = wrapping && displayWidth(cm)
3498
  if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {
3499
+ var heights = lineView.measure.heights = []
3500
  if (wrapping) {
3501
+ lineView.measure.width = curWidth
3502
+ var rects = lineView.text.firstChild.getClientRects()
3503
  for (var i = 0; i < rects.length - 1; i++) {
3504
+ var cur = rects[i], next = rects[i + 1]
3505
  if (Math.abs(cur.bottom - next.bottom) > 2)
3506
+ { heights.push((cur.bottom + next.top) / 2 - rect.top) }
3507
  }
3508
  }
3509
+ heights.push(rect.bottom - rect.top)
3510
  }
3511
  }
3512
 
3527
  // Render a line into the hidden node display.externalMeasured. Used
3528
  // when measurement is needed for a line that's not in the viewport.
3529
  function updateExternalMeasurement(cm, line) {
3530
+ line = visualLine(line)
3531
+ var lineN = lineNo(line)
3532
+ var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN)
3533
+ view.lineN = lineN
3534
+ var built = view.built = buildLineContent(cm, view)
3535
+ view.text = built.pre
3536
+ removeChildrenAndAdd(cm.display.lineMeasure, built.pre)
3537
  return view
3538
  }
3539
 
3547
  function findViewForLine(cm, lineN) {
3548
  if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)
3549
  { return cm.display.view[findViewIndex(cm, lineN)] }
3550
+ var ext = cm.display.externalMeasured
3551
  if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)
3552
  { return ext }
3553
  }
3558
  // measurements in a row, can thus ensure that the set-up work is
3559
  // only done once.
3560
  function prepareMeasureForLine(cm, line) {
3561
+ var lineN = lineNo(line)
3562
+ var view = findViewForLine(cm, lineN)
3563
  if (view && !view.text) {
3564
+ view = null
3565
  } else if (view && view.changes) {
3566
+ updateLineForChanges(cm, view, lineN, getDimensions(cm))
3567
+ cm.curOp.forceUpdate = true
3568
  }
3569
  if (!view)
3570
+ { view = updateExternalMeasurement(cm, line) }
3571
 
3572
+ var info = mapFromLineView(view, line, lineN)
3573
  return {
3574
  line: line, view: view, rect: null,
3575
  map: info.map, cache: info.cache, before: info.before,
3580
  // Given a prepared measurement object, measures the position of an
3581
  // actual character (or fetches it from the cache).
3582
  function measureCharPrepared(cm, prepared, ch, bias, varHeight) {
3583
+ if (prepared.before) { ch = -1 }
3584
+ var key = ch + (bias || ""), found
3585
  if (prepared.cache.hasOwnProperty(key)) {
3586
+ found = prepared.cache[key]
3587
  } else {
3588
  if (!prepared.rect)
3589
+ { prepared.rect = prepared.view.text.getBoundingClientRect() }
3590
  if (!prepared.hasHeights) {
3591
+ ensureLineHeights(cm, prepared.view, prepared.rect)
3592
+ prepared.hasHeights = true
3593
  }
3594
+ found = measureCharInner(cm, prepared, ch, bias)
3595
+ if (!found.bogus) { prepared.cache[key] = found }
3596
  }
3597
  return {left: found.left, right: found.right,
3598
  top: varHeight ? found.rtop : found.top,
3599
  bottom: varHeight ? found.rbottom : found.bottom}
3600
  }
3601
 
3602
+ var nullRect = {left: 0, right: 0, top: 0, bottom: 0}
3603
 
3604
+ function nodeAndOffsetInLineMap(map, ch, bias) {
3605
+ var node, start, end, collapse, mStart, mEnd
3606
  // First, search the line map for the text node corresponding to,
3607
  // or closest to, the target character.
3608
+ for (var i = 0; i < map.length; i += 3) {
3609
+ mStart = map[i]
3610
+ mEnd = map[i + 1]
3611
  if (ch < mStart) {
3612
+ start = 0; end = 1
3613
+ collapse = "left"
3614
  } else if (ch < mEnd) {
3615
+ start = ch - mStart
3616
+ end = start + 1
3617
+ } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) {
3618
+ end = mEnd - mStart
3619
+ start = end - 1
3620
+ if (ch >= mEnd) { collapse = "right" }
3621
  }
3622
  if (start != null) {
3623
+ node = map[i + 2]
3624
  if (mStart == mEnd && bias == (node.insertLeft ? "left" : "right"))
3625
+ { collapse = bias }
3626
  if (bias == "left" && start == 0)
3627
+ { while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) {
3628
+ node = map[(i -= 3) + 2]
3629
+ collapse = "left"
3630
  } }
3631
  if (bias == "right" && start == mEnd - mStart)
3632
+ { while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) {
3633
+ node = map[(i += 3) + 2]
3634
+ collapse = "right"
3635
  } }
3636
  break
3637
  }
3640
  }
3641
 
3642
  function getUsefulRect(rects, bias) {
3643
+ var rect = nullRect
3644
  if (bias == "left") { for (var i = 0; i < rects.length; i++) {
3645
  if ((rect = rects[i]).left != rect.right) { break }
3646
  } } else { for (var i$1 = rects.length - 1; i$1 >= 0; i$1--) {
3650
  }
3651
 
3652
  function measureCharInner(cm, prepared, ch, bias) {
3653
+ var place = nodeAndOffsetInLineMap(prepared.map, ch, bias)
3654
+ var node = place.node, start = place.start, end = place.end, collapse = place.collapse
3655
 
3656
+ var rect
3657
  if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.
3658
  for (var i$1 = 0; i$1 < 4; i$1++) { // Retry a maximum of 4 times when nonsense rectangles are returned
3659
+ while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) { --start }
3660
+ while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) { ++end }
3661
  if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart)
3662
+ { rect = node.parentNode.getBoundingClientRect() }
3663
  else
3664
+ { rect = getUsefulRect(range(node, start, end).getClientRects(), bias) }
3665
  if (rect.left || rect.right || start == 0) { break }
3666
+ end = start
3667
+ start = start - 1
3668
+ collapse = "right"
3669
  }
3670
+ if (ie && ie_version < 11) { rect = maybeUpdateRectForZooming(cm.display.measure, rect) }
3671
  } else { // If it is a widget, simply get the box for the whole widget.
3672
+ if (start > 0) { collapse = bias = "right" }
3673
+ var rects
3674
  if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1)
3675
+ { rect = rects[bias == "right" ? rects.length - 1 : 0] }
3676
  else
3677
+ { rect = node.getBoundingClientRect() }
3678
  }
3679
  if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {
3680
+ var rSpan = node.parentNode.getClientRects()[0]
3681
  if (rSpan)
3682
+ { rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom} }
3683
  else
3684
+ { rect = nullRect }
3685
  }
3686
 
3687
+ var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top
3688
+ var mid = (rtop + rbot) / 2
3689
+ var heights = prepared.view.measure.heights
3690
+ var i = 0
3691
  for (; i < heights.length - 1; i++)
3692
  { if (mid < heights[i]) { break } }
3693
+ var top = i ? heights[i - 1] : 0, bot = heights[i]
3694
  var result = {left: (collapse == "right" ? rect.right : rect.left) - prepared.rect.left,
3695
  right: (collapse == "left" ? rect.left : rect.right) - prepared.rect.left,
3696
+ top: top, bottom: bot}
3697
+ if (!rect.left && !rect.right) { result.bogus = true }
3698
+ if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot }
3699
 
3700
  return result
3701
  }
3706
  if (!window.screen || screen.logicalXDPI == null ||
3707
  screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))
3708
  { return rect }
3709
+ var scaleX = screen.logicalXDPI / screen.deviceXDPI
3710
+ var scaleY = screen.logicalYDPI / screen.deviceYDPI
3711
  return {left: rect.left * scaleX, right: rect.right * scaleX,
3712
  top: rect.top * scaleY, bottom: rect.bottom * scaleY}
3713
  }
3714
 
3715
  function clearLineMeasurementCacheFor(lineView) {
3716
  if (lineView.measure) {
3717
+ lineView.measure.cache = {}
3718
+ lineView.measure.heights = null
3719
  if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)
3720
+ { lineView.measure.caches[i] = {} } }
3721
  }
3722
  }
3723
 
3724
  function clearLineMeasurementCache(cm) {
3725
+ cm.display.externalMeasure = null
3726
+ removeChildren(cm.display.lineMeasure)
3727
  for (var i = 0; i < cm.display.view.length; i++)
3728
+ { clearLineMeasurementCacheFor(cm.display.view[i]) }
3729
  }
3730
 
3731
  function clearCaches(cm) {
3732
+ clearLineMeasurementCache(cm)
3733
+ cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null
3734
+ if (!cm.options.lineWrapping) { cm.display.maxLineChanged = true }
3735
+ cm.display.lineNumChars = null
3736
  }
3737
 
3738
  function pageScrollX() { return window.pageXOffset || (document.documentElement || document.body).scrollLeft }
3744
  // or "page".
3745
  function intoCoordSystem(cm, lineObj, rect, context, includeWidgets) {
3746
  if (!includeWidgets && lineObj.widgets) { for (var i = 0; i < lineObj.widgets.length; ++i) { if (lineObj.widgets[i].above) {
3747
+ var size = widgetHeight(lineObj.widgets[i])
3748
+ rect.top += size; rect.bottom += size
3749
  } } }
3750
  if (context == "line") { return rect }
3751
+ if (!context) { context = "local" }
3752
+ var yOff = heightAtLine(lineObj)
3753
+ if (context == "local") { yOff += paddingTop(cm.display) }
3754
+ else { yOff -= cm.display.viewOffset }
3755
  if (context == "page" || context == "window") {
3756
+ var lOff = cm.display.lineSpace.getBoundingClientRect()
3757
+ yOff += lOff.top + (context == "window" ? 0 : pageScrollY())
3758
+ var xOff = lOff.left + (context == "window" ? 0 : pageScrollX())
3759
+ rect.left += xOff; rect.right += xOff
3760
  }
3761
+ rect.top += yOff; rect.bottom += yOff
3762
  return rect
3763
  }
3764
 
3766
  // Context may be "window", "page", "div", or "local"./null.
3767
  function fromCoordSystem(cm, coords, context) {
3768
  if (context == "div") { return coords }
3769
+ var left = coords.left, top = coords.top
3770
  // First move into "page" coordinate system
3771
  if (context == "page") {
3772
+ left -= pageScrollX()
3773
+ top -= pageScrollY()
3774
  } else if (context == "local" || !context) {
3775
+ var localBox = cm.display.sizer.getBoundingClientRect()
3776
+ left += localBox.left
3777
+ top += localBox.top
3778
  }
3779
 
3780
+ var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect()
3781
  return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}
3782
  }
3783
 
3784
  function charCoords(cm, pos, context, lineObj, bias) {
3785
+ if (!lineObj) { lineObj = getLine(cm.doc, pos.line) }
3786
  return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context)
3787
  }
3788
 
3803
  // Every position after the last character on a line is considered to stick
3804
  // to the last character on the line.
3805
  function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {
3806
+ lineObj = lineObj || getLine(cm.doc, pos.line)
3807
+ if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj) }
3808
  function get(ch, right) {
3809
+ var m = measureCharPrepared(cm, preparedMeasure, ch, right ? "right" : "left", varHeight)
3810
+ if (right) { m.left = m.right; } else { m.right = m.left }
3811
  return intoCoordSystem(cm, lineObj, m, context)
3812
  }
3813
+ var order = getOrder(lineObj), ch = pos.ch, sticky = pos.sticky
3814
  if (ch >= lineObj.text.length) {
3815
+ ch = lineObj.text.length
3816
+ sticky = "before"
3817
  } else if (ch <= 0) {
3818
+ ch = 0
3819
+ sticky = "after"
3820
  }
3821
  if (!order) { return get(sticky == "before" ? ch - 1 : ch, sticky == "before") }
3822
 
3823
  function getBidi(ch, partPos, invert) {
3824
+ var part = order[partPos], right = (part.level % 2) != 0
3825
  return get(invert ? ch - 1 : ch, right != invert)
3826
  }
3827
+ var partPos = getBidiPartAt(order, ch, sticky)
3828
+ var other = bidiOther
3829
+ var val = getBidi(ch, partPos, sticky == "before")
3830
+ if (other != null) { val.other = getBidi(ch, other, sticky != "before") }
3831
  return val
3832
  }
3833
 
3834
  // Used to cheaply estimate the coordinates for a position. Used for
3835
  // intermediate scroll updates.
3836
  function estimateCoords(cm, pos) {
3837
+ var left = 0
3838
+ pos = clipPos(cm.doc, pos)
3839
+ if (!cm.options.lineWrapping) { left = charWidth(cm.display) * pos.ch }
3840
+ var lineObj = getLine(cm.doc, pos.line)
3841
+ var top = heightAtLine(lineObj) + paddingTop(cm.display)
3842
  return {left: left, right: left, top: top, bottom: top + lineObj.height}
3843
  }
3844
 
3849
  // is true, that means the coordinates lie outside the line's
3850
  // vertical range.
3851
  function PosWithInfo(line, ch, sticky, outside, xRel) {
3852
+ var pos = Pos(line, ch, sticky)
3853
+ pos.xRel = xRel
3854
+ if (outside) { pos.outside = true }
3855
  return pos
3856
  }
3857
 
3858
  // Compute the character position closest to the given coordinates.
3859
  // Input must be lineSpace-local ("div" coordinate system).
3860
  function coordsChar(cm, x, y) {
3861
+ var doc = cm.doc
3862
+ y += cm.display.viewOffset
3863
  if (y < 0) { return PosWithInfo(doc.first, 0, null, true, -1) }
3864
+ var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1
3865
  if (lineN > last)
3866
  { return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, true, 1) }
3867
+ if (x < 0) { x = 0 }
3868
 
3869
+ var lineObj = getLine(doc, lineN)
3870
  for (;;) {
3871
+ var found = coordsCharInner(cm, lineObj, lineN, x, y)
3872
+ var merged = collapsedSpanAtEnd(lineObj)
3873
+ var mergedPos = merged && merged.find(0, true)
3874
  if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0))
3875
+ { lineN = lineNo(lineObj = mergedPos.to.line) }
3876
  else
3877
  { return found }
3878
  }
3879
  }
3880
 
3881
  function wrappedLineExtent(cm, lineObj, preparedMeasure, y) {
3882
+ var measure = function (ch) { return intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, ch), "line"); }
3883
+ var end = lineObj.text.length
3884
+ var begin = findFirst(function (ch) { return measure(ch - 1).bottom <= y; }, end, 0)
3885
+ end = findFirst(function (ch) { return measure(ch).top > y; }, begin, end)
3886
  return {begin: begin, end: end}
3887
  }
3888
 
3889
  function wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) {
3890
+ var targetTop = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, target), "line").top
3891
  return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop)
3892
  }
3893
 
3894
+ function coordsCharInner(cm, lineObj, lineNo, x, y) {
3895
+ y -= heightAtLine(lineObj)
3896
+ var begin = 0, end = lineObj.text.length
3897
+ var preparedMeasure = prepareMeasureForLine(cm, lineObj)
3898
+ var pos
3899
+ var order = getOrder(lineObj)
3900
  if (order) {
3901
  if (cm.options.lineWrapping) {
3902
+ ;var assign;
3903
+ ((assign = wrappedLineExtent(cm, lineObj, preparedMeasure, y), begin = assign.begin, end = assign.end, assign))
3904
  }
3905
+ pos = new Pos(lineNo, begin)
3906
+ var beginLeft = cursorCoords(cm, pos, "line", lineObj, preparedMeasure).left
3907
+ var dir = beginLeft < x ? 1 : -1
3908
+ var prevDiff, diff = beginLeft - x, prevPos
3909
  do {
3910
+ prevDiff = diff
3911
+ prevPos = pos
3912
+ pos = moveVisually(cm, lineObj, pos, dir)
3913
  if (pos == null || pos.ch < begin || end <= (pos.sticky == "before" ? pos.ch - 1 : pos.ch)) {
3914
+ pos = prevPos
3915
  break
3916
  }
3917
+ diff = cursorCoords(cm, pos, "line", lineObj, preparedMeasure).left - x
3918
  } while ((dir < 0) != (diff < 0) && (Math.abs(diff) <= Math.abs(prevDiff)))
3919
  if (Math.abs(diff) > Math.abs(prevDiff)) {
3920
  if ((diff < 0) == (prevDiff < 0)) { throw new Error("Broke out of infinite loop in coordsCharInner") }
3921
+ pos = prevPos
3922
  }
3923
  } else {
3924
  var ch = findFirst(function (ch) {
3925
+ var box = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, ch), "line")
3926
  if (box.top > y) {
3927
  // For the cursor stickiness
3928
+ end = Math.min(ch, end)
3929
  return true
3930
  }
3931
  else if (box.bottom <= y) { return false }
3932
  else if (box.left > x) { return true }
3933
  else if (box.right < x) { return false }
3934
  else { return (x - box.left < box.right - x) }
3935
+ }, begin, end)
3936
+ ch = skipExtendingChars(lineObj.text, ch, 1)
3937
+ pos = new Pos(lineNo, ch, ch == end ? "before" : "after")
3938
  }
3939
+ var coords = cursorCoords(cm, pos, "line", lineObj, preparedMeasure)
3940
+ if (y < coords.top || coords.bottom < y) { pos.outside = true }
3941
+ pos.xRel = x < coords.left ? -1 : (x > coords.right ? 1 : 0)
3942
  return pos
3943
  }
3944
 
3945
+ var measureText
3946
  // Compute the default text height.
3947
  function textHeight(display) {
3948
  if (display.cachedTextHeight != null) { return display.cachedTextHeight }
3949
  if (measureText == null) {
3950
+ measureText = elt("pre")
3951
  // Measure a bunch of lines, for browsers that compute
3952
  // fractional heights.
3953
  for (var i = 0; i < 49; ++i) {
3954
+ measureText.appendChild(document.createTextNode("x"))
3955
+ measureText.appendChild(elt("br"))
3956
  }
3957
+ measureText.appendChild(document.createTextNode("x"))
3958
  }
3959
+ removeChildrenAndAdd(display.measure, measureText)
3960
+ var height = measureText.offsetHeight / 50
3961
+ if (height > 3) { display.cachedTextHeight = height }
3962
+ removeChildren(display.measure)
3963
  return height || 1
3964
  }
3965
 
3966
  // Compute the default character width.
3967
  function charWidth(display) {
3968
  if (display.cachedCharWidth != null) { return display.cachedCharWidth }
3969
+ var anchor = elt("span", "xxxxxxxxxx")
3970
+ var pre = elt("pre", [anchor])
3971
+ removeChildrenAndAdd(display.measure, pre)
3972
+ var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10
3973
+ if (width > 2) { display.cachedCharWidth = width }
3974
  return width || 10
3975
  }
3976
 
3977
  // Do a bulk-read of the DOM positions and sizes needed to draw the
3978
  // view, so that we don't interleave reading and writing to the DOM.
3979
  function getDimensions(cm) {
3980
+ var d = cm.display, left = {}, width = {}
3981
+ var gutterLeft = d.gutters.clientLeft
3982
  for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {
3983
+ left[cm.options.gutters[i]] = n.offsetLeft + n.clientLeft + gutterLeft
3984
+ width[cm.options.gutters[i]] = n.clientWidth
3985
  }
3986
  return {fixedPos: compensateForHScroll(d),
3987
  gutterTotalWidth: d.gutters.offsetWidth,
4001
  // first approximation until the line becomes visible (and is thus
4002
  // properly measurable).
4003
  function estimateHeight(cm) {
4004
+ var th = textHeight(cm.display), wrapping = cm.options.lineWrapping
4005
+ var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3)
4006
  return function (line) {
4007
  if (lineIsHidden(cm.doc, line)) { return 0 }
4008
 
4009
+ var widgetsHeight = 0
4010
  if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {
4011
+ if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height }
4012
  } }
4013
 
4014
  if (wrapping)
4019
  }
4020
 
4021
  function estimateLineHeights(cm) {
4022
+ var doc = cm.doc, est = estimateHeight(cm)
4023
  doc.iter(function (line) {
4024
+ var estHeight = est(line)
4025
+ if (estHeight != line.height) { updateLineHeight(line, estHeight) }
4026
+ })
4027
  }
4028
 
4029
  // Given a mouse event, find the corresponding position. If liberal
4032
  // selections, and tries to estimate a character position even for
4033
  // coordinates beyond the right of the text.
4034
  function posFromMouse(cm, e, liberal, forRect) {
4035
+ var display = cm.display
4036
  if (!liberal && e_target(e).getAttribute("cm-not-content") == "true") { return null }
4037
 
4038
+ var x, y, space = display.lineSpace.getBoundingClientRect()
4039
  // Fails unpredictably on IE[67] when mouse is dragged around quickly.
4040
+ try { x = e.clientX - space.left; y = e.clientY - space.top }
4041
  catch (e) { return null }
4042
+ var coords = coordsChar(cm, x, y), line
4043
  if (forRect && coords.xRel == 1 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {
4044
+ var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length
4045
+ coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff))
4046
  }
4047
  return coords
4048
  }
4051
  // when the line isn't visible.
4052
  function findViewIndex(cm, n) {
4053
  if (n >= cm.display.viewTo) { return null }
4054
+ n -= cm.display.viewFrom
4055
  if (n < 0) { return null }
4056
+ var view = cm.display.view
4057
  for (var i = 0; i < view.length; i++) {
4058
+ n -= view[i].size
4059
  if (n < 0) { return i }
4060
  }
4061
  }
4062
 
4063
  function updateSelection(cm) {
4064
+ cm.display.input.showSelection(cm.display.input.prepareSelection())
4065
  }
4066
 
4067
  function prepareSelection(cm, primary) {
4068
+ var doc = cm.doc, result = {}
4069
+ var curFragment = result.cursors = document.createDocumentFragment()
4070
+ var selFragment = result.selection = document.createDocumentFragment()
4071
 
4072
  for (var i = 0; i < doc.sel.ranges.length; i++) {
4073
  if (primary === false && i == doc.sel.primIndex) { continue }
4074
+ var range = doc.sel.ranges[i]
4075
+ if (range.from().line >= cm.display.viewTo || range.to().line < cm.display.viewFrom) { continue }
4076
+ var collapsed = range.empty()
4077
  if (collapsed || cm.options.showCursorWhenSelecting)
4078
+ { drawSelectionCursor(cm, range.head, curFragment) }
4079
  if (!collapsed)
4080
+ { drawSelectionRange(cm, range, selFragment) }
4081
  }
4082
  return result
4083
  }
4084
 
4085
  // Draws a cursor for the given range
4086
  function drawSelectionCursor(cm, head, output) {
4087
+ var pos = cursorCoords(cm, head, "div", null, null, !cm.options.singleCursorHeightPerLine)
4088
 
4089
+ var cursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor"))
4090
+ cursor.style.left = pos.left + "px"
4091
+ cursor.style.top = pos.top + "px"
4092
+ cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px"
4093
 
4094
  if (pos.other) {
4095
  // Secondary cursor, shown when on a 'jump' in bi-directional text
4096
+ var otherCursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor"))
4097
+ otherCursor.style.display = ""
4098
+ otherCursor.style.left = pos.other.left + "px"
4099
+ otherCursor.style.top = pos.other.top + "px"
4100
+ otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px"
4101
  }
4102
  }
4103
 
4104
  // Draws the given range as a highlighted selection
4105
+ function drawSelectionRange(cm, range, output) {
4106
+ var display = cm.display, doc = cm.doc
4107
+ var fragment = document.createDocumentFragment()
4108
+ var padding = paddingH(cm.display), leftSide = padding.left
4109
+ var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right
4110
 
4111
  function add(left, top, width, bottom) {
4112
+ if (top < 0) { top = 0 }
4113
+ top = Math.round(top)
4114
+ bottom = Math.round(bottom)
4115
+ fragment.appendChild(elt("div", null, "CodeMirror-selected", ("position: absolute; left: " + left + "px;\n top: " + top + "px; width: " + (width == null ? rightSide - left : width) + "px;\n height: " + (bottom - top) + "px")))
4116
  }
4117
 
4118
  function drawForLine(line, fromArg, toArg) {
4119
+ var lineObj = getLine(doc, line)
4120
+ var lineLen = lineObj.text.length
4121
+ var start, end
4122
  function coords(ch, bias) {
4123
  return charCoords(cm, Pos(line, ch), "div", lineObj, bias)
4124
  }
4125
 
4126
+ iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir) {
4127
+ var leftPos = coords(from, "left"), rightPos, left, right
4128
  if (from == to) {
4129
+ rightPos = leftPos
4130
+ left = right = leftPos.left
4131
  } else {
4132
+ rightPos = coords(to - 1, "right")
4133
+ if (dir == "rtl") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp }
4134
+ left = leftPos.left
4135
+ right = rightPos.right
4136
  }
4137
+ if (fromArg == null && from == 0) { left = leftSide }
4138
  if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part
4139
+ add(left, leftPos.top, null, leftPos.bottom)
4140
+ left = leftSide
4141
+ if (leftPos.bottom < rightPos.top) { add(left, leftPos.bottom, null, rightPos.top) }
4142
  }
4143
+ if (toArg == null && to == lineLen) { right = rightSide }
4144
  if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)
4145
+ { start = leftPos }
4146
  if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)
4147
+ { end = rightPos }
4148
+ if (left < leftSide + 1) { left = leftSide }
4149
+ add(left, rightPos.top, right - left, rightPos.bottom)
4150
+ })
4151
  return {start: start, end: end}
4152
  }
4153
 
4154
+ var sFrom = range.from(), sTo = range.to()
4155
  if (sFrom.line == sTo.line) {
4156
+ drawForLine(sFrom.line, sFrom.ch, sTo.ch)
4157
  } else {
4158
+ var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line)
4159
+ var singleVLine = visualLine(fromLine) == visualLine(toLine)
4160
+ var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end
4161
+ var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start
4162
  if (singleVLine) {
4163
  if (leftEnd.top < rightStart.top - 2) {
4164
+ add(leftEnd.right, leftEnd.top, null, leftEnd.bottom)
4165
+ add(leftSide, rightStart.top, rightStart.left, rightStart.bottom)
4166
  } else {
4167
+ add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom)
4168
  }
4169
  }
4170
  if (leftEnd.bottom < rightStart.top)
4171
+ { add(leftSide, leftEnd.bottom, null, rightStart.top) }
4172
  }
4173
 
4174
+ output.appendChild(fragment)
4175
  }
4176
 
4177
  // Cursor-blinking
4178
  function restartBlink(cm) {
4179
  if (!cm.state.focused) { return }
4180
+ var display = cm.display
4181
+ clearInterval(display.blinker)
4182
+ var on = true
4183
+ display.cursorDiv.style.visibility = ""
4184
  if (cm.options.cursorBlinkRate > 0)
4185
  { display.blinker = setInterval(function () { return display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden"; },
4186
+ cm.options.cursorBlinkRate) }
4187
  else if (cm.options.cursorBlinkRate < 0)
4188
+ { display.cursorDiv.style.visibility = "hidden" }
4189
  }
4190
 
4191
  function ensureFocus(cm) {
4192
+ if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm) }
4193
  }
4194
 
4195
  function delayBlurEvent(cm) {
4196
+ cm.state.delayingBlurEvent = true
4197
  setTimeout(function () { if (cm.state.delayingBlurEvent) {
4198
+ cm.state.delayingBlurEvent = false
4199
+ onBlur(cm)
4200
+ } }, 100)
4201
  }
4202
 
4203
  function onFocus(cm, e) {
4204
+ if (cm.state.delayingBlurEvent) { cm.state.delayingBlurEvent = false }
4205
 
4206
  if (cm.options.readOnly == "nocursor") { return }
4207
  if (!cm.state.focused) {
4208
+ signal(cm, "focus", cm, e)
4209
+ cm.state.focused = true
4210
+ addClass(cm.display.wrapper, "CodeMirror-focused")
4211
  // This test prevents this from firing when a context
4212
  // menu is closed (since the input reset would kill the
4213
  // select-all detection hack)
4214
  if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {
4215
+ cm.display.input.reset()
4216
+ if (webkit) { setTimeout(function () { return cm.display.input.reset(true); }, 20) } // Issue #1730
4217
  }
4218
+ cm.display.input.receivedFocus()
4219
  }
4220
+ restartBlink(cm)
4221
  }
4222
  function onBlur(cm, e) {
4223
  if (cm.state.delayingBlurEvent) { return }
4224
 
4225
  if (cm.state.focused) {
4226
+ signal(cm, "blur", cm, e)
4227
+ cm.state.focused = false
4228
+ rmClass(cm.display.wrapper, "CodeMirror-focused")
4229
  }
4230
+ clearInterval(cm.display.blinker)
4231
+ setTimeout(function () { if (!cm.state.focused) { cm.display.shift = false } }, 150)
4232
  }
4233
 
4234
  // Re-align line numbers and gutter marks to compensate for
4235
  // horizontal scrolling.
4236
  function alignHorizontally(cm) {
4237
+ var display = cm.display, view = display.view
4238
  if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) { return }
4239
+ var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft
4240
+ var gutterW = display.gutters.offsetWidth, left = comp + "px"
4241
  for (var i = 0; i < view.length; i++) { if (!view[i].hidden) {
4242
  if (cm.options.fixedGutter) {
4243
  if (view[i].gutter)
4244
+ { view[i].gutter.style.left = left }
4245
  if (view[i].gutterBackground)
4246
+ { view[i].gutterBackground.style.left = left }
4247
  }
4248
+ var align = view[i].alignable
4249
  if (align) { for (var j = 0; j < align.length; j++)
4250
+ { align[j].style.left = left } }
4251
  } }
4252
  if (cm.options.fixedGutter)
4253
+ { display.gutters.style.left = (comp + gutterW) + "px" }
4254
  }
4255
 
4256
  // Used to ensure that the line number gutter is still the right
4258
  // is needed.
4259
  function maybeUpdateLineNumberWidth(cm) {
4260
  if (!cm.options.lineNumbers) { return false }
4261
+ var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display
4262
  if (last.length != display.lineNumChars) {
4263
  var test = display.measure.appendChild(elt("div", [elt("div", last)],
4264
+ "CodeMirror-linenumber CodeMirror-gutter-elt"))
4265
+ var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW
4266
+ display.lineGutter.style.width = ""
4267
+ display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1
4268
+ display.lineNumWidth = display.lineNumInnerWidth + padding
4269
+ display.lineNumChars = display.lineNumInnerWidth ? last.length : -1
4270
+ display.lineGutter.style.width = display.lineNumWidth + "px"
4271
+ updateGutterSpace(cm)
4272
  return true
4273
  }
4274
  return false
4277
  // Read the actual heights of the rendered lines, and update their
4278
  // stored heights to match.
4279
  function updateHeightsInViewport(cm) {
4280
+ var display = cm.display
4281
+ var prevBottom = display.lineDiv.offsetTop
4282
  for (var i = 0; i < display.view.length; i++) {
4283
+ var cur = display.view[i], height = (void 0)
4284
  if (cur.hidden) { continue }
4285
  if (ie && ie_version < 8) {
4286
+ var bot = cur.node.offsetTop + cur.node.offsetHeight
4287
+ height = bot - prevBottom
4288
+ prevBottom = bot
4289
  } else {
4290
+ var box = cur.node.getBoundingClientRect()
4291
+ height = box.bottom - box.top
4292
  }
4293
+ var diff = cur.line.height - height
4294
+ if (height < 2) { height = textHeight(display) }
4295
  if (diff > .001 || diff < -.001) {
4296
+ updateLineHeight(cur.line, height)
4297
+ updateWidgetHeight(cur.line)
4298
  if (cur.rest) { for (var j = 0; j < cur.rest.length; j++)
4299
+ { updateWidgetHeight(cur.rest[j]) } }
4300
  }
4301
  }
4302
  }
4305
  // given line.
4306
  function updateWidgetHeight(line) {
4307
  if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i)
4308
+ { line.widgets[i].height = line.widgets[i].node.parentNode.offsetHeight } }
4309
  }
4310
 
4311
  // Compute the lines that are visible in a given viewport (defaults
4312
  // the the current scroll position). viewport may contain top,
4313
  // height, and ensure (see op.scrollToPos) properties.
4314
  function visibleLines(display, doc, viewport) {
4315
+ var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop
4316
+ top = Math.floor(top - paddingTop(display))
4317
+ var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight
4318
 
4319
+ var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom)
4320
  // Ensure is a {from: {line, ch}, to: {line, ch}} object, and
4321
  // forces those lines into the viewport (if possible).
4322
  if (viewport && viewport.ensure) {
4323
+ var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line
4324
  if (ensureFrom < from) {
4325
+ from = ensureFrom
4326
+ to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight)
4327
  } else if (Math.min(ensureTo, doc.lastLine()) >= to) {
4328
+ from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight)
4329
+ to = ensureTo
4330
  }
4331
  }
4332
  return {from: from, to: Math.max(to, from + 1)}
4336
  // covers the visible area.
4337
  function setScrollTop(cm, val) {
4338
  if (Math.abs(cm.doc.scrollTop - val) < 2) { return }
4339
+ cm.doc.scrollTop = val
4340
+ if (!gecko) { updateDisplaySimple(cm, {top: val}) }
4341
+ if (cm.display.scroller.scrollTop != val) { cm.display.scroller.scrollTop = val }
4342
+ cm.display.scrollbars.setScrollTop(val)
4343
+ if (gecko) { updateDisplaySimple(cm) }
4344
+ startWorker(cm, 100)
4345
  }
4346
  // Sync scroller and scrollbar, ensure the gutter elements are
4347
  // aligned.
4348
  function setScrollLeft(cm, val, isScroller) {
4349
  if (isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) { return }
4350
+ val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth)
4351
+ cm.doc.scrollLeft = val
4352
+ alignHorizontally(cm)
4353
+ if (cm.display.scroller.scrollLeft != val) { cm.display.scroller.scrollLeft = val }
4354
+ cm.display.scrollbars.setScrollLeft(val)
4355
  }
4356
 
4357
  // Since the delta values reported on mouse wheel events are
4371
  // know one. These don't have to be accurate -- the result of them
4372
  // being wrong would just be a slight flicker on the first wheel
4373
  // scroll (if it is large enough).
4374
+ if (ie) { wheelPixelsPerUnit = -.53 }
4375
+ else if (gecko) { wheelPixelsPerUnit = 15 }
4376
+ else if (chrome) { wheelPixelsPerUnit = -.7 }
4377
+ else if (safari) { wheelPixelsPerUnit = -1/3 }
4378
 
4379
  function wheelEventDelta(e) {
4380
+ var dx = e.wheelDeltaX, dy = e.wheelDeltaY
4381
+ if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) { dx = e.detail }
4382
+ if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) { dy = e.detail }
4383
+ else if (dy == null) { dy = e.wheelDelta }
4384
  return {x: dx, y: dy}
4385
  }
4386
  function wheelEventPixels(e) {
4387
+ var delta = wheelEventDelta(e)
4388
+ delta.x *= wheelPixelsPerUnit
4389
+ delta.y *= wheelPixelsPerUnit
4390
  return delta
4391
  }
4392
 
4393
  function onScrollWheel(cm, e) {
4394
+ var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y
4395
 
4396
+ var display = cm.display, scroll = display.scroller
4397
  // Quit if there's nothing to scroll here
4398
+ var canScrollX = scroll.scrollWidth > scroll.clientWidth
4399
+ var canScrollY = scroll.scrollHeight > scroll.clientHeight
4400
  if (!(dx && canScrollX || dy && canScrollY)) { return }
4401
 
4402
  // Webkit browsers on OS X abort momentum scrolls when the target
4407
  outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) {
4408
  for (var i = 0; i < view.length; i++) {
4409
  if (view[i].node == cur) {
4410
+ cm.display.currentWheelTarget = cur
4411
  break outer
4412
  }
4413
  }
4422
  // better than glitching out.
4423
  if (dx && !gecko && !presto && wheelPixelsPerUnit != null) {
4424
  if (dy && canScrollY)
4425
+ { setScrollTop(cm, Math.max(0, Math.min(scroll.scrollTop + dy * wheelPixelsPerUnit, scroll.scrollHeight - scroll.clientHeight))) }
4426
+ setScrollLeft(cm, Math.max(0, Math.min(scroll.scrollLeft + dx * wheelPixelsPerUnit, scroll.scrollWidth - scroll.clientWidth)))
4427
  // Only prevent default scrolling if vertical scrolling is
4428
  // actually possible. Otherwise, it causes vertical scroll
4429
  // jitter on OSX trackpads when deltaX is small and deltaY
4430
  // is large (issue #3579)
4431
  if (!dy || (dy && canScrollY))
4432
+ { e_preventDefault(e) }
4433
+ display.wheelStartX = null // Abort measurement, if in progress
4434
  return
4435
  }
4436
 
4437
  // 'Project' the visible viewport to cover the area that is being
4438
  // scrolled into view (if we know enough to estimate it).
4439
  if (dy && wheelPixelsPerUnit != null) {
4440
+ var pixels = dy * wheelPixelsPerUnit
4441
+ var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight
4442
+ if (pixels < 0) { top = Math.max(0, top + pixels - 50) }
4443
+ else { bot = Math.min(cm.doc.height, bot + pixels + 50) }
4444
+ updateDisplaySimple(cm, {top: top, bottom: bot})
4445
  }
4446
 
4447
  if (wheelSamples < 20) {
4448
  if (display.wheelStartX == null) {
4449
+ display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop
4450
+ display.wheelDX = dx; display.wheelDY = dy
4451
  setTimeout(function () {
4452
  if (display.wheelStartX == null) { return }
4453
+ var movedX = scroll.scrollLeft - display.wheelStartX
4454
+ var movedY = scroll.scrollTop - display.wheelStartY
4455
  var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||
4456
+ (movedX && display.wheelDX && movedX / display.wheelDX)
4457
+ display.wheelStartX = display.wheelStartY = null
4458
  if (!sample) { return }
4459
+ wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1)
4460
+ ++wheelSamples
4461
+ }, 200)
4462
  } else {
4463
+ display.wheelDX += dx; display.wheelDY += dy
4464
  }
4465
  }
4466
  }
4470
  // Prepare DOM reads needed to update the scrollbars. Done in one
4471
  // shot to minimize update/measure roundtrips.
4472
  function measureForScrollbars(cm) {
4473
+ var d = cm.display, gutterW = d.gutters.offsetWidth
4474
+ var docH = Math.round(cm.doc.height + paddingVert(cm.display))
4475
  return {
4476
  clientHeight: d.scroller.clientHeight,
4477
  viewHeight: d.wrapper.clientHeight,
4486
  }
4487
 
4488
  var NativeScrollbars = function(place, scroll, cm) {
4489
+ this.cm = cm
4490
+ var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar")
4491
+ var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar")
4492
+ place(vert); place(horiz)
4493
 
4494
  on(vert, "scroll", function () {
4495
+ if (vert.clientHeight) { scroll(vert.scrollTop, "vertical") }
4496
+ })
4497
  on(horiz, "scroll", function () {
4498
+ if (horiz.clientWidth) { scroll(horiz.scrollLeft, "horizontal") }
4499
+ })
4500
 
4501
+ this.checkedZeroWidth = false
4502
  // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).
4503
+ if (ie && ie_version < 8) { this.horiz.style.minHeight = this.vert.style.minWidth = "18px" }
4504
  };
4505
 
4506
  NativeScrollbars.prototype.update = function (measure) {
4507
+ var needsH = measure.scrollWidth > measure.clientWidth + 1
4508
+ var needsV = measure.scrollHeight > measure.clientHeight + 1
4509
+ var sWidth = measure.nativeBarWidth
4510
 
4511
  if (needsV) {
4512
+ this.vert.style.display = "block"
4513
+ this.vert.style.bottom = needsH ? sWidth + "px" : "0"
4514
+ var totalHeight = measure.viewHeight - (needsH ? sWidth : 0)
4515
  // A bug in IE8 can cause this value to be negative, so guard it.
4516
  this.vert.firstChild.style.height =
4517
+ Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px"
4518
  } else {
4519
+ this.vert.style.display = ""
4520
+ this.vert.firstChild.style.height = "0"
4521
  }
4522
 
4523
  if (needsH) {
4524
+ this.horiz.style.display = "block"
4525
+ this.horiz.style.right = needsV ? sWidth + "px" : "0"
4526
+ this.horiz.style.left = measure.barLeft + "px"
4527
+ var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0)
4528
  this.horiz.firstChild.style.width =
4529
+ Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + "px"
4530
  } else {
4531
+ this.horiz.style.display = ""
4532
+ this.horiz.firstChild.style.width = "0"
4533
  }
4534
 
4535
  if (!this.checkedZeroWidth && measure.clientHeight > 0) {
4536
+ if (sWidth == 0) { this.zeroWidthHack() }
4537
+ this.checkedZeroWidth = true
4538
  }
4539
 
4540
  return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0}
4541
  };
4542
 
4543
  NativeScrollbars.prototype.setScrollLeft = function (pos) {
4544
+ if (this.horiz.scrollLeft != pos) { this.horiz.scrollLeft = pos }
4545
+ if (this.disableHoriz) { this.enableZeroWidthBar(this.horiz, this.disableHoriz) }
4546
  };
4547
 
4548
  NativeScrollbars.prototype.setScrollTop = function (pos) {
4549
+ if (this.vert.scrollTop != pos) { this.vert.scrollTop = pos }
4550
+ if (this.disableVert) { this.enableZeroWidthBar(this.vert, this.disableVert) }
4551
  };
4552
 
4553
  NativeScrollbars.prototype.zeroWidthHack = function () {
4554
+ var w = mac && !mac_geMountainLion ? "12px" : "18px"
4555
+ this.horiz.style.height = this.vert.style.width = w
4556
+ this.horiz.style.pointerEvents = this.vert.style.pointerEvents = "none"
4557
+ this.disableHoriz = new Delayed
4558
+ this.disableVert = new Delayed
4559
  };
4560
 
4561
  NativeScrollbars.prototype.enableZeroWidthBar = function (bar, delay) {
4562
+ bar.style.pointerEvents = "auto"
4563
  function maybeDisable() {
4564
  // To find out whether the scrollbar is still visible, we
4565
  // check whether the element under the pixel in the bottom
4567
  // itself (when the bar is still visible) or its filler child
4568
  // (when the bar is hidden). If it is still visible, we keep
4569
  // it enabled, if it's hidden, we disable pointer events.
4570
+ var box = bar.getBoundingClientRect()
4571
+ var elt = document.elementFromPoint(box.left + 1, box.bottom - 1)
4572
+ if (elt != bar) { bar.style.pointerEvents = "none" }
4573
+ else { delay.set(1000, maybeDisable) }
4574
  }
4575
+ delay.set(1000, maybeDisable)
4576
  };
4577
 
4578
  NativeScrollbars.prototype.clear = function () {
4579
+ var parent = this.horiz.parentNode
4580
+ parent.removeChild(this.horiz)
4581
+ parent.removeChild(this.vert)
4582
  };
4583
 
4584
  var NullScrollbars = function () {};
4589
  NullScrollbars.prototype.clear = function () {};
4590
 
4591
  function updateScrollbars(cm, measure) {
4592
+ if (!measure) { measure = measureForScrollbars(cm) }
4593
+ var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight
4594
+ updateScrollbarsInner(cm, measure)
4595
  for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) {
4596
  if (startWidth != cm.display.barWidth && cm.options.lineWrapping)
4597
+ { updateHeightsInViewport(cm) }
4598
+ updateScrollbarsInner(cm, measureForScrollbars(cm))
4599
+ startWidth = cm.display.barWidth; startHeight = cm.display.barHeight
4600
  }
4601
  }
4602
 
4603
  // Re-synchronize the fake scrollbars with the actual size of the
4604
  // content.
4605
  function updateScrollbarsInner(cm, measure) {
4606
+ var d = cm.display
4607
+ var sizes = d.scrollbars.update(measure)
4608
 
4609
+ d.sizer.style.paddingRight = (d.barWidth = sizes.right) + "px"
4610
+ d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + "px"
4611
+ d.heightForcer.style.borderBottom = sizes.bottom + "px solid transparent"
4612
 
4613
  if (sizes.right && sizes.bottom) {
4614
+ d.scrollbarFiller.style.display = "block"
4615
+ d.scrollbarFiller.style.height = sizes.bottom + "px"
4616
+ d.scrollbarFiller.style.width = sizes.right + "px"
4617
+ } else { d.scrollbarFiller.style.display = "" }
4618
  if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {
4619
+ d.gutterFiller.style.display = "block"
4620
+ d.gutterFiller.style.height = sizes.bottom + "px"
4621
+ d.gutterFiller.style.width = measure.gutterWidth + "px"
4622
+ } else { d.gutterFiller.style.display = "" }
4623
  }
4624
 
4625
+ var scrollbarModel = {"native": NativeScrollbars, "null": NullScrollbars}
4626
 
4627
  function initScrollbars(cm) {
4628
  if (cm.display.scrollbars) {
4629
+ cm.display.scrollbars.clear()
4630
  if (cm.display.scrollbars.addClass)
4631
+ { rmClass(cm.display.wrapper, cm.display.scrollbars.addClass) }
4632
  }
4633
 
4634
  cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle](function (node) {
4635
+ cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller)
4636
  // Prevent clicks in the scrollbars from killing focus
4637
  on(node, "mousedown", function () {
4638
+ if (cm.state.focused) { setTimeout(function () { return cm.display.input.focus(); }, 0) }
4639
+ })
4640
+ node.setAttribute("cm-not-content", "true")
4641
  }, function (pos, axis) {
4642
+ if (axis == "horizontal") { setScrollLeft(cm, pos) }
4643
+ else { setScrollTop(cm, pos) }
4644
+ }, cm)
4645
  if (cm.display.scrollbars.addClass)
4646
+ { addClass(cm.display.wrapper, cm.display.scrollbars.addClass) }
4647
  }
4648
 
4649
  // SCROLLING THINGS INTO VIEW
4650
 
4651
  // If an editor sits on the top or bottom of the window, partially
4652
  // scrolled out of view, this ensures that the cursor is visible.
4653
+ function maybeScrollWindow(cm, coords) {
4654
  if (signalDOMEvent(cm, "scrollCursorIntoView")) { return }
4655
 
4656
+ var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null
4657
+ if (coords.top + box.top < 0) { doScroll = true }
4658
+ else if (coords.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) { doScroll = false }
4659
  if (doScroll != null && !phantom) {
4660
+ var scrollNode = elt("div", "\u200b", null, ("position: absolute;\n top: " + (coords.top - display.viewOffset - paddingTop(cm.display)) + "px;\n height: " + (coords.bottom - coords.top + scrollGap(cm) + display.barHeight) + "px;\n left: " + (coords.left) + "px; width: 2px;"))
4661
+ cm.display.lineSpace.appendChild(scrollNode)
4662
+ scrollNode.scrollIntoView(doScroll)
4663
+ cm.display.lineSpace.removeChild(scrollNode)
4664
  }
4665
  }
4666
 
4668
  // it actually became visible (as line heights are accurately
4669
  // measured, the position of something may 'drift' during drawing).
4670
  function scrollPosIntoView(cm, pos, end, margin) {
4671
+ if (margin == null) { margin = 0 }
4672
+ var coords
4673
  for (var limit = 0; limit < 5; limit++) {
4674
+ var changed = false
4675
+ coords = cursorCoords(cm, pos)
4676
+ var endCoords = !end || end == pos ? coords : cursorCoords(cm, end)
4677
+ var scrollPos = calculateScrollPos(cm, Math.min(coords.left, endCoords.left),
4678
+ Math.min(coords.top, endCoords.top) - margin,
4679
+ Math.max(coords.left, endCoords.left),
4680
+ Math.max(coords.bottom, endCoords.bottom) + margin)
4681
+ var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft
 
4682
  if (scrollPos.scrollTop != null) {
4683
+ setScrollTop(cm, scrollPos.scrollTop)
4684
+ if (Math.abs(cm.doc.scrollTop - startTop) > 1) { changed = true }
4685
  }
4686
  if (scrollPos.scrollLeft != null) {
4687
+ setScrollLeft(cm, scrollPos.scrollLeft)
4688
+ if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { changed = true }
4689
  }
4690
  if (!changed) { break }
4691
  }
4692
+ return coords
4693
  }
4694
 
4695
  // Scroll a given set of coordinates into view (immediately).
4696
+ function scrollIntoView(cm, x1, y1, x2, y2) {
4697
+ var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2)
4698
+ if (scrollPos.scrollTop != null) { setScrollTop(cm, scrollPos.scrollTop) }
4699
+ if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft) }
4700
  }
4701
 
4702
  // Calculate a new scroll position needed to scroll the given
4703
  // rectangle into view. Returns an object with scrollTop and
4704
  // scrollLeft properties. When these are undefined, the
4705
  // vertical/horizontal position does not need to be adjusted.
4706
+ function calculateScrollPos(cm, x1, y1, x2, y2) {
4707
+ var display = cm.display, snapMargin = textHeight(cm.display)
4708
+ if (y1 < 0) { y1 = 0 }
4709
+ var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop
4710
+ var screen = displayHeight(cm), result = {}
4711
+ if (y2 - y1 > screen) { y2 = y1 + screen }
4712
+ var docBottom = cm.doc.height + paddingVert(display)
4713
+ var atTop = y1 < snapMargin, atBottom = y2 > docBottom - snapMargin
4714
+ if (y1 < screentop) {
4715
+ result.scrollTop = atTop ? 0 : y1
4716
+ } else if (y2 > screentop + screen) {
4717
+ var newTop = Math.min(y1, (atBottom ? docBottom : y2) - screen)
4718
+ if (newTop != screentop) { result.scrollTop = newTop }
4719
+ }
4720
+
4721
+ var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft
4722
+ var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0)
4723
+ var tooWide = x2 - x1 > screenw
4724
+ if (tooWide) { x2 = x1 + screenw }
4725
+ if (x1 < 10)
4726
+ { result.scrollLeft = 0 }
4727
+ else if (x1 < screenleft)
4728
+ { result.scrollLeft = Math.max(0, x1 - (tooWide ? 0 : 10)) }
4729
+ else if (x2 > screenw + screenleft - 3)
4730
+ { result.scrollLeft = x2 + (tooWide ? 0 : 10) - screenw }
4731
  return result
4732
  }
4733
 
4734
  // Store a relative adjustment to the scroll position in the current
4735
  // operation (to be applied when the operation finishes).
4736
  function addToScrollPos(cm, left, top) {
4737
+ if (left != null || top != null) { resolveScrollToPos(cm) }
4738
  if (left != null)
4739
+ { cm.curOp.scrollLeft = (cm.curOp.scrollLeft == null ? cm.doc.scrollLeft : cm.curOp.scrollLeft) + left }
4740
  if (top != null)
4741
+ { cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top }
4742
  }
4743
 
4744
  // Make sure that at the end of the operation the current cursor is
4745
  // shown.
4746
  function ensureCursorVisible(cm) {
4747
+ resolveScrollToPos(cm)
4748
+ var cur = cm.getCursor(), from = cur, to = cur
4749
  if (!cm.options.lineWrapping) {
4750
+ from = cur.ch ? Pos(cur.line, cur.ch - 1) : cur
4751
+ to = Pos(cur.line, cur.ch + 1)
4752
  }
4753
+ cm.curOp.scrollToPos = {from: from, to: to, margin: cm.options.cursorScrollMargin, isCursor: true}
4754
  }
4755
 
4756
  // When an operation has its scrollToPos property set, and another
4758
  // 'simulates' scrolling that position into view in a cheap way, so
4759
  // that the effect of intermediate scroll commands is not ignored.
4760
  function resolveScrollToPos(cm) {
4761
+ var range = cm.curOp.scrollToPos
4762
+ if (range) {
4763
+ cm.curOp.scrollToPos = null
4764
+ var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to)
4765
+ var sPos = calculateScrollPos(cm, Math.min(from.left, to.left),
4766
+ Math.min(from.top, to.top) - range.margin,
4767
+ Math.max(from.right, to.right),
4768
+ Math.max(from.bottom, to.bottom) + range.margin)
4769
+ cm.scrollTo(sPos.scrollLeft, sPos.scrollTop)
 
 
4770
  }
4771
  }
4772
 
4776
  // error-prone). Instead, display updates are batched and then all
4777
  // combined and executed at once.
4778
 
4779
+ var nextOpId = 0
4780
  // Start a new operation.
4781
  function startOperation(cm) {
4782
  cm.curOp = {
4795
  scrollToPos: null, // Used to scroll to a specific position
4796
  focus: false,
4797
  id: ++nextOpId // Unique ID
4798
+ }
4799
+ pushOperation(cm.curOp)
4800
  }
4801
 
4802
  // Finish an operation, updating the display and signalling delayed events
4803
  function endOperation(cm) {
4804
+ var op = cm.curOp
4805
  finishOperation(op, function (group) {
4806
  for (var i = 0; i < group.ops.length; i++)
4807
+ { group.ops[i].cm.curOp = null }
4808
+ endOperations(group)
4809
+ })
4810
  }
4811
 
4812
  // The DOM updates done when an operation finishes are batched so
4813
  // that the minimum number of relayouts are required.
4814
  function endOperations(group) {
4815
+ var ops = group.ops
4816
  for (var i = 0; i < ops.length; i++) // Read DOM
4817
+ { endOperation_R1(ops[i]) }
4818
  for (var i$1 = 0; i$1 < ops.length; i$1++) // Write DOM (maybe)
4819
+ { endOperation_W1(ops[i$1]) }
4820
  for (var i$2 = 0; i$2 < ops.length; i$2++) // Read DOM
4821
+ { endOperation_R2(ops[i$2]) }
4822
  for (var i$3 = 0; i$3 < ops.length; i$3++) // Write DOM (maybe)
4823
+ { endOperation_W2(ops[i$3]) }
4824
  for (var i$4 = 0; i$4 < ops.length; i$4++) // Read DOM
4825
+ { endOperation_finish(ops[i$4]) }
4826
  }
4827
 
4828
  function endOperation_R1(op) {
4829
+ var cm = op.cm, display = cm.display
4830
+ maybeClipScrollbars(cm)
4831
+ if (op.updateMaxLine) { findMaxLine(cm) }
4832
 
4833
  op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null ||
4834
  op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom ||
4835
  op.scrollToPos.to.line >= display.viewTo) ||
4836
+ display.maxLineChanged && cm.options.lineWrapping
4837
  op.update = op.mustUpdate &&
4838
+ new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate)
4839
  }
4840
 
4841
  function endOperation_W1(op) {
4842
+ op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update)
4843
  }
4844
 
4845
  function endOperation_R2(op) {
4846
+ var cm = op.cm, display = cm.display
4847
+ if (op.updatedDisplay) { updateHeightsInViewport(cm) }
4848
 
4849
+ op.barMeasure = measureForScrollbars(cm)
4850
 
4851
  // If the max line changed since it was last measured, measure it,
4852
  // and ensure the document's width matches it.
4853
  // updateDisplay_W2 will use these properties to do the actual resizing
4854
  if (display.maxLineChanged && !cm.options.lineWrapping) {
4855
+ op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3
4856
+ cm.display.sizerWidth = op.adjustWidthTo
4857
  op.barMeasure.scrollWidth =
4858
+ Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth)
4859
+ op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm))
4860
  }
4861
 
4862
  if (op.updatedDisplay || op.selectionChanged)
4863
+ { op.preparedSelection = display.input.prepareSelection(op.focus) }
4864
  }
4865
 
4866
  function endOperation_W2(op) {
4867
+ var cm = op.cm
4868
 
4869
  if (op.adjustWidthTo != null) {
4870
+ cm.display.sizer.style.minWidth = op.adjustWidthTo + "px"
4871
  if (op.maxScrollLeft < cm.doc.scrollLeft)
4872
+ { setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true) }
4873
+ cm.display.maxLineChanged = false
4874
  }
4875
 
4876
+ var takeFocus = op.focus && op.focus == activeElt() && (!document.hasFocus || document.hasFocus())
4877
  if (op.preparedSelection)
4878
+ { cm.display.input.showSelection(op.preparedSelection, takeFocus) }
4879
  if (op.updatedDisplay || op.startHeight != cm.doc.height)
4880
+ { updateScrollbars(cm, op.barMeasure) }
4881
  if (op.updatedDisplay)
4882
+ { setDocumentHeight(cm, op.barMeasure) }
4883
 
4884
+ if (op.selectionChanged) { restartBlink(cm) }
4885
 
4886
  if (cm.state.focused && op.updateInput)
4887
+ { cm.display.input.reset(op.typing) }
4888
+ if (takeFocus) { ensureFocus(op.cm) }
4889
  }
4890
 
4891
  function endOperation_finish(op) {
4892
+ var cm = op.cm, display = cm.display, doc = cm.doc
4893
 
4894
+ if (op.updatedDisplay) { postUpdateDisplay(cm, op.update) }
4895
 
4896
  // Abort mouse wheel delta measurement, when scrolling explicitly
4897
  if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos))
4898
+ { display.wheelStartX = display.wheelStartY = null }
4899
 
4900
  // Propagate the scroll position to the actual DOM scroller
4901
  if (op.scrollTop != null && (display.scroller.scrollTop != op.scrollTop || op.forceScroll)) {
4902
+ doc.scrollTop = Math.max(0, Math.min(display.scroller.scrollHeight - display.scroller.clientHeight, op.scrollTop))
4903
+ display.scrollbars.setScrollTop(doc.scrollTop)
4904
+ display.scroller.scrollTop = doc.scrollTop
4905
  }
4906
  if (op.scrollLeft != null && (display.scroller.scrollLeft != op.scrollLeft || op.forceScroll)) {
4907
+ doc.scrollLeft = Math.max(0, Math.min(display.scroller.scrollWidth - display.scroller.clientWidth, op.scrollLeft))
4908
+ display.scrollbars.setScrollLeft(doc.scrollLeft)
4909
+ display.scroller.scrollLeft = doc.scrollLeft
4910
+ alignHorizontally(cm)
4911
  }
4912
  // If we need to scroll a specific position into view, do so.
4913
  if (op.scrollToPos) {
4914
+ var coords = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from),
4915
+ clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin)
4916
+ if (op.scrollToPos.isCursor && cm.state.focused) { maybeScrollWindow(cm, coords) }
4917
  }
4918
 
4919
  // Fire events for markers that are hidden/unidden by editing or
4920
  // undoing
4921
+ var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers
4922
  if (hidden) { for (var i = 0; i < hidden.length; ++i)
4923
+ { if (!hidden[i].lines.length) { signal(hidden[i], "hide") } } }
4924
  if (unhidden) { for (var i$1 = 0; i$1 < unhidden.length; ++i$1)
4925
+ { if (unhidden[i$1].lines.length) { signal(unhidden[i$1], "unhide") } } }
4926
 
4927
  if (display.wrapper.offsetHeight)
4928
+ { doc.scrollTop = cm.display.scroller.scrollTop }
4929
 
4930
  // Fire change events, and delayed event handlers
4931
  if (op.changeObjs)
4932
+ { signal(cm, "changes", cm, op.changeObjs) }
4933
  if (op.update)
4934
+ { op.update.finish() }
4935
  }
4936
 
4937
  // Run the given function in an operation
4938
  function runInOp(cm, f) {
4939
  if (cm.curOp) { return f() }
4940
+ startOperation(cm)
4941
  try { return f() }
4942
+ finally { endOperation(cm) }
4943
  }
4944
  // Wraps a function in an operation. Returns the wrapped function.
4945
  function operation(cm, f) {
4946
  return function() {
4947
  if (cm.curOp) { return f.apply(cm, arguments) }
4948
+ startOperation(cm)
4949
  try { return f.apply(cm, arguments) }
4950
+ finally { endOperation(cm) }
4951
  }
4952
  }
4953
  // Used to add methods to editor and doc instances, wrapping them in
4955
  function methodOp(f) {
4956
  return function() {
4957
  if (this.curOp) { return f.apply(this, arguments) }
4958
+ startOperation(this)
4959
  try { return f.apply(this, arguments) }
4960
+ finally { endOperation(this) }
4961
  }
4962
  }
4963
  function docMethodOp(f) {
4964
  return function() {
4965
+ var cm = this.cm
4966
  if (!cm || cm.curOp) { return f.apply(this, arguments) }
4967
+ startOperation(cm)
4968
  try { return f.apply(this, arguments) }
4969
+ finally { endOperation(cm) }
4970
  }
4971
  }
4972
 
4977
  // lines are divided into visual lines. regLineChange (below)
4978
  // registers single-line changes.
4979
  function regChange(cm, from, to, lendiff) {
4980
+ if (from == null) { from = cm.doc.first }
4981
+ if (to == null) { to = cm.doc.first + cm.doc.size }
4982
+ if (!lendiff) { lendiff = 0 }
4983
 
4984
+ var display = cm.display
4985
  if (lendiff && to < display.viewTo &&
4986
  (display.updateLineNumbers == null || display.updateLineNumbers > from))
4987
+ { display.updateLineNumbers = from }
4988
 
4989
+ cm.curOp.viewChanged = true
4990
 
4991
  if (from >= display.viewTo) { // Change after
4992
  if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo)
4993
+ { resetView(cm) }
4994
  } else if (to <= display.viewFrom) { // Change before
4995
  if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) {
4996
+ resetView(cm)
4997
  } else {
4998
+ display.viewFrom += lendiff
4999
+ display.viewTo += lendiff
5000
  }
5001
  } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap
5002
+ resetView(cm)
5003
  } else if (from <= display.viewFrom) { // Top overlap
5004
+ var cut = viewCuttingPoint(cm, to, to + lendiff, 1)
5005
  if (cut) {
5006
+ display.view = display.view.slice(cut.index)
5007
+ display.viewFrom = cut.lineN
5008
+ display.viewTo += lendiff
5009
  } else {
5010
+ resetView(cm)
5011
  }
5012
  } else if (to >= display.viewTo) { // Bottom overlap
5013
+ var cut$1 = viewCuttingPoint(cm, from, from, -1)
5014
  if (cut$1) {
5015
+ display.view = display.view.slice(0, cut$1.index)
5016
+ display.viewTo = cut$1.lineN
5017
  } else {
5018
+ resetView(cm)
5019
  }
5020
  } else { // Gap in the middle
5021
+ var cutTop = viewCuttingPoint(cm, from, from, -1)
5022
+ var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1)
5023
  if (cutTop && cutBot) {
5024
  display.view = display.view.slice(0, cutTop.index)
5025
  .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN))
5026
+ .concat(display.view.slice(cutBot.index))
5027
+ display.viewTo += lendiff
5028
  } else {
5029
+ resetView(cm)
5030
  }
5031
  }
5032
 
5033
+ var ext = display.externalMeasured
5034
  if (ext) {
5035
  if (to < ext.lineN)
5036
+ { ext.lineN += lendiff }
5037
  else if (from < ext.lineN + ext.size)
5038
+ { display.externalMeasured = null }
5039
  }
5040
  }
5041
 
5042
  // Register a change to a single line. Type must be one of "text",
5043
  // "gutter", "class", "widget"
5044
  function regLineChange(cm, line, type) {
5045
+ cm.curOp.viewChanged = true
5046
+ var display = cm.display, ext = cm.display.externalMeasured
5047
  if (ext && line >= ext.lineN && line < ext.lineN + ext.size)
5048
+ { display.externalMeasured = null }
5049
 
5050
  if (line < display.viewFrom || line >= display.viewTo) { return }
5051
+ var lineView = display.view[findViewIndex(cm, line)]
5052
  if (lineView.node == null) { return }
5053
+ var arr = lineView.changes || (lineView.changes = [])
5054
+ if (indexOf(arr, type) == -1) { arr.push(type) }
5055
  }
5056
 
5057
  // Clear the view.
5058
  function resetView(cm) {
5059
+ cm.display.viewFrom = cm.display.viewTo = cm.doc.first
5060
+ cm.display.view = []
5061
+ cm.display.viewOffset = 0
5062
  }
5063
 
5064
  function viewCuttingPoint(cm, oldN, newN, dir) {
5065
+ var index = findViewIndex(cm, oldN), diff, view = cm.display.view
5066
  if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size)
5067
  { return {index: index, lineN: newN} }
5068
+ var n = cm.display.viewFrom
5069
  for (var i = 0; i < index; i++)
5070
+ { n += view[i].size }
5071
  if (n != oldN) {
5072
  if (dir > 0) {
5073
  if (index == view.length - 1) { return null }
5074
+ diff = (n + view[index].size) - oldN
5075
+ index++
5076
  } else {
5077
+ diff = n - oldN
5078
  }
5079
+ oldN += diff; newN += diff
5080
  }
5081
  while (visualLineNo(cm.doc, newN) != newN) {
5082
  if (index == (dir < 0 ? 0 : view.length - 1)) { return null }
5083
+ newN += dir * view[index - (dir < 0 ? 1 : 0)].size
5084
+ index += dir
5085
  }
5086
  return {index: index, lineN: newN}
5087
  }
5089
  // Force the view to cover a given range, adding empty view element
5090
  // or clipping off existing ones as needed.
5091
  function adjustView(cm, from, to) {
5092
+ var display = cm.display, view = display.view
5093
  if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) {
5094
+ display.view = buildViewArray(cm, from, to)
5095
+ display.viewFrom = from
5096
  } else {
5097
  if (display.viewFrom > from)
5098
+ { display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view) }
5099
  else if (display.viewFrom < from)
5100
+ { display.view = display.view.slice(findViewIndex(cm, from)) }
5101
+ display.viewFrom = from
5102
  if (display.viewTo < to)
5103
+ { display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)) }
5104
  else if (display.viewTo > to)
5105
+ { display.view = display.view.slice(0, findViewIndex(cm, to)) }
5106
  }
5107
+ display.viewTo = to
5108
  }
5109
 
5110
  // Count the number of lines in the view whose DOM representation is
5111
  // out of date (or nonexistent).
5112
  function countDirtyView(cm) {
5113
+ var view = cm.display.view, dirty = 0
5114
  for (var i = 0; i < view.length; i++) {
5115
+ var lineView = view[i]
5116
+ if (!lineView.hidden && (!lineView.node || lineView.changes)) { ++dirty }
5117
  }
5118
  return dirty
5119
  }
5122
 
5123
  function startWorker(cm, time) {
5124
  if (cm.doc.mode.startState && cm.doc.frontier < cm.display.viewTo)
5125
+ { cm.state.highlight.set(time, bind(highlightWorker, cm)) }
5126
  }
5127
 
5128
  function highlightWorker(cm) {
5129
+ var doc = cm.doc
5130
+ if (doc.frontier < doc.first) { doc.frontier = doc.first }
5131
  if (doc.frontier >= cm.display.viewTo) { return }
5132
+ var end = +new Date + cm.options.workTime
5133
+ var state = copyState(doc.mode, getStateBefore(cm, doc.frontier))
5134
+ var changedLines = []
5135
 
5136
  doc.iter(doc.frontier, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function (line) {
5137
  if (doc.frontier >= cm.display.viewFrom) { // Visible
5138
+ var oldStyles = line.styles, tooLong = line.text.length > cm.options.maxHighlightLength
5139
+ var highlighted = highlightLine(cm, line, tooLong ? copyState(doc.mode, state) : state, true)
5140
+ line.styles = highlighted.styles
5141
+ var oldCls = line.styleClasses, newCls = highlighted.classes
5142
+ if (newCls) { line.styleClasses = newCls }
5143
+ else if (oldCls) { line.styleClasses = null }
5144
  var ischange = !oldStyles || oldStyles.length != line.styles.length ||
5145
+ oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass)
5146
+ for (var i = 0; !ischange && i < oldStyles.length; ++i) { ischange = oldStyles[i] != line.styles[i] }
5147
+ if (ischange) { changedLines.push(doc.frontier) }
5148
+ line.stateAfter = tooLong ? state : copyState(doc.mode, state)
5149
  } else {
5150
  if (line.text.length <= cm.options.maxHighlightLength)
5151
+ { processLine(cm, line.text, state) }
5152
+ line.stateAfter = doc.frontier % 5 == 0 ? copyState(doc.mode, state) : null
5153
  }
5154
+ ++doc.frontier
5155
  if (+new Date > end) {
5156
+ startWorker(cm, cm.options.workDelay)
5157
  return true
5158
  }
5159
+ })
5160
  if (changedLines.length) { runInOp(cm, function () {
5161
  for (var i = 0; i < changedLines.length; i++)
5162
+ { regLineChange(cm, changedLines[i], "text") }
5163
+ }) }
5164
  }
5165
 
5166
  // DISPLAY DRAWING
5167
 
5168
  var DisplayUpdate = function(cm, viewport, force) {
5169
+ var display = cm.display
5170
 
5171
+ this.viewport = viewport
5172
  // Store some values that we'll need later (but don't want to force a relayout for)
5173
+ this.visible = visibleLines(display, cm.doc, viewport)
5174
+ this.editorIsHidden = !display.wrapper.offsetWidth
5175
+ this.wrapperHeight = display.wrapper.clientHeight
5176
+ this.wrapperWidth = display.wrapper.clientWidth
5177
+ this.oldDisplayWidth = displayWidth(cm)
5178
+ this.force = force
5179
+ this.dims = getDimensions(cm)
5180
+ this.events = []
5181
  };
5182
 
5183
  DisplayUpdate.prototype.signal = function (emitter, type) {
5184
  if (hasHandler(emitter, type))
5185
+ { this.events.push(arguments) }
5186
  };
5187
  DisplayUpdate.prototype.finish = function () {
5188
  var this$1 = this;
5189
 
5190
  for (var i = 0; i < this.events.length; i++)
5191
+ { signal.apply(null, this$1.events[i]) }
5192
  };
5193
 
5194
  function maybeClipScrollbars(cm) {
5195
+ var display = cm.display
5196
  if (!display.scrollbarsClipped && display.scroller.offsetWidth) {
5197
+ display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth
5198
+ display.heightForcer.style.height = scrollGap(cm) + "px"
5199
+ display.sizer.style.marginBottom = -display.nativeBarWidth + "px"
5200
+ display.sizer.style.borderRightWidth = scrollGap(cm) + "px"
5201
+ display.scrollbarsClipped = true
5202
  }
5203
  }
5204
 
5206
  // (returning false) when there is nothing to be done and forced is
5207
  // false.
5208
  function updateDisplayIfNeeded(cm, update) {
5209
+ var display = cm.display, doc = cm.doc
5210
 
5211
  if (update.editorIsHidden) {
5212
+ resetView(cm)
5213
  return false
5214
  }
5215
 
5221
  { return false }
5222
 
5223
  if (maybeUpdateLineNumberWidth(cm)) {
5224
+ resetView(cm)
5225
+ update.dims = getDimensions(cm)
5226
  }
5227
 
5228
  // Compute a suitable new viewport (from & to)
5229
+ var end = doc.first + doc.size
5230
+ var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first)
5231
+ var to = Math.min(end, update.visible.to + cm.options.viewportMargin)
5232
+ if (display.viewFrom < from && from - display.viewFrom < 20) { from = Math.max(doc.first, display.viewFrom) }
5233
+ if (display.viewTo > to && display.viewTo - to < 20) { to = Math.min(end, display.viewTo) }
5234
  if (sawCollapsedSpans) {
5235
+ from = visualLineNo(cm.doc, from)
5236
+ to = visualLineEndNo(cm.doc, to)
5237
  }
5238
 
5239
  var different = from != display.viewFrom || to != display.viewTo ||
5240
+ display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth
5241
+ adjustView(cm, from, to)
5242
 
5243
+ display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom))
5244
  // Position the mover div to align with the current scroll position
5245
+ cm.display.mover.style.top = display.viewOffset + "px"
5246
 
5247
+ var toUpdate = countDirtyView(cm)
5248
  if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view &&
5249
  (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo))
5250
  { return false }
5251
 
5252
  // For big changes, we hide the enclosing element during the
5253
  // update, since that speeds up the operations on most browsers.
5254
+ var focused = activeElt()
5255
+ if (toUpdate > 4) { display.lineDiv.style.display = "none" }
5256
+ patchDisplay(cm, display.updateLineNumbers, update.dims)
5257
+ if (toUpdate > 4) { display.lineDiv.style.display = "" }
5258
+ display.renderedView = display.view
5259
  // There might have been a widget with a focused element that got
5260
  // hidden or updated, if so re-focus it.
5261
+ if (focused && activeElt() != focused && focused.offsetHeight) { focused.focus() }
5262
 
5263
  // Prevent selection and cursors from interfering with the scroll
5264
  // width and height.
5265
+ removeChildren(display.cursorDiv)
5266
+ removeChildren(display.selectionDiv)
5267
+ display.gutters.style.height = display.sizer.style.minHeight = 0
5268
 
5269
  if (different) {
5270
+ display.lastWrapHeight = update.wrapperHeight
5271
+ display.lastWrapWidth = update.wrapperWidth
5272
+ startWorker(cm, 400)
5273
  }
5274
 
5275
+ display.updateLineNumbers = null
5276
 
5277
  return true
5278
  }
5279
 
5280
  function postUpdateDisplay(cm, update) {
5281
+ var viewport = update.viewport
5282
 
5283
  for (var first = true;; first = false) {
5284
  if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {
5285
  // Clip forced viewport to actual scrollable area.
5286
  if (viewport && viewport.top != null)
5287
+ { viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)} }
5288
  // Updated line heights might result in the drawn area not
5289
  // actually covering the viewport. Keep looping until it does.
5290
+ update.visible = visibleLines(cm.display, cm.doc, viewport)
5291
  if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)
5292
  { break }
5293
  }
5294
  if (!updateDisplayIfNeeded(cm, update)) { break }
5295
+ updateHeightsInViewport(cm)
5296
+ var barMeasure = measureForScrollbars(cm)
5297
+ updateSelection(cm)
5298
+ updateScrollbars(cm, barMeasure)
5299
+ setDocumentHeight(cm, barMeasure)
5300
  }
5301
 
5302
+ update.signal(cm, "update", cm)
5303
  if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {
5304
+ update.signal(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo)
5305
+ cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo
5306
  }
5307
  }
5308
 
5309
  function updateDisplaySimple(cm, viewport) {
5310
+ var update = new DisplayUpdate(cm, viewport)
5311
  if (updateDisplayIfNeeded(cm, update)) {
5312
+ updateHeightsInViewport(cm)
5313
+ postUpdateDisplay(cm, update)
5314
+ var barMeasure = measureForScrollbars(cm)
5315
+ updateSelection(cm)
5316
+ updateScrollbars(cm, barMeasure)
5317
+ setDocumentHeight(cm, barMeasure)
5318
+ update.finish()
5319
  }
5320
  }
5321
 
5324
  // that are not there yet, and updating the ones that are out of
5325
  // date.
5326
  function patchDisplay(cm, updateNumbersFrom, dims) {
5327
+ var display = cm.display, lineNumbers = cm.options.lineNumbers
5328
+ var container = display.lineDiv, cur = container.firstChild
5329
 
5330
  function rm(node) {
5331
+ var next = node.nextSibling
5332
  // Works around a throw-scroll bug in OS X Webkit
5333
  if (webkit && mac && cm.display.currentWheelTarget == node)
5334
+ { node.style.display = "none" }
5335
  else
5336
+ { node.parentNode.removeChild(node) }
5337
  return next
5338
  }
5339
 
5340
+ var view = display.view, lineN = display.viewFrom
5341
  // Loop over the elements in the view, syncing cur (the DOM nodes
5342
  // in display.lineDiv) with the view as we go.
5343
  for (var i = 0; i < view.length; i++) {
5344
+ var lineView = view[i]
5345
  if (lineView.hidden) {
5346
  } else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet
5347
+ var node = buildLineElement(cm, lineView, lineN, dims)
5348
+ container.insertBefore(node, cur)
5349
  } else { // Already drawn
5350
+ while (cur != lineView.node) { cur = rm(cur) }
5351
  var updateNumber = lineNumbers && updateNumbersFrom != null &&
5352
+ updateNumbersFrom <= lineN && lineView.lineNumber
5353
  if (lineView.changes) {
5354
+ if (indexOf(lineView.changes, "gutter") > -1) { updateNumber = false }
5355
+ updateLineForChanges(cm, lineView, lineN, dims)
5356
  }
5357
  if (updateNumber) {
5358
+ removeChildren(lineView.lineNumber)
5359
+ lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)))
5360
  }
5361
+ cur = lineView.node.nextSibling
5362
  }
5363
+ lineN += lineView.size
5364
  }
5365
+ while (cur) { cur = rm(cur) }
5366
  }
5367
 
5368
  function updateGutterSpace(cm) {
5369
+ var width = cm.display.gutters.offsetWidth
5370
+ cm.display.sizer.style.marginLeft = width + "px"
5371
  }
5372
 
5373
  function setDocumentHeight(cm, measure) {
5374
+ cm.display.sizer.style.minHeight = measure.docHeight + "px"
5375
+ cm.display.heightForcer.style.top = measure.docHeight + "px"
5376
+ cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + "px"
5377
  }
5378
 
5379
  // Rebuild the gutter elements, ensure the margin to the left of the
5380
  // code matches their width.
5381
  function updateGutters(cm) {
5382
+ var gutters = cm.display.gutters, specs = cm.options.gutters
5383
+ removeChildren(gutters)
5384
+ var i = 0
5385
  for (; i < specs.length; ++i) {
5386
+ var gutterClass = specs[i]
5387
+ var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + gutterClass))
5388
  if (gutterClass == "CodeMirror-linenumbers") {
5389
+ cm.display.lineGutter = gElt
5390
+ gElt.style.width = (cm.display.lineNumWidth || 1) + "px"
5391
  }
5392
  }
5393
+ gutters.style.display = i ? "" : "none"
5394
+ updateGutterSpace(cm)
5395
  }
5396
 
5397
  // Make sure the gutters options contains the element
5398
  // "CodeMirror-linenumbers" when the lineNumbers option is true.
5399
  function setGuttersForLineNumbers(options) {
5400
+ var found = indexOf(options.gutters, "CodeMirror-linenumbers")
5401
  if (found == -1 && options.lineNumbers) {
5402
+ options.gutters = options.gutters.concat(["CodeMirror-linenumbers"])
5403
  } else if (found > -1 && !options.lineNumbers) {
5404
+ options.gutters = options.gutters.slice(0)
5405
+ options.gutters.splice(found, 1)
5406
  }
5407
  }
5408
 
5412
  // which one is the primary selection (the one that's scrolled into
5413
  // view, that getCursor returns, etc).
5414
  var Selection = function(ranges, primIndex) {
5415
+ this.ranges = ranges
5416
+ this.primIndex = primIndex
5417
  };
5418
 
5419
  Selection.prototype.primary = function () { return this.ranges[this.primIndex] };
5424
  if (other == this) { return true }
5425
  if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) { return false }
5426
  for (var i = 0; i < this.ranges.length; i++) {
5427
+ var here = this$1.ranges[i], there = other.ranges[i]
5428
  if (!equalCursorPos(here.anchor, there.anchor) || !equalCursorPos(here.head, there.head)) { return false }
5429
  }
5430
  return true
5433
  Selection.prototype.deepCopy = function () {
5434
  var this$1 = this;
5435
 
5436
+ var out = []
5437
  for (var i = 0; i < this.ranges.length; i++)
5438
+ { out[i] = new Range(copyPos(this$1.ranges[i].anchor), copyPos(this$1.ranges[i].head)) }
5439
  return new Selection(out, this.primIndex)
5440
  };
5441
 
5450
  Selection.prototype.contains = function (pos, end) {
5451
  var this$1 = this;
5452
 
5453
+ if (!end) { end = pos }
5454
  for (var i = 0; i < this.ranges.length; i++) {
5455
+ var range = this$1.ranges[i]
5456
  if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0)
5457
  { return i }
5458
  }
5460
  };
5461
 
5462
  var Range = function(anchor, head) {
5463
+ this.anchor = anchor; this.head = head
5464
  };
5465
 
5466
  Range.prototype.from = function () { return minPos(this.anchor, this.head) };
5471
  // build a selection out of it. 'Consumes' ranges array (modifying
5472
  // it).
5473
  function normalizeSelection(ranges, primIndex) {
5474
+ var prim = ranges[primIndex]
5475
+ ranges.sort(function (a, b) { return cmp(a.from(), b.from()); })
5476
+ primIndex = indexOf(ranges, prim)
5477
  for (var i = 1; i < ranges.length; i++) {
5478
+ var cur = ranges[i], prev = ranges[i - 1]
5479
  if (cmp(prev.to(), cur.from()) >= 0) {
5480
+ var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to())
5481
+ var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head
5482
+ if (i <= primIndex) { --primIndex }
5483
+ ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to))
5484
  }
5485
  }
5486
  return new Selection(ranges, primIndex)
5504
  if (cmp(pos, change.from) < 0) { return pos }
5505
  if (cmp(pos, change.to) <= 0) { return changeEnd(change) }
5506
 
5507
+ var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch
5508
+ if (pos.line == change.to.line) { ch += changeEnd(change).ch - change.to.ch }
5509
  return Pos(line, ch)
5510
  }
5511
 
5512
  function computeSelAfterChange(doc, change) {
5513
+ var out = []
5514
  for (var i = 0; i < doc.sel.ranges.length; i++) {
5515
+ var range = doc.sel.ranges[i]
5516
  out.push(new Range(adjustForChange(range.anchor, change),
5517
+ adjustForChange(range.head, change)))
5518
  }
5519
  return normalizeSelection(out, doc.sel.primIndex)
5520
  }
5529
  // Used by replaceSelections to allow moving the selection to the
5530
  // start or around the replaced test. Hint may be "start" or "around".
5531
  function computeReplacedSel(doc, changes, hint) {
5532
+ var out = []
5533
+ var oldPrev = Pos(doc.first, 0), newPrev = oldPrev
5534
  for (var i = 0; i < changes.length; i++) {
5535
+ var change = changes[i]
5536
+ var from = offsetPos(change.from, oldPrev, newPrev)
5537
+ var to = offsetPos(changeEnd(change), oldPrev, newPrev)
5538
+ oldPrev = change.to
5539
+ newPrev = to
5540
  if (hint == "around") {
5541
+ var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0
5542
+ out[i] = new Range(inv ? to : from, inv ? from : to)
5543
  } else {
5544
+ out[i] = new Range(from, from)
5545
  }
5546
  }
5547
  return new Selection(out, doc.sel.primIndex)
5550
  // Used to get the editor into a consistent state again when options change.
5551
 
5552
  function loadMode(cm) {
5553
+ cm.doc.mode = getMode(cm.options, cm.doc.modeOption)
5554
+ resetModeState(cm)
5555
  }
5556
 
5557
  function resetModeState(cm) {
5558
  cm.doc.iter(function (line) {
5559
+ if (line.stateAfter) { line.stateAfter = null }
5560
+ if (line.styles) { line.styles = null }
5561
+ })
5562
+ cm.doc.frontier = cm.doc.first
5563
+ startWorker(cm, 100)
5564
+ cm.state.modeGen++
5565
+ if (cm.curOp) { regChange(cm) }
5566
  }
5567
 
5568
  // DOCUMENT DATA STRUCTURE
5576
  }
5577
 
5578
  // Perform a change on the document data structure.
5579
+ function updateDoc(doc, change, markedSpans, estimateHeight) {
5580
  function spansFor(n) {return markedSpans ? markedSpans[n] : null}
5581
  function update(line, text, spans) {
5582
+ updateLine(line, text, spans, estimateHeight)
5583
+ signalLater(line, "change", line, change)
5584
  }
5585
  function linesFor(start, end) {
5586
+ var result = []
5587
  for (var i = start; i < end; ++i)
5588
+ { result.push(new Line(text[i], spansFor(i), estimateHeight)) }
5589
  return result
5590
  }
5591
 
5592
+ var from = change.from, to = change.to, text = change.text
5593
+ var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line)
5594
+ var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line
5595
 
5596
  // Adjust the line structure
5597
  if (change.full) {
5598
+ doc.insert(0, linesFor(0, text.length))
5599
+ doc.remove(text.length, doc.size - text.length)
5600
  } else if (isWholeLineUpdate(doc, change)) {
5601
  // This is a whole-line replace. Treated specially to make
5602
  // sure line objects move the way they are supposed to.
5603
+ var added = linesFor(0, text.length - 1)
5604
+ update(lastLine, lastLine.text, lastSpans)
5605
+ if (nlines) { doc.remove(from.line, nlines) }
5606
+ if (added.length) { doc.insert(from.line, added) }
5607
  } else if (firstLine == lastLine) {
5608
  if (text.length == 1) {
5609
+ update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans)
5610
  } else {
5611
+ var added$1 = linesFor(1, text.length - 1)
5612
+ added$1.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight))
5613
+ update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0))
5614
+ doc.insert(from.line + 1, added$1)
5615
  }
5616
  } else if (text.length == 1) {
5617
+ update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0))
5618
+ doc.remove(from.line + 1, nlines)
5619
  } else {
5620
+ update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0))
5621
+ update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans)
5622
+ var added$2 = linesFor(1, text.length - 1)
5623
+ if (nlines > 1) { doc.remove(from.line + 1, nlines - 1) }
5624
+ doc.insert(from.line + 1, added$2)
5625
  }
5626
 
5627
+ signalLater(doc, "change", doc, change)
5628
  }
5629
 
5630
  // Call f for all linked documents.
5631
  function linkedDocs(doc, f, sharedHistOnly) {
5632
  function propagate(doc, skip, sharedHist) {
5633
  if (doc.linked) { for (var i = 0; i < doc.linked.length; ++i) {
5634
+ var rel = doc.linked[i]
5635
  if (rel.doc == skip) { continue }
5636
+ var shared = sharedHist && rel.sharedHist
5637
  if (sharedHistOnly && !shared) { continue }
5638
+ f(rel.doc, shared)
5639
+ propagate(rel.doc, doc, shared)
5640
  } }
5641
  }
5642
+ propagate(doc, null, true)
5643
  }
5644
 
5645
  // Attach a document to an editor.
5646
  function attachDoc(cm, doc) {
5647
  if (doc.cm) { throw new Error("This document is already in use.") }
5648
+ cm.doc = doc
5649
+ doc.cm = cm
5650
+ estimateLineHeights(cm)
5651
+ loadMode(cm)
5652
+ if (!cm.options.lineWrapping) { findMaxLine(cm) }
5653
+ cm.options.mode = doc.modeOption
5654
+ regChange(cm)
 
 
 
 
 
 
 
 
 
 
 
 
5655
  }
5656
 
5657
  function History(startGen) {
5658
  // Arrays of change events and selections. Doing something adds an
5659
  // event to done and clears undo. Undoing moves events from done
5660
  // to undone, redoing moves them in the other direction.
5661
+ this.done = []; this.undone = []
5662
+ this.undoDepth = Infinity
5663
  // Used to track when changes can be merged into a single undo
5664
  // event
5665
+ this.lastModTime = this.lastSelTime = 0
5666
+ this.lastOp = this.lastSelOp = null
5667
+ this.lastOrigin = this.lastSelOrigin = null
5668
  // Used by the isClean() method
5669
+ this.generation = this.maxGeneration = startGen || 1
5670
  }
5671
 
5672
  // Create a history change event from an updateDoc-style change
5673
  // object.
5674
  function historyChangeFromChange(doc, change) {
5675
+ var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)}
5676
+ attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1)
5677
+ linkedDocs(doc, function (doc) { return attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); }, true)
5678
  return histChange
5679
  }
5680
 
5682
  // a change event.
5683
  function clearSelectionEvents(array) {
5684
  while (array.length) {
5685
+ var last = lst(array)
5686
+ if (last.ranges) { array.pop() }
5687
  else { break }
5688
  }
5689
  }
5692
  // events that are in the way.
5693
  function lastChangeEvent(hist, force) {
5694
  if (force) {
5695
+ clearSelectionEvents(hist.done)
5696
  return lst(hist.done)
5697
  } else if (hist.done.length && !lst(hist.done).ranges) {
5698
  return lst(hist.done)
5699
  } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {
5700
+ hist.done.pop()
5701
  return lst(hist.done)
5702
  }
5703
  }
5706
  // a single operation, or are close together with an origin that
5707
  // allows merging (starting with "+") into a single event.
5708
  function addChangeToHistory(doc, change, selAfter, opId) {
5709
+ var hist = doc.history
5710
+ hist.undone.length = 0
5711
+ var time = +new Date, cur
5712
+ var last
5713
 
5714
  if ((hist.lastOp == opId ||
5715
  hist.lastOrigin == change.origin && change.origin &&
5717
  change.origin.charAt(0) == "*")) &&
5718
  (cur = lastChangeEvent(hist, hist.lastOp == opId))) {
5719
  // Merge this change into the last event
5720
+ last = lst(cur.changes)
5721
  if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) {
5722
  // Optimized case for simple insertion -- don't want to add
5723
  // new changesets for every character typed
5724
+ last.to = changeEnd(change)
5725
  } else {
5726
  // Add new sub-event
5727
+ cur.changes.push(historyChangeFromChange(doc, change))
5728
  }
5729
  } else {
5730
  // Can not be merged, start a new event.
5731
+ var before = lst(hist.done)
5732
  if (!before || !before.ranges)
5733
+ { pushSelectionToHistory(doc.sel, hist.done) }
5734
  cur = {changes: [historyChangeFromChange(doc, change)],
5735
+ generation: hist.generation}
5736
+ hist.done.push(cur)
5737
  while (hist.done.length > hist.undoDepth) {
5738
+ hist.done.shift()
5739
+ if (!hist.done[0].ranges) { hist.done.shift() }
5740
  }
5741
  }
5742
+ hist.done.push(selAfter)
5743
+ hist.generation = ++hist.maxGeneration
5744
+ hist.lastModTime = hist.lastSelTime = time
5745
+ hist.lastOp = hist.lastSelOp = opId
5746
+ hist.lastOrigin = hist.lastSelOrigin = change.origin
5747
 
5748
+ if (!last) { signal(doc, "historyAdded") }
5749
  }
5750
 
5751
  function selectionEventCanBeMerged(doc, origin, prev, sel) {
5752
+ var ch = origin.charAt(0)
5753
  return ch == "*" ||
5754
  ch == "+" &&
5755
  prev.ranges.length == sel.ranges.length &&
5762
  // selection into the 'done' array when it was significantly
5763
  // different (in number of selected ranges, emptiness, or time).
5764
  function addSelectionToHistory(doc, sel, opId, options) {
5765
+ var hist = doc.history, origin = options && options.origin
5766
 
5767
  // A new event is started when the previous origin does not match
5768
  // the current, or the origins don't allow matching. Origins
5772
  (origin && hist.lastSelOrigin == origin &&
5773
  (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin ||
5774
  selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))))
5775
+ { hist.done[hist.done.length - 1] = sel }
5776
  else
5777
+ { pushSelectionToHistory(sel, hist.done) }
5778
 
5779
+ hist.lastSelTime = +new Date
5780
+ hist.lastSelOrigin = origin
5781
+ hist.lastSelOp = opId
5782
  if (options && options.clearRedo !== false)
5783
+ { clearSelectionEvents(hist.undone) }
5784
  }
5785
 
5786
  function pushSelectionToHistory(sel, dest) {
5787
+ var top = lst(dest)
5788
  if (!(top && top.ranges && top.equals(sel)))
5789
+ { dest.push(sel) }
5790
  }
5791
 
5792
  // Used to store marked span information in the history.
5793
  function attachLocalSpans(doc, change, from, to) {
5794
+ var existing = change["spans_" + doc.id], n = 0
5795
  doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function (line) {
5796
  if (line.markedSpans)
5797
+ { (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans }
5798
+ ++n
5799
+ })
5800
  }
5801
 
5802
  // When un/re-doing restores text containing marked spans, those
5803
  // that have been explicitly cleared should not be restored.
5804
  function removeClearedSpans(spans) {
5805
  if (!spans) { return null }
5806
+ var out
5807
  for (var i = 0; i < spans.length; ++i) {
5808
+ if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i) } }
5809
+ else if (out) { out.push(spans[i]) }
5810
  }
5811
  return !out ? spans : out.length ? out : null
5812
  }
5813
 
5814
  // Retrieve and filter the old marked spans stored in a change event.
5815
  function getOldSpans(doc, change) {
5816
+ var found = change["spans_" + doc.id]
5817
  if (!found) { return null }
5818
+ var nw = []
5819
  for (var i = 0; i < change.text.length; ++i)
5820
+ { nw.push(removeClearedSpans(found[i])) }
5821
  return nw
5822
  }
5823
 
5826
  // existed in the history (so that deleting around a span and then
5827
  // undoing brings back the span).
5828
  function mergeOldSpans(doc, change) {
5829
+ var old = getOldSpans(doc, change)
5830
+ var stretched = stretchSpansOverChange(doc, change)
5831
  if (!old) { return stretched }
5832
  if (!stretched) { return old }
5833
 
5834
  for (var i = 0; i < old.length; ++i) {
5835
+ var oldCur = old[i], stretchCur = stretched[i]
5836
  if (oldCur && stretchCur) {
5837
  spans: for (var j = 0; j < stretchCur.length; ++j) {
5838
+ var span = stretchCur[j]
5839
  for (var k = 0; k < oldCur.length; ++k)
5840
  { if (oldCur[k].marker == span.marker) { continue spans } }
5841
+ oldCur.push(span)
5842
  }
5843
  } else if (stretchCur) {
5844
+ old[i] = stretchCur
5845
  }
5846
  }
5847
  return old
5850
  // Used both to provide a JSON-safe object in .getHistory, and, when
5851
  // detaching a document, to split the history in two
5852
  function copyHistoryArray(events, newGroup, instantiateSel) {
5853
+ var copy = []
5854
  for (var i = 0; i < events.length; ++i) {
5855
+ var event = events[i]
5856
  if (event.ranges) {
5857
+ copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event)
5858
  continue
5859
  }
5860
+ var changes = event.changes, newChanges = []
5861
+ copy.push({changes: newChanges})
5862
  for (var j = 0; j < changes.length; ++j) {
5863
+ var change = changes[j], m = (void 0)
5864
+ newChanges.push({from: change.from, to: change.to, text: change.text})
5865
  if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\d+)$/)) {
5866
  if (indexOf(newGroup, Number(m[1])) > -1) {
5867
+ lst(newChanges)[prop] = change[prop]
5868
+ delete change[prop]
5869
  }
5870
  } } }
5871
  }
5883
  // Used for cursor motion and such.
5884
  function extendRange(doc, range, head, other) {
5885
  if (doc.cm && doc.cm.display.shift || doc.extend) {
5886
+ var anchor = range.anchor
5887
  if (other) {
5888
+ var posBefore = cmp(head, anchor) < 0
5889
  if (posBefore != (cmp(other, anchor) < 0)) {
5890
+ anchor = head
5891
+ head = other
5892
  } else if (posBefore != (cmp(head, other) < 0)) {
5893
+ head = other
5894
  }
5895
  }
5896
  return new Range(anchor, head)
5901
 
5902
  // Extend the primary selection range, discard the rest.
5903
  function extendSelection(doc, head, other, options) {
5904
+ setSelection(doc, new Selection([extendRange(doc, doc.sel.primary(), head, other)], 0), options)
5905
  }
5906
 
5907
  // Extend all selections (pos is an array of selections with length
5908
  // equal the number of selections)
5909
  function extendSelections(doc, heads, options) {
5910
+ var out = []
5911
  for (var i = 0; i < doc.sel.ranges.length; i++)
5912
+ { out[i] = extendRange(doc, doc.sel.ranges[i], heads[i], null) }
5913
+ var newSel = normalizeSelection(out, doc.sel.primIndex)
5914
+ setSelection(doc, newSel, options)
5915
  }
5916
 
5917
  // Updates a single range in the selection.
5918
  function replaceOneSelection(doc, i, range, options) {
5919
+ var ranges = doc.sel.ranges.slice(0)
5920
+ ranges[i] = range
5921
+ setSelection(doc, normalizeSelection(ranges, doc.sel.primIndex), options)
5922
  }
5923
 
5924
  // Reset the selection to a single range.
5925
  function setSimpleSelection(doc, anchor, head, options) {
5926
+ setSelection(doc, simpleSelection(anchor, head), options)
5927
  }
5928
 
5929
  // Give beforeSelectionChange handlers a change to influence a
5934
  update: function(ranges) {
5935
  var this$1 = this;
5936
 
5937
+ this.ranges = []
5938
  for (var i = 0; i < ranges.length; i++)
5939
  { this$1.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),
5940
+ clipPos(doc, ranges[i].head)) }
5941
  },
5942
  origin: options && options.origin
5943
+ }
5944
+ signal(doc, "beforeSelectionChange", doc, obj)
5945
+ if (doc.cm) { signal(doc.cm, "beforeSelectionChange", doc.cm, obj) }
5946
  if (obj.ranges != sel.ranges) { return normalizeSelection(obj.ranges, obj.ranges.length - 1) }
5947
  else { return sel }
5948
  }
5949
 
5950
  function setSelectionReplaceHistory(doc, sel, options) {
5951
+ var done = doc.history.done, last = lst(done)
5952
  if (last && last.ranges) {
5953
+ done[done.length - 1] = sel
5954
+ setSelectionNoUndo(doc, sel, options)
5955
  } else {
5956
+ setSelection(doc, sel, options)
5957
  }
5958
  }
5959
 
5960
  // Set a new selection.
5961
  function setSelection(doc, sel, options) {
5962
+ setSelectionNoUndo(doc, sel, options)
5963
+ addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options)
5964
  }
5965
 
5966
  function setSelectionNoUndo(doc, sel, options) {
5967
  if (hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange"))
5968
+ { sel = filterSelectionChange(doc, sel, options) }
5969
 
5970
  var bias = options && options.bias ||
5971
+ (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1)
5972
+ setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true))
5973
 
5974
  if (!(options && options.scroll === false) && doc.cm)
5975
+ { ensureCursorVisible(doc.cm) }
5976
  }
5977
 
5978
  function setSelectionInner(doc, sel) {
5979
  if (sel.equals(doc.sel)) { return }
5980
 
5981
+ doc.sel = sel
5982
 
5983
  if (doc.cm) {
5984
+ doc.cm.curOp.updateInput = doc.cm.curOp.selectionChanged = true
5985
+ signalCursorActivity(doc.cm)
5986
  }
5987
+ signalLater(doc, "cursorActivity", doc)
5988
  }
5989
 
5990
  // Verify that the selection does not partially select any atomic
5991
  // marked ranges.
5992
  function reCheckSelection(doc) {
5993
+ setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false), sel_dontScroll)
5994
  }
5995
 
5996
  // Return a selection that does not partially select any atomic
5997
  // ranges.
5998
  function skipAtomicInSelection(doc, sel, bias, mayClear) {
5999
+ var out
6000
  for (var i = 0; i < sel.ranges.length; i++) {
6001
+ var range = sel.ranges[i]
6002
+ var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i]
6003
+ var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear)
6004
+ var newHead = skipAtomic(doc, range.head, old && old.head, bias, mayClear)
6005
  if (out || newAnchor != range.anchor || newHead != range.head) {
6006
+ if (!out) { out = sel.ranges.slice(0, i) }
6007
+ out[i] = new Range(newAnchor, newHead)
6008
  }
6009
  }
6010
  return out ? normalizeSelection(out, sel.primIndex) : sel
6011
  }
6012
 
6013
  function skipAtomicInner(doc, pos, oldPos, dir, mayClear) {
6014
+ var line = getLine(doc, pos.line)
6015
  if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {
6016
+ var sp = line.markedSpans[i], m = sp.marker
6017
  if ((sp.from == null || (m.inclusiveLeft ? sp.from <= pos.ch : sp.from < pos.ch)) &&
6018
  (sp.to == null || (m.inclusiveRight ? sp.to >= pos.ch : sp.to > pos.ch))) {
6019
  if (mayClear) {
6020
+ signal(m, "beforeCursorEnter")
6021
  if (m.explicitlyCleared) {
6022
  if (!line.markedSpans) { break }
6023
  else {--i; continue}
6026
  if (!m.atomic) { continue }
6027
 
6028
  if (oldPos) {
6029
+ var near = m.find(dir < 0 ? 1 : -1), diff = (void 0)
6030
  if (dir < 0 ? m.inclusiveRight : m.inclusiveLeft)
6031
+ { near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null) }
6032
  if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0))
6033
  { return skipAtomicInner(doc, near, pos, dir, mayClear) }
6034
  }
6035
 
6036
+ var far = m.find(dir < 0 ? -1 : 1)
6037
  if (dir < 0 ? m.inclusiveLeft : m.inclusiveRight)
6038
+ { far = movePos(doc, far, dir, far.line == pos.line ? line : null) }
6039
  return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null
6040
  }
6041
  } }
6044
 
6045
  // Ensure a given position is not inside an atomic range.
6046
  function skipAtomic(doc, pos, oldPos, bias, mayClear) {
6047
+ var dir = bias || 1
6048
  var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) ||
6049
  (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) ||
6050
  skipAtomicInner(doc, pos, oldPos, -dir, mayClear) ||
6051
+ (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true))
6052
  if (!found) {
6053
+ doc.cantEdit = true
6054
  return Pos(doc.first, 0)
6055
  }
6056
  return found
6069
  }
6070
 
6071
  function selectAll(cm) {
6072
+ cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll)
6073
  }
6074
 
6075
  // UPDATING
6083
  text: change.text,
6084
  origin: change.origin,
6085
  cancel: function () { return obj.canceled = true; }
6086
+ }
6087
  if (update) { obj.update = function (from, to, text, origin) {
6088
+ if (from) { obj.from = clipPos(doc, from) }
6089
+ if (to) { obj.to = clipPos(doc, to) }
6090
+ if (text) { obj.text = text }
6091
+ if (origin !== undefined) { obj.origin = origin }
6092
+ } }
6093
+ signal(doc, "beforeChange", doc, obj)
6094
+ if (doc.cm) { signal(doc.cm, "beforeChange", doc.cm, obj) }
6095
 
6096
  if (obj.canceled) { return null }
6097
  return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin}
6106
  }
6107
 
6108
  if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) {
6109
+ change = filterChange(doc, change, true)
6110
  if (!change) { return }
6111
  }
6112
 
6113
  // Possibly split or suppress the update based on the presence
6114
  // of read-only spans in its range.
6115
+ var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to)
6116
  if (split) {
6117
  for (var i = split.length - 1; i >= 0; --i)
6118
+ { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [""] : change.text}) }
6119
  } else {
6120
+ makeChangeInner(doc, change)
6121
  }
6122
  }
6123
 
6124
  function makeChangeInner(doc, change) {
6125
  if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) { return }
6126
+ var selAfter = computeSelAfterChange(doc, change)
6127
+ addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN)
6128
 
6129
+ makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change))
6130
+ var rebased = []
6131
 
6132
  linkedDocs(doc, function (doc, sharedHist) {
6133
  if (!sharedHist && indexOf(rebased, doc.history) == -1) {
6134
+ rebaseHist(doc.history, change)
6135
+ rebased.push(doc.history)
6136
  }
6137
+ makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change))
6138
+ })
6139
  }
6140
 
6141
  // Revert a change stored in a document's history.
6142
  function makeChangeFromHistory(doc, type, allowSelectionOnly) {
6143
  if (doc.cm && doc.cm.state.suppressEdits && !allowSelectionOnly) { return }
6144
 
6145
+ var hist = doc.history, event, selAfter = doc.sel
6146
+ var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done
6147
 
6148
  // Verify that there is a useable event (so that ctrl-z won't
6149
  // needlessly clear selection events)
6150
+ var i = 0
6151
  for (; i < source.length; i++) {
6152
+ event = source[i]
6153
  if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges)
6154
  { break }
6155
  }
6156
  if (i == source.length) { return }
6157
+ hist.lastOrigin = hist.lastSelOrigin = null
6158
 
6159
  for (;;) {
6160
+ event = source.pop()
6161
  if (event.ranges) {
6162
+ pushSelectionToHistory(event, dest)
6163
  if (allowSelectionOnly && !event.equals(doc.sel)) {
6164
+ setSelection(doc, event, {clearRedo: false})
6165
  return
6166
  }
6167
+ selAfter = event
6168
  }
6169
  else { break }
6170
  }
6171
 
6172
  // Build up a reverse change object to add to the opposite history
6173
  // stack (redo when undoing, and vice versa).
6174
+ var antiChanges = []
6175
+ pushSelectionToHistory(selAfter, dest)
6176
+ dest.push({changes: antiChanges, generation: hist.generation})
6177
+ hist.generation = event.generation || ++hist.maxGeneration
6178
 
6179
+ var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")
6180
 
6181
  var loop = function ( i ) {
6182
+ var change = event.changes[i]
6183
+ change.origin = type
6184
  if (filter && !filterChange(doc, change, false)) {
6185
+ source.length = 0
6186
  return {}
6187
  }
6188
 
6189
+ antiChanges.push(historyChangeFromChange(doc, change))
6190
 
6191
+ var after = i ? computeSelAfterChange(doc, change) : lst(source)
6192
+ makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change))
6193
+ if (!i && doc.cm) { doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}) }
6194
+ var rebased = []
6195
 
6196
  // Propagate to the linked documents
6197
  linkedDocs(doc, function (doc, sharedHist) {
6198
  if (!sharedHist && indexOf(rebased, doc.history) == -1) {
6199
+ rebaseHist(doc.history, change)
6200
+ rebased.push(doc.history)
6201
  }
6202
+ makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change))
6203
+ })
6204
  };
6205
 
6206
  for (var i$1 = event.changes.length - 1; i$1 >= 0; --i$1) {
6214
  // above or below them in the parent document.
6215
  function shiftDoc(doc, distance) {
6216
  if (distance == 0) { return }
6217
+ doc.first += distance
6218
  doc.sel = new Selection(map(doc.sel.ranges, function (range) { return new Range(
6219
  Pos(range.anchor.line + distance, range.anchor.ch),
6220
  Pos(range.head.line + distance, range.head.ch)
6221
+ ); }), doc.sel.primIndex)
6222
  if (doc.cm) {
6223
+ regChange(doc.cm, doc.first, doc.first - distance, distance)
6224
  for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++)
6225
+ { regLineChange(doc.cm, l, "gutter") }
6226
  }
6227
  }
6228
 
6233
  { return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans) }
6234
 
6235
  if (change.to.line < doc.first) {
6236
+ shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line))
6237
  return
6238
  }
6239
  if (change.from.line > doc.lastLine()) { return }
6240
 
6241
  // Clip the change to the size of this doc
6242
  if (change.from.line < doc.first) {
6243
+ var shift = change.text.length - 1 - (doc.first - change.from.line)
6244
+ shiftDoc(doc, shift)
6245
  change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),
6246
+ text: [lst(change.text)], origin: change.origin}
6247
  }
6248
+ var last = doc.lastLine()
6249
  if (change.to.line > last) {
6250
  change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),
6251
+ text: [change.text[0]], origin: change.origin}
6252
  }
6253
 
6254
+ change.removed = getBetween(doc, change.from, change.to)
6255
 
6256
+ if (!selAfter) { selAfter = computeSelAfterChange(doc, change) }
6257
+ if (doc.cm) { makeChangeSingleDocInEditor(doc.cm, change, spans) }
6258
+ else { updateDoc(doc, change, spans) }
6259
+ setSelectionNoUndo(doc, selAfter, sel_dontScroll)
6260
  }
6261
 
6262
  // Handle the interaction of a change to a document with the editor
6263
  // that this document is part of.
6264
  function makeChangeSingleDocInEditor(cm, change, spans) {
6265
+ var doc = cm.doc, display = cm.display, from = change.from, to = change.to
6266
 
6267
+ var recomputeMaxLength = false, checkWidthStart = from.line
6268
  if (!cm.options.lineWrapping) {
6269
+ checkWidthStart = lineNo(visualLine(getLine(doc, from.line)))
6270
  doc.iter(checkWidthStart, to.line + 1, function (line) {
6271
  if (line == display.maxLine) {
6272
+ recomputeMaxLength = true
6273
  return true
6274
  }
6275
+ })
6276
  }
6277
 
6278
  if (doc.sel.contains(change.from, change.to) > -1)
6279
+ { signalCursorActivity(cm) }
6280
 
6281
+ updateDoc(doc, change, spans, estimateHeight(cm))
6282
 
6283
  if (!cm.options.lineWrapping) {
6284
  doc.iter(checkWidthStart, from.line + change.text.length, function (line) {
6285
+ var len = lineLength(line)
6286
  if (len > display.maxLineLength) {
6287
+ display.maxLine = line
6288
+ display.maxLineLength = len
6289
+ display.maxLineChanged = true
6290
+ recomputeMaxLength = false
6291
  }
6292
+ })
6293
+ if (recomputeMaxLength) { cm.curOp.updateMaxLine = true }
6294
  }
6295
 
6296
  // Adjust frontier, schedule worker
6297
+ doc.frontier = Math.min(doc.frontier, from.line)
6298
+ startWorker(cm, 400)
6299
 
6300
+ var lendiff = change.text.length - (to.line - from.line) - 1
6301
  // Remember that these lines changed, for updating the display
6302
  if (change.full)
6303
+ { regChange(cm) }
6304
  else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change))
6305
+ { regLineChange(cm, from.line, "text") }
6306
  else
6307
+ { regChange(cm, from.line, to.line + 1, lendiff) }
6308
 
6309
+ var changesHandler = hasHandler(cm, "changes"), changeHandler = hasHandler(cm, "change")
6310
  if (changeHandler || changesHandler) {
6311
  var obj = {
6312
  from: from, to: to,
6313
  text: change.text,
6314
  removed: change.removed,
6315
  origin: change.origin
6316
+ }
6317
+ if (changeHandler) { signalLater(cm, "change", cm, obj) }
6318
+ if (changesHandler) { (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj) }
6319
  }
6320
+ cm.display.selForContextMenu = null
6321
  }
6322
 
6323
  function replaceRange(doc, code, from, to, origin) {
6324
+ if (!to) { to = from }
6325
+ if (cmp(to, from) < 0) { var tmp = to; to = from; from = tmp }
6326
+ if (typeof code == "string") { code = doc.splitLines(code) }
6327
+ makeChange(doc, {from: from, to: to, text: code, origin: origin})
6328
  }
6329
 
6330
  // Rebasing/resetting history to deal with externally-sourced changes
6331
 
6332
  function rebaseHistSelSingle(pos, from, to, diff) {
6333
  if (to < pos.line) {
6334
+ pos.line += diff
6335
  } else if (from < pos.line) {
6336
+ pos.line = from
6337
+ pos.ch = 0
6338
  }
6339
  }
6340
 
6347
  // shared position objects being unsafely updated.
6348
  function rebaseHistArray(array, from, to, diff) {
6349
  for (var i = 0; i < array.length; ++i) {
6350
+ var sub = array[i], ok = true
6351
  if (sub.ranges) {
6352
+ if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true }
6353
  for (var j = 0; j < sub.ranges.length; j++) {
6354
+ rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff)
6355
+ rebaseHistSelSingle(sub.ranges[j].head, from, to, diff)
6356
  }
6357
  continue
6358
  }
6359
  for (var j$1 = 0; j$1 < sub.changes.length; ++j$1) {
6360
+ var cur = sub.changes[j$1]
6361
  if (to < cur.from.line) {
6362
+ cur.from = Pos(cur.from.line + diff, cur.from.ch)
6363
+ cur.to = Pos(cur.to.line + diff, cur.to.ch)
6364
  } else if (from <= cur.to.line) {
6365
+ ok = false
6366
  break
6367
  }
6368
  }
6369
  if (!ok) {
6370
+ array.splice(0, i + 1)
6371
+ i = 0
6372
  }
6373
  }
6374
  }
6375
 
6376
  function rebaseHist(hist, change) {
6377
+ var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1
6378
+ rebaseHistArray(hist.done, from, to, diff)
6379
+ rebaseHistArray(hist.undone, from, to, diff)
6380
  }
6381
 
6382
  // Utility for applying a change to a line by handle or number,
6383
  // returning the number and optionally registering the line as
6384
  // changed.
6385
  function changeLine(doc, handle, changeType, op) {
6386
+ var no = handle, line = handle
6387
+ if (typeof handle == "number") { line = getLine(doc, clipLine(doc, handle)) }
6388
+ else { no = lineNo(handle) }
6389
  if (no == null) { return null }
6390
+ if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType) }
6391
  return line
6392
  }
6393
 
6407
  var LeafChunk = function(lines) {
6408
  var this$1 = this;
6409
 
6410
+ this.lines = lines
6411
+ this.parent = null
6412
+ var height = 0
6413
  for (var i = 0; i < lines.length; ++i) {
6414
+ lines[i].parent = this$1
6415
+ height += lines[i].height
6416
  }
6417
+ this.height = height
6418
  };
6419
 
6420
  LeafChunk.prototype.chunkSize = function () { return this.lines.length };
6424
  var this$1 = this;
6425
 
6426
  for (var i = at, e = at + n; i < e; ++i) {
6427
+ var line = this$1.lines[i]
6428
+ this$1.height -= line.height
6429
+ cleanUpLine(line)
6430
+ signalLater(line, "delete")
6431
  }
6432
+ this.lines.splice(at, n)
6433
  };
6434
 
6435
  // Helper used to collapse a small branch into a single leaf.
6436
  LeafChunk.prototype.collapse = function (lines) {
6437
+ lines.push.apply(lines, this.lines)
6438
  };
6439
 
6440
  // Insert the given array of lines at offset 'at', count them as
6442
  LeafChunk.prototype.insertInner = function (at, lines, height) {
6443
  var this$1 = this;
6444
 
6445
+ this.height += height
6446
+ this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at))
6447
+ for (var i = 0; i < lines.length; ++i) { lines[i].parent = this$1 }
6448
  };
6449
 
6450
  // Used to iterate over a part of the tree.
6458
  var BranchChunk = function(children) {
6459
  var this$1 = this;
6460
 
6461
+ this.children = children
6462
+ var size = 0, height = 0
6463
  for (var i = 0; i < children.length; ++i) {
6464
+ var ch = children[i]
6465
+ size += ch.chunkSize(); height += ch.height
6466
+ ch.parent = this$1
6467
  }
6468
+ this.size = size
6469
+ this.height = height
6470
+ this.parent = null
6471
  };
6472
 
6473
  BranchChunk.prototype.chunkSize = function () { return this.size };
6475
  BranchChunk.prototype.removeInner = function (at, n) {
6476
  var this$1 = this;
6477
 
6478
+ this.size -= n
6479
  for (var i = 0; i < this.children.length; ++i) {
6480
+ var child = this$1.children[i], sz = child.chunkSize()
6481
  if (at < sz) {
6482
+ var rm = Math.min(n, sz - at), oldHeight = child.height
6483
+ child.removeInner(at, rm)
6484
+ this$1.height -= oldHeight - child.height
6485
+ if (sz == rm) { this$1.children.splice(i--, 1); child.parent = null }
6486
  if ((n -= rm) == 0) { break }
6487
+ at = 0
6488
+ } else { at -= sz }
6489
  }
6490
  // If the result is smaller than 25 lines, ensure that it is a
6491
  // single leaf node.
6492
  if (this.size - n < 25 &&
6493
  (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) {
6494
+ var lines = []
6495
+ this.collapse(lines)
6496
+ this.children = [new LeafChunk(lines)]
6497
+ this.children[0].parent = this
6498
  }
6499
  };
6500
 
6501
  BranchChunk.prototype.collapse = function (lines) {
6502
  var this$1 = this;
6503
 
6504
+ for (var i = 0; i < this.children.length; ++i) { this$1.children[i].collapse(lines) }
6505
  };
6506
 
6507
  BranchChunk.prototype.insertInner = function (at, lines, height) {
6508
  var this$1 = this;
6509
 
6510
+ this.size += lines.length
6511
+ this.height += height
6512
  for (var i = 0; i < this.children.length; ++i) {
6513
+ var child = this$1.children[i], sz = child.chunkSize()
6514
  if (at <= sz) {
6515
+ child.insertInner(at, lines, height)
6516
  if (child.lines && child.lines.length > 50) {
6517
  // To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it's never spliced.
6518
  // Instead, small slices are taken. They're taken in order because sequential memory accesses are fastest.
6519
+ var remaining = child.lines.length % 25 + 25
6520
  for (var pos = remaining; pos < child.lines.length;) {
6521
+ var leaf = new LeafChunk(child.lines.slice(pos, pos += 25))
6522
+ child.height -= leaf.height
6523
+ this$1.children.splice(++i, 0, leaf)
6524
+ leaf.parent = this$1
6525
  }
6526
+ child.lines = child.lines.slice(0, remaining)
6527
+ this$1.maybeSpill()
6528
  }
6529
  break
6530
  }
6531
+ at -= sz
6532
  }
6533
  };
6534
 
6535
  // When a node has grown, check whether it should be split.
6536
  BranchChunk.prototype.maybeSpill = function () {
6537
  if (this.children.length <= 10) { return }
6538
+ var me = this
6539
  do {
6540
+ var spilled = me.children.splice(me.children.length - 5, 5)
6541
+ var sibling = new BranchChunk(spilled)
6542
  if (!me.parent) { // Become the parent node
6543
+ var copy = new BranchChunk(me.children)
6544
+ copy.parent = me
6545
+ me.children = [copy, sibling]
6546
+ me = copy
6547
  } else {
6548
+ me.size -= sibling.size
6549
+ me.height -= sibling.height
6550
+ var myIndex = indexOf(me.parent.children, me)
6551
+ me.parent.children.splice(myIndex + 1, 0, sibling)
6552
  }
6553
+ sibling.parent = me.parent
6554
  } while (me.children.length > 10)
6555
+ me.parent.maybeSpill()
6556
  };
6557
 
6558
  BranchChunk.prototype.iterN = function (at, n, op) {
6559
  var this$1 = this;
6560
 
6561
  for (var i = 0; i < this.children.length; ++i) {
6562
+ var child = this$1.children[i], sz = child.chunkSize()
6563
  if (at < sz) {
6564
+ var used = Math.min(n, sz - at)
6565
  if (child.iterN(at, used, op)) { return true }
6566
  if ((n -= used) == 0) { break }
6567
+ at = 0
6568
+ } else { at -= sz }
6569
  }
6570
  };
6571
 
6575
  var this$1 = this;
6576
 
6577
  if (options) { for (var opt in options) { if (options.hasOwnProperty(opt))
6578
+ { this$1[opt] = options[opt] } } }
6579
+ this.doc = doc
6580
+ this.node = node
6581
  };
6582
 
6583
  LineWidget.prototype.clear = function () {
6584
  var this$1 = this;
6585
 
6586
+ var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line)
6587
  if (no == null || !ws) { return }
6588
+ for (var i = 0; i < ws.length; ++i) { if (ws[i] == this$1) { ws.splice(i--, 1) } }
6589
+ if (!ws.length) { line.widgets = null }
6590
+ var height = widgetHeight(this)
6591
+ updateLineHeight(line, Math.max(0, line.height - height))
6592
  if (cm) {
6593
  runInOp(cm, function () {
6594
+ adjustScrollWhenAboveVisible(cm, line, -height)
6595
+ regLineChange(cm, no, "widget")
6596
+ })
6597
+ signalLater(cm, "lineWidgetCleared", cm, this, no)
6598
  }
6599
  };
6600
 
6601
  LineWidget.prototype.changed = function () {
6602
  var this$1 = this;
6603
 
6604
+ var oldH = this.height, cm = this.doc.cm, line = this.line
6605
+ this.height = null
6606
+ var diff = widgetHeight(this) - oldH
6607
  if (!diff) { return }
6608
+ updateLineHeight(line, line.height + diff)
6609
  if (cm) {
6610
  runInOp(cm, function () {
6611
+ cm.curOp.forceUpdate = true
6612
+ adjustScrollWhenAboveVisible(cm, line, diff)
6613
+ signalLater(cm, "lineWidgetChanged", cm, this$1, lineNo(line))
6614
+ })
6615
  }
6616
  };
6617
+ eventMixin(LineWidget)
6618
 
6619
  function adjustScrollWhenAboveVisible(cm, line, diff) {
6620
  if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop))
6621
+ { addToScrollPos(cm, null, diff) }
6622
  }
6623
 
6624
  function addLineWidget(doc, handle, node, options) {
6625
+ var widget = new LineWidget(doc, node, options)
6626
+ var cm = doc.cm
6627
+ if (cm && widget.noHScroll) { cm.display.alignWidgets = true }
6628
  changeLine(doc, handle, "widget", function (line) {
6629
+ var widgets = line.widgets || (line.widgets = [])
6630
+ if (widget.insertAt == null) { widgets.push(widget) }
6631
+ else { widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget) }
6632
+ widget.line = line
6633
  if (cm && !lineIsHidden(doc, line)) {
6634
+ var aboveVisible = heightAtLine(line) < doc.scrollTop
6635
+ updateLineHeight(line, line.height + widgetHeight(widget))
6636
+ if (aboveVisible) { addToScrollPos(cm, null, widget.height) }
6637
+ cm.curOp.forceUpdate = true
6638
  }
6639
  return true
6640
+ })
6641
+ signalLater(cm, "lineWidgetAdded", cm, widget, typeof handle == "number" ? handle : lineNo(handle))
6642
  return widget
6643
  }
6644
 
6657
  // Collapsed markers have unique ids, in order to be able to order
6658
  // them, which is needed for uniquely determining an outer marker
6659
  // when they overlap (they may nest, but not partially overlap).
6660
+ var nextMarkerId = 0
6661
 
6662
  var TextMarker = function(doc, type) {
6663
+ this.lines = []
6664
+ this.type = type
6665
+ this.doc = doc
6666
+ this.id = ++nextMarkerId
6667
  };
6668
 
6669
  // Clear the marker.
6671
  var this$1 = this;
6672
 
6673
  if (this.explicitlyCleared) { return }
6674
+ var cm = this.doc.cm, withOp = cm && !cm.curOp
6675
+ if (withOp) { startOperation(cm) }
6676
  if (hasHandler(this, "clear")) {
6677
+ var found = this.find()
6678
+ if (found) { signalLater(this, "clear", found.from, found.to) }
6679
  }
6680
+ var min = null, max = null
6681
  for (var i = 0; i < this.lines.length; ++i) {
6682
+ var line = this$1.lines[i]
6683
+ var span = getMarkedSpanFor(line.markedSpans, this$1)
6684
+ if (cm && !this$1.collapsed) { regLineChange(cm, lineNo(line), "text") }
6685
  else if (cm) {
6686
+ if (span.to != null) { max = lineNo(line) }
6687
+ if (span.from != null) { min = lineNo(line) }
6688
  }
6689
+ line.markedSpans = removeMarkedSpan(line.markedSpans, span)
6690
  if (span.from == null && this$1.collapsed && !lineIsHidden(this$1.doc, line) && cm)
6691
+ { updateLineHeight(line, textHeight(cm.display)) }
6692
  }
6693
  if (cm && this.collapsed && !cm.options.lineWrapping) { for (var i$1 = 0; i$1 < this.lines.length; ++i$1) {
6694
+ var visual = visualLine(this$1.lines[i$1]), len = lineLength(visual)
6695
  if (len > cm.display.maxLineLength) {
6696
+ cm.display.maxLine = visual
6697
+ cm.display.maxLineLength = len
6698
+ cm.display.maxLineChanged = true
6699
  }
6700
  } }
6701
 
6702
+ if (min != null && cm && this.collapsed) { regChange(cm, min, max + 1) }
6703
+ this.lines.length = 0
6704
+ this.explicitlyCleared = true
6705
  if (this.atomic && this.doc.cantEdit) {
6706
+ this.doc.cantEdit = false
6707
+ if (cm) { reCheckSelection(cm.doc) }
6708
  }
6709
+ if (cm) { signalLater(cm, "markerCleared", cm, this, min, max) }
6710
+ if (withOp) { endOperation(cm) }
6711
+ if (this.parent) { this.parent.clear() }
6712
  };
6713
 
6714
  // Find the position of the marker in the document. Returns a {from,
6719
  TextMarker.prototype.find = function (side, lineObj) {
6720
  var this$1 = this;
6721
 
6722
+ if (side == null && this.type == "bookmark") { side = 1 }
6723
+ var from, to
6724
  for (var i = 0; i < this.lines.length; ++i) {
6725
+ var line = this$1.lines[i]
6726
+ var span = getMarkedSpanFor(line.markedSpans, this$1)
6727
  if (span.from != null) {
6728
+ from = Pos(lineObj ? line : lineNo(line), span.from)
6729
  if (side == -1) { return from }
6730
  }
6731
  if (span.to != null) {
6732
+ to = Pos(lineObj ? line : lineNo(line), span.to)
6733
  if (side == 1) { return to }
6734
  }
6735
  }
6741
  TextMarker.prototype.changed = function () {
6742
  var this$1 = this;
6743
 
6744
+ var pos = this.find(-1, true), widget = this, cm = this.doc.cm
6745
  if (!pos || !cm) { return }
6746
  runInOp(cm, function () {
6747
+ var line = pos.line, lineN = lineNo(pos.line)
6748
+ var view = findViewForLine(cm, lineN)
6749
  if (view) {
6750
+ clearLineMeasurementCacheFor(view)
6751
+ cm.curOp.selectionChanged = cm.curOp.forceUpdate = true
6752
  }
6753
+ cm.curOp.updateMaxLine = true
6754
  if (!lineIsHidden(widget.doc, line) && widget.height != null) {
6755
+ var oldHeight = widget.height
6756
+ widget.height = null
6757
+ var dHeight = widgetHeight(widget) - oldHeight
6758
  if (dHeight)
6759
+ { updateLineHeight(line, line.height + dHeight) }
6760
  }
6761
+ signalLater(cm, "markerChanged", cm, this$1)
6762
+ })
6763
  };
6764
 
6765
  TextMarker.prototype.attachLine = function (line) {
6766
  if (!this.lines.length && this.doc.cm) {
6767
+ var op = this.doc.cm.curOp
6768
  if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)
6769
+ { (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this) }
6770
  }
6771
+ this.lines.push(line)
6772
  };
6773
 
6774
  TextMarker.prototype.detachLine = function (line) {
6775
+ this.lines.splice(indexOf(this.lines, line), 1)
6776
  if (!this.lines.length && this.doc.cm) {
6777
+ var op = this.doc.cm.curOp
6778
+ ;(op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this)
6779
  }
6780
  };
6781
+ eventMixin(TextMarker)
6782
 
6783
  // Create a marker, wire it up to the right lines, and
6784
  function markText(doc, from, to, options, type) {
6789
  // Ensure we are in an operation.
6790
  if (doc.cm && !doc.cm.curOp) { return operation(doc.cm, markText)(doc, from, to, options, type) }
6791
 
6792
+ var marker = new TextMarker(doc, type), diff = cmp(from, to)
6793
+ if (options) { copyObj(options, marker, false) }
6794
  // Don't connect empty markers unless clearWhenEmpty is false
6795
  if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false)
6796
  { return marker }
6797
  if (marker.replacedWith) {
6798
  // Showing up as a widget implies collapsed (widget replaces text)
6799
+ marker.collapsed = true
6800
+ marker.widgetNode = elt("span", [marker.replacedWith], "CodeMirror-widget")
6801
+ marker.widgetNode.setAttribute("role", "presentation") // hide from accessibility tree
6802
+ if (!options.handleMouseEvents) { marker.widgetNode.setAttribute("cm-ignore-events", "true") }
6803
+ if (options.insertLeft) { marker.widgetNode.insertLeft = true }
6804
  }
6805
  if (marker.collapsed) {
6806
  if (conflictingCollapsedRange(doc, from.line, from, to, marker) ||
6807
  from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker))
6808
  { throw new Error("Inserting collapsed marker partially overlapping an existing one") }
6809
+ seeCollapsedSpans()
6810
  }
6811
 
6812
  if (marker.addToHistory)
6813
+ { addChangeToHistory(doc, {from: from, to: to, origin: "markText"}, doc.sel, NaN) }
6814
 
6815
+ var curLine = from.line, cm = doc.cm, updateMaxLine
6816
  doc.iter(curLine, to.line + 1, function (line) {
6817
  if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine)
6818
+ { updateMaxLine = true }
6819
+ if (marker.collapsed && curLine != from.line) { updateLineHeight(line, 0) }
6820
  addMarkedSpan(line, new MarkedSpan(marker,
6821
  curLine == from.line ? from.ch : null,
6822
+ curLine == to.line ? to.ch : null))
6823
+ ++curLine
6824
+ })
6825
  // lineIsHidden depends on the presence of the spans, so needs a second pass
6826
  if (marker.collapsed) { doc.iter(from.line, to.line + 1, function (line) {
6827
+ if (lineIsHidden(doc, line)) { updateLineHeight(line, 0) }
6828
+ }) }
6829
 
6830
+ if (marker.clearOnEnter) { on(marker, "beforeCursorEnter", function () { return marker.clear(); }) }
6831
 
6832
  if (marker.readOnly) {
6833
+ seeReadOnlySpans()
6834
  if (doc.history.done.length || doc.history.undone.length)
6835
+ { doc.clearHistory() }
6836
  }
6837
  if (marker.collapsed) {
6838
+ marker.id = ++nextMarkerId
6839
+ marker.atomic = true
6840
  }
6841
  if (cm) {
6842
  // Sync editor state
6843
+ if (updateMaxLine) { cm.curOp.updateMaxLine = true }
6844
  if (marker.collapsed)
6845
+ { regChange(cm, from.line, to.line + 1) }
6846
  else if (marker.className || marker.title || marker.startStyle || marker.endStyle || marker.css)
6847
+ { for (var i = from.line; i <= to.line; i++) { regLineChange(cm, i, "text") } }
6848
+ if (marker.atomic) { reCheckSelection(cm.doc) }
6849
+ signalLater(cm, "markerAdded", cm, marker)
6850
  }
6851
  return marker
6852
  }
6859
  var SharedTextMarker = function(markers, primary) {
6860
  var this$1 = this;
6861
 
6862
+ this.markers = markers
6863
+ this.primary = primary
6864
  for (var i = 0; i < markers.length; ++i)
6865
+ { markers[i].parent = this$1 }
6866
  };
6867
 
6868
  SharedTextMarker.prototype.clear = function () {
6869
  var this$1 = this;
6870
 
6871
  if (this.explicitlyCleared) { return }
6872
+ this.explicitlyCleared = true
6873
  for (var i = 0; i < this.markers.length; ++i)
6874
+ { this$1.markers[i].clear() }
6875
+ signalLater(this, "clear")
6876
  };
6877
 
6878
  SharedTextMarker.prototype.find = function (side, lineObj) {
6879
  return this.primary.find(side, lineObj)
6880
  };
6881
+ eventMixin(SharedTextMarker)
6882
 
6883
  function markTextShared(doc, from, to, options, type) {
6884
+ options = copyObj(options)
6885
+ options.shared = false
6886
+ var markers = [markText(doc, from, to, options, type)], primary = markers[0]
6887
+ var widget = options.widgetNode
6888
  linkedDocs(doc, function (doc) {
6889
+ if (widget) { options.widgetNode = widget.cloneNode(true) }
6890
+ markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type))
6891
  for (var i = 0; i < doc.linked.length; ++i)
6892
  { if (doc.linked[i].isParent) { return } }
6893
+ primary = lst(markers)
6894
+ })
6895
  return new SharedTextMarker(markers, primary)
6896
  }
6897
 
6901
 
6902
  function copySharedMarkers(doc, markers) {
6903
  for (var i = 0; i < markers.length; i++) {
6904
+ var marker = markers[i], pos = marker.find()
6905
+ var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to)
6906
  if (cmp(mFrom, mTo)) {
6907
+ var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type)
6908
+ marker.markers.push(subMark)
6909
+ subMark.parent = marker
6910
  }
6911
  }
6912
  }
6913
 
6914
  function detachSharedMarkers(markers) {
6915
  var loop = function ( i ) {
6916
+ var marker = markers[i], linked = [marker.primary.doc]
6917
+ linkedDocs(marker.primary.doc, function (d) { return linked.push(d); })
6918
  for (var j = 0; j < marker.markers.length; j++) {
6919
+ var subMarker = marker.markers[j]
6920
  if (indexOf(linked, subMarker.doc) == -1) {
6921
+ subMarker.parent = null
6922
+ marker.markers.splice(j--, 1)
6923
  }
6924
  }
6925
  };
6927
  for (var i = 0; i < markers.length; i++) loop( i );
6928
  }
6929
 
6930
+ var nextDocId = 0
6931
+ var Doc = function(text, mode, firstLine, lineSep) {
6932
+ if (!(this instanceof Doc)) { return new Doc(text, mode, firstLine, lineSep) }
6933
+ if (firstLine == null) { firstLine = 0 }
6934
+
6935
+ BranchChunk.call(this, [new LeafChunk([new Line("", null)])])
6936
+ this.first = firstLine
6937
+ this.scrollTop = this.scrollLeft = 0
6938
+ this.cantEdit = false
6939
+ this.cleanGeneration = 1
6940
+ this.frontier = firstLine
6941
+ var start = Pos(firstLine, 0)
6942
+ this.sel = simpleSelection(start)
6943
+ this.history = new History(null)
6944
+ this.id = ++nextDocId
6945
+ this.modeOption = mode
6946
+ this.lineSep = lineSep
6947
+ this.extend = false
6948
+
6949
+ if (typeof text == "string") { text = this.splitLines(text) }
6950
+ updateDoc(this, {from: start, to: start, text: text})
6951
+ setSelection(this, simpleSelection(start), sel_dontScroll)
6952
+ }
 
6953
 
6954
  Doc.prototype = createObj(BranchChunk.prototype, {
6955
  constructor: Doc,
6958
  // three, it iterates over the range given by the first two (with
6959
  // the second being non-inclusive).
6960
  iter: function(from, to, op) {
6961
+ if (op) { this.iterN(from - this.first, to - from, op) }
6962
+ else { this.iterN(this.first, this.first + this.size, from) }
6963
  },
6964
 
6965
  // Non-public interface for adding and removing lines.
6966
  insert: function(at, lines) {
6967
+ var height = 0
6968
+ for (var i = 0; i < lines.length; ++i) { height += lines[i].height }
6969
+ this.insertInner(at - this.first, lines, height)
6970
  },
6971
+ remove: function(at, n) { this.removeInner(at - this.first, n) },
6972
 
6973
  // From here, the methods are part of the public interface. Most
6974
  // are also available from CodeMirror (editor) instances.
6975
 
6976
  getValue: function(lineSep) {
6977
+ var lines = getLines(this, this.first, this.first + this.size)
6978
  if (lineSep === false) { return lines }
6979
  return lines.join(lineSep || this.lineSeparator())
6980
  },
6981
  setValue: docMethodOp(function(code) {
6982
+ var top = Pos(this.first, 0), last = this.first + this.size - 1
6983
  makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),
6984
+ text: this.splitLines(code), origin: "setValue", full: true}, true)
6985
+ setSelection(this, simpleSelection(top))
6986
  }),
6987
  replaceRange: function(code, from, to, origin) {
6988
+ from = clipPos(this, from)
6989
+ to = to ? clipPos(this, to) : from
6990
+ replaceRange(this, code, from, to, origin)
6991
  },
6992
  getRange: function(from, to, lineSep) {
6993
+ var lines = getBetween(this, clipPos(this, from), clipPos(this, to))
6994
  if (lineSep === false) { return lines }
6995
  return lines.join(lineSep || this.lineSeparator())
6996
  },
7001
  getLineNumber: function(line) {return lineNo(line)},
7002
 
7003
  getLineHandleVisualStart: function(line) {
7004
+ if (typeof line == "number") { line = getLine(this, line) }
7005
  return visualLine(line)
7006
  },
7007
 
7012
  clipPos: function(pos) {return clipPos(this, pos)},
7013
 
7014
  getCursor: function(start) {
7015
+ var range = this.sel.primary(), pos
7016
+ if (start == null || start == "head") { pos = range.head }
7017
+ else if (start == "anchor") { pos = range.anchor }
7018
+ else if (start == "end" || start == "to" || start === false) { pos = range.to() }
7019
+ else { pos = range.from() }
7020
  return pos
7021
  },
7022
  listSelections: function() { return this.sel.ranges },
7023
  somethingSelected: function() {return this.sel.somethingSelected()},
7024
 
7025
  setCursor: docMethodOp(function(line, ch, options) {
7026
+ setSimpleSelection(this, clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line), null, options)
7027
  }),
7028
  setSelection: docMethodOp(function(anchor, head, options) {
7029
+ setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options)
7030
  }),
7031
  extendSelection: docMethodOp(function(head, other, options) {
7032
+ extendSelection(this, clipPos(this, head), other && clipPos(this, other), options)
7033
  }),
7034
  extendSelections: docMethodOp(function(heads, options) {
7035
+ extendSelections(this, clipPosArray(this, heads), options)
7036
  }),
7037
  extendSelectionsBy: docMethodOp(function(f, options) {
7038
+ var heads = map(this.sel.ranges, f)
7039
+ extendSelections(this, clipPosArray(this, heads), options)
7040
  }),
7041
  setSelections: docMethodOp(function(ranges, primary, options) {
7042
  var this$1 = this;
7043
 
7044
  if (!ranges.length) { return }
7045
+ var out = []
7046
  for (var i = 0; i < ranges.length; i++)
7047
  { out[i] = new Range(clipPos(this$1, ranges[i].anchor),
7048
+ clipPos(this$1, ranges[i].head)) }
7049
+ if (primary == null) { primary = Math.min(ranges.length - 1, this.sel.primIndex) }
7050
+ setSelection(this, normalizeSelection(out, primary), options)
7051
  }),
7052
  addSelection: docMethodOp(function(anchor, head, options) {
7053
+ var ranges = this.sel.ranges.slice(0)
7054
+ ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor)))
7055
+ setSelection(this, normalizeSelection(ranges, ranges.length - 1), options)
7056
  }),
7057
 
7058
  getSelection: function(lineSep) {
7059
  var this$1 = this;
7060
 
7061
+ var ranges = this.sel.ranges, lines
7062
  for (var i = 0; i < ranges.length; i++) {
7063
+ var sel = getBetween(this$1, ranges[i].from(), ranges[i].to())
7064
+ lines = lines ? lines.concat(sel) : sel
7065
  }
7066
  if (lineSep === false) { return lines }
7067
  else { return lines.join(lineSep || this.lineSeparator()) }
7069
  getSelections: function(lineSep) {
7070
  var this$1 = this;
7071
 
7072
+ var parts = [], ranges = this.sel.ranges
7073
  for (var i = 0; i < ranges.length; i++) {
7074
+ var sel = getBetween(this$1, ranges[i].from(), ranges[i].to())
7075
+ if (lineSep !== false) { sel = sel.join(lineSep || this$1.lineSeparator()) }
7076
+ parts[i] = sel
7077
  }
7078
  return parts
7079
  },
7080
  replaceSelection: function(code, collapse, origin) {
7081
+ var dup = []
7082
  for (var i = 0; i < this.sel.ranges.length; i++)
7083
+ { dup[i] = code }
7084
+ this.replaceSelections(dup, collapse, origin || "+input")
7085
  },
7086
  replaceSelections: docMethodOp(function(code, collapse, origin) {
7087
  var this$1 = this;
7088
 
7089
+ var changes = [], sel = this.sel
7090
  for (var i = 0; i < sel.ranges.length; i++) {
7091
+ var range = sel.ranges[i]
7092
+ changes[i] = {from: range.from(), to: range.to(), text: this$1.splitLines(code[i]), origin: origin}
7093
  }
7094
+ var newSel = collapse && collapse != "end" && computeReplacedSel(this, changes, collapse)
7095
  for (var i$1 = changes.length - 1; i$1 >= 0; i$1--)
7096
+ { makeChange(this$1, changes[i$1]) }
7097
+ if (newSel) { setSelectionReplaceHistory(this, newSel) }
7098
+ else if (this.cm) { ensureCursorVisible(this.cm) }
7099
  }),
7100
+ undo: docMethodOp(function() {makeChangeFromHistory(this, "undo")}),
7101
+ redo: docMethodOp(function() {makeChangeFromHistory(this, "redo")}),
7102
+ undoSelection: docMethodOp(function() {makeChangeFromHistory(this, "undo", true)}),
7103
+ redoSelection: docMethodOp(function() {makeChangeFromHistory(this, "redo", true)}),
7104
 
7105
+ setExtending: function(val) {this.extend = val},
7106
  getExtending: function() {return this.extend},
7107
 
7108
  historySize: function() {
7109
+ var hist = this.history, done = 0, undone = 0
7110
+ for (var i = 0; i < hist.done.length; i++) { if (!hist.done[i].ranges) { ++done } }
7111
+ for (var i$1 = 0; i$1 < hist.undone.length; i$1++) { if (!hist.undone[i$1].ranges) { ++undone } }
7112
  return {undo: done, redo: undone}
7113
  },
7114
+ clearHistory: function() {this.history = new History(this.history.maxGeneration)},
7115
 
7116
  markClean: function() {
7117
+ this.cleanGeneration = this.changeGeneration(true)
7118
  },
7119
  changeGeneration: function(forceSplit) {
7120
  if (forceSplit)
7121
+ { this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null }
7122
  return this.history.generation
7123
  },
7124
  isClean: function (gen) {
7130
  undone: copyHistoryArray(this.history.undone)}
7131
  },
7132
  setHistory: function(histData) {
7133
+ var hist = this.history = new History(this.history.maxGeneration)
7134
+ hist.done = copyHistoryArray(histData.done.slice(0), null, true)
7135
+ hist.undone = copyHistoryArray(histData.undone.slice(0), null, true)
7136
  },
7137
 
7138
  setGutterMarker: docMethodOp(function(line, gutterID, value) {
7139
  return changeLine(this, line, "gutter", function (line) {
7140
+ var markers = line.gutterMarkers || (line.gutterMarkers = {})
7141
+ markers[gutterID] = value
7142
+ if (!value && isEmpty(markers)) { line.gutterMarkers = null }
7143
  return true
7144
  })
7145
  }),
7150
  this.iter(function (line) {
7151
  if (line.gutterMarkers && line.gutterMarkers[gutterID]) {
7152
  changeLine(this$1, line, "gutter", function () {
7153
+ line.gutterMarkers[gutterID] = null
7154
+ if (isEmpty(line.gutterMarkers)) { line.gutterMarkers = null }
7155
  return true
7156
+ })
7157
  }
7158
+ })
7159
  }),
7160
 
7161
  lineInfo: function(line) {
7162
+ var n
7163
  if (typeof line == "number") {
7164
  if (!isLine(this, line)) { return null }
7165
+ n = line
7166
+ line = getLine(this, line)
7167
  if (!line) { return null }
7168
  } else {
7169
+ n = lineNo(line)
7170
  if (n == null) { return null }
7171
  }
7172
  return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,
7178
  return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function (line) {
7179
  var prop = where == "text" ? "textClass"
7180
  : where == "background" ? "bgClass"
7181
+ : where == "gutter" ? "gutterClass" : "wrapClass"
7182
+ if (!line[prop]) { line[prop] = cls }
7183
  else if (classTest(cls).test(line[prop])) { return false }
7184
+ else { line[prop] += " " + cls }
7185
  return true
7186
  })
7187
  }),
7189
  return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function (line) {
7190
  var prop = where == "text" ? "textClass"
7191
  : where == "background" ? "bgClass"
7192
+ : where == "gutter" ? "gutterClass" : "wrapClass"
7193
+ var cur = line[prop]
7194
  if (!cur) { return false }
7195
+ else if (cls == null) { line[prop] = null }
7196
  else {
7197
+ var found = cur.match(classTest(cls))
7198
  if (!found) { return false }
7199
+ var end = found.index + found[0].length
7200
+ line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null
7201
  }
7202
  return true
7203
  })
7206
  addLineWidget: docMethodOp(function(handle, node, options) {
7207
  return addLineWidget(this, handle, node, options)
7208
  }),
7209
+ removeLineWidget: function(widget) { widget.clear() },
7210
 
7211
  markText: function(from, to, options) {
7212
  return markText(this, clipPos(this, from), clipPos(this, to), options, options && options.type || "range")
7215
  var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),
7216
  insertLeft: options && options.insertLeft,
7217
  clearWhenEmpty: false, shared: options && options.shared,
7218
+ handleMouseEvents: options && options.handleMouseEvents}
7219
+ pos = clipPos(this, pos)
7220
  return markText(this, pos, pos, realOpts, "bookmark")
7221
  },
7222
  findMarksAt: function(pos) {
7223
+ pos = clipPos(this, pos)
7224
+ var markers = [], spans = getLine(this, pos.line).markedSpans
7225
  if (spans) { for (var i = 0; i < spans.length; ++i) {
7226
+ var span = spans[i]
7227
  if ((span.from == null || span.from <= pos.ch) &&
7228
  (span.to == null || span.to >= pos.ch))
7229
+ { markers.push(span.marker.parent || span.marker) }
7230
  } }
7231
  return markers
7232
  },
7233
  findMarks: function(from, to, filter) {
7234
+ from = clipPos(this, from); to = clipPos(this, to)
7235
+ var found = [], lineNo = from.line
7236
  this.iter(from.line, to.line + 1, function (line) {
7237
+ var spans = line.markedSpans
7238
  if (spans) { for (var i = 0; i < spans.length; i++) {
7239
+ var span = spans[i]
7240
+ if (!(span.to != null && lineNo == from.line && from.ch >= span.to ||
7241
+ span.from == null && lineNo != from.line ||
7242
+ span.from != null && lineNo == to.line && span.from >= to.ch) &&
7243
  (!filter || filter(span.marker)))
7244
+ { found.push(span.marker.parent || span.marker) }
7245
  } }
7246
+ ++lineNo
7247
+ })
7248
  return found
7249
  },
7250
  getAllMarks: function() {
7251
+ var markers = []
7252
  this.iter(function (line) {
7253
+ var sps = line.markedSpans
7254
  if (sps) { for (var i = 0; i < sps.length; ++i)
7255
+ { if (sps[i].from != null) { markers.push(sps[i].marker) } } }
7256
+ })
7257
  return markers
7258
  },
7259
 
7260
  posFromIndex: function(off) {
7261
+ var ch, lineNo = this.first, sepSize = this.lineSeparator().length
7262
  this.iter(function (line) {
7263
+ var sz = line.text.length + sepSize
7264
  if (sz > off) { ch = off; return true }
7265
+ off -= sz
7266
+ ++lineNo
7267
+ })
7268
+ return clipPos(this, Pos(lineNo, ch))
7269
  },
7270
  indexFromPos: function (coords) {
7271
+ coords = clipPos(this, coords)
7272
+ var index = coords.ch
7273
  if (coords.line < this.first || coords.ch < 0) { return 0 }
7274
+ var sepSize = this.lineSeparator().length
7275
  this.iter(this.first, coords.line, function (line) { // iter aborts when callback returns a truthy value
7276
+ index += line.text.length + sepSize
7277
+ })
7278
  return index
7279
  },
7280
 
7281
  copy: function(copyHistory) {
7282
  var doc = new Doc(getLines(this, this.first, this.first + this.size),
7283
+ this.modeOption, this.first, this.lineSep)
7284
+ doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft
7285
+ doc.sel = this.sel
7286
+ doc.extend = false
7287
  if (copyHistory) {
7288
+ doc.history.undoDepth = this.history.undoDepth
7289
+ doc.setHistory(this.getHistory())
7290
  }
7291
  return doc
7292
  },
7293
 
7294
  linkedDoc: function(options) {
7295
+ if (!options) { options = {} }
7296
+ var from = this.first, to = this.first + this.size
7297
+ if (options.from != null && options.from > from) { from = options.from }
7298
+ if (options.to != null && options.to < to) { to = options.to }
7299
+ var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep)
7300
  if (options.sharedHist) { copy.history = this.history
7301
+ ; }(this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist})
7302
+ copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}]
7303
+ copySharedMarkers(copy, findSharedMarkers(this))
7304
  return copy
7305
  },
7306
  unlinkDoc: function(other) {
7307
  var this$1 = this;
7308
 
7309
+ if (other instanceof CodeMirror) { other = other.doc }
7310
  if (this.linked) { for (var i = 0; i < this.linked.length; ++i) {
7311
+ var link = this$1.linked[i]
7312
  if (link.doc != other) { continue }
7313
+ this$1.linked.splice(i, 1)
7314
+ other.unlinkDoc(this$1)
7315
+ detachSharedMarkers(findSharedMarkers(this$1))
7316
  break
7317
  } }
7318
  // If the histories were shared, split them again
7319
  if (other.history == this.history) {
7320
+ var splitIds = [other.id]
7321
+ linkedDocs(other, function (doc) { return splitIds.push(doc.id); }, true)
7322
+ other.history = new History(null)
7323
+ other.history.done = copyHistoryArray(this.history.done, splitIds)
7324
+ other.history.undone = copyHistoryArray(this.history.undone, splitIds)
7325
  }
7326
  },
7327
+ iterLinkedDocs: function(f) {linkedDocs(this, f)},
7328
 
7329
  getMode: function() {return this.mode},
7330
  getEditor: function() {return this.cm},
7333
  if (this.lineSep) { return str.split(this.lineSep) }
7334
  return splitLinesAuto(str)
7335
  },
7336
+ lineSeparator: function() { return this.lineSep || "\n" }
7337
+ })
 
 
 
 
 
 
 
 
7338
 
7339
  // Public alias.
7340
+ Doc.prototype.eachLine = Doc.prototype.iter
7341
 
7342
  // Kludge to work around strange IE behavior where it'll sometimes
7343
  // re-fire a series of drag-related events right after the drop (#1551)
7344
+ var lastDrop = 0
7345
 
7346
  function onDrop(e) {
7347
+ var cm = this
7348
+ clearDragCursor(cm)
7349
  if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e))
7350
  { return }
7351
+ e_preventDefault(e)
7352
+ if (ie) { lastDrop = +new Date }
7353
+ var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files
7354
  if (!pos || cm.isReadOnly()) { return }
7355
  // Might be a file drop, in which case we simply extract the text
7356
  // and insert it.
7357
  if (files && files.length && window.FileReader && window.File) {
7358
+ var n = files.length, text = Array(n), read = 0
7359
  var loadFile = function (file, i) {
7360
  if (cm.options.allowDropFileTypes &&
7361
  indexOf(cm.options.allowDropFileTypes, file.type) == -1)
7362
  { return }
7363
 
7364
+ var reader = new FileReader
7365
  reader.onload = operation(cm, function () {
7366
+ var content = reader.result
7367
+ if (/[\x00-\x08\x0e-\x1f]{2}/.test(content)) { content = "" }
7368
+ text[i] = content
7369
  if (++read == n) {
7370
+ pos = clipPos(cm.doc, pos)
7371
  var change = {from: pos, to: pos,
7372
  text: cm.doc.splitLines(text.join(cm.doc.lineSeparator())),
7373
+ origin: "paste"}
7374
+ makeChange(cm.doc, change)
7375
+ setSelectionReplaceHistory(cm.doc, simpleSelection(pos, changeEnd(change)))
7376
  }
7377
+ })
7378
+ reader.readAsText(file)
7379
+ }
7380
+ for (var i = 0; i < n; ++i) { loadFile(files[i], i) }
7381
  } else { // Normal drop
7382
  // Don't do a replace if the drop happened inside of the selected text.
7383
  if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {
7384
+ cm.state.draggingText(e)
7385
  // Ensure the editor is re-focused
7386
+ setTimeout(function () { return cm.display.input.focus(); }, 20)
7387
  return
7388
  }
7389
  try {
7390
+ var text$1 = e.dataTransfer.getData("Text")
7391
  if (text$1) {
7392
+ var selected
7393
  if (cm.state.draggingText && !cm.state.draggingText.copy)
7394
+ { selected = cm.listSelections() }
7395
+ setSelectionNoUndo(cm.doc, simpleSelection(pos, pos))
7396
  if (selected) { for (var i$1 = 0; i$1 < selected.length; ++i$1)
7397
+ { replaceRange(cm.doc, "", selected[i$1].anchor, selected[i$1].head, "drag") } }
7398
+ cm.replaceSelection(text$1, "around", "paste")
7399
+ cm.display.input.focus()
7400
  }
7401
  }
7402
  catch(e){}
7407
  if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return }
7408
  if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) { return }
7409
 
7410
+ e.dataTransfer.setData("Text", cm.getSelection())
7411
+ e.dataTransfer.effectAllowed = "copyMove"
7412
 
7413
  // Use dummy image instead of default browsers image.
7414
  // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.
7415
  if (e.dataTransfer.setDragImage && !safari) {
7416
+ var img = elt("img", null, null, "position: fixed; left: 0; top: 0;")
7417
+ img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
7418
  if (presto) {
7419
+ img.width = img.height = 1
7420
+ cm.display.wrapper.appendChild(img)
7421
  // Force a relayout, or Opera won't use our image for some obscure reason
7422
+ img._top = img.offsetTop
7423
  }
7424
+ e.dataTransfer.setDragImage(img, 0, 0)
7425
+ if (presto) { img.parentNode.removeChild(img) }
7426
  }
7427
  }
7428
 
7429
  function onDragOver(cm, e) {
7430
+ var pos = posFromMouse(cm, e)
7431
  if (!pos) { return }
7432
+ var frag = document.createDocumentFragment()
7433
+ drawSelectionCursor(cm, pos, frag)
7434
  if (!cm.display.dragCursor) {
7435
+ cm.display.dragCursor = elt("div", null, "CodeMirror-cursors CodeMirror-dragcursors")
7436
+ cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv)
7437
  }
7438
+ removeChildrenAndAdd(cm.display.dragCursor, frag)
7439
  }
7440
 
7441
  function clearDragCursor(cm) {
7442
  if (cm.display.dragCursor) {
7443
+ cm.display.lineSpace.removeChild(cm.display.dragCursor)
7444
+ cm.display.dragCursor = null
7445
  }
7446
  }
7447
 
7451
 
7452
  function forEachCodeMirror(f) {
7453
  if (!document.body.getElementsByClassName) { return }
7454
+ var byClass = document.body.getElementsByClassName("CodeMirror")
7455
  for (var i = 0; i < byClass.length; i++) {
7456
+ var cm = byClass[i].CodeMirror
7457
+ if (cm) { f(cm) }
7458
  }
7459
  }
7460
 
7461
+ var globalsRegistered = false
7462
  function ensureGlobalHandlers() {
7463
  if (globalsRegistered) { return }
7464
+ registerGlobalHandlers()
7465
+ globalsRegistered = true
7466
  }
7467
  function registerGlobalHandlers() {
7468
  // When the window resizes, we need to refresh active editors.
7469
+ var resizeTimer
7470
  on(window, "resize", function () {
7471
  if (resizeTimer == null) { resizeTimer = setTimeout(function () {
7472
+ resizeTimer = null
7473
+ forEachCodeMirror(onResize)
7474
+ }, 100) }
7475
+ })
7476
  // When the window loses focus, we want to show the editor as blurred
7477
+ on(window, "blur", function () { return forEachCodeMirror(onBlur); })
7478
  }
7479
  // Called when the window resizes
7480
  function onResize(cm) {
7481
+ var d = cm.display
7482
  if (d.lastWrapHeight == d.wrapper.clientHeight && d.lastWrapWidth == d.wrapper.clientWidth)
7483
  { return }
7484
  // Might be a text scaling operation, clear size caches.
7485
+ d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null
7486
+ d.scrollbarsClipped = false
7487
+ cm.setSize()
7488
  }
7489
 
7490
  var keyNames = {
7496
  173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\",
7497
  221: "]", 222: "'", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete",
7498
  63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert"
7499
+ }
7500
 
7501
  // Number keys
7502
+ for (var i = 0; i < 10; i++) { keyNames[i + 48] = keyNames[i + 96] = String(i) }
7503
  // Alphabetic keys
7504
+ for (var i$1 = 65; i$1 <= 90; i$1++) { keyNames[i$1] = String.fromCharCode(i$1) }
7505
  // Function keys
7506
+ for (var i$2 = 1; i$2 <= 12; i$2++) { keyNames[i$2 + 111] = keyNames[i$2 + 63235] = "F" + i$2 }
7507
 
7508
+ var keyMap = {}
7509
 
7510
  keyMap.basic = {
7511
  "Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown",
7514
  "Tab": "defaultTab", "Shift-Tab": "indentAuto",
7515
  "Enter": "newlineAndIndent", "Insert": "toggleOverwrite",
7516
  "Esc": "singleSelection"
7517
+ }
7518
  // Note that the save and find-related commands aren't defined by
7519
  // default. User code or addons can define them. Unknown commands
7520
  // are simply ignored.
7527
  "Ctrl-[": "indentLess", "Ctrl-]": "indentMore",
7528
  "Ctrl-U": "undoSelection", "Shift-Ctrl-U": "redoSelection", "Alt-U": "redoSelection",
7529
  fallthrough: "basic"
7530
+ }
7531
  // Very basic readline/emacs-style bindings, which are standard on Mac.
7532
  keyMap.emacsy = {
7533
  "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown",
7535
  "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore",
7536
  "Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars",
7537
  "Ctrl-O": "openLine"
7538
+ }
7539
  keyMap.macDefault = {
7540
  "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo",
7541
  "Cmd-Home": "goDocStart", "Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goGroupLeft",
7545
  "Cmd-[": "indentLess", "Cmd-]": "indentMore", "Cmd-Backspace": "delWrappedLineLeft", "Cmd-Delete": "delWrappedLineRight",
7546
  "Cmd-U": "undoSelection", "Shift-Cmd-U": "redoSelection", "Ctrl-Up": "goDocStart", "Ctrl-Down": "goDocEnd",
7547
  fallthrough: ["basic", "emacsy"]
7548
+ }
7549
+ keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault
7550
 
7551
  // KEYMAP DISPATCH
7552
 
7553
  function normalizeKeyName(name) {
7554
+ var parts = name.split(/-(?!$)/)
7555
+ name = parts[parts.length - 1]
7556
+ var alt, ctrl, shift, cmd
7557
  for (var i = 0; i < parts.length - 1; i++) {
7558
+ var mod = parts[i]
7559
+ if (/^(cmd|meta|m)$/i.test(mod)) { cmd = true }
7560
+ else if (/^a(lt)?$/i.test(mod)) { alt = true }
7561
+ else if (/^(c|ctrl|control)$/i.test(mod)) { ctrl = true }
7562
+ else if (/^s(hift)?$/i.test(mod)) { shift = true }
7563
  else { throw new Error("Unrecognized modifier name: " + mod) }
7564
  }
7565
+ if (alt) { name = "Alt-" + name }
7566
+ if (ctrl) { name = "Ctrl-" + name }
7567
+ if (cmd) { name = "Cmd-" + name }
7568
+ if (shift) { name = "Shift-" + name }
7569
  return name
7570
  }
7571
 
7575
  // new normalized keymap, and then updates the old object to reflect
7576
  // this.
7577
  function normalizeKeyMap(keymap) {
7578
+ var copy = {}
7579
  for (var keyname in keymap) { if (keymap.hasOwnProperty(keyname)) {
7580
+ var value = keymap[keyname]
7581
  if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) { continue }
7582
  if (value == "...") { delete keymap[keyname]; continue }
7583
 
7584
+ var keys = map(keyname.split(" "), normalizeKeyName)
7585
  for (var i = 0; i < keys.length; i++) {
7586
+ var val = (void 0), name = (void 0)
7587
  if (i == keys.length - 1) {
7588
+ name = keys.join(" ")
7589
+ val = value
7590
  } else {
7591
+ name = keys.slice(0, i + 1).join(" ")
7592
+ val = "..."
7593
  }
7594
+ var prev = copy[name]
7595
+ if (!prev) { copy[name] = val }
7596
  else if (prev != val) { throw new Error("Inconsistent bindings for " + name) }
7597
  }
7598
+ delete keymap[keyname]
7599
  } }
7600
+ for (var prop in copy) { keymap[prop] = copy[prop] }
7601
  return keymap
7602
  }
7603
 
7604
+ function lookupKey(key, map, handle, context) {
7605
+ map = getKeyMap(map)
7606
+ var found = map.call ? map.call(key, context) : map[key]
7607
  if (found === false) { return "nothing" }
7608
  if (found === "...") { return "multi" }
7609
  if (found != null && handle(found)) { return "handled" }
7610
 
7611
+ if (map.fallthrough) {
7612
+ if (Object.prototype.toString.call(map.fallthrough) != "[object Array]")
7613
+ { return lookupKey(key, map.fallthrough, handle, context) }
7614
+ for (var i = 0; i < map.fallthrough.length; i++) {
7615
+ var result = lookupKey(key, map.fallthrough[i], handle, context)
7616
  if (result) { return result }
7617
  }
7618
  }
7621
  // Modifier key presses don't count as 'real' key presses for the
7622
  // purpose of keymap fallthrough.
7623
  function isModifierKey(value) {
7624
+ var name = typeof value == "string" ? value : keyNames[value.keyCode]
7625
  return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod"
7626
  }
7627
 
7628
  // Look up the name of a key as indicated by an event object.
7629
  function keyName(event, noShift) {
7630
  if (presto && event.keyCode == 34 && event["char"]) { return false }
7631
+ var base = keyNames[event.keyCode], name = base
7632
  if (name == null || event.altGraphKey) { return false }
7633
+ if (event.altKey && base != "Alt") { name = "Alt-" + name }
7634
+ if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") { name = "Ctrl-" + name }
7635
+ if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "Cmd") { name = "Cmd-" + name }
7636
+ if (!noShift && event.shiftKey && base != "Shift") { name = "Shift-" + name }
7637
  return name
7638
  }
7639
 
7644
  // Helper for deleting text near the selection(s), used to implement
7645
  // backspace, delete, and similar functionality.
7646
  function deleteNearSelection(cm, compute) {
7647
+ var ranges = cm.doc.sel.ranges, kill = []
7648
  // Build up a set of ranges to kill first, merging overlapping
7649
  // ranges.
7650
  for (var i = 0; i < ranges.length; i++) {
7651
+ var toKill = compute(ranges[i])
7652
  while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) {
7653
+ var replaced = kill.pop()
7654
  if (cmp(replaced.from, toKill.from) < 0) {
7655
+ toKill.from = replaced.from
7656
  break
7657
  }
7658
  }
7659
+ kill.push(toKill)
7660
  }
7661
  // Next, remove those actual ranges.
7662
  runInOp(cm, function () {
7663
  for (var i = kill.length - 1; i >= 0; i--)
7664
+ { replaceRange(cm.doc, "", kill[i].from, kill[i].to, "+delete") }
7665
+ ensureCursorVisible(cm)
7666
+ })
7667
  }
7668
 
7669
  // Commands are parameter-less actions that can be performed on an
7673
  singleSelection: function (cm) { return cm.setSelection(cm.getCursor("anchor"), cm.getCursor("head"), sel_dontScroll); },
7674
  killLine: function (cm) { return deleteNearSelection(cm, function (range) {
7675
  if (range.empty()) {
7676
+ var len = getLine(cm.doc, range.head.line).text.length
7677
  if (range.head.ch == len && range.head.line < cm.lastLine())
7678
  { return {from: range.head, to: Pos(range.head.line + 1, 0)} }
7679
  else
7690
  from: Pos(range.from().line, 0), to: range.from()
7691
  }); }); },
7692
  delWrappedLineLeft: function (cm) { return deleteNearSelection(cm, function (range) {
7693
+ var top = cm.charCoords(range.head, "div").top + 5
7694
+ var leftPos = cm.coordsChar({left: 0, top: top}, "div")
7695
  return {from: leftPos, to: range.from()}
7696
  }); },
7697
  delWrappedLineRight: function (cm) { return deleteNearSelection(cm, function (range) {
7698
+ var top = cm.charCoords(range.head, "div").top + 5
7699
+ var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div")
7700
  return {from: range.from(), to: rightPos }
7701
  }); },
7702
  undo: function (cm) { return cm.undo(); },
7715
  {origin: "+move", bias: -1}
7716
  ); },
7717
  goLineRight: function (cm) { return cm.extendSelectionsBy(function (range) {
7718
+ var top = cm.charCoords(range.head, "div").top + 5
7719
  return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div")
7720
  }, sel_move); },
7721
  goLineLeft: function (cm) { return cm.extendSelectionsBy(function (range) {
7722
+ var top = cm.charCoords(range.head, "div").top + 5
7723
  return cm.coordsChar({left: 0, top: top}, "div")
7724
  }, sel_move); },
7725
  goLineLeftSmart: function (cm) { return cm.extendSelectionsBy(function (range) {
7726
+ var top = cm.charCoords(range.head, "div").top + 5
7727
+ var pos = cm.coordsChar({left: 0, top: top}, "div")
7728
  if (pos.ch < cm.getLine(pos.line).search(/\S/)) { return lineStartSmart(cm, range.head) }
7729
  return pos
7730
  }, sel_move); },
7751
  indentLess: function (cm) { return cm.indentSelection("subtract"); },
7752
  insertTab: function (cm) { return cm.replaceSelection("\t"); },
7753
  insertSoftTab: function (cm) {
7754
+ var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize
7755
  for (var i = 0; i < ranges.length; i++) {
7756
+ var pos = ranges[i].from()
7757
+ var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize)
7758
+ spaces.push(spaceStr(tabSize - col % tabSize))
7759
  }
7760
+ cm.replaceSelections(spaces)
7761
  },
7762
  defaultTab: function (cm) {
7763
+ if (cm.somethingSelected()) { cm.indentSelection("add") }
7764
+ else { cm.execCommand("insertTab") }
7765
  },
7766
  // Swap the two chars left and right of each selection's head.
7767
  // Move cursor behind the two swapped characters afterwards.
7771
  // Doesn't do anything on an empty line.
7772
  // Doesn't do anything with non-empty selections.
7773
  transposeChars: function (cm) { return runInOp(cm, function () {
7774
+ var ranges = cm.listSelections(), newSel = []
7775
  for (var i = 0; i < ranges.length; i++) {
7776
  if (!ranges[i].empty()) { continue }
7777
+ var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text
7778
  if (line) {
7779
+ if (cur.ch == line.length) { cur = new Pos(cur.line, cur.ch - 1) }
7780
  if (cur.ch > 0) {
7781
+ cur = new Pos(cur.line, cur.ch + 1)
7782
  cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2),
7783
+ Pos(cur.line, cur.ch - 2), cur, "+transpose")
7784
  } else if (cur.line > cm.doc.first) {
7785
+ var prev = getLine(cm.doc, cur.line - 1).text
7786
  if (prev) {
7787
+ cur = new Pos(cur.line, 1)
7788
  cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() +
7789
  prev.charAt(prev.length - 1),
7790
+ Pos(cur.line - 1, prev.length - 1), cur, "+transpose")
7791
  }
7792
  }
7793
  }
7794
+ newSel.push(new Range(cur, cur))
7795
  }
7796
+ cm.setSelections(newSel)
7797
  }); },
7798
  newlineAndIndent: function (cm) { return runInOp(cm, function () {
7799
+ var sels = cm.listSelections()
7800
  for (var i = sels.length - 1; i >= 0; i--)
7801
+ { cm.replaceRange(cm.doc.lineSeparator(), sels[i].anchor, sels[i].head, "+input") }
7802
+ sels = cm.listSelections()
7803
  for (var i$1 = 0; i$1 < sels.length; i$1++)
7804
+ { cm.indentLine(sels[i$1].from().line, null, true) }
7805
+ ensureCursorVisible(cm)
7806
  }); },
7807
  openLine: function (cm) { return cm.replaceSelection("\n", "start"); },
7808
  toggleOverwrite: function (cm) { return cm.toggleOverwrite(); }
7809
+ }
7810
 
7811
 
7812
  function lineStart(cm, lineN) {
7813
+ var line = getLine(cm.doc, lineN)
7814
+ var visual = visualLine(line)
7815
+ if (visual != line) { lineN = lineNo(visual) }
7816
  return endOfLine(true, cm, visual, lineN, 1)
7817
  }
7818
  function lineEnd(cm, lineN) {
7819
+ var line = getLine(cm.doc, lineN)
7820
+ var visual = visualLineEnd(line)
7821
+ if (visual != line) { lineN = lineNo(visual) }
7822
  return endOfLine(true, cm, line, lineN, -1)
7823
  }
7824
  function lineStartSmart(cm, pos) {
7825
+ var start = lineStart(cm, pos.line)
7826
+ var line = getLine(cm.doc, start.line)
7827
+ var order = getOrder(line)
7828
  if (!order || order[0].level == 0) {
7829
+ var firstNonWS = Math.max(0, line.text.search(/\S/))
7830
+ var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch
7831
  return Pos(start.line, inWS ? 0 : firstNonWS, start.sticky)
7832
  }
7833
  return start
7836
  // Run a handler that was bound to a key.
7837
  function doHandleBinding(cm, bound, dropShift) {
7838
  if (typeof bound == "string") {
7839
+ bound = commands[bound]
7840
  if (!bound) { return false }
7841
  }
7842
  // Ensure previous input has been read, so that the handler sees a
7843
  // consistent view of the document
7844
+ cm.display.input.ensurePolled()
7845
+ var prevShift = cm.display.shift, done = false
7846
  try {
7847
+ if (cm.isReadOnly()) { cm.state.suppressEdits = true }
7848
+ if (dropShift) { cm.display.shift = false }
7849
+ done = bound(cm) != Pass
7850
  } finally {
7851
+ cm.display.shift = prevShift
7852
+ cm.state.suppressEdits = false
7853
  }
7854
  return done
7855
  }
7856
 
7857
  function lookupKeyForEditor(cm, name, handle) {
7858
  for (var i = 0; i < cm.state.keyMaps.length; i++) {
7859
+ var result = lookupKey(name, cm.state.keyMaps[i], handle, cm)
7860
  if (result) { return result }
7861
  }
7862
  return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm))
7863
  || lookupKey(name, cm.options.keyMap, handle, cm)
7864
  }
7865
 
7866
+ var stopSeq = new Delayed
7867
  function dispatchKey(cm, name, e, handle) {
7868
+ var seq = cm.state.keySeq
7869
  if (seq) {
7870
  if (isModifierKey(name)) { return "handled" }
7871
  stopSeq.set(50, function () {
7872
  if (cm.state.keySeq == seq) {
7873
+ cm.state.keySeq = null
7874
+ cm.display.input.reset()
7875
  }
7876
+ })
7877
+ name = seq + " " + name
7878
  }
7879
+ var result = lookupKeyForEditor(cm, name, handle)
7880
 
7881
  if (result == "multi")
7882
+ { cm.state.keySeq = name }
7883
  if (result == "handled")
7884
+ { signalLater(cm, "keyHandled", cm, name, e) }
7885
 
7886
  if (result == "handled" || result == "multi") {
7887
+ e_preventDefault(e)
7888
+ restartBlink(cm)
7889
  }
7890
 
7891
  if (seq && !result && /\'$/.test(name)) {
7892
+ e_preventDefault(e)
7893
  return true
7894
  }
7895
  return !!result
7897
 
7898
  // Handle a key from the keydown event.
7899
  function handleKeyBinding(cm, e) {
7900
+ var name = keyName(e, true)
7901
  if (!name) { return false }
7902
 
7903
  if (e.shiftKey && !cm.state.keySeq) {
7919
  return dispatchKey(cm, "'" + ch + "'", e, function (b) { return doHandleBinding(cm, b, true); })
7920
  }
7921
 
7922
+ var lastStoppedKey = null
7923
  function onKeyDown(e) {
7924
+ var cm = this
7925
+ cm.curOp.focus = activeElt()
7926
  if (signalDOMEvent(cm, e)) { return }
7927
  // IE does strange things with escape.
7928
+ if (ie && ie_version < 11 && e.keyCode == 27) { e.returnValue = false }
7929
+ var code = e.keyCode
7930
+ cm.display.shift = code == 16 || e.shiftKey
7931
+ var handled = handleKeyBinding(cm, e)
7932
  if (presto) {
7933
+ lastStoppedKey = handled ? code : null
7934
  // Opera has no cut event... we try to at least catch the key combo
7935
  if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))
7936
+ { cm.replaceSelection("", null, "cut") }
7937
  }
7938
 
7939
  // Turn mouse into crosshair when Alt is held on Mac.
7940
  if (code == 18 && !/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className))
7941
+ { showCrossHair(cm) }
7942
  }
7943
 
7944
  function showCrossHair(cm) {
7945
+ var lineDiv = cm.display.lineDiv
7946
+ addClass(lineDiv, "CodeMirror-crosshair")
7947
 
7948
  function up(e) {
7949
  if (e.keyCode == 18 || !e.altKey) {
7950
+ rmClass(lineDiv, "CodeMirror-crosshair")
7951
+ off(document, "keyup", up)
7952
+ off(document, "mouseover", up)
7953
  }
7954
  }
7955
+ on(document, "keyup", up)
7956
+ on(document, "mouseover", up)
7957
  }
7958
 
7959
  function onKeyUp(e) {
7960
+ if (e.keyCode == 16) { this.doc.sel.shift = false }
7961
+ signalDOMEvent(this, e)
7962
  }
7963
 
7964
  function onKeyPress(e) {
7965
+ var cm = this
7966
  if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) { return }
7967
+ var keyCode = e.keyCode, charCode = e.charCode
7968
  if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return}
7969
  if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) { return }
7970
+ var ch = String.fromCharCode(charCode == null ? keyCode : charCode)
7971
  // Some browsers fire keypress events for backspace
7972
  if (ch == "\x08") { return }
7973
  if (handleCharBinding(cm, e, ch)) { return }
7974
+ cm.display.input.onKeyPress(e)
7975
  }
7976
 
7977
  // A mouse down can be a single click, double click, triple click,
7980
  // middle-click-paste. Or it might be a click on something we should
7981
  // not interfere with, such as a scrollbar or widget.
7982
  function onMouseDown(e) {
7983
+ var cm = this, display = cm.display
7984
  if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) { return }
7985
+ display.input.ensurePolled()
7986
+ display.shift = e.shiftKey
7987
 
7988
  if (eventInWidget(display, e)) {
7989
  if (!webkit) {
7990
  // Briefly turn off draggability, to allow widgets to do
7991
  // normal dragging things.
7992
+ display.scroller.draggable = false
7993
+ setTimeout(function () { return display.scroller.draggable = true; }, 100)
7994
  }
7995
  return
7996
  }
7997
  if (clickInGutter(cm, e)) { return }
7998
+ var start = posFromMouse(cm, e)
7999
+ window.focus()
8000
 
8001
  switch (e_button(e)) {
8002
  case 1:
8003
  // #3261: make sure, that we're not starting a second selection
8004
  if (cm.state.selectingText)
8005
+ { cm.state.selectingText(e) }
8006
  else if (start)
8007
+ { leftButtonDown(cm, e, start) }
8008
  else if (e_target(e) == display.scroller)
8009
+ { e_preventDefault(e) }
8010
  break
8011
  case 2:
8012
+ if (webkit) { cm.state.lastMiddleDown = +new Date }
8013
+ if (start) { extendSelection(cm.doc, start) }
8014
+ setTimeout(function () { return display.input.focus(); }, 20)
8015
+ e_preventDefault(e)
8016
  break
8017
  case 3:
8018
+ if (captureRightClick) { onContextMenu(cm, e) }
8019
+ else { delayBlurEvent(cm) }
8020
  break
8021
  }
8022
  }
8024
  var lastClick;
8025
  var lastDoubleClick;
8026
  function leftButtonDown(cm, e, start) {
8027
+ if (ie) { setTimeout(bind(ensureFocus, cm), 0) }
8028
+ else { cm.curOp.focus = activeElt() }
8029
 
8030
+ var now = +new Date, type
8031
  if (lastDoubleClick && lastDoubleClick.time > now - 400 && cmp(lastDoubleClick.pos, start) == 0) {
8032
+ type = "triple"
8033
  } else if (lastClick && lastClick.time > now - 400 && cmp(lastClick.pos, start) == 0) {
8034
+ type = "double"
8035
+ lastDoubleClick = {time: now, pos: start}
8036
  } else {
8037
+ type = "single"
8038
+ lastClick = {time: now, pos: start}
8039
  }
8040
 
8041
+ var sel = cm.doc.sel, modifier = mac ? e.metaKey : e.ctrlKey, contained
8042
  if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() &&
8043
  type == "single" && (contained = sel.contains(start)) > -1 &&
8044
  (cmp((contained = sel.ranges[contained]).from(), start) < 0 || start.xRel > 0) &&
8045
  (cmp(contained.to(), start) > 0 || start.xRel < 0))
8046
+ { leftButtonStartDrag(cm, e, start, modifier) }
8047
  else
8048
+ { leftButtonSelect(cm, e, start, type, modifier) }
8049
  }
8050
 
8051
  // Start a text drag. When it ends, see if any dragging actually
8052
  // happen, and treat as a click if it didn't.
8053
  function leftButtonStartDrag(cm, e, start, modifier) {
8054
+ var display = cm.display, startTime = +new Date
8055
  var dragEnd = operation(cm, function (e2) {
8056
+ if (webkit) { display.scroller.draggable = false }
8057
+ cm.state.draggingText = false
8058
+ off(document, "mouseup", dragEnd)
8059
+ off(display.scroller, "drop", dragEnd)
8060
  if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) {
8061
+ e_preventDefault(e2)
8062
  if (!modifier && +new Date - 200 < startTime)
8063
+ { extendSelection(cm.doc, start) }
8064
  // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)
8065
  if (webkit || ie && ie_version == 9)
8066
+ { setTimeout(function () {document.body.focus(); display.input.focus()}, 20) }
8067
  else
8068
+ { display.input.focus() }
8069
  }
8070
+ })
8071
  // Let the drag handler handle this.
8072
+ if (webkit) { display.scroller.draggable = true }
8073
+ cm.state.draggingText = dragEnd
8074
+ dragEnd.copy = mac ? e.altKey : e.ctrlKey
8075
  // IE's approach to draggable
8076
+ if (display.scroller.dragDrop) { display.scroller.dragDrop() }
8077
+ on(document, "mouseup", dragEnd)
8078
+ on(display.scroller, "drop", dragEnd)
8079
  }
8080
 
8081
  // Normal selection, as opposed to text dragging.
8082
  function leftButtonSelect(cm, e, start, type, addNew) {
8083
+ var display = cm.display, doc = cm.doc
8084
+ e_preventDefault(e)
8085
 
8086
+ var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges
8087
  if (addNew && !e.shiftKey) {
8088
+ ourIndex = doc.sel.contains(start)
8089
  if (ourIndex > -1)
8090
+ { ourRange = ranges[ourIndex] }
8091
  else
8092
+ { ourRange = new Range(start, start) }
8093
  } else {
8094
+ ourRange = doc.sel.primary()
8095
+ ourIndex = doc.sel.primIndex
8096
  }
8097
 
8098
  if (chromeOS ? e.shiftKey && e.metaKey : e.altKey) {
8099
+ type = "rect"
8100
+ if (!addNew) { ourRange = new Range(start, start) }
8101
+ start = posFromMouse(cm, e, true, true)
8102
+ ourIndex = -1
8103
  } else if (type == "double") {
8104
+ var word = cm.findWordAt(start)
8105
  if (cm.display.shift || doc.extend)
8106
+ { ourRange = extendRange(doc, ourRange, word.anchor, word.head) }
8107
  else
8108
+ { ourRange = word }
8109
  } else if (type == "triple") {
8110
+ var line = new Range(Pos(start.line, 0), clipPos(doc, Pos(start.line + 1, 0)))
8111
  if (cm.display.shift || doc.extend)
8112
+ { ourRange = extendRange(doc, ourRange, line.anchor, line.head) }
8113
  else
8114
+ { ourRange = line }
8115
  } else {
8116
+ ourRange = extendRange(doc, ourRange, start)
8117
  }
8118
 
8119
  if (!addNew) {
8120
+ ourIndex = 0
8121
+ setSelection(doc, new Selection([ourRange], 0), sel_mouse)
8122
+ startSel = doc.sel
8123
  } else if (ourIndex == -1) {
8124
+ ourIndex = ranges.length
8125
  setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex),
8126
+ {scroll: false, origin: "*mouse"})
8127
  } else if (ranges.length > 1 && ranges[ourIndex].empty() && type == "single" && !e.shiftKey) {
8128
  setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),
8129
+ {scroll: false, origin: "*mouse"})
8130
+ startSel = doc.sel
8131
  } else {
8132
+ replaceOneSelection(doc, ourIndex, ourRange, sel_mouse)
8133
  }
8134
 
8135
+ var lastPos = start
8136
  function extendTo(pos) {
8137
  if (cmp(lastPos, pos) == 0) { return }
8138
+ lastPos = pos
8139
 
8140
  if (type == "rect") {
8141
+ var ranges = [], tabSize = cm.options.tabSize
8142
+ var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize)
8143
+ var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize)
8144
+ var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol)
8145
  for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));
8146
  line <= end; line++) {
8147
+ var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize)
8148
  if (left == right)
8149
+ { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))) }
8150
  else if (text.length > leftPos)
8151
+ { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))) }
8152
  }
8153
+ if (!ranges.length) { ranges.push(new Range(start, start)) }
8154
  setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),
8155
+ {origin: "*mouse", scroll: false})
8156
+ cm.scrollIntoView(pos)
8157
  } else {
8158
+ var oldRange = ourRange
8159
+ var anchor = oldRange.anchor, head = pos
8160
  if (type != "single") {
8161
+ var range
8162
  if (type == "double")
8163
+ { range = cm.findWordAt(pos) }
8164
  else
8165
+ { range = new Range(Pos(pos.line, 0), clipPos(doc, Pos(pos.line + 1, 0))) }
8166
+ if (cmp(range.anchor, anchor) > 0) {
8167
+ head = range.head
8168
+ anchor = minPos(oldRange.from(), range.anchor)
8169
  } else {
8170
+ head = range.anchor
8171
+ anchor = maxPos(oldRange.to(), range.head)
8172
  }
8173
  }
8174
+ var ranges$1 = startSel.ranges.slice(0)
8175
+ ranges$1[ourIndex] = new Range(clipPos(doc, anchor), head)
8176
+ setSelection(doc, normalizeSelection(ranges$1, ourIndex), sel_mouse)
8177
  }
8178
  }
8179
 
8180
+ var editorSize = display.wrapper.getBoundingClientRect()
8181
  // Used to ensure timeout re-tries don't fire when another extend
8182
  // happened in the meantime (clearTimeout isn't reliable -- at
8183
  // least on Chrome, the timeouts still happen even when cleared,
8184
  // if the clear happens after their scheduled firing time).
8185
+ var counter = 0
8186
 
8187
  function extend(e) {
8188
+ var curCount = ++counter
8189
+ var cur = posFromMouse(cm, e, true, type == "rect")
8190
  if (!cur) { return }
8191
  if (cmp(cur, lastPos) != 0) {
8192
+ cm.curOp.focus = activeElt()
8193
+ extendTo(cur)
8194
+ var visible = visibleLines(display, doc)
8195
  if (cur.line >= visible.to || cur.line < visible.from)
8196
+ { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e) }}), 150) }
8197
  } else {
8198
+ var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0
8199
  if (outside) { setTimeout(operation(cm, function () {
8200
  if (counter != curCount) { return }
8201
+ display.scroller.scrollTop += outside
8202
+ extend(e)
8203
+ }), 50) }
8204
  }
8205
  }
8206
 
8207
  function done(e) {
8208
+ cm.state.selectingText = false
8209
+ counter = Infinity
8210
+ e_preventDefault(e)
8211
+ display.input.focus()
8212
+ off(document, "mousemove", move)
8213
+ off(document, "mouseup", up)
8214
+ doc.history.lastSelOrigin = null
8215
  }
8216
 
8217
  var move = operation(cm, function (e) {
8218
+ if (!e_button(e)) { done(e) }
8219
+ else { extend(e) }
8220
+ })
8221
+ var up = operation(cm, done)
8222
+ cm.state.selectingText = up
8223
+ on(document, "mousemove", move)
8224
+ on(document, "mouseup", up)
8225
  }
8226
 
8227
 
8228
  // Determines whether an event happened in the gutter, and fires the
8229
  // handlers for the corresponding event.
8230
  function gutterEvent(cm, e, type, prevent) {
8231
+ var mX, mY
8232
+ try { mX = e.clientX; mY = e.clientY }
8233
  catch(e) { return false }
8234
  if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) { return false }
8235
+ if (prevent) { e_preventDefault(e) }
8236
 
8237
+ var display = cm.display
8238
+ var lineBox = display.lineDiv.getBoundingClientRect()
8239
 
8240
  if (mY > lineBox.bottom || !hasHandler(cm, type)) { return e_defaultPrevented(e) }
8241
+ mY -= lineBox.top - display.viewOffset
8242
 
8243
  for (var i = 0; i < cm.options.gutters.length; ++i) {
8244
+ var g = display.gutters.childNodes[i]
8245
  if (g && g.getBoundingClientRect().right >= mX) {
8246
+ var line = lineAtHeight(cm.doc, mY)
8247
+ var gutter = cm.options.gutters[i]
8248
+ signal(cm, type, cm, line, gutter, e)
8249
  return e_defaultPrevented(e)
8250
  }
8251
  }
8263
  function onContextMenu(cm, e) {
8264
  if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }
8265
  if (signalDOMEvent(cm, e, "contextmenu")) { return }
8266
+ cm.display.input.onContextMenu(e)
8267
  }
8268
 
8269
  function contextMenuInGutter(cm, e) {
8273
 
8274
  function themeChanged(cm) {
8275
  cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") +
8276
+ cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-")
8277
+ clearCaches(cm)
8278
  }
8279
 
8280
+ var Init = {toString: function(){return "CodeMirror.Init"}}
8281
 
8282
+ var defaults = {}
8283
+ var optionHandlers = {}
8284
 
8285
  function defineOptions(CodeMirror) {
8286
+ var optionHandlers = CodeMirror.optionHandlers
8287
 
8288
  function option(name, deflt, handle, notOnInit) {
8289
+ CodeMirror.defaults[name] = deflt
8290
  if (handle) { optionHandlers[name] =
8291
+ notOnInit ? function (cm, val, old) {if (old != Init) { handle(cm, val, old) }} : handle }
8292
  }
8293
 
8294
+ CodeMirror.defineOption = option
8295
 
8296
  // Passed to option handlers when there is no old value.
8297
+ CodeMirror.Init = Init
8298
 
8299
  // These two are, on init, called from the constructor because they
8300
  // have to be initialized before the editor can start at all.
8301
+ option("value", "", function (cm, val) { return cm.setValue(val); }, true)
8302
  option("mode", null, function (cm, val) {
8303
+ cm.doc.modeOption = val
8304
+ loadMode(cm)
8305
+ }, true)
8306
 
8307
+ option("indentUnit", 2, loadMode, true)
8308
+ option("indentWithTabs", false)
8309
+ option("smartIndent", true)
8310
  option("tabSize", 4, function (cm) {
8311
+ resetModeState(cm)
8312
+ clearCaches(cm)
8313
+ regChange(cm)
8314
+ }, true)
8315
  option("lineSeparator", null, function (cm, val) {
8316
+ cm.doc.lineSep = val
8317
  if (!val) { return }
8318
+ var newBreaks = [], lineNo = cm.doc.first
8319
  cm.doc.iter(function (line) {
8320
  for (var pos = 0;;) {
8321
+ var found = line.text.indexOf(val, pos)
8322
  if (found == -1) { break }
8323
+ pos = found + val.length
8324
+ newBreaks.push(Pos(lineNo, found))
8325
  }
8326
+ lineNo++
8327
+ })
8328
  for (var i = newBreaks.length - 1; i >= 0; i--)
8329
+ { replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)) }
8330
+ })
8331
+ option("specialChars", /[\u0000-\u001f\u007f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g, function (cm, val, old) {
8332
+ cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g")
8333
+ if (old != Init) { cm.refresh() }
8334
+ })
8335
+ option("specialCharPlaceholder", defaultSpecialCharPlaceholder, function (cm) { return cm.refresh(); }, true)
8336
+ option("electricChars", true)
8337
  option("inputStyle", mobile ? "contenteditable" : "textarea", function () {
8338
  throw new Error("inputStyle can not (yet) be changed in a running editor") // FIXME
8339
+ }, true)
8340
+ option("spellcheck", false, function (cm, val) { return cm.getInputField().spellcheck = val; }, true)
8341
+ option("rtlMoveVisually", !windows)
8342
+ option("wholeLineUpdateBefore", true)
8343
 
8344
  option("theme", "default", function (cm) {
8345
+ themeChanged(cm)
8346
+ guttersChanged(cm)
8347
+ }, true)
8348
  option("keyMap", "default", function (cm, val, old) {
8349
+ var next = getKeyMap(val)
8350
+ var prev = old != Init && getKeyMap(old)
8351
+ if (prev && prev.detach) { prev.detach(cm, next) }
8352
+ if (next.attach) { next.attach(cm, prev || null) }
8353
+ })
8354
+ option("extraKeys", null)
8355
 
8356
+ option("lineWrapping", false, wrappingChanged, true)
8357
  option("gutters", [], function (cm) {
8358
+ setGuttersForLineNumbers(cm.options)
8359
+ guttersChanged(cm)
8360
+ }, true)
8361
  option("fixedGutter", true, function (cm, val) {
8362
+ cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0"
8363
+ cm.refresh()
8364
+ }, true)
8365
+ option("coverGutterNextToScrollbar", false, function (cm) { return updateScrollbars(cm); }, true)
8366
  option("scrollbarStyle", "native", function (cm) {
8367
+ initScrollbars(cm)
8368
+ updateScrollbars(cm)
8369
+ cm.display.scrollbars.setScrollTop(cm.doc.scrollTop)
8370
+ cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft)
8371
+ }, true)
8372
  option("lineNumbers", false, function (cm) {
8373
+ setGuttersForLineNumbers(cm.options)
8374
+ guttersChanged(cm)
8375
+ }, true)
8376
+ option("firstLineNumber", 1, guttersChanged, true)
8377
+ option("lineNumberFormatter", function (integer) { return integer; }, guttersChanged, true)
8378
+ option("showCursorWhenSelecting", false, updateSelection, true)
8379
 
8380
+ option("resetSelectionOnContextMenu", true)
8381
+ option("lineWiseCopyCut", true)
8382
 
8383
  option("readOnly", false, function (cm, val) {
8384
  if (val == "nocursor") {
8385
+ onBlur(cm)
8386
+ cm.display.input.blur()
8387
+ cm.display.disabled = true
8388
  } else {
8389
+ cm.display.disabled = false
8390
  }
8391
+ cm.display.input.readOnlyChanged(val)
8392
+ })
8393
+ option("disableInput", false, function (cm, val) {if (!val) { cm.display.input.reset() }}, true)
8394
+ option("dragDrop", true, dragDropChanged)
8395
+ option("allowDropFileTypes", null)
8396
+
8397
+ option("cursorBlinkRate", 530)
8398
+ option("cursorScrollMargin", 0)
8399
+ option("cursorHeight", 1, updateSelection, true)
8400
+ option("singleCursorHeightPerLine", true, updateSelection, true)
8401
+ option("workTime", 100)
8402
+ option("workDelay", 100)
8403
+ option("flattenSpans", true, resetModeState, true)
8404
+ option("addModeClass", false, resetModeState, true)
8405
+ option("pollInterval", 100)
8406
+ option("undoDepth", 200, function (cm, val) { return cm.doc.history.undoDepth = val; })
8407
+ option("historyEventDelay", 1250)
8408
+ option("viewportMargin", 10, function (cm) { return cm.refresh(); }, true)
8409
+ option("maxHighlightLength", 10000, resetModeState, true)
8410
  option("moveInputWithCursor", true, function (cm, val) {
8411
+ if (!val) { cm.display.input.resetPosition() }
8412
+ })
8413
 
8414
+ option("tabindex", null, function (cm, val) { return cm.display.input.getField().tabIndex = val || ""; })
8415
+ option("autofocus", null)
 
8416
  }
8417
 
8418
  function guttersChanged(cm) {
8419
+ updateGutters(cm)
8420
+ regChange(cm)
8421
+ alignHorizontally(cm)
8422
  }
8423
 
8424
  function dragDropChanged(cm, value, old) {
8425
+ var wasOn = old && old != Init
8426
  if (!value != !wasOn) {
8427
+ var funcs = cm.display.dragFunctions
8428
+ var toggle = value ? on : off
8429
+ toggle(cm.display.scroller, "dragstart", funcs.start)
8430
+ toggle(cm.display.scroller, "dragenter", funcs.enter)
8431
+ toggle(cm.display.scroller, "dragover", funcs.over)
8432
+ toggle(cm.display.scroller, "dragleave", funcs.leave)
8433
+ toggle(cm.display.scroller, "drop", funcs.drop)
8434
  }
8435
  }
8436
 
8437
  function wrappingChanged(cm) {
8438
  if (cm.options.lineWrapping) {
8439
+ addClass(cm.display.wrapper, "CodeMirror-wrap")
8440
+ cm.display.sizer.style.minWidth = ""
8441
+ cm.display.sizerWidth = null
8442
  } else {
8443
+ rmClass(cm.display.wrapper, "CodeMirror-wrap")
8444
+ findMaxLine(cm)
8445
  }
8446
+ estimateLineHeights(cm)
8447
+ regChange(cm)
8448
+ clearCaches(cm)
8449
+ setTimeout(function () { return updateScrollbars(cm); }, 100)
8450
  }
8451
 
8452
  // A CodeMirror instance represents an editor. This is the object
8453
  // that user code is usually dealing with.
8454
 
8455
+ function CodeMirror(place, options) {
8456
  var this$1 = this;
8457
 
8458
+ if (!(this instanceof CodeMirror)) { return new CodeMirror(place, options) }
8459
 
8460
+ this.options = options = options ? copyObj(options) : {}
8461
  // Determine effective options based on given values and defaults.
8462
+ copyObj(defaults, options, false)
8463
+ setGuttersForLineNumbers(options)
8464
+
8465
+ var doc = options.value
8466
+ if (typeof doc == "string") { doc = new Doc(doc, options.mode, null, options.lineSeparator) }
8467
+ this.doc = doc
8468
+
8469
+ var input = new CodeMirror.inputStyles[options.inputStyle](this)
8470
+ var display = this.display = new Display(place, doc, input)
8471
+ display.wrapper.CodeMirror = this
8472
+ updateGutters(this)
8473
+ themeChanged(this)
8474
  if (options.lineWrapping)
8475
+ { this.display.wrapper.className += " CodeMirror-wrap" }
8476
+ initScrollbars(this)
8477
 
8478
  this.state = {
8479
  keyMaps: [], // stores maps added by addKeyMap
8489
  highlight: new Delayed(), // stores highlight worker timeout
8490
  keySeq: null, // Unfinished key sequence
8491
  specialChars: null
8492
+ }
8493
 
8494
+ if (options.autofocus && !mobile) { display.input.focus() }
8495
 
8496
  // Override magic textarea content restore that IE sometimes does
8497
  // on our hidden textarea on reload
8498
+ if (ie && ie_version < 11) { setTimeout(function () { return this$1.display.input.reset(true); }, 20) }
8499
 
8500
+ registerEventHandlers(this)
8501
+ ensureGlobalHandlers()
8502
 
8503
+ startOperation(this)
8504
+ this.curOp.forceUpdate = true
8505
+ attachDoc(this, doc)
8506
 
8507
  if ((options.autofocus && !mobile) || this.hasFocus())
8508
+ { setTimeout(bind(onFocus, this), 20) }
8509
  else
8510
+ { onBlur(this) }
8511
 
8512
  for (var opt in optionHandlers) { if (optionHandlers.hasOwnProperty(opt))
8513
+ { optionHandlers[opt](this$1, options[opt], Init) } }
8514
+ maybeUpdateLineNumberWidth(this)
8515
+ if (options.finishInit) { options.finishInit(this) }
8516
+ for (var i = 0; i < initHooks.length; ++i) { initHooks[i](this$1) }
8517
+ endOperation(this)
8518
  // Suppress optimizelegibility in Webkit, since it breaks text
8519
  // measuring on line wrapping boundaries.
8520
  if (webkit && options.lineWrapping &&
8521
  getComputedStyle(display.lineDiv).textRendering == "optimizelegibility")
8522
+ { display.lineDiv.style.textRendering = "auto" }
8523
  }
8524
 
8525
  // The default configuration options.
8526
+ CodeMirror.defaults = defaults
8527
  // Functions to run when options are changed.
8528
+ CodeMirror.optionHandlers = optionHandlers
8529
 
8530
  // Attach the necessary event handlers when initializing the editor
8531
  function registerEventHandlers(cm) {
8532
+ var d = cm.display
8533
+ on(d.scroller, "mousedown", operation(cm, onMouseDown))
8534
  // Older IE's will not fire a second mousedown for a double click
8535
  if (ie && ie_version < 11)
8536
  { on(d.scroller, "dblclick", operation(cm, function (e) {
8537
  if (signalDOMEvent(cm, e)) { return }
8538
+ var pos = posFromMouse(cm, e)
8539
  if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) { return }
8540
+ e_preventDefault(e)
8541
+ var word = cm.findWordAt(pos)
8542
+ extendSelection(cm.doc, word.anchor, word.head)
8543
+ })) }
8544
  else
8545
+ { on(d.scroller, "dblclick", function (e) { return signalDOMEvent(cm, e) || e_preventDefault(e); }) }
8546
  // Some browsers fire contextmenu *after* opening the menu, at
8547
  // which point we can't mess with it anymore. Context menu is
8548
  // handled in onMouseDown for these browsers.
8549
+ if (!captureRightClick) { on(d.scroller, "contextmenu", function (e) { return onContextMenu(cm, e); }) }
8550
 
8551
  // Used to suppress mouse event handling when a touch happens
8552
+ var touchFinished, prevTouch = {end: 0}
8553
  function finishTouch() {
8554
  if (d.activeTouch) {
8555
+ touchFinished = setTimeout(function () { return d.activeTouch = null; }, 1000)
8556
+ prevTouch = d.activeTouch
8557
+ prevTouch.end = +new Date
8558
  }
8559
  }
8560
  function isMouseLikeTouchEvent(e) {
8561
  if (e.touches.length != 1) { return false }
8562
+ var touch = e.touches[0]
8563
  return touch.radiusX <= 1 && touch.radiusY <= 1
8564
  }
8565
  function farAway(touch, other) {
8566
  if (other.left == null) { return true }
8567
+ var dx = other.left - touch.left, dy = other.top - touch.top
8568
  return dx * dx + dy * dy > 20 * 20
8569
  }
8570
  on(d.scroller, "touchstart", function (e) {
8571
  if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e)) {
8572
+ d.input.ensurePolled()
8573
+ clearTimeout(touchFinished)
8574
+ var now = +new Date
8575
  d.activeTouch = {start: now, moved: false,
8576
+ prev: now - prevTouch.end <= 300 ? prevTouch : null}
8577
  if (e.touches.length == 1) {
8578
+ d.activeTouch.left = e.touches[0].pageX
8579
+ d.activeTouch.top = e.touches[0].pageY
8580
  }
8581
  }
8582
+ })
8583
  on(d.scroller, "touchmove", function () {
8584
+ if (d.activeTouch) { d.activeTouch.moved = true }
8585
+ })
8586
  on(d.scroller, "touchend", function (e) {
8587
+ var touch = d.activeTouch
8588
  if (touch && !eventInWidget(d, e) && touch.left != null &&
8589
  !touch.moved && new Date - touch.start < 300) {
8590
+ var pos = cm.coordsChar(d.activeTouch, "page"), range
8591
  if (!touch.prev || farAway(touch, touch.prev)) // Single tap
8592
+ { range = new Range(pos, pos) }
8593
  else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap
8594
+ { range = cm.findWordAt(pos) }
8595
  else // Triple tap
8596
+ { range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))) }
8597
+ cm.setSelection(range.anchor, range.head)
8598
+ cm.focus()
8599
+ e_preventDefault(e)
8600
  }
8601
+ finishTouch()
8602
+ })
8603
+ on(d.scroller, "touchcancel", finishTouch)
8604
 
8605
  // Sync scrolling between fake scrollbars and real scrollable
8606
  // area, ensure viewport is updated when scrolling.
8607
  on(d.scroller, "scroll", function () {
8608
  if (d.scroller.clientHeight) {
8609
+ setScrollTop(cm, d.scroller.scrollTop)
8610
+ setScrollLeft(cm, d.scroller.scrollLeft, true)
8611
+ signal(cm, "scroll", cm)
8612
  }
8613
+ })
8614
 
8615
  // Listen to wheel events in order to try and update the viewport on time.
8616
+ on(d.scroller, "mousewheel", function (e) { return onScrollWheel(cm, e); })
8617
+ on(d.scroller, "DOMMouseScroll", function (e) { return onScrollWheel(cm, e); })
8618
 
8619
  // Prevent wrapper from ever scrolling
8620
+ on(d.wrapper, "scroll", function () { return d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; })
8621
 
8622
  d.dragFunctions = {
8623
+ enter: function (e) {if (!signalDOMEvent(cm, e)) { e_stop(e) }},
8624
+ over: function (e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e) }},
8625
  start: function (e) { return onDragStart(cm, e); },
8626
  drop: operation(cm, onDrop),
8627
+ leave: function (e) {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm) }}
8628
+ }
8629
 
8630
+ var inp = d.input.getField()
8631
+ on(inp, "keyup", function (e) { return onKeyUp.call(cm, e); })
8632
+ on(inp, "keydown", operation(cm, onKeyDown))
8633
+ on(inp, "keypress", operation(cm, onKeyPress))
8634
+ on(inp, "focus", function (e) { return onFocus(cm, e); })
8635
+ on(inp, "blur", function (e) { return onBlur(cm, e); })
8636
  }
8637
 
8638
+ var initHooks = []
8639
+ CodeMirror.defineInitHook = function (f) { return initHooks.push(f); }
8640
 
8641
  // Indent the given line. The how parameter can be "smart",
8642
  // "add"/null, "subtract", or "prev". When aggressive is false
8644
  // lines are not indented, and places where the mode returns Pass
8645
  // are left alone.
8646
  function indentLine(cm, n, how, aggressive) {
8647
+ var doc = cm.doc, state
8648
+ if (how == null) { how = "add" }
8649
  if (how == "smart") {
8650
  // Fall back to "prev" when the mode doesn't have an indentation
8651
  // method.
8652
+ if (!doc.mode.indent) { how = "prev" }
8653
+ else { state = getStateBefore(cm, n) }
8654
  }
8655
 
8656
+ var tabSize = cm.options.tabSize
8657
+ var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize)
8658
+ if (line.stateAfter) { line.stateAfter = null }
8659
+ var curSpaceString = line.text.match(/^\s*/)[0], indentation
8660
  if (!aggressive && !/\S/.test(line.text)) {
8661
+ indentation = 0
8662
+ how = "not"
8663
  } else if (how == "smart") {
8664
+ indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text)
8665
  if (indentation == Pass || indentation > 150) {
8666
  if (!aggressive) { return }
8667
+ how = "prev"
8668
  }
8669
  }
8670
  if (how == "prev") {
8671
+ if (n > doc.first) { indentation = countColumn(getLine(doc, n-1).text, null, tabSize) }
8672
+ else { indentation = 0 }
8673
  } else if (how == "add") {
8674
+ indentation = curSpace + cm.options.indentUnit
8675
  } else if (how == "subtract") {
8676
+ indentation = curSpace - cm.options.indentUnit
8677
  } else if (typeof how == "number") {
8678
+ indentation = curSpace + how
8679
  }
8680
+ indentation = Math.max(0, indentation)
8681
 
8682
+ var indentString = "", pos = 0
8683
  if (cm.options.indentWithTabs)
8684
+ { for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t"} }
8685
+ if (pos < indentation) { indentString += spaceStr(indentation - pos) }
8686
 
8687
  if (indentString != curSpaceString) {
8688
+ replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input")
8689
+ line.stateAfter = null
8690
  return true
8691
  } else {
8692
  // Ensure that, if the cursor was in the whitespace at the start
8693
  // of the line, it is moved to the end of that space.
8694
  for (var i$1 = 0; i$1 < doc.sel.ranges.length; i$1++) {
8695
+ var range = doc.sel.ranges[i$1]
8696
  if (range.head.line == n && range.head.ch < curSpaceString.length) {
8697
+ var pos$1 = Pos(n, curSpaceString.length)
8698
+ replaceOneSelection(doc, i$1, new Range(pos$1, pos$1))
8699
  break
8700
  }
8701
  }
8705
  // This will be set to a {lineWise: bool, text: [string]} object, so
8706
  // that, when pasting, we know what kind of selections the copied
8707
  // text was made out of.
8708
+ var lastCopied = null
8709
 
8710
  function setLastCopied(newLastCopied) {
8711
+ lastCopied = newLastCopied
8712
  }
8713
 
8714
  function applyTextInput(cm, inserted, deleted, sel, origin) {
8715
+ var doc = cm.doc
8716
+ cm.display.shift = false
8717
+ if (!sel) { sel = doc.sel }
8718
 
8719
+ var paste = cm.state.pasteIncoming || origin == "paste"
8720
+ var textLines = splitLinesAuto(inserted), multiPaste = null
8721
  // When pasing N lines into N selections, insert one line per selection
8722
  if (paste && sel.ranges.length > 1) {
8723
  if (lastCopied && lastCopied.text.join("\n") == inserted) {
8724
  if (sel.ranges.length % lastCopied.text.length == 0) {
8725
+ multiPaste = []
8726
  for (var i = 0; i < lastCopied.text.length; i++)
8727
+ { multiPaste.push(doc.splitLines(lastCopied.text[i])) }
8728
  }
8729
  } else if (textLines.length == sel.ranges.length) {
8730
+ multiPaste = map(textLines, function (l) { return [l]; })
8731
  }
8732
  }
8733
 
8734
+ var updateInput
8735
  // Normal behavior is to insert the new text into every selection
8736
  for (var i$1 = sel.ranges.length - 1; i$1 >= 0; i$1--) {
8737
+ var range = sel.ranges[i$1]
8738
+ var from = range.from(), to = range.to()
8739
+ if (range.empty()) {
8740
  if (deleted && deleted > 0) // Handle deletion
8741
+ { from = Pos(from.line, from.ch - deleted) }
8742
  else if (cm.state.overwrite && !paste) // Handle overwrite
8743
+ { to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)) }
8744
  else if (lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") == inserted)
8745
+ { from = to = Pos(from.line, 0) }
8746
  }
8747
+ updateInput = cm.curOp.updateInput
8748
  var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines,
8749
+ origin: origin || (paste ? "paste" : cm.state.cutIncoming ? "cut" : "+input")}
8750
+ makeChange(cm.doc, changeEvent)
8751
+ signalLater(cm, "inputRead", cm, changeEvent)
8752
  }
8753
  if (inserted && !paste)
8754
+ { triggerElectric(cm, inserted) }
8755
 
8756
+ ensureCursorVisible(cm)
8757
+ cm.curOp.updateInput = updateInput
8758
+ cm.curOp.typing = true
8759
+ cm.state.pasteIncoming = cm.state.cutIncoming = false
8760
  }
8761
 
8762
  function handlePaste(e, cm) {
8763
+ var pasted = e.clipboardData && e.clipboardData.getData("Text")
8764
  if (pasted) {
8765
+ e.preventDefault()
8766
  if (!cm.isReadOnly() && !cm.options.disableInput)
8767
+ { runInOp(cm, function () { return applyTextInput(cm, pasted, 0, null, "paste"); }) }
8768
  return true
8769
  }
8770
  }
8772
  function triggerElectric(cm, inserted) {
8773
  // When an 'electric' character is inserted, immediately trigger a reindent
8774
  if (!cm.options.electricChars || !cm.options.smartIndent) { return }
8775
+ var sel = cm.doc.sel
8776
 
8777
  for (var i = sel.ranges.length - 1; i >= 0; i--) {
8778
+ var range = sel.ranges[i]
8779
+ if (range.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range.head.line)) { continue }
8780
+ var mode = cm.getModeAt(range.head)
8781
+ var indented = false
8782
  if (mode.electricChars) {
8783
  for (var j = 0; j < mode.electricChars.length; j++)
8784
  { if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {
8785
+ indented = indentLine(cm, range.head.line, "smart")
8786
  break
8787
  } }
8788
  } else if (mode.electricInput) {
8789
+ if (mode.electricInput.test(getLine(cm.doc, range.head.line).text.slice(0, range.head.ch)))
8790
+ { indented = indentLine(cm, range.head.line, "smart") }
8791
  }
8792
+ if (indented) { signalLater(cm, "electricInput", cm, range.head.line) }
8793
  }
8794
  }
8795
 
8796
  function copyableRanges(cm) {
8797
+ var text = [], ranges = []
8798
  for (var i = 0; i < cm.doc.sel.ranges.length; i++) {
8799
+ var line = cm.doc.sel.ranges[i].head.line
8800
+ var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)}
8801
+ ranges.push(lineRange)
8802
+ text.push(cm.getRange(lineRange.anchor, lineRange.head))
8803
  }
8804
  return {text: text, ranges: ranges}
8805
  }
8806
 
8807
  function disableBrowserMagic(field, spellcheck) {
8808
+ field.setAttribute("autocorrect", "off")
8809
+ field.setAttribute("autocapitalize", "off")
8810
+ field.setAttribute("spellcheck", !!spellcheck)
8811
  }
8812
 
8813
  function hiddenTextarea() {
8814
+ var te = elt("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none")
8815
+ var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;")
8816
  // The textarea is kept positioned near the cursor to prevent the
8817
  // fact that it'll be scrolled into view on input from scrolling
8818
  // our fake cursor out of view. On webkit, when wrap=off, paste is
8819
  // very slow. So make the area wide instead.
8820
+ if (webkit) { te.style.width = "1000px" }
8821
+ else { te.setAttribute("wrap", "off") }
8822
  // If border: 0; -- iOS fails to open keyboard (issue #1287)
8823
+ if (ios) { te.style.border = "1px solid black" }
8824
+ disableBrowserMagic(te)
8825
  return div
8826
  }
8827
 
8833
  // CodeMirror.prototype, for backwards compatibility and
8834
  // convenience.
8835
 
8836
+ function addEditorMethods(CodeMirror) {
8837
+ var optionHandlers = CodeMirror.optionHandlers
8838
 
8839
+ var helpers = CodeMirror.helpers = {}
8840
 
8841
  CodeMirror.prototype = {
8842
  constructor: CodeMirror,
8843
+ focus: function(){window.focus(); this.display.input.focus()},
8844
 
8845
  setOption: function(option, value) {
8846
+ var options = this.options, old = options[option]
8847
  if (options[option] == value && option != "mode") { return }
8848
+ options[option] = value
8849
  if (optionHandlers.hasOwnProperty(option))
8850
+ { operation(this, optionHandlers[option])(this, value, old) }
8851
+ signal(this, "optionChange", this, option)
8852
  },
8853
 
8854
  getOption: function(option) {return this.options[option]},
8855
  getDoc: function() {return this.doc},
8856
 
8857
+ addKeyMap: function(map, bottom) {
8858
+ this.state.keyMaps[bottom ? "push" : "unshift"](getKeyMap(map))
8859
  },
8860
+ removeKeyMap: function(map) {
8861
+ var maps = this.state.keyMaps
8862
  for (var i = 0; i < maps.length; ++i)
8863
+ { if (maps[i] == map || maps[i].name == map) {
8864
+ maps.splice(i, 1)
8865
  return true
8866
  } }
8867
  },
8868
 
8869
  addOverlay: methodOp(function(spec, options) {
8870
+ var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec)
8871
  if (mode.startState) { throw new Error("Overlays may not be stateful.") }
8872
  insertSorted(this.state.overlays,
8873
  {mode: mode, modeSpec: spec, opaque: options && options.opaque,
8874
  priority: (options && options.priority) || 0},
8875
+ function (overlay) { return overlay.priority; })
8876
+ this.state.modeGen++
8877
+ regChange(this)
8878
  }),
8879
  removeOverlay: methodOp(function(spec) {
8880
  var this$1 = this;
8881
 
8882
+ var overlays = this.state.overlays
8883
  for (var i = 0; i < overlays.length; ++i) {
8884
+ var cur = overlays[i].modeSpec
8885
  if (cur == spec || typeof spec == "string" && cur.name == spec) {
8886
+ overlays.splice(i, 1)
8887
+ this$1.state.modeGen++
8888
+ regChange(this$1)
8889
  return
8890
  }
8891
  }
8893
 
8894
  indentLine: methodOp(function(n, dir, aggressive) {
8895
  if (typeof dir != "string" && typeof dir != "number") {
8896
+ if (dir == null) { dir = this.options.smartIndent ? "smart" : "prev" }
8897
+ else { dir = dir ? "add" : "subtract" }
8898
  }
8899
+ if (isLine(this.doc, n)) { indentLine(this, n, dir, aggressive) }
8900
  }),
8901
  indentSelection: methodOp(function(how) {
8902
  var this$1 = this;
8903
 
8904
+ var ranges = this.doc.sel.ranges, end = -1
8905
  for (var i = 0; i < ranges.length; i++) {
8906
+ var range = ranges[i]
8907
+ if (!range.empty()) {
8908
+ var from = range.from(), to = range.to()
8909
+ var start = Math.max(end, from.line)
8910
+ end = Math.min(this$1.lastLine(), to.line - (to.ch ? 0 : 1)) + 1
8911
  for (var j = start; j < end; ++j)
8912
+ { indentLine(this$1, j, how) }
8913
+ var newRanges = this$1.doc.sel.ranges
8914
  if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0)
8915
+ { replaceOneSelection(this$1.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll) }
8916
+ } else if (range.head.line > end) {
8917
+ indentLine(this$1, range.head.line, how, true)
8918
+ end = range.head.line
8919
+ if (i == this$1.doc.sel.primIndex) { ensureCursorVisible(this$1) }
8920
  }
8921
  }
8922
  }),
8932
  },
8933
 
8934
  getTokenTypeAt: function(pos) {
8935
+ pos = clipPos(this.doc, pos)
8936
+ var styles = getLineStyles(this, getLine(this.doc, pos.line))
8937
+ var before = 0, after = (styles.length - 1) / 2, ch = pos.ch
8938
+ var type
8939
+ if (ch == 0) { type = styles[2] }
8940
  else { for (;;) {
8941
+ var mid = (before + after) >> 1
8942
+ if ((mid ? styles[mid * 2 - 1] : 0) >= ch) { after = mid }
8943
+ else if (styles[mid * 2 + 1] < ch) { before = mid + 1 }
8944
  else { type = styles[mid * 2 + 2]; break }
8945
  } }
8946
+ var cut = type ? type.indexOf("overlay ") : -1
8947
  return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1)
8948
  },
8949
 
8950
  getModeAt: function(pos) {
8951
+ var mode = this.doc.mode
8952
  if (!mode.innerMode) { return mode }
8953
  return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode
8954
  },
8960
  getHelpers: function(pos, type) {
8961
  var this$1 = this;
8962
 
8963
+ var found = []
8964
  if (!helpers.hasOwnProperty(type)) { return found }
8965
+ var help = helpers[type], mode = this.getModeAt(pos)
8966
  if (typeof mode[type] == "string") {
8967
+ if (help[mode[type]]) { found.push(help[mode[type]]) }
8968
  } else if (mode[type]) {
8969
  for (var i = 0; i < mode[type].length; i++) {
8970
+ var val = help[mode[type][i]]
8971
+ if (val) { found.push(val) }
8972
  }
8973
  } else if (mode.helperType && help[mode.helperType]) {
8974
+ found.push(help[mode.helperType])
8975
  } else if (help[mode.name]) {
8976
+ found.push(help[mode.name])
8977
  }
8978
  for (var i$1 = 0; i$1 < help._global.length; i$1++) {
8979
+ var cur = help._global[i$1]
8980
  if (cur.pred(mode, this$1) && indexOf(found, cur.val) == -1)
8981
+ { found.push(cur.val) }
8982
  }
8983
  return found
8984
  },
8985
 
8986
  getStateAfter: function(line, precise) {
8987
+ var doc = this.doc
8988
+ line = clipLine(doc, line == null ? doc.first + doc.size - 1: line)
8989
  return getStateBefore(this, line + 1, precise)
8990
  },
8991
 
8992
  cursorCoords: function(start, mode) {
8993
+ var pos, range = this.doc.sel.primary()
8994
+ if (start == null) { pos = range.head }
8995
+ else if (typeof start == "object") { pos = clipPos(this.doc, start) }
8996
+ else { pos = start ? range.from() : range.to() }
8997
  return cursorCoords(this, pos, mode || "page")
8998
  },
8999
 
9002
  },
9003
 
9004
  coordsChar: function(coords, mode) {
9005
+ coords = fromCoordSystem(this, coords, mode || "page")
9006
  return coordsChar(this, coords.left, coords.top)
9007
  },
9008
 
9009
  lineAtHeight: function(height, mode) {
9010
+ height = fromCoordSystem(this, {top: height, left: 0}, mode || "page").top
9011
  return lineAtHeight(this.doc, height + this.display.viewOffset)
9012
  },
9013
  heightAtLine: function(line, mode, includeWidgets) {
9014
+ var end = false, lineObj
9015
  if (typeof line == "number") {
9016
+ var last = this.doc.first + this.doc.size - 1
9017
+ if (line < this.doc.first) { line = this.doc.first }
9018
+ else if (line > last) { line = last; end = true }
9019
+ lineObj = getLine(this.doc, line)
9020
  } else {
9021
+ lineObj = line
9022
  }
9023
  return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || "page", includeWidgets || end).top +
9024
  (end ? this.doc.height - heightAtLine(lineObj) : 0)
9030
  getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo}},
9031
 
9032
  addWidget: function(pos, node, scroll, vert, horiz) {
9033
+ var display = this.display
9034
+ pos = cursorCoords(this, clipPos(this.doc, pos))
9035
+ var top = pos.bottom, left = pos.left
9036
+ node.style.position = "absolute"
9037
+ node.setAttribute("cm-ignore-events", "true")
9038
+ this.display.input.setUneditable(node)
9039
+ display.sizer.appendChild(node)
9040
  if (vert == "over") {
9041
+ top = pos.top
9042
  } else if (vert == "above" || vert == "near") {
9043
  var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),
9044
+ hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth)
9045
  // Default to positioning above (if specified and possible); otherwise default to positioning below
9046
  if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)
9047
+ { top = pos.top - node.offsetHeight }
9048
  else if (pos.bottom + node.offsetHeight <= vspace)
9049
+ { top = pos.bottom }
9050
  if (left + node.offsetWidth > hspace)
9051
+ { left = hspace - node.offsetWidth }
9052
  }
9053
+ node.style.top = top + "px"
9054
+ node.style.left = node.style.right = ""
9055
  if (horiz == "right") {
9056
+ left = display.sizer.clientWidth - node.offsetWidth
9057
+ node.style.right = "0px"
9058
  } else {
9059
+ if (horiz == "left") { left = 0 }
9060
+ else if (horiz == "middle") { left = (display.sizer.clientWidth - node.offsetWidth) / 2 }
9061
+ node.style.left = left + "px"
9062
  }
9063
  if (scroll)
9064
+ { scrollIntoView(this, left, top, left + node.offsetWidth, top + node.offsetHeight) }
9065
  },
9066
 
9067
  triggerOnKeyDown: methodOp(onKeyDown),
9073
  { return commands[cmd].call(null, this) }
9074
  },
9075
 
9076
+ triggerElectric: methodOp(function(text) { triggerElectric(this, text) }),
9077
 
9078
  findPosH: function(from, amount, unit, visually) {
9079
  var this$1 = this;
9080
 
9081
+ var dir = 1
9082
+ if (amount < 0) { dir = -1; amount = -amount }
9083
+ var cur = clipPos(this.doc, from)
9084
  for (var i = 0; i < amount; ++i) {
9085
+ cur = findPosH(this$1.doc, cur, dir, unit, visually)
9086
  if (cur.hitSide) { break }
9087
  }
9088
  return cur
9091
  moveH: methodOp(function(dir, unit) {
9092
  var this$1 = this;
9093
 
9094
+ this.extendSelectionsBy(function (range) {
9095
+ if (this$1.display.shift || this$1.doc.extend || range.empty())
9096
+ { return findPosH(this$1.doc, range.head, dir, unit, this$1.options.rtlMoveVisually) }
9097
  else
9098
+ { return dir < 0 ? range.from() : range.to() }
9099
+ }, sel_move)
9100
  }),
9101
 
9102
  deleteH: methodOp(function(dir, unit) {
9103
+ var sel = this.doc.sel, doc = this.doc
9104
  if (sel.somethingSelected())
9105
+ { doc.replaceSelection("", null, "+delete") }
9106
  else
9107
+ { deleteNearSelection(this, function (range) {
9108
+ var other = findPosH(doc, range.head, dir, unit, false)
9109
+ return dir < 0 ? {from: other, to: range.head} : {from: range.head, to: other}
9110
+ }) }
9111
  }),
9112
 
9113
  findPosV: function(from, amount, unit, goalColumn) {
9114
  var this$1 = this;
9115
 
9116
+ var dir = 1, x = goalColumn
9117
+ if (amount < 0) { dir = -1; amount = -amount }
9118
+ var cur = clipPos(this.doc, from)
9119
  for (var i = 0; i < amount; ++i) {
9120
+ var coords = cursorCoords(this$1, cur, "div")
9121
+ if (x == null) { x = coords.left }
9122
+ else { coords.left = x }
9123
+ cur = findPosV(this$1, coords, dir, unit)
9124
  if (cur.hitSide) { break }
9125
  }
9126
  return cur
9129
  moveV: methodOp(function(dir, unit) {
9130
  var this$1 = this;
9131
 
9132
+ var doc = this.doc, goals = []
9133
+ var collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected()
9134
+ doc.extendSelectionsBy(function (range) {
9135
  if (collapse)
9136
+ { return dir < 0 ? range.from() : range.to() }
9137
+ var headPos = cursorCoords(this$1, range.head, "div")
9138
+ if (range.goalColumn != null) { headPos.left = range.goalColumn }
9139
+ goals.push(headPos.left)
9140
+ var pos = findPosV(this$1, headPos, dir, unit)
9141
+ if (unit == "page" && range == doc.sel.primary())
9142
+ { addToScrollPos(this$1, null, charCoords(this$1, pos, "div").top - headPos.top) }
9143
  return pos
9144
+ }, sel_move)
9145
  if (goals.length) { for (var i = 0; i < doc.sel.ranges.length; i++)
9146
+ { doc.sel.ranges[i].goalColumn = goals[i] } }
9147
  }),
9148
 
9149
  // Find the word at the given position (as returned by coordsChar).
9150
  findWordAt: function(pos) {
9151
+ var doc = this.doc, line = getLine(doc, pos.line).text
9152
+ var start = pos.ch, end = pos.ch
9153
  if (line) {
9154
+ var helper = this.getHelper(pos, "wordChars")
9155
+ if ((pos.sticky == "before" || end == line.length) && start) { --start; } else { ++end }
9156
+ var startChar = line.charAt(start)
9157
  var check = isWordChar(startChar, helper)
9158
  ? function (ch) { return isWordChar(ch, helper); }
9159
  : /\s/.test(startChar) ? function (ch) { return /\s/.test(ch); }
9160
+ : function (ch) { return (!/\s/.test(ch) && !isWordChar(ch)); }
9161
+ while (start > 0 && check(line.charAt(start - 1))) { --start }
9162
+ while (end < line.length && check(line.charAt(end))) { ++end }
9163
  }
9164
  return new Range(Pos(pos.line, start), Pos(pos.line, end))
9165
  },
9167
  toggleOverwrite: function(value) {
9168
  if (value != null && value == this.state.overwrite) { return }
9169
  if (this.state.overwrite = !this.state.overwrite)
9170
+ { addClass(this.display.cursorDiv, "CodeMirror-overwrite") }
9171
  else
9172
+ { rmClass(this.display.cursorDiv, "CodeMirror-overwrite") }
9173
 
9174
+ signal(this, "overwriteToggle", this, this.state.overwrite)
9175
  },
9176
  hasFocus: function() { return this.display.input.getField() == activeElt() },
9177
  isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit) },
9178
 
9179
  scrollTo: methodOp(function(x, y) {
9180
+ if (x != null || y != null) { resolveScrollToPos(this) }
9181
+ if (x != null) { this.curOp.scrollLeft = x }
9182
+ if (y != null) { this.curOp.scrollTop = y }
9183
  }),
9184
  getScrollInfo: function() {
9185
+ var scroller = this.display.scroller
9186
  return {left: scroller.scrollLeft, top: scroller.scrollTop,
9187
  height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight,
9188
  width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth,
9189
  clientHeight: displayHeight(this), clientWidth: displayWidth(this)}
9190
  },
9191
 
9192
+ scrollIntoView: methodOp(function(range, margin) {
9193
+ if (range == null) {
9194
+ range = {from: this.doc.sel.primary().head, to: null}
9195
+ if (margin == null) { margin = this.options.cursorScrollMargin }
9196
+ } else if (typeof range == "number") {
9197
+ range = {from: Pos(range, 0), to: null}
9198
+ } else if (range.from == null) {
9199
+ range = {from: range, to: null}
9200
  }
9201
+ if (!range.to) { range.to = range.from }
9202
+ range.margin = margin || 0
9203
 
9204
+ if (range.from.line != null) {
9205
+ resolveScrollToPos(this)
9206
+ this.curOp.scrollToPos = range
9207
  } else {
9208
+ var sPos = calculateScrollPos(this, Math.min(range.from.left, range.to.left),
9209
+ Math.min(range.from.top, range.to.top) - range.margin,
9210
+ Math.max(range.from.right, range.to.right),
9211
+ Math.max(range.from.bottom, range.to.bottom) + range.margin)
9212
+ this.scrollTo(sPos.scrollLeft, sPos.scrollTop)
 
 
9213
  }
9214
  }),
9215
 
9216
  setSize: methodOp(function(width, height) {
9217
  var this$1 = this;
9218
 
9219
+ var interpret = function (val) { return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val; }
9220
+ if (width != null) { this.display.wrapper.style.width = interpret(width) }
9221
+ if (height != null) { this.display.wrapper.style.height = interpret(height) }
9222
+ if (this.options.lineWrapping) { clearLineMeasurementCache(this) }
9223
+ var lineNo = this.display.viewFrom
9224
+ this.doc.iter(lineNo, this.display.viewTo, function (line) {
9225
  if (line.widgets) { for (var i = 0; i < line.widgets.length; i++)
9226
+ { if (line.widgets[i].noHScroll) { regLineChange(this$1, lineNo, "widget"); break } } }
9227
+ ++lineNo
9228
+ })
9229
+ this.curOp.forceUpdate = true
9230
+ signal(this, "refresh", this)
9231
  }),
9232
 
9233
  operation: function(f){return runInOp(this, f)},
9234
 
9235
  refresh: methodOp(function() {
9236
+ var oldHeight = this.display.cachedTextHeight
9237
+ regChange(this)
9238
+ this.curOp.forceUpdate = true
9239
+ clearCaches(this)
9240
+ this.scrollTo(this.doc.scrollLeft, this.doc.scrollTop)
9241
+ updateGutterSpace(this)
9242
  if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5)
9243
+ { estimateLineHeights(this) }
9244
+ signal(this, "refresh", this)
9245
  }),
9246
 
9247
  swapDoc: methodOp(function(doc) {
9248
+ var old = this.doc
9249
+ old.cm = null
9250
+ attachDoc(this, doc)
9251
+ clearCaches(this)
9252
+ this.display.input.reset()
9253
+ this.scrollTo(doc.scrollLeft, doc.scrollTop)
9254
+ this.curOp.forceScroll = true
9255
+ signalLater(this, "swapDoc", this, old)
9256
  return old
9257
  }),
9258
 
9260
  getWrapperElement: function(){return this.display.wrapper},
9261
  getScrollerElement: function(){return this.display.scroller},
9262
  getGutterElement: function(){return this.display.gutters}
9263
+ }
9264
+ eventMixin(CodeMirror)
9265
 
9266
  CodeMirror.registerHelper = function(type, name, value) {
9267
+ if (!helpers.hasOwnProperty(type)) { helpers[type] = CodeMirror[type] = {_global: []} }
9268
+ helpers[type][name] = value
9269
+ }
9270
  CodeMirror.registerGlobalHelper = function(type, name, predicate, value) {
9271
+ CodeMirror.registerHelper(type, name, value)
9272
+ helpers[type]._global.push({pred: predicate, val: value})
9273
+ }
9274
+ }
9275
 
9276
  // Used for horizontal relative motion. Dir is -1 or 1 (left or
9277
  // right), unit can be "char", "column" (like char, but doesn't
9283
  // position. The resulting position will have a hitSide=true
9284
  // property if it reached the end of the document.
9285
  function findPosH(doc, pos, dir, unit, visually) {
9286
+ var oldPos = pos
9287
+ var origDir = dir
9288
+ var lineObj = getLine(doc, pos.line)
9289
  function findNextLine() {
9290
+ var l = pos.line + dir
9291
  if (l < doc.first || l >= doc.first + doc.size) { return false }
9292
+ pos = new Pos(l, pos.ch, pos.sticky)
9293
  return lineObj = getLine(doc, l)
9294
  }
9295
  function moveOnce(boundToLine) {
9296
+ var next
9297
  if (visually) {
9298
+ next = moveVisually(doc.cm, lineObj, pos, dir)
9299
  } else {
9300
+ next = moveLogically(lineObj, pos, dir)
9301
  }
9302
  if (next == null) {
9303
  if (!boundToLine && findNextLine())
9304
+ { pos = endOfLine(visually, doc.cm, lineObj, pos.line, dir) }
9305
  else
9306
  { return false }
9307
  } else {
9308
+ pos = next
9309
  }
9310
  return true
9311
  }
9312
 
9313
  if (unit == "char") {
9314
+ moveOnce()
9315
  } else if (unit == "column") {
9316
+ moveOnce(true)
9317
  } else if (unit == "word" || unit == "group") {
9318
+ var sawType = null, group = unit == "group"
9319
+ var helper = doc.cm && doc.cm.getHelper(pos, "wordChars")
9320
  for (var first = true;; first = false) {
9321
  if (dir < 0 && !moveOnce(!first)) { break }
9322
+ var cur = lineObj.text.charAt(pos.ch) || "\n"
9323
  var type = isWordChar(cur, helper) ? "w"
9324
  : group && cur == "\n" ? "n"
9325
  : !group || /\s/.test(cur) ? null
9326
+ : "p"
9327
+ if (group && !first && !type) { type = "s" }
9328
  if (sawType && sawType != type) {
9329
+ if (dir < 0) {dir = 1; moveOnce(); pos.sticky = "after"}
9330
  break
9331
  }
9332
 
9333
+ if (type) { sawType = type }
9334
  if (dir > 0 && !moveOnce(!first)) { break }
9335
  }
9336
  }
9337
+ var result = skipAtomic(doc, pos, oldPos, origDir, true)
9338
+ if (equalCursorPos(oldPos, result)) { result.hitSide = true }
9339
  return result
9340
  }
9341
 
9343
  // "page" or "line". The resulting position will have a hitSide=true
9344
  // property if it reached the end of the document.
9345
  function findPosV(cm, pos, dir, unit) {
9346
+ var doc = cm.doc, x = pos.left, y
9347
  if (unit == "page") {
9348
+ var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight)
9349
+ var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3)
9350
+ y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount
9351
 
9352
  } else if (unit == "line") {
9353
+ y = dir > 0 ? pos.bottom + 3 : pos.top - 3
9354
  }
9355
+ var target
9356
  for (;;) {
9357
+ target = coordsChar(cm, x, y)
9358
  if (!target.outside) { break }
9359
  if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break }
9360
+ y += dir * 5
9361
  }
9362
  return target
9363
  }
9365
  // CONTENTEDITABLE INPUT STYLE
9366
 
9367
  var ContentEditableInput = function(cm) {
9368
+ this.cm = cm
9369
+ this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null
9370
+ this.polling = new Delayed()
9371
+ this.composing = null
9372
+ this.gracePeriod = false
9373
+ this.readDOMTimeout = null
9374
  };
9375
 
9376
  ContentEditableInput.prototype.init = function (display) {
9377
  var this$1 = this;
9378
 
9379
+ var input = this, cm = input.cm
9380
+ var div = input.div = display.lineDiv
9381
+ disableBrowserMagic(div, cm.options.spellcheck)
9382
 
9383
  on(div, "paste", function (e) {
9384
  if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }
9385
  // IE doesn't fire input events, so we schedule a read for the pasted content in this way
9386
+ if (ie_version <= 11) { setTimeout(operation(cm, function () {
9387
+ if (!input.pollContent()) { regChange(cm) }
9388
+ }), 20) }
9389
+ })
9390
 
9391
  on(div, "compositionstart", function (e) {
9392
+ this$1.composing = {data: e.data, done: false}
9393
+ })
9394
  on(div, "compositionupdate", function (e) {
9395
+ if (!this$1.composing) { this$1.composing = {data: e.data, done: false} }
9396
+ })
9397
  on(div, "compositionend", function (e) {
9398
  if (this$1.composing) {
9399
+ if (e.data != this$1.composing.data) { this$1.readFromDOMSoon() }
9400
+ this$1.composing.done = true
9401
  }
9402
+ })
9403
 
9404
+ on(div, "touchstart", function () { return input.forceCompositionEnd(); })
9405
 
9406
  on(div, "input", function () {
9407
+ if (!this$1.composing) { this$1.readFromDOMSoon() }
9408
+ })
9409
 
9410
  function onCopyCut(e) {
9411
  if (signalDOMEvent(cm, e)) { return }
9412
  if (cm.somethingSelected()) {
9413
+ setLastCopied({lineWise: false, text: cm.getSelections()})
9414
+ if (e.type == "cut") { cm.replaceSelection("", null, "cut") }
9415
  } else if (!cm.options.lineWiseCopyCut) {
9416
  return
9417
  } else {
9418
+ var ranges = copyableRanges(cm)
9419
+ setLastCopied({lineWise: true, text: ranges.text})
9420
  if (e.type == "cut") {
9421
  cm.operation(function () {
9422
+ cm.setSelections(ranges.ranges, 0, sel_dontScroll)
9423
+ cm.replaceSelection("", null, "cut")
9424
+ })
9425
  }
9426
  }
9427
  if (e.clipboardData) {
9428
+ e.clipboardData.clearData()
9429
+ var content = lastCopied.text.join("\n")
9430
  // iOS exposes the clipboard API, but seems to discard content inserted into it
9431
+ e.clipboardData.setData("Text", content)
9432
  if (e.clipboardData.getData("Text") == content) {
9433
+ e.preventDefault()
9434
  return
9435
  }
9436
  }
9437
  // Old-fashioned briefly-focus-a-textarea hack
9438
+ var kludge = hiddenTextarea(), te = kludge.firstChild
9439
+ cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild)
9440
+ te.value = lastCopied.text.join("\n")
9441
+ var hadFocus = document.activeElement
9442
+ selectInput(te)
9443
  setTimeout(function () {
9444
+ cm.display.lineSpace.removeChild(kludge)
9445
+ hadFocus.focus()
9446
+ if (hadFocus == div) { input.showPrimarySelection() }
9447
+ }, 50)
9448
  }
9449
+ on(div, "copy", onCopyCut)
9450
+ on(div, "cut", onCopyCut)
9451
  };
9452
 
9453
  ContentEditableInput.prototype.prepareSelection = function () {
9454
+ var result = prepareSelection(this.cm, false)
9455
+ result.focus = this.cm.state.focused
9456
  return result
9457
  };
9458
 
9459
  ContentEditableInput.prototype.showSelection = function (info, takeFocus) {
9460
  if (!info || !this.cm.display.view.length) { return }
9461
+ if (info.focus || takeFocus) { this.showPrimarySelection() }
9462
+ this.showMultipleSelections(info)
9463
  };
9464
 
9465
  ContentEditableInput.prototype.showPrimarySelection = function () {
9466
+ var sel = window.getSelection(), prim = this.cm.doc.sel.primary()
9467
+ var curAnchor = domToPos(this.cm, sel.anchorNode, sel.anchorOffset)
9468
+ var curFocus = domToPos(this.cm, sel.focusNode, sel.focusOffset)
9469
  if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad &&
9470
  cmp(minPos(curAnchor, curFocus), prim.from()) == 0 &&
9471
  cmp(maxPos(curAnchor, curFocus), prim.to()) == 0)
9472
  { return }
9473
 
9474
+ var start = posToDOM(this.cm, prim.from())
9475
+ var end = posToDOM(this.cm, prim.to())
9476
+ if (!start && !end) { return }
 
 
 
9477
 
9478
+ var view = this.cm.display.view
9479
+ var old = sel.rangeCount && sel.getRangeAt(0)
9480
  if (!start) {
9481
+ start = {node: view[0].measure.map[2], offset: 0}
9482
  } else if (!end) { // FIXME dangerously hacky
9483
+ var measure = view[view.length - 1].measure
9484
+ var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map
9485
+ end = {node: map[map.length - 1], offset: map[map.length - 2] - map[map.length - 3]}
9486
  }
9487
 
9488
+ var rng
9489
+ try { rng = range(start.node, start.offset, end.offset, end.node) }
9490
  catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible
9491
  if (rng) {
9492
  if (!gecko && this.cm.state.focused) {
9493
+ sel.collapse(start.node, start.offset)
9494
  if (!rng.collapsed) {
9495
+ sel.removeAllRanges()
9496
+ sel.addRange(rng)
9497
  }
9498
  } else {
9499
+ sel.removeAllRanges()
9500
+ sel.addRange(rng)
9501
  }
9502
+ if (old && sel.anchorNode == null) { sel.addRange(old) }
9503
+ else if (gecko) { this.startGracePeriod() }
9504
  }
9505
+ this.rememberSelection()
9506
  };
9507
 
9508
  ContentEditableInput.prototype.startGracePeriod = function () {
9509
  var this$1 = this;
9510
 
9511
+ clearTimeout(this.gracePeriod)
9512
  this.gracePeriod = setTimeout(function () {
9513
+ this$1.gracePeriod = false
9514
  if (this$1.selectionChanged())
9515
+ { this$1.cm.operation(function () { return this$1.cm.curOp.selectionChanged = true; }) }
9516
+ }, 20)
9517
  };
9518
 
9519
  ContentEditableInput.prototype.showMultipleSelections = function (info) {
9520
+ removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors)
9521
+ removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection)
9522
  };
9523
 
9524
  ContentEditableInput.prototype.rememberSelection = function () {
9525
+ var sel = window.getSelection()
9526
+ this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset
9527
+ this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset
9528
  };
9529
 
9530
  ContentEditableInput.prototype.selectionInEditor = function () {
9531
+ var sel = window.getSelection()
9532
  if (!sel.rangeCount) { return false }
9533
+ var node = sel.getRangeAt(0).commonAncestorContainer
9534
  return contains(this.div, node)
9535
  };
9536
 
9537
  ContentEditableInput.prototype.focus = function () {
9538
  if (this.cm.options.readOnly != "nocursor") {
9539
  if (!this.selectionInEditor())
9540
+ { this.showSelection(this.prepareSelection(), true) }
9541
+ this.div.focus()
9542
  }
9543
  };
9544
+ ContentEditableInput.prototype.blur = function () { this.div.blur() };
9545
  ContentEditableInput.prototype.getField = function () { return this.div };
9546
 
9547
  ContentEditableInput.prototype.supportsTouch = function () { return true };
9548
 
9549
  ContentEditableInput.prototype.receivedFocus = function () {
9550
+ var input = this
9551
  if (this.selectionInEditor())
9552
+ { this.pollSelection() }
9553
  else
9554
+ { runInOp(this.cm, function () { return input.cm.curOp.selectionChanged = true; }) }
9555
 
9556
  function poll() {
9557
  if (input.cm.state.focused) {
9558
+ input.pollSelection()
9559
+ input.polling.set(input.cm.options.pollInterval, poll)
9560
  }
9561
  }
9562
+ this.polling.set(this.cm.options.pollInterval, poll)
9563
  };
9564
 
9565
  ContentEditableInput.prototype.selectionChanged = function () {
9566
+ var sel = window.getSelection()
9567
  return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||
9568
  sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset
9569
  };
9570
 
9571
  ContentEditableInput.prototype.pollSelection = function () {
9572
+ if (!this.composing && this.readDOMTimeout == null && !this.gracePeriod && this.selectionChanged()) {
9573
+ var sel = window.getSelection(), cm = this.cm
9574
+ this.rememberSelection()
9575
+ var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset)
9576
+ var head = domToPos(cm, sel.focusNode, sel.focusOffset)
9577
+ if (anchor && head) { runInOp(cm, function () {
9578
+ setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll)
9579
+ if (anchor.bad || head.bad) { cm.curOp.selectionChanged = true }
9580
+ }) }
 
 
 
 
9581
  }
 
 
 
 
 
 
 
 
9582
  };
9583
 
9584
  ContentEditableInput.prototype.pollContent = function () {
9585
  if (this.readDOMTimeout != null) {
9586
+ clearTimeout(this.readDOMTimeout)
9587
+ this.readDOMTimeout = null
9588
  }
9589
 
9590
+ var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary()
9591
+ var from = sel.from(), to = sel.to()
9592
  if (from.ch == 0 && from.line > cm.firstLine())
9593
+ { from = Pos(from.line - 1, getLine(cm.doc, from.line - 1).length) }
9594
  if (to.ch == getLine(cm.doc, to.line).text.length && to.line < cm.lastLine())
9595
+ { to = Pos(to.line + 1, 0) }
9596
  if (from.line < display.viewFrom || to.line > display.viewTo - 1) { return false }
9597
 
9598
+ var fromIndex, fromLine, fromNode
9599
  if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {
9600
+ fromLine = lineNo(display.view[0].line)
9601
+ fromNode = display.view[0].node
9602
  } else {
9603
+ fromLine = lineNo(display.view[fromIndex].line)
9604
+ fromNode = display.view[fromIndex - 1].node.nextSibling
9605
  }
9606
+ var toIndex = findViewIndex(cm, to.line)
9607
+ var toLine, toNode
9608
  if (toIndex == display.view.length - 1) {
9609
+ toLine = display.viewTo - 1
9610
+ toNode = display.lineDiv.lastChild
9611
  } else {
9612
+ toLine = lineNo(display.view[toIndex + 1].line) - 1
9613
+ toNode = display.view[toIndex + 1].node.previousSibling
9614
  }
9615
 
9616
  if (!fromNode) { return false }
9617
+ var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine))
9618
+ var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length))
9619
  while (newText.length > 1 && oldText.length > 1) {
9620
+ if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine-- }
9621
+ else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++ }
9622
  else { break }
9623
  }
9624
 
9625
+ var cutFront = 0, cutEnd = 0
9626
+ var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length)
9627
  while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront))
9628
+ { ++cutFront }
9629
+ var newBot = lst(newText), oldBot = lst(oldText)
9630
  var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0),
9631
+ oldBot.length - (oldText.length == 1 ? cutFront : 0))
9632
  while (cutEnd < maxCutEnd &&
9633
  newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1))
9634
+ { ++cutEnd }
 
 
 
 
 
 
 
 
9635
 
9636
+ newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd).replace(/^\u200b+/, "")
9637
+ newText[0] = newText[0].slice(cutFront).replace(/\u200b+$/, "")
9638
 
9639
+ var chFrom = Pos(fromLine, cutFront)
9640
+ var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0)
9641
  if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) {
9642
+ replaceRange(cm.doc, newText, chFrom, chTo, "+input")
9643
  return true
9644
  }
9645
  };
9646
 
9647
  ContentEditableInput.prototype.ensurePolled = function () {
9648
+ this.forceCompositionEnd()
9649
  };
9650
  ContentEditableInput.prototype.reset = function () {
9651
+ this.forceCompositionEnd()
9652
  };
9653
  ContentEditableInput.prototype.forceCompositionEnd = function () {
9654
  if (!this.composing) { return }
9655
+ clearTimeout(this.readDOMTimeout)
9656
+ this.composing = null
9657
+ if (!this.pollContent()) { regChange(this.cm) }
9658
+ this.div.blur()
9659
+ this.div.focus()
9660
  };
9661
  ContentEditableInput.prototype.readFromDOMSoon = function () {
9662
  var this$1 = this;
9663
 
9664
  if (this.readDOMTimeout != null) { return }
9665
  this.readDOMTimeout = setTimeout(function () {
9666
+ this$1.readDOMTimeout = null
9667
  if (this$1.composing) {
9668
+ if (this$1.composing.done) { this$1.composing = null }
9669
  else { return }
9670
  }
9671
+ if (this$1.cm.isReadOnly() || !this$1.pollContent())
9672
+ { runInOp(this$1.cm, function () { return regChange(this$1.cm); }) }
9673
+ }, 80)
 
 
 
 
 
 
9674
  };
9675
 
9676
  ContentEditableInput.prototype.setUneditable = function (node) {
9677
+ node.contentEditable = "false"
9678
  };
9679
 
9680
  ContentEditableInput.prototype.onKeyPress = function (e) {
9681
  if (e.charCode == 0) { return }
9682
+ e.preventDefault()
9683
  if (!this.cm.isReadOnly())
9684
+ { operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0) }
9685
  };
9686
 
9687
  ContentEditableInput.prototype.readOnlyChanged = function (val) {
9688
+ this.div.contentEditable = String(val != "nocursor")
9689
  };
9690
 
9691
  ContentEditableInput.prototype.onContextMenu = function () {};
9692
  ContentEditableInput.prototype.resetPosition = function () {};
9693
 
9694
+ ContentEditableInput.prototype.needsContentAttribute = true
9695
 
9696
  function posToDOM(cm, pos) {
9697
+ var view = findViewForLine(cm, pos.line)
9698
  if (!view || view.hidden) { return null }
9699
+ var line = getLine(cm.doc, pos.line)
9700
+ var info = mapFromLineView(view, line, pos.line)
9701
 
9702
+ var order = getOrder(line), side = "left"
9703
  if (order) {
9704
+ var partPos = getBidiPartAt(order, pos.ch)
9705
+ side = partPos % 2 ? "right" : "left"
9706
  }
9707
+ var result = nodeAndOffsetInLineMap(info.map, pos.ch, side)
9708
+ result.offset = result.collapse == "right" ? result.end : result.start
9709
  return result
9710
  }
9711
 
 
 
 
 
 
 
9712
  function badPos(pos, bad) { if (bad) { pos.bad = true; } return pos }
9713
 
9714
  function domTextBetween(cm, from, to, fromLine, toLine) {
9715
+ var text = "", closing = false, lineSep = cm.doc.lineSeparator()
9716
  function recognizeMarker(id) { return function (marker) { return marker.id == id; } }
 
 
 
 
 
 
 
 
 
 
 
 
9717
  function walk(node) {
9718
  if (node.nodeType == 1) {
9719
+ var cmText = node.getAttribute("cm-text")
9720
  if (cmText != null) {
9721
+ if (cmText == "") { text += node.textContent.replace(/\u200b/g, "") }
9722
+ else { text += cmText }
9723
  return
9724
  }
9725
+ var markerID = node.getAttribute("cm-marker"), range
9726
  if (markerID) {
9727
+ var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID))
9728
+ if (found.length && (range = found[0].find()))
9729
+ { text += getBetween(cm.doc, range.from, range.to).join(lineSep) }
9730
  return
9731
  }
9732
  if (node.getAttribute("contenteditable") == "false") { return }
 
 
9733
  for (var i = 0; i < node.childNodes.length; i++)
9734
+ { walk(node.childNodes[i]) }
9735
+ if (/^(pre|div|p)$/i.test(node.nodeName))
9736
+ { closing = true }
9737
  } else if (node.nodeType == 3) {
9738
+ var val = node.nodeValue
9739
+ if (!val) { return }
9740
+ if (closing) {
9741
+ text += lineSep
9742
+ closing = false
9743
+ }
9744
+ text += val
9745
  }
9746
  }
9747
  for (;;) {
9748
+ walk(from)
9749
  if (from == to) { break }
9750
+ from = from.nextSibling
9751
  }
9752
  return text
9753
  }
9754
 
9755
  function domToPos(cm, node, offset) {
9756
+ var lineNode
9757
  if (node == cm.display.lineDiv) {
9758
+ lineNode = cm.display.lineDiv.childNodes[offset]
9759
  if (!lineNode) { return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true) }
9760
+ node = null; offset = 0
9761
  } else {
9762
  for (lineNode = node;; lineNode = lineNode.parentNode) {
9763
  if (!lineNode || lineNode == cm.display.lineDiv) { return null }
9765
  }
9766
  }
9767
  for (var i = 0; i < cm.display.view.length; i++) {
9768
+ var lineView = cm.display.view[i]
9769
  if (lineView.node == lineNode)
9770
  { return locateNodeInLineView(lineView, node, offset) }
9771
  }
9772
  }
9773
 
9774
  function locateNodeInLineView(lineView, node, offset) {
9775
+ var wrapper = lineView.text.firstChild, bad = false
9776
  if (!node || !contains(wrapper, node)) { return badPos(Pos(lineNo(lineView.line), 0), true) }
9777
  if (node == wrapper) {
9778
+ bad = true
9779
+ node = wrapper.childNodes[offset]
9780
+ offset = 0
9781
  if (!node) {
9782
+ var line = lineView.rest ? lst(lineView.rest) : lineView.line
9783
  return badPos(Pos(lineNo(line), line.text.length), bad)
9784
  }
9785
  }
9786
 
9787
+ var textNode = node.nodeType == 3 ? node : null, topNode = node
9788
  if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {
9789
+ textNode = node.firstChild
9790
+ if (offset) { offset = textNode.nodeValue.length }
9791
  }
9792
+ while (topNode.parentNode != wrapper) { topNode = topNode.parentNode }
9793
+ var measure = lineView.measure, maps = measure.maps
9794
 
9795
  function find(textNode, topNode, offset) {
9796
  for (var i = -1; i < (maps ? maps.length : 0); i++) {
9797
+ var map = i < 0 ? measure.map : maps[i]
9798
+ for (var j = 0; j < map.length; j += 3) {
9799
+ var curNode = map[j + 2]
9800
  if (curNode == textNode || curNode == topNode) {
9801
+ var line = lineNo(i < 0 ? lineView.line : lineView.rest[i])
9802
+ var ch = map[j] + offset
9803
+ if (offset < 0 || curNode != textNode) { ch = map[j + (offset ? 1 : 0)] }
9804
  return Pos(line, ch)
9805
  }
9806
  }
9807
  }
9808
  }
9809
+ var found = find(textNode, topNode, offset)
9810
  if (found) { return badPos(found, bad) }
9811
 
9812
  // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems
9813
  for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) {
9814
+ found = find(after, after.firstChild, 0)
9815
  if (found)
9816
  { return badPos(Pos(found.line, found.ch - dist), bad) }
9817
  else
9818
+ { dist += after.textContent.length }
9819
  }
9820
  for (var before = topNode.previousSibling, dist$1 = offset; before; before = before.previousSibling) {
9821
+ found = find(before, before.firstChild, -1)
9822
  if (found)
9823
  { return badPos(Pos(found.line, found.ch + dist$1), bad) }
9824
  else
9825
+ { dist$1 += before.textContent.length }
9826
  }
9827
  }
9828
 
9829
  // TEXTAREA INPUT STYLE
9830
 
9831
  var TextareaInput = function(cm) {
9832
+ this.cm = cm
9833
  // See input.poll and input.reset
9834
+ this.prevInput = ""
9835
 
9836
  // Flag that indicates whether we expect input to appear real soon
9837
  // now (after some event like 'keypress' or 'input') and are
9838
  // polling intensively.
9839
+ this.pollingFast = false
9840
  // Self-resetting timeout for the poller
9841
+ this.polling = new Delayed()
9842
  // Tracks when input.reset has punted to just putting a short
9843
  // string into the textarea instead of the full selection.
9844
+ this.inaccurateSelection = false
9845
  // Used to work around IE issue with selection being forgotten when focus moves away from textarea
9846
+ this.hasSelection = false
9847
+ this.composing = null
9848
  };
9849
 
9850
  TextareaInput.prototype.init = function (display) {
9851
  var this$1 = this;
9852
 
9853
+ var input = this, cm = this.cm
9854
 
9855
  // Wraps and hides input textarea
9856
+ var div = this.wrapper = hiddenTextarea()
9857
  // The semihidden textarea that is focused when the editor is
9858
  // focused, and receives input.
9859
+ var te = this.textarea = div.firstChild
9860
+ display.wrapper.insertBefore(div, display.wrapper.firstChild)
9861
 
9862
  // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)
9863
+ if (ios) { te.style.width = "0px" }
9864
 
9865
  on(te, "input", function () {
9866
+ if (ie && ie_version >= 9 && this$1.hasSelection) { this$1.hasSelection = null }
9867
+ input.poll()
9868
+ })
9869
 
9870
  on(te, "paste", function (e) {
9871
  if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }
9872
 
9873
+ cm.state.pasteIncoming = true
9874
+ input.fastPoll()
9875
+ })
9876
 
9877
  function prepareCopyCut(e) {
9878
  if (signalDOMEvent(cm, e)) { return }
9879
  if (cm.somethingSelected()) {
9880
+ setLastCopied({lineWise: false, text: cm.getSelections()})
9881
  if (input.inaccurateSelection) {
9882
+ input.prevInput = ""
9883
+ input.inaccurateSelection = false
9884
+ te.value = lastCopied.text.join("\n")
9885
+ selectInput(te)
9886
  }
9887
  } else if (!cm.options.lineWiseCopyCut) {
9888
  return
9889
  } else {
9890
+ var ranges = copyableRanges(cm)
9891
+ setLastCopied({lineWise: true, text: ranges.text})
9892
  if (e.type == "cut") {
9893
+ cm.setSelections(ranges.ranges, null, sel_dontScroll)
9894
  } else {
9895
+ input.prevInput = ""
9896
+ te.value = ranges.text.join("\n")
9897
+ selectInput(te)
9898
  }
9899
  }
9900
+ if (e.type == "cut") { cm.state.cutIncoming = true }
9901
  }
9902
+ on(te, "cut", prepareCopyCut)
9903
+ on(te, "copy", prepareCopyCut)
9904
 
9905
  on(display.scroller, "paste", function (e) {
9906
  if (eventInWidget(display, e) || signalDOMEvent(cm, e)) { return }
9907
+ cm.state.pasteIncoming = true
9908
+ input.focus()
9909
+ })
9910
 
9911
  // Prevent normal selection in the editor (we handle our own)
9912
  on(display.lineSpace, "selectstart", function (e) {
9913
+ if (!eventInWidget(display, e)) { e_preventDefault(e) }
9914
+ })
9915
 
9916
  on(te, "compositionstart", function () {
9917
+ var start = cm.getCursor("from")
9918
+ if (input.composing) { input.composing.range.clear() }
9919
  input.composing = {
9920
  start: start,
9921
  range: cm.markText(start, cm.getCursor("to"), {className: "CodeMirror-composing"})
9922
+ }
9923
+ })
9924
  on(te, "compositionend", function () {
9925
  if (input.composing) {
9926
+ input.poll()
9927
+ input.composing.range.clear()
9928
+ input.composing = null
9929
  }
9930
+ })
9931
  };
9932
 
9933
  TextareaInput.prototype.prepareSelection = function () {
9934
  // Redraw the selection and/or cursor
9935
+ var cm = this.cm, display = cm.display, doc = cm.doc
9936
+ var result = prepareSelection(cm)
9937
 
9938
  // Move the hidden textarea near the cursor to prevent scrolling artifacts
9939
  if (cm.options.moveInputWithCursor) {
9940
+ var headPos = cursorCoords(cm, doc.sel.primary().head, "div")
9941
+ var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect()
9942
  result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,
9943
+ headPos.top + lineOff.top - wrapOff.top))
9944
  result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,
9945
+ headPos.left + lineOff.left - wrapOff.left))
9946
  }
9947
 
9948
  return result
9949
  };
9950
 
9951
  TextareaInput.prototype.showSelection = function (drawn) {
9952
+ var cm = this.cm, display = cm.display
9953
+ removeChildrenAndAdd(display.cursorDiv, drawn.cursors)
9954
+ removeChildrenAndAdd(display.selectionDiv, drawn.selection)
9955
  if (drawn.teTop != null) {
9956
+ this.wrapper.style.top = drawn.teTop + "px"
9957
+ this.wrapper.style.left = drawn.teLeft + "px"
9958
  }
9959
  };
9960
 
9962
  // when not typing and nothing is selected)
9963
  TextareaInput.prototype.reset = function (typing) {
9964
  if (this.contextMenuPending) { return }
9965
+ var minimal, selected, cm = this.cm, doc = cm.doc
9966
  if (cm.somethingSelected()) {
9967
+ this.prevInput = ""
9968
+ var range = doc.sel.primary()
9969
  minimal = hasCopyEvent &&
9970
+ (range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000)
9971
+ var content = minimal ? "-" : selected || cm.getSelection()
9972
+ this.textarea.value = content
9973
+ if (cm.state.focused) { selectInput(this.textarea) }
9974
+ if (ie && ie_version >= 9) { this.hasSelection = content }
9975
  } else if (!typing) {
9976
+ this.prevInput = this.textarea.value = ""
9977
+ if (ie && ie_version >= 9) { this.hasSelection = null }
9978
  }
9979
+ this.inaccurateSelection = minimal
9980
  };
9981
 
9982
  TextareaInput.prototype.getField = function () { return this.textarea };
9985
 
9986
  TextareaInput.prototype.focus = function () {
9987
  if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt() != this.textarea)) {
9988
+ try { this.textarea.focus() }
9989
  catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM
9990
  }
9991
  };
9992
 
9993
+ TextareaInput.prototype.blur = function () { this.textarea.blur() };
9994
 
9995
  TextareaInput.prototype.resetPosition = function () {
9996
+ this.wrapper.style.top = this.wrapper.style.left = 0
9997
  };
9998
 
9999
+ TextareaInput.prototype.receivedFocus = function () { this.slowPoll() };
10000
 
10001
  // Poll for input changes, using the normal rate of polling. This
10002
  // runs as long as the editor is focused.
10005
 
10006
  if (this.pollingFast) { return }
10007
  this.polling.set(this.cm.options.pollInterval, function () {
10008
+ this$1.poll()
10009
+ if (this$1.cm.state.focused) { this$1.slowPoll() }
10010
+ })
10011
  };
10012
 
10013
  // When an event has just come in that is likely to add or change
10014
  // something in the input textarea, we poll faster, to ensure that
10015
  // the change appears on the screen quickly.
10016
  TextareaInput.prototype.fastPoll = function () {
10017
+ var missed = false, input = this
10018
+ input.pollingFast = true
10019
  function p() {
10020
+ var changed = input.poll()
10021
+ if (!changed && !missed) {missed = true; input.polling.set(60, p)}
10022
+ else {input.pollingFast = false; input.slowPoll()}
10023
  }
10024
+ input.polling.set(20, p)
10025
  };
10026
 
10027
  // Read input from the textarea, and update the document to match.
10033
  TextareaInput.prototype.poll = function () {
10034
  var this$1 = this;
10035
 
10036
+ var cm = this.cm, input = this.textarea, prevInput = this.prevInput
10037
  // Since this is called a *lot*, try to bail out as cheaply as
10038
  // possible when it is clear that nothing happened. hasSelection
10039
  // will be the case when there is a lot of text in the textarea,
10043
  cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq)
10044
  { return false }
10045
 
10046
+ var text = input.value
10047
  // If nothing changed, bail.
10048
  if (text == prevInput && !cm.somethingSelected()) { return false }
10049
  // Work around nonsensical selection resetting in IE9/10, and
10051
  // some key combos in Mac (#2689).
10052
  if (ie && ie_version >= 9 && this.hasSelection === text ||
10053
  mac && /[\uf700-\uf7ff]/.test(text)) {
10054
+ cm.display.input.reset()
10055
  return false
10056
  }
10057
 
10058
  if (cm.doc.sel == cm.display.selForContextMenu) {
10059
+ var first = text.charCodeAt(0)
10060
+ if (first == 0x200b && !prevInput) { prevInput = "\u200b" }
10061
  if (first == 0x21da) { this.reset(); return this.cm.execCommand("undo") }
10062
  }
10063
  // Find the part of the input that is actually new
10064
+ var same = 0, l = Math.min(prevInput.length, text.length)
10065
+ while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) { ++same }
10066
 
10067
  runInOp(cm, function () {
10068
  applyTextInput(cm, text.slice(same), prevInput.length - same,
10069
+ null, this$1.composing ? "*compose" : null)
10070
 
10071
  // Don't leave long text in the textarea, since it makes further polling slow
10072
+ if (text.length > 1000 || text.indexOf("\n") > -1) { input.value = this$1.prevInput = "" }
10073
+ else { this$1.prevInput = text }
10074
 
10075
  if (this$1.composing) {
10076
+ this$1.composing.range.clear()
10077
  this$1.composing.range = cm.markText(this$1.composing.start, cm.getCursor("to"),
10078
+ {className: "CodeMirror-composing"})
10079
  }
10080
+ })
10081
  return true
10082
  };
10083
 
10084
  TextareaInput.prototype.ensurePolled = function () {
10085
+ if (this.pollingFast && this.poll()) { this.pollingFast = false }
10086
  };
10087
 
10088
  TextareaInput.prototype.onKeyPress = function () {
10089
+ if (ie && ie_version >= 9) { this.hasSelection = null }
10090
+ this.fastPoll()
10091
  };
10092
 
10093
  TextareaInput.prototype.onContextMenu = function (e) {
10094
+ var input = this, cm = input.cm, display = cm.display, te = input.textarea
10095
+ var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop
10096
  if (!pos || presto) { return } // Opera is difficult.
10097
 
10098
  // Reset the current text selection only if the click is done outside of the selection
10099
  // and 'resetSelectionOnContextMenu' option is true.
10100
+ var reset = cm.options.resetSelectionOnContextMenu
10101
  if (reset && cm.doc.sel.contains(pos) == -1)
10102
+ { operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll) }
10103
+
10104
+ var oldCSS = te.style.cssText, oldWrapperCSS = input.wrapper.style.cssText
10105
+ input.wrapper.style.cssText = "position: absolute"
10106
+ var wrapperBox = input.wrapper.getBoundingClientRect()
10107
+ te.style.cssText = "position: absolute; width: 30px; height: 30px;\n top: " + (e.clientY - wrapperBox.top - 5) + "px; left: " + (e.clientX - wrapperBox.left - 5) + "px;\n z-index: 1000; background: " + (ie ? "rgba(255, 255, 255, .05)" : "transparent") + ";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);"
10108
+ var oldScrollY
10109
+ if (webkit) { oldScrollY = window.scrollY } // Work around Chrome issue (#2712)
10110
+ display.input.focus()
10111
+ if (webkit) { window.scrollTo(null, oldScrollY) }
10112
+ display.input.reset()
10113
  // Adds "Select all" to context menu in FF
10114
+ if (!cm.somethingSelected()) { te.value = input.prevInput = " " }
10115
+ input.contextMenuPending = true
10116
+ display.selForContextMenu = cm.doc.sel
10117
+ clearTimeout(display.detectingSelectAll)
10118
 
10119
  // Select-all will be greyed out if there's nothing to select, so
10120
  // this adds a zero-width space so that we can later check whether
10121
  // it got selected.
10122
  function prepareSelectAllHack() {
10123
  if (te.selectionStart != null) {
10124
+ var selected = cm.somethingSelected()
10125
+ var extval = "\u200b" + (selected ? te.value : "")
10126
+ te.value = "\u21da" // Used to catch context-menu undo
10127
+ te.value = extval
10128
+ input.prevInput = selected ? "" : "\u200b"
10129
+ te.selectionStart = 1; te.selectionEnd = extval.length
10130
  // Re-set this, in case some other handler touched the
10131
  // selection in the meantime.
10132
+ display.selForContextMenu = cm.doc.sel
10133
  }
10134
  }
10135
  function rehide() {
10136
+ input.contextMenuPending = false
10137
+ input.wrapper.style.cssText = oldWrapperCSS
10138
+ te.style.cssText = oldCSS
10139
+ if (ie && ie_version < 9) { display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos) }
10140
 
10141
  // Try to detect the user choosing select-all
10142
  if (te.selectionStart != null) {
10143
+ if (!ie || (ie && ie_version < 9)) { prepareSelectAllHack() }
10144
  var i = 0, poll = function () {
10145
  if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 &&
10146
  te.selectionEnd > 0 && input.prevInput == "\u200b") {
10147
+ operation(cm, selectAll)(cm)
10148
  } else if (i++ < 10) {
10149
+ display.detectingSelectAll = setTimeout(poll, 500)
10150
  } else {
10151
+ display.selForContextMenu = null
10152
+ display.input.reset()
10153
  }
10154
+ }
10155
+ display.detectingSelectAll = setTimeout(poll, 200)
10156
  }
10157
  }
10158
 
10159
+ if (ie && ie_version >= 9) { prepareSelectAllHack() }
10160
  if (captureRightClick) {
10161
+ e_stop(e)
10162
  var mouseup = function () {
10163
+ off(window, "mouseup", mouseup)
10164
+ setTimeout(rehide, 20)
10165
+ }
10166
+ on(window, "mouseup", mouseup)
10167
  } else {
10168
+ setTimeout(rehide, 50)
10169
  }
10170
  };
10171
 
10172
  TextareaInput.prototype.readOnlyChanged = function (val) {
10173
+ if (!val) { this.reset() }
10174
  };
10175
 
10176
  TextareaInput.prototype.setUneditable = function () {};
10177
 
10178
+ TextareaInput.prototype.needsContentAttribute = false
10179
 
10180
  function fromTextArea(textarea, options) {
10181
+ options = options ? copyObj(options) : {}
10182
+ options.value = textarea.value
10183
  if (!options.tabindex && textarea.tabIndex)
10184
+ { options.tabindex = textarea.tabIndex }
10185
  if (!options.placeholder && textarea.placeholder)
10186
+ { options.placeholder = textarea.placeholder }
10187
  // Set autofocus to true if this textarea is focused, or if it has
10188
  // autofocus and no other element is focused.
10189
  if (options.autofocus == null) {
10190
+ var hasFocus = activeElt()
10191
  options.autofocus = hasFocus == textarea ||
10192
+ textarea.getAttribute("autofocus") != null && hasFocus == document.body
10193
  }
10194
 
10195
+ function save() {textarea.value = cm.getValue()}
10196
 
10197
+ var realSubmit
10198
  if (textarea.form) {
10199
+ on(textarea.form, "submit", save)
10200
  // Deplorable hack to make the submit method do the right thing.
10201
  if (!options.leaveSubmitMethodAlone) {
10202
+ var form = textarea.form
10203
+ realSubmit = form.submit
10204
  try {
10205
  var wrappedSubmit = form.submit = function () {
10206
+ save()
10207
+ form.submit = realSubmit
10208
+ form.submit()
10209
+ form.submit = wrappedSubmit
10210
+ }
10211
  } catch(e) {}
10212
  }
10213
  }
10214
 
10215
  options.finishInit = function (cm) {
10216
+ cm.save = save
10217
+ cm.getTextArea = function () { return textarea; }
10218
  cm.toTextArea = function () {
10219
+ cm.toTextArea = isNaN // Prevent this from being ran twice
10220
+ save()
10221
+ textarea.parentNode.removeChild(cm.getWrapperElement())
10222
+ textarea.style.display = ""
10223
  if (textarea.form) {
10224
+ off(textarea.form, "submit", save)
10225
  if (typeof textarea.form.submit == "function")
10226
+ { textarea.form.submit = realSubmit }
10227
  }
10228
+ }
10229
+ }
10230
 
10231
+ textarea.style.display = "none"
10232
+ var cm = CodeMirror(function (node) { return textarea.parentNode.insertBefore(node, textarea.nextSibling); },
10233
+ options)
10234
  return cm
10235
  }
10236
 
10237
  function addLegacyProps(CodeMirror) {
10238
+ CodeMirror.off = off
10239
+ CodeMirror.on = on
10240
+ CodeMirror.wheelEventPixels = wheelEventPixels
10241
+ CodeMirror.Doc = Doc
10242
+ CodeMirror.splitLines = splitLinesAuto
10243
+ CodeMirror.countColumn = countColumn
10244
+ CodeMirror.findColumn = findColumn
10245
+ CodeMirror.isWordChar = isWordCharBasic
10246
+ CodeMirror.Pass = Pass
10247
+ CodeMirror.signal = signal
10248
+ CodeMirror.Line = Line
10249
+ CodeMirror.changeEnd = changeEnd
10250
+ CodeMirror.scrollbarModel = scrollbarModel
10251
+ CodeMirror.Pos = Pos
10252
+ CodeMirror.cmpPos = cmp
10253
+ CodeMirror.modes = modes
10254
+ CodeMirror.mimeModes = mimeModes
10255
+ CodeMirror.resolveMode = resolveMode
10256
+ CodeMirror.getMode = getMode
10257
+ CodeMirror.modeExtensions = modeExtensions
10258
+ CodeMirror.extendMode = extendMode
10259
+ CodeMirror.copyState = copyState
10260
+ CodeMirror.startState = startState
10261
+ CodeMirror.innerMode = innerMode
10262
+ CodeMirror.commands = commands
10263
+ CodeMirror.keyMap = keyMap
10264
+ CodeMirror.keyName = keyName
10265
+ CodeMirror.isModifierKey = isModifierKey
10266
+ CodeMirror.lookupKey = lookupKey
10267
+ CodeMirror.normalizeKeyMap = normalizeKeyMap
10268
+ CodeMirror.StringStream = StringStream
10269
+ CodeMirror.SharedTextMarker = SharedTextMarker
10270
+ CodeMirror.TextMarker = TextMarker
10271
+ CodeMirror.LineWidget = LineWidget
10272
+ CodeMirror.e_preventDefault = e_preventDefault
10273
+ CodeMirror.e_stopPropagation = e_stopPropagation
10274
+ CodeMirror.e_stop = e_stop
10275
+ CodeMirror.addClass = addClass
10276
+ CodeMirror.contains = contains
10277
+ CodeMirror.rmClass = rmClass
10278
+ CodeMirror.keyNames = keyNames
10279
  }
10280
 
10281
  // EDITOR CONSTRUCTOR
10282
 
10283
+ defineOptions(CodeMirror)
10284
 
10285
+ addEditorMethods(CodeMirror)
10286
 
10287
  // Set up methods on CodeMirror's prototype to redirect to the editor's document.
10288
+ var dontDelegate = "iter insert remove copy getEditor constructor".split(" ")
10289
  for (var prop in Doc.prototype) { if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)
10290
+ { CodeMirror.prototype[prop] = (function(method) {
10291
  return function() {return method.apply(this.doc, arguments)}
10292
+ })(Doc.prototype[prop]) } }
10293
 
10294
+ eventMixin(Doc)
10295
 
10296
  // INPUT HANDLING
10297
 
10298
+ CodeMirror.inputStyles = {"textarea": TextareaInput, "contenteditable": ContentEditableInput}
10299
 
10300
  // MODE DEFINITION AND QUERYING
10301
 
10302
  // Extra arguments are stored as the mode's dependencies, which is
10303
  // used by (legacy) mechanisms like loadmode.js to automatically
10304
  // load a mode. (Preferred mechanism is the require/define calls.)
10305
+ CodeMirror.defineMode = function(name/*, mode, …*/) {
10306
+ if (!CodeMirror.defaults.mode && name != "null") { CodeMirror.defaults.mode = name }
10307
+ defineMode.apply(this, arguments)
10308
+ }
10309
 
10310
+ CodeMirror.defineMIME = defineMIME
10311
 
10312
  // Minimal default mode.
10313
+ CodeMirror.defineMode("null", function () { return ({token: function (stream) { return stream.skipToEnd(); }}); })
10314
+ CodeMirror.defineMIME("text/plain", "null")
10315
 
10316
  // EXTENSIONS
10317
 
10318
+ CodeMirror.defineExtension = function (name, func) {
10319
+ CodeMirror.prototype[name] = func
10320
+ }
10321
+ CodeMirror.defineDocExtension = function (name, func) {
10322
+ Doc.prototype[name] = func
10323
+ }
10324
 
10325
+ CodeMirror.fromTextArea = fromTextArea
10326
 
10327
+ addLegacyProps(CodeMirror)
10328
 
10329
+ CodeMirror.version = "5.24.2"
10330
 
10331
+ return CodeMirror;
10332
 
10333
  })));
10334
 
 
10335
  /***/ },
10336
 
10337
+ /***/ 447:
10338
  /***/ function(module, exports, __webpack_require__) {
10339
 
10340
  // CodeMirror, copyright (c) by Marijn Haverbeke and others
10342
 
10343
  (function(mod) {
10344
  if (true) // CommonJS
10345
+ mod(__webpack_require__(445));
10346
  else if (typeof define == "function" && define.amd) // AMD
10347
  define(["../../lib/codemirror"], mod);
10348
  else // Plain browser env
11006
  "small", "small-caps", "small-caption", "smaller", "soft-light", "solid", "somali",
11007
  "source-atop", "source-in", "source-out", "source-over", "space", "space-around", "space-between", "spell-out", "square",
11008
  "square-button", "start", "static", "status-bar", "stretch", "stroke", "sub",
11009
+ "subpixel-antialiased", "super", "sw-resize", "symbolic", "symbols", "table",
11010
  "table-caption", "table-cell", "table-column", "table-column-group",
11011
  "table-footer-group", "table-header-group", "table-row", "table-row-group",
11012
  "tamil",
assets/js/mailpoet.js CHANGED
@@ -3,13 +3,13 @@ webpackJsonp([3],[
3
  /***/ function(module, exports, __webpack_require__) {
4
 
5
  __webpack_require__(268);
6
- __webpack_require__(455);
7
- __webpack_require__(456);
8
- __webpack_require__(457);
9
- __webpack_require__(458);
10
- __webpack_require__(459);
11
- __webpack_require__(460);
12
- module.exports = __webpack_require__(461);
13
 
14
 
15
  /***/ },
@@ -1884,7 +1884,7 @@ webpackJsonp([3],[
1884
  /***/ function(module, exports, __webpack_require__) {
1885
 
1886
  /* WEBPACK VAR INJECTION */(function(module) {//! moment.js
1887
- //! version : 2.18.1
1888
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
1889
  //! license : MIT
1890
  //! momentjs.com
@@ -1926,10 +1926,6 @@ webpackJsonp([3],[
1926
  return true;
1927
  }
1928
 
1929
- function isUndefined(input) {
1930
- return input === void 0;
1931
- }
1932
-
1933
  function isNumber(input) {
1934
  return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';
1935
  }
@@ -1986,9 +1982,7 @@ webpackJsonp([3],[
1986
  userInvalidated : false,
1987
  iso : false,
1988
  parsedDateParts : [],
1989
- meridiem : null,
1990
- rfc2822 : false,
1991
- weekdayMismatch : false
1992
  };
1993
  }
1994
 
@@ -2064,6 +2058,10 @@ webpackJsonp([3],[
2064
  return m;
2065
  }
2066
 
 
 
 
 
2067
  // Plugins that add properties should also add the key here (null value),
2068
  // so we can properly clone ourselves.
2069
  var momentProperties = hooks.momentProperties = [];
@@ -2103,7 +2101,7 @@ webpackJsonp([3],[
2103
  }
2104
 
2105
  if (momentProperties.length > 0) {
2106
- for (i = 0; i < momentProperties.length; i++) {
2107
  prop = momentProperties[i];
2108
  val = from[prop];
2109
  if (!isUndefined(val)) {
@@ -2240,11 +2238,8 @@ webpackJsonp([3],[
2240
  }
2241
  this._config = config;
2242
  // Lenient ordinal parsing accepts just a number in addition to
2243
- // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
2244
- // TODO: Remove "ordinalParse" fallback in next major release.
2245
- this._dayOfMonthOrdinalParseLenient = new RegExp(
2246
- (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
2247
- '|' + (/\d{1,2}/).source);
2248
  }
2249
 
2250
  function mergeConfigs(parentConfig, childConfig) {
@@ -2342,7 +2337,7 @@ webpackJsonp([3],[
2342
  }
2343
 
2344
  var defaultOrdinal = '%d';
2345
- var defaultDayOfMonthOrdinalParse = /\d{1,2}/;
2346
 
2347
  function ordinal (number) {
2348
  return this._ordinal.replace('%d', number);
@@ -2352,7 +2347,6 @@ webpackJsonp([3],[
2352
  future : 'in %s',
2353
  past : '%s ago',
2354
  s : 'a few seconds',
2355
- ss : '%d seconds',
2356
  m : 'a minute',
2357
  mm : '%d minutes',
2358
  h : 'an hour',
@@ -2535,7 +2529,7 @@ webpackJsonp([3],[
2535
  return function (mom) {
2536
  var output = '', i;
2537
  for (i = 0; i < length; i++) {
2538
- output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];
2539
  }
2540
  return output;
2541
  };
@@ -2738,8 +2732,7 @@ webpackJsonp([3],[
2738
  var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
2739
  function localeMonths (m, format) {
2740
  if (!m) {
2741
- return isArray(this._months) ? this._months :
2742
- this._months['standalone'];
2743
  }
2744
  return isArray(this._months) ? this._months[m.month()] :
2745
  this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];
@@ -2748,8 +2741,7 @@ webpackJsonp([3],[
2748
  var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
2749
  function localeMonthsShort (m, format) {
2750
  if (!m) {
2751
- return isArray(this._monthsShort) ? this._monthsShort :
2752
- this._monthsShort['standalone'];
2753
  }
2754
  return isArray(this._monthsShort) ? this._monthsShort[m.month()] :
2755
  this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
@@ -3016,11 +3008,11 @@ webpackJsonp([3],[
3016
  }
3017
 
3018
  function createDate (y, m, d, h, M, s, ms) {
3019
- // can't just apply() to create a date:
3020
- // https://stackoverflow.com/q/181348
3021
  var date = new Date(y, m, d, h, M, s, ms);
3022
 
3023
- // the date constructor remaps years 0-99 to 1900-1999
3024
  if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
3025
  date.setFullYear(y);
3026
  }
@@ -3030,7 +3022,7 @@ webpackJsonp([3],[
3030
  function createUTCDate (y) {
3031
  var date = new Date(Date.UTC.apply(null, arguments));
3032
 
3033
- // the Date.UTC function remaps years 0-99 to 1900-1999
3034
  if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
3035
  date.setUTCFullYear(y);
3036
  }
@@ -3047,7 +3039,7 @@ webpackJsonp([3],[
3047
  return -fwdlw + fwd - 1;
3048
  }
3049
 
3050
- // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
3051
  function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
3052
  var localWeekday = (7 + weekday - dow) % 7,
3053
  weekOffset = firstWeekOffset(year, dow, doy),
@@ -3248,8 +3240,7 @@ webpackJsonp([3],[
3248
  var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
3249
  function localeWeekdays (m, format) {
3250
  if (!m) {
3251
- return isArray(this._weekdays) ? this._weekdays :
3252
- this._weekdays['standalone'];
3253
  }
3254
  return isArray(this._weekdays) ? this._weekdays[m.day()] :
3255
  this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];
@@ -3569,10 +3560,8 @@ webpackJsonp([3],[
3569
  addRegexToken('A', matchMeridiem);
3570
  addRegexToken('H', match1to2);
3571
  addRegexToken('h', match1to2);
3572
- addRegexToken('k', match1to2);
3573
  addRegexToken('HH', match1to2, match2);
3574
  addRegexToken('hh', match1to2, match2);
3575
- addRegexToken('kk', match1to2, match2);
3576
 
3577
  addRegexToken('hmm', match3to4);
3578
  addRegexToken('hmmss', match5to6);
@@ -3580,10 +3569,6 @@ webpackJsonp([3],[
3580
  addRegexToken('Hmmss', match5to6);
3581
 
3582
  addParseToken(['H', 'HH'], HOUR);
3583
- addParseToken(['k', 'kk'], function (input, array, config) {
3584
- var kInput = toInt(input);
3585
- array[HOUR] = kInput === 24 ? 0 : kInput;
3586
- });
3587
  addParseToken(['a', 'A'], function (input, array, config) {
3588
  config._isPm = config._locale.isPM(input);
3589
  config._meridiem = input;
@@ -3654,7 +3639,7 @@ webpackJsonp([3],[
3654
  longDateFormat: defaultLongDateFormat,
3655
  invalidDate: defaultInvalidDate,
3656
  ordinal: defaultOrdinal,
3657
- dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
3658
  relativeTime: defaultRelativeTime,
3659
 
3660
  months: defaultLocaleMonths,
@@ -3965,77 +3950,6 @@ webpackJsonp([3],[
3965
  }
3966
  }
3967
 
3968
- // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
3969
- var basicRfcRegex = /^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d?\d\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(?:\d\d)?\d\d\s)(\d\d:\d\d)(\:\d\d)?(\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\d{4}))$/;
3970
-
3971
- // date and time from ref 2822 format
3972
- function configFromRFC2822(config) {
3973
- var string, match, dayFormat,
3974
- dateFormat, timeFormat, tzFormat;
3975
- var timezones = {
3976
- ' GMT': ' +0000',
3977
- ' EDT': ' -0400',
3978
- ' EST': ' -0500',
3979
- ' CDT': ' -0500',
3980
- ' CST': ' -0600',
3981
- ' MDT': ' -0600',
3982
- ' MST': ' -0700',
3983
- ' PDT': ' -0700',
3984
- ' PST': ' -0800'
3985
- };
3986
- var military = 'YXWVUTSRQPONZABCDEFGHIKLM';
3987
- var timezone, timezoneIndex;
3988
-
3989
- string = config._i
3990
- .replace(/\([^\)]*\)|[\n\t]/g, ' ') // Remove comments and folding whitespace
3991
- .replace(/(\s\s+)/g, ' ') // Replace multiple-spaces with a single space
3992
- .replace(/^\s|\s$/g, ''); // Remove leading and trailing spaces
3993
- match = basicRfcRegex.exec(string);
3994
-
3995
- if (match) {
3996
- dayFormat = match[1] ? 'ddd' + ((match[1].length === 5) ? ', ' : ' ') : '';
3997
- dateFormat = 'D MMM ' + ((match[2].length > 10) ? 'YYYY ' : 'YY ');
3998
- timeFormat = 'HH:mm' + (match[4] ? ':ss' : '');
3999
-
4000
- // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.
4001
- if (match[1]) { // day of week given
4002
- var momentDate = new Date(match[2]);
4003
- var momentDay = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'][momentDate.getDay()];
4004
-
4005
- if (match[1].substr(0,3) !== momentDay) {
4006
- getParsingFlags(config).weekdayMismatch = true;
4007
- config._isValid = false;
4008
- return;
4009
- }
4010
- }
4011
-
4012
- switch (match[5].length) {
4013
- case 2: // military
4014
- if (timezoneIndex === 0) {
4015
- timezone = ' +0000';
4016
- } else {
4017
- timezoneIndex = military.indexOf(match[5][1].toUpperCase()) - 12;
4018
- timezone = ((timezoneIndex < 0) ? ' -' : ' +') +
4019
- (('' + timezoneIndex).replace(/^-?/, '0')).match(/..$/)[0] + '00';
4020
- }
4021
- break;
4022
- case 4: // Zone
4023
- timezone = timezones[match[5]];
4024
- break;
4025
- default: // UT or +/-9999
4026
- timezone = timezones[' GMT'];
4027
- }
4028
- match[5] = timezone;
4029
- config._i = match.splice(1).join('');
4030
- tzFormat = ' ZZ';
4031
- config._f = dayFormat + dateFormat + timeFormat + tzFormat;
4032
- configFromStringAndFormat(config);
4033
- getParsingFlags(config).rfc2822 = true;
4034
- } else {
4035
- config._isValid = false;
4036
- }
4037
- }
4038
-
4039
  // date from iso format or fallback
4040
  function configFromString(config) {
4041
  var matched = aspNetJsonRegex.exec(config._i);
@@ -4048,24 +3962,13 @@ webpackJsonp([3],[
4048
  configFromISO(config);
4049
  if (config._isValid === false) {
4050
  delete config._isValid;
4051
- } else {
4052
- return;
4053
- }
4054
-
4055
- configFromRFC2822(config);
4056
- if (config._isValid === false) {
4057
- delete config._isValid;
4058
- } else {
4059
- return;
4060
  }
4061
-
4062
- // Final attempt, use Input Fallback
4063
- hooks.createFromInputFallback(config);
4064
  }
4065
 
4066
  hooks.createFromInputFallback = deprecate(
4067
- 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
4068
- 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
4069
  'discouraged and will be removed in an upcoming major release. Please refer to ' +
4070
  'http://momentjs.com/guides/#/warnings/js-date/ for more info.',
4071
  function (config) {
@@ -4112,10 +4015,10 @@ webpackJsonp([3],[
4112
  }
4113
 
4114
  //if the day of the year is set, figure out what it is
4115
- if (config._dayOfYear != null) {
4116
  yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
4117
 
4118
- if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {
4119
  getParsingFlags(config)._overflowDayOfYear = true;
4120
  }
4121
 
@@ -4219,9 +4122,6 @@ webpackJsonp([3],[
4219
  // constant that refers to the ISO standard
4220
  hooks.ISO_8601 = function () {};
4221
 
4222
- // constant that refers to the RFC 2822 form
4223
- hooks.RFC_2822 = function () {};
4224
-
4225
  // date from string and format string
4226
  function configFromStringAndFormat(config) {
4227
  // TODO: Move this to another part of the creation flow to prevent circular deps
@@ -4229,10 +4129,7 @@ webpackJsonp([3],[
4229
  configFromISO(config);
4230
  return;
4231
  }
4232
- if (config._f === hooks.RFC_2822) {
4233
- configFromRFC2822(config);
4234
- return;
4235
- }
4236
  config._a = [];
4237
  getParsingFlags(config).empty = true;
4238
 
@@ -4424,7 +4321,7 @@ webpackJsonp([3],[
4424
 
4425
  function configFromInput(config) {
4426
  var input = config._i;
4427
- if (isUndefined(input)) {
4428
  config._d = new Date(hooks.now());
4429
  } else if (isDate(input)) {
4430
  config._d = new Date(input.valueOf());
@@ -4435,7 +4332,7 @@ webpackJsonp([3],[
4435
  return parseInt(obj, 10);
4436
  });
4437
  configFromArray(config);
4438
- } else if (isObject(input)) {
4439
  configFromObject(config);
4440
  } else if (isNumber(input)) {
4441
  // from milliseconds
@@ -4536,38 +4433,6 @@ webpackJsonp([3],[
4536
  return Date.now ? Date.now() : +(new Date());
4537
  };
4538
 
4539
- var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];
4540
-
4541
- function isDurationValid(m) {
4542
- for (var key in m) {
4543
- if (!(ordering.indexOf(key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
4544
- return false;
4545
- }
4546
- }
4547
-
4548
- var unitHasDecimal = false;
4549
- for (var i = 0; i < ordering.length; ++i) {
4550
- if (m[ordering[i]]) {
4551
- if (unitHasDecimal) {
4552
- return false; // only allow non-integers for smallest unit
4553
- }
4554
- if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
4555
- unitHasDecimal = true;
4556
- }
4557
- }
4558
- }
4559
-
4560
- return true;
4561
- }
4562
-
4563
- function isValid$1() {
4564
- return this._isValid;
4565
- }
4566
-
4567
- function createInvalid$1() {
4568
- return createDuration(NaN);
4569
- }
4570
-
4571
  function Duration (duration) {
4572
  var normalizedInput = normalizeObjectUnits(duration),
4573
  years = normalizedInput.year || 0,
@@ -4580,8 +4445,6 @@ webpackJsonp([3],[
4580
  seconds = normalizedInput.second || 0,
4581
  milliseconds = normalizedInput.millisecond || 0;
4582
 
4583
- this._isValid = isDurationValid(normalizedInput);
4584
-
4585
  // representation for dateAddRemove
4586
  this._milliseconds = +milliseconds +
4587
  seconds * 1e3 + // 1000
@@ -4705,7 +4568,7 @@ webpackJsonp([3],[
4705
  // a second time. In case it wants us to change the offset again
4706
  // _changeInProgress == true case, then we have to adjust, because
4707
  // there is no such time in the given timezone.
4708
- function getSetOffset (input, keepLocalTime, keepMinutes) {
4709
  var offset = this._offset || 0,
4710
  localAdjust;
4711
  if (!this.isValid()) {
@@ -4717,7 +4580,7 @@ webpackJsonp([3],[
4717
  if (input === null) {
4718
  return this;
4719
  }
4720
- } else if (Math.abs(input) < 16 && !keepMinutes) {
4721
  input = input * 60;
4722
  }
4723
  if (!this._isUTC && keepLocalTime) {
@@ -4775,7 +4638,7 @@ webpackJsonp([3],[
4775
 
4776
  function setOffsetToParsedOffset () {
4777
  if (this._tzm != null) {
4778
- this.utcOffset(this._tzm, false, true);
4779
  } else if (typeof this._i === 'string') {
4780
  var tZone = offsetFromString(matchOffset, this._i);
4781
  if (tZone != null) {
@@ -4907,7 +4770,6 @@ webpackJsonp([3],[
4907
  }
4908
 
4909
  createDuration.fn = Duration.prototype;
4910
- createDuration.invalid = createInvalid$1;
4911
 
4912
  function parseIso (inp, sign) {
4913
  // We'd normally use ~~inp for this, but unfortunately it also
@@ -5144,19 +5006,18 @@ webpackJsonp([3],[
5144
  return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
5145
  }
5146
 
5147
- function toISOString() {
5148
- if (!this.isValid()) {
5149
- return null;
5150
- }
5151
  var m = this.clone().utc();
5152
- if (m.year() < 0 || m.year() > 9999) {
 
 
 
 
 
 
 
5153
  return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
5154
  }
5155
- if (isFunction(Date.prototype.toISOString)) {
5156
- // native implementation is ~50x faster, use it when we can
5157
- return this.toDate().toISOString();
5158
- }
5159
- return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
5160
  }
5161
 
5162
  /**
@@ -5176,7 +5037,7 @@ webpackJsonp([3],[
5176
  zone = 'Z';
5177
  }
5178
  var prefix = '[' + func + '("]';
5179
- var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';
5180
  var datetime = '-MM-DD[T]HH:mm:ss.SSS';
5181
  var suffix = zone + '[")]';
5182
 
@@ -5344,7 +5205,7 @@ webpackJsonp([3],[
5344
  return this.isValid() ? this.toISOString() : null;
5345
  }
5346
 
5347
- function isValid$2 () {
5348
  return isValid(this);
5349
  }
5350
 
@@ -5504,10 +5365,7 @@ webpackJsonp([3],[
5504
  addRegexToken('D', match1to2);
5505
  addRegexToken('DD', match1to2, match2);
5506
  addRegexToken('Do', function (isStrict, locale) {
5507
- // TODO: Remove "ordinalParse" fallback in next major release.
5508
- return isStrict ?
5509
- (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :
5510
- locale._dayOfMonthOrdinalParseLenient;
5511
  });
5512
 
5513
  addParseToken(['D', 'DD'], DATE);
@@ -5687,7 +5545,7 @@ webpackJsonp([3],[
5687
  proto.isSame = isSame;
5688
  proto.isSameOrAfter = isSameOrAfter;
5689
  proto.isSameOrBefore = isSameOrBefore;
5690
- proto.isValid = isValid$2;
5691
  proto.lang = lang;
5692
  proto.locale = locale;
5693
  proto.localeData = localeData;
@@ -5912,7 +5770,7 @@ webpackJsonp([3],[
5912
  }
5913
 
5914
  getSetGlobalLocale('en', {
5915
- dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
5916
  ordinal : function (number) {
5917
  var b = number % 10,
5918
  output = (toInt(number % 100 / 10) === 1) ? 'th' :
@@ -6033,9 +5891,6 @@ webpackJsonp([3],[
6033
  }
6034
 
6035
  function as (units) {
6036
- if (!this.isValid()) {
6037
- return NaN;
6038
- }
6039
  var days;
6040
  var months;
6041
  var milliseconds = this._milliseconds;
@@ -6064,9 +5919,6 @@ webpackJsonp([3],[
6064
 
6065
  // TODO: Use this.as('ms')?
6066
  function valueOf$1 () {
6067
- if (!this.isValid()) {
6068
- return NaN;
6069
- }
6070
  return (
6071
  this._milliseconds +
6072
  this._days * 864e5 +
@@ -6092,12 +5944,12 @@ webpackJsonp([3],[
6092
 
6093
  function get$2 (units) {
6094
  units = normalizeUnits(units);
6095
- return this.isValid() ? this[units + 's']() : NaN;
6096
  }
6097
 
6098
  function makeGetter(name) {
6099
  return function () {
6100
- return this.isValid() ? this._data[name] : NaN;
6101
  };
6102
  }
6103
 
@@ -6115,12 +5967,11 @@ webpackJsonp([3],[
6115
 
6116
  var round = Math.round;
6117
  var thresholds = {
6118
- ss: 44, // a few seconds to seconds
6119
- s : 45, // seconds to minute
6120
- m : 45, // minutes to hour
6121
- h : 22, // hours to day
6122
- d : 26, // days to month
6123
- M : 11 // months to year
6124
  };
6125
 
6126
  // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
@@ -6137,17 +5988,16 @@ webpackJsonp([3],[
6137
  var months = round(duration.as('M'));
6138
  var years = round(duration.as('y'));
6139
 
6140
- var a = seconds <= thresholds.ss && ['s', seconds] ||
6141
- seconds < thresholds.s && ['ss', seconds] ||
6142
- minutes <= 1 && ['m'] ||
6143
- minutes < thresholds.m && ['mm', minutes] ||
6144
- hours <= 1 && ['h'] ||
6145
- hours < thresholds.h && ['hh', hours] ||
6146
- days <= 1 && ['d'] ||
6147
- days < thresholds.d && ['dd', days] ||
6148
- months <= 1 && ['M'] ||
6149
- months < thresholds.M && ['MM', months] ||
6150
- years <= 1 && ['y'] || ['yy', years];
6151
 
6152
  a[2] = withoutSuffix;
6153
  a[3] = +posNegDuration > 0;
@@ -6176,17 +6026,10 @@ webpackJsonp([3],[
6176
  return thresholds[threshold];
6177
  }
6178
  thresholds[threshold] = limit;
6179
- if (threshold === 's') {
6180
- thresholds.ss = limit - 1;
6181
- }
6182
  return true;
6183
  }
6184
 
6185
  function humanize (withSuffix) {
6186
- if (!this.isValid()) {
6187
- return this.localeData().invalidDate();
6188
- }
6189
-
6190
  var locale = this.localeData();
6191
  var output = relativeTime$1(this, !withSuffix, locale);
6192
 
@@ -6207,10 +6050,6 @@ webpackJsonp([3],[
6207
  // This is because there is no context-free conversion between hours and days
6208
  // (think of clock changes)
6209
  // and also not between days and months (28-31 days per month)
6210
- if (!this.isValid()) {
6211
- return this.localeData().invalidDate();
6212
- }
6213
-
6214
  var seconds = abs$1(this._milliseconds) / 1000;
6215
  var days = abs$1(this._days);
6216
  var months = abs$1(this._months);
@@ -6255,7 +6094,6 @@ webpackJsonp([3],[
6255
 
6256
  var proto$2 = Duration.prototype;
6257
 
6258
- proto$2.isValid = isValid$1;
6259
  proto$2.abs = abs;
6260
  proto$2.add = add$1;
6261
  proto$2.subtract = subtract$1;
@@ -6311,7 +6149,7 @@ webpackJsonp([3],[
6311
  // Side effect imports
6312
 
6313
 
6314
- hooks.version = '2.18.1';
6315
 
6316
  setHookCallback(createLocal);
6317
 
@@ -6375,231 +6213,217 @@ webpackJsonp([3],[
6375
  "./ar": 294,
6376
  "./ar-dz": 295,
6377
  "./ar-dz.js": 295,
6378
- "./ar-kw": 296,
6379
- "./ar-kw.js": 296,
6380
- "./ar-ly": 297,
6381
- "./ar-ly.js": 297,
6382
- "./ar-ma": 298,
6383
- "./ar-ma.js": 298,
6384
- "./ar-sa": 299,
6385
- "./ar-sa.js": 299,
6386
- "./ar-tn": 300,
6387
- "./ar-tn.js": 300,
6388
  "./ar.js": 294,
6389
- "./az": 301,
6390
- "./az.js": 301,
6391
- "./be": 302,
6392
- "./be.js": 302,
6393
- "./bg": 303,
6394
- "./bg.js": 303,
6395
- "./bn": 304,
6396
- "./bn.js": 304,
6397
- "./bo": 305,
6398
- "./bo.js": 305,
6399
- "./br": 306,
6400
- "./br.js": 306,
6401
- "./bs": 307,
6402
- "./bs.js": 307,
6403
- "./ca": 308,
6404
- "./ca.js": 308,
6405
- "./cs": 309,
6406
- "./cs.js": 309,
6407
- "./cv": 310,
6408
- "./cv.js": 310,
6409
- "./cy": 311,
6410
- "./cy.js": 311,
6411
- "./da": 312,
6412
- "./da.js": 312,
6413
- "./de": 313,
6414
- "./de-at": 314,
6415
- "./de-at.js": 314,
6416
- "./de-ch": 315,
6417
- "./de-ch.js": 315,
6418
- "./de.js": 313,
6419
- "./dv": 316,
6420
- "./dv.js": 316,
6421
- "./el": 317,
6422
- "./el.js": 317,
6423
- "./en-au": 318,
6424
- "./en-au.js": 318,
6425
- "./en-ca": 319,
6426
- "./en-ca.js": 319,
6427
- "./en-gb": 320,
6428
- "./en-gb.js": 320,
6429
- "./en-ie": 321,
6430
- "./en-ie.js": 321,
6431
- "./en-nz": 322,
6432
- "./en-nz.js": 322,
6433
- "./eo": 323,
6434
- "./eo.js": 323,
6435
- "./es": 324,
6436
- "./es-do": 325,
6437
- "./es-do.js": 325,
6438
- "./es.js": 324,
6439
- "./et": 326,
6440
- "./et.js": 326,
6441
- "./eu": 327,
6442
- "./eu.js": 327,
6443
- "./fa": 328,
6444
- "./fa.js": 328,
6445
- "./fi": 329,
6446
- "./fi.js": 329,
6447
- "./fo": 330,
6448
- "./fo.js": 330,
6449
- "./fr": 331,
6450
- "./fr-ca": 332,
6451
- "./fr-ca.js": 332,
6452
- "./fr-ch": 333,
6453
- "./fr-ch.js": 333,
6454
- "./fr.js": 331,
6455
- "./fy": 334,
6456
- "./fy.js": 334,
6457
- "./gd": 335,
6458
- "./gd.js": 335,
6459
- "./gl": 336,
6460
- "./gl.js": 336,
6461
- "./gom-latn": 337,
6462
- "./gom-latn.js": 337,
6463
- "./he": 338,
6464
- "./he.js": 338,
6465
- "./hi": 339,
6466
- "./hi.js": 339,
6467
- "./hr": 340,
6468
- "./hr.js": 340,
6469
- "./hu": 341,
6470
- "./hu.js": 341,
6471
- "./hy-am": 342,
6472
- "./hy-am.js": 342,
6473
- "./id": 343,
6474
- "./id.js": 343,
6475
- "./is": 344,
6476
- "./is.js": 344,
6477
- "./it": 345,
6478
- "./it.js": 345,
6479
- "./ja": 346,
6480
- "./ja.js": 346,
6481
- "./jv": 347,
6482
- "./jv.js": 347,
6483
- "./ka": 348,
6484
- "./ka.js": 348,
6485
- "./kk": 349,
6486
- "./kk.js": 349,
6487
- "./km": 350,
6488
- "./km.js": 350,
6489
- "./kn": 351,
6490
- "./kn.js": 351,
6491
- "./ko": 352,
6492
- "./ko.js": 352,
6493
- "./ky": 353,
6494
- "./ky.js": 353,
6495
- "./lb": 354,
6496
- "./lb.js": 354,
6497
- "./lo": 355,
6498
- "./lo.js": 355,
6499
- "./lt": 356,
6500
- "./lt.js": 356,
6501
- "./lv": 357,
6502
- "./lv.js": 357,
6503
- "./me": 358,
6504
- "./me.js": 358,
6505
- "./mi": 359,
6506
- "./mi.js": 359,
6507
- "./mk": 360,
6508
- "./mk.js": 360,
6509
- "./ml": 361,
6510
- "./ml.js": 361,
6511
- "./mr": 362,
6512
- "./mr.js": 362,
6513
- "./ms": 363,
6514
- "./ms-my": 364,
6515
- "./ms-my.js": 364,
6516
- "./ms.js": 363,
6517
- "./my": 365,
6518
- "./my.js": 365,
6519
- "./nb": 366,
6520
- "./nb.js": 366,
6521
- "./ne": 367,
6522
- "./ne.js": 367,
6523
- "./nl": 368,
6524
- "./nl-be": 369,
6525
- "./nl-be.js": 369,
6526
- "./nl.js": 368,
6527
- "./nn": 370,
6528
- "./nn.js": 370,
6529
- "./pa-in": 371,
6530
- "./pa-in.js": 371,
6531
- "./pl": 372,
6532
- "./pl.js": 372,
6533
- "./pt": 373,
6534
- "./pt-br": 374,
6535
- "./pt-br.js": 374,
6536
- "./pt.js": 373,
6537
- "./ro": 375,
6538
- "./ro.js": 375,
6539
- "./ru": 376,
6540
- "./ru.js": 376,
6541
- "./sd": 377,
6542
- "./sd.js": 377,
6543
- "./se": 378,
6544
- "./se.js": 378,
6545
- "./si": 379,
6546
- "./si.js": 379,
6547
- "./sk": 380,
6548
- "./sk.js": 380,
6549
- "./sl": 381,
6550
- "./sl.js": 381,
6551
- "./sq": 382,
6552
- "./sq.js": 382,
6553
- "./sr": 383,
6554
- "./sr-cyrl": 384,
6555
- "./sr-cyrl.js": 384,
6556
- "./sr.js": 383,
6557
- "./ss": 385,
6558
- "./ss.js": 385,
6559
- "./sv": 386,
6560
- "./sv.js": 386,
6561
- "./sw": 387,
6562
- "./sw.js": 387,
6563
- "./ta": 388,
6564
- "./ta.js": 388,
6565
- "./te": 389,
6566
- "./te.js": 389,
6567
- "./tet": 390,
6568
- "./tet.js": 390,
6569
- "./th": 391,
6570
- "./th.js": 391,
6571
- "./tl-ph": 392,
6572
- "./tl-ph.js": 392,
6573
- "./tlh": 393,
6574
- "./tlh.js": 393,
6575
- "./tr": 394,
6576
- "./tr.js": 394,
6577
- "./tzl": 395,
6578
- "./tzl.js": 395,
6579
- "./tzm": 396,
6580
- "./tzm-latn": 397,
6581
- "./tzm-latn.js": 397,
6582
- "./tzm.js": 396,
6583
- "./uk": 398,
6584
- "./uk.js": 398,
6585
- "./ur": 399,
6586
- "./ur.js": 399,
6587
- "./uz": 400,
6588
- "./uz-latn": 401,
6589
- "./uz-latn.js": 401,
6590
- "./uz.js": 400,
6591
- "./vi": 402,
6592
- "./vi.js": 402,
6593
- "./x-pseudo": 403,
6594
- "./x-pseudo.js": 403,
6595
- "./yo": 404,
6596
- "./yo.js": 404,
6597
- "./zh-cn": 405,
6598
- "./zh-cn.js": 405,
6599
- "./zh-hk": 406,
6600
- "./zh-hk.js": 406,
6601
- "./zh-tw": 407,
6602
- "./zh-tw.js": 407
6603
  };
6604
  function webpackContext(req) {
6605
  return __webpack_require__(webpackContextResolve(req));
@@ -6678,7 +6502,7 @@ webpackJsonp([3],[
6678
  y : '\'n jaar',
6679
  yy : '%d jaar'
6680
  },
6681
- dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
6682
  ordinal : function (number) {
6683
  return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter
6684
  },
@@ -6906,70 +6730,6 @@ webpackJsonp([3],[
6906
 
6907
  /***/ },
6908
  /* 296 */
6909
- /***/ function(module, exports, __webpack_require__) {
6910
-
6911
- //! moment.js locale configuration
6912
- //! locale : Arabic (Kuwait) [ar-kw]
6913
- //! author : Nusret Parlak: https://github.com/nusretparlak
6914
-
6915
- ;(function (global, factory) {
6916
- true ? factory(__webpack_require__(290)) :
6917
- typeof define === 'function' && define.amd ? define(['../moment'], factory) :
6918
- factory(global.moment)
6919
- }(this, (function (moment) { 'use strict';
6920
-
6921
-
6922
- var arKw = moment.defineLocale('ar-kw', {
6923
- months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
6924
- monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
6925
- weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
6926
- weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
6927
- weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
6928
- weekdaysParseExact : true,
6929
- longDateFormat : {
6930
- LT : 'HH:mm',
6931
- LTS : 'HH:mm:ss',
6932
- L : 'DD/MM/YYYY',
6933
- LL : 'D MMMM YYYY',
6934
- LLL : 'D MMMM YYYY HH:mm',
6935
- LLLL : 'dddd D MMMM YYYY HH:mm'
6936
- },
6937
- calendar : {
6938
- sameDay: '[اليوم على الساعة] LT',
6939
- nextDay: '[غدا على الساعة] LT',
6940
- nextWeek: 'dddd [على الساعة] LT',
6941
- lastDay: '[أمس على الساعة] LT',
6942
- lastWeek: 'dddd [على الساعة] LT',
6943
- sameElse: 'L'
6944
- },
6945
- relativeTime : {
6946
- future : 'في %s',
6947
- past : 'منذ %s',
6948
- s : 'ثوان',
6949
- m : 'دقيقة',
6950
- mm : '%d دقائق',
6951
- h : 'ساعة',
6952
- hh : '%d ساعات',
6953
- d : 'يوم',
6954
- dd : '%d أيام',
6955
- M : 'شهر',
6956
- MM : '%d أشهر',
6957
- y : 'سنة',
6958
- yy : '%d سنوات'
6959
- },
6960
- week : {
6961
- dow : 0, // Sunday is the first day of the week.
6962
- doy : 12 // The week that contains Jan 1st is the first week of the year.
6963
- }
6964
- });
6965
-
6966
- return arKw;
6967
-
6968
- })));
6969
-
6970
-
6971
- /***/ },
6972
- /* 297 */
6973
  /***/ function(module, exports, __webpack_require__) {
6974
 
6975
  //! moment.js locale configuration
@@ -7100,7 +6860,7 @@ webpackJsonp([3],[
7100
 
7101
 
7102
  /***/ },
7103
- /* 298 */
7104
  /***/ function(module, exports, __webpack_require__) {
7105
 
7106
  //! moment.js locale configuration
@@ -7165,7 +6925,7 @@ webpackJsonp([3],[
7165
 
7166
 
7167
  /***/ },
7168
- /* 299 */
7169
  /***/ function(module, exports, __webpack_require__) {
7170
 
7171
  //! moment.js locale configuration
@@ -7275,7 +7035,7 @@ webpackJsonp([3],[
7275
 
7276
 
7277
  /***/ },
7278
- /* 300 */
7279
  /***/ function(module, exports, __webpack_require__) {
7280
 
7281
  //! moment.js locale configuration
@@ -7339,7 +7099,7 @@ webpackJsonp([3],[
7339
 
7340
 
7341
  /***/ },
7342
- /* 301 */
7343
  /***/ function(module, exports, __webpack_require__) {
7344
 
7345
  //! moment.js locale configuration
@@ -7427,7 +7187,7 @@ webpackJsonp([3],[
7427
  return 'axşam';
7428
  }
7429
  },
7430
- dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,
7431
  ordinal : function (number) {
7432
  if (number === 0) { // special case for zero
7433
  return number + '-ıncı';
@@ -7449,7 +7209,7 @@ webpackJsonp([3],[
7449
 
7450
 
7451
  /***/ },
7452
- /* 302 */
7453
  /***/ function(module, exports, __webpack_require__) {
7454
 
7455
  //! moment.js locale configuration
@@ -7561,7 +7321,7 @@ webpackJsonp([3],[
7561
  return 'вечара';
7562
  }
7563
  },
7564
- dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/,
7565
  ordinal: function (number, period) {
7566
  switch (period) {
7567
  case 'M':
@@ -7588,7 +7348,7 @@ webpackJsonp([3],[
7588
 
7589
 
7590
  /***/ },
7591
- /* 303 */
7592
  /***/ function(module, exports, __webpack_require__) {
7593
 
7594
  //! moment.js locale configuration
@@ -7651,7 +7411,7 @@ webpackJsonp([3],[
7651
  y : 'година',
7652
  yy : '%d години'
7653
  },
7654
- dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
7655
  ordinal : function (number) {
7656
  var lastDigit = number % 10,
7657
  last2Digits = number % 100;
@@ -7683,7 +7443,7 @@ webpackJsonp([3],[
7683
 
7684
 
7685
  /***/ },
7686
- /* 304 */
7687
  /***/ function(module, exports, __webpack_require__) {
7688
 
7689
  //! moment.js locale configuration
@@ -7807,7 +7567,7 @@ webpackJsonp([3],[
7807
 
7808
 
7809
  /***/ },
7810
- /* 305 */
7811
  /***/ function(module, exports, __webpack_require__) {
7812
 
7813
  //! moment.js locale configuration
@@ -7931,7 +7691,7 @@ webpackJsonp([3],[
7931
 
7932
 
7933
  /***/ },
7934
- /* 306 */
7935
  /***/ function(module, exports, __webpack_require__) {
7936
 
7937
  //! moment.js locale configuration
@@ -8027,7 +7787,7 @@ webpackJsonp([3],[
8027
  y : 'ur bloaz',
8028
  yy : specialMutationForYears
8029
  },
8030
- dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/,
8031
  ordinal : function (number) {
8032
  var output = (number === 1) ? 'añ' : 'vet';
8033
  return number + output;
@@ -8044,7 +7804,7 @@ webpackJsonp([3],[
8044
 
8045
 
8046
  /***/ },
8047
- /* 307 */
8048
  /***/ function(module, exports, __webpack_require__) {
8049
 
8050
  //! moment.js locale configuration
@@ -8178,7 +7938,7 @@ webpackJsonp([3],[
8178
  y : 'godinu',
8179
  yy : translate
8180
  },
8181
- dayOfMonthOrdinalParse: /\d{1,2}\./,
8182
  ordinal : '%d.',
8183
  week : {
8184
  dow : 1, // Monday is the first day of the week.
@@ -8192,7 +7952,7 @@ webpackJsonp([3],[
8192
 
8193
 
8194
  /***/ },
8195
- /* 308 */
8196
  /***/ function(module, exports, __webpack_require__) {
8197
 
8198
  //! moment.js locale configuration
@@ -8207,12 +7967,8 @@ webpackJsonp([3],[
8207
 
8208
 
8209
  var ca = moment.defineLocale('ca', {
8210
- months : {
8211
- standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),
8212
- format: 'de gener_de febrer_de març_d\'abril_de maig_de juny_de juliol_d\'agost_de setembre_d\'octubre_de novembre_de desembre'.split('_'),
8213
- isFormat: /D[oD]?(\s)+MMMM/
8214
- },
8215
- monthsShort : 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split('_'),
8216
  monthsParseExact : true,
8217
  weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),
8218
  weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
@@ -8222,12 +7978,9 @@ webpackJsonp([3],[
8222
  LT : 'H:mm',
8223
  LTS : 'H:mm:ss',
8224
  L : 'DD/MM/YYYY',
8225
- LL : '[el] D MMMM [de] YYYY',
8226
- ll : 'D MMM YYYY',
8227
- LLL : '[el] D MMMM [de] YYYY [a les] H:mm',
8228
- lll : 'D MMM YYYY, H:mm',
8229
- LLLL : '[el] dddd D MMMM [de] YYYY [a les] H:mm',
8230
- llll : 'ddd D MMM YYYY, H:mm'
8231
  },
8232
  calendar : {
8233
  sameDay : function () {
@@ -8262,7 +8015,7 @@ webpackJsonp([3],[
8262
  y : 'un any',
8263
  yy : '%d anys'
8264
  },
8265
- dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
8266
  ordinal : function (number, period) {
8267
  var output = (number === 1) ? 'r' :
8268
  (number === 2) ? 'n' :
@@ -8285,7 +8038,7 @@ webpackJsonp([3],[
8285
 
8286
 
8287
  /***/ },
8288
- /* 309 */
8289
  /***/ function(module, exports, __webpack_require__) {
8290
 
8291
  //! moment.js locale configuration
@@ -8448,7 +8201,7 @@ webpackJsonp([3],[
8448
  y : translate,
8449
  yy : translate
8450
  },
8451
- dayOfMonthOrdinalParse : /\d{1,2}\./,
8452
  ordinal : '%d.',
8453
  week : {
8454
  dow : 1, // Monday is the first day of the week.
@@ -8462,7 +8215,7 @@ webpackJsonp([3],[
8462
 
8463
 
8464
  /***/ },
8465
- /* 310 */
8466
  /***/ function(module, exports, __webpack_require__) {
8467
 
8468
  //! moment.js locale configuration
@@ -8516,7 +8269,7 @@ webpackJsonp([3],[
8516
  y : 'пӗр ҫул',
8517
  yy : '%d ҫул'
8518
  },
8519
- dayOfMonthOrdinalParse: /\d{1,2}-мӗш/,
8520
  ordinal : '%d-мӗш',
8521
  week : {
8522
  dow : 1, // Monday is the first day of the week.
@@ -8530,7 +8283,7 @@ webpackJsonp([3],[
8530
 
8531
 
8532
  /***/ },
8533
- /* 311 */
8534
  /***/ function(module, exports, __webpack_require__) {
8535
 
8536
  //! moment.js locale configuration
@@ -8584,7 +8337,7 @@ webpackJsonp([3],[
8584
  y: 'blwyddyn',
8585
  yy: '%d flynedd'
8586
  },
8587
- dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
8588
  // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
8589
  ordinal: function (number) {
8590
  var b = number,
@@ -8616,7 +8369,7 @@ webpackJsonp([3],[
8616
 
8617
 
8618
  /***/ },
8619
- /* 312 */
8620
  /***/ function(module, exports, __webpack_require__) {
8621
 
8622
  //! moment.js locale configuration
@@ -8642,14 +8395,14 @@ webpackJsonp([3],[
8642
  L : 'DD/MM/YYYY',
8643
  LL : 'D. MMMM YYYY',
8644
  LLL : 'D. MMMM YYYY HH:mm',
8645
- LLLL : 'dddd [d.] D. MMMM YYYY [kl.] HH:mm'
8646
  },
8647
  calendar : {
8648
- sameDay : '[i dag kl.] LT',
8649
- nextDay : '[i morgen kl.] LT',
8650
- nextWeek : 'dddd [kl.] LT',
8651
- lastDay : '[i går kl.] LT',
8652
- lastWeek : '[i] dddd[s kl.] LT',
8653
  sameElse : 'L'
8654
  },
8655
  relativeTime : {
@@ -8667,7 +8420,7 @@ webpackJsonp([3],[
8667
  y : 'et år',
8668
  yy : '%d år'
8669
  },
8670
- dayOfMonthOrdinalParse: /\d{1,2}\./,
8671
  ordinal : '%d.',
8672
  week : {
8673
  dow : 1, // Monday is the first day of the week.
@@ -8681,7 +8434,7 @@ webpackJsonp([3],[
8681
 
8682
 
8683
  /***/ },
8684
- /* 313 */
8685
  /***/ function(module, exports, __webpack_require__) {
8686
 
8687
  //! moment.js locale configuration
@@ -8750,7 +8503,7 @@ webpackJsonp([3],[
8750
  y : processRelativeTime,
8751
  yy : processRelativeTime
8752
  },
8753
- dayOfMonthOrdinalParse: /\d{1,2}\./,
8754
  ordinal : '%d.',
8755
  week : {
8756
  dow : 1, // Monday is the first day of the week.
@@ -8764,7 +8517,7 @@ webpackJsonp([3],[
8764
 
8765
 
8766
  /***/ },
8767
- /* 314 */
8768
  /***/ function(module, exports, __webpack_require__) {
8769
 
8770
  //! moment.js locale configuration
@@ -8834,7 +8587,7 @@ webpackJsonp([3],[
8834
  y : processRelativeTime,
8835
  yy : processRelativeTime
8836
  },
8837
- dayOfMonthOrdinalParse: /\d{1,2}\./,
8838
  ordinal : '%d.',
8839
  week : {
8840
  dow : 1, // Monday is the first day of the week.
@@ -8848,12 +8601,12 @@ webpackJsonp([3],[
8848
 
8849
 
8850
  /***/ },
8851
- /* 315 */
8852
  /***/ function(module, exports, __webpack_require__) {
8853
 
8854
  //! moment.js locale configuration
8855
- //! locale : German (Switzerland) [de-ch]
8856
- //! author : sschueller : https://github.com/sschueller
8857
 
8858
  ;(function (global, factory) {
8859
  true ? factory(__webpack_require__(290)) :
@@ -8862,131 +8615,48 @@ webpackJsonp([3],[
8862
  }(this, (function (moment) { 'use strict';
8863
 
8864
 
8865
- // based on: https://www.bk.admin.ch/dokumentation/sprachen/04915/05016/index.html?lang=de#
8866
-
8867
- function processRelativeTime(number, withoutSuffix, key, isFuture) {
8868
- var format = {
8869
- 'm': ['eine Minute', 'einer Minute'],
8870
- 'h': ['eine Stunde', 'einer Stunde'],
8871
- 'd': ['ein Tag', 'einem Tag'],
8872
- 'dd': [number + ' Tage', number + ' Tagen'],
8873
- 'M': ['ein Monat', 'einem Monat'],
8874
- 'MM': [number + ' Monate', number + ' Monaten'],
8875
- 'y': ['ein Jahr', 'einem Jahr'],
8876
- 'yy': [number + ' Jahre', number + ' Jahren']
8877
- };
8878
- return withoutSuffix ? format[key][0] : format[key][1];
8879
- }
 
 
 
 
 
 
 
 
8880
 
8881
- var deCh = moment.defineLocale('de-ch', {
8882
- months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
8883
- monthsShort : 'Jan._Febr._März_April_Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.'.split('_'),
8884
- monthsParseExact : true,
8885
- weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
8886
- weekdaysShort : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
8887
- weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
8888
- weekdaysParseExact : true,
8889
  longDateFormat : {
8890
- LT: 'HH.mm',
8891
- LTS: 'HH.mm.ss',
8892
- L : 'DD.MM.YYYY',
8893
- LL : 'D. MMMM YYYY',
8894
- LLL : 'D. MMMM YYYY HH.mm',
8895
- LLLL : 'dddd, D. MMMM YYYY HH.mm'
 
8896
  },
8897
- calendar : {
8898
- sameDay: '[heute um] LT [Uhr]',
8899
- sameElse: 'L',
8900
- nextDay: '[morgen um] LT [Uhr]',
8901
- nextWeek: 'dddd [um] LT [Uhr]',
8902
- lastDay: '[gestern um] LT [Uhr]',
8903
- lastWeek: '[letzten] dddd [um] LT [Uhr]'
8904
- },
8905
- relativeTime : {
8906
- future : 'in %s',
8907
- past : 'vor %s',
8908
- s : 'ein paar Sekunden',
8909
- m : processRelativeTime,
8910
- mm : '%d Minuten',
8911
- h : processRelativeTime,
8912
- hh : '%d Stunden',
8913
- d : processRelativeTime,
8914
- dd : processRelativeTime,
8915
- M : processRelativeTime,
8916
- MM : processRelativeTime,
8917
- y : processRelativeTime,
8918
- yy : processRelativeTime
8919
- },
8920
- dayOfMonthOrdinalParse: /\d{1,2}\./,
8921
- ordinal : '%d.',
8922
- week : {
8923
- dow : 1, // Monday is the first day of the week.
8924
- doy : 4 // The week that contains Jan 4th is the first week of the year.
8925
- }
8926
- });
8927
-
8928
- return deCh;
8929
-
8930
- })));
8931
-
8932
-
8933
- /***/ },
8934
- /* 316 */
8935
- /***/ function(module, exports, __webpack_require__) {
8936
-
8937
- //! moment.js locale configuration
8938
- //! locale : Maldivian [dv]
8939
- //! author : Jawish Hameed : https://github.com/jawish
8940
-
8941
- ;(function (global, factory) {
8942
- true ? factory(__webpack_require__(290)) :
8943
- typeof define === 'function' && define.amd ? define(['../moment'], factory) :
8944
- factory(global.moment)
8945
- }(this, (function (moment) { 'use strict';
8946
-
8947
-
8948
- var months = [
8949
- 'ޖެނުއަރީ',
8950
- 'ފެބްރުއަރީ',
8951
- 'މާރިޗު',
8952
- 'އޭޕްރީލު',
8953
- 'މޭ',
8954
- 'ޖޫން',
8955
- 'ޖުލައި',
8956
- 'އޯގަސްޓު',
8957
- 'ސެޕްޓެމްބަރު',
8958
- 'އޮކްޓޯބަރު',
8959
- 'ނޮވެމްބަރު',
8960
- 'ޑިސެމްބަރު'
8961
- ];
8962
- var weekdays = [
8963
- 'އާދިއްތަ',
8964
- 'ހޯމަ',
8965
- 'އަންގާރަ',
8966
- 'ބުދަ',
8967
- 'ބުރާސްފަތި',
8968
- 'ހުކުރު',
8969
- 'ހޮނިހިރު'
8970
- ];
8971
-
8972
- var dv = moment.defineLocale('dv', {
8973
- months : months,
8974
- monthsShort : months,
8975
- weekdays : weekdays,
8976
- weekdaysShort : weekdays,
8977
- weekdaysMin : 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),
8978
- longDateFormat : {
8979
-
8980
- LT : 'HH:mm',
8981
- LTS : 'HH:mm:ss',
8982
- L : 'D/M/YYYY',
8983
- LL : 'D MMMM YYYY',
8984
- LLL : 'D MMMM YYYY HH:mm',
8985
- LLLL : 'dddd D MMMM YYYY HH:mm'
8986
- },
8987
- meridiemParse: /މކ|މފ/,
8988
- isPM : function (input) {
8989
- return 'މފ' === input;
8990
  },
8991
  meridiem : function (hour, minute, isLower) {
8992
  if (hour < 12) {
@@ -9036,7 +8706,7 @@ webpackJsonp([3],[
9036
 
9037
 
9038
  /***/ },
9039
- /* 317 */
9040
  /***/ function(module, exports, __webpack_require__) {
9041
 
9042
  //! moment.js locale configuration
@@ -9058,9 +8728,7 @@ webpackJsonp([3],[
9058
  monthsNominativeEl : 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'),
9059
  monthsGenitiveEl : 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split('_'),
9060
  months : function (momentToFormat, format) {
9061
- if (!momentToFormat) {
9062
- return this._monthsNominativeEl;
9063
- } else if (/D/.test(format.substring(0, format.indexOf('MMMM')))) { // if there is a day number before 'MMMM'
9064
  return this._monthsGenitiveEl[momentToFormat.month()];
9065
  } else {
9066
  return this._monthsNominativeEl[momentToFormat.month()];
@@ -9127,7 +8795,7 @@ webpackJsonp([3],[
9127
  y : 'ένας χρόνος',
9128
  yy : '%d χρόνια'
9129
  },
9130
- dayOfMonthOrdinalParse: /\d{1,2}η/,
9131
  ordinal: '%dη',
9132
  week : {
9133
  dow : 1, // Monday is the first day of the week.
@@ -9141,7 +8809,7 @@ webpackJsonp([3],[
9141
 
9142
 
9143
  /***/ },
9144
- /* 318 */
9145
  /***/ function(module, exports, __webpack_require__) {
9146
 
9147
  //! moment.js locale configuration
@@ -9192,7 +8860,7 @@ webpackJsonp([3],[
9192
  y : 'a year',
9193
  yy : '%d years'
9194
  },
9195
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
9196
  ordinal : function (number) {
9197
  var b = number % 10,
9198
  output = (~~(number % 100 / 10) === 1) ? 'th' :
@@ -9213,7 +8881,7 @@ webpackJsonp([3],[
9213
 
9214
 
9215
  /***/ },
9216
- /* 319 */
9217
  /***/ function(module, exports, __webpack_require__) {
9218
 
9219
  //! moment.js locale configuration
@@ -9264,7 +8932,7 @@ webpackJsonp([3],[
9264
  y : 'a year',
9265
  yy : '%d years'
9266
  },
9267
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
9268
  ordinal : function (number) {
9269
  var b = number % 10,
9270
  output = (~~(number % 100 / 10) === 1) ? 'th' :
@@ -9281,7 +8949,7 @@ webpackJsonp([3],[
9281
 
9282
 
9283
  /***/ },
9284
- /* 320 */
9285
  /***/ function(module, exports, __webpack_require__) {
9286
 
9287
  //! moment.js locale configuration
@@ -9332,7 +9000,7 @@ webpackJsonp([3],[
9332
  y : 'a year',
9333
  yy : '%d years'
9334
  },
9335
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
9336
  ordinal : function (number) {
9337
  var b = number % 10,
9338
  output = (~~(number % 100 / 10) === 1) ? 'th' :
@@ -9353,7 +9021,7 @@ webpackJsonp([3],[
9353
 
9354
 
9355
  /***/ },
9356
- /* 321 */
9357
  /***/ function(module, exports, __webpack_require__) {
9358
 
9359
  //! moment.js locale configuration
@@ -9404,7 +9072,7 @@ webpackJsonp([3],[
9404
  y : 'a year',
9405
  yy : '%d years'
9406
  },
9407
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
9408
  ordinal : function (number) {
9409
  var b = number % 10,
9410
  output = (~~(number % 100 / 10) === 1) ? 'th' :
@@ -9425,7 +9093,7 @@ webpackJsonp([3],[
9425
 
9426
 
9427
  /***/ },
9428
- /* 322 */
9429
  /***/ function(module, exports, __webpack_require__) {
9430
 
9431
  //! moment.js locale configuration
@@ -9476,7 +9144,7 @@ webpackJsonp([3],[
9476
  y : 'a year',
9477
  yy : '%d years'
9478
  },
9479
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
9480
  ordinal : function (number) {
9481
  var b = number % 10,
9482
  output = (~~(number % 100 / 10) === 1) ? 'th' :
@@ -9497,14 +9165,14 @@ webpackJsonp([3],[
9497
 
9498
 
9499
  /***/ },
9500
- /* 323 */
9501
  /***/ function(module, exports, __webpack_require__) {
9502
 
9503
  //! moment.js locale configuration
9504
  //! locale : Esperanto [eo]
9505
  //! author : Colin Dean : https://github.com/colindean
9506
- //! author : Mia Nordentoft Imperatori : https://github.com/miestasmia
9507
- //! comment : miestasmia corrected the translation by colindean
9508
 
9509
  ;(function (global, factory) {
9510
  true ? factory(__webpack_require__(290)) :
@@ -9516,16 +9184,16 @@ webpackJsonp([3],[
9516
  var eo = moment.defineLocale('eo', {
9517
  months : 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split('_'),
9518
  monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec'.split('_'),
9519
- weekdays : 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),
9520
- weekdaysShort : 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),
9521
- weekdaysMin : 'di_lu_ma_me_ĵa_ve_sa'.split('_'),
9522
  longDateFormat : {
9523
  LT : 'HH:mm',
9524
  LTS : 'HH:mm:ss',
9525
  L : 'YYYY-MM-DD',
9526
- LL : 'D[-a de] MMMM, YYYY',
9527
- LLL : 'D[-a de] MMMM, YYYY HH:mm',
9528
- LLLL : 'dddd, [la] D[-a de] MMMM, YYYY HH:mm'
9529
  },
9530
  meridiemParse: /[ap]\.t\.m/i,
9531
  isPM: function (input) {
@@ -9547,7 +9215,7 @@ webpackJsonp([3],[
9547
  sameElse : 'L'
9548
  },
9549
  relativeTime : {
9550
- future : 'post %s',
9551
  past : 'antaŭ %s',
9552
  s : 'sekundoj',
9553
  m : 'minuto',
@@ -9561,7 +9229,7 @@ webpackJsonp([3],[
9561
  y : 'jaro',
9562
  yy : '%d jaroj'
9563
  },
9564
- dayOfMonthOrdinalParse: /\d{1,2}a/,
9565
  ordinal : '%da',
9566
  week : {
9567
  dow : 1, // Monday is the first day of the week.
@@ -9575,7 +9243,7 @@ webpackJsonp([3],[
9575
 
9576
 
9577
  /***/ },
9578
- /* 324 */
9579
  /***/ function(module, exports, __webpack_require__) {
9580
 
9581
  //! moment.js locale configuration
@@ -9595,9 +9263,7 @@ webpackJsonp([3],[
9595
  var es = moment.defineLocale('es', {
9596
  months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
9597
  monthsShort : function (m, format) {
9598
- if (!m) {
9599
- return monthsShortDot;
9600
- } else if (/-MMM-/.test(format)) {
9601
  return monthsShort[m.month()];
9602
  } else {
9603
  return monthsShortDot[m.month()];
@@ -9649,7 +9315,7 @@ webpackJsonp([3],[
9649
  y : 'un año',
9650
  yy : '%d años'
9651
  },
9652
- dayOfMonthOrdinalParse : /\d{1,2}º/,
9653
  ordinal : '%dº',
9654
  week : {
9655
  dow : 1, // Monday is the first day of the week.
@@ -9663,7 +9329,7 @@ webpackJsonp([3],[
9663
 
9664
 
9665
  /***/ },
9666
- /* 325 */
9667
  /***/ function(module, exports, __webpack_require__) {
9668
 
9669
  //! moment.js locale configuration
@@ -9682,9 +9348,7 @@ webpackJsonp([3],[
9682
  var esDo = moment.defineLocale('es-do', {
9683
  months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
9684
  monthsShort : function (m, format) {
9685
- if (!m) {
9686
- return monthsShortDot;
9687
- } else if (/-MMM-/.test(format)) {
9688
  return monthsShort[m.month()];
9689
  } else {
9690
  return monthsShortDot[m.month()];
@@ -9736,7 +9400,7 @@ webpackJsonp([3],[
9736
  y : 'un año',
9737
  yy : '%d años'
9738
  },
9739
- dayOfMonthOrdinalParse : /\d{1,2}º/,
9740
  ordinal : '%dº',
9741
  week : {
9742
  dow : 1, // Monday is the first day of the week.
@@ -9750,7 +9414,7 @@ webpackJsonp([3],[
9750
 
9751
 
9752
  /***/ },
9753
- /* 326 */
9754
  /***/ function(module, exports, __webpack_require__) {
9755
 
9756
  //! moment.js locale configuration
@@ -9821,7 +9485,7 @@ webpackJsonp([3],[
9821
  y : processRelativeTime,
9822
  yy : processRelativeTime
9823
  },
9824
- dayOfMonthOrdinalParse: /\d{1,2}\./,
9825
  ordinal : '%d.',
9826
  week : {
9827
  dow : 1, // Monday is the first day of the week.
@@ -9835,7 +9499,7 @@ webpackJsonp([3],[
9835
 
9836
 
9837
  /***/ },
9838
- /* 327 */
9839
  /***/ function(module, exports, __webpack_require__) {
9840
 
9841
  //! moment.js locale configuration
@@ -9892,7 +9556,7 @@ webpackJsonp([3],[
9892
  y : 'urte bat',
9893
  yy : '%d urte'
9894
  },
9895
- dayOfMonthOrdinalParse: /\d{1,2}\./,
9896
  ordinal : '%d.',
9897
  week : {
9898
  dow : 1, // Monday is the first day of the week.
@@ -9906,7 +9570,7 @@ webpackJsonp([3],[
9906
 
9907
 
9908
  /***/ },
9909
- /* 328 */
9910
  /***/ function(module, exports, __webpack_require__) {
9911
 
9912
  //! moment.js locale configuration
@@ -9982,7 +9646,7 @@ webpackJsonp([3],[
9982
  relativeTime : {
9983
  future : 'در %s',
9984
  past : '%s پیش',
9985
- s : 'چند ثانیه',
9986
  m : 'یک دقیقه',
9987
  mm : '%d دقیقه',
9988
  h : 'یک ساعت',
@@ -10004,7 +9668,7 @@ webpackJsonp([3],[
10004
  return symbolMap[match];
10005
  }).replace(/,/g, '،');
10006
  },
10007
- dayOfMonthOrdinalParse: /\d{1,2}م/,
10008
  ordinal : '%dم',
10009
  week : {
10010
  dow : 6, // Saturday is the first day of the week.
@@ -10018,7 +9682,7 @@ webpackJsonp([3],[
10018
 
10019
 
10020
  /***/ },
10021
- /* 329 */
10022
  /***/ function(module, exports, __webpack_require__) {
10023
 
10024
  //! moment.js locale configuration
@@ -10116,7 +9780,7 @@ webpackJsonp([3],[
10116
  y : translate,
10117
  yy : translate
10118
  },
10119
- dayOfMonthOrdinalParse: /\d{1,2}\./,
10120
  ordinal : '%d.',
10121
  week : {
10122
  dow : 1, // Monday is the first day of the week.
@@ -10130,7 +9794,7 @@ webpackJsonp([3],[
10130
 
10131
 
10132
  /***/ },
10133
- /* 330 */
10134
  /***/ function(module, exports, __webpack_require__) {
10135
 
10136
  //! moment.js locale configuration
@@ -10181,7 +9845,7 @@ webpackJsonp([3],[
10181
  y : 'eitt ár',
10182
  yy : '%d ár'
10183
  },
10184
- dayOfMonthOrdinalParse: /\d{1,2}\./,
10185
  ordinal : '%d.',
10186
  week : {
10187
  dow : 1, // Monday is the first day of the week.
@@ -10195,7 +9859,7 @@ webpackJsonp([3],[
10195
 
10196
 
10197
  /***/ },
10198
- /* 331 */
10199
  /***/ function(module, exports, __webpack_require__) {
10200
 
10201
  //! moment.js locale configuration
@@ -10226,12 +9890,12 @@ webpackJsonp([3],[
10226
  LLLL : 'dddd D MMMM YYYY HH:mm'
10227
  },
10228
  calendar : {
10229
- sameDay : '[Aujourdhui à] LT',
10230
- nextDay : '[Demain à] LT',
10231
- nextWeek : 'dddd [à] LT',
10232
- lastDay : '[Hier à] LT',
10233
- lastWeek : 'dddd [dernier à] LT',
10234
- sameElse : 'L'
10235
  },
10236
  relativeTime : {
10237
  future : 'dans %s',
@@ -10248,28 +9912,9 @@ webpackJsonp([3],[
10248
  y : 'un an',
10249
  yy : '%d ans'
10250
  },
10251
- dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
10252
- ordinal : function (number, period) {
10253
- switch (period) {
10254
- // TODO: Return 'e' when day of month > 1. Move this case inside
10255
- // block for masculine words below.
10256
- // See https://github.com/moment/moment/issues/3375
10257
- case 'D':
10258
- return number + (number === 1 ? 'er' : '');
10259
-
10260
- // Words with masculine grammatical gender: mois, trimestre, jour
10261
- default:
10262
- case 'M':
10263
- case 'Q':
10264
- case 'DDD':
10265
- case 'd':
10266
- return number + (number === 1 ? 'er' : 'e');
10267
-
10268
- // Words with feminine grammatical gender: semaine
10269
- case 'w':
10270
- case 'W':
10271
- return number + (number === 1 ? 're' : 'e');
10272
- }
10273
  },
10274
  week : {
10275
  dow : 1, // Monday is the first day of the week.
@@ -10283,7 +9928,7 @@ webpackJsonp([3],[
10283
 
10284
 
10285
  /***/ },
10286
- /* 332 */
10287
  /***/ function(module, exports, __webpack_require__) {
10288
 
10289
  //! moment.js locale configuration
@@ -10314,12 +9959,12 @@ webpackJsonp([3],[
10314
  LLLL : 'dddd D MMMM YYYY HH:mm'
10315
  },
10316
  calendar : {
10317
- sameDay : '[Aujourdhui à] LT',
10318
- nextDay : '[Demain à] LT',
10319
- nextWeek : 'dddd [à] LT',
10320
- lastDay : '[Hier à] LT',
10321
- lastWeek : 'dddd [dernier à] LT',
10322
- sameElse : 'L'
10323
  },
10324
  relativeTime : {
10325
  future : 'dans %s',
@@ -10336,23 +9981,9 @@ webpackJsonp([3],[
10336
  y : 'un an',
10337
  yy : '%d ans'
10338
  },
10339
- dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
10340
- ordinal : function (number, period) {
10341
- switch (period) {
10342
- // Words with masculine grammatical gender: mois, trimestre, jour
10343
- default:
10344
- case 'M':
10345
- case 'Q':
10346
- case 'D':
10347
- case 'DDD':
10348
- case 'd':
10349
- return number + (number === 1 ? 'er' : 'e');
10350
-
10351
- // Words with feminine grammatical gender: semaine
10352
- case 'w':
10353
- case 'W':
10354
- return number + (number === 1 ? 're' : 'e');
10355
- }
10356
  }
10357
  });
10358
 
@@ -10362,7 +9993,7 @@ webpackJsonp([3],[
10362
 
10363
 
10364
  /***/ },
10365
- /* 333 */
10366
  /***/ function(module, exports, __webpack_require__) {
10367
 
10368
  //! moment.js locale configuration
@@ -10393,12 +10024,12 @@ webpackJsonp([3],[
10393
  LLLL : 'dddd D MMMM YYYY HH:mm'
10394
  },
10395
  calendar : {
10396
- sameDay : '[Aujourdhui à] LT',
10397
- nextDay : '[Demain à] LT',
10398
- nextWeek : 'dddd [à] LT',
10399
- lastDay : '[Hier à] LT',
10400
- lastWeek : 'dddd [dernier à] LT',
10401
- sameElse : 'L'
10402
  },
10403
  relativeTime : {
10404
  future : 'dans %s',
@@ -10415,23 +10046,9 @@ webpackJsonp([3],[
10415
  y : 'un an',
10416
  yy : '%d ans'
10417
  },
10418
- dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
10419
- ordinal : function (number, period) {
10420
- switch (period) {
10421
- // Words with masculine grammatical gender: mois, trimestre, jour
10422
- default:
10423
- case 'M':
10424
- case 'Q':
10425
- case 'D':
10426
- case 'DDD':
10427
- case 'd':
10428
- return number + (number === 1 ? 'er' : 'e');
10429
-
10430
- // Words with feminine grammatical gender: semaine
10431
- case 'w':
10432
- case 'W':
10433
- return number + (number === 1 ? 're' : 'e');
10434
- }
10435
  },
10436
  week : {
10437
  dow : 1, // Monday is the first day of the week.
@@ -10445,7 +10062,7 @@ webpackJsonp([3],[
10445
 
10446
 
10447
  /***/ },
10448
- /* 334 */
10449
  /***/ function(module, exports, __webpack_require__) {
10450
 
10451
  //! moment.js locale configuration
@@ -10465,9 +10082,7 @@ webpackJsonp([3],[
10465
  var fy = moment.defineLocale('fy', {
10466
  months : 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'),
10467
  monthsShort : function (m, format) {
10468
- if (!m) {
10469
- return monthsShortWithDots;
10470
- } else if (/-MMM-/.test(format)) {
10471
  return monthsShortWithoutDots[m.month()];
10472
  } else {
10473
  return monthsShortWithDots[m.month()];
@@ -10509,7 +10124,7 @@ webpackJsonp([3],[
10509
  y : 'ien jier',
10510
  yy : '%d jierren'
10511
  },
10512
- dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
10513
  ordinal : function (number) {
10514
  return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
10515
  },
@@ -10525,7 +10140,7 @@ webpackJsonp([3],[
10525
 
10526
 
10527
  /***/ },
10528
- /* 335 */
10529
  /***/ function(module, exports, __webpack_require__) {
10530
 
10531
  //! moment.js locale configuration
@@ -10589,7 +10204,7 @@ webpackJsonp([3],[
10589
  y : 'bliadhna',
10590
  yy : '%d bliadhna'
10591
  },
10592
- dayOfMonthOrdinalParse : /\d{1,2}(d|na|mh)/,
10593
  ordinal : function (number) {
10594
  var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
10595
  return number + output;
@@ -10606,7 +10221,7 @@ webpackJsonp([3],[
10606
 
10607
 
10608
  /***/ },
10609
- /* 336 */
10610
  /***/ function(module, exports, __webpack_require__) {
10611
 
10612
  //! moment.js locale configuration
@@ -10674,7 +10289,7 @@ webpackJsonp([3],[
10674
  y : 'un ano',
10675
  yy : '%d anos'
10676
  },
10677
- dayOfMonthOrdinalParse : /\d{1,2}º/,
10678
  ordinal : '%dº',
10679
  week : {
10680
  dow : 1, // Monday is the first day of the week.
@@ -10688,134 +10303,7 @@ webpackJsonp([3],[
10688
 
10689
 
10690
  /***/ },
10691
- /* 337 */
10692
- /***/ function(module, exports, __webpack_require__) {
10693
-
10694
- //! moment.js locale configuration
10695
- //! locale : Konkani Latin script [gom-latn]
10696
- //! author : The Discoverer : https://github.com/WikiDiscoverer
10697
-
10698
- ;(function (global, factory) {
10699
- true ? factory(__webpack_require__(290)) :
10700
- typeof define === 'function' && define.amd ? define(['../moment'], factory) :
10701
- factory(global.moment)
10702
- }(this, (function (moment) { 'use strict';
10703
-
10704
-
10705
- function processRelativeTime(number, withoutSuffix, key, isFuture) {
10706
- var format = {
10707
- 's': ['thodde secondanim', 'thodde second'],
10708
- 'm': ['eka mintan', 'ek minute'],
10709
- 'mm': [number + ' mintanim', number + ' mintam'],
10710
- 'h': ['eka horan', 'ek hor'],
10711
- 'hh': [number + ' horanim', number + ' hor'],
10712
- 'd': ['eka disan', 'ek dis'],
10713
- 'dd': [number + ' disanim', number + ' dis'],
10714
- 'M': ['eka mhoinean', 'ek mhoino'],
10715
- 'MM': [number + ' mhoineanim', number + ' mhoine'],
10716
- 'y': ['eka vorsan', 'ek voros'],
10717
- 'yy': [number + ' vorsanim', number + ' vorsam']
10718
- };
10719
- return withoutSuffix ? format[key][0] : format[key][1];
10720
- }
10721
-
10722
- var gomLatn = moment.defineLocale('gom-latn', {
10723
- months : 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split('_'),
10724
- monthsShort : 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),
10725
- monthsParseExact : true,
10726
- weekdays : 'Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son\'var'.split('_'),
10727
- weekdaysShort : 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
10728
- weekdaysMin : 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),
10729
- weekdaysParseExact : true,
10730
- longDateFormat : {
10731
- LT : 'A h:mm [vazta]',
10732
- LTS : 'A h:mm:ss [vazta]',
10733
- L : 'DD-MM-YYYY',
10734
- LL : 'D MMMM YYYY',
10735
- LLL : 'D MMMM YYYY A h:mm [vazta]',
10736
- LLLL : 'dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]',
10737
- llll: 'ddd, D MMM YYYY, A h:mm [vazta]'
10738
- },
10739
- calendar : {
10740
- sameDay: '[Aiz] LT',
10741
- nextDay: '[Faleam] LT',
10742
- nextWeek: '[Ieta to] dddd[,] LT',
10743
- lastDay: '[Kal] LT',
10744
- lastWeek: '[Fatlo] dddd[,] LT',
10745
- sameElse: 'L'
10746
- },
10747
- relativeTime : {
10748
- future : '%s',
10749
- past : '%s adim',
10750
- s : processRelativeTime,
10751
- m : processRelativeTime,
10752
- mm : processRelativeTime,
10753
- h : processRelativeTime,
10754
- hh : processRelativeTime,
10755
- d : processRelativeTime,
10756
- dd : processRelativeTime,
10757
- M : processRelativeTime,
10758
- MM : processRelativeTime,
10759
- y : processRelativeTime,
10760
- yy : processRelativeTime
10761
- },
10762
- dayOfMonthOrdinalParse : /\d{1,2}(er)/,
10763
- ordinal : function (number, period) {
10764
- switch (period) {
10765
- // the ordinal 'er' only applies to day of the month
10766
- case 'D':
10767
- return number + 'er';
10768
- default:
10769
- case 'M':
10770
- case 'Q':
10771
- case 'DDD':
10772
- case 'd':
10773
- case 'w':
10774
- case 'W':
10775
- return number;
10776
- }
10777
- },
10778
- week : {
10779
- dow : 1, // Monday is the first day of the week.
10780
- doy : 4 // The week that contains Jan 4th is the first week of the year.
10781
- },
10782
- meridiemParse: /rati|sokalli|donparam|sanje/,
10783
- meridiemHour : function (hour, meridiem) {
10784
- if (hour === 12) {
10785
- hour = 0;
10786
- }
10787
- if (meridiem === 'rati') {
10788
- return hour < 4 ? hour : hour + 12;
10789
- } else if (meridiem === 'sokalli') {
10790
- return hour;
10791
- } else if (meridiem === 'donparam') {
10792
- return hour > 12 ? hour : hour + 12;
10793
- } else if (meridiem === 'sanje') {
10794
- return hour + 12;
10795
- }
10796
- },
10797
- meridiem : function (hour, minute, isLower) {
10798
- if (hour < 4) {
10799
- return 'rati';
10800
- } else if (hour < 12) {
10801
- return 'sokalli';
10802
- } else if (hour < 16) {
10803
- return 'donparam';
10804
- } else if (hour < 20) {
10805
- return 'sanje';
10806
- } else {
10807
- return 'rati';
10808
- }
10809
- }
10810
- });
10811
-
10812
- return gomLatn;
10813
-
10814
- })));
10815
-
10816
-
10817
- /***/ },
10818
- /* 338 */
10819
  /***/ function(module, exports, __webpack_require__) {
10820
 
10821
  //! moment.js locale configuration
@@ -10919,7 +10407,7 @@ webpackJsonp([3],[
10919
 
10920
 
10921
  /***/ },
10922
- /* 339 */
10923
  /***/ function(module, exports, __webpack_require__) {
10924
 
10925
  //! moment.js locale configuration
@@ -11048,7 +10536,7 @@ webpackJsonp([3],[
11048
 
11049
 
11050
  /***/ },
11051
- /* 340 */
11052
  /***/ function(module, exports, __webpack_require__) {
11053
 
11054
  //! moment.js locale configuration
@@ -11184,7 +10672,7 @@ webpackJsonp([3],[
11184
  y : 'godinu',
11185
  yy : translate
11186
  },
11187
- dayOfMonthOrdinalParse: /\d{1,2}\./,
11188
  ordinal : '%d.',
11189
  week : {
11190
  dow : 1, // Monday is the first day of the week.
@@ -11198,7 +10686,7 @@ webpackJsonp([3],[
11198
 
11199
 
11200
  /***/ },
11201
- /* 341 */
11202
  /***/ function(module, exports, __webpack_require__) {
11203
 
11204
  //! moment.js locale configuration
@@ -11298,7 +10786,7 @@ webpackJsonp([3],[
11298
  y : translate,
11299
  yy : translate
11300
  },
11301
- dayOfMonthOrdinalParse: /\d{1,2}\./,
11302
  ordinal : '%d.',
11303
  week : {
11304
  dow : 1, // Monday is the first day of the week.
@@ -11312,7 +10800,7 @@ webpackJsonp([3],[
11312
 
11313
 
11314
  /***/ },
11315
- /* 342 */
11316
  /***/ function(module, exports, __webpack_require__) {
11317
 
11318
  //! moment.js locale configuration
@@ -11385,7 +10873,7 @@ webpackJsonp([3],[
11385
  return 'երեկոյան';
11386
  }
11387
  },
11388
- dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/,
11389
  ordinal: function (number, period) {
11390
  switch (period) {
11391
  case 'DDD':
@@ -11412,7 +10900,7 @@ webpackJsonp([3],[
11412
 
11413
 
11414
  /***/ },
11415
- /* 343 */
11416
  /***/ function(module, exports, __webpack_require__) {
11417
 
11418
  //! moment.js locale configuration
@@ -11500,7 +10988,7 @@ webpackJsonp([3],[
11500
 
11501
 
11502
  /***/ },
11503
- /* 344 */
11504
  /***/ function(module, exports, __webpack_require__) {
11505
 
11506
  //! moment.js locale configuration
@@ -11618,7 +11106,7 @@ webpackJsonp([3],[
11618
  y : translate,
11619
  yy : translate
11620
  },
11621
- dayOfMonthOrdinalParse: /\d{1,2}\./,
11622
  ordinal : '%d.',
11623
  week : {
11624
  dow : 1, // Monday is the first day of the week.
@@ -11632,7 +11120,7 @@ webpackJsonp([3],[
11632
 
11633
 
11634
  /***/ },
11635
- /* 345 */
11636
  /***/ function(module, exports, __webpack_require__) {
11637
 
11638
  //! moment.js locale configuration
@@ -11650,9 +11138,9 @@ webpackJsonp([3],[
11650
  var it = moment.defineLocale('it', {
11651
  months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),
11652
  monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
11653
- weekdays : 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'),
11654
- weekdaysShort : 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
11655
- weekdaysMin : 'do_lu_ma_me_gi_ve_sa'.split('_'),
11656
  longDateFormat : {
11657
  LT : 'HH:mm',
11658
  LTS : 'HH:mm:ss',
@@ -11693,7 +11181,7 @@ webpackJsonp([3],[
11693
  y : 'un anno',
11694
  yy : '%d anni'
11695
  },
11696
- dayOfMonthOrdinalParse : /\d{1,2}º/,
11697
  ordinal: '%dº',
11698
  week : {
11699
  dow : 1, // Monday is the first day of the week.
@@ -11707,7 +11195,7 @@ webpackJsonp([3],[
11707
 
11708
 
11709
  /***/ },
11710
- /* 346 */
11711
  /***/ function(module, exports, __webpack_require__) {
11712
 
11713
  //! moment.js locale configuration
@@ -11728,16 +11216,12 @@ webpackJsonp([3],[
11728
  weekdaysShort : '日_月_火_水_木_金_土'.split('_'),
11729
  weekdaysMin : '日_月_火_水_木_金_土'.split('_'),
11730
  longDateFormat : {
11731
- LT : 'HH:mm',
11732
- LTS : 'HH:mm:ss',
11733
  L : 'YYYY/MM/DD',
11734
  LL : 'YYYY年M月D日',
11735
- LLL : 'YYYY年M月D日 HH:mm',
11736
- LLLL : 'YYYY年M月D日 HH:mm dddd',
11737
- l : 'YYYY/MM/DD',
11738
- ll : 'YYYY年M月D日',
11739
- lll : 'YYYY年M月D日 HH:mm',
11740
- llll : 'YYYY年M月D日 HH:mm dddd'
11741
  },
11742
  meridiemParse: /午前|午後/i,
11743
  isPM : function (input) {
@@ -11758,7 +11242,7 @@ webpackJsonp([3],[
11758
  lastWeek : '[前週]dddd LT',
11759
  sameElse : 'L'
11760
  },
11761
- dayOfMonthOrdinalParse : /\d{1,2}日/,
11762
  ordinal : function (number, period) {
11763
  switch (period) {
11764
  case 'd':
@@ -11792,7 +11276,7 @@ webpackJsonp([3],[
11792
 
11793
 
11794
  /***/ },
11795
- /* 347 */
11796
  /***/ function(module, exports, __webpack_require__) {
11797
 
11798
  //! moment.js locale configuration
@@ -11880,7 +11364,7 @@ webpackJsonp([3],[
11880
 
11881
 
11882
  /***/ },
11883
- /* 348 */
11884
  /***/ function(module, exports, __webpack_require__) {
11885
 
11886
  //! moment.js locale configuration
@@ -11931,10 +11415,10 @@ webpackJsonp([3],[
11931
  },
11932
  past : function (s) {
11933
  if ((/(წამი|წუთი|საათი|დღე|თვე)/).test(s)) {
11934
- return s.replace(/(ი|ე)$/, 'ის უკან');
11935
  }
11936
  if ((/წელი/).test(s)) {
11937
- return s.replace(/წელი$/, 'წლის უკან');
11938
  }
11939
  },
11940
  s : 'რამდენიმე წამი',
@@ -11949,7 +11433,7 @@ webpackJsonp([3],[
11949
  y : 'წელი',
11950
  yy : '%d წელი'
11951
  },
11952
- dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
11953
  ordinal : function (number) {
11954
  if (number === 0) {
11955
  return number;
@@ -11974,7 +11458,7 @@ webpackJsonp([3],[
11974
 
11975
 
11976
  /***/ },
11977
- /* 349 */
11978
  /***/ function(module, exports, __webpack_require__) {
11979
 
11980
  //! moment.js locale configuration
@@ -12048,7 +11532,7 @@ webpackJsonp([3],[
12048
  y : 'бір жыл',
12049
  yy : '%d жыл'
12050
  },
12051
- dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/,
12052
  ordinal : function (number) {
12053
  var a = number % 10,
12054
  b = number >= 100 ? 100 : null;
@@ -12066,7 +11550,7 @@ webpackJsonp([3],[
12066
 
12067
 
12068
  /***/ },
12069
- /* 350 */
12070
  /***/ function(module, exports, __webpack_require__) {
12071
 
12072
  //! moment.js locale configuration
@@ -12129,138 +11613,7 @@ webpackJsonp([3],[
12129
 
12130
 
12131
  /***/ },
12132
- /* 351 */
12133
- /***/ function(module, exports, __webpack_require__) {
12134
-
12135
- //! moment.js locale configuration
12136
- //! locale : Kannada [kn]
12137
- //! author : Rajeev Naik : https://github.com/rajeevnaikte
12138
-
12139
- ;(function (global, factory) {
12140
- true ? factory(__webpack_require__(290)) :
12141
- typeof define === 'function' && define.amd ? define(['../moment'], factory) :
12142
- factory(global.moment)
12143
- }(this, (function (moment) { 'use strict';
12144
-
12145
-
12146
- var symbolMap = {
12147
- '1': '೧',
12148
- '2': '೨',
12149
- '3': '೩',
12150
- '4': '೪',
12151
- '5': '೫',
12152
- '6': '೬',
12153
- '7': '೭',
12154
- '8': '೮',
12155
- '9': '೯',
12156
- '0': '೦'
12157
- };
12158
- var numberMap = {
12159
- '೧': '1',
12160
- '೨': '2',
12161
- '೩': '3',
12162
- '೪': '4',
12163
- '೫': '5',
12164
- '೬': '6',
12165
- '೭': '7',
12166
- '೮': '8',
12167
- '೯': '9',
12168
- '೦': '0'
12169
- };
12170
-
12171
- var kn = moment.defineLocale('kn', {
12172
- months : 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split('_'),
12173
- monthsShort : 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬ_ಅಕ್ಟೋಬ_ನವೆಂಬ_ಡಿಸೆಂಬ'.split('_'),
12174
- monthsParseExact: true,
12175
- weekdays : 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split('_'),
12176
- weekdaysShort : 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),
12177
- weekdaysMin : 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),
12178
- longDateFormat : {
12179
- LT : 'A h:mm',
12180
- LTS : 'A h:mm:ss',
12181
- L : 'DD/MM/YYYY',
12182
- LL : 'D MMMM YYYY',
12183
- LLL : 'D MMMM YYYY, A h:mm',
12184
- LLLL : 'dddd, D MMMM YYYY, A h:mm'
12185
- },
12186
- calendar : {
12187
- sameDay : '[ಇಂದು] LT',
12188
- nextDay : '[ನಾಳೆ] LT',
12189
- nextWeek : 'dddd, LT',
12190
- lastDay : '[ನಿನ್ನೆ] LT',
12191
- lastWeek : '[ಕೊನೆಯ] dddd, LT',
12192
- sameElse : 'L'
12193
- },
12194
- relativeTime : {
12195
- future : '%s ನಂತರ',
12196
- past : '%s ಹಿಂದೆ',
12197
- s : 'ಕೆಲವು ಕ್ಷಣಗಳು',
12198
- m : 'ಒಂದು ನಿಮಿಷ',
12199
- mm : '%d ನಿಮಿಷ',
12200
- h : 'ಒಂದು ಗಂಟೆ',
12201
- hh : '%d ಗಂಟೆ',
12202
- d : 'ಒಂದು ದಿನ',
12203
- dd : '%d ದಿನ',
12204
- M : 'ಒಂದು ತಿಂಗಳು',
12205
- MM : '%d ತಿಂಗಳು',
12206
- y : 'ಒಂದು ವರ್ಷ',
12207
- yy : '%d ವರ್ಷ'
12208
- },
12209
- preparse: function (string) {
12210
- return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {
12211
- return numberMap[match];
12212
- });
12213
- },
12214
- postformat: function (string) {
12215
- return string.replace(/\d/g, function (match) {
12216
- return symbolMap[match];
12217
- });
12218
- },
12219
- meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,
12220
- meridiemHour : function (hour, meridiem) {
12221
- if (hour === 12) {
12222
- hour = 0;
12223
- }
12224
- if (meridiem === 'ರಾತ್ರಿ') {
12225
- return hour < 4 ? hour : hour + 12;
12226
- } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {
12227
- return hour;
12228
- } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {
12229
- return hour >= 10 ? hour : hour + 12;
12230
- } else if (meridiem === 'ಸಂಜೆ') {
12231
- return hour + 12;
12232
- }
12233
- },
12234
- meridiem : function (hour, minute, isLower) {
12235
- if (hour < 4) {
12236
- return 'ರಾತ್ರಿ';
12237
- } else if (hour < 10) {
12238
- return 'ಬೆಳಿಗ್ಗೆ';
12239
- } else if (hour < 17) {
12240
- return 'ಮಧ್ಯಾಹ್ನ';
12241
- } else if (hour < 20) {
12242
- return 'ಸಂಜೆ';
12243
- } else {
12244
- return 'ರಾತ್ರಿ';
12245
- }
12246
- },
12247
- dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/,
12248
- ordinal : function (number) {
12249
- return number + 'ನೇ';
12250
- },
12251
- week : {
12252
- dow : 0, // Sunday is the first day of the week.
12253
- doy : 6 // The week that contains Jan 1st is the first week of the year.
12254
- }
12255
- });
12256
-
12257
- return kn;
12258
-
12259
- })));
12260
-
12261
-
12262
- /***/ },
12263
- /* 352 */
12264
  /***/ function(module, exports, __webpack_require__) {
12265
 
12266
  //! moment.js locale configuration
@@ -12282,16 +11635,12 @@ webpackJsonp([3],[
12282
  weekdaysShort : '일_월_화_수_목_금_토'.split('_'),
12283
  weekdaysMin : '일_월_화_수_목_금_토'.split('_'),
12284
  longDateFormat : {
12285
- LT : 'A h:mm',
12286
- LTS : 'A h:mm:ss',
12287
  L : 'YYYY.MM.DD',
12288
  LL : 'YYYY년 MMMM D일',
12289
- LLL : 'YYYY년 MMMM D일 A h:mm',
12290
- LLLL : 'YYYY년 MMMM D일 dddd A h:mm',
12291
- l : 'YYYY.MM.DD',
12292
- ll : 'YYYY년 MMMM D일',
12293
- lll : 'YYYY년 MMMM D일 A h:mm',
12294
- llll : 'YYYY년 MMMM D일 dddd A h:mm'
12295
  },
12296
  calendar : {
12297
  sameDay : '오늘 LT',
@@ -12306,7 +11655,7 @@ webpackJsonp([3],[
12306
  past : '%s 전',
12307
  s : '몇 초',
12308
  ss : '%d초',
12309
- m : '1분',
12310
  mm : '%d분',
12311
  h : '한 시간',
12312
  hh : '%d시간',
@@ -12317,7 +11666,7 @@ webpackJsonp([3],[
12317
  y : '일 년',
12318
  yy : '%d년'
12319
  },
12320
- dayOfMonthOrdinalParse : /\d{1,2}일/,
12321
  ordinal : '%d일',
12322
  meridiemParse : /오전|오후/,
12323
  isPM : function (token) {
@@ -12334,7 +11683,7 @@ webpackJsonp([3],[
12334
 
12335
 
12336
  /***/ },
12337
- /* 353 */
12338
  /***/ function(module, exports, __webpack_require__) {
12339
 
12340
  //! moment.js locale configuration
@@ -12409,7 +11758,7 @@ webpackJsonp([3],[
12409
  y : 'бир жыл',
12410
  yy : '%d жыл'
12411
  },
12412
- dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/,
12413
  ordinal : function (number) {
12414
  var a = number % 10,
12415
  b = number >= 100 ? 100 : null;
@@ -12427,7 +11776,7 @@ webpackJsonp([3],[
12427
 
12428
 
12429
  /***/ },
12430
- /* 354 */
12431
  /***/ function(module, exports, __webpack_require__) {
12432
 
12433
  //! moment.js locale configuration
@@ -12555,7 +11904,7 @@ webpackJsonp([3],[
12555
  y : processRelativeTime,
12556
  yy : '%d Joer'
12557
  },
12558
- dayOfMonthOrdinalParse: /\d{1,2}\./,
12559
  ordinal: '%d.',
12560
  week: {
12561
  dow: 1, // Monday is the first day of the week.
@@ -12569,7 +11918,7 @@ webpackJsonp([3],[
12569
 
12570
 
12571
  /***/ },
12572
- /* 355 */
12573
  /***/ function(module, exports, __webpack_require__) {
12574
 
12575
  //! moment.js locale configuration
@@ -12632,7 +11981,7 @@ webpackJsonp([3],[
12632
  y : '1 ປີ',
12633
  yy : '%d ປີ'
12634
  },
12635
- dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/,
12636
  ordinal : function (number) {
12637
  return 'ທີ່' + number;
12638
  }
@@ -12644,7 +11993,7 @@ webpackJsonp([3],[
12644
 
12645
 
12646
  /***/ },
12647
- /* 356 */
12648
  /***/ function(module, exports, __webpack_require__) {
12649
 
12650
  //! moment.js locale configuration
@@ -12750,7 +12099,7 @@ webpackJsonp([3],[
12750
  y : translateSingular,
12751
  yy : translate
12752
  },
12753
- dayOfMonthOrdinalParse: /\d{1,2}-oji/,
12754
  ordinal : function (number) {
12755
  return number + '-oji';
12756
  },
@@ -12766,7 +12115,7 @@ webpackJsonp([3],[
12766
 
12767
 
12768
  /***/ },
12769
- /* 357 */
12770
  /***/ function(module, exports, __webpack_require__) {
12771
 
12772
  //! moment.js locale configuration
@@ -12854,7 +12203,7 @@ webpackJsonp([3],[
12854
  y : relativeTimeWithSingular,
12855
  yy : relativeTimeWithPlural
12856
  },
12857
- dayOfMonthOrdinalParse: /\d{1,2}\./,
12858
  ordinal : '%d.',
12859
  week : {
12860
  dow : 1, // Monday is the first day of the week.
@@ -12868,7 +12217,7 @@ webpackJsonp([3],[
12868
 
12869
 
12870
  /***/ },
12871
- /* 358 */
12872
  /***/ function(module, exports, __webpack_require__) {
12873
 
12874
  //! moment.js locale configuration
@@ -12970,7 +12319,7 @@ webpackJsonp([3],[
12970
  y : 'godinu',
12971
  yy : translator.translate
12972
  },
12973
- dayOfMonthOrdinalParse: /\d{1,2}\./,
12974
  ordinal : '%d.',
12975
  week : {
12976
  dow : 1, // Monday is the first day of the week.
@@ -12984,7 +12333,7 @@ webpackJsonp([3],[
12984
 
12985
 
12986
  /***/ },
12987
- /* 359 */
12988
  /***/ function(module, exports, __webpack_require__) {
12989
 
12990
  //! moment.js locale configuration
@@ -13039,7 +12388,7 @@ webpackJsonp([3],[
13039
  y: 'he tau',
13040
  yy: '%d tau'
13041
  },
13042
- dayOfMonthOrdinalParse: /\d{1,2}º/,
13043
  ordinal: '%dº',
13044
  week : {
13045
  dow : 1, // Monday is the first day of the week.
@@ -13053,7 +12402,7 @@ webpackJsonp([3],[
13053
 
13054
 
13055
  /***/ },
13056
- /* 360 */
13057
  /***/ function(module, exports, __webpack_require__) {
13058
 
13059
  //! moment.js locale configuration
@@ -13116,7 +12465,7 @@ webpackJsonp([3],[
13116
  y : 'година',
13117
  yy : '%d години'
13118
  },
13119
- dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
13120
  ordinal : function (number) {
13121
  var lastDigit = number % 10,
13122
  last2Digits = number % 100;
@@ -13148,7 +12497,7 @@ webpackJsonp([3],[
13148
 
13149
 
13150
  /***/ },
13151
- /* 361 */
13152
  /***/ function(module, exports, __webpack_require__) {
13153
 
13154
  //! moment.js locale configuration
@@ -13234,7 +12583,7 @@ webpackJsonp([3],[
13234
 
13235
 
13236
  /***/ },
13237
- /* 362 */
13238
  /***/ function(module, exports, __webpack_require__) {
13239
 
13240
  //! moment.js locale configuration
@@ -13398,7 +12747,7 @@ webpackJsonp([3],[
13398
 
13399
 
13400
  /***/ },
13401
- /* 363 */
13402
  /***/ function(module, exports, __webpack_require__) {
13403
 
13404
  //! moment.js locale configuration
@@ -13485,7 +12834,7 @@ webpackJsonp([3],[
13485
 
13486
 
13487
  /***/ },
13488
- /* 364 */
13489
  /***/ function(module, exports, __webpack_require__) {
13490
 
13491
  //! moment.js locale configuration
@@ -13573,7 +12922,7 @@ webpackJsonp([3],[
13573
 
13574
 
13575
  /***/ },
13576
- /* 365 */
13577
  /***/ function(module, exports, __webpack_require__) {
13578
 
13579
  //! moment.js locale configuration
@@ -13674,7 +13023,7 @@ webpackJsonp([3],[
13674
 
13675
 
13676
  /***/ },
13677
- /* 366 */
13678
  /***/ function(module, exports, __webpack_require__) {
13679
 
13680
  //! moment.js locale configuration
@@ -13728,7 +13077,7 @@ webpackJsonp([3],[
13728
  y : 'ett år',
13729
  yy : '%d år'
13730
  },
13731
- dayOfMonthOrdinalParse: /\d{1,2}\./,
13732
  ordinal : '%d.',
13733
  week : {
13734
  dow : 1, // Monday is the first day of the week.
@@ -13742,7 +13091,7 @@ webpackJsonp([3],[
13742
 
13743
 
13744
  /***/ },
13745
- /* 367 */
13746
  /***/ function(module, exports, __webpack_require__) {
13747
 
13748
  //! moment.js locale configuration
@@ -13870,7 +13219,7 @@ webpackJsonp([3],[
13870
 
13871
 
13872
  /***/ },
13873
- /* 368 */
13874
  /***/ function(module, exports, __webpack_require__) {
13875
 
13876
  //! moment.js locale configuration
@@ -13894,9 +13243,7 @@ webpackJsonp([3],[
13894
  var nl = moment.defineLocale('nl', {
13895
  months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
13896
  monthsShort : function (m, format) {
13897
- if (!m) {
13898
- return monthsShortWithDots;
13899
- } else if (/-MMM-/.test(format)) {
13900
  return monthsShortWithoutDots[m.month()];
13901
  } else {
13902
  return monthsShortWithDots[m.month()];
@@ -13947,7 +13294,7 @@ webpackJsonp([3],[
13947
  y : 'één jaar',
13948
  yy : '%d jaar'
13949
  },
13950
- dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
13951
  ordinal : function (number) {
13952
  return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
13953
  },
@@ -13963,7 +13310,7 @@ webpackJsonp([3],[
13963
 
13964
 
13965
  /***/ },
13966
- /* 369 */
13967
  /***/ function(module, exports, __webpack_require__) {
13968
 
13969
  //! moment.js locale configuration
@@ -13987,9 +13334,7 @@ webpackJsonp([3],[
13987
  var nlBe = moment.defineLocale('nl-be', {
13988
  months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
13989
  monthsShort : function (m, format) {
13990
- if (!m) {
13991
- return monthsShortWithDots;
13992
- } else if (/-MMM-/.test(format)) {
13993
  return monthsShortWithoutDots[m.month()];
13994
  } else {
13995
  return monthsShortWithDots[m.month()];
@@ -14040,7 +13385,7 @@ webpackJsonp([3],[
14040
  y : 'één jaar',
14041
  yy : '%d jaar'
14042
  },
14043
- dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
14044
  ordinal : function (number) {
14045
  return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
14046
  },
@@ -14056,7 +13401,7 @@ webpackJsonp([3],[
14056
 
14057
 
14058
  /***/ },
14059
- /* 370 */
14060
  /***/ function(module, exports, __webpack_require__) {
14061
 
14062
  //! moment.js locale configuration
@@ -14107,7 +13452,7 @@ webpackJsonp([3],[
14107
  y : 'eit år',
14108
  yy : '%d år'
14109
  },
14110
- dayOfMonthOrdinalParse: /\d{1,2}\./,
14111
  ordinal : '%d.',
14112
  week : {
14113
  dow : 1, // Monday is the first day of the week.
@@ -14121,7 +13466,7 @@ webpackJsonp([3],[
14121
 
14122
 
14123
  /***/ },
14124
- /* 371 */
14125
  /***/ function(module, exports, __webpack_require__) {
14126
 
14127
  //! moment.js locale configuration
@@ -14250,7 +13595,7 @@ webpackJsonp([3],[
14250
 
14251
 
14252
  /***/ },
14253
- /* 372 */
14254
  /***/ function(module, exports, __webpack_require__) {
14255
 
14256
  //! moment.js locale configuration
@@ -14289,9 +13634,7 @@ webpackJsonp([3],[
14289
 
14290
  var pl = moment.defineLocale('pl', {
14291
  months : function (momentToFormat, format) {
14292
- if (!momentToFormat) {
14293
- return monthsNominative;
14294
- } else if (format === '') {
14295
  // Hack: if format empty we know this is used to generate
14296
  // RegExp by moment. Give then back both valid forms of months
14297
  // in RegExp ready format.
@@ -14348,7 +13691,7 @@ webpackJsonp([3],[
14348
  y : 'rok',
14349
  yy : translate
14350
  },
14351
- dayOfMonthOrdinalParse: /\d{1,2}\./,
14352
  ordinal : '%d.',
14353
  week : {
14354
  dow : 1, // Monday is the first day of the week.
@@ -14362,7 +13705,7 @@ webpackJsonp([3],[
14362
 
14363
 
14364
  /***/ },
14365
- /* 373 */
14366
  /***/ function(module, exports, __webpack_require__) {
14367
 
14368
  //! moment.js locale configuration
@@ -14381,7 +13724,7 @@ webpackJsonp([3],[
14381
  monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
14382
  weekdays : 'Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado'.split('_'),
14383
  weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
14384
- weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
14385
  weekdaysParseExact : true,
14386
  longDateFormat : {
14387
  LT : 'HH:mm',
@@ -14418,7 +13761,7 @@ webpackJsonp([3],[
14418
  y : 'um ano',
14419
  yy : '%d anos'
14420
  },
14421
- dayOfMonthOrdinalParse: /\d{1,2}º/,
14422
  ordinal : '%dº',
14423
  week : {
14424
  dow : 1, // Monday is the first day of the week.
@@ -14432,7 +13775,7 @@ webpackJsonp([3],[
14432
 
14433
 
14434
  /***/ },
14435
- /* 374 */
14436
  /***/ function(module, exports, __webpack_require__) {
14437
 
14438
  //! moment.js locale configuration
@@ -14451,7 +13794,7 @@ webpackJsonp([3],[
14451
  monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
14452
  weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),
14453
  weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
14454
- weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
14455
  weekdaysParseExact : true,
14456
  longDateFormat : {
14457
  LT : 'HH:mm',
@@ -14488,7 +13831,7 @@ webpackJsonp([3],[
14488
  y : 'um ano',
14489
  yy : '%d anos'
14490
  },
14491
- dayOfMonthOrdinalParse: /\d{1,2}º/,
14492
  ordinal : '%dº'
14493
  });
14494
 
@@ -14498,7 +13841,7 @@ webpackJsonp([3],[
14498
 
14499
 
14500
  /***/ },
14501
- /* 375 */
14502
  /***/ function(module, exports, __webpack_require__) {
14503
 
14504
  //! moment.js locale configuration
@@ -14578,7 +13921,7 @@ webpackJsonp([3],[
14578
 
14579
 
14580
  /***/ },
14581
- /* 376 */
14582
  /***/ function(module, exports, __webpack_require__) {
14583
 
14584
  //! moment.js locale configuration
@@ -14738,7 +14081,7 @@ webpackJsonp([3],[
14738
  return 'вечера';
14739
  }
14740
  },
14741
- dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
14742
  ordinal: function (number, period) {
14743
  switch (period) {
14744
  case 'M':
@@ -14766,110 +14109,7 @@ webpackJsonp([3],[
14766
 
14767
 
14768
  /***/ },
14769
- /* 377 */
14770
- /***/ function(module, exports, __webpack_require__) {
14771
-
14772
- //! moment.js locale configuration
14773
- //! locale : Sindhi [sd]
14774
- //! author : Narain Sagar : https://github.com/narainsagar
14775
-
14776
- ;(function (global, factory) {
14777
- true ? factory(__webpack_require__(290)) :
14778
- typeof define === 'function' && define.amd ? define(['../moment'], factory) :
14779
- factory(global.moment)
14780
- }(this, (function (moment) { 'use strict';
14781
-
14782
-
14783
- var months = [
14784
- 'جنوري',
14785
- 'فيبروري',
14786
- 'مارچ',
14787
- 'اپريل',
14788
- 'مئي',
14789
- 'جون',
14790
- 'جولاءِ',
14791
- 'آگسٽ',
14792
- 'سيپٽمبر',
14793
- 'آڪٽوبر',
14794
- 'نومبر',
14795
- 'ڊسمبر'
14796
- ];
14797
- var days = [
14798
- 'آچر',
14799
- 'سومر',
14800
- 'اڱارو',
14801
- 'اربع',
14802
- 'خميس',
14803
- 'جمع',
14804
- 'ڇنڇر'
14805
- ];
14806
-
14807
- var sd = moment.defineLocale('sd', {
14808
- months : months,
14809
- monthsShort : months,
14810
- weekdays : days,
14811
- weekdaysShort : days,
14812
- weekdaysMin : days,
14813
- longDateFormat : {
14814
- LT : 'HH:mm',
14815
- LTS : 'HH:mm:ss',
14816
- L : 'DD/MM/YYYY',
14817
- LL : 'D MMMM YYYY',
14818
- LLL : 'D MMMM YYYY HH:mm',
14819
- LLLL : 'dddd، D MMMM YYYY HH:mm'
14820
- },
14821
- meridiemParse: /صبح|شام/,
14822
- isPM : function (input) {
14823
- return 'شام' === input;
14824
- },
14825
- meridiem : function (hour, minute, isLower) {
14826
- if (hour < 12) {
14827
- return 'صبح';
14828
- }
14829
- return 'شام';
14830
- },
14831
- calendar : {
14832
- sameDay : '[اڄ] LT',
14833
- nextDay : '[سڀاڻي] LT',
14834
- nextWeek : 'dddd [اڳين هفتي تي] LT',
14835
- lastDay : '[ڪالهه] LT',
14836
- lastWeek : '[گزريل هفتي] dddd [تي] LT',
14837
- sameElse : 'L'
14838
- },
14839
- relativeTime : {
14840
- future : '%s پوء',
14841
- past : '%s اڳ',
14842
- s : 'چند سيڪنڊ',
14843
- m : 'هڪ منٽ',
14844
- mm : '%d منٽ',
14845
- h : 'هڪ ڪلاڪ',
14846
- hh : '%d ڪلاڪ',
14847
- d : 'هڪ ڏينهن',
14848
- dd : '%d ڏينهن',
14849
- M : 'هڪ مهينو',
14850
- MM : '%d مهينا',
14851
- y : 'هڪ سال',
14852
- yy : '%d سال'
14853
- },
14854
- preparse: function (string) {
14855
- return string.replace(/،/g, ',');
14856
- },
14857
- postformat: function (string) {
14858
- return string.replace(/,/g, '،');
14859
- },
14860
- week : {
14861
- dow : 1, // Monday is the first day of the week.
14862
- doy : 4 // The week that contains Jan 4th is the first week of the year.
14863
- }
14864
- });
14865
-
14866
- return sd;
14867
-
14868
- })));
14869
-
14870
-
14871
- /***/ },
14872
- /* 378 */
14873
  /***/ function(module, exports, __webpack_require__) {
14874
 
14875
  //! moment.js locale configuration
@@ -14921,7 +14161,7 @@ webpackJsonp([3],[
14921
  y : 'okta jahki',
14922
  yy : '%d jagit'
14923
  },
14924
- dayOfMonthOrdinalParse: /\d{1,2}\./,
14925
  ordinal : '%d.',
14926
  week : {
14927
  dow : 1, // Monday is the first day of the week.
@@ -14935,7 +14175,7 @@ webpackJsonp([3],[
14935
 
14936
 
14937
  /***/ },
14938
- /* 379 */
14939
  /***/ function(module, exports, __webpack_require__) {
14940
 
14941
  //! moment.js locale configuration
@@ -14988,7 +14228,7 @@ webpackJsonp([3],[
14988
  y : 'වසර',
14989
  yy : 'වසර %d'
14990
  },
14991
- dayOfMonthOrdinalParse: /\d{1,2} වැනි/,
14992
  ordinal : function (number) {
14993
  return number + ' වැනි';
14994
  },
@@ -15011,7 +14251,7 @@ webpackJsonp([3],[
15011
 
15012
 
15013
  /***/ },
15014
- /* 380 */
15015
  /***/ function(module, exports, __webpack_require__) {
15016
 
15017
  //! moment.js locale configuration
@@ -15152,7 +14392,7 @@ webpackJsonp([3],[
15152
  y : translate,
15153
  yy : translate
15154
  },
15155
- dayOfMonthOrdinalParse: /\d{1,2}\./,
15156
  ordinal : '%d.',
15157
  week : {
15158
  dow : 1, // Monday is the first day of the week.
@@ -15166,7 +14406,7 @@ webpackJsonp([3],[
15166
 
15167
 
15168
  /***/ },
15169
- /* 381 */
15170
  /***/ function(module, exports, __webpack_require__) {
15171
 
15172
  //! moment.js locale configuration
@@ -15319,7 +14559,7 @@ webpackJsonp([3],[
15319
  y : processRelativeTime,
15320
  yy : processRelativeTime
15321
  },
15322
- dayOfMonthOrdinalParse: /\d{1,2}\./,
15323
  ordinal : '%d.',
15324
  week : {
15325
  dow : 1, // Monday is the first day of the week.
@@ -15333,7 +14573,7 @@ webpackJsonp([3],[
15333
 
15334
 
15335
  /***/ },
15336
- /* 382 */
15337
  /***/ function(module, exports, __webpack_require__) {
15338
 
15339
  //! moment.js locale configuration
@@ -15394,7 +14634,7 @@ webpackJsonp([3],[
15394
  y : 'një vit',
15395
  yy : '%d vite'
15396
  },
15397
- dayOfMonthOrdinalParse: /\d{1,2}\./,
15398
  ordinal : '%d.',
15399
  week : {
15400
  dow : 1, // Monday is the first day of the week.
@@ -15408,7 +14648,7 @@ webpackJsonp([3],[
15408
 
15409
 
15410
  /***/ },
15411
- /* 383 */
15412
  /***/ function(module, exports, __webpack_require__) {
15413
 
15414
  //! moment.js locale configuration
@@ -15509,7 +14749,7 @@ webpackJsonp([3],[
15509
  y : 'godinu',
15510
  yy : translator.translate
15511
  },
15512
- dayOfMonthOrdinalParse: /\d{1,2}\./,
15513
  ordinal : '%d.',
15514
  week : {
15515
  dow : 1, // Monday is the first day of the week.
@@ -15523,7 +14763,7 @@ webpackJsonp([3],[
15523
 
15524
 
15525
  /***/ },
15526
- /* 384 */
15527
  /***/ function(module, exports, __webpack_require__) {
15528
 
15529
  //! moment.js locale configuration
@@ -15624,7 +14864,7 @@ webpackJsonp([3],[
15624
  y : 'годину',
15625
  yy : translator.translate
15626
  },
15627
- dayOfMonthOrdinalParse: /\d{1,2}\./,
15628
  ordinal : '%d.',
15629
  week : {
15630
  dow : 1, // Monday is the first day of the week.
@@ -15638,7 +14878,7 @@ webpackJsonp([3],[
15638
 
15639
 
15640
  /***/ },
15641
- /* 385 */
15642
  /***/ function(module, exports, __webpack_require__) {
15643
 
15644
  //! moment.js locale configuration
@@ -15718,7 +14958,7 @@ webpackJsonp([3],[
15718
  return hour + 12;
15719
  }
15720
  },
15721
- dayOfMonthOrdinalParse: /\d{1,2}/,
15722
  ordinal : '%d',
15723
  week : {
15724
  dow : 1, // Monday is the first day of the week.
@@ -15732,7 +14972,7 @@ webpackJsonp([3],[
15732
 
15733
 
15734
  /***/ },
15735
- /* 386 */
15736
  /***/ function(module, exports, __webpack_require__) {
15737
 
15738
  //! moment.js locale configuration
@@ -15785,7 +15025,7 @@ webpackJsonp([3],[
15785
  y : 'ett år',
15786
  yy : '%d år'
15787
  },
15788
- dayOfMonthOrdinalParse: /\d{1,2}(e|a)/,
15789
  ordinal : function (number) {
15790
  var b = number % 10,
15791
  output = (~~(number % 100 / 10) === 1) ? 'e' :
@@ -15806,7 +15046,7 @@ webpackJsonp([3],[
15806
 
15807
 
15808
  /***/ },
15809
- /* 387 */
15810
  /***/ function(module, exports, __webpack_require__) {
15811
 
15812
  //! moment.js locale configuration
@@ -15870,7 +15110,7 @@ webpackJsonp([3],[
15870
 
15871
 
15872
  /***/ },
15873
- /* 388 */
15874
  /***/ function(module, exports, __webpack_require__) {
15875
 
15876
  //! moment.js locale configuration
@@ -15946,7 +15186,7 @@ webpackJsonp([3],[
15946
  y : 'ஒரு வருடம்',
15947
  yy : '%d ஆண்டுகள்'
15948
  },
15949
- dayOfMonthOrdinalParse: /\d{1,2}வது/,
15950
  ordinal : function (number) {
15951
  return number + 'வது';
15952
  },
@@ -16005,7 +15245,7 @@ webpackJsonp([3],[
16005
 
16006
 
16007
  /***/ },
16008
- /* 389 */
16009
  /***/ function(module, exports, __webpack_require__) {
16010
 
16011
  //! moment.js locale configuration
@@ -16057,7 +15297,7 @@ webpackJsonp([3],[
16057
  y : 'ఒక సంవత్సరం',
16058
  yy : '%d సంవత్సరాలు'
16059
  },
16060
- dayOfMonthOrdinalParse : /\d{1,2}వ/,
16061
  ordinal : '%dవ',
16062
  meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,
16063
  meridiemHour : function (hour, meridiem) {
@@ -16099,7 +15339,7 @@ webpackJsonp([3],[
16099
 
16100
 
16101
  /***/ },
16102
- /* 390 */
16103
  /***/ function(module, exports, __webpack_require__) {
16104
 
16105
  //! moment.js locale configuration
@@ -16151,7 +15391,7 @@ webpackJsonp([3],[
16151
  y : 'tinan ida',
16152
  yy : 'tinan %d'
16153
  },
16154
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
16155
  ordinal : function (number) {
16156
  var b = number % 10,
16157
  output = (~~(number % 100 / 10) === 1) ? 'th' :
@@ -16172,7 +15412,7 @@ webpackJsonp([3],[
16172
 
16173
 
16174
  /***/ },
16175
- /* 391 */
16176
  /***/ function(module, exports, __webpack_require__) {
16177
 
16178
  //! moment.js locale configuration
@@ -16197,7 +15437,7 @@ webpackJsonp([3],[
16197
  longDateFormat : {
16198
  LT : 'H:mm',
16199
  LTS : 'H:mm:ss',
16200
- L : 'DD/MM/YYYY',
16201
  LL : 'D MMMM YYYY',
16202
  LLL : 'D MMMM YYYY เวลา H:mm',
16203
  LLLL : 'วันddddที่ D MMMM YYYY เวลา H:mm'
@@ -16244,7 +15484,7 @@ webpackJsonp([3],[
16244
 
16245
 
16246
  /***/ },
16247
- /* 392 */
16248
  /***/ function(module, exports, __webpack_require__) {
16249
 
16250
  //! moment.js locale configuration
@@ -16295,7 +15535,7 @@ webpackJsonp([3],[
16295
  y : 'isang taon',
16296
  yy : '%d taon'
16297
  },
16298
- dayOfMonthOrdinalParse: /\d{1,2}/,
16299
  ordinal : function (number) {
16300
  return number;
16301
  },
@@ -16311,7 +15551,7 @@ webpackJsonp([3],[
16311
 
16312
 
16313
  /***/ },
16314
- /* 393 */
16315
  /***/ function(module, exports, __webpack_require__) {
16316
 
16317
  //! moment.js locale configuration
@@ -16422,7 +15662,7 @@ webpackJsonp([3],[
16422
  y : 'wa’ DIS',
16423
  yy : translate
16424
  },
16425
- dayOfMonthOrdinalParse: /\d{1,2}\./,
16426
  ordinal : '%d.',
16427
  week : {
16428
  dow : 1, // Monday is the first day of the week.
@@ -16436,7 +15676,7 @@ webpackJsonp([3],[
16436
 
16437
 
16438
  /***/ },
16439
- /* 394 */
16440
  /***/ function(module, exports, __webpack_require__) {
16441
 
16442
  //! moment.js locale configuration
@@ -16509,7 +15749,7 @@ webpackJsonp([3],[
16509
  y : 'bir yıl',
16510
  yy : '%d yıl'
16511
  },
16512
- dayOfMonthOrdinalParse: /\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,
16513
  ordinal : function (number) {
16514
  if (number === 0) { // special case for zero
16515
  return number + '\'ıncı';
@@ -16531,7 +15771,7 @@ webpackJsonp([3],[
16531
 
16532
 
16533
  /***/ },
16534
- /* 395 */
16535
  /***/ function(module, exports, __webpack_require__) {
16536
 
16537
  //! moment.js locale configuration
@@ -16596,7 +15836,7 @@ webpackJsonp([3],[
16596
  y : processRelativeTime,
16597
  yy : processRelativeTime
16598
  },
16599
- dayOfMonthOrdinalParse: /\d{1,2}\./,
16600
  ordinal : '%d.',
16601
  week : {
16602
  dow : 1, // Monday is the first day of the week.
@@ -16627,7 +15867,7 @@ webpackJsonp([3],[
16627
 
16628
 
16629
  /***/ },
16630
- /* 396 */
16631
  /***/ function(module, exports, __webpack_require__) {
16632
 
16633
  //! moment.js locale configuration
@@ -16690,7 +15930,7 @@ webpackJsonp([3],[
16690
 
16691
 
16692
  /***/ },
16693
- /* 397 */
16694
  /***/ function(module, exports, __webpack_require__) {
16695
 
16696
  //! moment.js locale configuration
@@ -16753,7 +15993,7 @@ webpackJsonp([3],[
16753
 
16754
 
16755
  /***/ },
16756
- /* 398 */
16757
  /***/ function(module, exports, __webpack_require__) {
16758
 
16759
  //! moment.js locale configuration
@@ -16795,13 +16035,8 @@ webpackJsonp([3],[
16795
  'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),
16796
  'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),
16797
  'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')
16798
- };
16799
-
16800
- if (!m) {
16801
- return weekdays['nominative'];
16802
- }
16803
-
16804
- var nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ?
16805
  'accusative' :
16806
  ((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ?
16807
  'genitive' :
@@ -16882,7 +16117,7 @@ webpackJsonp([3],[
16882
  return 'вечора';
16883
  }
16884
  },
16885
- dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/,
16886
  ordinal: function (number, period) {
16887
  switch (period) {
16888
  case 'M':
@@ -16909,111 +16144,7 @@ webpackJsonp([3],[
16909
 
16910
 
16911
  /***/ },
16912
- /* 399 */
16913
- /***/ function(module, exports, __webpack_require__) {
16914
-
16915
- //! moment.js locale configuration
16916
- //! locale : Urdu [ur]
16917
- //! author : Sawood Alam : https://github.com/ibnesayeed
16918
- //! author : Zack : https://github.com/ZackVision
16919
-
16920
- ;(function (global, factory) {
16921
- true ? factory(__webpack_require__(290)) :
16922
- typeof define === 'function' && define.amd ? define(['../moment'], factory) :
16923
- factory(global.moment)
16924
- }(this, (function (moment) { 'use strict';
16925
-
16926
-
16927
- var months = [
16928
- 'جنوری',
16929
- 'فروری',
16930
- 'مارچ',
16931
- 'اپریل',
16932
- 'مئی',
16933
- 'جون',
16934
- 'جولائی',
16935
- 'اگست',
16936
- 'ستمبر',
16937
- 'اکتوبر',
16938
- 'نومبر',
16939
- 'دسمبر'
16940
- ];
16941
- var days = [
16942
- 'اتوار',
16943
- 'پیر',
16944
- 'منگل',
16945
- 'بدھ',
16946
- 'جمعرات',
16947
- 'جمعہ',
16948
- 'ہفتہ'
16949
- ];
16950
-
16951
- var ur = moment.defineLocale('ur', {
16952
- months : months,
16953
- monthsShort : months,
16954
- weekdays : days,
16955
- weekdaysShort : days,
16956
- weekdaysMin : days,
16957
- longDateFormat : {
16958
- LT : 'HH:mm',
16959
- LTS : 'HH:mm:ss',
16960
- L : 'DD/MM/YYYY',
16961
- LL : 'D MMMM YYYY',
16962
- LLL : 'D MMMM YYYY HH:mm',
16963
- LLLL : 'dddd، D MMMM YYYY HH:mm'
16964
- },
16965
- meridiemParse: /صبح|شام/,
16966
- isPM : function (input) {
16967
- return 'شام' === input;
16968
- },
16969
- meridiem : function (hour, minute, isLower) {
16970
- if (hour < 12) {
16971
- return 'صبح';
16972
- }
16973
- return 'شام';
16974
- },
16975
- calendar : {
16976
- sameDay : '[آج بوقت] LT',
16977
- nextDay : '[کل بوقت] LT',
16978
- nextWeek : 'dddd [بوقت] LT',
16979
- lastDay : '[گذشتہ روز بوقت] LT',
16980
- lastWeek : '[گذشتہ] dddd [بوقت] LT',
16981
- sameElse : 'L'
16982
- },
16983
- relativeTime : {
16984
- future : '%s بعد',
16985
- past : '%s قبل',
16986
- s : 'چند سیکنڈ',
16987
- m : 'ایک منٹ',
16988
- mm : '%d منٹ',
16989
- h : 'ایک گھنٹہ',
16990
- hh : '%d گھنٹے',
16991
- d : 'ایک دن',
16992
- dd : '%d دن',
16993
- M : 'ایک ماہ',
16994
- MM : '%d ماہ',
16995
- y : 'ایک سال',
16996
- yy : '%d سال'
16997
- },
16998
- preparse: function (string) {
16999
- return string.replace(/،/g, ',');
17000
- },
17001
- postformat: function (string) {
17002
- return string.replace(/,/g, '،');
17003
- },
17004
- week : {
17005
- dow : 1, // Monday is the first day of the week.
17006
- doy : 4 // The week that contains Jan 4th is the first week of the year.
17007
- }
17008
- });
17009
-
17010
- return ur;
17011
-
17012
- })));
17013
-
17014
-
17015
- /***/ },
17016
- /* 400 */
17017
  /***/ function(module, exports, __webpack_require__) {
17018
 
17019
  //! moment.js locale configuration
@@ -17076,70 +16207,7 @@ webpackJsonp([3],[
17076
 
17077
 
17078
  /***/ },
17079
- /* 401 */
17080
- /***/ function(module, exports, __webpack_require__) {
17081
-
17082
- //! moment.js locale configuration
17083
- //! locale : Uzbek Latin [uz-latn]
17084
- //! author : Rasulbek Mirzayev : github.com/Rasulbeeek
17085
-
17086
- ;(function (global, factory) {
17087
- true ? factory(__webpack_require__(290)) :
17088
- typeof define === 'function' && define.amd ? define(['../moment'], factory) :
17089
- factory(global.moment)
17090
- }(this, (function (moment) { 'use strict';
17091
-
17092
-
17093
- var uzLatn = moment.defineLocale('uz-latn', {
17094
- months : 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split('_'),
17095
- monthsShort : 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),
17096
- weekdays : 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split('_'),
17097
- weekdaysShort : 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),
17098
- weekdaysMin : 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),
17099
- longDateFormat : {
17100
- LT : 'HH:mm',
17101
- LTS : 'HH:mm:ss',
17102
- L : 'DD/MM/YYYY',
17103
- LL : 'D MMMM YYYY',
17104
- LLL : 'D MMMM YYYY HH:mm',
17105
- LLLL : 'D MMMM YYYY, dddd HH:mm'
17106
- },
17107
- calendar : {
17108
- sameDay : '[Bugun soat] LT [da]',
17109
- nextDay : '[Ertaga] LT [da]',
17110
- nextWeek : 'dddd [kuni soat] LT [da]',
17111
- lastDay : '[Kecha soat] LT [da]',
17112
- lastWeek : '[O\'tgan] dddd [kuni soat] LT [da]',
17113
- sameElse : 'L'
17114
- },
17115
- relativeTime : {
17116
- future : 'Yaqin %s ichida',
17117
- past : 'Bir necha %s oldin',
17118
- s : 'soniya',
17119
- m : 'bir daqiqa',
17120
- mm : '%d daqiqa',
17121
- h : 'bir soat',
17122
- hh : '%d soat',
17123
- d : 'bir kun',
17124
- dd : '%d kun',
17125
- M : 'bir oy',
17126
- MM : '%d oy',
17127
- y : 'bir yil',
17128
- yy : '%d yil'
17129
- },
17130
- week : {
17131
- dow : 1, // Monday is the first day of the week.
17132
- doy : 7 // The week that contains Jan 1st is the first week of the year.
17133
- }
17134
- });
17135
-
17136
- return uzLatn;
17137
-
17138
- })));
17139
-
17140
-
17141
- /***/ },
17142
- /* 402 */
17143
  /***/ function(module, exports, __webpack_require__) {
17144
 
17145
  //! moment.js locale configuration
@@ -17207,7 +16275,7 @@ webpackJsonp([3],[
17207
  y : 'một năm',
17208
  yy : '%d năm'
17209
  },
17210
- dayOfMonthOrdinalParse: /\d{1,2}/,
17211
  ordinal : function (number) {
17212
  return number;
17213
  },
@@ -17223,7 +16291,7 @@ webpackJsonp([3],[
17223
 
17224
 
17225
  /***/ },
17226
- /* 403 */
17227
  /***/ function(module, exports, __webpack_require__) {
17228
 
17229
  //! moment.js locale configuration
@@ -17275,7 +16343,7 @@ webpackJsonp([3],[
17275
  y : 'á ~ýéár',
17276
  yy : '%d ý~éárs'
17277
  },
17278
- dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
17279
  ordinal : function (number) {
17280
  var b = number % 10,
17281
  output = (~~(number % 100 / 10) === 1) ? 'th' :
@@ -17296,7 +16364,7 @@ webpackJsonp([3],[
17296
 
17297
 
17298
  /***/ },
17299
- /* 404 */
17300
  /***/ function(module, exports, __webpack_require__) {
17301
 
17302
  //! moment.js locale configuration
@@ -17347,7 +16415,7 @@ webpackJsonp([3],[
17347
  y : 'ọdún kan',
17348
  yy : 'ọdún %d'
17349
  },
17350
- dayOfMonthOrdinalParse : /ọjọ́\s\d{1,2}/,
17351
  ordinal : 'ọjọ́ %d',
17352
  week : {
17353
  dow : 1, // Monday is the first day of the week.
@@ -17361,7 +16429,7 @@ webpackJsonp([3],[
17361
 
17362
 
17363
  /***/ },
17364
- /* 405 */
17365
  /***/ function(module, exports, __webpack_require__) {
17366
 
17367
  //! moment.js locale configuration
@@ -17383,16 +16451,16 @@ webpackJsonp([3],[
17383
  weekdaysShort : '周日_周一_周二_周三_周四_周五_周六'.split('_'),
17384
  weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
17385
  longDateFormat : {
17386
- LT : 'HH:mm',
17387
- LTS : 'HH:mm:ss',
17388
- L : 'YYYY年MMMD日',
17389
  LL : 'YYYY年MMMD日',
17390
  LLL : 'YYYY年MMMD日Ah点mm分',
17391
  LLLL : 'YYYY年MMMD日ddddAh点mm分',
17392
- l : 'YYYY年MMMD日',
17393
  ll : 'YYYY年MMMD日',
17394
- lll : 'YYYY年MMMD日 HH:mm',
17395
- llll : 'YYYY年MMMD日dddd HH:mm'
17396
  },
17397
  meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
17398
  meridiemHour: function (hour, meridiem) {
@@ -17426,14 +16494,30 @@ webpackJsonp([3],[
17426
  }
17427
  },
17428
  calendar : {
17429
- sameDay : '[今天]LT',
17430
- nextDay : '[明天]LT',
17431
- nextWeek : '[下]ddddLT',
17432
- lastDay : '[昨天]LT',
17433
- lastWeek : '[]ddddLT',
17434
- sameElse : 'L'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17435
  },
17436
- dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
17437
  ordinal : function (number, period) {
17438
  switch (period) {
17439
  case 'd':
@@ -17477,7 +16561,7 @@ webpackJsonp([3],[
17477
 
17478
 
17479
  /***/ },
17480
- /* 406 */
17481
  /***/ function(module, exports, __webpack_require__) {
17482
 
17483
  //! moment.js locale configuration
@@ -17500,16 +16584,16 @@ webpackJsonp([3],[
17500
  weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),
17501
  weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
17502
  longDateFormat : {
17503
- LT : 'HH:mm',
17504
- LTS : 'HH:mm:ss',
17505
  L : 'YYYY年MMMD日',
17506
  LL : 'YYYY年MMMD日',
17507
- LLL : 'YYYY年MMMD日 HH:mm',
17508
- LLLL : 'YYYY年MMMD日dddd HH:mm',
17509
  l : 'YYYY年MMMD日',
17510
  ll : 'YYYY年MMMD日',
17511
- lll : 'YYYY年MMMD日 HH:mm',
17512
- llll : 'YYYY年MMMD日dddd HH:mm'
17513
  },
17514
  meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
17515
  meridiemHour : function (hour, meridiem) {
@@ -17548,7 +16632,7 @@ webpackJsonp([3],[
17548
  lastWeek : '[上]ddddLT',
17549
  sameElse : 'L'
17550
  },
17551
- dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
17552
  ordinal : function (number, period) {
17553
  switch (period) {
17554
  case 'd' :
@@ -17587,7 +16671,7 @@ webpackJsonp([3],[
17587
 
17588
 
17589
  /***/ },
17590
- /* 407 */
17591
  /***/ function(module, exports, __webpack_require__) {
17592
 
17593
  //! moment.js locale configuration
@@ -17609,16 +16693,16 @@ webpackJsonp([3],[
17609
  weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),
17610
  weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
17611
  longDateFormat : {
17612
- LT : 'HH:mm',
17613
- LTS : 'HH:mm:ss',
17614
  L : 'YYYY年MMMD日',
17615
  LL : 'YYYY年MMMD日',
17616
- LLL : 'YYYY年MMMD日 HH:mm',
17617
- LLLL : 'YYYY年MMMD日dddd HH:mm',
17618
  l : 'YYYY年MMMD日',
17619
  ll : 'YYYY年MMMD日',
17620
- lll : 'YYYY年MMMD日 HH:mm',
17621
- llll : 'YYYY年MMMD日dddd HH:mm'
17622
  },
17623
  meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
17624
  meridiemHour : function (hour, meridiem) {
@@ -17657,7 +16741,7 @@ webpackJsonp([3],[
17657
  lastWeek : '[上]ddddLT',
17658
  sameElse : 'L'
17659
  },
17660
- dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
17661
  ordinal : function (number, period) {
17662
  switch (period) {
17663
  case 'd' :
@@ -17696,6 +16780,13 @@ webpackJsonp([3],[
17696
 
17697
 
17698
  /***/ },
 
 
 
 
 
 
 
17699
  /* 408 */,
17700
  /* 409 */,
17701
  /* 410 */,
@@ -17736,14 +16827,7 @@ webpackJsonp([3],[
17736
  /* 445 */,
17737
  /* 446 */,
17738
  /* 447 */,
17739
- /* 448 */,
17740
- /* 449 */,
17741
- /* 450 */,
17742
- /* 451 */,
17743
- /* 452 */,
17744
- /* 453 */,
17745
- /* 454 */,
17746
- /* 455 */
17747
  /***/ function(module, exports, __webpack_require__) {
17748
 
17749
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(268), __webpack_require__(267), __webpack_require__(271)], __WEBPACK_AMD_DEFINE_RESULT__ = function(MailPoet, jQuery, _) {
@@ -17821,7 +16905,7 @@ webpackJsonp([3],[
17821
 
17822
 
17823
  /***/ },
17824
- /* 456 */
17825
  /***/ function(module, exports, __webpack_require__) {
17826
 
17827
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
@@ -17992,7 +17076,7 @@ webpackJsonp([3],[
17992
 
17993
 
17994
  /***/ },
17995
- /* 457 */
17996
  /***/ function(module, exports, __webpack_require__) {
17997
 
17998
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
@@ -18020,7 +17104,7 @@ webpackJsonp([3],[
18020
 
18021
 
18022
  /***/ },
18023
- /* 458 */
18024
  /***/ function(module, exports, __webpack_require__) {
18025
 
18026
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(268), __webpack_require__(267)], __WEBPACK_AMD_DEFINE_RESULT__ = function(MailPoet, jQuery) {
@@ -18667,7 +17751,7 @@ webpackJsonp([3],[
18667
 
18668
 
18669
  /***/ },
18670
- /* 459 */
18671
  /***/ function(module, exports, __webpack_require__) {
18672
 
18673
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(268), __webpack_require__(267)], __WEBPACK_AMD_DEFINE_RESULT__ = function(MailPoet, jQuery) {
@@ -18899,7 +17983,7 @@ webpackJsonp([3],[
18899
 
18900
 
18901
  /***/ },
18902
- /* 460 */
18903
  /***/ function(module, exports, __webpack_require__) {
18904
 
18905
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
@@ -19008,7 +18092,7 @@ webpackJsonp([3],[
19008
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
19009
 
19010
  /***/ },
19011
- /* 461 */
19012
  /***/ function(module, exports, __webpack_require__) {
19013
 
19014
  /* WEBPACK VAR INJECTION */(function(global) {/*!
3
  /***/ function(module, exports, __webpack_require__) {
4
 
5
  __webpack_require__(268);
6
+ __webpack_require__(448);
7
+ __webpack_require__(449);
8
+ __webpack_require__(450);
9
+ __webpack_require__(451);
10
+ __webpack_require__(452);
11
+ __webpack_require__(453);
12
+ module.exports = __webpack_require__(454);
13
 
14
 
15
  /***/ },
1884
  /***/ function(module, exports, __webpack_require__) {
1885
 
1886
  /* WEBPACK VAR INJECTION */(function(module) {//! moment.js
1887
+ //! version : 2.17.1
1888
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
1889
  //! license : MIT
1890
  //! momentjs.com
1926
  return true;
1927
  }
1928
 
 
 
 
 
1929
  function isNumber(input) {
1930
  return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';
1931
  }
1982
  userInvalidated : false,
1983
  iso : false,
1984
  parsedDateParts : [],
1985
+ meridiem : null
 
 
1986
  };
1987
  }
1988
 
2058
  return m;
2059
  }
2060
 
2061
+ function isUndefined(input) {
2062
+ return input === void 0;
2063
+ }
2064
+
2065
  // Plugins that add properties should also add the key here (null value),
2066
  // so we can properly clone ourselves.
2067
  var momentProperties = hooks.momentProperties = [];
2101
  }
2102
 
2103
  if (momentProperties.length > 0) {
2104
+ for (i in momentProperties) {
2105
  prop = momentProperties[i];
2106
  val = from[prop];
2107
  if (!isUndefined(val)) {
2238
  }
2239
  this._config = config;
2240
  // Lenient ordinal parsing accepts just a number in addition to
2241
+ // number + (possibly) stuff coming from _ordinalParseLenient.
2242
+ this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\d{1,2}/).source);
 
 
 
2243
  }
2244
 
2245
  function mergeConfigs(parentConfig, childConfig) {
2337
  }
2338
 
2339
  var defaultOrdinal = '%d';
2340
+ var defaultOrdinalParse = /\d{1,2}/;
2341
 
2342
  function ordinal (number) {
2343
  return this._ordinal.replace('%d', number);
2347
  future : 'in %s',
2348
  past : '%s ago',
2349
  s : 'a few seconds',
 
2350
  m : 'a minute',
2351
  mm : '%d minutes',
2352
  h : 'an hour',
2529
  return function (mom) {
2530
  var output = '', i;
2531
  for (i = 0; i < length; i++) {
2532
+ output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];
2533
  }
2534
  return output;
2535
  };
2732
  var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
2733
  function localeMonths (m, format) {
2734
  if (!m) {
2735
+ return this._months;
 
2736
  }
2737
  return isArray(this._months) ? this._months[m.month()] :
2738
  this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];
2741
  var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
2742
  function localeMonthsShort (m, format) {
2743
  if (!m) {
2744
+ return this._monthsShort;
 
2745
  }
2746
  return isArray(this._monthsShort) ? this._monthsShort[m.month()] :
2747
  this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
3008
  }
3009
 
3010
  function createDate (y, m, d, h, M, s, ms) {
3011
+ //can't just apply() to create a date:
3012
+ //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply
3013
  var date = new Date(y, m, d, h, M, s, ms);
3014
 
3015
+ //the date constructor remaps years 0-99 to 1900-1999
3016
  if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
3017
  date.setFullYear(y);
3018
  }
3022
  function createUTCDate (y) {
3023
  var date = new Date(Date.UTC.apply(null, arguments));
3024
 
3025
+ //the Date.UTC function remaps years 0-99 to 1900-1999
3026
  if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
3027
  date.setUTCFullYear(y);
3028
  }
3039
  return -fwdlw + fwd - 1;
3040
  }
3041
 
3042
+ //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
3043
  function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
3044
  var localWeekday = (7 + weekday - dow) % 7,
3045
  weekOffset = firstWeekOffset(year, dow, doy),
3240
  var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
3241
  function localeWeekdays (m, format) {
3242
  if (!m) {
3243
+ return this._weekdays;
 
3244
  }
3245
  return isArray(this._weekdays) ? this._weekdays[m.day()] :
3246
  this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];
3560
  addRegexToken('A', matchMeridiem);
3561
  addRegexToken('H', match1to2);
3562
  addRegexToken('h', match1to2);
 
3563
  addRegexToken('HH', match1to2, match2);
3564
  addRegexToken('hh', match1to2, match2);
 
3565
 
3566
  addRegexToken('hmm', match3to4);
3567
  addRegexToken('hmmss', match5to6);
3569
  addRegexToken('Hmmss', match5to6);
3570
 
3571
  addParseToken(['H', 'HH'], HOUR);
 
 
 
 
3572
  addParseToken(['a', 'A'], function (input, array, config) {
3573
  config._isPm = config._locale.isPM(input);
3574
  config._meridiem = input;
3639
  longDateFormat: defaultLongDateFormat,
3640
  invalidDate: defaultInvalidDate,
3641
  ordinal: defaultOrdinal,
3642
+ ordinalParse: defaultOrdinalParse,
3643
  relativeTime: defaultRelativeTime,
3644
 
3645
  months: defaultLocaleMonths,
3950
  }
3951
  }
3952
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3953
  // date from iso format or fallback
3954
  function configFromString(config) {
3955
  var matched = aspNetJsonRegex.exec(config._i);
3962
  configFromISO(config);
3963
  if (config._isValid === false) {
3964
  delete config._isValid;
3965
+ hooks.createFromInputFallback(config);
 
 
 
 
 
 
 
 
3966
  }
 
 
 
3967
  }
3968
 
3969
  hooks.createFromInputFallback = deprecate(
3970
+ 'value provided is not in a recognized ISO format. moment construction falls back to js Date(), ' +
3971
+ 'which is not reliable across all browsers and versions. Non ISO date formats are ' +
3972
  'discouraged and will be removed in an upcoming major release. Please refer to ' +
3973
  'http://momentjs.com/guides/#/warnings/js-date/ for more info.',
3974
  function (config) {
4015
  }
4016
 
4017
  //if the day of the year is set, figure out what it is
4018
+ if (config._dayOfYear) {
4019
  yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
4020
 
4021
+ if (config._dayOfYear > daysInYear(yearToUse)) {
4022
  getParsingFlags(config)._overflowDayOfYear = true;
4023
  }
4024
 
4122
  // constant that refers to the ISO standard
4123
  hooks.ISO_8601 = function () {};
4124
 
 
 
 
4125
  // date from string and format string
4126
  function configFromStringAndFormat(config) {
4127
  // TODO: Move this to another part of the creation flow to prevent circular deps
4129
  configFromISO(config);
4130
  return;
4131
  }
4132
+
 
 
 
4133
  config._a = [];
4134
  getParsingFlags(config).empty = true;
4135
 
4321
 
4322
  function configFromInput(config) {
4323
  var input = config._i;
4324
+ if (input === undefined) {
4325
  config._d = new Date(hooks.now());
4326
  } else if (isDate(input)) {
4327
  config._d = new Date(input.valueOf());
4332
  return parseInt(obj, 10);
4333
  });
4334
  configFromArray(config);
4335
+ } else if (typeof(input) === 'object') {
4336
  configFromObject(config);
4337
  } else if (isNumber(input)) {
4338
  // from milliseconds
4433
  return Date.now ? Date.now() : +(new Date());
4434
  };
4435
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4436
  function Duration (duration) {
4437
  var normalizedInput = normalizeObjectUnits(duration),
4438
  years = normalizedInput.year || 0,
4445
  seconds = normalizedInput.second || 0,
4446
  milliseconds = normalizedInput.millisecond || 0;
4447
 
 
 
4448
  // representation for dateAddRemove
4449
  this._milliseconds = +milliseconds +
4450
  seconds * 1e3 + // 1000
4568
  // a second time. In case it wants us to change the offset again
4569
  // _changeInProgress == true case, then we have to adjust, because
4570
  // there is no such time in the given timezone.
4571
+ function getSetOffset (input, keepLocalTime) {
4572
  var offset = this._offset || 0,
4573
  localAdjust;
4574
  if (!this.isValid()) {
4580
  if (input === null) {
4581
  return this;
4582
  }
4583
+ } else if (Math.abs(input) < 16) {
4584
  input = input * 60;
4585
  }
4586
  if (!this._isUTC && keepLocalTime) {
4638
 
4639
  function setOffsetToParsedOffset () {
4640
  if (this._tzm != null) {
4641
+ this.utcOffset(this._tzm);
4642
  } else if (typeof this._i === 'string') {
4643
  var tZone = offsetFromString(matchOffset, this._i);
4644
  if (tZone != null) {
4770
  }
4771
 
4772
  createDuration.fn = Duration.prototype;
 
4773
 
4774
  function parseIso (inp, sign) {
4775
  // We'd normally use ~~inp for this, but unfortunately it also
5006
  return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
5007
  }
5008
 
5009
+ function toISOString () {
 
 
 
5010
  var m = this.clone().utc();
5011
+ if (0 < m.year() && m.year() <= 9999) {
5012
+ if (isFunction(Date.prototype.toISOString)) {
5013
+ // native implementation is ~50x faster, use it when we can
5014
+ return this.toDate().toISOString();
5015
+ } else {
5016
+ return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
5017
+ }
5018
+ } else {
5019
  return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
5020
  }
 
 
 
 
 
5021
  }
5022
 
5023
  /**
5037
  zone = 'Z';
5038
  }
5039
  var prefix = '[' + func + '("]';
5040
+ var year = (0 < this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';
5041
  var datetime = '-MM-DD[T]HH:mm:ss.SSS';
5042
  var suffix = zone + '[")]';
5043
 
5205
  return this.isValid() ? this.toISOString() : null;
5206
  }
5207
 
5208
+ function isValid$1 () {
5209
  return isValid(this);
5210
  }
5211
 
5365
  addRegexToken('D', match1to2);
5366
  addRegexToken('DD', match1to2, match2);
5367
  addRegexToken('Do', function (isStrict, locale) {
5368
+ return isStrict ? locale._ordinalParse : locale._ordinalParseLenient;
 
 
 
5369
  });
5370
 
5371
  addParseToken(['D', 'DD'], DATE);
5545
  proto.isSame = isSame;
5546
  proto.isSameOrAfter = isSameOrAfter;
5547
  proto.isSameOrBefore = isSameOrBefore;
5548
+ proto.isValid = isValid$1;
5549
  proto.lang = lang;
5550
  proto.locale = locale;
5551
  proto.localeData = localeData;
5770
  }
5771
 
5772
  getSetGlobalLocale('en', {
5773
+ ordinalParse: /\d{1,2}(th|st|nd|rd)/,
5774
  ordinal : function (number) {
5775
  var b = number % 10,
5776
  output = (toInt(number % 100 / 10) === 1) ? 'th' :
5891
  }
5892
 
5893
  function as (units) {
 
 
 
5894
  var days;
5895
  var months;
5896
  var milliseconds = this._milliseconds;
5919
 
5920
  // TODO: Use this.as('ms')?
5921
  function valueOf$1 () {
 
 
 
5922
  return (
5923
  this._milliseconds +
5924
  this._days * 864e5 +
5944
 
5945
  function get$2 (units) {
5946
  units = normalizeUnits(units);
5947
+ return this[units + 's']();
5948
  }
5949
 
5950
  function makeGetter(name) {
5951
  return function () {
5952
+ return this._data[name];
5953
  };
5954
  }
5955
 
5967
 
5968
  var round = Math.round;
5969
  var thresholds = {
5970
+ s: 45, // seconds to minute
5971
+ m: 45, // minutes to hour
5972
+ h: 22, // hours to day
5973
+ d: 26, // days to month
5974
+ M: 11 // months to year
 
5975
  };
5976
 
5977
  // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
5988
  var months = round(duration.as('M'));
5989
  var years = round(duration.as('y'));
5990
 
5991
+ var a = seconds < thresholds.s && ['s', seconds] ||
5992
+ minutes <= 1 && ['m'] ||
5993
+ minutes < thresholds.m && ['mm', minutes] ||
5994
+ hours <= 1 && ['h'] ||
5995
+ hours < thresholds.h && ['hh', hours] ||
5996
+ days <= 1 && ['d'] ||
5997
+ days < thresholds.d && ['dd', days] ||
5998
+ months <= 1 && ['M'] ||
5999
+ months < thresholds.M && ['MM', months] ||
6000
+ years <= 1 && ['y'] || ['yy', years];
 
6001
 
6002
  a[2] = withoutSuffix;
6003
  a[3] = +posNegDuration > 0;
6026
  return thresholds[threshold];
6027
  }
6028
  thresholds[threshold] = limit;
 
 
 
6029
  return true;
6030
  }
6031
 
6032
  function humanize (withSuffix) {
 
 
 
 
6033
  var locale = this.localeData();
6034
  var output = relativeTime$1(this, !withSuffix, locale);
6035
 
6050
  // This is because there is no context-free conversion between hours and days
6051
  // (think of clock changes)
6052
  // and also not between days and months (28-31 days per month)
 
 
 
 
6053
  var seconds = abs$1(this._milliseconds) / 1000;
6054
  var days = abs$1(this._days);
6055
  var months = abs$1(this._months);
6094
 
6095
  var proto$2 = Duration.prototype;
6096
 
 
6097
  proto$2.abs = abs;
6098
  proto$2.add = add$1;
6099
  proto$2.subtract = subtract$1;
6149
  // Side effect imports
6150
 
6151
 
6152
+ hooks.version = '2.17.1';
6153
 
6154
  setHookCallback(createLocal);
6155
 
6213
  "./ar": 294,
6214
  "./ar-dz": 295,
6215
  "./ar-dz.js": 295,
6216
+ "./ar-ly": 296,
6217
+ "./ar-ly.js": 296,
6218
+ "./ar-ma": 297,
6219
+ "./ar-ma.js": 297,
6220
+ "./ar-sa": 298,
6221
+ "./ar-sa.js": 298,
6222
+ "./ar-tn": 299,
6223
+ "./ar-tn.js": 299,
 
 
6224
  "./ar.js": 294,
6225
+ "./az": 300,
6226
+ "./az.js": 300,
6227
+ "./be": 301,
6228
+ "./be.js": 301,
6229
+ "./bg": 302,
6230
+ "./bg.js": 302,
6231
+ "./bn": 303,
6232
+ "./bn.js": 303,
6233
+ "./bo": 304,
6234
+ "./bo.js": 304,
6235
+ "./br": 305,
6236
+ "./br.js": 305,
6237
+ "./bs": 306,
6238
+ "./bs.js": 306,
6239
+ "./ca": 307,
6240
+ "./ca.js": 307,
6241
+ "./cs": 308,
6242
+ "./cs.js": 308,
6243
+ "./cv": 309,
6244
+ "./cv.js": 309,
6245
+ "./cy": 310,
6246
+ "./cy.js": 310,
6247
+ "./da": 311,
6248
+ "./da.js": 311,
6249
+ "./de": 312,
6250
+ "./de-at": 313,
6251
+ "./de-at.js": 313,
6252
+ "./de.js": 312,
6253
+ "./dv": 314,
6254
+ "./dv.js": 314,
6255
+ "./el": 315,
6256
+ "./el.js": 315,
6257
+ "./en-au": 316,
6258
+ "./en-au.js": 316,
6259
+ "./en-ca": 317,
6260
+ "./en-ca.js": 317,
6261
+ "./en-gb": 318,
6262
+ "./en-gb.js": 318,
6263
+ "./en-ie": 319,
6264
+ "./en-ie.js": 319,
6265
+ "./en-nz": 320,
6266
+ "./en-nz.js": 320,
6267
+ "./eo": 321,
6268
+ "./eo.js": 321,
6269
+ "./es": 322,
6270
+ "./es-do": 323,
6271
+ "./es-do.js": 323,
6272
+ "./es.js": 322,
6273
+ "./et": 324,
6274
+ "./et.js": 324,
6275
+ "./eu": 325,
6276
+ "./eu.js": 325,
6277
+ "./fa": 326,
6278
+ "./fa.js": 326,
6279
+ "./fi": 327,
6280
+ "./fi.js": 327,
6281
+ "./fo": 328,
6282
+ "./fo.js": 328,
6283
+ "./fr": 329,
6284
+ "./fr-ca": 330,
6285
+ "./fr-ca.js": 330,
6286
+ "./fr-ch": 331,
6287
+ "./fr-ch.js": 331,
6288
+ "./fr.js": 329,
6289
+ "./fy": 332,
6290
+ "./fy.js": 332,
6291
+ "./gd": 333,
6292
+ "./gd.js": 333,
6293
+ "./gl": 334,
6294
+ "./gl.js": 334,
6295
+ "./he": 335,
6296
+ "./he.js": 335,
6297
+ "./hi": 336,
6298
+ "./hi.js": 336,
6299
+ "./hr": 337,
6300
+ "./hr.js": 337,
6301
+ "./hu": 338,
6302
+ "./hu.js": 338,
6303
+ "./hy-am": 339,
6304
+ "./hy-am.js": 339,
6305
+ "./id": 340,
6306
+ "./id.js": 340,
6307
+ "./is": 341,
6308
+ "./is.js": 341,
6309
+ "./it": 342,
6310
+ "./it.js": 342,
6311
+ "./ja": 343,
6312
+ "./ja.js": 343,
6313
+ "./jv": 344,
6314
+ "./jv.js": 344,
6315
+ "./ka": 345,
6316
+ "./ka.js": 345,
6317
+ "./kk": 346,
6318
+ "./kk.js": 346,
6319
+ "./km": 347,
6320
+ "./km.js": 347,
6321
+ "./ko": 348,
6322
+ "./ko.js": 348,
6323
+ "./ky": 349,
6324
+ "./ky.js": 349,
6325
+ "./lb": 350,
6326
+ "./lb.js": 350,
6327
+ "./lo": 351,
6328
+ "./lo.js": 351,
6329
+ "./lt": 352,
6330
+ "./lt.js": 352,
6331
+ "./lv": 353,
6332
+ "./lv.js": 353,
6333
+ "./me": 354,
6334
+ "./me.js": 354,
6335
+ "./mi": 355,
6336
+ "./mi.js": 355,
6337
+ "./mk": 356,
6338
+ "./mk.js": 356,
6339
+ "./ml": 357,
6340
+ "./ml.js": 357,
6341
+ "./mr": 358,
6342
+ "./mr.js": 358,
6343
+ "./ms": 359,
6344
+ "./ms-my": 360,
6345
+ "./ms-my.js": 360,
6346
+ "./ms.js": 359,
6347
+ "./my": 361,
6348
+ "./my.js": 361,
6349
+ "./nb": 362,
6350
+ "./nb.js": 362,
6351
+ "./ne": 363,
6352
+ "./ne.js": 363,
6353
+ "./nl": 364,
6354
+ "./nl-be": 365,
6355
+ "./nl-be.js": 365,
6356
+ "./nl.js": 364,
6357
+ "./nn": 366,
6358
+ "./nn.js": 366,
6359
+ "./pa-in": 367,
6360
+ "./pa-in.js": 367,
6361
+ "./pl": 368,
6362
+ "./pl.js": 368,
6363
+ "./pt": 369,
6364
+ "./pt-br": 370,
6365
+ "./pt-br.js": 370,
6366
+ "./pt.js": 369,
6367
+ "./ro": 371,
6368
+ "./ro.js": 371,
6369
+ "./ru": 372,
6370
+ "./ru.js": 372,
6371
+ "./se": 373,
6372
+ "./se.js": 373,
6373
+ "./si": 374,
6374
+ "./si.js": 374,
6375
+ "./sk": 375,
6376
+ "./sk.js": 375,
6377
+ "./sl": 376,
6378
+ "./sl.js": 376,
6379
+ "./sq": 377,
6380
+ "./sq.js": 377,
6381
+ "./sr": 378,
6382
+ "./sr-cyrl": 379,
6383
+ "./sr-cyrl.js": 379,
6384
+ "./sr.js": 378,
6385
+ "./ss": 380,
6386
+ "./ss.js": 380,
6387
+ "./sv": 381,
6388
+ "./sv.js": 381,
6389
+ "./sw": 382,
6390
+ "./sw.js": 382,
6391
+ "./ta": 383,
6392
+ "./ta.js": 383,
6393
+ "./te": 384,
6394
+ "./te.js": 384,
6395
+ "./tet": 385,
6396
+ "./tet.js": 385,
6397
+ "./th": 386,
6398
+ "./th.js": 386,
6399
+ "./tl-ph": 387,
6400
+ "./tl-ph.js": 387,
6401
+ "./tlh": 388,
6402
+ "./tlh.js": 388,
6403
+ "./tr": 389,
6404
+ "./tr.js": 389,
6405
+ "./tzl": 390,
6406
+ "./tzl.js": 390,
6407
+ "./tzm": 391,
6408
+ "./tzm-latn": 392,
6409
+ "./tzm-latn.js": 392,
6410
+ "./tzm.js": 391,
6411
+ "./uk": 393,
6412
+ "./uk.js": 393,
6413
+ "./uz": 394,
6414
+ "./uz.js": 394,
6415
+ "./vi": 395,
6416
+ "./vi.js": 395,
6417
+ "./x-pseudo": 396,
6418
+ "./x-pseudo.js": 396,
6419
+ "./yo": 397,
6420
+ "./yo.js": 397,
6421
+ "./zh-cn": 398,
6422
+ "./zh-cn.js": 398,
6423
+ "./zh-hk": 399,
6424
+ "./zh-hk.js": 399,
6425
+ "./zh-tw": 400,
6426
+ "./zh-tw.js": 400
 
 
 
 
 
 
 
 
 
 
 
 
6427
  };
6428
  function webpackContext(req) {
6429
  return __webpack_require__(webpackContextResolve(req));
6502
  y : '\'n jaar',
6503
  yy : '%d jaar'
6504
  },
6505
+ ordinalParse: /\d{1,2}(ste|de)/,
6506
  ordinal : function (number) {
6507
  return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter
6508
  },
6730
 
6731
  /***/ },
6732
  /* 296 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6733
  /***/ function(module, exports, __webpack_require__) {
6734
 
6735
  //! moment.js locale configuration
6860
 
6861
 
6862
  /***/ },
6863
+ /* 297 */
6864
  /***/ function(module, exports, __webpack_require__) {
6865
 
6866
  //! moment.js locale configuration
6925
 
6926
 
6927
  /***/ },
6928
+ /* 298 */
6929
  /***/ function(module, exports, __webpack_require__) {
6930
 
6931
  //! moment.js locale configuration
7035
 
7036
 
7037
  /***/ },
7038
+ /* 299 */
7039
  /***/ function(module, exports, __webpack_require__) {
7040
 
7041
  //! moment.js locale configuration
7099
 
7100
 
7101
  /***/ },
7102
+ /* 300 */
7103
  /***/ function(module, exports, __webpack_require__) {
7104
 
7105
  //! moment.js locale configuration
7187
  return 'axşam';
7188
  }
7189
  },
7190
+ ordinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,
7191
  ordinal : function (number) {
7192
  if (number === 0) { // special case for zero
7193
  return number + '-ıncı';
7209
 
7210
 
7211
  /***/ },
7212
+ /* 301 */
7213
  /***/ function(module, exports, __webpack_require__) {
7214
 
7215
  //! moment.js locale configuration
7321
  return 'вечара';
7322
  }
7323
  },
7324
+ ordinalParse: /\d{1,2}-(і|ы|га)/,
7325
  ordinal: function (number, period) {
7326
  switch (period) {
7327
  case 'M':
7348
 
7349
 
7350
  /***/ },
7351
+ /* 302 */
7352
  /***/ function(module, exports, __webpack_require__) {
7353
 
7354
  //! moment.js locale configuration
7411
  y : 'година',
7412
  yy : '%d години'
7413
  },
7414
+ ordinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
7415
  ordinal : function (number) {
7416
  var lastDigit = number % 10,
7417
  last2Digits = number % 100;
7443
 
7444
 
7445
  /***/ },
7446
+ /* 303 */
7447
  /***/ function(module, exports, __webpack_require__) {
7448
 
7449
  //! moment.js locale configuration
7567
 
7568
 
7569
  /***/ },
7570
+ /* 304 */
7571
  /***/ function(module, exports, __webpack_require__) {
7572
 
7573
  //! moment.js locale configuration
7691
 
7692
 
7693
  /***/ },
7694
+ /* 305 */
7695
  /***/ function(module, exports, __webpack_require__) {
7696
 
7697
  //! moment.js locale configuration
7787
  y : 'ur bloaz',
7788
  yy : specialMutationForYears
7789
  },
7790
+ ordinalParse: /\d{1,2}(añ|vet)/,
7791
  ordinal : function (number) {
7792
  var output = (number === 1) ? 'añ' : 'vet';
7793
  return number + output;
7804
 
7805
 
7806
  /***/ },
7807
+ /* 306 */
7808
  /***/ function(module, exports, __webpack_require__) {
7809
 
7810
  //! moment.js locale configuration
7938
  y : 'godinu',
7939
  yy : translate
7940
  },
7941
+ ordinalParse: /\d{1,2}\./,
7942
  ordinal : '%d.',
7943
  week : {
7944
  dow : 1, // Monday is the first day of the week.
7952
 
7953
 
7954
  /***/ },
7955
+ /* 307 */
7956
  /***/ function(module, exports, __webpack_require__) {
7957
 
7958
  //! moment.js locale configuration
7967
 
7968
 
7969
  var ca = moment.defineLocale('ca', {
7970
+ months : 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),
7971
+ monthsShort : 'gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.'.split('_'),
 
 
 
 
7972
  monthsParseExact : true,
7973
  weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),
7974
  weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
7978
  LT : 'H:mm',
7979
  LTS : 'H:mm:ss',
7980
  L : 'DD/MM/YYYY',
7981
+ LL : 'D MMMM YYYY',
7982
+ LLL : 'D MMMM YYYY H:mm',
7983
+ LLLL : 'dddd D MMMM YYYY H:mm'
 
 
 
7984
  },
7985
  calendar : {
7986
  sameDay : function () {
8015
  y : 'un any',
8016
  yy : '%d anys'
8017
  },
8018
+ ordinalParse: /\d{1,2}(r|n|t|è|a)/,
8019
  ordinal : function (number, period) {
8020
  var output = (number === 1) ? 'r' :
8021
  (number === 2) ? 'n' :
8038
 
8039
 
8040
  /***/ },
8041
+ /* 308 */
8042
  /***/ function(module, exports, __webpack_require__) {
8043
 
8044
  //! moment.js locale configuration
8201
  y : translate,
8202
  yy : translate
8203
  },
8204
+ ordinalParse : /\d{1,2}\./,
8205
  ordinal : '%d.',
8206
  week : {
8207
  dow : 1, // Monday is the first day of the week.
8215
 
8216
 
8217
  /***/ },
8218
+ /* 309 */
8219
  /***/ function(module, exports, __webpack_require__) {
8220
 
8221
  //! moment.js locale configuration
8269
  y : 'пӗр ҫул',
8270
  yy : '%d ҫул'
8271
  },
8272
+ ordinalParse: /\d{1,2}-мӗш/,
8273
  ordinal : '%d-мӗш',
8274
  week : {
8275
  dow : 1, // Monday is the first day of the week.
8283
 
8284
 
8285
  /***/ },
8286
+ /* 310 */
8287
  /***/ function(module, exports, __webpack_require__) {
8288
 
8289
  //! moment.js locale configuration
8337
  y: 'blwyddyn',
8338
  yy: '%d flynedd'
8339
  },
8340
+ ordinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
8341
  // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
8342
  ordinal: function (number) {
8343
  var b = number,
8369
 
8370
 
8371
  /***/ },
8372
+ /* 311 */
8373
  /***/ function(module, exports, __webpack_require__) {
8374
 
8375
  //! moment.js locale configuration
8395
  L : 'DD/MM/YYYY',
8396
  LL : 'D. MMMM YYYY',
8397
  LLL : 'D. MMMM YYYY HH:mm',
8398
+ LLLL : 'dddd [d.] D. MMMM YYYY HH:mm'
8399
  },
8400
  calendar : {
8401
+ sameDay : '[I dag kl.] LT',
8402
+ nextDay : '[I morgen kl.] LT',
8403
+ nextWeek : 'dddd [kl.] LT',
8404
+ lastDay : '[I går kl.] LT',
8405
+ lastWeek : '[sidste] dddd [kl] LT',
8406
  sameElse : 'L'
8407
  },
8408
  relativeTime : {
8420
  y : 'et år',
8421
  yy : '%d år'
8422
  },
8423
+ ordinalParse: /\d{1,2}\./,
8424
  ordinal : '%d.',
8425
  week : {
8426
  dow : 1, // Monday is the first day of the week.
8434
 
8435
 
8436
  /***/ },
8437
+ /* 312 */
8438
  /***/ function(module, exports, __webpack_require__) {
8439
 
8440
  //! moment.js locale configuration
8503
  y : processRelativeTime,
8504
  yy : processRelativeTime
8505
  },
8506
+ ordinalParse: /\d{1,2}\./,
8507
  ordinal : '%d.',
8508
  week : {
8509
  dow : 1, // Monday is the first day of the week.
8517
 
8518
 
8519
  /***/ },
8520
+ /* 313 */
8521
  /***/ function(module, exports, __webpack_require__) {
8522
 
8523
  //! moment.js locale configuration
8587
  y : processRelativeTime,
8588
  yy : processRelativeTime
8589
  },
8590
+ ordinalParse: /\d{1,2}\./,
8591
  ordinal : '%d.',
8592
  week : {
8593
  dow : 1, // Monday is the first day of the week.
8601
 
8602
 
8603
  /***/ },
8604
+ /* 314 */
8605
  /***/ function(module, exports, __webpack_require__) {
8606
 
8607
  //! moment.js locale configuration
8608
+ //! locale : Maldivian [dv]
8609
+ //! author : Jawish Hameed : https://github.com/jawish
8610
 
8611
  ;(function (global, factory) {
8612
  true ? factory(__webpack_require__(290)) :
8615
  }(this, (function (moment) { 'use strict';
8616
 
8617
 
8618
+ var months = [
8619
+ 'ޖެނުއަރީ',
8620
+ 'ފެބްރުއަރީ',
8621
+ 'މާރިޗު',
8622
+ 'އޭޕްރީލު',
8623
+ 'މޭ',
8624
+ 'ޖޫން',
8625
+ 'ޖުލައި',
8626
+ 'އޯގަސްޓު',
8627
+ 'ސެޕްޓެމްބަރު',
8628
+ 'އޮކްޓޯބަރު',
8629
+ 'ނޮވެމްބަރު',
8630
+ 'ޑިސެމްބަރު'
8631
+ ];
8632
+ var weekdays = [
8633
+ 'އާދިއްތަ',
8634
+ 'ހޯމަ',
8635
+ 'އަންގާރަ',
8636
+ 'ބުދަ',
8637
+ 'ބުރާސްފަތި',
8638
+ 'ހުކުރު',
8639
+ 'ހޮނިހިރު'
8640
+ ];
8641
 
8642
+ var dv = moment.defineLocale('dv', {
8643
+ months : months,
8644
+ monthsShort : months,
8645
+ weekdays : weekdays,
8646
+ weekdaysShort : weekdays,
8647
+ weekdaysMin : 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),
 
 
8648
  longDateFormat : {
8649
+
8650
+ LT : 'HH:mm',
8651
+ LTS : 'HH:mm:ss',
8652
+ L : 'D/M/YYYY',
8653
+ LL : 'D MMMM YYYY',
8654
+ LLL : 'D MMMM YYYY HH:mm',
8655
+ LLLL : 'dddd D MMMM YYYY HH:mm'
8656
  },
8657
+ meridiemParse: /މކ|މފ/,
8658
+ isPM : function (input) {
8659
+ return 'މފ' === input;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8660
  },
8661
  meridiem : function (hour, minute, isLower) {
8662
  if (hour < 12) {
8706
 
8707
 
8708
  /***/ },
8709
+ /* 315 */
8710
  /***/ function(module, exports, __webpack_require__) {
8711
 
8712
  //! moment.js locale configuration
8728
  monthsNominativeEl : 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'),
8729
  monthsGenitiveEl : 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split('_'),
8730
  months : function (momentToFormat, format) {
8731
+ if (/D/.test(format.substring(0, format.indexOf('MMMM')))) { // if there is a day number before 'MMMM'
 
 
8732
  return this._monthsGenitiveEl[momentToFormat.month()];
8733
  } else {
8734
  return this._monthsNominativeEl[momentToFormat.month()];
8795
  y : 'ένας χρόνος',
8796
  yy : '%d χρόνια'
8797
  },
8798
+ ordinalParse: /\d{1,2}η/,
8799
  ordinal: '%dη',
8800
  week : {
8801
  dow : 1, // Monday is the first day of the week.
8809
 
8810
 
8811
  /***/ },
8812
+ /* 316 */
8813
  /***/ function(module, exports, __webpack_require__) {
8814
 
8815
  //! moment.js locale configuration
8860
  y : 'a year',
8861
  yy : '%d years'
8862
  },
8863
+ ordinalParse: /\d{1,2}(st|nd|rd|th)/,
8864
  ordinal : function (number) {
8865
  var b = number % 10,
8866
  output = (~~(number % 100 / 10) === 1) ? 'th' :
8881
 
8882
 
8883
  /***/ },
8884
+ /* 317 */
8885
  /***/ function(module, exports, __webpack_require__) {
8886
 
8887
  //! moment.js locale configuration
8932
  y : 'a year',
8933
  yy : '%d years'
8934
  },
8935
+ ordinalParse: /\d{1,2}(st|nd|rd|th)/,
8936
  ordinal : function (number) {
8937
  var b = number % 10,
8938
  output = (~~(number % 100 / 10) === 1) ? 'th' :
8949
 
8950
 
8951
  /***/ },
8952
+ /* 318 */
8953
  /***/ function(module, exports, __webpack_require__) {
8954
 
8955
  //! moment.js locale configuration
9000
  y : 'a year',
9001
  yy : '%d years'
9002
  },
9003
+ ordinalParse: /\d{1,2}(st|nd|rd|th)/,
9004
  ordinal : function (number) {
9005
  var b = number % 10,
9006
  output = (~~(number % 100 / 10) === 1) ? 'th' :
9021
 
9022
 
9023
  /***/ },
9024
+ /* 319 */
9025
  /***/ function(module, exports, __webpack_require__) {
9026
 
9027
  //! moment.js locale configuration
9072
  y : 'a year',
9073
  yy : '%d years'
9074
  },
9075
+ ordinalParse: /\d{1,2}(st|nd|rd|th)/,
9076
  ordinal : function (number) {
9077
  var b = number % 10,
9078
  output = (~~(number % 100 / 10) === 1) ? 'th' :
9093
 
9094
 
9095
  /***/ },
9096
+ /* 320 */
9097
  /***/ function(module, exports, __webpack_require__) {
9098
 
9099
  //! moment.js locale configuration
9144
  y : 'a year',
9145
  yy : '%d years'
9146
  },
9147
+ ordinalParse: /\d{1,2}(st|nd|rd|th)/,
9148
  ordinal : function (number) {
9149
  var b = number % 10,
9150
  output = (~~(number % 100 / 10) === 1) ? 'th' :
9165
 
9166
 
9167
  /***/ },
9168
+ /* 321 */
9169
  /***/ function(module, exports, __webpack_require__) {
9170
 
9171
  //! moment.js locale configuration
9172
  //! locale : Esperanto [eo]
9173
  //! author : Colin Dean : https://github.com/colindean
9174
+ //! komento: Mi estas malcerta se mi korekte traktis akuzativojn en tiu traduko.
9175
+ //! Se ne, bonvolu korekti kaj avizi min por ke mi povas lerni!
9176
 
9177
  ;(function (global, factory) {
9178
  true ? factory(__webpack_require__(290)) :
9184
  var eo = moment.defineLocale('eo', {
9185
  months : 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split('_'),
9186
  monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec'.split('_'),
9187
+ weekdays : 'Dimanĉo_Lundo_Mardo_Merkredo_Ĵaŭdo_Vendredo_Sabato'.split('_'),
9188
+ weekdaysShort : 'Dim_Lun_Mard_Merk_Ĵaŭ_Ven_Sab'.split('_'),
9189
+ weekdaysMin : 'Di_Lu_Ma_Me_Ĵa_Ve_Sa'.split('_'),
9190
  longDateFormat : {
9191
  LT : 'HH:mm',
9192
  LTS : 'HH:mm:ss',
9193
  L : 'YYYY-MM-DD',
9194
+ LL : 'D[-an de] MMMM, YYYY',
9195
+ LLL : 'D[-an de] MMMM, YYYY HH:mm',
9196
+ LLLL : 'dddd, [la] D[-an de] MMMM, YYYY HH:mm'
9197
  },
9198
  meridiemParse: /[ap]\.t\.m/i,
9199
  isPM: function (input) {
9215
  sameElse : 'L'
9216
  },
9217
  relativeTime : {
9218
+ future : 'je %s',
9219
  past : 'antaŭ %s',
9220
  s : 'sekundoj',
9221
  m : 'minuto',
9229
  y : 'jaro',
9230
  yy : '%d jaroj'
9231
  },
9232
+ ordinalParse: /\d{1,2}a/,
9233
  ordinal : '%da',
9234
  week : {
9235
  dow : 1, // Monday is the first day of the week.
9243
 
9244
 
9245
  /***/ },
9246
+ /* 322 */
9247
  /***/ function(module, exports, __webpack_require__) {
9248
 
9249
  //! moment.js locale configuration
9263
  var es = moment.defineLocale('es', {
9264
  months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
9265
  monthsShort : function (m, format) {
9266
+ if (/-MMM-/.test(format)) {
 
 
9267
  return monthsShort[m.month()];
9268
  } else {
9269
  return monthsShortDot[m.month()];
9315
  y : 'un año',
9316
  yy : '%d años'
9317
  },
9318
+ ordinalParse : /\d{1,2}º/,
9319
  ordinal : '%dº',
9320
  week : {
9321
  dow : 1, // Monday is the first day of the week.
9329
 
9330
 
9331
  /***/ },
9332
+ /* 323 */
9333
  /***/ function(module, exports, __webpack_require__) {
9334
 
9335
  //! moment.js locale configuration
9348
  var esDo = moment.defineLocale('es-do', {
9349
  months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
9350
  monthsShort : function (m, format) {
9351
+ if (/-MMM-/.test(format)) {
 
 
9352
  return monthsShort[m.month()];
9353
  } else {
9354
  return monthsShortDot[m.month()];
9400
  y : 'un año',
9401
  yy : '%d años'
9402
  },
9403
+ ordinalParse : /\d{1,2}º/,
9404
  ordinal : '%dº',
9405
  week : {
9406
  dow : 1, // Monday is the first day of the week.
9414
 
9415
 
9416
  /***/ },
9417
+ /* 324 */
9418
  /***/ function(module, exports, __webpack_require__) {
9419
 
9420
  //! moment.js locale configuration
9485
  y : processRelativeTime,
9486
  yy : processRelativeTime
9487
  },
9488
+ ordinalParse: /\d{1,2}\./,
9489
  ordinal : '%d.',
9490
  week : {
9491
  dow : 1, // Monday is the first day of the week.
9499
 
9500
 
9501
  /***/ },
9502
+ /* 325 */
9503
  /***/ function(module, exports, __webpack_require__) {
9504
 
9505
  //! moment.js locale configuration
9556
  y : 'urte bat',
9557
  yy : '%d urte'
9558
  },
9559
+ ordinalParse: /\d{1,2}\./,
9560
  ordinal : '%d.',
9561
  week : {
9562
  dow : 1, // Monday is the first day of the week.
9570
 
9571
 
9572
  /***/ },
9573
+ /* 326 */
9574
  /***/ function(module, exports, __webpack_require__) {
9575
 
9576
  //! moment.js locale configuration
9646
  relativeTime : {
9647
  future : 'در %s',
9648
  past : '%s پیش',
9649
+ s : 'چندین ثانیه',
9650
  m : 'یک دقیقه',
9651
  mm : '%d دقیقه',
9652
  h : 'یک ساعت',
9668
  return symbolMap[match];
9669
  }).replace(/,/g, '،');
9670
  },
9671
+ ordinalParse: /\d{1,2}م/,
9672
  ordinal : '%dم',
9673
  week : {
9674
  dow : 6, // Saturday is the first day of the week.
9682
 
9683
 
9684
  /***/ },
9685
+ /* 327 */
9686
  /***/ function(module, exports, __webpack_require__) {
9687
 
9688
  //! moment.js locale configuration
9780
  y : translate,
9781
  yy : translate
9782
  },
9783
+ ordinalParse: /\d{1,2}\./,
9784
  ordinal : '%d.',
9785
  week : {
9786
  dow : 1, // Monday is the first day of the week.
9794
 
9795
 
9796
  /***/ },
9797
+ /* 328 */
9798
  /***/ function(module, exports, __webpack_require__) {
9799
 
9800
  //! moment.js locale configuration
9845
  y : 'eitt ár',
9846
  yy : '%d ár'
9847
  },
9848
+ ordinalParse: /\d{1,2}\./,
9849
  ordinal : '%d.',
9850
  week : {
9851
  dow : 1, // Monday is the first day of the week.
9859
 
9860
 
9861
  /***/ },
9862
+ /* 329 */
9863
  /***/ function(module, exports, __webpack_require__) {
9864
 
9865
  //! moment.js locale configuration
9890
  LLLL : 'dddd D MMMM YYYY HH:mm'
9891
  },
9892
  calendar : {
9893
+ sameDay: '[Aujourd\'hui à] LT',
9894
+ nextDay: '[Demain à] LT',
9895
+ nextWeek: 'dddd [à] LT',
9896
+ lastDay: '[Hier à] LT',
9897
+ lastWeek: 'dddd [dernier à] LT',
9898
+ sameElse: 'L'
9899
  },
9900
  relativeTime : {
9901
  future : 'dans %s',
9912
  y : 'un an',
9913
  yy : '%d ans'
9914
  },
9915
+ ordinalParse: /\d{1,2}(er|)/,
9916
+ ordinal : function (number) {
9917
+ return number + (number === 1 ? 'er' : '');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9918
  },
9919
  week : {
9920
  dow : 1, // Monday is the first day of the week.
9928
 
9929
 
9930
  /***/ },
9931
+ /* 330 */
9932
  /***/ function(module, exports, __webpack_require__) {
9933
 
9934
  //! moment.js locale configuration
9959
  LLLL : 'dddd D MMMM YYYY HH:mm'
9960
  },
9961
  calendar : {
9962
+ sameDay: '[Aujourd\'hui à] LT',
9963
+ nextDay: '[Demain à] LT',
9964
+ nextWeek: 'dddd [à] LT',
9965
+ lastDay: '[Hier à] LT',
9966
+ lastWeek: 'dddd [dernier à] LT',
9967
+ sameElse: 'L'
9968
  },
9969
  relativeTime : {
9970
  future : 'dans %s',
9981
  y : 'un an',
9982
  yy : '%d ans'
9983
  },
9984
+ ordinalParse: /\d{1,2}(er|e)/,
9985
+ ordinal : function (number) {
9986
+ return number + (number === 1 ? 'er' : 'e');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9987
  }
9988
  });
9989
 
9993
 
9994
 
9995
  /***/ },
9996
+ /* 331 */
9997
  /***/ function(module, exports, __webpack_require__) {
9998
 
9999
  //! moment.js locale configuration
10024
  LLLL : 'dddd D MMMM YYYY HH:mm'
10025
  },
10026
  calendar : {
10027
+ sameDay: '[Aujourd\'hui à] LT',
10028
+ nextDay: '[Demain à] LT',
10029
+ nextWeek: 'dddd [à] LT',
10030
+ lastDay: '[Hier à] LT',
10031
+ lastWeek: 'dddd [dernier à] LT',
10032
+ sameElse: 'L'
10033
  },
10034
  relativeTime : {
10035
  future : 'dans %s',
10046
  y : 'un an',
10047
  yy : '%d ans'
10048
  },
10049
+ ordinalParse: /\d{1,2}(er|e)/,
10050
+ ordinal : function (number) {
10051
+ return number + (number === 1 ? 'er' : 'e');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10052
  },
10053
  week : {
10054
  dow : 1, // Monday is the first day of the week.
10062
 
10063
 
10064
  /***/ },
10065
+ /* 332 */
10066
  /***/ function(module, exports, __webpack_require__) {
10067
 
10068
  //! moment.js locale configuration
10082
  var fy = moment.defineLocale('fy', {
10083
  months : 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'),
10084
  monthsShort : function (m, format) {
10085
+ if (/-MMM-/.test(format)) {
 
 
10086
  return monthsShortWithoutDots[m.month()];
10087
  } else {
10088
  return monthsShortWithDots[m.month()];
10124
  y : 'ien jier',
10125
  yy : '%d jierren'
10126
  },
10127
+ ordinalParse: /\d{1,2}(ste|de)/,
10128
  ordinal : function (number) {
10129
  return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
10130
  },
10140
 
10141
 
10142
  /***/ },
10143
+ /* 333 */
10144
  /***/ function(module, exports, __webpack_require__) {
10145
 
10146
  //! moment.js locale configuration
10204
  y : 'bliadhna',
10205
  yy : '%d bliadhna'
10206
  },
10207
+ ordinalParse : /\d{1,2}(d|na|mh)/,
10208
  ordinal : function (number) {
10209
  var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
10210
  return number + output;
10221
 
10222
 
10223
  /***/ },
10224
+ /* 334 */
10225
  /***/ function(module, exports, __webpack_require__) {
10226
 
10227
  //! moment.js locale configuration
10289
  y : 'un ano',
10290
  yy : '%d anos'
10291
  },
10292
+ ordinalParse : /\d{1,2}º/,
10293
  ordinal : '%dº',
10294
  week : {
10295
  dow : 1, // Monday is the first day of the week.
10303
 
10304
 
10305
  /***/ },
10306
+ /* 335 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10307
  /***/ function(module, exports, __webpack_require__) {
10308
 
10309
  //! moment.js locale configuration
10407
 
10408
 
10409
  /***/ },
10410
+ /* 336 */
10411
  /***/ function(module, exports, __webpack_require__) {
10412
 
10413
  //! moment.js locale configuration
10536
 
10537
 
10538
  /***/ },
10539
+ /* 337 */
10540
  /***/ function(module, exports, __webpack_require__) {
10541
 
10542
  //! moment.js locale configuration
10672
  y : 'godinu',
10673
  yy : translate
10674
  },
10675
+ ordinalParse: /\d{1,2}\./,
10676
  ordinal : '%d.',
10677
  week : {
10678
  dow : 1, // Monday is the first day of the week.
10686
 
10687
 
10688
  /***/ },
10689
+ /* 338 */
10690
  /***/ function(module, exports, __webpack_require__) {
10691
 
10692
  //! moment.js locale configuration
10786
  y : translate,
10787
  yy : translate
10788
  },
10789
+ ordinalParse: /\d{1,2}\./,
10790
  ordinal : '%d.',
10791
  week : {
10792
  dow : 1, // Monday is the first day of the week.
10800
 
10801
 
10802
  /***/ },
10803
+ /* 339 */
10804
  /***/ function(module, exports, __webpack_require__) {
10805
 
10806
  //! moment.js locale configuration
10873
  return 'երեկոյան';
10874
  }
10875
  },
10876
+ ordinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/,
10877
  ordinal: function (number, period) {
10878
  switch (period) {
10879
  case 'DDD':
10900
 
10901
 
10902
  /***/ },
10903
+ /* 340 */
10904
  /***/ function(module, exports, __webpack_require__) {
10905
 
10906
  //! moment.js locale configuration
10988
 
10989
 
10990
  /***/ },
10991
+ /* 341 */
10992
  /***/ function(module, exports, __webpack_require__) {
10993
 
10994
  //! moment.js locale configuration
11106
  y : translate,
11107
  yy : translate
11108
  },
11109
+ ordinalParse: /\d{1,2}\./,
11110
  ordinal : '%d.',
11111
  week : {
11112
  dow : 1, // Monday is the first day of the week.
11120
 
11121
 
11122
  /***/ },
11123
+ /* 342 */
11124
  /***/ function(module, exports, __webpack_require__) {
11125
 
11126
  //! moment.js locale configuration
11138
  var it = moment.defineLocale('it', {
11139
  months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),
11140
  monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
11141
+ weekdays : 'Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato'.split('_'),
11142
+ weekdaysShort : 'Dom_Lun_Mar_Mer_Gio_Ven_Sab'.split('_'),
11143
+ weekdaysMin : 'Do_Lu_Ma_Me_Gi_Ve_Sa'.split('_'),
11144
  longDateFormat : {
11145
  LT : 'HH:mm',
11146
  LTS : 'HH:mm:ss',
11181
  y : 'un anno',
11182
  yy : '%d anni'
11183
  },
11184
+ ordinalParse : /\d{1,2}º/,
11185
  ordinal: '%dº',
11186
  week : {
11187
  dow : 1, // Monday is the first day of the week.
11195
 
11196
 
11197
  /***/ },
11198
+ /* 343 */
11199
  /***/ function(module, exports, __webpack_require__) {
11200
 
11201
  //! moment.js locale configuration
11216
  weekdaysShort : '日_月_火_水_木_金_土'.split('_'),
11217
  weekdaysMin : '日_月_火_水_木_金_土'.split('_'),
11218
  longDateFormat : {
11219
+ LT : 'Ah時m分',
11220
+ LTS : 'Ah時m分s秒',
11221
  L : 'YYYY/MM/DD',
11222
  LL : 'YYYY年M月D日',
11223
+ LLL : 'YYYY年M月D日Ah時m分',
11224
+ LLLL : 'YYYY年M月D日Ah時m分 dddd'
 
 
 
 
11225
  },
11226
  meridiemParse: /午前|午後/i,
11227
  isPM : function (input) {
11242
  lastWeek : '[前週]dddd LT',
11243
  sameElse : 'L'
11244
  },
11245
+ ordinalParse : /\d{1,2}日/,
11246
  ordinal : function (number, period) {
11247
  switch (period) {
11248
  case 'd':
11276
 
11277
 
11278
  /***/ },
11279
+ /* 344 */
11280
  /***/ function(module, exports, __webpack_require__) {
11281
 
11282
  //! moment.js locale configuration
11364
 
11365
 
11366
  /***/ },
11367
+ /* 345 */
11368
  /***/ function(module, exports, __webpack_require__) {
11369
 
11370
  //! moment.js locale configuration
11415
  },
11416
  past : function (s) {
11417
  if ((/(წამი|წუთი|საათი|დღე|თვე)/).test(s)) {
11418
+ return s.replace(/(ი|ე)$/, 'ის წინ');
11419
  }
11420
  if ((/წელი/).test(s)) {
11421
+ return s.replace(/წელი$/, 'წლის წინ');
11422
  }
11423
  },
11424
  s : 'რამდენიმე წამი',
11433
  y : 'წელი',
11434
  yy : '%d წელი'
11435
  },
11436
+ ordinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
11437
  ordinal : function (number) {
11438
  if (number === 0) {
11439
  return number;
11458
 
11459
 
11460
  /***/ },
11461
+ /* 346 */
11462
  /***/ function(module, exports, __webpack_require__) {
11463
 
11464
  //! moment.js locale configuration
11532
  y : 'бір жыл',
11533
  yy : '%d жыл'
11534
  },
11535
+ ordinalParse: /\d{1,2}-(ші|шы)/,
11536
  ordinal : function (number) {
11537
  var a = number % 10,
11538
  b = number >= 100 ? 100 : null;
11550
 
11551
 
11552
  /***/ },
11553
+ /* 347 */
11554
  /***/ function(module, exports, __webpack_require__) {
11555
 
11556
  //! moment.js locale configuration
11613
 
11614
 
11615
  /***/ },
11616
+ /* 348 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11617
  /***/ function(module, exports, __webpack_require__) {
11618
 
11619
  //! moment.js locale configuration
11635
  weekdaysShort : '일_월_화_수_목_금_토'.split('_'),
11636
  weekdaysMin : '일_월_화_수_목_금_토'.split('_'),
11637
  longDateFormat : {
11638
+ LT : 'A h시 m분',
11639
+ LTS : 'A h시 m분 s초',
11640
  L : 'YYYY.MM.DD',
11641
  LL : 'YYYY년 MMMM D일',
11642
+ LLL : 'YYYY년 MMMM D일 A h시 m분',
11643
+ LLLL : 'YYYY년 MMMM D일 dddd A h시 m분'
 
 
 
 
11644
  },
11645
  calendar : {
11646
  sameDay : '오늘 LT',
11655
  past : '%s 전',
11656
  s : '몇 초',
11657
  ss : '%d초',
11658
+ m : '일분',
11659
  mm : '%d분',
11660
  h : '한 시간',
11661
  hh : '%d시간',
11666
  y : '일 년',
11667
  yy : '%d년'
11668
  },
11669
+ ordinalParse : /\d{1,2}일/,
11670
  ordinal : '%d일',
11671
  meridiemParse : /오전|오후/,
11672
  isPM : function (token) {
11683
 
11684
 
11685
  /***/ },
11686
+ /* 349 */
11687
  /***/ function(module, exports, __webpack_require__) {
11688
 
11689
  //! moment.js locale configuration
11758
  y : 'бир жыл',
11759
  yy : '%d жыл'
11760
  },
11761
+ ordinalParse: /\d{1,2}-(чи|чы|чү|чу)/,
11762
  ordinal : function (number) {
11763
  var a = number % 10,
11764
  b = number >= 100 ? 100 : null;
11776
 
11777
 
11778
  /***/ },
11779
+ /* 350 */
11780
  /***/ function(module, exports, __webpack_require__) {
11781
 
11782
  //! moment.js locale configuration
11904
  y : processRelativeTime,
11905
  yy : '%d Joer'
11906
  },
11907
+ ordinalParse: /\d{1,2}\./,
11908
  ordinal: '%d.',
11909
  week: {
11910
  dow: 1, // Monday is the first day of the week.
11918
 
11919
 
11920
  /***/ },
11921
+ /* 351 */
11922
  /***/ function(module, exports, __webpack_require__) {
11923
 
11924
  //! moment.js locale configuration
11981
  y : '1 ປີ',
11982
  yy : '%d ປີ'
11983
  },
11984
+ ordinalParse: /(ທີ່)\d{1,2}/,
11985
  ordinal : function (number) {
11986
  return 'ທີ່' + number;
11987
  }
11993
 
11994
 
11995
  /***/ },
11996
+ /* 352 */
11997
  /***/ function(module, exports, __webpack_require__) {
11998
 
11999
  //! moment.js locale configuration
12099
  y : translateSingular,
12100
  yy : translate
12101
  },
12102
+ ordinalParse: /\d{1,2}-oji/,
12103
  ordinal : function (number) {
12104
  return number + '-oji';
12105
  },
12115
 
12116
 
12117
  /***/ },
12118
+ /* 353 */
12119
  /***/ function(module, exports, __webpack_require__) {
12120
 
12121
  //! moment.js locale configuration
12203
  y : relativeTimeWithSingular,
12204
  yy : relativeTimeWithPlural
12205
  },
12206
+ ordinalParse: /\d{1,2}\./,
12207
  ordinal : '%d.',
12208
  week : {
12209
  dow : 1, // Monday is the first day of the week.
12217
 
12218
 
12219
  /***/ },
12220
+ /* 354 */
12221
  /***/ function(module, exports, __webpack_require__) {
12222
 
12223
  //! moment.js locale configuration
12319
  y : 'godinu',
12320
  yy : translator.translate
12321
  },
12322
+ ordinalParse: /\d{1,2}\./,
12323
  ordinal : '%d.',
12324
  week : {
12325
  dow : 1, // Monday is the first day of the week.
12333
 
12334
 
12335
  /***/ },
12336
+ /* 355 */
12337
  /***/ function(module, exports, __webpack_require__) {
12338
 
12339
  //! moment.js locale configuration
12388
  y: 'he tau',
12389
  yy: '%d tau'
12390
  },
12391
+ ordinalParse: /\d{1,2}º/,
12392
  ordinal: '%dº',
12393
  week : {
12394
  dow : 1, // Monday is the first day of the week.
12402
 
12403
 
12404
  /***/ },
12405
+ /* 356 */
12406
  /***/ function(module, exports, __webpack_require__) {
12407
 
12408
  //! moment.js locale configuration
12465
  y : 'година',
12466
  yy : '%d години'
12467
  },
12468
+ ordinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
12469
  ordinal : function (number) {
12470
  var lastDigit = number % 10,
12471
  last2Digits = number % 100;
12497
 
12498
 
12499
  /***/ },
12500
+ /* 357 */
12501
  /***/ function(module, exports, __webpack_require__) {
12502
 
12503
  //! moment.js locale configuration
12583
 
12584
 
12585
  /***/ },
12586
+ /* 358 */
12587
  /***/ function(module, exports, __webpack_require__) {
12588
 
12589
  //! moment.js locale configuration
12747
 
12748
 
12749
  /***/ },
12750
+ /* 359 */
12751
  /***/ function(module, exports, __webpack_require__) {
12752
 
12753
  //! moment.js locale configuration
12834
 
12835
 
12836
  /***/ },
12837
+ /* 360 */
12838
  /***/ function(module, exports, __webpack_require__) {
12839
 
12840
  //! moment.js locale configuration
12922
 
12923
 
12924
  /***/ },
12925
+ /* 361 */
12926
  /***/ function(module, exports, __webpack_require__) {
12927
 
12928
  //! moment.js locale configuration
13023
 
13024
 
13025
  /***/ },
13026
+ /* 362 */
13027
  /***/ function(module, exports, __webpack_require__) {
13028
 
13029
  //! moment.js locale configuration
13077
  y : 'ett år',
13078
  yy : '%d år'
13079
  },
13080
+ ordinalParse: /\d{1,2}\./,
13081
  ordinal : '%d.',
13082
  week : {
13083
  dow : 1, // Monday is the first day of the week.
13091
 
13092
 
13093
  /***/ },
13094
+ /* 363 */
13095
  /***/ function(module, exports, __webpack_require__) {
13096
 
13097
  //! moment.js locale configuration
13219
 
13220
 
13221
  /***/ },
13222
+ /* 364 */
13223
  /***/ function(module, exports, __webpack_require__) {
13224
 
13225
  //! moment.js locale configuration
13243
  var nl = moment.defineLocale('nl', {
13244
  months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
13245
  monthsShort : function (m, format) {
13246
+ if (/-MMM-/.test(format)) {
 
 
13247
  return monthsShortWithoutDots[m.month()];
13248
  } else {
13249
  return monthsShortWithDots[m.month()];
13294
  y : 'één jaar',
13295
  yy : '%d jaar'
13296
  },
13297
+ ordinalParse: /\d{1,2}(ste|de)/,
13298
  ordinal : function (number) {
13299
  return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
13300
  },
13310
 
13311
 
13312
  /***/ },
13313
+ /* 365 */
13314
  /***/ function(module, exports, __webpack_require__) {
13315
 
13316
  //! moment.js locale configuration
13334
  var nlBe = moment.defineLocale('nl-be', {
13335
  months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
13336
  monthsShort : function (m, format) {
13337
+ if (/-MMM-/.test(format)) {
 
 
13338
  return monthsShortWithoutDots[m.month()];
13339
  } else {
13340
  return monthsShortWithDots[m.month()];
13385
  y : 'één jaar',
13386
  yy : '%d jaar'
13387
  },
13388
+ ordinalParse: /\d{1,2}(ste|de)/,
13389
  ordinal : function (number) {
13390
  return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
13391
  },
13401
 
13402
 
13403
  /***/ },
13404
+ /* 366 */
13405
  /***/ function(module, exports, __webpack_require__) {
13406
 
13407
  //! moment.js locale configuration
13452
  y : 'eit år',
13453
  yy : '%d år'
13454
  },
13455
+ ordinalParse: /\d{1,2}\./,
13456
  ordinal : '%d.',
13457
  week : {
13458
  dow : 1, // Monday is the first day of the week.
13466
 
13467
 
13468
  /***/ },
13469
+ /* 367 */
13470
  /***/ function(module, exports, __webpack_require__) {
13471
 
13472
  //! moment.js locale configuration
13595
 
13596
 
13597
  /***/ },
13598
+ /* 368 */
13599
  /***/ function(module, exports, __webpack_require__) {
13600
 
13601
  //! moment.js locale configuration
13634
 
13635
  var pl = moment.defineLocale('pl', {
13636
  months : function (momentToFormat, format) {
13637
+ if (format === '') {
 
 
13638
  // Hack: if format empty we know this is used to generate
13639
  // RegExp by moment. Give then back both valid forms of months
13640
  // in RegExp ready format.
13691
  y : 'rok',
13692
  yy : translate
13693
  },
13694
+ ordinalParse: /\d{1,2}\./,
13695
  ordinal : '%d.',
13696
  week : {
13697
  dow : 1, // Monday is the first day of the week.
13705
 
13706
 
13707
  /***/ },
13708
+ /* 369 */
13709
  /***/ function(module, exports, __webpack_require__) {
13710
 
13711
  //! moment.js locale configuration
13724
  monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
13725
  weekdays : 'Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado'.split('_'),
13726
  weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
13727
+ weekdaysMin : 'Dom_2ª_3ª_4ª_5ª_6ª_Sáb'.split('_'),
13728
  weekdaysParseExact : true,
13729
  longDateFormat : {
13730
  LT : 'HH:mm',
13761
  y : 'um ano',
13762
  yy : '%d anos'
13763
  },
13764
+ ordinalParse: /\d{1,2}º/,
13765
  ordinal : '%dº',
13766
  week : {
13767
  dow : 1, // Monday is the first day of the week.
13775
 
13776
 
13777
  /***/ },
13778
+ /* 370 */
13779
  /***/ function(module, exports, __webpack_require__) {
13780
 
13781
  //! moment.js locale configuration
13794
  monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
13795
  weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),
13796
  weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
13797
+ weekdaysMin : 'Dom_2ª_3ª_4ª_5ª_6ª_Sáb'.split('_'),
13798
  weekdaysParseExact : true,
13799
  longDateFormat : {
13800
  LT : 'HH:mm',
13831
  y : 'um ano',
13832
  yy : '%d anos'
13833
  },
13834
+ ordinalParse: /\d{1,2}º/,
13835
  ordinal : '%dº'
13836
  });
13837
 
13841
 
13842
 
13843
  /***/ },
13844
+ /* 371 */
13845
  /***/ function(module, exports, __webpack_require__) {
13846
 
13847
  //! moment.js locale configuration
13921
 
13922
 
13923
  /***/ },
13924
+ /* 372 */
13925
  /***/ function(module, exports, __webpack_require__) {
13926
 
13927
  //! moment.js locale configuration
14081
  return 'вечера';
14082
  }
14083
  },
14084
+ ordinalParse: /\d{1,2}-(й|го|я)/,
14085
  ordinal: function (number, period) {
14086
  switch (period) {
14087
  case 'M':
14109
 
14110
 
14111
  /***/ },
14112
+ /* 373 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14113
  /***/ function(module, exports, __webpack_require__) {
14114
 
14115
  //! moment.js locale configuration
14161
  y : 'okta jahki',
14162
  yy : '%d jagit'
14163
  },
14164
+ ordinalParse: /\d{1,2}\./,
14165
  ordinal : '%d.',
14166
  week : {
14167
  dow : 1, // Monday is the first day of the week.
14175
 
14176
 
14177
  /***/ },
14178
+ /* 374 */
14179
  /***/ function(module, exports, __webpack_require__) {
14180
 
14181
  //! moment.js locale configuration
14228
  y : 'වසර',
14229
  yy : 'වසර %d'
14230
  },
14231
+ ordinalParse: /\d{1,2} වැනි/,
14232
  ordinal : function (number) {
14233
  return number + ' වැනි';
14234
  },
14251
 
14252
 
14253
  /***/ },
14254
+ /* 375 */
14255
  /***/ function(module, exports, __webpack_require__) {
14256
 
14257
  //! moment.js locale configuration
14392
  y : translate,
14393
  yy : translate
14394
  },
14395
+ ordinalParse: /\d{1,2}\./,
14396
  ordinal : '%d.',
14397
  week : {
14398
  dow : 1, // Monday is the first day of the week.
14406
 
14407
 
14408
  /***/ },
14409
+ /* 376 */
14410
  /***/ function(module, exports, __webpack_require__) {
14411
 
14412
  //! moment.js locale configuration
14559
  y : processRelativeTime,
14560
  yy : processRelativeTime
14561
  },
14562
+ ordinalParse: /\d{1,2}\./,
14563
  ordinal : '%d.',
14564
  week : {
14565
  dow : 1, // Monday is the first day of the week.
14573
 
14574
 
14575
  /***/ },
14576
+ /* 377 */
14577
  /***/ function(module, exports, __webpack_require__) {
14578
 
14579
  //! moment.js locale configuration
14634
  y : 'një vit',
14635
  yy : '%d vite'
14636
  },
14637
+ ordinalParse: /\d{1,2}\./,
14638
  ordinal : '%d.',
14639
  week : {
14640
  dow : 1, // Monday is the first day of the week.
14648
 
14649
 
14650
  /***/ },
14651
+ /* 378 */
14652
  /***/ function(module, exports, __webpack_require__) {
14653
 
14654
  //! moment.js locale configuration
14749
  y : 'godinu',
14750
  yy : translator.translate
14751
  },
14752
+ ordinalParse: /\d{1,2}\./,
14753
  ordinal : '%d.',
14754
  week : {
14755
  dow : 1, // Monday is the first day of the week.
14763
 
14764
 
14765
  /***/ },
14766
+ /* 379 */
14767
  /***/ function(module, exports, __webpack_require__) {
14768
 
14769
  //! moment.js locale configuration
14864
  y : 'годину',
14865
  yy : translator.translate
14866
  },
14867
+ ordinalParse: /\d{1,2}\./,
14868
  ordinal : '%d.',
14869
  week : {
14870
  dow : 1, // Monday is the first day of the week.
14878
 
14879
 
14880
  /***/ },
14881
+ /* 380 */
14882
  /***/ function(module, exports, __webpack_require__) {
14883
 
14884
  //! moment.js locale configuration
14958
  return hour + 12;
14959
  }
14960
  },
14961
+ ordinalParse: /\d{1,2}/,
14962
  ordinal : '%d',
14963
  week : {
14964
  dow : 1, // Monday is the first day of the week.
14972
 
14973
 
14974
  /***/ },
14975
+ /* 381 */
14976
  /***/ function(module, exports, __webpack_require__) {
14977
 
14978
  //! moment.js locale configuration
15025
  y : 'ett år',
15026
  yy : '%d år'
15027
  },
15028
+ ordinalParse: /\d{1,2}(e|a)/,
15029
  ordinal : function (number) {
15030
  var b = number % 10,
15031
  output = (~~(number % 100 / 10) === 1) ? 'e' :
15046
 
15047
 
15048
  /***/ },
15049
+ /* 382 */
15050
  /***/ function(module, exports, __webpack_require__) {
15051
 
15052
  //! moment.js locale configuration
15110
 
15111
 
15112
  /***/ },
15113
+ /* 383 */
15114
  /***/ function(module, exports, __webpack_require__) {
15115
 
15116
  //! moment.js locale configuration
15186
  y : 'ஒரு வருடம்',
15187
  yy : '%d ஆண்டுகள்'
15188
  },
15189
+ ordinalParse: /\d{1,2}வது/,
15190
  ordinal : function (number) {
15191
  return number + 'வது';
15192
  },
15245
 
15246
 
15247
  /***/ },
15248
+ /* 384 */
15249
  /***/ function(module, exports, __webpack_require__) {
15250
 
15251
  //! moment.js locale configuration
15297
  y : 'ఒక సంవత్సరం',
15298
  yy : '%d సంవత్సరాలు'
15299
  },
15300
+ ordinalParse : /\d{1,2}వ/,
15301
  ordinal : '%dవ',
15302
  meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,
15303
  meridiemHour : function (hour, meridiem) {
15339
 
15340
 
15341
  /***/ },
15342
+ /* 385 */
15343
  /***/ function(module, exports, __webpack_require__) {
15344
 
15345
  //! moment.js locale configuration
15391
  y : 'tinan ida',
15392
  yy : 'tinan %d'
15393
  },
15394
+ ordinalParse: /\d{1,2}(st|nd|rd|th)/,
15395
  ordinal : function (number) {
15396
  var b = number % 10,
15397
  output = (~~(number % 100 / 10) === 1) ? 'th' :
15412
 
15413
 
15414
  /***/ },
15415
+ /* 386 */
15416
  /***/ function(module, exports, __webpack_require__) {
15417
 
15418
  //! moment.js locale configuration
15437
  longDateFormat : {
15438
  LT : 'H:mm',
15439
  LTS : 'H:mm:ss',
15440
+ L : 'YYYY/MM/DD',
15441
  LL : 'D MMMM YYYY',
15442
  LLL : 'D MMMM YYYY เวลา H:mm',
15443
  LLLL : 'วันddddที่ D MMMM YYYY เวลา H:mm'
15484
 
15485
 
15486
  /***/ },
15487
+ /* 387 */
15488
  /***/ function(module, exports, __webpack_require__) {
15489
 
15490
  //! moment.js locale configuration
15535
  y : 'isang taon',
15536
  yy : '%d taon'
15537
  },
15538
+ ordinalParse: /\d{1,2}/,
15539
  ordinal : function (number) {
15540
  return number;
15541
  },
15551
 
15552
 
15553
  /***/ },
15554
+ /* 388 */
15555
  /***/ function(module, exports, __webpack_require__) {
15556
 
15557
  //! moment.js locale configuration
15662
  y : 'wa’ DIS',
15663
  yy : translate
15664
  },
15665
+ ordinalParse: /\d{1,2}\./,
15666
  ordinal : '%d.',
15667
  week : {
15668
  dow : 1, // Monday is the first day of the week.
15676
 
15677
 
15678
  /***/ },
15679
+ /* 389 */
15680
  /***/ function(module, exports, __webpack_require__) {
15681
 
15682
  //! moment.js locale configuration
15749
  y : 'bir yıl',
15750
  yy : '%d yıl'
15751
  },
15752
+ ordinalParse: /\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,
15753
  ordinal : function (number) {
15754
  if (number === 0) { // special case for zero
15755
  return number + '\'ıncı';
15771
 
15772
 
15773
  /***/ },
15774
+ /* 390 */
15775
  /***/ function(module, exports, __webpack_require__) {
15776
 
15777
  //! moment.js locale configuration
15836
  y : processRelativeTime,
15837
  yy : processRelativeTime
15838
  },
15839
+ ordinalParse: /\d{1,2}\./,
15840
  ordinal : '%d.',
15841
  week : {
15842
  dow : 1, // Monday is the first day of the week.
15867
 
15868
 
15869
  /***/ },
15870
+ /* 391 */
15871
  /***/ function(module, exports, __webpack_require__) {
15872
 
15873
  //! moment.js locale configuration
15930
 
15931
 
15932
  /***/ },
15933
+ /* 392 */
15934
  /***/ function(module, exports, __webpack_require__) {
15935
 
15936
  //! moment.js locale configuration
15993
 
15994
 
15995
  /***/ },
15996
+ /* 393 */
15997
  /***/ function(module, exports, __webpack_require__) {
15998
 
15999
  //! moment.js locale configuration
16035
  'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),
16036
  'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),
16037
  'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')
16038
+ },
16039
+ nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ?
 
 
 
 
 
16040
  'accusative' :
16041
  ((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ?
16042
  'genitive' :
16117
  return 'вечора';
16118
  }
16119
  },
16120
+ ordinalParse: /\d{1,2}-(й|го)/,
16121
  ordinal: function (number, period) {
16122
  switch (period) {
16123
  case 'M':
16144
 
16145
 
16146
  /***/ },
16147
+ /* 394 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16148
  /***/ function(module, exports, __webpack_require__) {
16149
 
16150
  //! moment.js locale configuration
16207
 
16208
 
16209
  /***/ },
16210
+ /* 395 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16211
  /***/ function(module, exports, __webpack_require__) {
16212
 
16213
  //! moment.js locale configuration
16275
  y : 'một năm',
16276
  yy : '%d năm'
16277
  },
16278
+ ordinalParse: /\d{1,2}/,
16279
  ordinal : function (number) {
16280
  return number;
16281
  },
16291
 
16292
 
16293
  /***/ },
16294
+ /* 396 */
16295
  /***/ function(module, exports, __webpack_require__) {
16296
 
16297
  //! moment.js locale configuration
16343
  y : 'á ~ýéár',
16344
  yy : '%d ý~éárs'
16345
  },
16346
+ ordinalParse: /\d{1,2}(th|st|nd|rd)/,
16347
  ordinal : function (number) {
16348
  var b = number % 10,
16349
  output = (~~(number % 100 / 10) === 1) ? 'th' :
16364
 
16365
 
16366
  /***/ },
16367
+ /* 397 */
16368
  /***/ function(module, exports, __webpack_require__) {
16369
 
16370
  //! moment.js locale configuration
16415
  y : 'ọdún kan',
16416
  yy : 'ọdún %d'
16417
  },
16418
+ ordinalParse : /ọjọ́\s\d{1,2}/,
16419
  ordinal : 'ọjọ́ %d',
16420
  week : {
16421
  dow : 1, // Monday is the first day of the week.
16429
 
16430
 
16431
  /***/ },
16432
+ /* 398 */
16433
  /***/ function(module, exports, __webpack_require__) {
16434
 
16435
  //! moment.js locale configuration
16451
  weekdaysShort : '周日_周一_周二_周三_周四_周五_周六'.split('_'),
16452
  weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
16453
  longDateFormat : {
16454
+ LT : 'Ah点mm',
16455
+ LTS : 'Ah点m分s秒',
16456
+ L : 'YYYY-MM-DD',
16457
  LL : 'YYYY年MMMD日',
16458
  LLL : 'YYYY年MMMD日Ah点mm分',
16459
  LLLL : 'YYYY年MMMD日ddddAh点mm分',
16460
+ l : 'YYYY-MM-DD',
16461
  ll : 'YYYY年MMMD日',
16462
+ lll : 'YYYY年MMMD日Ah点mm',
16463
+ llll : 'YYYY年MMMD日ddddAh点mm'
16464
  },
16465
  meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
16466
  meridiemHour: function (hour, meridiem) {
16494
  }
16495
  },
16496
  calendar : {
16497
+ sameDay : function () {
16498
+ return this.minutes() === 0 ? '[今天]Ah[点整]' : '[今天]LT';
16499
+ },
16500
+ nextDay : function () {
16501
+ return this.minutes() === 0 ? '[明天]Ah[点整]' : '[明天]LT';
16502
+ },
16503
+ lastDay : function () {
16504
+ return this.minutes() === 0 ? '[昨天]Ah[点整]' : '[昨天]LT';
16505
+ },
16506
+ nextWeek : function () {
16507
+ var startOfWeek, prefix;
16508
+ startOfWeek = moment().startOf('week');
16509
+ prefix = this.diff(startOfWeek, 'days') >= 7 ? '[下]' : '[本]';
16510
+ return this.minutes() === 0 ? prefix + 'dddAh点整' : prefix + 'dddAh点mm';
16511
+ },
16512
+ lastWeek : function () {
16513
+ var startOfWeek, prefix;
16514
+ startOfWeek = moment().startOf('week');
16515
+ prefix = this.unix() < startOfWeek.unix() ? '[上]' : '[本]';
16516
+ return this.minutes() === 0 ? prefix + 'dddAh点整' : prefix + 'dddAh点mm';
16517
+ },
16518
+ sameElse : 'LL'
16519
  },
16520
+ ordinalParse: /\d{1,2}(日|月|周)/,
16521
  ordinal : function (number, period) {
16522
  switch (period) {
16523
  case 'd':
16561
 
16562
 
16563
  /***/ },
16564
+ /* 399 */
16565
  /***/ function(module, exports, __webpack_require__) {
16566
 
16567
  //! moment.js locale configuration
16584
  weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),
16585
  weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
16586
  longDateFormat : {
16587
+ LT : 'Ah點mm',
16588
+ LTS : 'Ah點m分s秒',
16589
  L : 'YYYY年MMMD日',
16590
  LL : 'YYYY年MMMD日',
16591
+ LLL : 'YYYY年MMMD日Ah點mm',
16592
+ LLLL : 'YYYY年MMMD日ddddAh點mm',
16593
  l : 'YYYY年MMMD日',
16594
  ll : 'YYYY年MMMD日',
16595
+ lll : 'YYYY年MMMD日Ah點mm',
16596
+ llll : 'YYYY年MMMD日ddddAh點mm'
16597
  },
16598
  meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
16599
  meridiemHour : function (hour, meridiem) {
16632
  lastWeek : '[上]ddddLT',
16633
  sameElse : 'L'
16634
  },
16635
+ ordinalParse: /\d{1,2}(日|月|週)/,
16636
  ordinal : function (number, period) {
16637
  switch (period) {
16638
  case 'd' :
16671
 
16672
 
16673
  /***/ },
16674
+ /* 400 */
16675
  /***/ function(module, exports, __webpack_require__) {
16676
 
16677
  //! moment.js locale configuration
16693
  weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),
16694
  weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
16695
  longDateFormat : {
16696
+ LT : 'Ah點mm',
16697
+ LTS : 'Ah點m分s秒',
16698
  L : 'YYYY年MMMD日',
16699
  LL : 'YYYY年MMMD日',
16700
+ LLL : 'YYYY年MMMD日Ah點mm',
16701
+ LLLL : 'YYYY年MMMD日ddddAh點mm',
16702
  l : 'YYYY年MMMD日',
16703
  ll : 'YYYY年MMMD日',
16704
+ lll : 'YYYY年MMMD日Ah點mm',
16705
+ llll : 'YYYY年MMMD日ddddAh點mm'
16706
  },
16707
  meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
16708
  meridiemHour : function (hour, meridiem) {
16741
  lastWeek : '[上]ddddLT',
16742
  sameElse : 'L'
16743
  },
16744
+ ordinalParse: /\d{1,2}(日|月|週)/,
16745
  ordinal : function (number, period) {
16746
  switch (period) {
16747
  case 'd' :
16780
 
16781
 
16782
  /***/ },
16783
+ /* 401 */,
16784
+ /* 402 */,
16785
+ /* 403 */,
16786
+ /* 404 */,
16787
+ /* 405 */,
16788
+ /* 406 */,
16789
+ /* 407 */,
16790
  /* 408 */,
16791
  /* 409 */,
16792
  /* 410 */,
16827
  /* 445 */,
16828
  /* 446 */,
16829
  /* 447 */,
16830
+ /* 448 */
 
 
 
 
 
 
 
16831
  /***/ function(module, exports, __webpack_require__) {
16832
 
16833
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(268), __webpack_require__(267), __webpack_require__(271)], __WEBPACK_AMD_DEFINE_RESULT__ = function(MailPoet, jQuery, _) {
16905
 
16906
 
16907
  /***/ },
16908
+ /* 449 */
16909
  /***/ function(module, exports, __webpack_require__) {
16910
 
16911
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
17076
 
17077
 
17078
  /***/ },
17079
+ /* 450 */
17080
  /***/ function(module, exports, __webpack_require__) {
17081
 
17082
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
17104
 
17105
 
17106
  /***/ },
17107
+ /* 451 */
17108
  /***/ function(module, exports, __webpack_require__) {
17109
 
17110
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(268), __webpack_require__(267)], __WEBPACK_AMD_DEFINE_RESULT__ = function(MailPoet, jQuery) {
17751
 
17752
 
17753
  /***/ },
17754
+ /* 452 */
17755
  /***/ function(module, exports, __webpack_require__) {
17756
 
17757
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(268), __webpack_require__(267)], __WEBPACK_AMD_DEFINE_RESULT__ = function(MailPoet, jQuery) {
17983
 
17984
 
17985
  /***/ },
17986
+ /* 453 */
17987
  /***/ function(module, exports, __webpack_require__) {
17988
 
17989
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
18092
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
18093
 
18094
  /***/ },
18095
+ /* 454 */
18096
  /***/ function(module, exports, __webpack_require__) {
18097
 
18098
  /* WEBPACK VAR INJECTION */(function(global) {/*!
assets/js/newsletter_editor.js CHANGED
@@ -4,26 +4,33 @@ webpackJsonp([4],{
4
  /***/ function(module, exports, __webpack_require__) {
5
 
6
  __webpack_require__(271);
7
- __webpack_require__(442);
 
 
 
 
 
 
 
 
8
  __webpack_require__(462);
9
- __webpack_require__(463);
10
- __webpack_require__(464);
11
  __webpack_require__(465);
12
- __webpack_require__(280);
13
  __webpack_require__(466);
14
  __webpack_require__(467);
15
- __webpack_require__(468);
16
  __webpack_require__(469);
17
- __webpack_require__(472);
 
18
  __webpack_require__(473);
19
  __webpack_require__(474);
20
- __webpack_require__(476);
21
- __webpack_require__(477);
22
  __webpack_require__(478);
 
23
  __webpack_require__(480);
24
  __webpack_require__(481);
25
  __webpack_require__(482);
26
- __webpack_require__(479);
 
27
  __webpack_require__(485);
28
  __webpack_require__(486);
29
  __webpack_require__(487);
@@ -37,14 +44,7 @@ webpackJsonp([4],{
37
  __webpack_require__(495);
38
  __webpack_require__(496);
39
  __webpack_require__(497);
40
- __webpack_require__(498);
41
- __webpack_require__(499);
42
- __webpack_require__(500);
43
- __webpack_require__(501);
44
- __webpack_require__(502);
45
- __webpack_require__(503);
46
- __webpack_require__(504);
47
- module.exports = __webpack_require__(505);
48
 
49
 
50
  /***/ },
@@ -7367,15 +7367,15 @@ webpackJsonp([4],{
7367
 
7368
  /***/ },
7369
 
7370
- /***/ 442:
7371
  /***/ function(module, exports, __webpack_require__) {
7372
 
7373
- /* WEBPACK VAR INJECTION */(function(global) {module.exports = global["Backbone"] = __webpack_require__(443);
7374
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
7375
 
7376
  /***/ },
7377
 
7378
- /***/ 443:
7379
  /***/ function(module, exports, __webpack_require__) {
7380
 
7381
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(global) {// Backbone.js 1.3.3
@@ -9303,7 +9303,7 @@ webpackJsonp([4],{
9303
 
9304
  /***/ },
9305
 
9306
- /***/ 455:
9307
  /***/ function(module, exports, __webpack_require__) {
9308
 
9309
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(268), __webpack_require__(267), __webpack_require__(271)], __WEBPACK_AMD_DEFINE_RESULT__ = function(MailPoet, jQuery, _) {
@@ -9382,7 +9382,7 @@ webpackJsonp([4],{
9382
 
9383
  /***/ },
9384
 
9385
- /***/ 458:
9386
  /***/ function(module, exports, __webpack_require__) {
9387
 
9388
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(268), __webpack_require__(267)], __WEBPACK_AMD_DEFINE_RESULT__ = function(MailPoet, jQuery) {
@@ -10030,7 +10030,7 @@ webpackJsonp([4],{
10030
 
10031
  /***/ },
10032
 
10033
- /***/ 459:
10034
  /***/ function(module, exports, __webpack_require__) {
10035
 
10036
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(268), __webpack_require__(267)], __WEBPACK_AMD_DEFINE_RESULT__ = function(MailPoet, jQuery) {
@@ -10263,7 +10263,7 @@ webpackJsonp([4],{
10263
 
10264
  /***/ },
10265
 
10266
- /***/ 462:
10267
  /***/ function(module, exports, __webpack_require__) {
10268
 
10269
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// MarionetteJS (Backbone.Marionette)
@@ -10289,7 +10289,7 @@ webpackJsonp([4],{
10289
 
10290
  /* istanbul ignore next */
10291
  if (true) {
10292
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(442), __webpack_require__(271)], __WEBPACK_AMD_DEFINE_RESULT__ = function(Backbone, _) {
10293
  return (root.Marionette = root.Mn = factory(root, Backbone, _));
10294
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
10295
  } else if (typeof exports !== 'undefined') {
@@ -14235,7 +14235,7 @@ webpackJsonp([4],{
14235
 
14236
  /***/ },
14237
 
14238
- /***/ 463:
14239
  /***/ function(module, exports) {
14240
 
14241
  Backbone.SuperModel = (function(_, Backbone){
@@ -14658,7 +14658,7 @@ webpackJsonp([4],{
14658
 
14659
  /***/ },
14660
 
14661
- /***/ 464:
14662
  /***/ function(module, exports, __webpack_require__) {
14663
 
14664
  /**
@@ -20642,13 +20642,13 @@ webpackJsonp([4],{
20642
 
20643
  /***/ },
20644
 
20645
- /***/ 465:
20646
  /***/ function(module, exports, __webpack_require__) {
20647
 
20648
  // Backbone.Radio v1.0.4
20649
 
20650
  (function (global, factory) {
20651
- true ? module.exports = factory(__webpack_require__(271), __webpack_require__(442)) :
20652
  typeof define === 'function' && define.amd ? define(['underscore', 'backbone'], factory) :
20653
  (global.Backbone = global.Backbone || {}, global.Backbone.Radio = factory(global._,global.Backbone));
20654
  }(this, function (_,Backbone) { 'use strict';
@@ -21000,7 +21000,7 @@ webpackJsonp([4],{
21000
 
21001
  /***/ },
21002
 
21003
- /***/ 466:
21004
  /***/ function(module, exports, __webpack_require__) {
21005
 
21006
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Spectrum Colorpicker v1.8.0
@@ -23330,7 +23330,7 @@ webpackJsonp([4],{
23330
 
23331
  /***/ },
23332
 
23333
- /***/ 467:
23334
  /***/ function(module, exports) {
23335
 
23336
  // Generated by CoffeeScript 1.9.2
@@ -23601,7 +23601,7 @@ webpackJsonp([4],{
23601
 
23602
  /***/ },
23603
 
23604
- /***/ 468:
23605
  /***/ function(module, exports) {
23606
 
23607
  /* Blob.js
@@ -23822,7 +23822,7 @@ webpackJsonp([4],{
23822
 
23823
  /***/ },
23824
 
23825
- /***/ 469:
23826
  /***/ function(module, exports, __webpack_require__) {
23827
 
23828
  var __WEBPACK_AMD_DEFINE_RESULT__;/* FileSaver.js
@@ -24008,7 +24008,7 @@ webpackJsonp([4],{
24008
 
24009
  if (typeof module !== "undefined" && module.exports) {
24010
  module.exports.saveAs = saveAs;
24011
- } else if (("function" !== "undefined" && __webpack_require__(470) !== null) && (__webpack_require__(471) !== null)) {
24012
  !(__WEBPACK_AMD_DEFINE_RESULT__ = function() {
24013
  return saveAs;
24014
  }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
@@ -24017,7 +24017,7 @@ webpackJsonp([4],{
24017
 
24018
  /***/ },
24019
 
24020
- /***/ 470:
24021
  /***/ function(module, exports) {
24022
 
24023
  module.exports = function() { throw new Error("define cannot be used indirect"); };
@@ -24025,7 +24025,7 @@ webpackJsonp([4],{
24025
 
24026
  /***/ },
24027
 
24028
- /***/ 471:
24029
  /***/ function(module, exports) {
24030
 
24031
  /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {module.exports = __webpack_amd_options__;
@@ -24034,7 +24034,7 @@ webpackJsonp([4],{
24034
 
24035
  /***/ },
24036
 
24037
- /***/ 472:
24038
  /***/ function(module, exports, __webpack_require__) {
24039
 
24040
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*** IMPORTS FROM imports-loader ***/
@@ -27930,7 +27930,7 @@ webpackJsonp([4],{
27930
 
27931
  /***/ },
27932
 
27933
- /***/ 473:
27934
  /***/ function(module, exports, __webpack_require__) {
27935
 
27936
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
@@ -27943,7 +27943,7 @@ webpackJsonp([4],{
27943
 
27944
  (function(root, factory) {
27945
  if (true) {
27946
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(462), __webpack_require__(465), __webpack_require__(271)], __WEBPACK_AMD_DEFINE_RESULT__ = function(Marionette, Radio, _) {
27947
  return factory(Marionette, Radio, _);
27948
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
27949
  }
@@ -27968,16 +27968,16 @@ webpackJsonp([4],{
27968
 
27969
  /***/ },
27970
 
27971
- /***/ 474:
27972
  /***/ function(module, exports, __webpack_require__) {
27973
 
27974
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
27975
- __webpack_require__(442),
27976
- __webpack_require__(462),
27977
  __webpack_require__(267),
27978
  __webpack_require__(271),
27979
- __webpack_require__(445),
27980
- __webpack_require__(475)
27981
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(Backbone, Marionette, jQuery, _, Handlebars) {
27982
 
27983
  var app = new Marionette.Application(), AppView;
@@ -28010,12 +28010,12 @@ webpackJsonp([4],{
28010
 
28011
  /***/ },
28012
 
28013
- /***/ 476:
28014
  /***/ function(module, exports, __webpack_require__) {
28015
 
28016
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
28017
- __webpack_require__(474),
28018
- __webpack_require__(463)
28019
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, SuperModel) {
28020
 
28021
  var Module = {};
@@ -28053,13 +28053,13 @@ webpackJsonp([4],{
28053
 
28054
  /***/ },
28055
 
28056
- /***/ 477:
28057
  /***/ function(module, exports, __webpack_require__) {
28058
 
28059
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
28060
- __webpack_require__(474),
28061
- __webpack_require__(462),
28062
- __webpack_require__(463)
28063
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, Marionette, SuperModel) {
28064
 
28065
  "use strict";
@@ -28145,19 +28145,19 @@ webpackJsonp([4],{
28145
 
28146
  /***/ },
28147
 
28148
- /***/ 478:
28149
  /***/ function(module, exports, __webpack_require__) {
28150
 
28151
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
28152
- __webpack_require__(474),
28153
- __webpack_require__(479),
28154
  __webpack_require__(268),
28155
- __webpack_require__(442),
28156
- __webpack_require__(462),
28157
- __webpack_require__(463),
28158
  __webpack_require__(271),
28159
  __webpack_require__(267),
28160
- __webpack_require__(467)
28161
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(
28162
  App,
28163
  CommunicationComponent,
@@ -28504,14 +28504,14 @@ webpackJsonp([4],{
28504
 
28505
  /***/ },
28506
 
28507
- /***/ 479:
28508
  /***/ function(module, exports, __webpack_require__) {
28509
 
28510
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
28511
- __webpack_require__(474),
28512
  __webpack_require__(271),
28513
  __webpack_require__(268),
28514
- __webpack_require__(455)
28515
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, _, MailPoet) {
28516
 
28517
  var Module = {};
@@ -28615,12 +28615,12 @@ webpackJsonp([4],{
28615
 
28616
  /***/ },
28617
 
28618
- /***/ 480:
28619
  /***/ function(module, exports, __webpack_require__) {
28620
 
28621
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
28622
- __webpack_require__(474),
28623
- __webpack_require__(463),
28624
  __webpack_require__(271),
28625
  __webpack_require__(268)
28626
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, SuperModel, _, MailPoet) {
@@ -28727,13 +28727,13 @@ webpackJsonp([4],{
28727
 
28728
  /***/ },
28729
 
28730
- /***/ 481:
28731
  /***/ function(module, exports, __webpack_require__) {
28732
 
28733
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
28734
- __webpack_require__(474),
28735
- __webpack_require__(442),
28736
- __webpack_require__(462),
28737
  __webpack_require__(271),
28738
  __webpack_require__(267)
28739
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, Backbone, Marionette, _, jQuery) {
@@ -28770,20 +28770,20 @@ webpackJsonp([4],{
28770
 
28771
  /***/ },
28772
 
28773
- /***/ 482:
28774
  /***/ function(module, exports, __webpack_require__) {
28775
 
28776
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
28777
- __webpack_require__(474),
28778
- __webpack_require__(479),
28779
  __webpack_require__(268),
28780
- __webpack_require__(459),
28781
- __webpack_require__(442),
28782
- __webpack_require__(462),
28783
  __webpack_require__(267),
28784
- __webpack_require__(468),
28785
- __webpack_require__(469),
28786
- __webpack_require__(483)
28787
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(
28788
  App,
28789
  CommunicationComponent,
@@ -29135,15 +29135,15 @@ webpackJsonp([4],{
29135
 
29136
  /***/ },
29137
 
29138
- /***/ 483:
29139
  /***/ function(module, exports, __webpack_require__) {
29140
 
29141
- /* WEBPACK VAR INJECTION */(function(global) {module.exports = global["html2canvas"] = __webpack_require__(484);
29142
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
29143
 
29144
  /***/ },
29145
 
29146
- /***/ 484:
29147
  /***/ function(module, exports, __webpack_require__) {
29148
 
29149
  var require;var require;/* WEBPACK VAR INJECTION */(function(global) {/*
@@ -33684,7 +33684,7 @@ webpackJsonp([4],{
33684
 
33685
  /***/ },
33686
 
33687
- /***/ 485:
33688
  /***/ function(module, exports, __webpack_require__) {
33689
 
33690
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
@@ -33694,7 +33694,7 @@ webpackJsonp([4],{
33694
  * For more check: http://marionettejs.com/docs/marionette.behaviors.html#behaviorslookup
33695
  */
33696
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
33697
- __webpack_require__(462)
33698
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(Marionette) {
33699
 
33700
  var BehaviorsLookup = {};
@@ -33710,7 +33710,7 @@ webpackJsonp([4],{
33710
 
33711
  /***/ },
33712
 
33713
- /***/ 486:
33714
  /***/ function(module, exports, __webpack_require__) {
33715
 
33716
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
@@ -33719,10 +33719,10 @@ webpackJsonp([4],{
33719
  * Adds a color picker integration with the view
33720
  */
33721
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
33722
- __webpack_require__(462),
33723
- __webpack_require__(485),
33724
  __webpack_require__(268),
33725
- __webpack_require__(466)
33726
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(Marionette, BehaviorsLookup, MailPoet, Spectrum) {
33727
 
33728
  BehaviorsLookup.ColorPickerBehavior = Marionette.Behavior.extend({
@@ -33743,7 +33743,7 @@ webpackJsonp([4],{
33743
 
33744
  /***/ },
33745
 
33746
- /***/ 487:
33747
  /***/ function(module, exports, __webpack_require__) {
33748
 
33749
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
@@ -33754,11 +33754,11 @@ webpackJsonp([4],{
33754
  * accept droppables
33755
  */
33756
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
33757
- __webpack_require__(462),
33758
  __webpack_require__(271),
33759
  __webpack_require__(267),
33760
- __webpack_require__(485),
33761
- __webpack_require__(464)
33762
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(Marionette, _, jQuery, BehaviorsLookup, interact) {
33763
 
33764
  BehaviorsLookup.ContainerDropZoneBehavior = Marionette.Behavior.extend({
@@ -34178,7 +34178,7 @@ webpackJsonp([4],{
34178
 
34179
  /***/ },
34180
 
34181
- /***/ 488:
34182
  /***/ function(module, exports, __webpack_require__) {
34183
 
34184
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
@@ -34188,11 +34188,11 @@ webpackJsonp([4],{
34188
  * Part of the drag&drop behavior.
34189
  */
34190
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
34191
- __webpack_require__(462),
34192
  __webpack_require__(271),
34193
  __webpack_require__(267),
34194
- __webpack_require__(485),
34195
- __webpack_require__(464)
34196
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(Marionette, _, jQuery, BehaviorsLookup, interact) {
34197
 
34198
  BehaviorsLookup.DraggableBehavior = Marionette.Behavior.extend({
@@ -34326,7 +34326,7 @@ webpackJsonp([4],{
34326
 
34327
  /***/ },
34328
 
34329
- /***/ 489:
34330
  /***/ function(module, exports, __webpack_require__) {
34331
 
34332
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
@@ -34335,8 +34335,8 @@ webpackJsonp([4],{
34335
  * Highlights a block that is being edited
34336
  */
34337
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
34338
- __webpack_require__(462),
34339
- __webpack_require__(485),
34340
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(Marionette, BehaviorsLookup) {
34341
 
34342
  BehaviorsLookup.HighlightEditingBehavior = Marionette.Behavior.extend({
@@ -34356,7 +34356,7 @@ webpackJsonp([4],{
34356
 
34357
  /***/ },
34358
 
34359
- /***/ 490:
34360
  /***/ function(module, exports, __webpack_require__) {
34361
 
34362
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
@@ -34365,9 +34365,9 @@ webpackJsonp([4],{
34365
  * Allows resizing elements within a block
34366
  */
34367
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
34368
- __webpack_require__(462),
34369
- __webpack_require__(485),
34370
- __webpack_require__(464)
34371
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(Marionette, BehaviorsLookup, interact) {
34372
 
34373
  BehaviorsLookup.ResizableBehavior = Marionette.Behavior.extend({
@@ -34431,7 +34431,7 @@ webpackJsonp([4],{
34431
 
34432
  /***/ },
34433
 
34434
- /***/ 491:
34435
  /***/ function(module, exports, __webpack_require__) {
34436
 
34437
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
@@ -34440,9 +34440,9 @@ webpackJsonp([4],{
34440
  * Allows sorting elements within a collection
34441
  */
34442
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
34443
- __webpack_require__(462),
34444
  __webpack_require__(271),
34445
- __webpack_require__(485)
34446
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(Marionette, _, BehaviorsLookup) {
34447
 
34448
  BehaviorsLookup.SortableBehavior = Marionette.Behavior.extend({
@@ -34478,7 +34478,7 @@ webpackJsonp([4],{
34478
 
34479
  /***/ },
34480
 
34481
- /***/ 492:
34482
  /***/ function(module, exports, __webpack_require__) {
34483
 
34484
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
@@ -34487,9 +34487,9 @@ webpackJsonp([4],{
34487
  * Opens up settings of a BlockView if contents are clicked upon
34488
  */
34489
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
34490
- __webpack_require__(462),
34491
  __webpack_require__(267),
34492
- __webpack_require__(485),
34493
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(Marionette, jQuery, BehaviorsLookup) {
34494
 
34495
  BehaviorsLookup.ShowSettingsBehavior = Marionette.Behavior.extend({
@@ -34516,7 +34516,7 @@ webpackJsonp([4],{
34516
 
34517
  /***/ },
34518
 
34519
- /***/ 493:
34520
  /***/ function(module, exports, __webpack_require__) {
34521
 
34522
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
@@ -34525,9 +34525,9 @@ webpackJsonp([4],{
34525
  * Adds TinyMCE text editing capabilities to a view
34526
  */
34527
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
34528
- __webpack_require__(462),
34529
  __webpack_require__(271),
34530
- __webpack_require__(485)
34531
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(Marionette, _, BehaviorsLookup) {
34532
 
34533
  BehaviorsLookup.TextEditorBehavior = Marionette.Behavior.extend({
@@ -34599,7 +34599,7 @@ webpackJsonp([4],{
34599
 
34600
  /***/ },
34601
 
34602
- /***/ 494:
34603
  /***/ function(module, exports, __webpack_require__) {
34604
 
34605
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
@@ -34609,13 +34609,13 @@ webpackJsonp([4],{
34609
  * BlockToolsView, BlockSettingsView and BlockWidgetView are optional.
34610
  */
34611
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
34612
- __webpack_require__(474),
34613
- __webpack_require__(462),
34614
- __webpack_require__(463),
34615
  __webpack_require__(271),
34616
  __webpack_require__(267),
34617
  __webpack_require__(268),
34618
- __webpack_require__(458)
34619
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, Marionette, SuperModel, _, jQuery, MailPoet, Modal) {
34620
 
34621
  "use strict";
@@ -34892,7 +34892,7 @@ webpackJsonp([4],{
34892
 
34893
  /***/ },
34894
 
34895
- /***/ 495:
34896
  /***/ function(module, exports, __webpack_require__) {
34897
 
34898
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
@@ -34901,12 +34901,12 @@ webpackJsonp([4],{
34901
  * as other containers.
34902
  */
34903
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
34904
- __webpack_require__(442),
34905
- __webpack_require__(462),
34906
  __webpack_require__(271),
34907
  __webpack_require__(267),
34908
- __webpack_require__(474),
34909
- __webpack_require__(494)
34910
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(Backbone, Marionette, _, jQuery, App, BaseBlock) {
34911
 
34912
  "use strict";
@@ -35333,15 +35333,15 @@ webpackJsonp([4],{
35333
 
35334
  /***/ },
35335
 
35336
- /***/ 496:
35337
  /***/ function(module, exports, __webpack_require__) {
35338
 
35339
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
35340
  * Button content block
35341
  */
35342
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
35343
- __webpack_require__(474),
35344
- __webpack_require__(494),
35345
  __webpack_require__(268),
35346
  __webpack_require__(271),
35347
  __webpack_require__(267)
@@ -35490,15 +35490,15 @@ webpackJsonp([4],{
35490
 
35491
  /***/ },
35492
 
35493
- /***/ 497:
35494
  /***/ function(module, exports, __webpack_require__) {
35495
 
35496
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
35497
  * Image content block
35498
  */
35499
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
35500
- __webpack_require__(474),
35501
- __webpack_require__(494),
35502
  __webpack_require__(271)
35503
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, BaseBlock, _) {
35504
 
@@ -35865,15 +35865,15 @@ webpackJsonp([4],{
35865
 
35866
  /***/ },
35867
 
35868
- /***/ 498:
35869
  /***/ function(module, exports, __webpack_require__) {
35870
 
35871
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
35872
  * Divider content block
35873
  */
35874
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
35875
- __webpack_require__(474),
35876
- __webpack_require__(494),
35877
  __webpack_require__(271),
35878
  __webpack_require__(267),
35879
  __webpack_require__(268)
@@ -36029,15 +36029,15 @@ webpackJsonp([4],{
36029
 
36030
  /***/ },
36031
 
36032
- /***/ 499:
36033
  /***/ function(module, exports, __webpack_require__) {
36034
 
36035
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
36036
  * Text content block
36037
  */
36038
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
36039
- __webpack_require__(474),
36040
- __webpack_require__(494),
36041
  __webpack_require__(271)
36042
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, BaseBlock, _) {
36043
 
@@ -36154,15 +36154,15 @@ webpackJsonp([4],{
36154
 
36155
  /***/ },
36156
 
36157
- /***/ 500:
36158
  /***/ function(module, exports, __webpack_require__) {
36159
 
36160
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
36161
  * Spacer content block
36162
  */
36163
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
36164
- __webpack_require__(474),
36165
- __webpack_require__(494),
36166
  __webpack_require__(271)
36167
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, BaseBlock, _) {
36168
 
@@ -36265,15 +36265,15 @@ webpackJsonp([4],{
36265
 
36266
  /***/ },
36267
 
36268
- /***/ 501:
36269
  /***/ function(module, exports, __webpack_require__) {
36270
 
36271
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
36272
  * Footer content block
36273
  */
36274
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
36275
- __webpack_require__(474),
36276
- __webpack_require__(494),
36277
  __webpack_require__(271)
36278
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, BaseBlock, _) {
36279
 
@@ -36405,15 +36405,15 @@ webpackJsonp([4],{
36405
 
36406
  /***/ },
36407
 
36408
- /***/ 502:
36409
  /***/ function(module, exports, __webpack_require__) {
36410
 
36411
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
36412
  * Header content block
36413
  */
36414
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
36415
- __webpack_require__(474),
36416
- __webpack_require__(494),
36417
  __webpack_require__(271)
36418
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, BaseBlock, _) {
36419
 
@@ -36545,7 +36545,7 @@ webpackJsonp([4],{
36545
 
36546
  /***/ },
36547
 
36548
- /***/ 503:
36549
  /***/ function(module, exports, __webpack_require__) {
36550
 
36551
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
@@ -36557,13 +36557,13 @@ webpackJsonp([4],{
36557
  * block settings view.
36558
  */
36559
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
36560
- __webpack_require__(474),
36561
- __webpack_require__(494),
36562
- __webpack_require__(496),
36563
- __webpack_require__(498),
36564
- __webpack_require__(479),
36565
  __webpack_require__(268),
36566
- __webpack_require__(463),
36567
  __webpack_require__(271),
36568
  __webpack_require__(267)
36569
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(
@@ -36951,7 +36951,7 @@ webpackJsonp([4],{
36951
 
36952
  /***/ },
36953
 
36954
- /***/ 504:
36955
  /***/ function(module, exports, __webpack_require__) {
36956
 
36957
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
@@ -36967,17 +36967,17 @@ webpackJsonp([4],{
36967
  * block settings view.
36968
  */
36969
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
36970
- __webpack_require__(442),
36971
- __webpack_require__(462),
36972
- __webpack_require__(465),
36973
  __webpack_require__(271),
36974
  __webpack_require__(267),
36975
  __webpack_require__(268),
36976
- __webpack_require__(474),
36977
- __webpack_require__(479),
36978
- __webpack_require__(494),
36979
- __webpack_require__(496),
36980
- __webpack_require__(498),
36981
  __webpack_require__(280)
36982
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(
36983
  Backbone,
@@ -37495,18 +37495,18 @@ webpackJsonp([4],{
37495
 
37496
  /***/ },
37497
 
37498
- /***/ 505:
37499
  /***/ function(module, exports, __webpack_require__) {
37500
 
37501
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
37502
  * Social icons content block
37503
  */
37504
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
37505
- __webpack_require__(474),
37506
- __webpack_require__(494),
37507
- __webpack_require__(442),
37508
- __webpack_require__(462),
37509
- __webpack_require__(463),
37510
  __webpack_require__(271),
37511
  __webpack_require__(267)
37512
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, BaseBlock, Backbone, Marionette, SuperModel, _, jQuery) {
4
  /***/ function(module, exports, __webpack_require__) {
5
 
6
  __webpack_require__(271);
7
+ __webpack_require__(435);
8
+ __webpack_require__(455);
9
+ __webpack_require__(456);
10
+ __webpack_require__(457);
11
+ __webpack_require__(458);
12
+ __webpack_require__(280);
13
+ __webpack_require__(459);
14
+ __webpack_require__(460);
15
+ __webpack_require__(461);
16
  __webpack_require__(462);
 
 
17
  __webpack_require__(465);
 
18
  __webpack_require__(466);
19
  __webpack_require__(467);
 
20
  __webpack_require__(469);
21
+ __webpack_require__(470);
22
+ __webpack_require__(471);
23
  __webpack_require__(473);
24
  __webpack_require__(474);
25
+ __webpack_require__(475);
26
+ __webpack_require__(472);
27
  __webpack_require__(478);
28
+ __webpack_require__(479);
29
  __webpack_require__(480);
30
  __webpack_require__(481);
31
  __webpack_require__(482);
32
+ __webpack_require__(483);
33
+ __webpack_require__(484);
34
  __webpack_require__(485);
35
  __webpack_require__(486);
36
  __webpack_require__(487);
44
  __webpack_require__(495);
45
  __webpack_require__(496);
46
  __webpack_require__(497);
47
+ module.exports = __webpack_require__(498);
 
 
 
 
 
 
 
48
 
49
 
50
  /***/ },
7367
 
7368
  /***/ },
7369
 
7370
+ /***/ 435:
7371
  /***/ function(module, exports, __webpack_require__) {
7372
 
7373
+ /* WEBPACK VAR INJECTION */(function(global) {module.exports = global["Backbone"] = __webpack_require__(436);
7374
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
7375
 
7376
  /***/ },
7377
 
7378
+ /***/ 436:
7379
  /***/ function(module, exports, __webpack_require__) {
7380
 
7381
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(global) {// Backbone.js 1.3.3
9303
 
9304
  /***/ },
9305
 
9306
+ /***/ 448:
9307
  /***/ function(module, exports, __webpack_require__) {
9308
 
9309
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(268), __webpack_require__(267), __webpack_require__(271)], __WEBPACK_AMD_DEFINE_RESULT__ = function(MailPoet, jQuery, _) {
9382
 
9383
  /***/ },
9384
 
9385
+ /***/ 451:
9386
  /***/ function(module, exports, __webpack_require__) {
9387
 
9388
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(268), __webpack_require__(267)], __WEBPACK_AMD_DEFINE_RESULT__ = function(MailPoet, jQuery) {
10030
 
10031
  /***/ },
10032
 
10033
+ /***/ 452:
10034
  /***/ function(module, exports, __webpack_require__) {
10035
 
10036
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(268), __webpack_require__(267)], __WEBPACK_AMD_DEFINE_RESULT__ = function(MailPoet, jQuery) {
10263
 
10264
  /***/ },
10265
 
10266
+ /***/ 455:
10267
  /***/ function(module, exports, __webpack_require__) {
10268
 
10269
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// MarionetteJS (Backbone.Marionette)
10289
 
10290
  /* istanbul ignore next */
10291
  if (true) {
10292
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(435), __webpack_require__(271)], __WEBPACK_AMD_DEFINE_RESULT__ = function(Backbone, _) {
10293
  return (root.Marionette = root.Mn = factory(root, Backbone, _));
10294
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
10295
  } else if (typeof exports !== 'undefined') {
14235
 
14236
  /***/ },
14237
 
14238
+ /***/ 456:
14239
  /***/ function(module, exports) {
14240
 
14241
  Backbone.SuperModel = (function(_, Backbone){
14658
 
14659
  /***/ },
14660
 
14661
+ /***/ 457:
14662
  /***/ function(module, exports, __webpack_require__) {
14663
 
14664
  /**
20642
 
20643
  /***/ },
20644
 
20645
+ /***/ 458:
20646
  /***/ function(module, exports, __webpack_require__) {
20647
 
20648
  // Backbone.Radio v1.0.4
20649
 
20650
  (function (global, factory) {
20651
+ true ? module.exports = factory(__webpack_require__(271), __webpack_require__(435)) :
20652
  typeof define === 'function' && define.amd ? define(['underscore', 'backbone'], factory) :
20653
  (global.Backbone = global.Backbone || {}, global.Backbone.Radio = factory(global._,global.Backbone));
20654
  }(this, function (_,Backbone) { 'use strict';
21000
 
21001
  /***/ },
21002
 
21003
+ /***/ 459:
21004
  /***/ function(module, exports, __webpack_require__) {
21005
 
21006
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Spectrum Colorpicker v1.8.0
23330
 
23331
  /***/ },
23332
 
23333
+ /***/ 460:
23334
  /***/ function(module, exports) {
23335
 
23336
  // Generated by CoffeeScript 1.9.2
23601
 
23602
  /***/ },
23603
 
23604
+ /***/ 461:
23605
  /***/ function(module, exports) {
23606
 
23607
  /* Blob.js
23822
 
23823
  /***/ },
23824
 
23825
+ /***/ 462:
23826
  /***/ function(module, exports, __webpack_require__) {
23827
 
23828
  var __WEBPACK_AMD_DEFINE_RESULT__;/* FileSaver.js
24008
 
24009
  if (typeof module !== "undefined" && module.exports) {
24010
  module.exports.saveAs = saveAs;
24011
+ } else if (("function" !== "undefined" && __webpack_require__(463) !== null) && (__webpack_require__(464) !== null)) {
24012
  !(__WEBPACK_AMD_DEFINE_RESULT__ = function() {
24013
  return saveAs;
24014
  }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
24017
 
24018
  /***/ },
24019
 
24020
+ /***/ 463:
24021
  /***/ function(module, exports) {
24022
 
24023
  module.exports = function() { throw new Error("define cannot be used indirect"); };
24025
 
24026
  /***/ },
24027
 
24028
+ /***/ 464:
24029
  /***/ function(module, exports) {
24030
 
24031
  /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {module.exports = __webpack_amd_options__;
24034
 
24035
  /***/ },
24036
 
24037
+ /***/ 465:
24038
  /***/ function(module, exports, __webpack_require__) {
24039
 
24040
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*** IMPORTS FROM imports-loader ***/
27930
 
27931
  /***/ },
27932
 
27933
+ /***/ 466:
27934
  /***/ function(module, exports, __webpack_require__) {
27935
 
27936
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
27943
 
27944
  (function(root, factory) {
27945
  if (true) {
27946
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(455), __webpack_require__(458), __webpack_require__(271)], __WEBPACK_AMD_DEFINE_RESULT__ = function(Marionette, Radio, _) {
27947
  return factory(Marionette, Radio, _);
27948
  }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
27949
  }
27968
 
27969
  /***/ },
27970
 
27971
+ /***/ 467:
27972
  /***/ function(module, exports, __webpack_require__) {
27973
 
27974
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
27975
+ __webpack_require__(435),
27976
+ __webpack_require__(455),
27977
  __webpack_require__(267),
27978
  __webpack_require__(271),
27979
+ __webpack_require__(438),
27980
+ __webpack_require__(468)
27981
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(Backbone, Marionette, jQuery, _, Handlebars) {
27982
 
27983
  var app = new Marionette.Application(), AppView;
28010
 
28011
  /***/ },
28012
 
28013
+ /***/ 469:
28014
  /***/ function(module, exports, __webpack_require__) {
28015
 
28016
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
28017
+ __webpack_require__(467),
28018
+ __webpack_require__(456)
28019
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, SuperModel) {
28020
 
28021
  var Module = {};
28053
 
28054
  /***/ },
28055
 
28056
+ /***/ 470:
28057
  /***/ function(module, exports, __webpack_require__) {
28058
 
28059
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
28060
+ __webpack_require__(467),
28061
+ __webpack_require__(455),
28062
+ __webpack_require__(456)
28063
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, Marionette, SuperModel) {
28064
 
28065
  "use strict";
28145
 
28146
  /***/ },
28147
 
28148
+ /***/ 471:
28149
  /***/ function(module, exports, __webpack_require__) {
28150
 
28151
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
28152
+ __webpack_require__(467),
28153
+ __webpack_require__(472),
28154
  __webpack_require__(268),
28155
+ __webpack_require__(435),
28156
+ __webpack_require__(455),
28157
+ __webpack_require__(456),
28158
  __webpack_require__(271),
28159
  __webpack_require__(267),
28160
+ __webpack_require__(460)
28161
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(
28162
  App,
28163
  CommunicationComponent,
28504
 
28505
  /***/ },
28506
 
28507
+ /***/ 472:
28508
  /***/ function(module, exports, __webpack_require__) {
28509
 
28510
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
28511
+ __webpack_require__(467),
28512
  __webpack_require__(271),
28513
  __webpack_require__(268),
28514
+ __webpack_require__(448)
28515
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, _, MailPoet) {
28516
 
28517
  var Module = {};
28615
 
28616
  /***/ },
28617
 
28618
+ /***/ 473:
28619
  /***/ function(module, exports, __webpack_require__) {
28620
 
28621
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
28622
+ __webpack_require__(467),
28623
+ __webpack_require__(456),
28624
  __webpack_require__(271),
28625
  __webpack_require__(268)
28626
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, SuperModel, _, MailPoet) {
28727
 
28728
  /***/ },
28729
 
28730
+ /***/ 474:
28731
  /***/ function(module, exports, __webpack_require__) {
28732
 
28733
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
28734
+ __webpack_require__(467),
28735
+ __webpack_require__(435),
28736
+ __webpack_require__(455),
28737
  __webpack_require__(271),
28738
  __webpack_require__(267)
28739
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, Backbone, Marionette, _, jQuery) {
28770
 
28771
  /***/ },
28772
 
28773
+ /***/ 475:
28774
  /***/ function(module, exports, __webpack_require__) {
28775
 
28776
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
28777
+ __webpack_require__(467),
28778
+ __webpack_require__(472),
28779
  __webpack_require__(268),
28780
+ __webpack_require__(452),
28781
+ __webpack_require__(435),
28782
+ __webpack_require__(455),
28783
  __webpack_require__(267),
28784
+ __webpack_require__(461),
28785
+ __webpack_require__(462),
28786
+ __webpack_require__(476)
28787
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(
28788
  App,
28789
  CommunicationComponent,
29135
 
29136
  /***/ },
29137
 
29138
+ /***/ 476:
29139
  /***/ function(module, exports, __webpack_require__) {
29140
 
29141
+ /* WEBPACK VAR INJECTION */(function(global) {module.exports = global["html2canvas"] = __webpack_require__(477);
29142
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
29143
 
29144
  /***/ },
29145
 
29146
+ /***/ 477:
29147
  /***/ function(module, exports, __webpack_require__) {
29148
 
29149
  var require;var require;/* WEBPACK VAR INJECTION */(function(global) {/*
33684
 
33685
  /***/ },
33686
 
33687
+ /***/ 478:
33688
  /***/ function(module, exports, __webpack_require__) {
33689
 
33690
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
33694
  * For more check: http://marionettejs.com/docs/marionette.behaviors.html#behaviorslookup
33695
  */
33696
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
33697
+ __webpack_require__(455)
33698
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(Marionette) {
33699
 
33700
  var BehaviorsLookup = {};
33710
 
33711
  /***/ },
33712
 
33713
+ /***/ 479:
33714
  /***/ function(module, exports, __webpack_require__) {
33715
 
33716
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
33719
  * Adds a color picker integration with the view
33720
  */
33721
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
33722
+ __webpack_require__(455),
33723
+ __webpack_require__(478),
33724
  __webpack_require__(268),
33725
+ __webpack_require__(459)
33726
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(Marionette, BehaviorsLookup, MailPoet, Spectrum) {
33727
 
33728
  BehaviorsLookup.ColorPickerBehavior = Marionette.Behavior.extend({
33743
 
33744
  /***/ },
33745
 
33746
+ /***/ 480:
33747
  /***/ function(module, exports, __webpack_require__) {
33748
 
33749
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
33754
  * accept droppables
33755
  */
33756
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
33757
+ __webpack_require__(455),
33758
  __webpack_require__(271),
33759
  __webpack_require__(267),
33760
+ __webpack_require__(478),
33761
+ __webpack_require__(457)
33762
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(Marionette, _, jQuery, BehaviorsLookup, interact) {
33763
 
33764
  BehaviorsLookup.ContainerDropZoneBehavior = Marionette.Behavior.extend({
34178
 
34179
  /***/ },
34180
 
34181
+ /***/ 481:
34182
  /***/ function(module, exports, __webpack_require__) {
34183
 
34184
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
34188
  * Part of the drag&drop behavior.
34189
  */
34190
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
34191
+ __webpack_require__(455),
34192
  __webpack_require__(271),
34193
  __webpack_require__(267),
34194
+ __webpack_require__(478),
34195
+ __webpack_require__(457)
34196
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(Marionette, _, jQuery, BehaviorsLookup, interact) {
34197
 
34198
  BehaviorsLookup.DraggableBehavior = Marionette.Behavior.extend({
34326
 
34327
  /***/ },
34328
 
34329
+ /***/ 482:
34330
  /***/ function(module, exports, __webpack_require__) {
34331
 
34332
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
34335
  * Highlights a block that is being edited
34336
  */
34337
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
34338
+ __webpack_require__(455),
34339
+ __webpack_require__(478),
34340
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(Marionette, BehaviorsLookup) {
34341
 
34342
  BehaviorsLookup.HighlightEditingBehavior = Marionette.Behavior.extend({
34356
 
34357
  /***/ },
34358
 
34359
+ /***/ 483:
34360
  /***/ function(module, exports, __webpack_require__) {
34361
 
34362
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
34365
  * Allows resizing elements within a block
34366
  */
34367
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
34368
+ __webpack_require__(455),
34369
+ __webpack_require__(478),
34370
+ __webpack_require__(457)
34371
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(Marionette, BehaviorsLookup, interact) {
34372
 
34373
  BehaviorsLookup.ResizableBehavior = Marionette.Behavior.extend({
34431
 
34432
  /***/ },
34433
 
34434
+ /***/ 484:
34435
  /***/ function(module, exports, __webpack_require__) {
34436
 
34437
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
34440
  * Allows sorting elements within a collection
34441
  */
34442
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
34443
+ __webpack_require__(455),
34444
  __webpack_require__(271),
34445
+ __webpack_require__(478)
34446
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(Marionette, _, BehaviorsLookup) {
34447
 
34448
  BehaviorsLookup.SortableBehavior = Marionette.Behavior.extend({
34478
 
34479
  /***/ },
34480
 
34481
+ /***/ 485:
34482
  /***/ function(module, exports, __webpack_require__) {
34483
 
34484
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
34487
  * Opens up settings of a BlockView if contents are clicked upon
34488
  */
34489
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
34490
+ __webpack_require__(455),
34491
  __webpack_require__(267),
34492
+ __webpack_require__(478),
34493
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(Marionette, jQuery, BehaviorsLookup) {
34494
 
34495
  BehaviorsLookup.ShowSettingsBehavior = Marionette.Behavior.extend({
34516
 
34517
  /***/ },
34518
 
34519
+ /***/ 486:
34520
  /***/ function(module, exports, __webpack_require__) {
34521
 
34522
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
34525
  * Adds TinyMCE text editing capabilities to a view
34526
  */
34527
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
34528
+ __webpack_require__(455),
34529
  __webpack_require__(271),
34530
+ __webpack_require__(478)
34531
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(Marionette, _, BehaviorsLookup) {
34532
 
34533
  BehaviorsLookup.TextEditorBehavior = Marionette.Behavior.extend({
34599
 
34600
  /***/ },
34601
 
34602
+ /***/ 487:
34603
  /***/ function(module, exports, __webpack_require__) {
34604
 
34605
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
34609
  * BlockToolsView, BlockSettingsView and BlockWidgetView are optional.
34610
  */
34611
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
34612
+ __webpack_require__(467),
34613
+ __webpack_require__(455),
34614
+ __webpack_require__(456),
34615
  __webpack_require__(271),
34616
  __webpack_require__(267),
34617
  __webpack_require__(268),
34618
+ __webpack_require__(451)
34619
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, Marionette, SuperModel, _, jQuery, MailPoet, Modal) {
34620
 
34621
  "use strict";
34892
 
34893
  /***/ },
34894
 
34895
+ /***/ 488:
34896
  /***/ function(module, exports, __webpack_require__) {
34897
 
34898
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
34901
  * as other containers.
34902
  */
34903
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
34904
+ __webpack_require__(435),
34905
+ __webpack_require__(455),
34906
  __webpack_require__(271),
34907
  __webpack_require__(267),
34908
+ __webpack_require__(467),
34909
+ __webpack_require__(487)
34910
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(Backbone, Marionette, _, jQuery, App, BaseBlock) {
34911
 
34912
  "use strict";
35333
 
35334
  /***/ },
35335
 
35336
+ /***/ 489:
35337
  /***/ function(module, exports, __webpack_require__) {
35338
 
35339
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
35340
  * Button content block
35341
  */
35342
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
35343
+ __webpack_require__(467),
35344
+ __webpack_require__(487),
35345
  __webpack_require__(268),
35346
  __webpack_require__(271),
35347
  __webpack_require__(267)
35490
 
35491
  /***/ },
35492
 
35493
+ /***/ 490:
35494
  /***/ function(module, exports, __webpack_require__) {
35495
 
35496
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
35497
  * Image content block
35498
  */
35499
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
35500
+ __webpack_require__(467),
35501
+ __webpack_require__(487),
35502
  __webpack_require__(271)
35503
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, BaseBlock, _) {
35504
 
35865
 
35866
  /***/ },
35867
 
35868
+ /***/ 491:
35869
  /***/ function(module, exports, __webpack_require__) {
35870
 
35871
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
35872
  * Divider content block
35873
  */
35874
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
35875
+ __webpack_require__(467),
35876
+ __webpack_require__(487),
35877
  __webpack_require__(271),
35878
  __webpack_require__(267),
35879
  __webpack_require__(268)
36029
 
36030
  /***/ },
36031
 
36032
+ /***/ 492:
36033
  /***/ function(module, exports, __webpack_require__) {
36034
 
36035
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
36036
  * Text content block
36037
  */
36038
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
36039
+ __webpack_require__(467),
36040
+ __webpack_require__(487),
36041
  __webpack_require__(271)
36042
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, BaseBlock, _) {
36043
 
36154
 
36155
  /***/ },
36156
 
36157
+ /***/ 493:
36158
  /***/ function(module, exports, __webpack_require__) {
36159
 
36160
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
36161
  * Spacer content block
36162
  */
36163
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
36164
+ __webpack_require__(467),
36165
+ __webpack_require__(487),
36166
  __webpack_require__(271)
36167
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, BaseBlock, _) {
36168
 
36265
 
36266
  /***/ },
36267
 
36268
+ /***/ 494:
36269
  /***/ function(module, exports, __webpack_require__) {
36270
 
36271
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
36272
  * Footer content block
36273
  */
36274
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
36275
+ __webpack_require__(467),
36276
+ __webpack_require__(487),
36277
  __webpack_require__(271)
36278
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, BaseBlock, _) {
36279
 
36405
 
36406
  /***/ },
36407
 
36408
+ /***/ 495:
36409
  /***/ function(module, exports, __webpack_require__) {
36410
 
36411
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
36412
  * Header content block
36413
  */
36414
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
36415
+ __webpack_require__(467),
36416
+ __webpack_require__(487),
36417
  __webpack_require__(271)
36418
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, BaseBlock, _) {
36419
 
36545
 
36546
  /***/ },
36547
 
36548
+ /***/ 496:
36549
  /***/ function(module, exports, __webpack_require__) {
36550
 
36551
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
36557
  * block settings view.
36558
  */
36559
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
36560
+ __webpack_require__(467),
36561
+ __webpack_require__(487),
36562
+ __webpack_require__(489),
36563
+ __webpack_require__(491),
36564
+ __webpack_require__(472),
36565
  __webpack_require__(268),
36566
+ __webpack_require__(456),
36567
  __webpack_require__(271),
36568
  __webpack_require__(267)
36569
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(
36951
 
36952
  /***/ },
36953
 
36954
+ /***/ 497:
36955
  /***/ function(module, exports, __webpack_require__) {
36956
 
36957
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
36967
  * block settings view.
36968
  */
36969
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
36970
+ __webpack_require__(435),
36971
+ __webpack_require__(455),
36972
+ __webpack_require__(458),
36973
  __webpack_require__(271),
36974
  __webpack_require__(267),
36975
  __webpack_require__(268),
36976
+ __webpack_require__(467),
36977
+ __webpack_require__(472),
36978
+ __webpack_require__(487),
36979
+ __webpack_require__(489),
36980
+ __webpack_require__(491),
36981
  __webpack_require__(280)
36982
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(
36983
  Backbone,
37495
 
37496
  /***/ },
37497
 
37498
+ /***/ 498:
37499
  /***/ function(module, exports, __webpack_require__) {
37500
 
37501
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
37502
  * Social icons content block
37503
  */
37504
  !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
37505
+ __webpack_require__(467),
37506
+ __webpack_require__(487),
37507
+ __webpack_require__(435),
37508
+ __webpack_require__(455),
37509
+ __webpack_require__(456),
37510
  __webpack_require__(271),
37511
  __webpack_require__(267)
37512
  ], __WEBPACK_AMD_DEFINE_RESULT__ = function(App, BaseBlock, Backbone, Marionette, SuperModel, _, jQuery) {
assets/js/vendor.js CHANGED
@@ -99,23 +99,23 @@
99
  /***/ 0:
100
  /***/ function(module, exports, __webpack_require__) {
101
 
102
- __webpack_require__(445);
103
- __webpack_require__(475);
104
- module.exports = __webpack_require__(420);
105
 
106
 
107
  /***/ },
108
 
109
- /***/ 420:
110
  /***/ function(module, exports, __webpack_require__) {
111
 
112
  /* WEBPACK VAR INJECTION */(function(global) {if(!global["MailPoetLib"]) global["MailPoetLib"] = {};
113
- module.exports = global["MailPoetLib"]["Hooks"] = __webpack_require__(421);
114
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
115
 
116
  /***/ },
117
 
118
- /***/ 421:
119
  /***/ function(module, exports) {
120
 
121
  ( function( window, undefined ) {
@@ -373,7 +373,7 @@
373
 
374
  /***/ },
375
 
376
- /***/ 445:
377
  /***/ function(module, exports, __webpack_require__) {
378
 
379
  /*!
@@ -4477,10 +4477,10 @@
4477
 
4478
  /***/ },
4479
 
4480
- /***/ 475:
4481
  /***/ function(module, exports, __webpack_require__) {
4482
 
4483
- var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(445)], __WEBPACK_AMD_DEFINE_RESULT__ = function(Handlebars) {
4484
  // Handlebars helpers
4485
  Handlebars.registerHelper('concat', function() {
4486
  var size = (arguments.length - 1),
99
  /***/ 0:
100
  /***/ function(module, exports, __webpack_require__) {
101
 
102
+ __webpack_require__(438);
103
+ __webpack_require__(468);
104
+ module.exports = __webpack_require__(413);
105
 
106
 
107
  /***/ },
108
 
109
+ /***/ 413:
110
  /***/ function(module, exports, __webpack_require__) {
111
 
112
  /* WEBPACK VAR INJECTION */(function(global) {if(!global["MailPoetLib"]) global["MailPoetLib"] = {};
113
+ module.exports = global["MailPoetLib"]["Hooks"] = __webpack_require__(414);
114
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
115
 
116
  /***/ },
117
 
118
+ /***/ 414:
119
  /***/ function(module, exports) {
120
 
121
  ( function( window, undefined ) {
373
 
374
  /***/ },
375
 
376
+ /***/ 438:
377
  /***/ function(module, exports, __webpack_require__) {
378
 
379
  /*!
4477
 
4478
  /***/ },
4479
 
4480
+ /***/ 468:
4481
  /***/ function(module, exports, __webpack_require__) {
4482
 
4483
+ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(438)], __WEBPACK_AMD_DEFINE_RESULT__ = function(Handlebars) {
4484
  // Handlebars helpers
4485
  Handlebars.registerHelper('concat', function() {
4486
  var size = (arguments.length - 1),
lang/index.php CHANGED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+
3
+ // Silence is golden
lang/mailpoet-de_DE.mo CHANGED
Binary file
lang/mailpoet-de_DE.po CHANGED
@@ -8,9 +8,9 @@ msgid ""
8
  msgstr ""
9
  "Project-Id-Version: MP3\n"
10
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
11
- "POT-Creation-Date: 2017-03-15 12:30:53+00:00\n"
12
- "PO-Revision-Date: 2017-03-27 15:11+0000\n"
13
- "Last-Translator: FX Bénard <fxb@wp-translations.org>\n"
14
  "Language-Team: German (Germany) (http://www.transifex.com/wysija/mp3/language/de_DE/)\n"
15
  "MIME-Version: 1.0\n"
16
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -26,11 +26,11 @@ msgstr ""
26
  "X-Poedit-SourceCharset: UTF-8\n"
27
  "X-Textdomain-Support: yes\n"
28
 
29
- #: lib/API/API.php:50 lib/API/API.php:77
30
  msgid "Invalid request"
31
  msgstr "Ungültige Anfrage"
32
 
33
- #: lib/API/API.php:131
34
  msgid "You do not have the required permissions."
35
  msgstr "Du hast nicht die erforderlichen Berechtigungen."
36
 
@@ -74,12 +74,12 @@ msgstr "Abonnieren!"
74
  msgid "Check your inbox or spam folder to confirm your subscription."
75
  msgstr "Prüfe deinen Posteingang oder Spam-Ordner, um dein Abonnement zu bestätigen."
76
 
77
- #: lib/API/Endpoints/Forms.php:259 lib/API/Endpoints/Newsletters.php:199
78
  #: lib/API/Endpoints/Segments.php:119
79
  msgid "Copy of %s"
80
  msgstr "Kopie von %s"
81
 
82
- #: lib/API/Endpoints/Mailer.php:29 lib/API/Endpoints/Newsletters.php:297
83
  msgid "The email could not be sent: %s"
84
  msgstr "Die E-Mail konnte nicht gesendet werden: %s"
85
 
@@ -88,25 +88,25 @@ msgstr "Die E-Mail konnte nicht gesendet werden: %s"
88
  msgid "This template does not exist."
89
  msgstr "Dieses Template existiert nicht."
90
 
91
- #: lib/API/Endpoints/Newsletters.php:29 lib/API/Endpoints/Newsletters.php:128
92
- #: lib/API/Endpoints/Newsletters.php:149 lib/API/Endpoints/Newsletters.php:165
93
- #: lib/API/Endpoints/Newsletters.php:181 lib/API/Endpoints/Newsletters.php:195
94
- #: lib/API/Endpoints/Newsletters.php:227 lib/API/Endpoints/Newsletters.php:258
95
  #: lib/API/Endpoints/SendingQueue.php:28
96
  #: lib/API/Endpoints/SendingQueue.php:115
97
  #: lib/API/Endpoints/SendingQueue.php:141
98
  msgid "This newsletter does not exist."
99
  msgstr "Dieser Newsletter existiert nicht."
100
 
101
- #: lib/API/Endpoints/Newsletters.php:119
102
  msgid "You need to specify a status."
103
  msgstr "Du musst einen Status angeben."
104
 
105
- #: lib/API/Endpoints/Newsletters.php:218
106
  msgid "Newsletter data is missing."
107
  msgstr "Newsletterdaten fehlen."
108
 
109
- #: lib/API/Endpoints/Newsletters.php:249
110
  msgid "Please specify receiver information."
111
  msgstr "Bitte gib die Empfänger-Information an."
112
 
@@ -1663,8 +1663,8 @@ msgstr "Stile"
1663
 
1664
  #: views/form/editor.html:195
1665
  #: views/newsletter/templates/components/sidebar/preview.hbs:2
1666
- #: views/newsletters.html:102 views/settings/basics.html:243
1667
- #: views/settings/basics.html:300 views/settings/signup.html:177
1668
  msgid "Preview"
1669
  msgstr "Vorschau"
1670
 
@@ -2112,7 +2112,7 @@ msgstr "Dein Schlüssel für das Senden mit MailPoet ist ungültig."
2112
  msgid "Visit MailPoet.com to purchase a key"
2113
  msgstr "Besuche MailPoet.com, um einen Schlüssel zu erwerben"
2114
 
2115
- #: views/layout.html:64
2116
  msgid ""
2117
  "Want to give feedback to the MailPoet team? Contact us here. Please provide "
2118
  "as much information as possible!"
@@ -3668,49 +3668,55 @@ msgid ""
3668
  " be directed to this page."
3669
  msgstr "Wenn deine Abonnenten den „Verwalte dein Abonnement“-Link anklicken, werden sie zu dieser Seite weitergeleitet."
3670
 
3671
- #: views/settings/basics.html:242 views/settings/basics.html:299
 
 
 
 
 
 
3672
  #: views/settings/signup.html:176
3673
  msgid "Preview page"
3674
  msgstr "Vorschauseite"
3675
 
3676
- #: views/settings/basics.html:246
3677
  msgid "Subscribers can choose from these lists:"
3678
  msgstr "Abonnenten können aus diesen Listen wählen:"
3679
 
3680
- #: views/settings/basics.html:252 views/settings/basics.html:330
3681
- #: views/settings/basics.html:366
3682
  msgid "Leave this field empty to display all lists"
3683
  msgstr "Dieses Feld leer lassen, um alle Listen anzuzeigen"
3684
 
3685
- #: views/settings/basics.html:271
3686
  msgid "Unsubscribe page"
3687
  msgstr "Austragen-Seite"
3688
 
3689
- #: views/settings/basics.html:274
3690
  msgid ""
3691
  "When your subscribers click the \"Unsubscribe\" link, they will be directed "
3692
  "to this page."
3693
  msgstr "Wenn deine Abonnenten den „Austragen“-Link anklicken, werden sie zu dieser Seite weitergeleitet."
3694
 
3695
- #: views/settings/basics.html:276
3696
  msgid ""
3697
  "If you want to use a custom Unsubscribe page, simply paste this shortcode on"
3698
  " to a WordPress page: [mailpoet_manage text=\"Manage your subscription\"]"
3699
  msgstr "Falls du eine individuelle Austragen-Seite benutzen willst, füge einfach diesen Shortcode auf einer WordPress-Seite ein: [mailpoet_manage text=\"Verwalte dein Abonnement\"]"
3700
 
3701
- #: views/settings/basics.html:308
3702
  msgid "Archive page shortcode"
3703
  msgstr "Shortcode zur Archivseite"
3704
 
3705
- #: views/settings/basics.html:311
3706
  msgid "Paste this shortcode on a page to display a list of past newsletters."
3707
  msgstr "Füge diesen Shortcode auf einer Seite hinzu, um eine Liste vorheriger Newsletter anzuzeigen. "
3708
 
3709
- #: views/settings/basics.html:344
3710
  msgid "Shortcode to display total number of subscribers"
3711
  msgstr "Shortcode, um die Gesamtzahl der Abonnenten zu zeigen"
3712
 
3713
- #: views/settings/basics.html:347
3714
  msgid ""
3715
  "Paste this shortcode on a post or page to display the total number of "
3716
  "confirmed subscribers."
8
  msgstr ""
9
  "Project-Id-Version: MP3\n"
10
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
11
+ "POT-Creation-Date: 2017-03-28 17:53:27+00:00\n"
12
+ "PO-Revision-Date: 2017-03-29 18:31+0000\n"
13
+ "Last-Translator: Christian Herrmann <cherrmann@gmx.de>\n"
14
  "Language-Team: German (Germany) (http://www.transifex.com/wysija/mp3/language/de_DE/)\n"
15
  "MIME-Version: 1.0\n"
16
  "Content-Type: text/plain; charset=UTF-8\n"
26
  "X-Poedit-SourceCharset: UTF-8\n"
27
  "X-Textdomain-Support: yes\n"
28
 
29
+ #: lib/API/API.php:51 lib/API/API.php:78
30
  msgid "Invalid request"
31
  msgstr "Ungültige Anfrage"
32
 
33
+ #: lib/API/API.php:132
34
  msgid "You do not have the required permissions."
35
  msgstr "Du hast nicht die erforderlichen Berechtigungen."
36
 
74
  msgid "Check your inbox or spam folder to confirm your subscription."
75
  msgstr "Prüfe deinen Posteingang oder Spam-Ordner, um dein Abonnement zu bestätigen."
76
 
77
+ #: lib/API/Endpoints/Forms.php:259 lib/API/Endpoints/Newsletters.php:204
78
  #: lib/API/Endpoints/Segments.php:119
79
  msgid "Copy of %s"
80
  msgstr "Kopie von %s"
81
 
82
+ #: lib/API/Endpoints/Mailer.php:29 lib/API/Endpoints/Newsletters.php:303
83
  msgid "The email could not be sent: %s"
84
  msgstr "Die E-Mail konnte nicht gesendet werden: %s"
85
 
88
  msgid "This template does not exist."
89
  msgstr "Dieses Template existiert nicht."
90
 
91
+ #: lib/API/Endpoints/Newsletters.php:30 lib/API/Endpoints/Newsletters.php:133
92
+ #: lib/API/Endpoints/Newsletters.php:154 lib/API/Endpoints/Newsletters.php:170
93
+ #: lib/API/Endpoints/Newsletters.php:186 lib/API/Endpoints/Newsletters.php:200
94
+ #: lib/API/Endpoints/Newsletters.php:233 lib/API/Endpoints/Newsletters.php:264
95
  #: lib/API/Endpoints/SendingQueue.php:28
96
  #: lib/API/Endpoints/SendingQueue.php:115
97
  #: lib/API/Endpoints/SendingQueue.php:141
98
  msgid "This newsletter does not exist."
99
  msgstr "Dieser Newsletter existiert nicht."
100
 
101
+ #: lib/API/Endpoints/Newsletters.php:124
102
  msgid "You need to specify a status."
103
  msgstr "Du musst einen Status angeben."
104
 
105
+ #: lib/API/Endpoints/Newsletters.php:224
106
  msgid "Newsletter data is missing."
107
  msgstr "Newsletterdaten fehlen."
108
 
109
+ #: lib/API/Endpoints/Newsletters.php:255
110
  msgid "Please specify receiver information."
111
  msgstr "Bitte gib die Empfänger-Information an."
112
 
1663
 
1664
  #: views/form/editor.html:195
1665
  #: views/newsletter/templates/components/sidebar/preview.hbs:2
1666
+ #: views/newsletters.html:102 views/settings/basics.html:245
1667
+ #: views/settings/basics.html:302 views/settings/signup.html:177
1668
  msgid "Preview"
1669
  msgstr "Vorschau"
1670
 
2112
  msgid "Visit MailPoet.com to purchase a key"
2113
  msgstr "Besuche MailPoet.com, um einen Schlüssel zu erwerben"
2114
 
2115
+ #: views/layout.html:72
2116
  msgid ""
2117
  "Want to give feedback to the MailPoet team? Contact us here. Please provide "
2118
  "as much information as possible!"
3668
  " be directed to this page."
3669
  msgstr "Wenn deine Abonnenten den „Verwalte dein Abonnement“-Link anklicken, werden sie zu dieser Seite weitergeleitet."
3670
 
3671
+ #: views/settings/basics.html:221
3672
+ msgid ""
3673
+ "If you want to use a custom Subscription page, simply paste this shortcode "
3674
+ "on to a WordPress page: [mailpoet_manage_subscription]"
3675
+ msgstr "Falls du eine individuelle Seite zum Verwalten von Abonnements benutzen willst, füge einfach diesen Shortcode auf einer WordPress-Seite ein: [mailpoet_manage_subscription]"
3676
+
3677
+ #: views/settings/basics.html:244 views/settings/basics.html:301
3678
  #: views/settings/signup.html:176
3679
  msgid "Preview page"
3680
  msgstr "Vorschauseite"
3681
 
3682
+ #: views/settings/basics.html:248
3683
  msgid "Subscribers can choose from these lists:"
3684
  msgstr "Abonnenten können aus diesen Listen wählen:"
3685
 
3686
+ #: views/settings/basics.html:254 views/settings/basics.html:332
3687
+ #: views/settings/basics.html:368
3688
  msgid "Leave this field empty to display all lists"
3689
  msgstr "Dieses Feld leer lassen, um alle Listen anzuzeigen"
3690
 
3691
+ #: views/settings/basics.html:273
3692
  msgid "Unsubscribe page"
3693
  msgstr "Austragen-Seite"
3694
 
3695
+ #: views/settings/basics.html:276
3696
  msgid ""
3697
  "When your subscribers click the \"Unsubscribe\" link, they will be directed "
3698
  "to this page."
3699
  msgstr "Wenn deine Abonnenten den „Austragen“-Link anklicken, werden sie zu dieser Seite weitergeleitet."
3700
 
3701
+ #: views/settings/basics.html:278
3702
  msgid ""
3703
  "If you want to use a custom Unsubscribe page, simply paste this shortcode on"
3704
  " to a WordPress page: [mailpoet_manage text=\"Manage your subscription\"]"
3705
  msgstr "Falls du eine individuelle Austragen-Seite benutzen willst, füge einfach diesen Shortcode auf einer WordPress-Seite ein: [mailpoet_manage text=\"Verwalte dein Abonnement\"]"
3706
 
3707
+ #: views/settings/basics.html:310
3708
  msgid "Archive page shortcode"
3709
  msgstr "Shortcode zur Archivseite"
3710
 
3711
+ #: views/settings/basics.html:313
3712
  msgid "Paste this shortcode on a page to display a list of past newsletters."
3713
  msgstr "Füge diesen Shortcode auf einer Seite hinzu, um eine Liste vorheriger Newsletter anzuzeigen. "
3714
 
3715
+ #: views/settings/basics.html:346
3716
  msgid "Shortcode to display total number of subscribers"
3717
  msgstr "Shortcode, um die Gesamtzahl der Abonnenten zu zeigen"
3718
 
3719
+ #: views/settings/basics.html:349
3720
  msgid ""
3721
  "Paste this shortcode on a post or page to display the total number of "
3722
  "confirmed subscribers."
lang/mailpoet-en_GB.mo CHANGED
Binary file
lang/mailpoet-en_GB.po CHANGED
@@ -7,9 +7,9 @@ msgid ""
7
  msgstr ""
8
  "Project-Id-Version: MP3\n"
9
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
10
- "POT-Creation-Date: 2017-03-15 12:30:53+00:00\n"
11
- "PO-Revision-Date: 2017-03-27 15:11+0000\n"
12
- "Last-Translator: FX Bénard <fxb@wp-translations.org>\n"
13
  "Language-Team: English (United Kingdom) (http://www.transifex.com/wysija/mp3/language/en_GB/)\n"
14
  "MIME-Version: 1.0\n"
15
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -25,11 +25,11 @@ msgstr ""
25
  "X-Poedit-SourceCharset: UTF-8\n"
26
  "X-Textdomain-Support: yes\n"
27
 
28
- #: lib/API/API.php:50 lib/API/API.php:77
29
  msgid "Invalid request"
30
  msgstr "Invalid request"
31
 
32
- #: lib/API/API.php:131
33
  msgid "You do not have the required permissions."
34
  msgstr "You do not have the required permissions."
35
 
@@ -73,12 +73,12 @@ msgstr "Subscribe!"
73
  msgid "Check your inbox or spam folder to confirm your subscription."
74
  msgstr "Check your inbox or spam folder to confirm your subscription."
75
 
76
- #: lib/API/Endpoints/Forms.php:259 lib/API/Endpoints/Newsletters.php:199
77
  #: lib/API/Endpoints/Segments.php:119
78
  msgid "Copy of %s"
79
  msgstr "Copy of %s"
80
 
81
- #: lib/API/Endpoints/Mailer.php:29 lib/API/Endpoints/Newsletters.php:297
82
  msgid "The email could not be sent: %s"
83
  msgstr "The email could not be sent: %s"
84
 
@@ -87,25 +87,25 @@ msgstr "The email could not be sent: %s"
87
  msgid "This template does not exist."
88
  msgstr "This template does not exist."
89
 
90
- #: lib/API/Endpoints/Newsletters.php:29 lib/API/Endpoints/Newsletters.php:128
91
- #: lib/API/Endpoints/Newsletters.php:149 lib/API/Endpoints/Newsletters.php:165
92
- #: lib/API/Endpoints/Newsletters.php:181 lib/API/Endpoints/Newsletters.php:195
93
- #: lib/API/Endpoints/Newsletters.php:227 lib/API/Endpoints/Newsletters.php:258
94
  #: lib/API/Endpoints/SendingQueue.php:28
95
  #: lib/API/Endpoints/SendingQueue.php:115
96
  #: lib/API/Endpoints/SendingQueue.php:141
97
  msgid "This newsletter does not exist."
98
  msgstr "This newsletter does not exist."
99
 
100
- #: lib/API/Endpoints/Newsletters.php:119
101
  msgid "You need to specify a status."
102
  msgstr "You need to specify a status."
103
 
104
- #: lib/API/Endpoints/Newsletters.php:218
105
  msgid "Newsletter data is missing."
106
  msgstr "Newsletter data is missing."
107
 
108
- #: lib/API/Endpoints/Newsletters.php:249
109
  msgid "Please specify receiver information."
110
  msgstr "Please specify receiver information."
111
 
@@ -1662,8 +1662,8 @@ msgstr "Styles"
1662
 
1663
  #: views/form/editor.html:195
1664
  #: views/newsletter/templates/components/sidebar/preview.hbs:2
1665
- #: views/newsletters.html:102 views/settings/basics.html:243
1666
- #: views/settings/basics.html:300 views/settings/signup.html:177
1667
  msgid "Preview"
1668
  msgstr "Preview"
1669
 
@@ -2111,7 +2111,7 @@ msgstr "Your key to send with MailPoet is invalid."
2111
  msgid "Visit MailPoet.com to purchase a key"
2112
  msgstr "Visit MailPoet.com to purchase a key"
2113
 
2114
- #: views/layout.html:64
2115
  msgid ""
2116
  "Want to give feedback to the MailPoet team? Contact us here. Please provide "
2117
  "as much information as possible!"
@@ -3667,49 +3667,55 @@ msgid ""
3667
  " be directed to this page."
3668
  msgstr "When your subscribers click the \"Manage your subscription\" link, they will be directed to this page."
3669
 
3670
- #: views/settings/basics.html:242 views/settings/basics.html:299
 
 
 
 
 
 
3671
  #: views/settings/signup.html:176
3672
  msgid "Preview page"
3673
  msgstr "Preview page"
3674
 
3675
- #: views/settings/basics.html:246
3676
  msgid "Subscribers can choose from these lists:"
3677
  msgstr "Subscribers can choose from these lists:"
3678
 
3679
- #: views/settings/basics.html:252 views/settings/basics.html:330
3680
- #: views/settings/basics.html:366
3681
  msgid "Leave this field empty to display all lists"
3682
  msgstr "Leave this field empty to display all lists"
3683
 
3684
- #: views/settings/basics.html:271
3685
  msgid "Unsubscribe page"
3686
  msgstr "Unsubscribe page"
3687
 
3688
- #: views/settings/basics.html:274
3689
  msgid ""
3690
  "When your subscribers click the \"Unsubscribe\" link, they will be directed "
3691
  "to this page."
3692
  msgstr "When your subscribers click the \"Unsubscribe\" link, they will be directed to this page."
3693
 
3694
- #: views/settings/basics.html:276
3695
  msgid ""
3696
  "If you want to use a custom Unsubscribe page, simply paste this shortcode on"
3697
  " to a WordPress page: [mailpoet_manage text=\"Manage your subscription\"]"
3698
  msgstr "If you want to use a custom Unsubscribe page, simply paste this shortcode on to a WordPress page: [mailpoet_manage text=\"Manage your subscription\"]"
3699
 
3700
- #: views/settings/basics.html:308
3701
  msgid "Archive page shortcode"
3702
  msgstr "Archive page shortcode"
3703
 
3704
- #: views/settings/basics.html:311
3705
  msgid "Paste this shortcode on a page to display a list of past newsletters."
3706
  msgstr "Paste this shortcode on a page to display a list of past newsletters."
3707
 
3708
- #: views/settings/basics.html:344
3709
  msgid "Shortcode to display total number of subscribers"
3710
  msgstr "Shortcode to display total number of subscribers"
3711
 
3712
- #: views/settings/basics.html:347
3713
  msgid ""
3714
  "Paste this shortcode on a post or page to display the total number of "
3715
  "confirmed subscribers."
7
  msgstr ""
8
  "Project-Id-Version: MP3\n"
9
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
10
+ "POT-Creation-Date: 2017-03-28 17:53:27+00:00\n"
11
+ "PO-Revision-Date: 2017-04-03 08:25+0000\n"
12
+ "Last-Translator: Damian Barnett <barnez@gmx.com>\n"
13
  "Language-Team: English (United Kingdom) (http://www.transifex.com/wysija/mp3/language/en_GB/)\n"
14
  "MIME-Version: 1.0\n"
15
  "Content-Type: text/plain; charset=UTF-8\n"
25
  "X-Poedit-SourceCharset: UTF-8\n"
26
  "X-Textdomain-Support: yes\n"
27
 
28
+ #: lib/API/API.php:51 lib/API/API.php:78
29
  msgid "Invalid request"
30
  msgstr "Invalid request"
31
 
32
+ #: lib/API/API.php:132
33
  msgid "You do not have the required permissions."
34
  msgstr "You do not have the required permissions."
35
 
73
  msgid "Check your inbox or spam folder to confirm your subscription."
74
  msgstr "Check your inbox or spam folder to confirm your subscription."
75
 
76
+ #: lib/API/Endpoints/Forms.php:259 lib/API/Endpoints/Newsletters.php:204
77
  #: lib/API/Endpoints/Segments.php:119
78
  msgid "Copy of %s"
79
  msgstr "Copy of %s"
80
 
81
+ #: lib/API/Endpoints/Mailer.php:29 lib/API/Endpoints/Newsletters.php:303
82
  msgid "The email could not be sent: %s"
83
  msgstr "The email could not be sent: %s"
84
 
87
  msgid "This template does not exist."
88
  msgstr "This template does not exist."
89
 
90
+ #: lib/API/Endpoints/Newsletters.php:30 lib/API/Endpoints/Newsletters.php:133
91
+ #: lib/API/Endpoints/Newsletters.php:154 lib/API/Endpoints/Newsletters.php:170
92
+ #: lib/API/Endpoints/Newsletters.php:186 lib/API/Endpoints/Newsletters.php:200
93
+ #: lib/API/Endpoints/Newsletters.php:233 lib/API/Endpoints/Newsletters.php:264
94
  #: lib/API/Endpoints/SendingQueue.php:28
95
  #: lib/API/Endpoints/SendingQueue.php:115
96
  #: lib/API/Endpoints/SendingQueue.php:141
97
  msgid "This newsletter does not exist."
98
  msgstr "This newsletter does not exist."
99
 
100
+ #: lib/API/Endpoints/Newsletters.php:124
101
  msgid "You need to specify a status."
102
  msgstr "You need to specify a status."
103
 
104
+ #: lib/API/Endpoints/Newsletters.php:224
105
  msgid "Newsletter data is missing."
106
  msgstr "Newsletter data is missing."
107
 
108
+ #: lib/API/Endpoints/Newsletters.php:255
109
  msgid "Please specify receiver information."
110
  msgstr "Please specify receiver information."
111
 
1662
 
1663
  #: views/form/editor.html:195
1664
  #: views/newsletter/templates/components/sidebar/preview.hbs:2
1665
+ #: views/newsletters.html:102 views/settings/basics.html:245
1666
+ #: views/settings/basics.html:302 views/settings/signup.html:177
1667
  msgid "Preview"
1668
  msgstr "Preview"
1669
 
2111
  msgid "Visit MailPoet.com to purchase a key"
2112
  msgstr "Visit MailPoet.com to purchase a key"
2113
 
2114
+ #: views/layout.html:72
2115
  msgid ""
2116
  "Want to give feedback to the MailPoet team? Contact us here. Please provide "
2117
  "as much information as possible!"
3667
  " be directed to this page."
3668
  msgstr "When your subscribers click the \"Manage your subscription\" link, they will be directed to this page."
3669
 
3670
+ #: views/settings/basics.html:221
3671
+ msgid ""
3672
+ "If you want to use a custom Subscription page, simply paste this shortcode "
3673
+ "on to a WordPress page: [mailpoet_manage_subscription]"
3674
+ msgstr "If you want to use a custom Subscription page, simply paste this shortcode on to a WordPress page: [mailpoet_manage_subscription]"
3675
+
3676
+ #: views/settings/basics.html:244 views/settings/basics.html:301
3677
  #: views/settings/signup.html:176
3678
  msgid "Preview page"
3679
  msgstr "Preview page"
3680
 
3681
+ #: views/settings/basics.html:248
3682
  msgid "Subscribers can choose from these lists:"
3683
  msgstr "Subscribers can choose from these lists:"
3684
 
3685
+ #: views/settings/basics.html:254 views/settings/basics.html:332
3686
+ #: views/settings/basics.html:368
3687
  msgid "Leave this field empty to display all lists"
3688
  msgstr "Leave this field empty to display all lists"
3689
 
3690
+ #: views/settings/basics.html:273
3691
  msgid "Unsubscribe page"
3692
  msgstr "Unsubscribe page"
3693
 
3694
+ #: views/settings/basics.html:276
3695
  msgid ""
3696
  "When your subscribers click the \"Unsubscribe\" link, they will be directed "
3697
  "to this page."
3698
  msgstr "When your subscribers click the \"Unsubscribe\" link, they will be directed to this page."
3699
 
3700
+ #: views/settings/basics.html:278
3701
  msgid ""
3702
  "If you want to use a custom Unsubscribe page, simply paste this shortcode on"
3703
  " to a WordPress page: [mailpoet_manage text=\"Manage your subscription\"]"
3704
  msgstr "If you want to use a custom Unsubscribe page, simply paste this shortcode on to a WordPress page: [mailpoet_manage text=\"Manage your subscription\"]"
3705
 
3706
+ #: views/settings/basics.html:310
3707
  msgid "Archive page shortcode"
3708
  msgstr "Archive page shortcode"
3709
 
3710
+ #: views/settings/basics.html:313
3711
  msgid "Paste this shortcode on a page to display a list of past newsletters."
3712
  msgstr "Paste this shortcode on a page to display a list of past newsletters."
3713
 
3714
+ #: views/settings/basics.html:346
3715
  msgid "Shortcode to display total number of subscribers"
3716
  msgstr "Shortcode to display total number of subscribers"
3717
 
3718
+ #: views/settings/basics.html:349
3719
  msgid ""
3720
  "Paste this shortcode on a post or page to display the total number of "
3721
  "confirmed subscribers."
lang/mailpoet-es_ES.mo CHANGED
Binary file
lang/mailpoet-es_ES.po CHANGED
@@ -7,9 +7,9 @@ msgid ""
7
  msgstr ""
8
  "Project-Id-Version: MP3\n"
9
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
10
- "POT-Creation-Date: 2017-03-15 12:30:53+00:00\n"
11
- "PO-Revision-Date: 2017-03-27 15:11+0000\n"
12
- "Last-Translator: FX Bénard <fxb@wp-translations.org>\n"
13
  "Language-Team: Spanish (Spain) (http://www.transifex.com/wysija/mp3/language/es_ES/)\n"
14
  "MIME-Version: 1.0\n"
15
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -25,11 +25,11 @@ msgstr ""
25
  "X-Poedit-SourceCharset: UTF-8\n"
26
  "X-Textdomain-Support: yes\n"
27
 
28
- #: lib/API/API.php:50 lib/API/API.php:77
29
  msgid "Invalid request"
30
  msgstr "Petición no válida"
31
 
32
- #: lib/API/API.php:131
33
  msgid "You do not have the required permissions."
34
  msgstr "No tienes los permisos necesarios"
35
 
@@ -73,12 +73,12 @@ msgstr "¡Suscríbete!"
73
  msgid "Check your inbox or spam folder to confirm your subscription."
74
  msgstr "Revisa tu bandeja de entrada o la carpeta de spam para confirmar tu suscripción."
75
 
76
- #: lib/API/Endpoints/Forms.php:259 lib/API/Endpoints/Newsletters.php:199
77
  #: lib/API/Endpoints/Segments.php:119
78
  msgid "Copy of %s"
79
  msgstr "Copia de %s"
80
 
81
- #: lib/API/Endpoints/Mailer.php:29 lib/API/Endpoints/Newsletters.php:297
82
  msgid "The email could not be sent: %s"
83
  msgstr "El correo electrónico no pudo se enviado:%s"
84
 
@@ -87,25 +87,25 @@ msgstr "El correo electrónico no pudo se enviado:%s"
87
  msgid "This template does not exist."
88
  msgstr "Esta plantilla no existe"
89
 
90
- #: lib/API/Endpoints/Newsletters.php:29 lib/API/Endpoints/Newsletters.php:128
91
- #: lib/API/Endpoints/Newsletters.php:149 lib/API/Endpoints/Newsletters.php:165
92
- #: lib/API/Endpoints/Newsletters.php:181 lib/API/Endpoints/Newsletters.php:195
93
- #: lib/API/Endpoints/Newsletters.php:227 lib/API/Endpoints/Newsletters.php:258
94
  #: lib/API/Endpoints/SendingQueue.php:28
95
  #: lib/API/Endpoints/SendingQueue.php:115
96
  #: lib/API/Endpoints/SendingQueue.php:141
97
  msgid "This newsletter does not exist."
98
  msgstr "Ese boletín no existe."
99
 
100
- #: lib/API/Endpoints/Newsletters.php:119
101
  msgid "You need to specify a status."
102
  msgstr "Necesitas un estado específico."
103
 
104
- #: lib/API/Endpoints/Newsletters.php:218
105
  msgid "Newsletter data is missing."
106
  msgstr "Se perdieron los datos del boletín."
107
 
108
- #: lib/API/Endpoints/Newsletters.php:249
109
  msgid "Please specify receiver information."
110
  msgstr "Por favor, especifica la información del receptor."
111
 
@@ -1662,8 +1662,8 @@ msgstr "Estilos"
1662
 
1663
  #: views/form/editor.html:195
1664
  #: views/newsletter/templates/components/sidebar/preview.hbs:2
1665
- #: views/newsletters.html:102 views/settings/basics.html:243
1666
- #: views/settings/basics.html:300 views/settings/signup.html:177
1667
  msgid "Preview"
1668
  msgstr "Vista previa"
1669
 
@@ -2111,7 +2111,7 @@ msgstr "Tu clave para enviar con MailPoet no es válida."
2111
  msgid "Visit MailPoet.com to purchase a key"
2112
  msgstr "Visita MailPoet para adquirir una clave"
2113
 
2114
- #: views/layout.html:64
2115
  msgid ""
2116
  "Want to give feedback to the MailPoet team? Contact us here. Please provide "
2117
  "as much information as possible!"
@@ -3667,49 +3667,55 @@ msgid ""
3667
  " be directed to this page."
3668
  msgstr "Cuando tus suscriptores hacen clic en el enlace \"Administrar su suscripción\" son dirigidos a esta página."
3669
 
3670
- #: views/settings/basics.html:242 views/settings/basics.html:299
 
 
 
 
 
 
3671
  #: views/settings/signup.html:176
3672
  msgid "Preview page"
3673
  msgstr "Vista preliminar de la página"
3674
 
3675
- #: views/settings/basics.html:246
3676
  msgid "Subscribers can choose from these lists:"
3677
  msgstr "Los suscriptores pueden elegir de entre estas listas:"
3678
 
3679
- #: views/settings/basics.html:252 views/settings/basics.html:330
3680
- #: views/settings/basics.html:366
3681
  msgid "Leave this field empty to display all lists"
3682
  msgstr "Deja este campo vacío para mostrar todas las listas"
3683
 
3684
- #: views/settings/basics.html:271
3685
  msgid "Unsubscribe page"
3686
  msgstr "Página para cancelar suscripción"
3687
 
3688
- #: views/settings/basics.html:274
3689
  msgid ""
3690
  "When your subscribers click the \"Unsubscribe\" link, they will be directed "
3691
  "to this page."
3692
  msgstr "Cuando tus suscriptores hacen clic en el enlace \"Darse de baja\" son redirigidos a esta página."
3693
 
3694
- #: views/settings/basics.html:276
3695
  msgid ""
3696
  "If you want to use a custom Unsubscribe page, simply paste this shortcode on"
3697
  " to a WordPress page: [mailpoet_manage text=\"Manage your subscription\"]"
3698
  msgstr "Si deseas utilizar una página personalizada para darse de baja, simplemente pega este código abreviado a una página de WordPress: [mailpoet_manage text=\"Gestionar tu suscripción\"]"
3699
 
3700
- #: views/settings/basics.html:308
3701
  msgid "Archive page shortcode"
3702
  msgstr "Shortcode para página de archivo"
3703
 
3704
- #: views/settings/basics.html:311
3705
  msgid "Paste this shortcode on a page to display a list of past newsletters."
3706
  msgstr "Pega este shortcode en una página para mostrar una lista de los boletines anteriores."
3707
 
3708
- #: views/settings/basics.html:344
3709
  msgid "Shortcode to display total number of subscribers"
3710
  msgstr "Shortcode para mostrar el número total de suscriptores."
3711
 
3712
- #: views/settings/basics.html:347
3713
  msgid ""
3714
  "Paste this shortcode on a post or page to display the total number of "
3715
  "confirmed subscribers."
7
  msgstr ""
8
  "Project-Id-Version: MP3\n"
9
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
10
+ "POT-Creation-Date: 2017-03-28 17:53:27+00:00\n"
11
+ "PO-Revision-Date: 2017-04-03 15:19+0000\n"
12
+ "Last-Translator: Luis Rull <luisrull@gmail.com>\n"
13
  "Language-Team: Spanish (Spain) (http://www.transifex.com/wysija/mp3/language/es_ES/)\n"
14
  "MIME-Version: 1.0\n"
15
  "Content-Type: text/plain; charset=UTF-8\n"
25
  "X-Poedit-SourceCharset: UTF-8\n"
26
  "X-Textdomain-Support: yes\n"
27
 
28
+ #: lib/API/API.php:51 lib/API/API.php:78
29
  msgid "Invalid request"
30
  msgstr "Petición no válida"
31
 
32
+ #: lib/API/API.php:132
33
  msgid "You do not have the required permissions."
34
  msgstr "No tienes los permisos necesarios"
35
 
73
  msgid "Check your inbox or spam folder to confirm your subscription."
74
  msgstr "Revisa tu bandeja de entrada o la carpeta de spam para confirmar tu suscripción."
75
 
76
+ #: lib/API/Endpoints/Forms.php:259 lib/API/Endpoints/Newsletters.php:204
77
  #: lib/API/Endpoints/Segments.php:119
78
  msgid "Copy of %s"
79
  msgstr "Copia de %s"
80
 
81
+ #: lib/API/Endpoints/Mailer.php:29 lib/API/Endpoints/Newsletters.php:303
82
  msgid "The email could not be sent: %s"
83
  msgstr "El correo electrónico no pudo se enviado:%s"
84
 
87
  msgid "This template does not exist."
88
  msgstr "Esta plantilla no existe"
89
 
90
+ #: lib/API/Endpoints/Newsletters.php:30 lib/API/Endpoints/Newsletters.php:133
91
+ #: lib/API/Endpoints/Newsletters.php:154 lib/API/Endpoints/Newsletters.php:170
92
+ #: lib/API/Endpoints/Newsletters.php:186 lib/API/Endpoints/Newsletters.php:200
93
+ #: lib/API/Endpoints/Newsletters.php:233 lib/API/Endpoints/Newsletters.php:264
94
  #: lib/API/Endpoints/SendingQueue.php:28
95
  #: lib/API/Endpoints/SendingQueue.php:115
96
  #: lib/API/Endpoints/SendingQueue.php:141
97
  msgid "This newsletter does not exist."
98
  msgstr "Ese boletín no existe."
99
 
100
+ #: lib/API/Endpoints/Newsletters.php:124
101
  msgid "You need to specify a status."
102
  msgstr "Necesitas un estado específico."
103
 
104
+ #: lib/API/Endpoints/Newsletters.php:224
105
  msgid "Newsletter data is missing."
106
  msgstr "Se perdieron los datos del boletín."
107
 
108
+ #: lib/API/Endpoints/Newsletters.php:255
109
  msgid "Please specify receiver information."
110
  msgstr "Por favor, especifica la información del receptor."
111
 
1662
 
1663
  #: views/form/editor.html:195
1664
  #: views/newsletter/templates/components/sidebar/preview.hbs:2
1665
+ #: views/newsletters.html:102 views/settings/basics.html:245
1666
+ #: views/settings/basics.html:302 views/settings/signup.html:177
1667
  msgid "Preview"
1668
  msgstr "Vista previa"
1669
 
2111
  msgid "Visit MailPoet.com to purchase a key"
2112
  msgstr "Visita MailPoet para adquirir una clave"
2113
 
2114
+ #: views/layout.html:72
2115
  msgid ""
2116
  "Want to give feedback to the MailPoet team? Contact us here. Please provide "
2117
  "as much information as possible!"
3667
  " be directed to this page."
3668
  msgstr "Cuando tus suscriptores hacen clic en el enlace \"Administrar su suscripción\" son dirigidos a esta página."
3669
 
3670
+ #: views/settings/basics.html:221
3671
+ msgid ""
3672
+ "If you want to use a custom Subscription page, simply paste this shortcode "
3673
+ "on to a WordPress page: [mailpoet_manage_subscription]"
3674
+ msgstr "Si deseas utilizar una página personalizada de suscripción, sólo tienes que pegar este código abreviado en cualquier página de WordPress: [mailpoet_manage_subscription]"
3675
+
3676
+ #: views/settings/basics.html:244 views/settings/basics.html:301
3677
  #: views/settings/signup.html:176
3678
  msgid "Preview page"
3679
  msgstr "Vista preliminar de la página"
3680
 
3681
+ #: views/settings/basics.html:248
3682
  msgid "Subscribers can choose from these lists:"
3683
  msgstr "Los suscriptores pueden elegir de entre estas listas:"
3684
 
3685
+ #: views/settings/basics.html:254 views/settings/basics.html:332
3686
+ #: views/settings/basics.html:368
3687
  msgid "Leave this field empty to display all lists"
3688
  msgstr "Deja este campo vacío para mostrar todas las listas"
3689
 
3690
+ #: views/settings/basics.html:273
3691
  msgid "Unsubscribe page"
3692
  msgstr "Página para cancelar suscripción"
3693
 
3694
+ #: views/settings/basics.html:276
3695
  msgid ""
3696
  "When your subscribers click the \"Unsubscribe\" link, they will be directed "
3697
  "to this page."
3698
  msgstr "Cuando tus suscriptores hacen clic en el enlace \"Darse de baja\" son redirigidos a esta página."
3699
 
3700
+ #: views/settings/basics.html:278
3701
  msgid ""
3702
  "If you want to use a custom Unsubscribe page, simply paste this shortcode on"
3703
  " to a WordPress page: [mailpoet_manage text=\"Manage your subscription\"]"
3704
  msgstr "Si deseas utilizar una página personalizada para darse de baja, simplemente pega este código abreviado a una página de WordPress: [mailpoet_manage text=\"Gestionar tu suscripción\"]"
3705
 
3706
+ #: views/settings/basics.html:310
3707
  msgid "Archive page shortcode"
3708
  msgstr "Shortcode para página de archivo"
3709
 
3710
+ #: views/settings/basics.html:313
3711
  msgid "Paste this shortcode on a page to display a list of past newsletters."
3712
  msgstr "Pega este shortcode en una página para mostrar una lista de los boletines anteriores."
3713
 
3714
+ #: views/settings/basics.html:346
3715
  msgid "Shortcode to display total number of subscribers"
3716
  msgstr "Shortcode para mostrar el número total de suscriptores."
3717
 
3718
+ #: views/settings/basics.html:349
3719
  msgid ""
3720
  "Paste this shortcode on a post or page to display the total number of "
3721
  "confirmed subscribers."
lang/mailpoet-fr_FR.mo CHANGED
Binary file
lang/mailpoet-fr_FR.po CHANGED
@@ -8,8 +8,8 @@ msgid ""
8
  msgstr ""
9
  "Project-Id-Version: MP3\n"
10
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
11
- "POT-Creation-Date: 2017-03-15 12:30:53+00:00\n"
12
- "PO-Revision-Date: 2017-03-27 15:11+0000\n"
13
  "Last-Translator: FX Bénard <fxb@wp-translations.org>\n"
14
  "Language-Team: French (France) (http://www.transifex.com/wysija/mp3/language/fr_FR/)\n"
15
  "MIME-Version: 1.0\n"
@@ -26,11 +26,11 @@ msgstr ""
26
  "X-Poedit-SourceCharset: UTF-8\n"
27
  "X-Textdomain-Support: yes\n"
28
 
29
- #: lib/API/API.php:50 lib/API/API.php:77
30
  msgid "Invalid request"
31
  msgstr "Requête non valide."
32
 
33
- #: lib/API/API.php:131
34
  msgid "You do not have the required permissions."
35
  msgstr "Vous n’avez pas les permissions nécessaires."
36
 
@@ -74,12 +74,12 @@ msgstr "Je m’abonne !"
74
  msgid "Check your inbox or spam folder to confirm your subscription."
75
  msgstr "Vérifiez votre boite de réception ou votre répertoire d’indésirables pour confirmer votre abonnement."
76
 
77
- #: lib/API/Endpoints/Forms.php:259 lib/API/Endpoints/Newsletters.php:199
78
  #: lib/API/Endpoints/Segments.php:119
79
  msgid "Copy of %s"
80
  msgstr "Copie de %s"
81
 
82
- #: lib/API/Endpoints/Mailer.php:29 lib/API/Endpoints/Newsletters.php:297
83
  msgid "The email could not be sent: %s"
84
  msgstr "L’e-mail n’a pas pu être envoyé : %s"
85
 
@@ -88,25 +88,25 @@ msgstr "L’e-mail n’a pas pu être envoyé : %s"
88
  msgid "This template does not exist."
89
  msgstr "Ce modèle n’existe pas."
90
 
91
- #: lib/API/Endpoints/Newsletters.php:29 lib/API/Endpoints/Newsletters.php:128
92
- #: lib/API/Endpoints/Newsletters.php:149 lib/API/Endpoints/Newsletters.php:165
93
- #: lib/API/Endpoints/Newsletters.php:181 lib/API/Endpoints/Newsletters.php:195
94
- #: lib/API/Endpoints/Newsletters.php:227 lib/API/Endpoints/Newsletters.php:258
95
  #: lib/API/Endpoints/SendingQueue.php:28
96
  #: lib/API/Endpoints/SendingQueue.php:115
97
  #: lib/API/Endpoints/SendingQueue.php:141
98
  msgid "This newsletter does not exist."
99
  msgstr "Cette newsletter n’existe pas."
100
 
101
- #: lib/API/Endpoints/Newsletters.php:119
102
  msgid "You need to specify a status."
103
  msgstr "Vous devez spécifier un état."
104
 
105
- #: lib/API/Endpoints/Newsletters.php:218
106
  msgid "Newsletter data is missing."
107
  msgstr "Les données de la newsletter sont absentes."
108
 
109
- #: lib/API/Endpoints/Newsletters.php:249
110
  msgid "Please specify receiver information."
111
  msgstr "Veuillez spécifier les informations du destinataire."
112
 
@@ -1663,8 +1663,8 @@ msgstr "Styles"
1663
 
1664
  #: views/form/editor.html:195
1665
  #: views/newsletter/templates/components/sidebar/preview.hbs:2
1666
- #: views/newsletters.html:102 views/settings/basics.html:243
1667
- #: views/settings/basics.html:300 views/settings/signup.html:177
1668
  msgid "Preview"
1669
  msgstr "Aperçu"
1670
 
@@ -2112,7 +2112,7 @@ msgstr "Votre clé pour envoyer avec MailPoet n’est pas valide !"
2112
  msgid "Visit MailPoet.com to purchase a key"
2113
  msgstr "Rendez-vous sur MailPoet.com pour acheter une clé"
2114
 
2115
- #: views/layout.html:64
2116
  msgid ""
2117
  "Want to give feedback to the MailPoet team? Contact us here. Please provide "
2118
  "as much information as possible!"
@@ -3668,49 +3668,55 @@ msgid ""
3668
  " be directed to this page."
3669
  msgstr "Lorsque vos abonnés cliquent sur le lien « Gérer votre abonnement », ils seront redirigés vers cette page."
3670
 
3671
- #: views/settings/basics.html:242 views/settings/basics.html:299
 
 
 
 
 
 
3672
  #: views/settings/signup.html:176
3673
  msgid "Preview page"
3674
  msgstr "Prévisualiser la page"
3675
 
3676
- #: views/settings/basics.html:246
3677
  msgid "Subscribers can choose from these lists:"
3678
  msgstr "Les abonnés peuvent choisir parmi ces listes :"
3679
 
3680
- #: views/settings/basics.html:252 views/settings/basics.html:330
3681
- #: views/settings/basics.html:366
3682
  msgid "Leave this field empty to display all lists"
3683
  msgstr "Laissez ce champ vide pour afficher toutes les listes"
3684
 
3685
- #: views/settings/basics.html:271
3686
  msgid "Unsubscribe page"
3687
  msgstr "Page de désabonnement"
3688
 
3689
- #: views/settings/basics.html:274
3690
  msgid ""
3691
  "When your subscribers click the \"Unsubscribe\" link, they will be directed "
3692
  "to this page."
3693
  msgstr "Lorsque vos abonnés cliquent sur le lien « Se désabonner », ils seront redirigés vers cette page."
3694
 
3695
- #: views/settings/basics.html:276
3696
  msgid ""
3697
  "If you want to use a custom Unsubscribe page, simply paste this shortcode on"
3698
  " to a WordPress page: [mailpoet_manage text=\"Manage your subscription\"]"
3699
  msgstr "Si vous voulez utiliser une page de désabonnement personnalisée, collez simplement ce code court dans la page : [mailpoet_manage_text=\"Gérer votre abonnement\"]"
3700
 
3701
- #: views/settings/basics.html:308
3702
  msgid "Archive page shortcode"
3703
  msgstr "Code court de la page d’archive"
3704
 
3705
- #: views/settings/basics.html:311
3706
  msgid "Paste this shortcode on a page to display a list of past newsletters."
3707
  msgstr "Collez ce code court dans une page pour afficher une liste des newsletters précédentes."
3708
 
3709
- #: views/settings/basics.html:344
3710
  msgid "Shortcode to display total number of subscribers"
3711
  msgstr "Code court pour afficher le nombre total d’abonnés"
3712
 
3713
- #: views/settings/basics.html:347
3714
  msgid ""
3715
  "Paste this shortcode on a post or page to display the total number of "
3716
  "confirmed subscribers."
8
  msgstr ""
9
  "Project-Id-Version: MP3\n"
10
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
11
+ "POT-Creation-Date: 2017-03-28 17:53:27+00:00\n"
12
+ "PO-Revision-Date: 2017-04-03 15:24+0000\n"
13
  "Last-Translator: FX Bénard <fxb@wp-translations.org>\n"
14
  "Language-Team: French (France) (http://www.transifex.com/wysija/mp3/language/fr_FR/)\n"
15
  "MIME-Version: 1.0\n"
26
  "X-Poedit-SourceCharset: UTF-8\n"
27
  "X-Textdomain-Support: yes\n"
28
 
29
+ #: lib/API/API.php:51 lib/API/API.php:78
30
  msgid "Invalid request"
31
  msgstr "Requête non valide."
32
 
33
+ #: lib/API/API.php:132
34
  msgid "You do not have the required permissions."
35
  msgstr "Vous n’avez pas les permissions nécessaires."
36
 
74
  msgid "Check your inbox or spam folder to confirm your subscription."
75
  msgstr "Vérifiez votre boite de réception ou votre répertoire d’indésirables pour confirmer votre abonnement."
76
 
77
+ #: lib/API/Endpoints/Forms.php:259 lib/API/Endpoints/Newsletters.php:204
78
  #: lib/API/Endpoints/Segments.php:119
79
  msgid "Copy of %s"
80
  msgstr "Copie de %s"
81
 
82
+ #: lib/API/Endpoints/Mailer.php:29 lib/API/Endpoints/Newsletters.php:303
83
  msgid "The email could not be sent: %s"
84
  msgstr "L’e-mail n’a pas pu être envoyé : %s"
85
 
88
  msgid "This template does not exist."
89
  msgstr "Ce modèle n’existe pas."
90
 
91
+ #: lib/API/Endpoints/Newsletters.php:30 lib/API/Endpoints/Newsletters.php:133
92
+ #: lib/API/Endpoints/Newsletters.php:154 lib/API/Endpoints/Newsletters.php:170
93
+ #: lib/API/Endpoints/Newsletters.php:186 lib/API/Endpoints/Newsletters.php:200
94
+ #: lib/API/Endpoints/Newsletters.php:233 lib/API/Endpoints/Newsletters.php:264
95
  #: lib/API/Endpoints/SendingQueue.php:28
96
  #: lib/API/Endpoints/SendingQueue.php:115
97
  #: lib/API/Endpoints/SendingQueue.php:141
98
  msgid "This newsletter does not exist."
99
  msgstr "Cette newsletter n’existe pas."
100
 
101
+ #: lib/API/Endpoints/Newsletters.php:124
102
  msgid "You need to specify a status."
103
  msgstr "Vous devez spécifier un état."
104
 
105
+ #: lib/API/Endpoints/Newsletters.php:224
106
  msgid "Newsletter data is missing."
107
  msgstr "Les données de la newsletter sont absentes."
108
 
109
+ #: lib/API/Endpoints/Newsletters.php:255
110
  msgid "Please specify receiver information."
111
  msgstr "Veuillez spécifier les informations du destinataire."
112
 
1663
 
1664
  #: views/form/editor.html:195
1665
  #: views/newsletter/templates/components/sidebar/preview.hbs:2
1666
+ #: views/newsletters.html:102 views/settings/basics.html:245
1667
+ #: views/settings/basics.html:302 views/settings/signup.html:177
1668
  msgid "Preview"
1669
  msgstr "Aperçu"
1670
 
2112
  msgid "Visit MailPoet.com to purchase a key"
2113
  msgstr "Rendez-vous sur MailPoet.com pour acheter une clé"
2114
 
2115
+ #: views/layout.html:72
2116
  msgid ""
2117
  "Want to give feedback to the MailPoet team? Contact us here. Please provide "
2118
  "as much information as possible!"
3668
  " be directed to this page."
3669
  msgstr "Lorsque vos abonnés cliquent sur le lien « Gérer votre abonnement », ils seront redirigés vers cette page."
3670
 
3671
+ #: views/settings/basics.html:221
3672
+ msgid ""
3673
+ "If you want to use a custom Subscription page, simply paste this shortcode "
3674
+ "on to a WordPress page: [mailpoet_manage_subscription]"
3675
+ msgstr "Si vous voulez utiliser une page d’abonnement personnalisée, collez simplement ce code court dans une page WordPress : [mailpoet_manage_subscription]"
3676
+
3677
+ #: views/settings/basics.html:244 views/settings/basics.html:301
3678
  #: views/settings/signup.html:176
3679
  msgid "Preview page"
3680
  msgstr "Prévisualiser la page"
3681
 
3682
+ #: views/settings/basics.html:248
3683
  msgid "Subscribers can choose from these lists:"
3684
  msgstr "Les abonnés peuvent choisir parmi ces listes :"
3685
 
3686
+ #: views/settings/basics.html:254 views/settings/basics.html:332
3687
+ #: views/settings/basics.html:368
3688
  msgid "Leave this field empty to display all lists"
3689
  msgstr "Laissez ce champ vide pour afficher toutes les listes"
3690
 
3691
+ #: views/settings/basics.html:273
3692
  msgid "Unsubscribe page"
3693
  msgstr "Page de désabonnement"
3694
 
3695
+ #: views/settings/basics.html:276
3696
  msgid ""
3697
  "When your subscribers click the \"Unsubscribe\" link, they will be directed "
3698
  "to this page."
3699
  msgstr "Lorsque vos abonnés cliquent sur le lien « Se désabonner », ils seront redirigés vers cette page."
3700
 
3701
+ #: views/settings/basics.html:278
3702
  msgid ""
3703
  "If you want to use a custom Unsubscribe page, simply paste this shortcode on"
3704
  " to a WordPress page: [mailpoet_manage text=\"Manage your subscription\"]"
3705
  msgstr "Si vous voulez utiliser une page de désabonnement personnalisée, collez simplement ce code court dans la page : [mailpoet_manage_text=\"Gérer votre abonnement\"]"
3706
 
3707
+ #: views/settings/basics.html:310
3708
  msgid "Archive page shortcode"
3709
  msgstr "Code court de la page d’archive"
3710
 
3711
+ #: views/settings/basics.html:313
3712
  msgid "Paste this shortcode on a page to display a list of past newsletters."
3713
  msgstr "Collez ce code court dans une page pour afficher une liste des newsletters précédentes."
3714
 
3715
+ #: views/settings/basics.html:346
3716
  msgid "Shortcode to display total number of subscribers"
3717
  msgstr "Code court pour afficher le nombre total d’abonnés"
3718
 
3719
+ #: views/settings/basics.html:349
3720
  msgid ""
3721
  "Paste this shortcode on a post or page to display the total number of "
3722
  "confirmed subscribers."
lang/mailpoet-it_IT.mo CHANGED
Binary file
lang/mailpoet-it_IT.po CHANGED
@@ -8,9 +8,9 @@ msgid ""
8
  msgstr ""
9
  "Project-Id-Version: MP3\n"
10
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
11
- "POT-Creation-Date: 2017-03-15 12:30:53+00:00\n"
12
- "PO-Revision-Date: 2017-03-27 15:11+0000\n"
13
- "Last-Translator: FX Bénard <fxb@wp-translations.org>\n"
14
  "Language-Team: Italian (Italy) (http://www.transifex.com/wysija/mp3/language/it_IT/)\n"
15
  "MIME-Version: 1.0\n"
16
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -26,11 +26,11 @@ msgstr ""
26
  "X-Poedit-SourceCharset: UTF-8\n"
27
  "X-Textdomain-Support: yes\n"
28
 
29
- #: lib/API/API.php:50 lib/API/API.php:77
30
  msgid "Invalid request"
31
  msgstr "Richiesta non valida"
32
 
33
- #: lib/API/API.php:131
34
  msgid "You do not have the required permissions."
35
  msgstr "Non hai i permessi necessari."
36
 
@@ -74,12 +74,12 @@ msgstr "Iscriviti"
74
  msgid "Check your inbox or spam folder to confirm your subscription."
75
  msgstr "Controlla la tua casella di posta o la cartella spam per confermare la tua iscrizione"
76
 
77
- #: lib/API/Endpoints/Forms.php:259 lib/API/Endpoints/Newsletters.php:199
78
  #: lib/API/Endpoints/Segments.php:119
79
  msgid "Copy of %s"
80
  msgstr "Copia di %s"
81
 
82
- #: lib/API/Endpoints/Mailer.php:29 lib/API/Endpoints/Newsletters.php:297
83
  msgid "The email could not be sent: %s"
84
  msgstr "Non è stato possibile inviare l'email: %s"
85
 
@@ -88,25 +88,25 @@ msgstr "Non è stato possibile inviare l'email: %s"
88
  msgid "This template does not exist."
89
  msgstr "Questo template non esiste."
90
 
91
- #: lib/API/Endpoints/Newsletters.php:29 lib/API/Endpoints/Newsletters.php:128
92
- #: lib/API/Endpoints/Newsletters.php:149 lib/API/Endpoints/Newsletters.php:165
93
- #: lib/API/Endpoints/Newsletters.php:181 lib/API/Endpoints/Newsletters.php:195
94
- #: lib/API/Endpoints/Newsletters.php:227 lib/API/Endpoints/Newsletters.php:258
95
  #: lib/API/Endpoints/SendingQueue.php:28
96
  #: lib/API/Endpoints/SendingQueue.php:115
97
  #: lib/API/Endpoints/SendingQueue.php:141
98
  msgid "This newsletter does not exist."
99
  msgstr "Questa newsletter non esiste."
100
 
101
- #: lib/API/Endpoints/Newsletters.php:119
102
  msgid "You need to specify a status."
103
  msgstr "Devi specificare uno stato."
104
 
105
- #: lib/API/Endpoints/Newsletters.php:218
106
  msgid "Newsletter data is missing."
107
  msgstr "Mancano le informazioni per la newsletter."
108
 
109
- #: lib/API/Endpoints/Newsletters.php:249
110
  msgid "Please specify receiver information."
111
  msgstr "Specifica le informazioni del ricevente."
112
 
@@ -1663,8 +1663,8 @@ msgstr "Stili"
1663
 
1664
  #: views/form/editor.html:195
1665
  #: views/newsletter/templates/components/sidebar/preview.hbs:2
1666
- #: views/newsletters.html:102 views/settings/basics.html:243
1667
- #: views/settings/basics.html:300 views/settings/signup.html:177
1668
  msgid "Preview"
1669
  msgstr "Anteprima"
1670
 
@@ -2112,7 +2112,7 @@ msgstr "La chiave per inviare con MailPoet non è valida!"
2112
  msgid "Visit MailPoet.com to purchase a key"
2113
  msgstr "Vai a MailPoet.com per comprare una chiave"
2114
 
2115
- #: views/layout.html:64
2116
  msgid ""
2117
  "Want to give feedback to the MailPoet team? Contact us here. Please provide "
2118
  "as much information as possible!"
@@ -3668,49 +3668,55 @@ msgid ""
3668
  " be directed to this page."
3669
  msgstr "Quando gli iscritti fanno clic sul link \"Gestisci l’iscrizione\", saranno indirizzati a questa pagina."
3670
 
3671
- #: views/settings/basics.html:242 views/settings/basics.html:299
 
 
 
 
 
 
3672
  #: views/settings/signup.html:176
3673
  msgid "Preview page"
3674
  msgstr "Anteprima della pagina"
3675
 
3676
- #: views/settings/basics.html:246
3677
  msgid "Subscribers can choose from these lists:"
3678
  msgstr "Gli iscritti possono scegliere tra queste liste:"
3679
 
3680
- #: views/settings/basics.html:252 views/settings/basics.html:330
3681
- #: views/settings/basics.html:366
3682
  msgid "Leave this field empty to display all lists"
3683
  msgstr "lascia questo campo vuoto per visualizzare tutte le liste"
3684
 
3685
- #: views/settings/basics.html:271
3686
  msgid "Unsubscribe page"
3687
  msgstr "Pagina di cancellazione dell’iscrizione"
3688
 
3689
- #: views/settings/basics.html:274
3690
  msgid ""
3691
  "When your subscribers click the \"Unsubscribe\" link, they will be directed "
3692
  "to this page."
3693
  msgstr "Quando gli iscritti fanno clic sul link \"Disiscriviti\", saranno indirizzati a questa pagina."
3694
 
3695
- #: views/settings/basics.html:276
3696
  msgid ""
3697
  "If you want to use a custom Unsubscribe page, simply paste this shortcode on"
3698
  " to a WordPress page: [mailpoet_manage text=\"Manage your subscription\"]"
3699
  msgstr "Se vuoi usare una pagina personalizzata per \"Discriviti\", incolla questo shortcode in una pagina WordPress: [mailpoet_manage text=\"Gestisci l’iscrizione\"]"
3700
 
3701
- #: views/settings/basics.html:308
3702
  msgid "Archive page shortcode"
3703
  msgstr "Shortcode pagina archivio"
3704
 
3705
- #: views/settings/basics.html:311
3706
  msgid "Paste this shortcode on a page to display a list of past newsletters."
3707
  msgstr "Incolla questo shortcode in una pagina per mostrare una lista delle newsletter precedenti."
3708
 
3709
- #: views/settings/basics.html:344
3710
  msgid "Shortcode to display total number of subscribers"
3711
  msgstr "Shortcode per mostrare il numero totale di iscritti"
3712
 
3713
- #: views/settings/basics.html:347
3714
  msgid ""
3715
  "Paste this shortcode on a post or page to display the total number of "
3716
  "confirmed subscribers."
8
  msgstr ""
9
  "Project-Id-Version: MP3\n"
10
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
11
+ "POT-Creation-Date: 2017-03-28 17:53:27+00:00\n"
12
+ "PO-Revision-Date: 2017-03-31 15:34+0000\n"
13
+ "Last-Translator: Laura Sacco <laurasacco12@gmail.com>\n"
14
  "Language-Team: Italian (Italy) (http://www.transifex.com/wysija/mp3/language/it_IT/)\n"
15
  "MIME-Version: 1.0\n"
16
  "Content-Type: text/plain; charset=UTF-8\n"
26
  "X-Poedit-SourceCharset: UTF-8\n"
27
  "X-Textdomain-Support: yes\n"
28
 
29
+ #: lib/API/API.php:51 lib/API/API.php:78
30
  msgid "Invalid request"
31
  msgstr "Richiesta non valida"
32
 
33
+ #: lib/API/API.php:132
34
  msgid "You do not have the required permissions."
35
  msgstr "Non hai i permessi necessari."
36
 
74
  msgid "Check your inbox or spam folder to confirm your subscription."
75
  msgstr "Controlla la tua casella di posta o la cartella spam per confermare la tua iscrizione"
76
 
77
+ #: lib/API/Endpoints/Forms.php:259 lib/API/Endpoints/Newsletters.php:204
78
  #: lib/API/Endpoints/Segments.php:119
79
  msgid "Copy of %s"
80
  msgstr "Copia di %s"
81
 
82
+ #: lib/API/Endpoints/Mailer.php:29 lib/API/Endpoints/Newsletters.php:303
83
  msgid "The email could not be sent: %s"
84
  msgstr "Non è stato possibile inviare l'email: %s"
85
 
88
  msgid "This template does not exist."
89
  msgstr "Questo template non esiste."
90
 
91
+ #: lib/API/Endpoints/Newsletters.php:30 lib/API/Endpoints/Newsletters.php:133
92
+ #: lib/API/Endpoints/Newsletters.php:154 lib/API/Endpoints/Newsletters.php:170
93
+ #: lib/API/Endpoints/Newsletters.php:186 lib/API/Endpoints/Newsletters.php:200
94
+ #: lib/API/Endpoints/Newsletters.php:233 lib/API/Endpoints/Newsletters.php:264
95
  #: lib/API/Endpoints/SendingQueue.php:28
96
  #: lib/API/Endpoints/SendingQueue.php:115
97
  #: lib/API/Endpoints/SendingQueue.php:141
98
  msgid "This newsletter does not exist."
99
  msgstr "Questa newsletter non esiste."
100
 
101
+ #: lib/API/Endpoints/Newsletters.php:124
102
  msgid "You need to specify a status."
103
  msgstr "Devi specificare uno stato."
104
 
105
+ #: lib/API/Endpoints/Newsletters.php:224
106
  msgid "Newsletter data is missing."
107
  msgstr "Mancano le informazioni per la newsletter."
108
 
109
+ #: lib/API/Endpoints/Newsletters.php:255
110
  msgid "Please specify receiver information."
111
  msgstr "Specifica le informazioni del ricevente."
112
 
1663
 
1664
  #: views/form/editor.html:195
1665
  #: views/newsletter/templates/components/sidebar/preview.hbs:2
1666
+ #: views/newsletters.html:102 views/settings/basics.html:245
1667
+ #: views/settings/basics.html:302 views/settings/signup.html:177
1668
  msgid "Preview"
1669
  msgstr "Anteprima"
1670
 
2112
  msgid "Visit MailPoet.com to purchase a key"
2113
  msgstr "Vai a MailPoet.com per comprare una chiave"
2114
 
2115
+ #: views/layout.html:72
2116
  msgid ""
2117
  "Want to give feedback to the MailPoet team? Contact us here. Please provide "
2118
  "as much information as possible!"
3668
  " be directed to this page."
3669
  msgstr "Quando gli iscritti fanno clic sul link \"Gestisci l’iscrizione\", saranno indirizzati a questa pagina."
3670
 
3671
+ #: views/settings/basics.html:221
3672
+ msgid ""
3673
+ "If you want to use a custom Subscription page, simply paste this shortcode "
3674
+ "on to a WordPress page: [mailpoet_manage_subscription]"
3675
+ msgstr "Se vuoi usare una pagina di abbonamento personalizzata, incolla semplicemente questo shortcode in una pagina WordPress: [mailpoet_manage_subscription]"
3676
+
3677
+ #: views/settings/basics.html:244 views/settings/basics.html:301
3678
  #: views/settings/signup.html:176
3679
  msgid "Preview page"
3680
  msgstr "Anteprima della pagina"
3681
 
3682
+ #: views/settings/basics.html:248
3683
  msgid "Subscribers can choose from these lists:"
3684
  msgstr "Gli iscritti possono scegliere tra queste liste:"
3685
 
3686
+ #: views/settings/basics.html:254 views/settings/basics.html:332
3687
+ #: views/settings/basics.html:368
3688
  msgid "Leave this field empty to display all lists"
3689
  msgstr "lascia questo campo vuoto per visualizzare tutte le liste"
3690
 
3691
+ #: views/settings/basics.html:273
3692
  msgid "Unsubscribe page"
3693
  msgstr "Pagina di cancellazione dell’iscrizione"
3694
 
3695
+ #: views/settings/basics.html:276
3696
  msgid ""
3697
  "When your subscribers click the \"Unsubscribe\" link, they will be directed "
3698
  "to this page."
3699
  msgstr "Quando gli iscritti fanno clic sul link \"Disiscriviti\", saranno indirizzati a questa pagina."
3700
 
3701
+ #: views/settings/basics.html:278
3702
  msgid ""
3703
  "If you want to use a custom Unsubscribe page, simply paste this shortcode on"
3704
  " to a WordPress page: [mailpoet_manage text=\"Manage your subscription\"]"
3705
  msgstr "Se vuoi usare una pagina personalizzata per \"Discriviti\", incolla questo shortcode in una pagina WordPress: [mailpoet_manage text=\"Gestisci l’iscrizione\"]"
3706
 
3707
+ #: views/settings/basics.html:310
3708
  msgid "Archive page shortcode"
3709
  msgstr "Shortcode pagina archivio"
3710
 
3711
+ #: views/settings/basics.html:313
3712
  msgid "Paste this shortcode on a page to display a list of past newsletters."
3713
  msgstr "Incolla questo shortcode in una pagina per mostrare una lista delle newsletter precedenti."
3714
 
3715
+ #: views/settings/basics.html:346
3716
  msgid "Shortcode to display total number of subscribers"
3717
  msgstr "Shortcode per mostrare il numero totale di iscritti"
3718
 
3719
+ #: views/settings/basics.html:349
3720
  msgid ""
3721
  "Paste this shortcode on a post or page to display the total number of "
3722
  "confirmed subscribers."
lang/mailpoet-nl_NL.mo CHANGED
Binary file
lang/mailpoet-nl_NL.po CHANGED
@@ -8,9 +8,9 @@ msgid ""
8
  msgstr ""
9
  "Project-Id-Version: MP3\n"
10
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
11
- "POT-Creation-Date: 2017-03-15 12:30:53+00:00\n"
12
- "PO-Revision-Date: 2017-03-27 15:11+0000\n"
13
- "Last-Translator: FX Bénard <fxb@wp-translations.org>\n"
14
  "Language-Team: Dutch (Netherlands) (http://www.transifex.com/wysija/mp3/language/nl_NL/)\n"
15
  "MIME-Version: 1.0\n"
16
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -26,11 +26,11 @@ msgstr ""
26
  "X-Poedit-SourceCharset: UTF-8\n"
27
  "X-Textdomain-Support: yes\n"
28
 
29
- #: lib/API/API.php:50 lib/API/API.php:77
30
  msgid "Invalid request"
31
  msgstr "Ongeldig verzoek"
32
 
33
- #: lib/API/API.php:131
34
  msgid "You do not have the required permissions."
35
  msgstr "Je hebt onvoldoende rechten."
36
 
@@ -74,12 +74,12 @@ msgstr "Abonneren!"
74
  msgid "Check your inbox or spam folder to confirm your subscription."
75
  msgstr "Controleer je inbox of spammap om je abonnement te bevestigen."
76
 
77
- #: lib/API/Endpoints/Forms.php:259 lib/API/Endpoints/Newsletters.php:199
78
  #: lib/API/Endpoints/Segments.php:119
79
  msgid "Copy of %s"
80
  msgstr "Kopie van %s"
81
 
82
- #: lib/API/Endpoints/Mailer.php:29 lib/API/Endpoints/Newsletters.php:297
83
  msgid "The email could not be sent: %s"
84
  msgstr "De e-mail kon niet worden verzonden: %s"
85
 
@@ -88,25 +88,25 @@ msgstr "De e-mail kon niet worden verzonden: %s"
88
  msgid "This template does not exist."
89
  msgstr "Dit sjabloon bestaat niet."
90
 
91
- #: lib/API/Endpoints/Newsletters.php:29 lib/API/Endpoints/Newsletters.php:128
92
- #: lib/API/Endpoints/Newsletters.php:149 lib/API/Endpoints/Newsletters.php:165
93
- #: lib/API/Endpoints/Newsletters.php:181 lib/API/Endpoints/Newsletters.php:195
94
- #: lib/API/Endpoints/Newsletters.php:227 lib/API/Endpoints/Newsletters.php:258
95
  #: lib/API/Endpoints/SendingQueue.php:28
96
  #: lib/API/Endpoints/SendingQueue.php:115
97
  #: lib/API/Endpoints/SendingQueue.php:141
98
  msgid "This newsletter does not exist."
99
  msgstr "Deze nieuwsbrief bestaat niet."
100
 
101
- #: lib/API/Endpoints/Newsletters.php:119
102
  msgid "You need to specify a status."
103
  msgstr "Je moet een status specificeren."
104
 
105
- #: lib/API/Endpoints/Newsletters.php:218
106
  msgid "Newsletter data is missing."
107
  msgstr "Nieuwsbriefgegevens ontbreken."
108
 
109
- #: lib/API/Endpoints/Newsletters.php:249
110
  msgid "Please specify receiver information."
111
  msgstr "Specificeer informatie ontvanger."
112
 
@@ -1663,8 +1663,8 @@ msgstr "Stijlen"
1663
 
1664
  #: views/form/editor.html:195
1665
  #: views/newsletter/templates/components/sidebar/preview.hbs:2
1666
- #: views/newsletters.html:102 views/settings/basics.html:243
1667
- #: views/settings/basics.html:300 views/settings/signup.html:177
1668
  msgid "Preview"
1669
  msgstr "Voorbeeld"
1670
 
@@ -2112,7 +2112,7 @@ msgstr "Je sleutel om te verzenden met MailPoet is ongeldig."
2112
  msgid "Visit MailPoet.com to purchase a key"
2113
  msgstr "Bezoek MailPoet.com om een sleutel te kopen"
2114
 
2115
- #: views/layout.html:64
2116
  msgid ""
2117
  "Want to give feedback to the MailPoet team? Contact us here. Please provide "
2118
  "as much information as possible!"
@@ -3668,49 +3668,55 @@ msgid ""
3668
  " be directed to this page."
3669
  msgstr "Wanneer je abonnees op de \"Je abonnement beheren\"-link klikken, zullen ze naar deze pagina worden doorverwezen."
3670
 
3671
- #: views/settings/basics.html:242 views/settings/basics.html:299
 
 
 
 
 
 
3672
  #: views/settings/signup.html:176
3673
  msgid "Preview page"
3674
  msgstr "Voorbeeldpagina"
3675
 
3676
- #: views/settings/basics.html:246
3677
  msgid "Subscribers can choose from these lists:"
3678
  msgstr "Abonnees kunnen uit deze lijsten kiezen:"
3679
 
3680
- #: views/settings/basics.html:252 views/settings/basics.html:330
3681
- #: views/settings/basics.html:366
3682
  msgid "Leave this field empty to display all lists"
3683
  msgstr "Laat dit veld leeg om alle lijsten te tonen"
3684
 
3685
- #: views/settings/basics.html:271
3686
  msgid "Unsubscribe page"
3687
  msgstr "Afmeldpagina"
3688
 
3689
- #: views/settings/basics.html:274
3690
  msgid ""
3691
  "When your subscribers click the \"Unsubscribe\" link, they will be directed "
3692
  "to this page."
3693
  msgstr "Wanneer je abonnees op de \"Uitschrijven\"-link klikken, zullen ze naar deze pagina worden doorverwezen."
3694
 
3695
- #: views/settings/basics.html:276
3696
  msgid ""
3697
  "If you want to use a custom Unsubscribe page, simply paste this shortcode on"
3698
  " to a WordPress page: [mailpoet_manage text=\"Manage your subscription\"]"
3699
  msgstr "Als je een aangepaste uitschrijfpagina wilt gebruiken, plak dan deze shortcode eenvoudig in een WordPress-pagina: [mailpoet_manage text=\"Je abonnement beheren\"]"
3700
 
3701
- #: views/settings/basics.html:308
3702
  msgid "Archive page shortcode"
3703
  msgstr "Shortcode voor de archiefpagina"
3704
 
3705
- #: views/settings/basics.html:311
3706
  msgid "Paste this shortcode on a page to display a list of past newsletters."
3707
  msgstr "Plak deze shortcode op een pagina om een lijst van eerdere nieuwsbrieven te tonen."
3708
 
3709
- #: views/settings/basics.html:344
3710
  msgid "Shortcode to display total number of subscribers"
3711
  msgstr "Shortcode om het totaal aantal abonnees te tonen"
3712
 
3713
- #: views/settings/basics.html:347
3714
  msgid ""
3715
  "Paste this shortcode on a post or page to display the total number of "
3716
  "confirmed subscribers."
8
  msgstr ""
9
  "Project-Id-Version: MP3\n"
10
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
11
+ "POT-Creation-Date: 2017-03-28 17:53:27+00:00\n"
12
+ "PO-Revision-Date: 2017-03-31 08:17+0000\n"
13
+ "Last-Translator: Thom\n"
14
  "Language-Team: Dutch (Netherlands) (http://www.transifex.com/wysija/mp3/language/nl_NL/)\n"
15
  "MIME-Version: 1.0\n"
16
  "Content-Type: text/plain; charset=UTF-8\n"
26
  "X-Poedit-SourceCharset: UTF-8\n"
27
  "X-Textdomain-Support: yes\n"
28
 
29
+ #: lib/API/API.php:51 lib/API/API.php:78
30
  msgid "Invalid request"
31
  msgstr "Ongeldig verzoek"
32
 
33
+ #: lib/API/API.php:132
34
  msgid "You do not have the required permissions."
35
  msgstr "Je hebt onvoldoende rechten."
36
 
74
  msgid "Check your inbox or spam folder to confirm your subscription."
75
  msgstr "Controleer je inbox of spammap om je abonnement te bevestigen."
76
 
77
+ #: lib/API/Endpoints/Forms.php:259 lib/API/Endpoints/Newsletters.php:204
78
  #: lib/API/Endpoints/Segments.php:119
79
  msgid "Copy of %s"
80
  msgstr "Kopie van %s"
81
 
82
+ #: lib/API/Endpoints/Mailer.php:29 lib/API/Endpoints/Newsletters.php:303
83
  msgid "The email could not be sent: %s"
84
  msgstr "De e-mail kon niet worden verzonden: %s"
85
 
88
  msgid "This template does not exist."
89
  msgstr "Dit sjabloon bestaat niet."
90
 
91
+ #: lib/API/Endpoints/Newsletters.php:30 lib/API/Endpoints/Newsletters.php:133
92
+ #: lib/API/Endpoints/Newsletters.php:154 lib/API/Endpoints/Newsletters.php:170
93
+ #: lib/API/Endpoints/Newsletters.php:186 lib/API/Endpoints/Newsletters.php:200
94
+ #: lib/API/Endpoints/Newsletters.php:233 lib/API/Endpoints/Newsletters.php:264
95
  #: lib/API/Endpoints/SendingQueue.php:28
96
  #: lib/API/Endpoints/SendingQueue.php:115
97
  #: lib/API/Endpoints/SendingQueue.php:141
98
  msgid "This newsletter does not exist."
99
  msgstr "Deze nieuwsbrief bestaat niet."
100
 
101
+ #: lib/API/Endpoints/Newsletters.php:124
102
  msgid "You need to specify a status."
103
  msgstr "Je moet een status specificeren."
104
 
105
+ #: lib/API/Endpoints/Newsletters.php:224
106
  msgid "Newsletter data is missing."
107
  msgstr "Nieuwsbriefgegevens ontbreken."
108
 
109
+ #: lib/API/Endpoints/Newsletters.php:255
110
  msgid "Please specify receiver information."
111
  msgstr "Specificeer informatie ontvanger."
112
 
1663
 
1664
  #: views/form/editor.html:195
1665
  #: views/newsletter/templates/components/sidebar/preview.hbs:2
1666
+ #: views/newsletters.html:102 views/settings/basics.html:245
1667
+ #: views/settings/basics.html:302 views/settings/signup.html:177
1668
  msgid "Preview"
1669
  msgstr "Voorbeeld"
1670
 
2112
  msgid "Visit MailPoet.com to purchase a key"
2113
  msgstr "Bezoek MailPoet.com om een sleutel te kopen"
2114
 
2115
+ #: views/layout.html:72
2116
  msgid ""
2117
  "Want to give feedback to the MailPoet team? Contact us here. Please provide "
2118
  "as much information as possible!"
3668
  " be directed to this page."
3669
  msgstr "Wanneer je abonnees op de \"Je abonnement beheren\"-link klikken, zullen ze naar deze pagina worden doorverwezen."
3670
 
3671
+ #: views/settings/basics.html:221
3672
+ msgid ""
3673
+ "If you want to use a custom Subscription page, simply paste this shortcode "
3674
+ "on to a WordPress page: [mailpoet_manage_subscription]"
3675
+ msgstr "Als je een aangepaste abonnementspagina wilt gebruiken, plak dan eenvoudig deze shortcode op een WordPress-pagina: [mailpoet_manage_subscription]"
3676
+
3677
+ #: views/settings/basics.html:244 views/settings/basics.html:301
3678
  #: views/settings/signup.html:176
3679
  msgid "Preview page"
3680
  msgstr "Voorbeeldpagina"
3681
 
3682
+ #: views/settings/basics.html:248
3683
  msgid "Subscribers can choose from these lists:"
3684
  msgstr "Abonnees kunnen uit deze lijsten kiezen:"
3685
 
3686
+ #: views/settings/basics.html:254 views/settings/basics.html:332
3687
+ #: views/settings/basics.html:368
3688
  msgid "Leave this field empty to display all lists"
3689
  msgstr "Laat dit veld leeg om alle lijsten te tonen"
3690
 
3691
+ #: views/settings/basics.html:273
3692
  msgid "Unsubscribe page"
3693
  msgstr "Afmeldpagina"
3694
 
3695
+ #: views/settings/basics.html:276
3696
  msgid ""
3697
  "When your subscribers click the \"Unsubscribe\" link, they will be directed "
3698
  "to this page."
3699
  msgstr "Wanneer je abonnees op de \"Uitschrijven\"-link klikken, zullen ze naar deze pagina worden doorverwezen."
3700
 
3701
+ #: views/settings/basics.html:278
3702
  msgid ""
3703
  "If you want to use a custom Unsubscribe page, simply paste this shortcode on"
3704
  " to a WordPress page: [mailpoet_manage text=\"Manage your subscription\"]"
3705
  msgstr "Als je een aangepaste uitschrijfpagina wilt gebruiken, plak dan deze shortcode eenvoudig in een WordPress-pagina: [mailpoet_manage text=\"Je abonnement beheren\"]"
3706
 
3707
+ #: views/settings/basics.html:310
3708
  msgid "Archive page shortcode"
3709
  msgstr "Shortcode voor de archiefpagina"
3710
 
3711
+ #: views/settings/basics.html:313
3712
  msgid "Paste this shortcode on a page to display a list of past newsletters."
3713
  msgstr "Plak deze shortcode op een pagina om een lijst van eerdere nieuwsbrieven te tonen."
3714
 
3715
+ #: views/settings/basics.html:346
3716
  msgid "Shortcode to display total number of subscribers"
3717
  msgstr "Shortcode om het totaal aantal abonnees te tonen"
3718
 
3719
+ #: views/settings/basics.html:349
3720
  msgid ""
3721
  "Paste this shortcode on a post or page to display the total number of "
3722
  "confirmed subscribers."
lang/mailpoet-pt_PT.mo CHANGED
Binary file
lang/mailpoet-pt_PT.po CHANGED
@@ -8,9 +8,9 @@ msgid ""
8
  msgstr ""
9
  "Project-Id-Version: MP3\n"
10
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
11
- "POT-Creation-Date: 2017-03-15 12:30:53+00:00\n"
12
- "PO-Revision-Date: 2017-03-27 15:11+0000\n"
13
- "Last-Translator: FX Bénard <fxb@wp-translations.org>\n"
14
  "Language-Team: Portuguese (Portugal) (http://www.transifex.com/wysija/mp3/language/pt_PT/)\n"
15
  "MIME-Version: 1.0\n"
16
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -26,11 +26,11 @@ msgstr ""
26
  "X-Poedit-SourceCharset: UTF-8\n"
27
  "X-Textdomain-Support: yes\n"
28
 
29
- #: lib/API/API.php:50 lib/API/API.php:77
30
  msgid "Invalid request"
31
  msgstr "Pedido inválido"
32
 
33
- #: lib/API/API.php:131
34
  msgid "You do not have the required permissions."
35
  msgstr "Não tem as permissões necessárias."
36
 
@@ -74,12 +74,12 @@ msgstr "Subscrever!"
74
  msgid "Check your inbox or spam folder to confirm your subscription."
75
  msgstr "Verifique na sua caixa de correio ou na pasta de spam para confirmar a sua subscrição."
76
 
77
- #: lib/API/Endpoints/Forms.php:259 lib/API/Endpoints/Newsletters.php:199
78
  #: lib/API/Endpoints/Segments.php:119
79
  msgid "Copy of %s"
80
  msgstr "Cópia de %s"
81
 
82
- #: lib/API/Endpoints/Mailer.php:29 lib/API/Endpoints/Newsletters.php:297
83
  msgid "The email could not be sent: %s"
84
  msgstr "Não foi possível enviar o email: %s"
85
 
@@ -88,25 +88,25 @@ msgstr "Não foi possível enviar o email: %s"
88
  msgid "This template does not exist."
89
  msgstr "Este modelo não existe."
90
 
91
- #: lib/API/Endpoints/Newsletters.php:29 lib/API/Endpoints/Newsletters.php:128
92
- #: lib/API/Endpoints/Newsletters.php:149 lib/API/Endpoints/Newsletters.php:165
93
- #: lib/API/Endpoints/Newsletters.php:181 lib/API/Endpoints/Newsletters.php:195
94
- #: lib/API/Endpoints/Newsletters.php:227 lib/API/Endpoints/Newsletters.php:258
95
  #: lib/API/Endpoints/SendingQueue.php:28
96
  #: lib/API/Endpoints/SendingQueue.php:115
97
  #: lib/API/Endpoints/SendingQueue.php:141
98
  msgid "This newsletter does not exist."
99
  msgstr "Esta newsletter não existe."
100
 
101
- #: lib/API/Endpoints/Newsletters.php:119
102
  msgid "You need to specify a status."
103
  msgstr "Tem de especificar um estado."
104
 
105
- #: lib/API/Endpoints/Newsletters.php:218
106
  msgid "Newsletter data is missing."
107
  msgstr "Dados da newsletter em falta."
108
 
109
- #: lib/API/Endpoints/Newsletters.php:249
110
  msgid "Please specify receiver information."
111
  msgstr "Por favor indique a informação do destinatário."
112
 
@@ -1663,8 +1663,8 @@ msgstr "Estilos"
1663
 
1664
  #: views/form/editor.html:195
1665
  #: views/newsletter/templates/components/sidebar/preview.hbs:2
1666
- #: views/newsletters.html:102 views/settings/basics.html:243
1667
- #: views/settings/basics.html:300 views/settings/signup.html:177
1668
  msgid "Preview"
1669
  msgstr "Pré-visualizar"
1670
 
@@ -2112,7 +2112,7 @@ msgstr "A sua chave para enviar com o MailPoet é inválida."
2112
  msgid "Visit MailPoet.com to purchase a key"
2113
  msgstr "Visite MailPoet.com para comprar uma chave"
2114
 
2115
- #: views/layout.html:64
2116
  msgid ""
2117
  "Want to give feedback to the MailPoet team? Contact us here. Please provide "
2118
  "as much information as possible!"
@@ -3668,49 +3668,55 @@ msgid ""
3668
  " be directed to this page."
3669
  msgstr "Quando os seus subscritores clicarem na ligação \"Gerir a sua subscrição\", serão direccionados para esta página."
3670
 
3671
- #: views/settings/basics.html:242 views/settings/basics.html:299
 
 
 
 
 
 
3672
  #: views/settings/signup.html:176
3673
  msgid "Preview page"
3674
  msgstr "Pré-visualizar página"
3675
 
3676
- #: views/settings/basics.html:246
3677
  msgid "Subscribers can choose from these lists:"
3678
  msgstr "Os subscritores podem escolher das seguintes listas:"
3679
 
3680
- #: views/settings/basics.html:252 views/settings/basics.html:330
3681
- #: views/settings/basics.html:366
3682
  msgid "Leave this field empty to display all lists"
3683
  msgstr "Deixe este campo vazio para mostrar todas as listas"
3684
 
3685
- #: views/settings/basics.html:271
3686
  msgid "Unsubscribe page"
3687
  msgstr "Página de cancelamento da subscrição"
3688
 
3689
- #: views/settings/basics.html:274
3690
  msgid ""
3691
  "When your subscribers click the \"Unsubscribe\" link, they will be directed "
3692
  "to this page."
3693
  msgstr "Quando os seus subscritores clicarem na ligação \"Cancelar subscrição\", serão direccionados para esta página."
3694
 
3695
- #: views/settings/basics.html:276
3696
  msgid ""
3697
  "If you want to use a custom Unsubscribe page, simply paste this shortcode on"
3698
  " to a WordPress page: [mailpoet_manage text=\"Manage your subscription\"]"
3699
- msgstr "Se quiser usar uma página personalizada para Cancelar subscrição, simplesmente cole este shortcode numa página do WordPress: [mailpoet_manage text=\"Gerir a sua subscrição\"]"
3700
 
3701
- #: views/settings/basics.html:308
3702
  msgid "Archive page shortcode"
3703
  msgstr "Shortcode da página de arquivo"
3704
 
3705
- #: views/settings/basics.html:311
3706
  msgid "Paste this shortcode on a page to display a list of past newsletters."
3707
  msgstr "Cole este shortcode numa página para mostrar uma lista de newsletters anteriores."
3708
 
3709
- #: views/settings/basics.html:344
3710
  msgid "Shortcode to display total number of subscribers"
3711
  msgstr "Shortcode para mostrar o número total de subscritores"
3712
 
3713
- #: views/settings/basics.html:347
3714
  msgid ""
3715
  "Paste this shortcode on a post or page to display the total number of "
3716
  "confirmed subscribers."
8
  msgstr ""
9
  "Project-Id-Version: MP3\n"
10
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
11
+ "POT-Creation-Date: 2017-03-28 17:53:27+00:00\n"
12
+ "PO-Revision-Date: 2017-04-04 09:15+0000\n"
13
+ "Last-Translator: Álvaro Góis dos Santos <alvarogois@ovni.org>\n"
14
  "Language-Team: Portuguese (Portugal) (http://www.transifex.com/wysija/mp3/language/pt_PT/)\n"
15
  "MIME-Version: 1.0\n"
16
  "Content-Type: text/plain; charset=UTF-8\n"
26
  "X-Poedit-SourceCharset: UTF-8\n"
27
  "X-Textdomain-Support: yes\n"
28
 
29
+ #: lib/API/API.php:51 lib/API/API.php:78
30
  msgid "Invalid request"
31
  msgstr "Pedido inválido"
32
 
33
+ #: lib/API/API.php:132
34
  msgid "You do not have the required permissions."
35
  msgstr "Não tem as permissões necessárias."
36
 
74
  msgid "Check your inbox or spam folder to confirm your subscription."
75
  msgstr "Verifique na sua caixa de correio ou na pasta de spam para confirmar a sua subscrição."
76
 
77
+ #: lib/API/Endpoints/Forms.php:259 lib/API/Endpoints/Newsletters.php:204
78
  #: lib/API/Endpoints/Segments.php:119
79
  msgid "Copy of %s"
80
  msgstr "Cópia de %s"
81
 
82
+ #: lib/API/Endpoints/Mailer.php:29 lib/API/Endpoints/Newsletters.php:303
83
  msgid "The email could not be sent: %s"
84
  msgstr "Não foi possível enviar o email: %s"
85
 
88
  msgid "This template does not exist."
89
  msgstr "Este modelo não existe."
90
 
91
+ #: lib/API/Endpoints/Newsletters.php:30 lib/API/Endpoints/Newsletters.php:133
92
+ #: lib/API/Endpoints/Newsletters.php:154 lib/API/Endpoints/Newsletters.php:170
93
+ #: lib/API/Endpoints/Newsletters.php:186 lib/API/Endpoints/Newsletters.php:200
94
+ #: lib/API/Endpoints/Newsletters.php:233 lib/API/Endpoints/Newsletters.php:264
95
  #: lib/API/Endpoints/SendingQueue.php:28
96
  #: lib/API/Endpoints/SendingQueue.php:115
97
  #: lib/API/Endpoints/SendingQueue.php:141
98
  msgid "This newsletter does not exist."
99
  msgstr "Esta newsletter não existe."
100
 
101
+ #: lib/API/Endpoints/Newsletters.php:124
102
  msgid "You need to specify a status."
103
  msgstr "Tem de especificar um estado."
104
 
105
+ #: lib/API/Endpoints/Newsletters.php:224
106
  msgid "Newsletter data is missing."
107
  msgstr "Dados da newsletter em falta."
108
 
109
+ #: lib/API/Endpoints/Newsletters.php:255
110
  msgid "Please specify receiver information."
111
  msgstr "Por favor indique a informação do destinatário."
112
 
1663
 
1664
  #: views/form/editor.html:195
1665
  #: views/newsletter/templates/components/sidebar/preview.hbs:2
1666
+ #: views/newsletters.html:102 views/settings/basics.html:245
1667
+ #: views/settings/basics.html:302 views/settings/signup.html:177
1668
  msgid "Preview"
1669
  msgstr "Pré-visualizar"
1670
 
2112
  msgid "Visit MailPoet.com to purchase a key"
2113
  msgstr "Visite MailPoet.com para comprar uma chave"
2114
 
2115
+ #: views/layout.html:72
2116
  msgid ""
2117
  "Want to give feedback to the MailPoet team? Contact us here. Please provide "
2118
  "as much information as possible!"
3668
  " be directed to this page."
3669
  msgstr "Quando os seus subscritores clicarem na ligação \"Gerir a sua subscrição\", serão direccionados para esta página."
3670
 
3671
+ #: views/settings/basics.html:221
3672
+ msgid ""
3673
+ "If you want to use a custom Subscription page, simply paste this shortcode "
3674
+ "on to a WordPress page: [mailpoet_manage_subscription]"
3675
+ msgstr "Se quiser usar uma página personalizada para Subscrever, basta colar este shortcode numa página do WordPress: [mailpoet_manage_subscription]"
3676
+
3677
+ #: views/settings/basics.html:244 views/settings/basics.html:301
3678
  #: views/settings/signup.html:176
3679
  msgid "Preview page"
3680
  msgstr "Pré-visualizar página"
3681
 
3682
+ #: views/settings/basics.html:248
3683
  msgid "Subscribers can choose from these lists:"
3684
  msgstr "Os subscritores podem escolher das seguintes listas:"
3685
 
3686
+ #: views/settings/basics.html:254 views/settings/basics.html:332
3687
+ #: views/settings/basics.html:368
3688
  msgid "Leave this field empty to display all lists"
3689
  msgstr "Deixe este campo vazio para mostrar todas as listas"
3690
 
3691
+ #: views/settings/basics.html:273
3692
  msgid "Unsubscribe page"
3693
  msgstr "Página de cancelamento da subscrição"
3694
 
3695
+ #: views/settings/basics.html:276
3696
  msgid ""
3697
  "When your subscribers click the \"Unsubscribe\" link, they will be directed "
3698
  "to this page."
3699
  msgstr "Quando os seus subscritores clicarem na ligação \"Cancelar subscrição\", serão direccionados para esta página."
3700
 
3701
+ #: views/settings/basics.html:278
3702
  msgid ""
3703
  "If you want to use a custom Unsubscribe page, simply paste this shortcode on"
3704
  " to a WordPress page: [mailpoet_manage text=\"Manage your subscription\"]"
3705
+ msgstr "Se quiser usar uma página personalizada para Cancelar subscrição, basta colar este shortcode numa página do WordPress: [mailpoet_manage text=\"Gerir a sua subscrição\"]"
3706
 
3707
+ #: views/settings/basics.html:310
3708
  msgid "Archive page shortcode"
3709
  msgstr "Shortcode da página de arquivo"
3710
 
3711
+ #: views/settings/basics.html:313
3712
  msgid "Paste this shortcode on a page to display a list of past newsletters."
3713
  msgstr "Cole este shortcode numa página para mostrar uma lista de newsletters anteriores."
3714
 
3715
+ #: views/settings/basics.html:346
3716
  msgid "Shortcode to display total number of subscribers"
3717
  msgstr "Shortcode para mostrar o número total de subscritores"
3718
 
3719
+ #: views/settings/basics.html:349
3720
  msgid ""
3721
  "Paste this shortcode on a post or page to display the total number of "
3722
  "confirmed subscribers."
lang/mailpoet.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
7
- "POT-Creation-Date: 2017-03-28 17:53:27+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -148,7 +148,7 @@ msgstr ""
148
  msgid "Error validating API key, please try again later (code: %s)"
149
  msgstr ""
150
 
151
- #: lib/API/Endpoints/Settings.php:19
152
  msgid "You have not specified any settings to be saved."
153
  msgstr ""
154
 
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
7
+ "POT-Creation-Date: 2017-04-04 16:03:39+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
148
  msgid "Error validating API key, please try again later (code: %s)"
149
  msgstr ""
150
 
151
+ #: lib/API/Endpoints/Settings.php:21
152
  msgid "You have not specified any settings to be saved."
153
  msgstr ""
154
 
lib/API/Endpoints/Settings.php CHANGED
@@ -1,7 +1,9 @@
1
  <?php
2
  namespace MailPoet\API\Endpoints;
 
3
  use MailPoet\API\Endpoint as APIEndpoint;
4
  use MailPoet\API\Error as APIError;
 
5
  use MailPoet\Models\Setting;
6
  use MailPoet\Services\Bridge;
7
 
@@ -16,20 +18,20 @@ class Settings extends APIEndpoint {
16
  if(empty($settings)) {
17
  return $this->badRequest(array(
18
  APIError::BAD_REQUEST =>
19
- __("You have not specified any settings to be saved.", 'mailpoet')
20
  ));
21
  } else {
22
  foreach($settings as $name => $value) {
23
  Setting::setValue($name, $value);
24
  }
25
- if(!empty($settings['mta']['mailpoet_api_key'])
26
  && Bridge::isMPSendingServiceEnabled()
27
  ) {
28
  $bridge = new Bridge();
29
- $result = $bridge->checkKey($settings['mta']['mailpoet_api_key']);
30
  $bridge->updateSubscriberCount($result);
31
  }
32
  return $this->successResponse(Setting::getAll());
33
  }
34
  }
35
- }
1
  <?php
2
  namespace MailPoet\API\Endpoints;
3
+
4
  use MailPoet\API\Endpoint as APIEndpoint;
5
  use MailPoet\API\Error as APIError;
6
+ use MailPoet\Mailer\Mailer as MailerConfig;
7
  use MailPoet\Models\Setting;
8
  use MailPoet\Services\Bridge;
9
 
18
  if(empty($settings)) {
19
  return $this->badRequest(array(
20
  APIError::BAD_REQUEST =>
21
+ __('You have not specified any settings to be saved.', 'mailpoet')
22
  ));
23
  } else {
24
  foreach($settings as $name => $value) {
25
  Setting::setValue($name, $value);
26
  }
27
+ if(!empty($settings[MailerConfig::MAILER_CONFIG_SETTING_NAME]['mailpoet_api_key'])
28
  && Bridge::isMPSendingServiceEnabled()
29
  ) {
30
  $bridge = new Bridge();
31
+ $result = $bridge->checkKey($settings[MailerConfig::MAILER_CONFIG_SETTING_NAME]['mailpoet_api_key']);
32
  $bridge->updateSubscriberCount($result);
33
  }
34
  return $this->successResponse(Setting::getAll());
35
  }
36
  }
37
+ }
lib/Mailer/MailerLog.php CHANGED
@@ -89,6 +89,8 @@ class MailerLog {
89
 
90
  static function incrementSentCount() {
91
  $mailer_log = self::getMailerLog();
 
 
92
  // clear previous retry count, errors, etc.
93
  if($mailer_log['error']) {
94
  $mailer_log = self::clearSendingErrorLog($mailer_log);
@@ -110,9 +112,9 @@ class MailerLog {
110
  if($mailer_config['method'] === Mailer::METHOD_MAILPOET) return false;
111
  $mailer_log = self::getMailerLog($mailer_log);
112
  $elapsed_time = time() - (int)$mailer_log['started'];
113
- if($mailer_log['sent'] === $mailer_config['frequency_limit']) {
114
  if($elapsed_time <= $mailer_config['frequency_interval']) return true;
115
- // reset mailer log if enough time has passed since the limit was reached
116
  self::resetMailerLog();
117
  }
118
  return false;
89
 
90
  static function incrementSentCount() {
91
  $mailer_log = self::getMailerLog();
92
+ // do not increment count if sending limit is reached
93
+ if(self::isSendingLimitReached($mailer_log)) return;
94
  // clear previous retry count, errors, etc.
95
  if($mailer_log['error']) {
96
  $mailer_log = self::clearSendingErrorLog($mailer_log);
112
  if($mailer_config['method'] === Mailer::METHOD_MAILPOET) return false;
113
  $mailer_log = self::getMailerLog($mailer_log);
114
  $elapsed_time = time() - (int)$mailer_log['started'];
115
+ if($mailer_log['sent'] >= $mailer_config['frequency_limit']) {
116
  if($elapsed_time <= $mailer_config['frequency_interval']) return true;
117
+ // reset mailer log as enough time has passed since the limit was reached
118
  self::resetMailerLog();
119
  }
120
  return false;
lib/Models/Subscriber.php CHANGED
@@ -787,20 +787,13 @@ class Subscriber extends Model {
787
 
788
  static function withoutSegments($orm) {
789
  return $orm->select(MP_SUBSCRIBERS_TABLE.'.*')
790
- ->rawJoin(
791
- 'LEFT OUTER JOIN (
792
- SELECT `subscriber_id`
793
- FROM '.MP_SUBSCRIBER_SEGMENT_TABLE.'
794
- WHERE `status` = "'.self::STATUS_SUBSCRIBED.'"
795
- )',
796
- array(
797
- MP_SUBSCRIBERS_TABLE.'.id',
798
- '=',
799
- MP_SUBSCRIBER_SEGMENT_TABLE.'.subscriber_id'
800
- ),
801
- MP_SUBSCRIBER_SEGMENT_TABLE
802
- )
803
- ->whereNull(MP_SUBSCRIBER_SEGMENT_TABLE.'.subscriber_id');
804
  }
805
 
806
  static function createMultiple($columns, $values) {
787
 
788
  static function withoutSegments($orm) {
789
  return $orm->select(MP_SUBSCRIBERS_TABLE.'.*')
790
+ ->whereRaw(
791
+ MP_SUBSCRIBERS_TABLE . '.id NOT IN (
792
+ SELECT `subscriber_id`
793
+ FROM '.MP_SUBSCRIBER_SEGMENT_TABLE.'
794
+ WHERE `status` = "'.self::STATUS_SUBSCRIBED.'"
795
+ )'
796
+ );
 
 
 
 
 
 
 
797
  }
798
 
799
  static function createMultiple($columns, $values) {
lib/Newsletter/Links/Links.php CHANGED
@@ -48,7 +48,7 @@ class Links {
48
  if($shortcodes) {
49
  $extracted_links = array_map(function($shortcode) {
50
  return array(
51
- 'type' => self::LINK_TYPE_SHORTCODE,
52
  'html' => $shortcode,
53
  'link' => $shortcode
54
  );
@@ -216,4 +216,4 @@ class Links {
216
  $transformed_data['preview'] = (!empty($data[4])) ? $data[4] : false;
217
  return $transformed_data;
218
  }
219
- }
48
  if($shortcodes) {
49
  $extracted_links = array_map(function($shortcode) {
50
  return array(
51
+ 'type' => Links::LINK_TYPE_SHORTCODE,
52
  'html' => $shortcode,
53
  'link' => $shortcode
54
  );
216
  $transformed_data['preview'] = (!empty($data[4])) ? $data[4] : false;
217
  return $transformed_data;
218
  }
219
+ }
mailpoet.php CHANGED
@@ -4,7 +4,7 @@ if(!defined('ABSPATH')) exit;
4
 
5
  /*
6
  * Plugin Name: MailPoet
7
- * Version: 3.0.0-beta.24
8
  * Plugin URI: http://www.mailpoet.com
9
  * Description: Create and send beautiful email newsletters, autoresponders, and post notifications without leaving WordPress. This is a beta version of our brand new plugin!
10
  * Author: MailPoet
@@ -21,7 +21,7 @@ if(!defined('ABSPATH')) exit;
21
  */
22
 
23
  $mailpoet_plugin = array(
24
- 'version' => '3.0.0-beta.24',
25
  'filename' => __FILE__,
26
  'path' => dirname(__FILE__),
27
  'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
4
 
5
  /*
6
  * Plugin Name: MailPoet
7
+ * Version: 3.0.0-beta.25
8
  * Plugin URI: http://www.mailpoet.com
9
  * Description: Create and send beautiful email newsletters, autoresponders, and post notifications without leaving WordPress. This is a beta version of our brand new plugin!
10
  * Author: MailPoet
21
  */
22
 
23
  $mailpoet_plugin = array(
24
+ 'version' => '3.0.0-beta.25',
25
  'filename' => __FILE__,
26
  'path' => dirname(__FILE__),
27
  'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: mailpoet, wysija
3
  Tags: newsletter, email, welcome email, post notification, autoresponder, signup, smtp
4
  Requires at least: 4.6
5
  Tested up to: 4.7.3
6
- Stable tag: 3.0.0-beta.24
7
  Create and send beautiful emails and newsletters from WordPress.
8
 
9
  == Description ==
@@ -84,6 +84,11 @@ Our [support site](https://docs.mailpoet.com/) has plenty of articles. You can w
84
 
85
  == Changelog ==
86
 
 
 
 
 
 
87
  = 3.0.0-beta.24 - 2017-03-28 =
88
  * Improved: clarified UI language in Settings and Import. Thanks Lloyd, @rtomo and @perthmetro;
89
  * Added: hooks and filters for premium features. Thx Alex;
3
  Tags: newsletter, email, welcome email, post notification, autoresponder, signup, smtp
4
  Requires at least: 4.6
5
  Tested up to: 4.7.3
6
+ Stable tag: 3.0.0-beta.25
7
  Create and send beautiful emails and newsletters from WordPress.
8
 
9
  == Description ==
84
 
85
  == Changelog ==
86
 
87
+ = 3.0.0-beta.25 - 2017-04-04 =
88
+ * Improved: subscriber listings with large number of subscribers (tens of thousands) now load much faster on MySQL 5.5 and lower. Thanks Moulouk!;
89
+ * Fixed: updating sending frequency no longer breaks limit enforcement. Thx Vincent!;
90
+ * Fixed: sending works again on hosts running (very old) PHP version 5.3. WordPress recommends PHP 7 or newer. Ask your host how to upgrade. Thanks Emmanuel.
91
+
92
  = 3.0.0-beta.24 - 2017-03-28 =
93
  * Improved: clarified UI language in Settings and Import. Thanks Lloyd, @rtomo and @perthmetro;
94
  * Added: hooks and filters for premium features. Thx Alex;
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit6af191b1fcc1dd8be40405149a253889::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit273ee3b3891a5ab61f4c79575736d8fb::getLoader();
vendor/composer/ClassLoader.php CHANGED
@@ -55,7 +55,6 @@ class ClassLoader
55
  private $classMap = array();
56
  private $classMapAuthoritative = false;
57
  private $missingClasses = array();
58
- private $apcuPrefix;
59
 
60
  public function getPrefixes()
61
  {
@@ -272,26 +271,6 @@ class ClassLoader
272
  return $this->classMapAuthoritative;
273
  }
274
 
275
- /**
276
- * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
277
- *
278
- * @param string|null $apcuPrefix
279
- */
280
- public function setApcuPrefix($apcuPrefix)
281
- {
282
- $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
283
- }
284
-
285
- /**
286
- * The APCu prefix in use, or null if APCu caching is not enabled.
287
- *
288
- * @return string|null
289
- */
290
- public function getApcuPrefix()
291
- {
292
- return $this->apcuPrefix;
293
- }
294
-
295
  /**
296
  * Registers this instance as an autoloader.
297
  *
@@ -334,6 +313,11 @@ class ClassLoader
334
  */
335
  public function findFile($class)
336
  {
 
 
 
 
 
337
  // class map lookup
338
  if (isset($this->classMap[$class])) {
339
  return $this->classMap[$class];
@@ -341,12 +325,6 @@ class ClassLoader
341
  if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
342
  return false;
343
  }
344
- if (null !== $this->apcuPrefix) {
345
- $file = apcu_fetch($this->apcuPrefix.$class, $hit);
346
- if ($hit) {
347
- return $file;
348
- }
349
- }
350
 
351
  $file = $this->findFileWithExtension($class, '.php');
352
 
@@ -355,10 +333,6 @@ class ClassLoader
355
  $file = $this->findFileWithExtension($class, '.hh');
356
  }
357
 
358
- if (null !== $this->apcuPrefix) {
359
- apcu_add($this->apcuPrefix.$class, $file);
360
- }
361
-
362
  if (false === $file) {
363
  // Remember that this class does not exist.
364
  $this->missingClasses[$class] = true;
55
  private $classMap = array();
56
  private $classMapAuthoritative = false;
57
  private $missingClasses = array();
 
58
 
59
  public function getPrefixes()
60
  {
271
  return $this->classMapAuthoritative;
272
  }
273
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
274
  /**
275
  * Registers this instance as an autoloader.
276
  *
313
  */
314
  public function findFile($class)
315
  {
316
+ // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
317
+ if ('\\' == $class[0]) {
318
+ $class = substr($class, 1);
319
+ }
320
+
321
  // class map lookup
322
  if (isset($this->classMap[$class])) {
323
  return $this->classMap[$class];
325
  if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
326
  return false;
327
  }
 
 
 
 
 
 
328
 
329
  $file = $this->findFileWithExtension($class, '.php');
330
 
333
  $file = $this->findFileWithExtension($class, '.hh');
334
  }
335
 
 
 
 
 
336
  if (false === $file) {
337
  // Remember that this class does not exist.
338
  $this->missingClasses[$class] = true;
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit6af191b1fcc1dd8be40405149a253889
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit6af191b1fcc1dd8be40405149a253889
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit6af191b1fcc1dd8be40405149a253889', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit6af191b1fcc1dd8be40405149a253889', 'loadClassLoader'));
25
 
26
- $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit6af191b1fcc1dd8be40405149a253889::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit6af191b1fcc1dd8be40405149a253889
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInit6af191b1fcc1dd8be40405149a253889::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequire6af191b1fcc1dd8be40405149a253889($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequire6af191b1fcc1dd8be40405149a253889($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit273ee3b3891a5ab61f4c79575736d8fb
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit273ee3b3891a5ab61f4c79575736d8fb', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit273ee3b3891a5ab61f4c79575736d8fb', 'loadClassLoader'));
25
 
26
+ $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit273ee3b3891a5ab61f4c79575736d8fb::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInit273ee3b3891a5ab61f4c79575736d8fb::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequire273ee3b3891a5ab61f4c79575736d8fb($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequire273ee3b3891a5ab61f4c79575736d8fb($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit6af191b1fcc1dd8be40405149a253889
8
  {
9
  public static $files = array (
10
  '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
@@ -610,10 +610,10 @@ class ComposerStaticInit6af191b1fcc1dd8be40405149a253889
610
  public static function getInitializer(ClassLoader $loader)
611
  {
612
  return \Closure::bind(function () use ($loader) {
613
- $loader->prefixLengthsPsr4 = ComposerStaticInit6af191b1fcc1dd8be40405149a253889::$prefixLengthsPsr4;
614
- $loader->prefixDirsPsr4 = ComposerStaticInit6af191b1fcc1dd8be40405149a253889::$prefixDirsPsr4;
615
- $loader->prefixesPsr0 = ComposerStaticInit6af191b1fcc1dd8be40405149a253889::$prefixesPsr0;
616
- $loader->classMap = ComposerStaticInit6af191b1fcc1dd8be40405149a253889::$classMap;
617
 
618
  }, null, ClassLoader::class);
619
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit273ee3b3891a5ab61f4c79575736d8fb
8
  {
9
  public static $files = array (
10
  '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
610
  public static function getInitializer(ClassLoader $loader)
611
  {
612
  return \Closure::bind(function () use ($loader) {
613
+ $loader->prefixLengthsPsr4 = ComposerStaticInit273ee3b3891a5ab61f4c79575736d8fb::$prefixLengthsPsr4;
614
+ $loader->prefixDirsPsr4 = ComposerStaticInit273ee3b3891a5ab61f4c79575736d8fb::$prefixDirsPsr4;
615
+ $loader->prefixesPsr0 = ComposerStaticInit273ee3b3891a5ab61f4c79575736d8fb::$prefixesPsr0;
616
+ $loader->classMap = ComposerStaticInit273ee3b3891a5ab61f4c79575736d8fb::$classMap;
617
 
618
  }, null, ClassLoader::class);
619
  }
vendor/composer/installed.json CHANGED
@@ -14,7 +14,7 @@
14
  "reference": "b0c1bda3be5a35da44ba1ac28cc61c67d2ada465",
15
  "shasum": ""
16
  },
17
- "time": "2015-11-28T21:47:43+00:00",
18
  "type": "library",
19
  "installation-source": "dist",
20
  "autoload": {
@@ -55,7 +55,7 @@
55
  "require-dev": {
56
  "phpunit/phpunit": "^5.6"
57
  },
58
- "time": "2016-12-14T06:28:26+00:00",
59
  "type": "library",
60
  "installation-source": "dist",
61
  "autoload": {
@@ -116,7 +116,7 @@
116
  "j4mie/idiorm": "1.5.*",
117
  "php": ">=5.2.0"
118
  },
119
- "time": "2014-09-23T10:49:36+00:00",
120
  "type": "library",
121
  "installation-source": "dist",
122
  "autoload": {
@@ -180,7 +180,7 @@
180
  "require-dev": {
181
  "phpunit/phpunit": "~4.0|~5.0"
182
  },
183
- "time": "2017-01-23T04:29:33+00:00",
184
  "type": "library",
185
  "installation-source": "dist",
186
  "autoload": {
@@ -226,7 +226,7 @@
226
  "suggest": {
227
  "ext-mbstring": "For best performance"
228
  },
229
- "time": "2016-11-14T01:06:16+00:00",
230
  "type": "library",
231
  "extra": {
232
  "branch-alias": {
@@ -299,7 +299,7 @@
299
  "symfony/config": "",
300
  "symfony/yaml": ""
301
  },
302
- "time": "2017-03-04T12:20:59+00:00",
303
  "type": "library",
304
  "extra": {
305
  "branch-alias": {
@@ -355,7 +355,7 @@
355
  "friendsofphp/php-cs-fixer": "~2",
356
  "phpunit/phpunit": "~4.0 || ~5.0"
357
  },
358
- "time": "2017-01-16T07:55:07+00:00",
359
  "type": "library",
360
  "extra": {
361
  "branch-alias": {
@@ -408,7 +408,7 @@
408
  "require-dev": {
409
  "phpunit/phpunit": "*"
410
  },
411
- "time": "2016-07-19T19:14:21+00:00",
412
  "type": "library",
413
  "installation-source": "dist",
414
  "autoload": {
@@ -457,7 +457,7 @@
457
  "phpunit/phpunit": ">=4.0",
458
  "soundasleep/component-tests": "dev-master"
459
  },
460
- "time": "2016-06-09T04:56:16+00:00",
461
  "type": "library",
462
  "installation-source": "dist",
463
  "autoload": {
@@ -509,7 +509,7 @@
509
  "mockery/mockery": "~0.9.1",
510
  "symfony/phpunit-bridge": "~3.2"
511
  },
512
- "time": "2017-02-13T07:52:53+00:00",
513
  "type": "library",
514
  "extra": {
515
  "branch-alias": {
@@ -564,7 +564,7 @@
564
  "require-dev": {
565
  "htmlawed/htmlawed": "dev-master"
566
  },
567
- "time": "2016-01-14T20:55:00+00:00",
568
  "type": "library",
569
  "installation-source": "dist",
570
  "autoload": {
@@ -620,7 +620,7 @@
620
  "symfony/debug": "~2.7",
621
  "symfony/phpunit-bridge": "~3.2"
622
  },
623
- "time": "2017-02-27T00:07:03+00:00",
624
  "type": "library",
625
  "extra": {
626
  "branch-alias": {
14
  "reference": "b0c1bda3be5a35da44ba1ac28cc61c67d2ada465",
15
  "shasum": ""
16
  },
17
+ "time": "2015-11-28 21:47:43",
18
  "type": "library",
19
  "installation-source": "dist",
20
  "autoload": {
55
  "require-dev": {
56
  "phpunit/phpunit": "^5.6"
57
  },
58
+ "time": "2016-12-14 06:28:26",
59
  "type": "library",
60
  "installation-source": "dist",
61
  "autoload": {
116
  "j4mie/idiorm": "1.5.*",
117
  "php": ">=5.2.0"
118
  },
119
+ "time": "2014-09-23 10:49:36",
120
  "type": "library",
121
  "installation-source": "dist",
122
  "autoload": {
180
  "require-dev": {
181
  "phpunit/phpunit": "~4.0|~5.0"
182
  },
183
+ "time": "2017-01-23 04:29:33",
184
  "type": "library",
185
  "installation-source": "dist",
186
  "autoload": {
226
  "suggest": {
227
  "ext-mbstring": "For best performance"
228
  },
229
+ "time": "2016-11-14 01:06:16",
230
  "type": "library",
231
  "extra": {
232
  "branch-alias": {
299
  "symfony/config": "",
300
  "symfony/yaml": ""
301
  },
302
+ "time": "2017-03-04 12:20:59",
303
  "type": "library",
304
  "extra": {
305
  "branch-alias": {
355
  "friendsofphp/php-cs-fixer": "~2",
356
  "phpunit/phpunit": "~4.0 || ~5.0"
357
  },
358
+ "time": "2017-01-16 07:55:07",
359
  "type": "library",
360
  "extra": {
361
  "branch-alias": {
408
  "require-dev": {
409
  "phpunit/phpunit": "*"
410
  },
411
+ "time": "2016-07-19 19:14:21",
412
  "type": "library",
413
  "installation-source": "dist",
414
  "autoload": {
457
  "phpunit/phpunit": ">=4.0",
458
  "soundasleep/component-tests": "dev-master"
459
  },
460
+ "time": "2016-06-09 04:56:16",
461
  "type": "library",
462
  "installation-source": "dist",
463
  "autoload": {
509
  "mockery/mockery": "~0.9.1",
510
  "symfony/phpunit-bridge": "~3.2"
511
  },
512
+ "time": "2017-02-13 07:52:53",
513
  "type": "library",
514
  "extra": {
515
  "branch-alias": {
564
  "require-dev": {
565
  "htmlawed/htmlawed": "dev-master"
566
  },
567
+ "time": "2016-01-14 20:55:00",
568
  "type": "library",
569
  "installation-source": "dist",
570
  "autoload": {
620
  "symfony/debug": "~2.7",
621
  "symfony/phpunit-bridge": "~3.2"
622
  },
623
+ "time": "2017-02-27 00:07:03",
624
  "type": "library",
625
  "extra": {
626
  "branch-alias": {